ratcatcher/rc.h

130 lines
4.2 KiB
C
Raw Normal View History

2006-01-27 17:27:57 +11:00
void cleanup(void);
int addtext(int x, int y, int size, char *string, SDL_Color *c, int delay, int ttype);
void addoutlinetext(int x, int y, int size, char *msg, SDL_Color *col, SDL_Color *bgcol, int delay, int ttype);
void drawscore(void);
void drawbosshealth(void);
2006-01-27 17:28:28 +11:00
void drawtext(void);
void movetext(void);
void removeall(void);
2006-01-27 17:27:57 +11:00
void drawlevel(void);
void removesprite(sprite_t *s);
void removenetting(sprite_t *s);
void drawnetting(sprite_t *s);
void dogravity(sprite_t *s);
void dotileeffects(sprite_t *s);
int movex(sprite_t *s,double amt,int onpurpose);
void bouncesprite(sprite_t *s);
int movesprite(sprite_t *s);
2006-11-06 20:16:19 +11:00
int isinwater(sprite_t *s);
int isinwaterpoint(int x, int y);
2006-11-06 20:16:19 +11:00
int isroofabove(sprite_t *s);
int isroofnabove(sprite_t *s,int howfar);
2006-01-27 17:27:57 +11:00
int isonground(sprite_t *s);
int isongroundpoint(sprite_t *s, int x, int y);
int isonladder(sprite_t *s);
int isonbridge(sprite_t *s);
2006-01-27 17:27:57 +11:00
int isladderabove(sprite_t *s);
int dofruiteffect(sprite_t *pp, sprite_t *s);
2006-01-27 17:27:57 +11:00
void checkcollide(sprite_t *s);
2008-11-06 20:15:09 +11:00
void checkcollideplatform(sprite_t *s);
2006-01-30 09:08:01 +11:00
void die(sprite_t *s);
void nextlevel(void);
2006-01-30 09:08:01 +11:00
void jump(sprite_t *s, int dir);
double getspeed(sprite_t *s );
2006-01-27 17:27:57 +11:00
void adjustheight(sprite_t *s);
void adjustx(sprite_t *s, int newframe);
void tick(void);
void usage(void);
int canmove(sprite_t *pl);
int canturn(sprite_t *pl);
int initsound(void);
int loadfx(int sid, char *filename);
void playfx(int num);
void playmusic(Mix_Music *toplay);
void stopmusic(void);
void channeldone(int channel);
2008-11-06 20:15:09 +11:00
int moveto(sprite_t *p, int dstx, int dsty, double xspeed,double yspeed);
SDL_Surface *grabbehind(sprite_t *s, SDL_Surface *surf);
void dumpsprites(void);
2008-11-03 17:06:37 +11:00
int countmonsters(int montype);
int getpoints(int id);
int isladder(int tid);
char *addcommas(char *buffer, long num);
int addscore(sprite_t *s, long amt);
2008-10-10 11:51:40 +11:00
void extralife(sprite_t *s);
void doice(void);
void doflood(void);
void undoflood(void);
void checklevelend(void);
void checksprites(void);
void moveallsprites(void);
void checkcollideall(void);
void drawallsprites(void);
void checkwrap(sprite_t *s);
int getcurworld(void);
int getcurlevel(void);
int getmonjumpspeed(sprite_t *s);
int getjumpdelay(int mid);
void togglepause(void);
void togglefullscreen(void);
void initsdl(void);
void getfruit(sprite_t *giveto, sprite_t *fruit, int multiplier);
2008-10-15 06:36:51 +11:00
int haspowerup(sprite_t *s, int pid);
sprite_t *haspowerupany(int pid);
void gaincard(sprite_t *s, int cardid);
int getpokereffect(sprite_t *pl);
void dopokereffect(sprite_t *pl, int effect);
char *getpokermsg(int effect);
char *getpokermsg2(int effect, char *buf);
void handleinput(void);
int keydown(int whichplayer, int checkfor);
void trytojump(sprite_t *pl);
void trytoslam(sprite_t *pl);
void trytoshoot(sprite_t *pl);
void docannoneffect(sprite_t *pp);
2008-10-16 14:47:16 +11:00
void dotitlescreen(void);
void startgame(void);
void uncatch(sprite_t *s);
void makeinvuln(sprite_t *s);
void handletitleinput(int whichplayer, int key);
void setjoymappings(void);
//int keytojoybutton(int key);
int joybuttondown(int whichplayer, int key);
int joybuttontokey(int buttonnum);
void drawcredits(void);
int drawoutlinetext(SDL_Surface *where,int x, int y, int size, char *msg, SDL_Color *col, SDL_Color *bgcol);
2008-10-22 11:51:09 +11:00
void drawoutlinetextcentre(SDL_Surface *where,int y, int size, char *msg, SDL_Color *col, SDL_Color *bgcol);
int socket_readline(int sock, char *out);
2008-10-22 11:51:09 +11:00
void showhiscores(void);
void checkhiscores(sprite_t *s);
int gethiscores(int easyscores);
void drawhiscores(void);
int submithiscore(int score,int level, char *name);
void getinput(void);
int isendoflev(void);
void keeponscreen(sprite_t *s);
void stopteleporting(sprite_t *s);
2008-10-30 08:54:53 +11:00
void losepowerup(sprite_t *s);
void disablepowerups(int pid);
int easymode(void);
int uncaughtmonsters(void);
void swimup(sprite_t *pl);
void swimdown(sprite_t *pl);
double getdistance(double x1, double y1, double x2, double y2);
void doplayermovement(sprite_t *pl);
2008-11-23 18:54:06 +11:00
double getxdisttoplayer(sprite_t *s, sprite_t **pl);
double getydisttoplayer(sprite_t *s);
int playersalive(void);
2008-11-21 11:14:26 +11:00
int inintro(void);
sprite_t *isplayerbelow(sprite_t *s);
sprite_t *isplayerabove(sprite_t *s);
sprite_t *isplayerright(sprite_t *s);
2008-11-19 13:40:59 +11:00
SDL_Color *getcolour(int id);
SDL_Color *getbgcolour(int id);
2008-11-21 11:14:26 +11:00
void dointroseq(void);
2008-11-21 12:36:52 +11:00
int addcredit(void);
int getpnum(sprite_t *s);
2008-11-25 08:54:25 +11:00
int isonplatform(double x, double y);
2008-11-25 15:05:53 +11:00
int countbabies(sprite_t *s, int babytype);
int isice(int id);