2006-04-13 20:47:06 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
/*
|
|
|
|
Copyright (C) 1996, 2003 - 3D Realms Entertainment
|
2007-02-08 04:19:39 +00:00
|
|
|
Copyright (C) 2000, 2003 - Matt Saettler (EDuke Enhancements)
|
|
|
|
Copyright (C) 2004, 2007 - EDuke32 developers
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-02-08 04:19:39 +00:00
|
|
|
This file is part of EDuke32
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-02-08 04:19:39 +00:00
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License version 2
|
|
|
|
as published by the Free Software Foundation.
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#ifndef __funct_h__
|
|
|
|
#define __funct_h__
|
|
|
|
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void sendscore(const char *s);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void SoundStartup(void);
|
|
|
|
extern void SoundShutdown(void);
|
|
|
|
extern void MusicStartup(void);
|
|
|
|
extern void MusicShutdown(void);
|
|
|
|
extern void intomenusounds(void);
|
2008-04-01 09:06:29 +00:00
|
|
|
extern int playmusic(const char *fn, const int sel);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int loadsound(unsigned num);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int xyzsound(int num,int i,int x,int y,int z);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void sound(int num);
|
|
|
|
extern int spritesound(unsigned int num,int i);
|
|
|
|
extern void stopsound(int num);
|
|
|
|
extern void stopenvsound(int num,int i);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void pan3dsound(void);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void testcallback(unsigned int num);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void clearsoundlocks(void);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int callsound(int sn,int whatsprite);
|
|
|
|
extern int check_activator_motion(int lotag);
|
|
|
|
extern int isadoorwall(int dapic);
|
|
|
|
extern int isanunderoperator(int lotag);
|
|
|
|
extern int isanearoperator(int lotag);
|
2008-02-06 11:42:34 +00:00
|
|
|
extern inline int checkcursectnums(int sect);
|
|
|
|
extern inline int ldist(spritetype *s1,spritetype *s2);
|
|
|
|
extern inline int dist(spritetype *s1,spritetype *s2);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int findplayer(spritetype *s,int *d);
|
|
|
|
extern int findotherplayer(int p,int *d);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void doanimations(void);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int getanimationgoal(int *animptr);
|
|
|
|
extern int setanimation(int animsect,int *animptr,int thegoal,int thevel);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void animatecamsprite(void);
|
|
|
|
extern void animatewalls(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int activatewarpelevators(int s,int d);
|
|
|
|
extern void operatesectors(int sn,int ii);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void operaterespawns(int low);
|
|
|
|
extern void operateactivators(int low,int snum);
|
|
|
|
extern void operatemasterswitches(int low);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void operateforcefields(int s,int low);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int checkhitswitch(int snum,int w,int switchtype);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void activatebysector(int sect,int j);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void checkhitwall(int spr,int dawallnum,int x,int y,int z,int atwith);
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void checkplayerhurt(player_struct *p,int j);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int checkhitceiling(int sn);
|
|
|
|
extern void checkhitsprite(int i,int sn);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void allignwarpelevators(void);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void sharedkeys(int snum);
|
|
|
|
extern void checksectors(int snum);
|
2006-12-23 02:38:47 +00:00
|
|
|
extern int32 RTS_AddFile(const char *filename);
|
|
|
|
extern void RTS_Init(const char *filename);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern int32 RTS_NumSounds(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern int32 RTS_SoundLength(int32 lump);
|
2006-12-23 02:38:47 +00:00
|
|
|
extern const char *RTS_GetSoundName(int32 i);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void RTS_ReadLump(int32 lump,void *dest);
|
|
|
|
extern void *RTS_GetSound(int32 lump);
|
|
|
|
extern void docacheit(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void xyzmirror(int i,int wn);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void vscrn(void);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void pickrandomspot(int snum);
|
|
|
|
extern void resetweapons(int snum);
|
|
|
|
extern void resetinventory(int snum);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void newgame(int vn,int ln,int sk);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void resettimevars(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void waitforeverybody(void);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void cacheit(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void clearfifo(void);
|
|
|
|
extern void resetmys(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int enterlevel(int g);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void backtomenu(void);
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void setpal(player_struct *p);
|
|
|
|
extern void quickkill(player_struct *p);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int hits(int i);
|
|
|
|
extern int hitasprite(int i,short *hitsp);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int shoot(int i,int atwith);
|
|
|
|
extern void displaymasks(int snum);
|
|
|
|
extern void displayweapon(int snum);
|
|
|
|
extern void getinput(int snum);
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void checkweapons(player_struct *p);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void processinput(int snum);
|
|
|
|
extern void cmenu(int cm);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void savetemp(const char *fn,int daptr,int dasiz);
|
2006-04-13 20:47:06 +00:00
|
|
|
// extern int loadpheader(char spot,int32 *vn,int32 *ln,int32 *psk,int32 *numplr);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int loadplayer(int spot);
|
|
|
|
extern int saveplayer(int spot);
|
|
|
|
extern inline int menutext(int x,int y,int s,int p,const char *t);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void menus(void);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void palto(int r,int g,int b,int e);
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void playanm(const char *fn,char);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int getincangle(int a,int na);
|
|
|
|
extern void getglobalz(int iActor);
|
|
|
|
extern void makeitfall(int iActor);
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void loadefs(const char *fn);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int furthestangle(int iActor,int angs);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void execute(int iActor,int iPlayer,int lDist);
|
|
|
|
extern void overwritesprite(int thex,int they,int tilenum,int shade,int stat,int dapalnum);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern inline int gametext(int x,int y,const char *t,int s,int dabits);
|
|
|
|
extern inline int gametextpal(int x,int y,const char *t,int s,int p);
|
|
|
|
extern inline int minitext(int x,int y,const char *t,int p,int sb);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void gamenumber(int x,int y,int n,int s);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void Shutdown(void);
|
|
|
|
extern void getpackets(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void check_fta_sounds(int i);
|
|
|
|
extern inline int inventory(spritetype *s);
|
2006-12-18 04:16:41 +00:00
|
|
|
extern inline int badguy(spritetype *s);
|
2006-12-21 09:33:26 +00:00
|
|
|
extern int badguypic(int pn);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void myos(int x,int y,int tilenum,int shade,int orientation);
|
|
|
|
extern void myospal(int x,int y,int tilenum,int shade,int orientation,int p);
|
2006-12-10 03:15:56 +00:00
|
|
|
extern void displayfragbar(void);
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void FTA(int q,player_struct *p);
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void gameexit(const char *t);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern inline int strget(int x,int y,char *t,int dalen,int c);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void displayrest(int smoothratio);
|
|
|
|
extern void updatesectorz(int x,int y,int z,short *sectnum);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void drawbackground(void);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void displayrooms(int snum,int smoothratio);
|
|
|
|
extern int EGS(int whatsect,int s_x,int s_y,int s_z,int s_pn,int s_s,int s_xr,int s_yr,int s_a,int s_ve,int s_zv,int s_ow,int s_ss);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int wallswitchcheck(int i);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int spawn(int j,int pn);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void animatesprites(int x,int y,int a,int smoothratio);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern int main(int argc,char **argv);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void opendemowrite(void);
|
|
|
|
extern void closedemowrite(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void dobonus(int bonusonly);
|
|
|
|
extern void lotsofglass(int i,int wallnum,int n);
|
|
|
|
extern void spriteglass(int i,int n);
|
|
|
|
extern void ceilingglass(int i,int sectnum,int n);
|
|
|
|
extern void lotsofcolourglass(int i,int wallnum,int n);
|
2008-02-29 04:37:37 +00:00
|
|
|
extern inline int GetTime(void);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void CONFIG_GetSetupFilename(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern int32 CONFIG_FunctionNameToNum(char *func);
|
|
|
|
extern char *CONFIG_FunctionNumToName(int32 func);
|
|
|
|
extern int32 CONFIG_AnalogNameToNum(char *func);
|
|
|
|
extern char *CONFIG_AnalogNumToName(int32 func);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void CONFIG_SetDefaults(void);
|
|
|
|
extern void CONFIG_ReadKeys(void);
|
|
|
|
extern void readsavenames(void);
|
|
|
|
extern int32 CONFIG_ReadSetup(void);
|
|
|
|
extern void CONFIG_WriteSetup(void);
|
2008-02-06 21:02:11 +00:00
|
|
|
extern inline void updateinterpolations(void);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void setinterpolation(int *posptr);
|
|
|
|
extern void stopinterpolation(int *posptr);
|
|
|
|
extern void dointerpolations(int smoothratio);
|
2008-02-06 21:02:11 +00:00
|
|
|
extern inline void restoreinterpolations(void);
|
|
|
|
extern inline int ceilingspace(int sectnum);
|
|
|
|
extern inline int floorspace(int sectnum);
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void addammo(int weapon,player_struct *p,int amount);
|
|
|
|
extern void addweaponnoswitch(player_struct *p,int weapon);
|
|
|
|
extern void addweapon(player_struct *p,int weapon);
|
|
|
|
extern void checkavailinven(player_struct *p);
|
|
|
|
extern void checkavailweapon(player_struct *p);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void hitradius(int i,int r,int hp1,int hp2,int hp3,int hp4);
|
|
|
|
extern int movesprite(int spritenum,int xchange,int ychange,int zchange,unsigned int cliptype);
|
2008-02-06 21:02:11 +00:00
|
|
|
extern inline int ssp(int i,unsigned int cliptype);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void insertspriteq(int i);
|
2008-02-06 21:02:11 +00:00
|
|
|
extern void lotsofmoneymailpaper(int sp,int n,int pic);
|
2008-03-21 04:01:38 +00:00
|
|
|
extern void guts(int sp,int gtype,int n);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void setsectinterpolate(int i);
|
|
|
|
extern void clearsectinterpolate(int i);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int ifhitsectors(int sectnum);
|
|
|
|
extern int ifhitbyweapon(int sn);
|
2006-12-10 03:15:56 +00:00
|
|
|
extern void moveobjects(void);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void movecyclers(void);
|
|
|
|
extern void movedummyplayers(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
// game.c
|
2007-12-12 17:42:14 +00:00
|
|
|
extern inline void setstatusbarscale(int sc);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-08-27 00:20:15 +00:00
|
|
|
extern void setgamepalette(player_struct *player, char *pal, int set);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void fadepal(int r, int g, int b, int start, int end, int step);
|
|
|
|
|
2007-02-28 09:12:41 +00:00
|
|
|
extern inline int minitextshade(int x,int y,const char *t,int s,int p,int sb);
|
2007-12-20 19:14:38 +00:00
|
|
|
extern inline int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,int orientation,int x1, int y1, int x2, int y2,int z);
|
|
|
|
extern void txdigitalnumberz(int starttile, int x,int y,int n,int s,int pal,int cs,int x1, int y1, int x2, int y2, int z);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void txdigitalnumber(int starttile, int x,int y,int n,int s,int pal,int cs,int x1, int y1, int x2, int y2);
|
|
|
|
extern void myosx(int x,int y,int tilenum,int shade,int orientation);
|
|
|
|
extern void myospalx(int x,int y,int tilenum,int shade,int orientation,int p);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void ResetGameVars(void);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void ResetActorGameVars(int iActor);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
extern void setupdynamictostatic();
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void processnames(const char *szLabel, int lValue);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void LoadActor(int sActor);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int GetGameVar(const char *szGameLabel, int lDefault, int iActor, int iPlayer);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void DumpGameVars(FILE *fp);
|
2007-02-08 04:19:39 +00:00
|
|
|
// extern void AddLog(const char *psz, ...);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
extern void ResetSystemDefaults(void);
|
|
|
|
extern void InitGameVarPointers(void);
|
|
|
|
extern void InitGameVars(void);
|
|
|
|
extern void SaveGameVars(FILE *fil);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int ReadGameVars(int fil);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int GetGameVarID(int id, int iActor, int iPlayer);
|
|
|
|
extern void SetGameVarID(int id, int lValue, int iActor, int iPlayer);
|
2008-04-01 02:50:44 +00:00
|
|
|
extern void SetGameArrayID(int id,int index, int lValue);
|
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern int AddGameVar(const char *pszLabel, int lValue, unsigned int dwFlags);
|
2008-04-01 02:50:44 +00:00
|
|
|
extern int AddGameArray(const char *pszLabel, int asize);
|
2006-12-10 06:49:01 +00:00
|
|
|
extern void ReportError(int iError);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
extern void onvideomodechange(int newmode);
|
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void OnEvent(int iEventID, int sActor, int sPlayer, int lDist);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2007-02-28 09:12:41 +00:00
|
|
|
extern int isspritemakingsound(int i, int num);
|
|
|
|
extern int issoundplaying(int i, int num);
|
|
|
|
extern void stopspritesound(int num, int i);
|
2006-11-30 23:37:47 +00:00
|
|
|
extern void updateplayer(void);
|
2006-04-20 19:21:40 +00:00
|
|
|
extern void sendboardname(void);
|
2006-04-20 22:18:56 +00:00
|
|
|
extern void sendquit(void);
|
2006-04-20 19:21:40 +00:00
|
|
|
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void adduserquote(const char *daquote);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void mpchangemap(int volume, int level);
|
2006-05-03 04:49:54 +00:00
|
|
|
|
2006-12-21 09:33:26 +00:00
|
|
|
extern inline int checkspriteflags(int iActor, int iType);
|
|
|
|
extern inline int checkspriteflagsp(int iPicnum, int iType);
|
|
|
|
|
2007-01-26 00:28:44 +00:00
|
|
|
extern int getteampal(int team);
|
|
|
|
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void se40code(int x,int y,int z,int a,int h, int smoothratio);
|
2007-03-13 18:37:46 +00:00
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
#endif // __funct_h__
|