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__
|
|
|
|
|
2008-12-15 10:29:42 +00:00
|
|
|
#ifndef _MSC_VER
|
|
|
|
#ifdef __GNUC__
|
|
|
|
#ifndef __fastcall
|
|
|
|
#define __fastcall __attribute__((fastcall))
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define __fastcall
|
|
|
|
#endif
|
2008-12-15 08:38:16 +00:00
|
|
|
#endif
|
|
|
|
|
2006-12-23 02:38:47 +00:00
|
|
|
extern void sendscore(const char *s);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void S_SoundStartup(void);
|
|
|
|
extern void S_SoundShutdown(void);
|
|
|
|
extern void S_MusicStartup(void);
|
|
|
|
extern void S_MusicShutdown(void);
|
|
|
|
extern void S_MenuSound(void);
|
|
|
|
extern int S_PlayMusic(const char *fn, const int sel);
|
|
|
|
extern int S_LoadSound(unsigned num);
|
|
|
|
extern int S_PlaySoundXYZ(int num,int i,int x,int y,int z);
|
|
|
|
extern void S_PlaySound(int num);
|
|
|
|
extern int A_PlaySound(unsigned int num,int i);
|
|
|
|
extern void S_StopSound(int num);
|
|
|
|
extern void S_StopEnvSound(int num,int i);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void pan3dsound(void);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void S_TestSoundCallback(unsigned int num);
|
|
|
|
extern void S_ClearSoundLocks(void);
|
|
|
|
extern int A_CallSound(int sn,int whatsprite);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int check_activator_motion(int lotag);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern int CheckDoorTile(int dapic);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern int isanunderoperator(int lotag);
|
|
|
|
extern int isanearoperator(int lotag);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern inline int CheckPlayerInSector(int sect);
|
2008-08-09 12:29:23 +00:00
|
|
|
extern int ldist(spritetype *s1,spritetype *s2);
|
|
|
|
extern int dist(spritetype *s1,spritetype *s2);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern int A_FindPlayer(spritetype *s,int *d);
|
|
|
|
extern int P_FindOtherPlayer(int p,int *d);
|
|
|
|
extern void G_DoSectorAnimations(void);
|
|
|
|
extern int GetAnimationGoal(int *animptr);
|
|
|
|
extern int SetAnimation(int animsect,int *animptr,int thegoal,int thevel);
|
|
|
|
extern void G_AnimateCamSprite(void);
|
|
|
|
extern void G_AnimateWalls(void);
|
|
|
|
extern int G_ActivateWarpElevators(int s,int d);
|
|
|
|
extern void G_OperateSectors(int sn,int ii);
|
|
|
|
extern void G_OperateRespawns(int low);
|
|
|
|
extern void G_OperateActivators(int low,int snum);
|
|
|
|
extern void G_OperateMasterSwitches(int low);
|
|
|
|
extern void G_OperateForceFields(int s,int low);
|
|
|
|
extern int P_ActivateSwitch(int snum,int w,int switchtype);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void activatebysector(int sect,int j);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void A_DamageWall(int spr,int dawallnum,int x,int y,int z,int atwith);
|
|
|
|
extern void P_CheckTouchDamage(DukePlayer_t *p,int j);
|
|
|
|
extern int Sect_DamageCeiling(int sn);
|
|
|
|
extern void A_DamageObject(int i,int sn);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void allignwarpelevators(void);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_HandleSharedKeys(int snum);
|
2006-12-20 03:27:25 +00:00
|
|
|
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);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_CacheMapData(void);
|
2007-02-28 09:12:41 +00:00
|
|
|
extern void xyzmirror(int i,int wn);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_UpdateScreenArea(void);
|
|
|
|
extern void P_RandomSpawnPoint(int snum);
|
|
|
|
extern void P_ResetWeapons(int snum);
|
|
|
|
extern void P_ResetInventory(int snum);
|
|
|
|
extern void G_NewGame(int vn,int ln,int sk);
|
|
|
|
extern void G_ResetTimers(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern void waitforeverybody(void);
|
|
|
|
extern void clearfifo(void);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void Net_ResetPrediction(void);
|
|
|
|
extern int G_EnterLevel(int g);
|
|
|
|
extern void G_BackToMenu(void);
|
|
|
|
extern void P_UpdateScreenPal(DukePlayer_t *p);
|
|
|
|
extern void P_QuickKill(DukePlayer_t *p);
|
|
|
|
extern int A_GetHitscanRange(int i);
|
|
|
|
extern int A_CheckHitSprite(int i,short *hitsp);
|
|
|
|
extern int A_Shoot(int i,int atwith);
|
|
|
|
extern void P_DisplayScubaMask(int snum);
|
2008-11-21 12:14:05 +00:00
|
|
|
extern void P_DisplayWeapon(int snum);
|
2006-12-20 03:27:25 +00:00
|
|
|
extern void getinput(int snum);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void P_DropWeapon(DukePlayer_t *p);
|
|
|
|
extern void P_ProcessInput(int snum);
|
|
|
|
extern void ChangeToMenu(int cm);
|
|
|
|
// extern void savetemp(const char *fn,int daptr,int dasiz);
|
|
|
|
// extern int G_LoadSaveHeader(char spot,int32 *vn,int32 *ln,int32 *psk,int32 *numplr);
|
|
|
|
extern int G_LoadPlayer(int spot);
|
|
|
|
extern int G_SavePlayer(int spot);
|
2008-09-15 02:47:02 +00:00
|
|
|
extern int menutext_(int x,int y,int s,int p,char *t,int bits);
|
2008-10-11 11:50:02 +00:00
|
|
|
#define menutext(x,y,s,p,t) menutext_(x,y,s,p,(char *)stripcolorcodes(menutextbuf,t),10+16)
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void M_DisplayMenus(void);
|
|
|
|
extern void G_FadePalette(int r,int g,int b,int e);
|
|
|
|
extern void G_PlayAnim(const char *fn,char);
|
|
|
|
extern int G_GetAngleDelta(int a,int na);
|
|
|
|
extern void A_GetZLimits(int iActor);
|
|
|
|
extern void A_Fall(int iActor);
|
|
|
|
extern void C_Compile(const char *fn);
|
2008-12-17 01:59:36 +00:00
|
|
|
extern int A_GetFurthestAngle(int iActor,int angs);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void A_Execute(int iActor,int iPlayer,int lDist);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void overwritesprite(int thex,int they,int tilenum,int shade,int stat,int dapalnum);
|
|
|
|
extern void gamenumber(int x,int y,int n,int s);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_Shutdown(void);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern void getpackets(void);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void A_PlayAlertSound(int i);
|
|
|
|
extern inline int A_CheckInventorySprite(spritetype *s);
|
|
|
|
extern inline int A_CheckEnemySprite(spritetype *s);
|
|
|
|
extern int A_CheckEnemyTile(int pn);
|
|
|
|
extern void G_DrawTile(int x,int y,int tilenum,int shade,int orientation);
|
|
|
|
extern void G_DrawTilePal(int x,int y,int tilenum,int shade,int orientation,int p);
|
|
|
|
extern void G_DrawFrags(void);
|
|
|
|
extern void P_DoQuote(int q,DukePlayer_t *p);
|
|
|
|
extern void G_GameExit(const char *t);
|
|
|
|
extern void G_DisplayRest(int smoothratio);
|
2007-12-12 17:42:14 +00:00
|
|
|
extern void updatesectorz(int x,int y,int z,short *sectnum);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_DrawBackground(void);
|
|
|
|
extern void G_DrawRooms(int snum,int smoothratio);
|
|
|
|
extern int A_InsertSprite(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);
|
|
|
|
extern int A_CheckSwitchTile(int i);
|
|
|
|
extern int A_Spawn(int j,int pn);
|
|
|
|
extern void G_DoSpriteAnimations(int x,int y,int a,int smoothratio);
|
2006-04-13 20:47:06 +00:00
|
|
|
extern int main(int argc,char **argv);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_OpenDemoWrite(void);
|
|
|
|
extern void G_CloseDemoWrite(void);
|
|
|
|
extern void G_BonusScreen(int bonusonly);
|
|
|
|
extern void A_SpawnWallGlass(int i,int wallnum,int n);
|
|
|
|
extern void A_SpawnGlass(int i,int n);
|
|
|
|
extern void A_SpawnCeilingGlass(int i,int sectnum,int n);
|
|
|
|
extern void A_SpawnRandomGlass(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);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void ReadSaveGameHeaders(void);
|
2006-11-19 03:02:36 +00:00
|
|
|
extern int32 CONFIG_ReadSetup(void);
|
|
|
|
extern void CONFIG_WriteSetup(void);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern inline void G_UpdateInterpolations(void);
|
|
|
|
extern void G_SetInterpolation(int *posptr);
|
|
|
|
extern void G_StopInterpolation(int *posptr);
|
|
|
|
extern void G_DoInterpolations(int smoothratio);
|
|
|
|
extern inline void G_RestoreInterpolations(void);
|
|
|
|
extern inline int G_CheckForSpaceCeiling(int sectnum);
|
|
|
|
extern inline int G_CheckForSpaceFloor(int sectnum);
|
|
|
|
extern void P_AddAmmo(int weapon,DukePlayer_t *p,int amount);
|
|
|
|
extern void P_AddWeaponNoSwitch(DukePlayer_t *p,int weapon);
|
|
|
|
extern void P_AddWeapon(DukePlayer_t *p,int weapon);
|
2008-12-01 10:44:18 +00:00
|
|
|
extern void P_SelectNextInvItem(DukePlayer_t *p);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void P_CheckWeapon(DukePlayer_t *p);
|
|
|
|
extern void A_RadiusDamage(int i,int r,int hp1,int hp2,int hp3,int hp4);
|
|
|
|
extern int A_MoveSprite(int spritenum,int xchange,int ychange,int zchange,unsigned int cliptype);
|
|
|
|
extern inline int A_SetSprite(int i,unsigned int cliptype);
|
|
|
|
extern void A_AddToDeleteQueue(int i);
|
|
|
|
extern void A_SpawnMultiple(int sp,int pic,int n);
|
|
|
|
extern void A_DoGuts(int sp,int gtype,int n);
|
|
|
|
extern void Sect_SetInterpolation(int i);
|
|
|
|
extern void Sect_ClearInterpolation(int i);
|
|
|
|
extern int A_IncurDamage(int sn);
|
|
|
|
extern void G_MoveWorld(void);
|
|
|
|
extern void A_MoveCyclers(void);
|
|
|
|
extern void A_MoveDummyPlayers(void);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
// game.c
|
2008-11-20 14:06:36 +00:00
|
|
|
extern inline void G_SetStatusBarScale(int sc);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-21 12:14:05 +00:00
|
|
|
extern void P_SetGamePalette(DukePlayer_t *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);
|
|
|
|
|
2008-12-19 00:53:54 +00:00
|
|
|
extern 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);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_DrawTXDigiNumZ(int starttile, int x,int y,int n,int s,int pal,int cs,int x1, int y1, int x2, int y2, int z);
|
|
|
|
extern void G_DrawTileSmall(int x,int y,int tilenum,int shade,int orientation);
|
|
|
|
extern void G_DrawTilePalSmall(int x,int y,int tilenum,int shade,int orientation,int p);
|
2008-12-13 07:23:13 +00:00
|
|
|
extern void Gv_ResetVars(void);
|
2008-12-17 01:59:36 +00:00
|
|
|
extern void A_ResetVars(int iActor);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-07-30 02:51:32 +00:00
|
|
|
extern int minitext_(int x,int y,const char *t,int s,int p,int sb);
|
|
|
|
|
|
|
|
#define minitextshade(x, y, t, s, p, sb) minitext_(x,y,t,s,p,sb)
|
|
|
|
#define minitext(x, y, t, p, sb) minitext_(x,y,t,0,p,sb)
|
|
|
|
|
2008-07-22 10:56:22 +00:00
|
|
|
#define gametext(x,y,t,s,dabits) gametext_z(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
|
2008-10-11 09:20:04 +00:00
|
|
|
#define gametextscaled(x,y,t,s,dabits) gametext_z(1,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
|
2008-07-22 10:56:22 +00:00
|
|
|
#define gametextpal(x,y,t,s,p) gametext_z(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536)
|
2008-09-15 02:47:02 +00:00
|
|
|
#define gametextpalbits(x,y,t,s,p,dabits) gametext_z(0,STARTALPHANUM, x,y,t,s,p,dabits,0, 0, xdim-1, ydim-1, 65536)
|
2008-07-22 10:56:22 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_InitDynamicTiles();
|
|
|
|
extern void G_ProcessDynamicTileMapping(const char *szLabel, int lValue);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void A_LoadActor(int sActor);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern int Gv_GetVarByLabel(const char *szGameLabel, int lDefault, int iActor, int iPlayer);
|
|
|
|
extern void Gv_DumpValues(FILE *fp);
|
2007-02-08 04:19:39 +00:00
|
|
|
// extern void AddLog(const char *psz, ...);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void Gv_ResetSystemDefaults(void);
|
|
|
|
extern void Gv_InitWeaponPointers(void);
|
|
|
|
extern void Gv_Init(void);
|
|
|
|
extern void Gv_WriteSave(FILE *fil);
|
|
|
|
extern int Gv_ReadSave(int fil);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-12-15 08:38:16 +00:00
|
|
|
extern int __fastcall Gv_GetVar(int id, int iActor, int iPlayer);
|
|
|
|
extern void __fastcall Gv_SetVar(int id, int lValue, int iActor, int iPlayer);
|
2008-12-21 22:46:55 +00:00
|
|
|
extern int __fastcall Gv_GetVarX(int id);
|
|
|
|
extern void __fastcall Gv_SetVarX(int id, int lValue);
|
|
|
|
|
2008-08-24 03:19:40 +00:00
|
|
|
// extern void SetGameArrayID(int id,int index, int lValue);
|
2008-04-01 02:50:44 +00:00
|
|
|
|
2008-12-13 07:23:13 +00:00
|
|
|
extern int Gv_NewVar(const char *pszLabel, int lValue, unsigned int dwFlags);
|
|
|
|
extern int Gv_NewArray(const char *pszLabel, int asize);
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void C_ReportError(int iError);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
extern void onvideomodechange(int newmode);
|
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void X_OnEvent(int iEventID, int sActor, int sPlayer, int lDist);
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern int A_CheckSoundPlaying(int i, int num);
|
|
|
|
extern int S_CheckSoundPlaying(int i, int num);
|
|
|
|
extern void A_StopSound(int num, int i);
|
|
|
|
extern void G_UpdatePlayerFromMenu(void);
|
|
|
|
extern void Net_SendPlayerName(void);
|
|
|
|
extern void Net_SendUserMapName(void);
|
|
|
|
extern void Net_SendQuit(void);
|
2006-04-20 19:21:40 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_AddUserQuote(const char *daquote);
|
|
|
|
extern void Net_NewGame(int volume, int level);
|
2006-05-03 04:49:54 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern inline int A_CheckSpriteFlags(int iActor, int iType);
|
|
|
|
extern inline int A_CheckSpriteTileFlags(int iPicnum, int iType);
|
2006-12-21 09:33:26 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern int G_GetTeamPalette(int team);
|
2007-01-26 00:28:44 +00:00
|
|
|
|
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
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_FreeMapState(int mapnum);
|
|
|
|
extern void G_FindLevelForFilename(const char *fn, char *volume, char *level);
|
2008-07-18 02:46:24 +00:00
|
|
|
|
2008-11-20 14:06:36 +00:00
|
|
|
extern void G_GetCrosshairColor(void);
|
|
|
|
extern void G_SetCrosshairColor(int r, int g, int b);
|
2008-08-20 08:39:07 +00:00
|
|
|
extern int kopen4loadfrommod(char *filename, char searchfirst);
|
2008-12-19 00:53:54 +00:00
|
|
|
|
|
|
|
extern int _EnterText(int small,int x,int y,char *t,int dalen,int c);
|
|
|
|
|
|
|
|
#define G_EnterText(x, y, t, dalen, c) _EnterText(0,x,y,t,dalen,c)
|
|
|
|
#define Net_EnterText(x, y, t, dalen, c) _EnterText(1,x,y,t,dalen,c)
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
#endif // __funct_h__
|