2006-01-27 17:27:57 +11:00
|
|
|
void cleanup(void);
|
2008-10-17 22:15:27 +11:00
|
|
|
int addtext(int x, int y, int size, char *string, SDL_Color *c, int delay, int ttype);
|
2013-12-22 06:54:51 +11:00
|
|
|
void addfadingtile(int x, int y);
|
2008-10-17 22:15:27 +11:00
|
|
|
void addoutlinetext(int x, int y, int size, char *msg, SDL_Color *col, SDL_Color *bgcol, int delay, int ttype);
|
2006-01-31 17:18:01 +11:00
|
|
|
void drawscore(void);
|
2008-10-07 16:53:06 +11:00
|
|
|
void drawbosshealth(void);
|
2006-01-27 17:28:28 +11:00
|
|
|
void drawtext(void);
|
|
|
|
void movetext(void);
|
2006-01-31 17:18:01 +11:00
|
|
|
void removeall(void);
|
2006-01-27 17:27:57 +11:00
|
|
|
void drawlevel(void);
|
2013-08-14 19:52:33 +10:00
|
|
|
int randommonster(void);
|
2006-01-27 17:27:57 +11:00
|
|
|
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);
|
2008-11-26 14:24:03 +11:00
|
|
|
int movex(sprite_t *s,double amt,int onpurpose);
|
2008-09-27 16:02:42 +10:00
|
|
|
void bouncesprite(sprite_t *s);
|
2008-10-07 18:58:36 +11:00
|
|
|
int movesprite(sprite_t *s);
|
2016-07-22 17:58:26 +10:00
|
|
|
int isdeadly(tiletype_t *tt, int tx, int ty);
|
2006-11-06 20:16:19 +11:00
|
|
|
int isinwater(sprite_t *s);
|
2008-09-29 18:32:56 +10:00
|
|
|
int isinwaterpoint(int x, int y);
|
2006-11-06 20:16:19 +11:00
|
|
|
int isroofabove(sprite_t *s);
|
2008-09-16 12:39:33 +10:00
|
|
|
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);
|
2008-09-26 19:51:17 +10:00
|
|
|
int isonbridge(sprite_t *s);
|
2006-01-27 17:27:57 +11:00
|
|
|
int isladderabove(sprite_t *s);
|
2009-03-11 12:46:48 +11:00
|
|
|
int isladderbelow(sprite_t *s);
|
2016-07-22 17:58:26 +10:00
|
|
|
int isspikes(tiletype_t *tt, int tx, int ty);
|
2008-11-12 14:25:48 +11:00
|
|
|
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);
|
2006-01-31 17:18:01 +11:00
|
|
|
void nextlevel(void);
|
2006-01-30 09:08:01 +11:00
|
|
|
void jump(sprite_t *s, int dir);
|
2006-01-31 17:18:01 +11:00
|
|
|
double getspeed(sprite_t *s );
|
2006-01-27 17:27:57 +11:00
|
|
|
void adjustheight(sprite_t *s);
|
2008-10-03 21:11:07 +10:00
|
|
|
void adjustx(sprite_t *s, int newframe);
|
2006-01-31 17:18:01 +11:00
|
|
|
void tick(void);
|
2008-09-16 12:39:33 +10:00
|
|
|
void usage(void);
|
2008-09-26 19:51:17 +10:00
|
|
|
int canmove(sprite_t *pl);
|
|
|
|
int canturn(sprite_t *pl);
|
|
|
|
int initsound(void);
|
|
|
|
int loadfx(int sid, char *filename);
|
|
|
|
void playfx(int num);
|
2008-09-27 16:02:42 +10:00
|
|
|
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);
|
2008-09-28 13:18:36 +10:00
|
|
|
SDL_Surface *grabbehind(sprite_t *s, SDL_Surface *surf);
|
2008-09-28 13:31:46 +10:00
|
|
|
void dumpsprites(void);
|
2013-08-14 19:52:33 +10:00
|
|
|
int countfruits(void);
|
2008-11-03 17:06:37 +11:00
|
|
|
int countmonsters(int montype);
|
2013-08-14 19:52:33 +10:00
|
|
|
int countsprites(int montype);
|
|
|
|
int counttextoftype(int wanttype);
|
2008-09-28 14:09:12 +10:00
|
|
|
int getpoints(int id);
|
2008-09-30 17:42:09 +10:00
|
|
|
int isladder(int tid);
|
2008-11-23 16:50:02 +11:00
|
|
|
char *addcommas(char *buffer, long num);
|
2013-08-27 22:59:20 +10:00
|
|
|
sprite_t *addupstar(void);
|
2008-11-23 16:50:02 +11:00
|
|
|
int addscore(sprite_t *s, long amt);
|
2008-10-10 11:51:40 +11:00
|
|
|
void extralife(sprite_t *s);
|
2008-10-03 21:11:07 +10:00
|
|
|
void doice(void);
|
2008-10-13 11:43:01 +11:00
|
|
|
void doflood(void);
|
2008-10-17 13:05:54 +11:00
|
|
|
void undoflood(void);
|
2008-10-07 16:53:06 +11:00
|
|
|
void checklevelend(void);
|
2008-10-07 18:58:36 +11:00
|
|
|
void checksprites(void);
|
|
|
|
void moveallsprites(void);
|
|
|
|
void checkcollideall(void);
|
|
|
|
void drawallsprites(void);
|
2008-10-09 14:32:15 +11:00
|
|
|
void checkwrap(sprite_t *s);
|
|
|
|
int getcurworld(void);
|
|
|
|
int getcurlevel(void);
|
|
|
|
int getmonjumpspeed(sprite_t *s);
|
|
|
|
int getjumpdelay(int mid);
|
2008-10-10 07:03:17 +11:00
|
|
|
void togglepause(void);
|
|
|
|
void togglefullscreen(void);
|
2016-07-24 16:43:31 +10:00
|
|
|
void preinitgl(void);
|
2016-07-24 16:27:15 +10:00
|
|
|
void initgl(void);
|
2008-10-10 07:03:17 +11:00
|
|
|
void initsdl(void);
|
2008-10-10 12:30:40 +11:00
|
|
|
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);
|
2008-11-12 14:25:48 +11:00
|
|
|
sprite_t *haspowerupany(int pid);
|
2008-10-15 14:20:10 +11:00
|
|
|
void gaincard(sprite_t *s, int cardid);
|
|
|
|
int getpokereffect(sprite_t *pl);
|
|
|
|
void dopokereffect(sprite_t *pl, int effect);
|
|
|
|
char *getpokermsg(int effect);
|
2008-10-16 16:51:30 +11:00
|
|
|
char *getpokermsg2(int effect, char *buf);
|
2008-10-16 12:47:09 +11:00
|
|
|
void handleinput(void);
|
2008-11-12 14:25:48 +11:00
|
|
|
int keydown(int whichplayer, int checkfor);
|
2016-07-24 16:27:15 +10:00
|
|
|
void leveltransition_blit(levscrollinfo_t *l, SDL_Surface *copybuffer);
|
|
|
|
void leveltransition_moveplayer(levscrollinfo_t *l);
|
|
|
|
void leveltransition_scrolllevel(int srcx, int srcy, int srcw, int srch,
|
|
|
|
int dstx, int dsty, int dstw, int dsth,
|
|
|
|
int nextcolx, int nextcoly, int nextcolw, int nextcolh,
|
|
|
|
int nextcol_dstx, int nextcol_dsty, int nextcol_dstw, int nextcol_dsth);
|
2008-10-16 12:47:09 +11:00
|
|
|
void trytojump(sprite_t *pl);
|
2008-10-23 17:26:13 +11:00
|
|
|
void trytoslam(sprite_t *pl);
|
2008-10-16 12:47:09 +11:00
|
|
|
void trytoshoot(sprite_t *pl);
|
2008-11-12 14:25:48 +11:00
|
|
|
void docannoneffect(sprite_t *pp);
|
2008-10-16 14:47:16 +11:00
|
|
|
void dotitlescreen(void);
|
2008-10-18 14:18:24 +11:00
|
|
|
void startgame(void);
|
2008-10-19 20:00:03 +11:00
|
|
|
void uncatch(sprite_t *s);
|
2008-10-20 09:58:54 +11:00
|
|
|
void makeinvuln(sprite_t *s);
|
2008-11-12 14:25:48 +11:00
|
|
|
void handletitleinput(int whichplayer, int key);
|
2008-10-21 07:38:40 +11:00
|
|
|
void setjoymappings(void);
|
2008-10-23 17:26:13 +11:00
|
|
|
//int keytojoybutton(int key);
|
2008-11-12 14:25:48 +11:00
|
|
|
int joybuttondown(int whichplayer, int key);
|
2008-10-21 07:38:40 +11:00
|
|
|
int joybuttontokey(int buttonnum);
|
2008-10-21 08:40:00 +11:00
|
|
|
void drawcredits(void);
|
2008-10-23 06:40:10 +11:00
|
|
|
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);
|
2008-10-22 12:38:31 +11:00
|
|
|
int socket_readline(int sock, char *out);
|
2008-10-22 11:51:09 +11:00
|
|
|
void showhiscores(void);
|
2008-11-12 16:26:26 +11:00
|
|
|
void checkhiscores(sprite_t *s);
|
2013-08-25 16:37:14 +10:00
|
|
|
int gethiscores_inet(int easyscores);
|
|
|
|
int gethiscores_local(int easyscores);
|
2008-11-05 06:41:34 +11:00
|
|
|
int gethiscores(int easyscores);
|
2013-08-25 16:37:14 +10:00
|
|
|
int processhiscore(void *dataptr, int ncols, char **argv, char **colname);
|
2008-10-23 14:21:15 +11:00
|
|
|
void drawhiscores(void);
|
2008-10-23 06:40:10 +11:00
|
|
|
int submithiscore(int score,int level, char *name);
|
2013-08-25 16:37:14 +10:00
|
|
|
int submithiscore_inet(int score,int level, char *name);
|
|
|
|
int submithiscore_local(int score,int level, char *name);
|
2008-10-23 14:27:54 +11:00
|
|
|
void getinput(void);
|
2008-10-26 14:31:16 +11:00
|
|
|
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);
|
2008-11-12 14:25:48 +11:00
|
|
|
void disablepowerups(int pid);
|
2008-11-05 06:41:34 +11:00
|
|
|
int easymode(void);
|
2008-11-05 07:03:05 +11:00
|
|
|
int uncaughtmonsters(void);
|
2008-11-06 12:15:12 +11:00
|
|
|
void swimup(sprite_t *pl);
|
|
|
|
void swimdown(sprite_t *pl);
|
2008-11-09 08:14:10 +11:00
|
|
|
double getdistance(double x1, double y1, double x2, double y2);
|
2008-11-12 14:25:48 +11:00
|
|
|
void doplayermovement(sprite_t *pl);
|
2009-03-20 12:35:13 +11:00
|
|
|
sprite_t *getclosestplayer(sprite_t *s);
|
2013-08-14 19:52:33 +10:00
|
|
|
sprite_t *getclosestplayerxy(int x, int y);
|
2008-11-23 18:54:06 +11:00
|
|
|
double getxdisttoplayer(sprite_t *s, sprite_t **pl);
|
2008-11-12 14:25:48 +11:00
|
|
|
double getydisttoplayer(sprite_t *s);
|
|
|
|
int playersalive(void);
|
2008-11-21 11:14:26 +11:00
|
|
|
int inintro(void);
|
2009-03-11 13:26:19 +11:00
|
|
|
void faceplayer(sprite_t *s);
|
2008-11-12 14:25:48 +11:00
|
|
|
sprite_t *isplayerbelow(sprite_t *s);
|
2009-03-21 05:55:55 +11:00
|
|
|
sprite_t *isplayerbelowgt(sprite_t *s,int dis);
|
2008-11-12 14:25:48 +11:00
|
|
|
sprite_t *isplayerabove(sprite_t *s);
|
2009-03-21 05:55:55 +11:00
|
|
|
sprite_t *isplayerabovegt(sprite_t *s,int dis);
|
|
|
|
sprite_t *isplayerabovelt(sprite_t *s,int dis);
|
2008-11-12 14:25:48 +11:00
|
|
|
sprite_t *isplayerright(sprite_t *s);
|
2009-03-11 13:26:19 +11:00
|
|
|
sprite_t *isplayerleft(sprite_t *s);
|
2009-03-05 12:53:20 +11:00
|
|
|
sprite_t *isplayerahead(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);
|
2008-11-21 12:55:56 +11:00
|
|
|
int getpnum(sprite_t *s);
|
2013-08-14 19:52:33 +10:00
|
|
|
sprite_t *getrandomaliveplayer(void);
|
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);
|
2013-08-30 21:08:01 +10:00
|
|
|
//int isice(int id);
|
2009-03-27 08:51:12 +11:00
|
|
|
int isconveyor(int id);
|
2009-03-11 08:10:17 +11:00
|
|
|
int isbridge(int id);
|
2008-12-03 09:29:24 +11:00
|
|
|
int savebmp(SDL_Surface *which);
|
2013-12-22 06:54:51 +11:00
|
|
|
void melttile(int tx,int ty, int howlong, int wantpuff);
|
2013-08-14 19:52:33 +10:00
|
|
|
void selectspell(sprite_t *s);
|
|
|
|
void incfruittype(void);
|
2013-08-18 07:53:59 +10:00
|
|
|
SDL_Color *getptextcol(sprite_t *s);
|