SW: Nuke mytypes.h. Mostly.

git-svn-id: https://svn.eduke32.com/eduke32@5198 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-05-19 21:58:29 +00:00
parent e9655f8469
commit fad3606c44
90 changed files with 2432 additions and 2588 deletions

View file

@ -59,20 +59,20 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms
typedef struct typedef struct
{ {
char name[8]; char name[8];
int32 handle,position,size; int32_t handle,position,size;
} lumpinfo_t; } lumpinfo_t;
typedef struct typedef struct
{ {
char identification[4]; // should be IWAD char identification[4]; // should be IWAD
int32 numlumps; int32_t numlumps;
int32 infotableofs; int32_t infotableofs;
} wadinfo_t; } wadinfo_t;
typedef struct typedef struct
{ {
int32 filepos; int32_t filepos;
int32 size; int32_t size;
char name[8]; char name[8];
} filelump_t; } filelump_t;

View file

@ -280,7 +280,7 @@ DoActorDie(short SpriteNum, short weapon)
return 0; return 0;
} }
VOID void
DoDebrisCurrent(SPRITEp sp) DoDebrisCurrent(SPRITEp sp)
{ {
int xvect, yvect; int xvect, yvect;
@ -515,7 +515,7 @@ DoGenerateSewerDebris(short SpriteNum)
// !AIC - Tries to keep actors correctly on the floor. More that a bit messy. // !AIC - Tries to keep actors correctly on the floor. More that a bit messy.
VOID void
KeepActorOnFloor(short SpriteNum) KeepActorOnFloor(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];

View file

@ -38,9 +38,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "net.h" #include "net.h"
BOOL PlayerTakeDamage(PLAYERp, short); SWBOOL PlayerTakeDamage(PLAYERp, short);
ANIMATOR InitActorRunToward; ANIMATOR InitActorRunToward;
BOOL FAF_Sector(short); SWBOOL FAF_Sector(short);
short FindTrackToPlayer(USERp u); short FindTrackToPlayer(USERp u);
ANIMATORp ChooseAction(DECISION decision[]); ANIMATORp ChooseAction(DECISION decision[]);
@ -54,11 +54,11 @@ short AttackOrRun = 200;
#define CHOOSE2(value) (RANDOM_P2(1024) < (value)) #define CHOOSE2(value) (RANDOM_P2(1024) < (value))
VOID DebugMoveHit(short SpriteNum) void DebugMoveHit(short SpriteNum)
{ {
SPRITEp sp; SPRITEp sp;
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
extern BOOL DebugActor; extern SWBOOL DebugActor;
return; return;
@ -93,7 +93,7 @@ VOID DebugMoveHit(short SpriteNum)
} }
BOOL ActorMoveHitReact(short SpriteNum) SWBOOL ActorMoveHitReact(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
@ -143,7 +143,7 @@ BOOL ActorMoveHitReact(short SpriteNum)
} }
BOOL ActorFlaming(short SpriteNum) SWBOOL ActorFlaming(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
@ -165,8 +165,8 @@ BOOL ActorFlaming(short SpriteNum)
return FALSE; return FALSE;
} }
VOID void
DoActorSetSpeed(short SpriteNum, BYTE speed) DoActorSetSpeed(short SpriteNum, uint8_t speed)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
@ -385,8 +385,8 @@ DoActorPickClosePlayer(short SpriteNum)
PLAYERp pp,tp; PLAYERp pp,tp;
// if actor can still see the player // if actor can still see the player
int look_height = SPRITEp_TOS(sp); int look_height = SPRITEp_TOS(sp);
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
BOOL found = FALSE; SWBOOL found = FALSE;
int i,nexti; int i,nexti;
if (u->ID == ZOMBIE_RUN_R0 && gNet.MultiGameType == MULTI_GAME_COOPERATIVE) if (u->ID == ZOMBIE_RUN_R0 && gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
@ -629,7 +629,7 @@ DoActorActionDecide(short SpriteNum)
ANIMATORp action; ANIMATORp action;
PLAYERp pp; PLAYERp pp;
USERp pu=NULL; USERp pu=NULL;
BOOL ICanSee=FALSE; SWBOOL ICanSee=FALSE;
// REMINDER: This function is not even called if SpriteControl doesn't let // REMINDER: This function is not even called if SpriteControl doesn't let
// it get called // it get called
@ -1705,7 +1705,7 @@ int move_scan(short SpriteNum, short ang, int dist, int *stopx, int *stopy, int
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
int nx,ny; int nx,ny;
ULONG cliptype = CLIPMASK_ACTOR; uint32_t cliptype = CLIPMASK_ACTOR;
int ret; int ret;
short sang,ss; short sang,ss;
@ -1769,7 +1769,7 @@ FindNewAngle(short SpriteNum, signed char dir, int DistToMove)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL DropAhead(short SpriteNum, short min_height); SWBOOL DropAhead(short SpriteNum, short min_height);
static short toward_angle_delta[4][9] = static short toward_angle_delta[4][9] =
{ {
@ -1788,7 +1788,7 @@ FindNewAngle(short SpriteNum, signed char dir, int DistToMove)
}; };
SHORTp adp = NULL; int16_t* adp = NULL;
short new_ang, oang; short new_ang, oang;
short save_ang = -1; short save_ang = -1;

View file

@ -61,8 +61,8 @@ typedef enum
struct ATTRIBUTEstruct struct ATTRIBUTEstruct
{ {
short Speed[MAX_SPEED]; short Speed[MAX_SPEED];
CHAR TicAdjust[MAX_SPEED]; int8_t TicAdjust[MAX_SPEED];
BYTE MaxWeapons; uint8_t MaxWeapons;
/*ATTRIB_SNDS*/ int Sounds[MAXATTRIBSNDS]; // JBF: ATTRIB_SNDS? Somehow I don't think this is what was intended... /*ATTRIB_SNDS*/ int Sounds[MAXATTRIBSNDS]; // JBF: ATTRIB_SNDS? Somehow I don't think this is what was intended...
}; };
@ -70,9 +70,9 @@ extern ATTRIBUTE DefaultAttrib;
// AI.C functions // AI.C functions
void DebugMoveHit(short SpriteNum); void DebugMoveHit(short SpriteNum);
BOOL ActorMoveHitReact(short SpriteNum); SWBOOL ActorMoveHitReact(short SpriteNum);
BOOL ActorFlaming(short SpriteNum); SWBOOL ActorFlaming(short SpriteNum);
void DoActorSetSpeed(short SpriteNum,BYTE speed); void DoActorSetSpeed(short SpriteNum,uint8_t speed);
short ChooseActionNumber(short decision[]); short ChooseActionNumber(short decision[]);
int DoActorNoise(ANIMATORp Action,short SpriteNum); int DoActorNoise(ANIMATORp Action,short SpriteNum);
int CanSeePlayer(short SpriteNum); int CanSeePlayer(short SpriteNum);
@ -161,6 +161,6 @@ DoActorExtra5Noise,
DoActorExtra6Noise; DoActorExtra6Noise;
*/ */
VOID DoActorSetSpeed(short SpriteNum, BYTE speed); void DoActorSetSpeed(short SpriteNum, uint8_t speed);
#endif #endif

View file

@ -109,7 +109,7 @@ AMB_ENTRY(19, DIGI_THUNDER, AMB_PAN|AMB_INTERMIT, AMB_60)
// UNDERWATER AMBIENCE // UNDERWATER AMBIENCE
AMB_ENTRY(20, DIGI_UNDERWATER, AMB_PAN, AMB_NOTICS) AMB_ENTRY(20, DIGI_UNDERWATER, AMB_PAN, AMB_NOTICS)
// SPOOKY ETHERAL VOID AMBIENCE (NETHERWORLDLY SOUNDS) // SPOOKY ETHERAL void AMBIENCE (NETHERWORLDLY SOUNDS)
AMB_ENTRY(21, DIGI_VOID1, AMB_NONE, AMB_NOTICS) AMB_ENTRY(21, DIGI_VOID1, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(22, DIGI_VOID2, AMB_NONE, AMB_NOTICS) AMB_ENTRY(22, DIGI_VOID2, AMB_NONE, AMB_NOTICS)
AMB_ENTRY(23, DIGI_VOID3, AMB_NONE, AMB_NOTICS) AMB_ENTRY(23, DIGI_VOID3, AMB_NONE, AMB_NOTICS)

View file

@ -67,7 +67,7 @@ char *ANIMname[] =
#define ANIM_TILE(num) (MAXTILES-11 + (num)) #define ANIM_TILE(num) (MAXTILES-11 + (num))
VOID AnimShareIntro(int frame, int numframes) void AnimShareIntro(int frame, int numframes)
{ {
int zero=0; int zero=0;
@ -91,7 +91,7 @@ VOID AnimShareIntro(int frame, int numframes)
} }
} }
VOID AnimSerp(int frame, int numframes) void AnimSerp(int frame, int numframes)
{ {
int zero=0; int zero=0;
ototalclock += 16; ototalclock += 16;
@ -124,7 +124,7 @@ VOID AnimSerp(int frame, int numframes)
} }
} }
VOID AnimSumo(int frame, int numframes) void AnimSumo(int frame, int numframes)
{ {
int zero=0; int zero=0;
ototalclock += 10; ototalclock += 10;
@ -154,7 +154,7 @@ VOID AnimSumo(int frame, int numframes)
} }
} }
VOID AnimZilla(int frame, int numframes) void AnimZilla(int frame, int numframes)
{ {
int zero=0; int zero=0;
ototalclock += 16; ototalclock += 16;
@ -265,7 +265,7 @@ playanm(short anim_num)
{ {
unsigned char *animbuf, *palptr; unsigned char *animbuf, *palptr;
int i, j, k, length = 0, numframes = 0; int i, j, k, length = 0, numframes = 0;
int32 handle = -1; int32_t handle = -1;
unsigned char ANIMvesapal[4*256]; unsigned char ANIMvesapal[4*256];
unsigned char tempbuf[256]; unsigned char tempbuf[256];
unsigned char *palook_bak = palookup[0]; unsigned char *palook_bak = palookup[0];

View file

@ -73,8 +73,8 @@ char token[MAXTOKEN];
char *scriptbuffer,*script_p,*scriptend_p; char *scriptbuffer,*script_p,*scriptend_p;
int grabbed; int grabbed;
int scriptline; int scriptline;
BOOL endofscript; SWBOOL endofscript;
BOOL tokenready; // only TRUE if UnGetToken was just called SWBOOL tokenready; // only TRUE if UnGetToken was just called
/* /*
============== ==============
@ -84,7 +84,7 @@ BOOL tokenready; // only TRUE if UnGetToken was just call
============== ==============
*/ */
BOOL LoadScriptFile(char *filename) SWBOOL LoadScriptFile(char *filename)
{ {
int size, readsize; int size, readsize;
int fp; int fp;
@ -152,7 +152,7 @@ void UnGetToken(void)
============== ==============
*/ */
void GetToken(BOOL crossline) void GetToken(SWBOOL crossline)
{ {
char *token_p; char *token_p;
@ -240,7 +240,7 @@ skipspace:
============== ==============
*/ */
BOOL TokenAvailable(void) SWBOOL TokenAvailable(void)
{ {
char *search_p; char *search_p;
@ -455,7 +455,7 @@ void LoadKVXFromScript(char *filename)
extern int idleclock,slackerclock; extern int idleclock,slackerclock;
// Watch dog function. Tracks user's work times. // Watch dog function. Tracks user's work times.
void LogUserTime( BOOL bIsLoggingIn ) void LogUserTime( SWBOOL bIsLoggingIn )
{ {
int size, readsize; int size, readsize;
time_t time_of_day; time_t time_of_day;

View file

@ -65,19 +65,19 @@ short SWBorderTest[] =
#define X_TO_FIXED(val) (x_aspect_mul*(val)) #define X_TO_FIXED(val) (x_aspect_mul*(val))
#define Y_TO_FIXED(val) (y_aspect_mul*(val)) #define Y_TO_FIXED(val) (y_aspect_mul*(val))
BOOL RedrawScreen = FALSE; SWBOOL RedrawScreen = FALSE;
int f_xdim, f_ydim, x_pix_size, y_pix_size, x_aspect_mul, y_aspect_mul; int f_xdim, f_ydim, x_pix_size, y_pix_size, x_aspect_mul, y_aspect_mul;
int CrosshairX, CrosshairY; int CrosshairX, CrosshairY;
extern BOOL BorderAdjust; extern SWBOOL BorderAdjust;
BOOL GlobSpriteBoxUpdateEveryFrame = FALSE; SWBOOL GlobSpriteBoxUpdateEveryFrame = FALSE;
PANEL_SPRITEp PANEL_SPRITEp
pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2) pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
extern BOOL DrawBeforeView; extern SWBOOL DrawBeforeView;
psp = pSpawnSprite(pp, NULL, pri, x, y); psp = pSpawnSprite(pp, NULL, pri, x, y);
@ -104,7 +104,7 @@ pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int
return psp; return psp;
} }
VOID SetCrosshair(VOID) void SetCrosshair(void)
{ {
int wdx,wdy,x,y; int wdx,wdy,x,y;
@ -122,8 +122,8 @@ VOID SetCrosshair(VOID)
} }
VOID void
SetupAspectRatio(VOID) SetupAspectRatio(void)
{ {
f_xdim = FIXED(xdim, 0); f_xdim = FIXED(xdim, 0);
f_ydim = FIXED(ydim, 0); f_ydim = FIXED(ydim, 0);
@ -135,8 +135,8 @@ SetupAspectRatio(VOID)
y_aspect_mul = (f_ydim / 200); y_aspect_mul = (f_ydim / 200);
} }
VOID void
SetConsoleDmost(VOID) SetConsoleDmost(void)
{ {
int ystart; int ystart;
int xstart; int xstart;
@ -166,7 +166,7 @@ SetConsoleDmost(VOID)
} }
} }
VOID ClearStartMost(VOID) void ClearStartMost(void)
{ {
int i; int i;
@ -176,12 +176,12 @@ VOID ClearStartMost(VOID)
memset(startumost, 0, sizeof(startumost)); memset(startumost, 0, sizeof(startumost));
} }
VOID void
SetFragBar(PLAYERp pp) SetFragBar(PLAYERp pp)
{ {
short i, num_frag_bars; short i, num_frag_bars;
int y; int y;
extern SHORT OrigCommPlayers; extern int16_t OrigCommPlayers;
if (numplayers <= 1) if (numplayers <= 1)
return; return;
@ -221,7 +221,7 @@ SetFragBar(PLAYERp pp)
} }
} }
BOOL RectOverlap(short tx1, short ty1, short bx1, short by1, short tx2, short ty2, short bx2, short by2) SWBOOL RectOverlap(short tx1, short ty1, short bx1, short by1, short tx2, short ty2, short bx2, short by2)
{ {
if (bx1 >= tx2) if (bx1 >= tx2)
if (tx1 <= bx2) if (tx1 <= bx2)
@ -232,7 +232,7 @@ BOOL RectOverlap(short tx1, short ty1, short bx1, short by1, short tx2, short ty
return FALSE; return FALSE;
} }
VOID DrawBorderShade(PLAYERp pp, short shade_num, short wx1, short wy1, short wx2, short wy2) void DrawBorderShade(PLAYERp pp, short shade_num, short wx1, short wy1, short wx2, short wy2)
{ {
short i,j,k,l; short i,j,k,l;
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -279,12 +279,12 @@ VOID DrawBorderShade(PLAYERp pp, short shade_num, short wx1, short wy1, short wx
} }
} }
VOID void
BorderShade(PLAYERp pp, BOOL refresh) BorderShade(PLAYERp pp, SWBOOL refresh)
{ {
int i, j, k, l, wx1, wx2, wy1, wy2; int i, j, k, l, wx1, wx2, wy1, wy2;
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
BYTE lines; uint8_t lines;
wx1 = windowx1 - 1; wx1 = windowx1 - 1;
wy1 = windowy1 - 1; wy1 = windowy1 - 1;
@ -344,7 +344,7 @@ BORDER_INFO BorderInfoValues[] =
}; };
VOID DrawBorder(PLAYERp pp, short x, short y, short x2, short y2) void DrawBorder(PLAYERp pp, short x, short y, short x2, short y2)
{ {
short i,j,k,l; short i,j,k,l;
short count = 0; short count = 0;
@ -387,7 +387,7 @@ VOID DrawBorder(PLAYERp pp, short x, short y, short x2, short y2)
} }
} }
VOID DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, short panl, short panr) void DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, short panl, short panr)
{ {
short i,j,k,l; short i,j,k,l;
short count = 0; short count = 0;
@ -415,7 +415,7 @@ VOID DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, shor
} }
static static
VOID BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize) void BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize)
{ {
void setview(int scrx1, int scry1, int scrx2, int scry2); void setview(int scrx1, int scry1, int scrx2, int scry2);
int x, x2, y, y2; int x, x2, y, y2;
@ -450,7 +450,7 @@ VOID BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize)
// Redraw the border without changing the view // Redraw the border without changing the view
// //
static VOID static void
BorderRefresh(PLAYERp pp) BorderRefresh(PLAYERp pp)
{ {
int i, j; int i, j;
@ -515,11 +515,11 @@ BorderRefresh(PLAYERp pp)
// Redraw the whole screen // Redraw the whole screen
// //
VOID SetBorder(PLAYERp pp, int value) void SetBorder(PLAYERp pp, int value)
{ {
int diff; int diff;
int Xdim, Ydim, ScreenSize; int Xdim, Ydim, ScreenSize;
BOOL set_view = TRUE; SWBOOL set_view = TRUE;
if (pp != Player + myconnectindex) if (pp != Player + myconnectindex)
return; return;
@ -558,7 +558,7 @@ VOID SetBorder(PLAYERp pp, int value)
SetFragBar(pp); SetFragBar(pp);
} }
VOID void
SetRedrawScreen(PLAYERp pp) SetRedrawScreen(PLAYERp pp)
{ {
int i, j; int i, j;

View file

@ -58,7 +58,7 @@ struct NODETREEstruct
{ {
short SpriteNum; // Sprite number in sprite array of goal item short SpriteNum; // Sprite number in sprite array of goal item
NODEp tree; // This is the node tree used to navigate to goal NODEp tree; // This is the node tree used to navigate to goal
BOOL Locked; // If list is locked, a bot is using/modifying it and SWBOOL Locked; // If list is locked, a bot is using/modifying it and
// other bots cannot modify it while it's locked // other bots cannot modify it while it's locked
}; };

View file

@ -660,7 +660,7 @@ int AutoBreakWall(WALLp wallp, int hitx, int hity, int hitz, short ang, short ty
return TRUE; return TRUE;
} }
BOOL UserBreakWall(WALLp wp, short UNUSED(ang)) SWBOOL UserBreakWall(WALLp wp, short UNUSED(ang))
{ {
short SpriteNum; short SpriteNum;
SPRITEp sp; SPRITEp sp;
@ -818,7 +818,7 @@ int WallBreakPosition(short hitwall, short *sectnum, int *x, int *y, int *z, sho
} }
// If the tough parameter is not set, then it can't break tough walls and sprites // If the tough parameter is not set, then it can't break tough walls and sprites
BOOL HitBreakWall(WALLp wp, int hitx, int hity, int hitz, short ang, short type) SWBOOL HitBreakWall(WALLp wp, int hitx, int hity, int hitz, short ang, short type)
{ {
short SpriteNum; short SpriteNum;
short match = wp->hitag; short match = wp->hitag;
@ -957,7 +957,7 @@ int AutoBreakSprite(short BreakSprite, short type)
SPRITEp bp = &sprite[BreakSprite]; SPRITEp bp = &sprite[BreakSprite];
BREAK_INFOp break_info; BREAK_INFOp break_info;
extern void DoWallBreakMatch(short match); extern void DoWallBreakMatch(short match);
int SpawnBreakFlames(SHORT SpriteNum); int SpawnBreakFlames(int16_t SpriteNum);
break_info = FindSpriteBreakInfo(bp->picnum); break_info = FindSpriteBreakInfo(bp->picnum);
@ -1028,7 +1028,7 @@ int AutoBreakSprite(short BreakSprite, short type)
return FALSE; return FALSE;
} }
BOOL NullActor(USERp u) SWBOOL NullActor(USERp u)
{ {
// a Null Actor is defined as an actor that has no real controlling programming attached // a Null Actor is defined as an actor that has no real controlling programming attached

View file

@ -46,9 +46,9 @@ void SortBreakInfo(void);
BREAK_INFOp SetupWallForBreak(WALLp wallp); BREAK_INFOp SetupWallForBreak(WALLp wallp);
BREAK_INFOp SetupSpriteForBreak(SPRITEp sp); BREAK_INFOp SetupSpriteForBreak(SPRITEp sp);
short FindBreakSpriteMatch(short match); short FindBreakSpriteMatch(short match);
BOOL HitBreakWall(WALLp wp, int, int, int, short ang, short type); SWBOOL HitBreakWall(WALLp wp, int, int, int, short ang, short type);
int HitBreakSprite(short BreakSprite, short type); int HitBreakSprite(short BreakSprite, short type);
BOOL CheckBreakToughness(BREAK_INFOp break_info, short ID); SWBOOL CheckBreakToughness(BREAK_INFOp break_info, short ID);
int WallBreakPosition(short hitwall, short *sectnum, int *x, int *y, int *z, short *ang); int WallBreakPosition(short hitwall, short *sectnum, int *x, int *y, int *z, short *ang);
void SortBreakInfo(void); void SortBreakInfo(void);

View file

@ -40,8 +40,8 @@ extern short ang;
extern int horiz; extern int horiz;
extern int qsetmode; extern int qsetmode;
BOOL FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum); SWBOOL FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
BOOL FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum); SWBOOL FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum);
short ViewSectorInScene(short cursectnum, short type, short level); short ViewSectorInScene(short cursectnum, short type, short level);
void Message(char *string, char color); void Message(char *string, char color);
@ -65,24 +65,24 @@ _Assert(char *expr, char *strFile, unsigned uLine)
#define ZMAX 400 #define ZMAX 400
typedef struct typedef struct
{ {
LONG zval[ZMAX]; int32_t zval[ZMAX];
SHORT sectnum[ZMAX]; int16_t sectnum[ZMAX];
SHORT pic[ZMAX]; int16_t pic[ZMAX];
SHORT slope[ZMAX]; int16_t slope[ZMAX];
SHORT zcount; int16_t zcount;
} SAVE, *SAVEp; } SAVE, *SAVEp;
SAVE save; SAVE save;
BOOL FAF_DebugView = 0; SWBOOL FAF_DebugView = 0;
BOOL FAFon = 0; SWBOOL FAFon = 0;
BOOL FAF_DontMoveSectors = FALSE; SWBOOL FAF_DontMoveSectors = FALSE;
short bak_searchsector, bak_searchwall, bak_searchstat; short bak_searchsector, bak_searchwall, bak_searchstat;
extern short searchsector, searchwall, searchstat, searchit; extern short searchsector, searchwall, searchstat, searchit;
VOID SetupBuildFAF(VOID); void SetupBuildFAF(void);
VOID ResetBuildFAF(VOID); void ResetBuildFAF(void);
void ToggleFAF(void) void ToggleFAF(void)
{ {
@ -174,8 +174,8 @@ void FAF_AfterDrawRooms(void)
} }
} }
VOID void
SetupBuildFAF(VOID) SetupBuildFAF(void)
{ {
short i, nexti; short i, nexti;
SPRITEp sp,vc_sp,vf_sp,vl_sp; SPRITEp sp,vc_sp,vf_sp,vl_sp;
@ -315,8 +315,8 @@ SetupBuildFAF(VOID)
} }
VOID void
ResetBuildFAF(VOID) ResetBuildFAF(void)
{ {
short i, nexti; short i, nexti;
SPRITEp sp; SPRITEp sp;
@ -354,8 +354,8 @@ ResetBuildFAF(VOID)
} }
BOOL SWBOOL
PicInView(short tile_num, BOOL reset) PicInView(short tile_num, SWBOOL reset)
{ {
if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7))) if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7)))
{ {
@ -385,7 +385,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
{ {
if (inside(x, y, (short) i) == 1) if (inside(x, y, (short) i) == 1)
{ {
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next) TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next)
{ {
@ -448,8 +448,8 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
} }
} }
BOOL SWBOOL
FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
{ {
int xoff = 0; int xoff = 0;
int yoff = 0; int yoff = 0;
@ -538,8 +538,8 @@ FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum)
return TRUE; return TRUE;
} }
BOOL SWBOOL
FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
{ {
int xoff = 0; int xoff = 0;
int yoff = 0; int yoff = 0;
@ -631,7 +631,7 @@ FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum)
return TRUE; return TRUE;
} }
BOOL SWBOOL
SectorInScene(short tile_num) SectorInScene(short tile_num)
{ {
if (TEST(gotsector[tile_num >> 3], 1 << (tile_num & 7))) if (TEST(gotsector[tile_num >> 3], 1 << (tile_num & 7)))
@ -677,7 +677,7 @@ ViewSectorInScene(short cursectnum, short type, short level)
return -1; return -1;
} }
VOID void
DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
{ {
short i; short i;

View file

@ -935,7 +935,7 @@ DoPickCloseBunny(short SpriteNum)
// if actor can still see the player // if actor can still see the player
int look_height = SPRITEp_TOS(sp); int look_height = SPRITEp_TOS(sp);
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti)
{ {

View file

@ -46,7 +46,7 @@ not load" error messages.
// It will save out the tile and sound number every time one caches. // It will save out the tile and sound number every time one caches.
// //
// sw -map $bullet -cacheprint > foofile // sw -map $bullet -cacheprint > foofile
extern BOOL PreCaching; extern SWBOOL PreCaching;
// player weaponry, item usage, etc. Precache every time. // player weaponry, item usage, etc. Precache every time.
short Player_SCTable[] = short Player_SCTable[] =
@ -159,7 +159,7 @@ short Pachinko_SCTable[] =
void PreCacheSoundList(short table[], int num); void PreCacheSoundList(short table[], int num);
void PreCacheTable(short table[], int num); void PreCacheTable(short table[], int num);
VOID PreCacheGhost(VOID); void PreCacheGhost(void);
void void
SetupPreCache(void) SetupPreCache(void)
@ -251,19 +251,19 @@ SetupPreCache(void)
} }
} }
VOID PreCacheRipper(VOID) void PreCacheRipper(void)
{ {
PreCacheSoundList(Ripper_SCTable, SIZ(Ripper_SCTable)); PreCacheSoundList(Ripper_SCTable, SIZ(Ripper_SCTable));
PreCacheRange(1580, 1644); PreCacheRange(1580, 1644);
} }
VOID PreCacheRipper2(VOID) void PreCacheRipper2(void)
{ {
PreCacheSoundList(Ripper2_SCTable, SIZ(Ripper2_SCTable)); PreCacheSoundList(Ripper2_SCTable, SIZ(Ripper2_SCTable));
PreCacheRange(4320, 4427); PreCacheRange(4320, 4427);
} }
VOID PreCacheCoolie(VOID) void PreCacheCoolie(void)
{ {
PreCacheGhost(); PreCacheGhost();
PreCacheSoundList(Coolie_SCTable, SIZ(Coolie_SCTable)); PreCacheSoundList(Coolie_SCTable, SIZ(Coolie_SCTable));
@ -271,125 +271,125 @@ VOID PreCacheCoolie(VOID)
PreCacheRange(4260, 4276); // coolie explode PreCacheRange(4260, 4276); // coolie explode
} }
VOID PreCacheGhost(VOID) void PreCacheGhost(void)
{ {
PreCacheSoundList(Ghost_SCTable, SIZ(Ghost_SCTable)); PreCacheSoundList(Ghost_SCTable, SIZ(Ghost_SCTable));
PreCacheRange(4277, 4312); PreCacheRange(4277, 4312);
} }
VOID PreCacheSerpent(VOID) void PreCacheSerpent(void)
{ {
PreCacheSoundList(Serpent_SCTable, SIZ(Serpent_SCTable)); PreCacheSoundList(Serpent_SCTable, SIZ(Serpent_SCTable));
PreCacheRange(960, 1016); PreCacheRange(960, 1016);
PreCacheRange(1300, 1314); PreCacheRange(1300, 1314);
} }
VOID PreCacheGuardian(VOID) void PreCacheGuardian(void)
{ {
PreCacheSoundList(Guardian_SCTable, SIZ(Guardian_SCTable)); PreCacheSoundList(Guardian_SCTable, SIZ(Guardian_SCTable));
PreCacheRange(1469,1497); PreCacheRange(1469,1497);
} }
VOID PreCacheNinja(VOID) void PreCacheNinja(void)
{ {
PreCacheSoundList(Ninja_SCTable, SIZ(Ninja_SCTable)); PreCacheSoundList(Ninja_SCTable, SIZ(Ninja_SCTable));
PreCacheRange(4096, 4239); PreCacheRange(4096, 4239);
} }
VOID PreCacheNinjaGirl(VOID) void PreCacheNinjaGirl(void)
{ {
//PreCacheSoundList(NinjaGirl_SCTable, SIZ(NinjaGirl_SCTable)); //PreCacheSoundList(NinjaGirl_SCTable, SIZ(NinjaGirl_SCTable));
PreCacheRange(5162, 5260); PreCacheRange(5162, 5260);
} }
VOID PreCacheSumo(VOID) void PreCacheSumo(void)
{ {
PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable)); PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable));
PreCacheRange(4490, 4544); PreCacheRange(4490, 4544);
} }
VOID PreCacheZilla(VOID) void PreCacheZilla(void)
{ {
PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable)); PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable));
PreCacheRange(4490, 4544); PreCacheRange(4490, 4544);
} }
VOID PreCacheEel(VOID) void PreCacheEel(void)
{ {
PreCacheRange(4430, 4479); PreCacheRange(4430, 4479);
} }
VOID PreCacheToiletGirl(VOID) void PreCacheToiletGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(5023, 5027); PreCacheRange(5023, 5027);
} }
VOID PreCacheWashGirl(VOID) void PreCacheWashGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(5032, 5035); PreCacheRange(5032, 5035);
} }
VOID PreCacheCarGirl(VOID) void PreCacheCarGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(4594,4597); PreCacheRange(4594,4597);
} }
VOID PreCacheMechanicGirl(VOID) void PreCacheMechanicGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(4590,4593); PreCacheRange(4590,4593);
} }
VOID PreCacheSailorGirl(VOID) void PreCacheSailorGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(4600,4602); PreCacheRange(4600,4602);
} }
VOID PreCachePruneGirl(VOID) void PreCachePruneGirl(void)
{ {
PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable));
PreCacheRange(4604,4604); PreCacheRange(4604,4604);
} }
VOID PreCacheTrash(VOID) void PreCacheTrash(void)
{ {
PreCacheSoundList(Trash_SCTable, SIZ(Trash_SCTable)); PreCacheSoundList(Trash_SCTable, SIZ(Trash_SCTable));
PreCacheRange(2540, 2546); PreCacheRange(2540, 2546);
} }
VOID PreCacheBunny(VOID) void PreCacheBunny(void)
{ {
PreCacheSoundList(Bunny_SCTable, SIZ(Bunny_SCTable)); PreCacheSoundList(Bunny_SCTable, SIZ(Bunny_SCTable));
PreCacheRange(4550, 4584); PreCacheRange(4550, 4584);
} }
VOID PreCacheSkel(VOID) void PreCacheSkel(void)
{ {
PreCacheRange(1320, 1396); PreCacheRange(1320, 1396);
} }
VOID PreCacheHornet(VOID) void PreCacheHornet(void)
{ {
PreCacheSoundList(Hornet_SCTable, SIZ(Hornet_SCTable)); PreCacheSoundList(Hornet_SCTable, SIZ(Hornet_SCTable));
PreCacheRange(800, 811); PreCacheRange(800, 811);
} }
VOID PreCacheSkull(VOID) void PreCacheSkull(void)
{ {
PreCacheSoundList(Head_SCTable, SIZ(Head_SCTable)); PreCacheSoundList(Head_SCTable, SIZ(Head_SCTable));
PreCacheRange(820, 854); PreCacheRange(820, 854);
} }
VOID PreCacheBetty(VOID) void PreCacheBetty(void)
{ {
PreCacheRange(817, 819); PreCacheRange(817, 819);
} }
VOID PreCachePachinko(VOID) void PreCachePachinko(void)
{ {
PreCacheRange(618,623); PreCacheRange(618,623);
PreCacheRange(618,623); PreCacheRange(618,623);
@ -433,7 +433,7 @@ PreCacheRange(short start_pic, short end_pic)
} }
} }
VOID PreCacheAmbient(VOID) void PreCacheAmbient(void)
{ {
int i,nexti; int i,nexti;
int num; int num;
@ -451,7 +451,7 @@ VOID PreCacheAmbient(VOID)
} }
} }
VOID PreCacheOverride(VOID) void PreCacheOverride(void)
{ {
int i,nexti; int i,nexti;
@ -463,7 +463,7 @@ VOID PreCacheOverride(VOID)
} }
VOID PreCacheSoundSpot(VOID) void PreCacheSoundSpot(void)
{ {
int i,nexti; int i,nexti;
int num; int num;
@ -489,8 +489,8 @@ VOID PreCacheSoundSpot(VOID)
} }
} }
VOID void
PreCacheActor(VOID) PreCacheActor(void)
{ {
int i; int i;
short pic; short pic;

View file

@ -37,50 +37,50 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//#include "inv.h" //#include "inv.h"
BOOL CheatInputMode = FALSE; SWBOOL CheatInputMode = FALSE;
char CheatInputString[256]; char CheatInputString[256];
BOOL EveryCheat = FALSE; SWBOOL EveryCheat = FALSE;
BOOL ResCheat = FALSE; SWBOOL ResCheat = FALSE;
VOID ResCheatOn(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void ResCheatOn(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
ResCheat = TRUE; ResCheat = TRUE;
} }
VOID VoxCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void VoxCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
//gs.Voxel ^= 1; //gs.Voxel ^= 1;
} }
VOID RestartCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void RestartCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
ExitLevel = TRUE; ExitLevel = TRUE;
} }
VOID RoomCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void RoomCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
extern BOOL FAF_DebugView; extern SWBOOL FAF_DebugView;
FAF_DebugView ^= 1; FAF_DebugView ^= 1;
} }
VOID SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
gs.Stats = !gs.Stats; gs.Stats = !gs.Stats;
} }
VOID NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
Level++; Level++;
ExitLevel = TRUE; ExitLevel = TRUE;
} }
VOID PrevCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void PrevCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
Level--; Level--;
ExitLevel = TRUE; ExitLevel = TRUE;
} }
VOID MapCheat(PLAYERp pp, char *UNUSED(cheat_string)) void MapCheat(PLAYERp pp, char *UNUSED(cheat_string))
{ {
automapping ^= 1; automapping ^= 1;
@ -94,16 +94,16 @@ VOID MapCheat(PLAYERp pp, char *UNUSED(cheat_string))
} }
VOID LocCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void LocCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
extern BOOL LocationInfo; extern SWBOOL LocationInfo;
LocationInfo++; LocationInfo++;
if (LocationInfo > 2) if (LocationInfo > 2)
LocationInfo = 0; LocationInfo = 0;
} }
VOID WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) void WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
{ {
PLAYERp p; PLAYERp p;
short pnum; short pnum;
@ -131,7 +131,7 @@ VOID WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string))
} }
VOID GodCheat(PLAYERp pp, char *UNUSED(cheat_string)) void GodCheat(PLAYERp pp, char *UNUSED(cheat_string))
{ {
// //
// GOD mode // GOD mode
@ -142,7 +142,7 @@ VOID GodCheat(PLAYERp pp, char *UNUSED(cheat_string))
PutStringInfo(pp, ds); PutStringInfo(pp, ds);
} }
VOID ClipCheat(PLAYERp pp, char *UNUSED(cheat_string)) void ClipCheat(PLAYERp pp, char *UNUSED(cheat_string))
{ {
FLIP(pp->Flags, PF_CLIP_CHEAT); FLIP(pp->Flags, PF_CLIP_CHEAT);
@ -150,7 +150,7 @@ VOID ClipCheat(PLAYERp pp, char *UNUSED(cheat_string))
PutStringInfo(pp, ds); PutStringInfo(pp, ds);
} }
VOID WarpCheat(PLAYERp pp, char *cheat_string) void WarpCheat(PLAYERp pp, char *cheat_string)
{ {
char *cp = cheat_string; char *cp = cheat_string;
int episode_num; int episode_num;
@ -180,7 +180,7 @@ VOID WarpCheat(PLAYERp pp, char *cheat_string)
PutStringInfo(pp, ds); PutStringInfo(pp, ds);
} }
VOID ItemCheat(PLAYERp pp, char *cheat_string) void ItemCheat(PLAYERp pp, char *cheat_string)
{ {
// //
// Get all ITEMS // Get all ITEMS
@ -231,7 +231,7 @@ VOID ItemCheat(PLAYERp pp, char *cheat_string)
PlayerUpdateKeys(pp); PlayerUpdateKeys(pp);
} }
VOID EveryCheatToggle(PLAYERp pp, char *cheat_string) void EveryCheatToggle(PLAYERp pp, char *cheat_string)
{ {
EveryCheat ^= 1; EveryCheat ^= 1;
@ -243,18 +243,18 @@ VOID EveryCheatToggle(PLAYERp pp, char *cheat_string)
PutStringInfo(pp, ds); PutStringInfo(pp, ds);
} }
VOID SaveCheat(PLAYERp pp, char *UNUSED(cheat_string)) void SaveCheat(PLAYERp pp, char *UNUSED(cheat_string))
{ {
saveboard("swsave.map", &pp->posx, &pp->posy, &pp->posz, saveboard("swsave.map", &pp->posx, &pp->posy, &pp->posz,
&pp->pang, &pp->cursectnum); &pp->pang, &pp->cursectnum);
} }
VOID GeorgeFunc(PLAYERp pp, char *UNUSED(cheat_string)) void GeorgeFunc(PLAYERp pp, char *UNUSED(cheat_string))
{ {
PlayerSound(DIGI_TAUNTAI9,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp); PlayerSound(DIGI_TAUNTAI9,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
} }
VOID BlackburnFunc(PLAYERp pp, char *UNUSED(cheat_string)) void BlackburnFunc(PLAYERp pp, char *UNUSED(cheat_string))
{ {
PlayerSound(DIGI_TAUNTAI3,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp); PlayerSound(DIGI_TAUNTAI3,&pp->posx,&pp->posy,&pp->posz,v3df_dontpan|v3df_doppler|v3df_follow,pp);
} }
@ -316,9 +316,9 @@ CHEAT_INFO ci[] =
// !JIM! My simplified version of CheatInput which simply processes MessageInputString // !JIM! My simplified version of CheatInput which simply processes MessageInputString
void CheatInput(void) void CheatInput(void)
{ {
static BOOL cur_show; static SWBOOL cur_show;
int ret; int ret;
BOOL match = FALSE; SWBOOL match = FALSE;
unsigned int i; unsigned int i;
//if (CommEnabled) //if (CommEnabled)
@ -382,10 +382,10 @@ void CheatInput(void)
/* OLD CODE /* OLD CODE
void CheatInput(void) void CheatInput(void)
{ {
static BOOL cur_show; static SWBOOL cur_show;
signed char MNU_InputString(char *, short); signed char MNU_InputString(char *, short);
int ret; int ret;
BOOL match = FALSE; SWBOOL match = FALSE;
short i; short i;
// don't use InputMode here - its set for CheatInputMode // don't use InputMode here - its set for CheatInputMode

View file

@ -33,7 +33,7 @@ short f_c = 3;
static unsigned char tempbuf[256]; static unsigned char tempbuf[256];
unsigned char DefaultPalette[256 * 32]; unsigned char DefaultPalette[256 * 32];
#if 1 #if 1
VOID void
MapColors(short num, COLOR_MAP cm, short create) MapColors(short num, COLOR_MAP cm, short create)
{ {
int i; int i;
@ -56,7 +56,7 @@ MapColors(short num, COLOR_MAP cm, short create)
tempbuf[i + cm.FromColor] = (i*inc) + cm.ToColor; tempbuf[i + cm.FromColor] = (i*inc) + cm.ToColor;
} }
#else #else
VOID void
MapColors(short num, COLOR_MAP cm, short create) MapColors(short num, COLOR_MAP cm, short create)
{ {
int i; int i;
@ -155,8 +155,8 @@ static COLOR_MAP PlayerColorMap[PLAYER_COLOR_MAPS][1] =
}; };
VOID void
InitPalette(VOID) InitPalette(void)
{ {
static COLOR_MAP AllToRed[] = static COLOR_MAP AllToRed[] =
{ {
@ -415,7 +415,7 @@ VBE_setPalette(0, 256, mypalette);
#define NRED 2 #define NRED 2
#define NRESERVED 3 #define NRESERVED 3
VOID SetPaletteToVESA(unsigned char *pal) void SetPaletteToVESA(unsigned char *pal)
{ {
/* /*
char pal_buff[1024]; char pal_buff[1024];
@ -435,12 +435,12 @@ VOID SetPaletteToVESA(unsigned char *pal)
// fprintf(stderr,"SetPaletteToVESA() called\n"); // fprintf(stderr,"SetPaletteToVESA() called\n");
} }
VOID set_pal(unsigned char *pal) void set_pal(unsigned char *pal)
{ {
SetPaletteToVESA(pal); SetPaletteToVESA(pal);
} }
VOID GetPaletteFromVESA(unsigned char *pal) void GetPaletteFromVESA(unsigned char *pal)
{ {
/* /*
char pal_buff[1024]; char pal_buff[1024];

View file

@ -48,57 +48,57 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "_functio.h" #include "_functio.h"
#include "_config.h" #include "_config.h"
extern void ReadGameSetup(int32 scripthandle); extern void ReadGameSetup(int32_t scripthandle);
extern void WriteGameSetup(int32 scripthandle); extern void WriteGameSetup(int32_t scripthandle);
// //
// Comm variables // Comm variables
// //
char CommPlayerName[32]; char CommPlayerName[32];
int32 NumberPlayers,CommPort,PortSpeed,IrqNumber,UartAddress; int32_t NumberPlayers,CommPort,PortSpeed,IrqNumber,UartAddress;
// //
// Sound variables // Sound variables
// //
int32 FXDevice = 0; int32_t FXDevice = 0;
int32 MusicDevice = 0; int32_t MusicDevice = 0;
int32 NumVoices = 32; int32_t NumVoices = 32;
int32 NumChannels = 2; int32_t NumChannels = 2;
int32 NumBits = 16; int32_t NumBits = 16;
int32 MixRate = 44100; int32_t MixRate = 44100;
int32 UseMouse = 1, UseJoystick = 0; int32_t UseMouse = 1, UseJoystick = 0;
byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; uint8_t KeyboardKeys[NUMGAMEFUNCTIONS][2];
int32 MouseButtons[MAXMOUSEBUTTONS]; int32_t MouseButtons[MAXMOUSEBUTTONS];
int32 MouseButtonsClicked[MAXMOUSEBUTTONS]; int32_t MouseButtonsClicked[MAXMOUSEBUTTONS];
int32 MouseDigitalAxes[MAXMOUSEAXES][2]; int32_t MouseDigitalAxes[MAXMOUSEAXES][2];
int32 MouseAnalogAxes[MAXMOUSEAXES]; int32_t MouseAnalogAxes[MAXMOUSEAXES];
int32 MouseAnalogScale[MAXMOUSEAXES]; int32_t MouseAnalogScale[MAXMOUSEAXES];
int32 JoystickButtons[MAXJOYBUTTONS]; int32_t JoystickButtons[MAXJOYBUTTONS];
int32 JoystickButtonsClicked[MAXJOYBUTTONS]; int32_t JoystickButtonsClicked[MAXJOYBUTTONS];
int32 JoystickDigitalAxes[MAXJOYAXES][2]; int32_t JoystickDigitalAxes[MAXJOYAXES][2];
int32 JoystickAnalogAxes[MAXJOYAXES]; int32_t JoystickAnalogAxes[MAXJOYAXES];
int32 JoystickAnalogScale[MAXJOYAXES]; int32_t JoystickAnalogScale[MAXJOYAXES];
int32 JoystickAnalogDead[MAXJOYAXES]; int32_t JoystickAnalogDead[MAXJOYAXES];
int32 JoystickAnalogSaturate[MAXJOYAXES]; int32_t JoystickAnalogSaturate[MAXJOYAXES];
// //
// Screen variables // Screen variables
// //
int32 ScreenMode = 1; int32_t ScreenMode = 1;
int32 ScreenWidth = 640; int32_t ScreenWidth = 640;
int32 ScreenHeight = 480; int32_t ScreenHeight = 480;
int32 ScreenBPP = 8; int32_t ScreenBPP = 8;
int32 ForceSetup = 1; int32_t ForceSetup = 1;
extern char WangBangMacro[10][64]; extern char WangBangMacro[10][64];
char RTSName[MAXRTSNAMELENGTH]; char RTSName[MAXRTSNAMELENGTH];
//static char setupfilename[64]={SETUPFILENAME}; //static char setupfilename[64]={SETUPFILENAME};
char setupfilename[64]= {SETUPFILENAME}; char setupfilename[64]= {SETUPFILENAME};
static int32 scripthandle = -1; static int32_t scripthandle = -1;
@ -110,9 +110,9 @@ static int32 scripthandle = -1;
=================== ===================
*/ */
int32 CONFIG_FunctionNameToNum(const char *func) int32_t CONFIG_FunctionNameToNum(const char *func)
{ {
int32 i; int32_t i;
if (!func) return -1; if (!func) return -1;
for (i=0; i<NUMGAMEFUNCTIONS; i++) for (i=0; i<NUMGAMEFUNCTIONS; i++)
@ -133,7 +133,7 @@ int32 CONFIG_FunctionNameToNum(const char *func)
=================== ===================
*/ */
const char *CONFIG_FunctionNumToName(int32 func) const char *CONFIG_FunctionNumToName(int32_t func)
{ {
if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS) if ((unsigned)func >= (unsigned)NUMGAMEFUNCTIONS)
{ {
@ -152,7 +152,7 @@ const char *CONFIG_FunctionNumToName(int32 func)
= =
=================== ===================
*/ */
int32 CONFIG_AnalogNameToNum(const char *func) int32_t CONFIG_AnalogNameToNum(const char *func)
{ {
if (!Bstrcasecmp(func,"analog_turning")) if (!Bstrcasecmp(func,"analog_turning"))
{ {
@ -173,7 +173,7 @@ int32 CONFIG_AnalogNameToNum(const char *func)
return -1; return -1;
} }
const char *CONFIG_AnalogNumToName(int32 func) const char *CONFIG_AnalogNumToName(int32_t func)
{ {
switch (func) switch (func)
{ {
@ -202,8 +202,8 @@ const char *CONFIG_AnalogNumToName(int32 func)
void CONFIG_SetDefaults(void) void CONFIG_SetDefaults(void)
{ {
// JBF 20031211 // JBF 20031211
int32 i,f; int32_t i,f;
byte k1,k2; uint8_t k1,k2;
ScreenMode = 1; ScreenMode = 1;
ScreenWidth = 640; ScreenWidth = 640;
@ -248,14 +248,14 @@ void CONFIG_SetDefaults(void)
memset(JoystickButtons, -1, sizeof(JoystickButtons)); memset(JoystickButtons, -1, sizeof(JoystickButtons));
memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked)); memset(JoystickButtonsClicked, -1, sizeof(JoystickButtonsClicked));
for (i=0; i < (int32)(sizeof(joystickdefaults)/sizeof(char *)); i++) for (i=0; i < (int32_t)(sizeof(joystickdefaults)/sizeof(char *)); i++)
{ {
JoystickButtons[i] = CONFIG_FunctionNameToNum(joystickdefaults[i]); JoystickButtons[i] = CONFIG_FunctionNameToNum(joystickdefaults[i]);
JoystickButtonsClicked[i] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]); JoystickButtonsClicked[i] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]);
} }
memset(JoystickDigitalAxes, -1, sizeof(JoystickDigitalAxes)); memset(JoystickDigitalAxes, -1, sizeof(JoystickDigitalAxes));
for (i=0; i < (int32)(sizeof(joystickanalogdefaults)/sizeof(char *)); i++) for (i=0; i < (int32_t)(sizeof(joystickanalogdefaults)/sizeof(char *)); i++)
{ {
JoystickAnalogScale[i] = 65536; JoystickAnalogScale[i] = 65536;
JoystickAnalogDead[i] = 1024; JoystickAnalogDead[i] = 1024;
@ -342,11 +342,11 @@ void SetMouseDefaults(int style)
=================== ===================
*/ */
void CONFIG_ReadKeys(int32 scripthandle) void CONFIG_ReadKeys(int32_t scripthandle)
{ {
int32 i; int32_t i;
int32 numkeyentries; int32_t numkeyentries;
int32 function; int32_t function;
char keyname1[80]; char keyname1[80];
char keyname2[80]; char keyname2[80];
kb_scancode key1,key2; kb_scancode key1,key2;
@ -374,11 +374,11 @@ void CONFIG_ReadKeys(int32 scripthandle)
key2 = 0xff; key2 = 0xff;
if (keyname1[0]) if (keyname1[0])
{ {
key1 = (byte) KB_StringToScanCode(keyname1); key1 = (uint8_t) KB_StringToScanCode(keyname1);
} }
if (keyname2[0]) if (keyname2[0])
{ {
key2 = (byte) KB_StringToScanCode(keyname2); key2 = (uint8_t) KB_StringToScanCode(keyname2);
} }
KeyboardKeys[function][0] = key1; KeyboardKeys[function][0] = key1;
KeyboardKeys[function][1] = key2; KeyboardKeys[function][1] = key2;
@ -404,10 +404,10 @@ void CONFIG_ReadKeys(int32 scripthandle)
void CONFIG_SetupMouse(void) void CONFIG_SetupMouse(void)
{ {
int32 i; int32_t i;
char str[80],*p; char str[80],*p;
char temp[80]; char temp[80];
int32 function, scale; int32_t function, scale;
if (scripthandle < 0) return; if (scripthandle < 0) return;
@ -473,10 +473,10 @@ void CONFIG_SetupMouse(void)
void CONFIG_SetupJoystick(void) void CONFIG_SetupJoystick(void)
{ {
int32 i; int32_t i;
char str[80],*p; char str[80],*p;
char temp[80]; char temp[80];
int32 function, scale; int32_t function, scale;
if (scripthandle < 0) return; if (scripthandle < 0) return;
@ -546,9 +546,9 @@ void CONFIG_SetupJoystick(void)
=================== ===================
*/ */
int32 CONFIG_ReadSetup(void) int32_t CONFIG_ReadSetup(void)
{ {
int32 dummy; int32_t dummy;
char ret; char ret;
extern char ds[]; extern char ds[];
extern char PlayerNameArg[32]; extern char PlayerNameArg[32];
@ -570,7 +570,7 @@ int32 CONFIG_ReadSetup(void)
if (ScreenBPP < 8) ScreenBPP = 8; if (ScreenBPP < 8) ScreenBPP = 8;
#ifdef RENDERTYPEWIN #ifdef RENDERTYPEWIN
SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32 *)&maxrefreshfreq); SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32_t *)&maxrefreshfreq);
#endif #endif
SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode); SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
@ -627,7 +627,7 @@ int32 CONFIG_ReadSetup(void)
void CONFIG_WriteSetup(void) void CONFIG_WriteSetup(void)
{ {
int32 dummy; int32_t dummy;
char buf[80]; char buf[80];
if (scripthandle < 0) if (scripthandle < 0)

View file

@ -35,44 +35,44 @@ extern "C" {
#define SETUPNAMEPARM "SETUPFILE" #define SETUPNAMEPARM "SETUPFILE"
// screen externs // screen externs
extern int32 ScreenMode; // Screen mode extern int32_t ScreenMode; // Screen mode
extern int32 ScreenWidth; extern int32_t ScreenWidth;
extern int32 ScreenHeight; extern int32_t ScreenHeight;
extern int32 ScreenBPP; extern int32_t ScreenBPP;
extern int32 ScreenBufferMode; extern int32_t ScreenBufferMode;
extern int32 VesaBufferMode; extern int32_t VesaBufferMode;
extern int32 ForceSetup; extern int32_t ForceSetup;
// sound externs // sound externs
extern int32 FXDevice; // Sound FX Card number extern int32_t FXDevice; // Sound FX Card number
extern int32 MusicDevice; // Music Card number extern int32_t MusicDevice; // Music Card number
extern int32 FXVolume; // FX Volume extern int32_t FXVolume; // FX Volume
extern int32 MusicVolume; // Music Volume extern int32_t MusicVolume; // Music Volume
extern int32 NumVoices; // Number of voices extern int32_t NumVoices; // Number of voices
extern int32 NumChannels; // Number of channels extern int32_t NumChannels; // Number of channels
extern int32 NumBits; // Number of bits extern int32_t NumBits; // Number of bits
extern int32 MixRate; // Mixing rate extern int32_t MixRate; // Mixing rate
extern int32 MidiPort; // Midi Port extern int32_t MidiPort; // Midi Port
extern int32 ReverseStereo; // Reverse Stereo Channels extern int32_t ReverseStereo; // Reverse Stereo Channels
// comm externs // comm externs
extern int32 ComPort; extern int32_t ComPort;
extern int32 IrqNumber; extern int32_t IrqNumber;
extern int32 UartAddress; extern int32_t UartAddress;
extern int32 PortSpeed; extern int32_t PortSpeed;
extern int32 ToneDial; extern int32_t ToneDial;
extern char ModemName[MAXMODEMSTRING]; extern char ModemName[MAXMODEMSTRING];
extern char InitString[MAXMODEMSTRING]; extern char InitString[MAXMODEMSTRING];
extern char HangupString[MAXMODEMSTRING]; extern char HangupString[MAXMODEMSTRING];
extern char DialoutString[MAXMODEMSTRING]; extern char DialoutString[MAXMODEMSTRING];
extern int32 SocketNumber; extern int32_t SocketNumber;
extern char CommbatMacro[MAXMACROS][MAXMACROLENGTH]; extern char CommbatMacro[MAXMACROS][MAXMACROLENGTH];
extern char PhoneNames[MAXPHONEENTRIES][PHONENAMELENGTH]; extern char PhoneNames[MAXPHONEENTRIES][PHONENAMELENGTH];
extern char PhoneNumbers[MAXPHONEENTRIES][PHONENUMBERLENGTH]; extern char PhoneNumbers[MAXPHONEENTRIES][PHONENUMBERLENGTH];
extern char PhoneNumber[PHONENUMBERLENGTH]; extern char PhoneNumber[PHONENUMBERLENGTH];
extern int32 NumberPlayers; extern int32_t NumberPlayers;
extern int32 ConnectType; extern int32_t ConnectType;
extern char PlayerName[MAXPLAYERNAMELENGTH]; extern char PlayerName[MAXPLAYERNAMELENGTH];
extern char RTSName[MAXRTSNAMELENGTH]; extern char RTSName[MAXRTSNAMELENGTH];
extern char UserLevel[MAXUSERLEVELNAMELENGTH]; extern char UserLevel[MAXUSERLEVELNAMELENGTH];
@ -80,31 +80,31 @@ extern char RTSPath[MAXRTSPATHLENGTH];
extern char UserPath[MAXUSERLEVELPATHLENGTH]; extern char UserPath[MAXUSERLEVELPATHLENGTH];
// controller externs // controller externs
extern int32 UseMouse, UseJoystick; extern int32_t UseMouse, UseJoystick;
extern int32 JoystickPort; extern int32_t JoystickPort;
extern int32 MouseSensitivity; extern int32_t MouseSensitivity;
extern int32 MouseAiming; extern int32_t MouseAiming;
extern int32 MouseAimingFlipped; extern int32_t MouseAimingFlipped;
extern byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; extern uint8_t KeyboardKeys[NUMGAMEFUNCTIONS][2];
extern int32 MouseButtons[MAXMOUSEBUTTONS]; extern int32_t MouseButtons[MAXMOUSEBUTTONS];
extern int32 MouseButtonsClicked[MAXMOUSEBUTTONS]; extern int32_t MouseButtonsClicked[MAXMOUSEBUTTONS];
extern int32 JoystickButtons[MAXJOYBUTTONS]; extern int32_t JoystickButtons[MAXJOYBUTTONS];
extern int32 JoystickButtonsClicked[MAXJOYBUTTONS]; extern int32_t JoystickButtonsClicked[MAXJOYBUTTONS];
extern int32 MouseAnalogAxes[MAXMOUSEAXES]; extern int32_t MouseAnalogAxes[MAXMOUSEAXES];
extern int32 JoystickAnalogAxes[MAXJOYAXES]; extern int32_t JoystickAnalogAxes[MAXJOYAXES];
extern int32 MouseAnalogScale[MAXMOUSEAXES]; extern int32_t MouseAnalogScale[MAXMOUSEAXES];
extern int32 JoystickAnalogScale[MAXJOYAXES]; extern int32_t JoystickAnalogScale[MAXJOYAXES];
extern int32 JoystickAnalogDead[MAXJOYAXES]; extern int32_t JoystickAnalogDead[MAXJOYAXES];
extern int32 JoystickAnalogSaturate[MAXJOYAXES]; extern int32_t JoystickAnalogSaturate[MAXJOYAXES];
extern int32 EnableRudder; extern int32_t EnableRudder;
extern int32 MouseDigitalAxes[MAXMOUSEAXES][2]; extern int32_t MouseDigitalAxes[MAXMOUSEAXES][2];
extern int32 JoystickDigitalAxes[MAXJOYAXES][2]; extern int32_t JoystickDigitalAxes[MAXJOYAXES][2];
extern char setupfilename[64]; extern char setupfilename[64];
extern char ExternalControlFilename[64]; extern char ExternalControlFilename[64];
@ -115,17 +115,17 @@ void SetMouseDefaults(int style);
void SetJoystickDefaults(void); void SetJoystickDefaults(void);
void SetDefaultKeyDefinitions(int style); void SetDefaultKeyDefinitions(int style);
int32 CONFIG_ReadSetup(void); int32_t CONFIG_ReadSetup(void);
void CONFIG_SetupMouse(void); void CONFIG_SetupMouse(void);
void CONFIG_SetupJoystick(void); void CONFIG_SetupJoystick(void);
void CONFIG_WriteSetup(void); void CONFIG_WriteSetup(void);
void WriteCommitFile(int32 gametype); void WriteCommitFile(int32_t gametype);
void CONFIG_GetSetupFilename(void); void CONFIG_GetSetupFilename(void);
const char *CONFIG_FunctionNumToName(int32 func); const char *CONFIG_FunctionNumToName(int32_t func);
int32 CONFIG_FunctionNameToNum(const char *func); int32_t CONFIG_FunctionNameToNum(const char *func);
const char *CONFIG_AnalogNumToName(int32 func); const char *CONFIG_AnalogNumToName(int32_t func);
int32 CONFIG_AnalogNameToNum(const char *func); int32_t CONFIG_AnalogNameToNum(const char *func);
#ifdef __cplusplus #ifdef __cplusplus
}; };

View file

@ -60,13 +60,13 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define MAX_CONSOLE_COMMANDS 100 #define MAX_CONSOLE_COMMANDS 100
#define MAX_HISTORY 20 #define MAX_HISTORY 20
BOOL SpriteInfo = FALSE; SWBOOL SpriteInfo = FALSE;
extern BOOL QuitFlag; extern SWBOOL QuitFlag;
// FUNCTION PROTOTYPES /////////////////////////////////////////////////////////////////////// // FUNCTION PROTOTYPES ///////////////////////////////////////////////////////////////////////
void CON_ProcessOptions(void); void CON_ProcessOptions(void);
void CON_ClearConsole(void); void CON_ClearConsole(void);
BYTE CON_CommandCmp(const char *str1, const char *str2, int len); uint8_t CON_CommandCmp(const char *str1, const char *str2, int len);
void CheatInput(void); void CheatInput(void);
// Modify actor routines // Modify actor routines
@ -167,15 +167,15 @@ CON_COMMAND pre_commands[] =
CON_COMMAND commandlist[MAX_CONSOLE_COMMANDS]; // Console command array CON_COMMAND commandlist[MAX_CONSOLE_COMMANDS]; // Console command array
CON_COMMANDp commandptr; // Pointer to a command CON_COMMANDp commandptr; // Pointer to a command
SHORT numcommands=0; // Total number of commands in the command list int16_t numcommands=0; // Total number of commands in the command list
char command_history[MAX_HISTORY][256]; // History of what has been typed in lately char command_history[MAX_HISTORY][256]; // History of what has been typed in lately
SHORT curr_history=0; // Line currently being pointed to in the history array int16_t curr_history=0; // Line currently being pointed to in the history array
SHORT numhistory=0; int16_t numhistory=0;
// Array which stores all the user arguments passed into the game. // Array which stores all the user arguments passed into the game.
static char user_args[MAX_USER_ARGS][256]; static char user_args[MAX_USER_ARGS][256];
static BYTE con_argnum=0; // Total number of arguments that were passed into the game static uint8_t con_argnum=0; // Total number of arguments that were passed into the game
char con_message[80]; // Holds the current console message to send to adduserquote char con_message[80]; // Holds the current console message to send to adduserquote
@ -185,7 +185,7 @@ char con_message[80]; // Holds the current console message to send to adduserquo
// //
// Frank's neato input string checker, useful for my stuff too. // Frank's neato input string checker, useful for my stuff too.
// //
BYTE CON_CommandCmp(const char *str1, const char *str2, int len) uint8_t CON_CommandCmp(const char *str1, const char *str2, int len)
{ {
const char *cp1 = str1; const char *cp1 = str1;
const char *cp2 = str2; const char *cp2 = str2;
@ -208,7 +208,7 @@ BYTE CON_CommandCmp(const char *str1, const char *str2, int len)
return TRUE; return TRUE;
} }
BOOL IsCommand(char *str) SWBOOL IsCommand(char *str)
{ {
int i; int i;
char first[512]; char first[512];
@ -279,9 +279,9 @@ void CON_StoreArg(const char *userarg)
// //
// Checkes the user command array to see if user did in fact pass in a particular argument // Checkes the user command array to see if user did in fact pass in a particular argument
// //
BOOL CON_CheckParm(const char *userarg) SWBOOL CON_CheckParm(const char *userarg)
{ {
SHORT i; int16_t i;
for (i=0; i<con_argnum; i++) for (i=0; i<con_argnum; i++)
{ {
@ -322,7 +322,7 @@ void CON_AddHistory(const char *commandstr)
// //
// Adds a command name to the command list and assigns the appropriate function pointer // Adds a command name to the command list and assigns the appropriate function pointer
// //
BOOL CON_AddCommand(const char *command, void (*function)(void)) SWBOOL CON_AddCommand(const char *command, void (*function)(void))
{ {
if (command != NULL && function != NULL && numcommands < MAX_CONSOLE_COMMANDS) if (command != NULL && function != NULL && numcommands < MAX_CONSOLE_COMMANDS)
{ {
@ -347,7 +347,7 @@ BOOL CON_AddCommand(const char *command, void (*function)(void))
// //
void CON_ProcessUserCommand(void) void CON_ProcessUserCommand(void)
{ {
SHORT i=0; int16_t i=0;
char temp_message[256],command_str[256]; char temp_message[256],command_str[256];
strcpy(temp_message,MessageInputString); strcpy(temp_message,MessageInputString);
@ -414,7 +414,7 @@ void CON_ClearConsole(void)
// The user console programming function library //////////////////////////////////////////// // The user console programming function library ////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////
BOOL CheckValidSprite(short SpriteNum) SWBOOL CheckValidSprite(short SpriteNum)
{ {
if (SpriteNum < 0 || SpriteNum > 6144) if (SpriteNum < 0 || SpriteNum > 6144)
{ {
@ -467,7 +467,7 @@ void CON_GetHelp(void)
void CON_ModXrepeat(void) void CON_ModXrepeat(void)
{ {
char base[80]; char base[80];
SHORT op1=64,op2=-1,op3=-1; int16_t op1=64,op2=-1,op3=-1;
short i; short i;
@ -515,7 +515,7 @@ void CON_ModXrepeat(void)
void CON_ModYrepeat(void) void CON_ModYrepeat(void)
{ {
char base[80]; char base[80];
SHORT op1=64,op2=-1,op3=-1; int16_t op1=64,op2=-1,op3=-1;
short i; short i;
@ -563,7 +563,7 @@ void CON_ModYrepeat(void)
void CON_ModTranslucent(void) void CON_ModTranslucent(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
@ -597,7 +597,7 @@ void CON_SoundTest(void)
int handle; int handle;
int zero=0; int zero=0;
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
// Format: sound [number] // Format: sound [number]
if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2) if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2)
@ -620,7 +620,7 @@ void CON_SoundTest(void)
void CON_Reverb(void) void CON_Reverb(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
PLAYERp pp = Player + screenpeek; PLAYERp pp = Player + screenpeek;
// Format: reverb [number] // Format: reverb [number]
@ -1008,7 +1008,7 @@ void CON_SpriteInfo(void)
void CON_KillSprite(void) void CON_KillSprite(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
SPRITEp sp; SPRITEp sp;
short i; short i;
USERp u; USERp u;
@ -1044,7 +1044,7 @@ void CON_KillSprite(void)
void CON_SpriteDetail(void) void CON_SpriteDetail(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
SPRITEp sp; SPRITEp sp;
short i; short i;
@ -1073,7 +1073,7 @@ void CON_SpriteDetail(void)
void CON_UserDetail(void) void CON_UserDetail(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
SPRITEp sp; SPRITEp sp;
short i; short i;
USERp u; USERp u;
@ -1195,7 +1195,7 @@ void CON_DamageData(void)
{ {
char base[80],field[80]; char base[80],field[80];
SHORT op1=0; int16_t op1=0;
unsigned int op2, i; unsigned int op2, i;
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
@ -1263,7 +1263,7 @@ void CON_DamageData(void)
void CON_WinPachinko(void) void CON_WinPachinko(void)
{ {
extern BOOL Pachinko_Win_Cheat; extern SWBOOL Pachinko_Win_Cheat;
PLAYERp pp = Player + myconnectindex; PLAYERp pp = Player + myconnectindex;
extern void CheckSndData(char *file, int line); extern void CheckSndData(char *file, int line);
@ -1389,7 +1389,7 @@ void CON_DumpHeap(void)
void CON_ShowMirror(void) void CON_ShowMirror(void)
{ {
char base[80]; char base[80];
SHORT op1=0; int16_t op1=0;
// Format: showmirror [SpriteNum] // Format: showmirror [SpriteNum]
if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2) if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2)

View file

@ -403,7 +403,7 @@ ACTOR_ACTION_SET CoolieActionSet =
NULL NULL
}; };
VOID EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person) void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -411,7 +411,7 @@ VOID EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso
short wpn_cnt; short wpn_cnt;
short depth = 0; short depth = 0;
extern short TotalKillable; extern short TotalKillable;
extern BOOL DebugSecret; extern SWBOOL DebugSecret;
switch (u->ID) switch (u->ID)
{ {

View file

@ -46,29 +46,29 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
DFILE DemoFileIn = DF_ERR; DFILE DemoFileIn = DF_ERR;
FILE *DemoFileOut; FILE *DemoFileOut;
BOOL DemoPlaying = FALSE; SWBOOL DemoPlaying = FALSE;
BOOL DemoRecording = FALSE; SWBOOL DemoRecording = FALSE;
BOOL DemoEdit = FALSE; SWBOOL DemoEdit = FALSE;
BOOL DemoMode = FALSE; SWBOOL DemoMode = FALSE;
BOOL DemoModeMenuState = FALSE; SWBOOL DemoModeMenuState = FALSE;
BOOL DemoOverride = FALSE; SWBOOL DemoOverride = FALSE;
char DemoFileName[16] = "demo.dmo"; char DemoFileName[16] = "demo.dmo";
char DemoLevelName[16] = ""; char DemoLevelName[16] = "";
extern BOOL NewGame; extern SWBOOL NewGame;
// Demo sync stuff // Demo sync stuff
FILE *DemoSyncFile; FILE *DemoSyncFile;
BOOL DemoSyncTest = FALSE, DemoSyncRecord = FALSE; SWBOOL DemoSyncTest = FALSE, DemoSyncRecord = FALSE;
char DemoTmpName[16] = ""; char DemoTmpName[16] = "";
SW_PACKET DemoBuffer[DEMO_BUFFER_MAX]; SW_PACKET DemoBuffer[DEMO_BUFFER_MAX];
int DemoRecCnt = 0; // Can only record 1-player game int DemoRecCnt = 0; // Can only record 1-player game
BOOL DemoDone; SWBOOL DemoDone;
VOID DemoWriteHeader(VOID); void DemoWriteHeader(void);
VOID DemoReadHeader(VOID); void DemoReadHeader(void);
VOID DemoReadBuffer(VOID); void DemoReadBuffer(void);
// //
@ -76,15 +76,15 @@ VOID DemoReadBuffer(VOID);
// //
// DemoDebugMode will close the file after every write // DemoDebugMode will close the file after every write
BOOL DemoDebugMode = FALSE; SWBOOL DemoDebugMode = FALSE;
//BOOL DemoDebugMode = TRUE; //SWBOOL DemoDebugMode = TRUE;
BOOL DemoInitOnce = FALSE; SWBOOL DemoInitOnce = FALSE;
short DemoDebugBufferMax = 1; short DemoDebugBufferMax = 1;
extern char LevelName[]; extern char LevelName[];
extern char LevelSong[16]; extern char LevelSong[16];
extern BYTE FakeMultiNumPlayers; extern uint8_t FakeMultiNumPlayers;
extern BOOL QuitFlag; extern SWBOOL QuitFlag;
/////////////////////////////////////////// ///////////////////////////////////////////
// //
@ -92,7 +92,7 @@ extern BOOL QuitFlag;
// //
/////////////////////////////////////////// ///////////////////////////////////////////
char *DemoSyncFileName(VOID) char *DemoSyncFileName(void)
{ {
static char file_name[32]; static char file_name[32];
char *ptr; char *ptr;
@ -110,8 +110,8 @@ char *DemoSyncFileName(VOID)
return file_name; return file_name;
} }
VOID void
DemoSetup(VOID) DemoSetup(void)
{ {
if (DemoRecording) if (DemoRecording)
{ {
@ -135,8 +135,8 @@ DemoSetup(VOID)
} }
} }
VOID void
DemoRecordSetup(VOID) DemoRecordSetup(void)
{ {
if (DemoRecording) if (DemoRecording)
{ {
@ -148,8 +148,8 @@ DemoRecordSetup(VOID)
} }
} }
VOID void
DemoPlaySetup(VOID) DemoPlaySetup(void)
{ {
if (DemoPlaying) if (DemoPlaying)
{ {
@ -164,8 +164,8 @@ DemoPlaySetup(VOID)
} }
} }
VOID void
DemoWriteHeader(VOID) DemoWriteHeader(void)
{ {
DEMO_HEADER dh; DEMO_HEADER dh;
DEMO_START_POS dsp; DEMO_START_POS dsp;
@ -207,8 +207,8 @@ DemoWriteHeader(VOID)
} }
} }
VOID void
DemoReadHeader(VOID) DemoReadHeader(void)
{ {
DEMO_HEADER dh; DEMO_HEADER dh;
DEMO_START_POS dsp; DEMO_START_POS dsp;
@ -262,8 +262,8 @@ DemoReadHeader(VOID)
DREAD(&gNet, sizeof(gNet), 1, DemoFileIn); DREAD(&gNet, sizeof(gNet), 1, DemoFileIn);
} }
VOID void
DemoDebugWrite(VOID) DemoDebugWrite(void)
{ {
int size; int size;
@ -278,22 +278,22 @@ DemoDebugWrite(VOID)
fclose(DemoFileOut); fclose(DemoFileOut);
} }
VOID void
DemoWriteBuffer(VOID) DemoWriteBuffer(void)
{ {
fwrite(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileOut); fwrite(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileOut);
memset(&DemoBuffer, -1, sizeof(DemoBuffer)); memset(&DemoBuffer, -1, sizeof(DemoBuffer));
} }
VOID void
DemoReadBuffer(VOID) DemoReadBuffer(void)
{ {
memset(&DemoBuffer, -1, sizeof(DemoBuffer)); memset(&DemoBuffer, -1, sizeof(DemoBuffer));
DREAD(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileIn); DREAD(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileIn);
} }
VOID void
DemoBackupBuffer(VOID) DemoBackupBuffer(void)
{ {
#if DEMO_FILE_TYPE != DEMO_FILE_GROUP #if DEMO_FILE_TYPE != DEMO_FILE_GROUP
FILE *NewDemoFile; FILE *NewDemoFile;
@ -324,8 +324,8 @@ DemoBackupBuffer(VOID)
#endif #endif
} }
VOID void
DemoTerm(VOID) DemoTerm(void)
{ {
if (DemoRecording) if (DemoRecording)
{ {
@ -379,8 +379,8 @@ DemoTerm(VOID)
/////////////////////////////////////////// ///////////////////////////////////////////
VOID void
DemoPlayBack(VOID) DemoPlayBack(void)
{ {
int pnum, cnt; int pnum, cnt;
static int buf_ndx; static int buf_ndx;
@ -582,8 +582,8 @@ DemoPlayBack(VOID)
// Still using old method of playback - this was for opening demo // Still using old method of playback - this was for opening demo
// //
VOID void
ScenePlayBack(VOID) ScenePlayBack(void)
{ {
int buf_ndx, pnum, cnt; int buf_ndx, pnum, cnt;
PLAYERp pp; PLAYERp pp;

View file

@ -25,21 +25,21 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
extern FILE *DemoFile; extern FILE *DemoFile;
extern BOOL DemoPlaying; extern SWBOOL DemoPlaying;
extern BOOL DemoRecording; extern SWBOOL DemoRecording;
extern BOOL DemoEdit; extern SWBOOL DemoEdit;
extern BOOL DemoMode; extern SWBOOL DemoMode;
extern BOOL DemoOverride; extern SWBOOL DemoOverride;
extern char DemoFileName[16]; extern char DemoFileName[16];
extern char DemoLevelName[16]; extern char DemoLevelName[16];
extern FILE *DemoSyncFile; extern FILE *DemoSyncFile;
extern BOOL DemoSyncTest; extern SWBOOL DemoSyncTest;
extern BOOL DemoSyncRecord; extern SWBOOL DemoSyncRecord;
extern char DemoTmpName[16]; extern char DemoTmpName[16];
extern BOOL DemoDebugMode; extern SWBOOL DemoDebugMode;
extern BOOL DemoInitOnce; extern SWBOOL DemoInitOnce;
extern short DemoDebugBufferMax; extern short DemoDebugBufferMax;
#define DEMO_BUFFER_MAX 2048 #define DEMO_BUFFER_MAX 2048

View file

@ -462,7 +462,7 @@ DIGI_ENTRY("UNLOCK.VOC", DIGI_UNLOCK, 209, PRI_ENVIRONMENT,
// SQUEAKY VALVE TURNING // SQUEAKY VALVE TURNING
DIGI_ENTRY("VALVE.VOC", DIGI_SQUEAKYVALVE, 210, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL) DIGI_ENTRY("VALVE.VOC", DIGI_SQUEAKYVALVE, 210, PRI_ENVIRONMENT, 0, 0, 0, DIST_NORMAL, VF_NORMAL)
// SPOOKY ETHERAL VOID AMBIENCE // SPOOKY ETHERAL void AMBIENCE
//(NETHERWORLDLY SOUNDS) //(NETHERWORLDLY SOUNDS)
DIGI_ENTRY("VOID1.VOC", DIGI_VOID1, 211, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP) DIGI_ENTRY("VOID1.VOC", DIGI_VOID1, 211, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)
DIGI_ENTRY("VOID2.VOC", DIGI_VOID2, 212, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP) DIGI_ENTRY("VOID2.VOC", DIGI_VOID2, 212, PRI_AMBIENT, 0, 0, 0, DIST_NORMAL, VF_LOOP)

View file

@ -55,27 +55,27 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "sector.h" #include "sector.h"
static int OverlapDraw = FALSE; static int OverlapDraw = FALSE;
extern BOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet; extern SWBOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet;
extern BOOL Voxel; extern SWBOOL Voxel;
extern char tempbuf[]; extern char tempbuf[];
extern char buffer[]; extern char buffer[];
BOOL DrawScreen; SWBOOL DrawScreen;
extern short f_c; extern short f_c;
extern BOOL HelpInputMode; extern SWBOOL HelpInputMode;
extern short HelpPage; extern short HelpPage;
extern short HelpPagePic[]; extern short HelpPagePic[];
extern ParentalStruct aVoxelArray[MAXTILES]; extern ParentalStruct aVoxelArray[MAXTILES];
extern BOOL RedrawScreen; extern SWBOOL RedrawScreen;
BOOL RedrawCompass=FALSE; SWBOOL RedrawCompass=FALSE;
extern int Follow_posx,Follow_posy; extern int Follow_posx,Follow_posy;
int ConnectCopySprite(SPRITEp tsp); int ConnectCopySprite(SPRITEp tsp);
void PreDrawStackedWater(void); void PreDrawStackedWater(void);
VOID DrawCompass(PLAYERp pp); void DrawCompass(PLAYERp pp);
#if 1 #if 1
VOID void
ShadeSprite(SPRITEp tsp) ShadeSprite(SPRITEp tsp)
{ {
// set shade of sprite // set shade of sprite
@ -236,7 +236,7 @@ DoShadowFindGroundPoint(SPRITEp sp)
int ceilhit, florhit; int ceilhit, florhit;
int hiz, loz = u->loz; int hiz, loz = u->loz;
short save_cstat, bak_cstat; short save_cstat, bak_cstat;
BOOL found = FALSE; SWBOOL found = FALSE;
// recursive routine to find the ground - either sector or floor sprite // recursive routine to find the ground - either sector or floor sprite
// skips over enemy and other types of sprites // skips over enemy and other types of sprites
@ -290,8 +290,8 @@ DoShadowFindGroundPoint(SPRITEp sp)
#if 0 #if 0
#define GENERIC_SHADOW_PIC 66 #define GENERIC_SHADOW_PIC 66
extern BOOL bVoxelsOn; extern SWBOOL bVoxelsOn;
VOID void
DoVoxelShadow(SPRITEp tspr) DoVoxelShadow(SPRITEp tspr)
{ {
// Check for voxels // Check for voxels
@ -365,7 +365,7 @@ DoVoxelShadow(SPRITEp tspr)
} }
#endif #endif
VOID void
DoShadows(SPRITEp tsp, int viewz) DoShadows(SPRITEp tsp, int viewz)
{ {
SPRITEp new = &tsprite[spritesortcnt]; SPRITEp new = &tsprite[spritesortcnt];
@ -460,7 +460,7 @@ DoShadows(SPRITEp tsp, int viewz)
spritesortcnt++; spritesortcnt++;
} }
VOID void
DoMotionBlur(SPRITEp tsp) DoMotionBlur(SPRITEp tsp)
{ {
SPRITEp new; SPRITEp new;
@ -557,13 +557,13 @@ DoMotionBlur(SPRITEp tsp)
} }
VOID SetVoxelSprite(SPRITEp sp, short pic) void SetVoxelSprite(SPRITEp sp, short pic)
{ {
SET(sp->cstat, CSTAT_SPRITE_SLAB); SET(sp->cstat, CSTAT_SPRITE_SLAB);
sp->picnum = pic; sp->picnum = pic;
} }
VOID WarpCopySprite(VOID) void WarpCopySprite(void)
{ {
SPRITEp new, sp1, sp2, sp; SPRITEp new, sp1, sp2, sp;
short sn, nsn; short sn, nsn;
@ -642,7 +642,7 @@ VOID WarpCopySprite(VOID)
} }
} }
VOID DoStarView(SPRITEp tsp, USERp tu, int viewz) void DoStarView(SPRITEp tsp, USERp tu, int viewz)
{ {
extern STATE s_Star[], s_StarDown[]; extern STATE s_Star[], s_StarDown[];
extern STATE s_StarStuck[], s_StarDownStuck[]; extern STATE s_StarStuck[], s_StarDownStuck[];
@ -665,8 +665,8 @@ VOID DoStarView(SPRITEp tsp, USERp tu, int viewz)
} }
} }
VOID void
analyzesprites(int viewx, int viewy, int viewz, BOOL mirror) analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
{ {
int tSpriteNum, j, k; int tSpriteNum, j, k;
short SpriteNum, pnum; short SpriteNum, pnum;
@ -807,8 +807,8 @@ analyzesprites(int viewx, int viewy, int viewz, BOOL mirror)
{ {
// if sector pal is something other than default // if sector pal is something other than default
SECT_USERp sectu = SectUser[tsp->sectnum]; SECT_USERp sectu = SectUser[tsp->sectnum];
BYTE pal = sector[tsp->sectnum].floorpal; uint8_t pal = sector[tsp->sectnum].floorpal;
BOOL nosectpal=FALSE; SWBOOL nosectpal=FALSE;
// sprite does not take on the new pal if sector flag is set // sprite does not take on the new pal if sector flag is set
if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE)) if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE))
@ -987,7 +987,7 @@ get_tsprite(short SpriteNum)
return NULL; return NULL;
} }
VOID void
post_analyzesprites(void) post_analyzesprites(void)
{ {
int tSpriteNum; int tSpriteNum;
@ -1035,7 +1035,7 @@ post_analyzesprites(void)
} }
#endif #endif
VOID void
ResizeView(PLAYERp pp) ResizeView(PLAYERp pp)
{ {
if (MenuInputMode || InputMode || HelpInputMode || ConPanel || ConInputMode || PauseKeySet) if (MenuInputMode || InputMode || HelpInputMode || ConPanel || ConInputMode || PauseKeySet)
@ -1055,7 +1055,7 @@ ResizeView(PLAYERp pp)
if (KEY_PRESSED(KEYSC_ESC)) if (KEY_PRESSED(KEYSC_ESC))
{ {
extern BOOL ScrollMode2D; extern SWBOOL ScrollMode2D;
KEY_PRESSED(KEYSC_ESC) = 0; KEY_PRESSED(KEYSC_ESC) = 0;
dimensionmode = 3; dimensionmode = 3;
@ -1085,11 +1085,11 @@ ResizeView(PLAYERp pp)
} }
// !JIM! 08/06 // !JIM! 08/06
extern BOOL UsingMenus; extern SWBOOL UsingMenus;
#if 0 #if 0
VOID void
ViewOutsidePlayerRecurse(PLAYERp pp, LONGp vx, LONGp vy, LONGp vz, SHORTp ang, SHORTp vsectnum) ViewOutsidePlayerRecurse(PLAYERp pp, int32_t* vx, int32_t* vy, int32_t* vz, int16_t* ang, int16_t* vsectnum)
{ {
int nx, ny; int nx, ny;
int ret; int ret;
@ -1370,7 +1370,7 @@ CircleCamera(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz)
*nang = ang; *nang = ang;
} }
VOID PrintLocationInfo(PLAYERp pp) void PrintLocationInfo(PLAYERp pp)
{ {
#define Y_STEP 7 #define Y_STEP 7
#define AVERAGEFRAMES 16 #define AVERAGEFRAMES 16
@ -1405,15 +1405,15 @@ VOID PrintLocationInfo(PLAYERp pp)
sprintf(buffer, "POSZ:%d", pp->posz); sprintf(buffer, "POSZ:%d", pp->posz);
printext256(x, y, 1, -1, buffer, 1); printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP; y += Y_STEP;
sprintf(buffer, "ANG:%d", (LONG) pp->pang); sprintf(buffer, "ANG:%d", (int32_t) pp->pang);
printext256(x, y, 1, -1, buffer, 1); printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP; y += Y_STEP;
} }
} }
} }
BOOL DebugSecret = FALSE; SWBOOL DebugSecret = FALSE;
VOID SecretInfo(PLAYERp pp) void SecretInfo(PLAYERp pp)
{ {
#define Y_STEP 7 #define Y_STEP 7
#define AVERAGEFRAMES 16 #define AVERAGEFRAMES 16
@ -1437,7 +1437,7 @@ VOID SecretInfo(PLAYERp pp)
} }
} }
VOID PrintSpriteInfo(PLAYERp pp) void PrintSpriteInfo(PLAYERp pp)
{ {
#define Y_STEP 7 #define Y_STEP 7
int x = windowx1+2; int x = windowx1+2;
@ -1500,7 +1500,7 @@ VOID PrintSpriteInfo(PLAYERp pp)
sprintf(buffer, "POSZ:%d", sp->z); sprintf(buffer, "POSZ:%d", sp->z);
printext256(x, y, 1, -1, buffer, 1); printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP; y += Y_STEP;
sprintf(buffer, "ANG:%d", (LONG) sp->ang); sprintf(buffer, "ANG:%d", (int32_t) sp->ang);
printext256(x, y, 1, -1, buffer, 1); printext256(x, y, 1, -1, buffer, 1);
y += Y_STEP; y += Y_STEP;
} }
@ -1508,7 +1508,7 @@ VOID PrintSpriteInfo(PLAYERp pp)
} }
VOID SpriteSortList2D(int tx, int ty) void SpriteSortList2D(int tx, int ty)
{ {
SPRITEp sp; SPRITEp sp;
int i; int i;
@ -1666,7 +1666,7 @@ void ResChange(void)
} }
#endif #endif
VOID ScreenCaptureKeys(VOID) void ScreenCaptureKeys(void)
{ {
if (ConPanel) if (ConPanel)
return; return;
@ -1682,10 +1682,10 @@ VOID ScreenCaptureKeys(VOID)
} }
} }
VOID DrawCheckKeys(PLAYERp pp) void DrawCheckKeys(PLAYERp pp)
{ {
extern BOOL ResCheat; extern SWBOOL ResCheat;
extern BOOL PauseKeySet; extern SWBOOL PauseKeySet;
/* JonoF: Who really needs this now? /* JonoF: Who really needs this now?
if (KEY_PRESSED(KEYSC_F5) && !(KEY_PRESSED(KEYSC_RSHIFT) || KEY_PRESSED(KEYSC_LSHIFT) || KEY_PRESSED(KEYSC_ALT) || KEY_PRESSED(KEYSC_RALT)) && !PauseKeySet) if (KEY_PRESSED(KEYSC_F5) && !(KEY_PRESSED(KEYSC_RSHIFT) || KEY_PRESSED(KEYSC_LSHIFT) || KEY_PRESSED(KEYSC_ALT) || KEY_PRESSED(KEYSC_RALT)) && !PauseKeySet)
@ -1710,10 +1710,10 @@ VOID DrawCheckKeys(PLAYERp pp)
} }
#if 0 #if 0
VOID DrawMessageInput(PLAYERp pp) void DrawMessageInput(PLAYERp pp)
{ {
short w,h; short w,h;
static BOOL cur_show; static SWBOOL cur_show;
short c; short c;
// Used to make cursor fade in and out // Used to make cursor fade in and out
@ -1739,10 +1739,10 @@ VOID DrawMessageInput(PLAYERp pp)
} }
} }
#else #else
VOID DrawMessageInput(PLAYERp pp) void DrawMessageInput(PLAYERp pp)
{ {
short w,h; short w,h;
static BOOL cur_show; static SWBOOL cur_show;
short c; short c;
// Used to make cursor fade in and out // Used to make cursor fade in and out
@ -1767,12 +1767,12 @@ VOID DrawMessageInput(PLAYERp pp)
} }
#endif #endif
VOID DrawConInput(PLAYERp pp) void DrawConInput(PLAYERp pp)
{ {
#define PANELINPUTX 30 #define PANELINPUTX 30
#define PANELINPUTY 100 #define PANELINPUTY 100
short w,h; short w,h;
static BOOL cur_show; static SWBOOL cur_show;
short c; short c;
// Used to make cursor fade in and out // Used to make cursor fade in and out
@ -1798,10 +1798,10 @@ VOID DrawConInput(PLAYERp pp)
} }
} }
VOID DrawCrosshair(PLAYERp pp) void DrawCrosshair(PLAYERp pp)
{ {
extern int CrosshairX, CrosshairY; extern int CrosshairX, CrosshairY;
extern BOOL DemoMode,CameraTestMode; extern SWBOOL DemoMode,CameraTestMode;
if (!gs.Crosshair) if (!gs.Crosshair)
return; return;
@ -1891,10 +1891,10 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, short *t
int i,nexti; int i,nexti;
short ang; short ang;
SPRITEp sp; SPRITEp sp;
BOOL found_camera = FALSE; SWBOOL found_camera = FALSE;
BOOL player_in_camera = FALSE; SWBOOL player_in_camera = FALSE;
BOOL FAFcansee_test; SWBOOL FAFcansee_test;
BOOL ang_test; SWBOOL ang_test;
if (pp == &Player[screenpeek]) if (pp == &Player[screenpeek])
{ {
@ -2002,8 +2002,8 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, short *t
} }
} }
VOID void
PreDraw(VOID) PreDraw(void)
{ {
short i, nexti; short i, nexti;
@ -2015,8 +2015,8 @@ PreDraw(VOID)
} }
} }
VOID void
PostDraw(VOID) PostDraw(void)
{ {
short i, nexti; short i, nexti;
short sectnum,statnum; short sectnum,statnum;
@ -2243,10 +2243,10 @@ void FAF_DrawRooms(int x, int y, int z, short ang, int horiz, short sectnum)
short ScreenSavePic = FALSE; short ScreenSavePic = FALSE;
VOID void
drawscreen(PLAYERp pp) drawscreen(PLAYERp pp)
{ {
extern BOOL DemoMode,CameraTestMode; extern SWBOOL DemoMode,CameraTestMode;
int tx, ty, tz,thoriz,pp_siz; int tx, ty, tz,thoriz,pp_siz;
short tang,tsectnum; short tang,tsectnum;
short i,j; short i,j;
@ -2255,10 +2255,10 @@ drawscreen(PLAYERp pp)
int bob_amt = 0; int bob_amt = 0;
int quake_z, quake_x, quake_y; int quake_z, quake_x, quake_y;
short quake_ang; short quake_ang;
BOOL PicInView(short, BOOL); SWBOOL PicInView(short, SWBOOL);
extern BOOL FAF_DebugView; extern SWBOOL FAF_DebugView;
PLAYERp camerapp; // prediction player if prediction is on, else regular player PLAYERp camerapp; // prediction player if prediction is on, else regular player
VOID DoPlayerDiveMeter(PLAYERp pp); void DoPlayerDiveMeter(PLAYERp pp);
// last valid stuff // last valid stuff
static short lv_sectnum = -1; static short lv_sectnum = -1;
@ -2479,8 +2479,8 @@ drawscreen(PLAYERp pp)
if ((dimensionmode == 5 || dimensionmode == 6) && pp == Player+myconnectindex) if ((dimensionmode == 5 || dimensionmode == 6) && pp == Player+myconnectindex)
{ {
VOID MoveScrollMode2D(PLAYERp pp); void MoveScrollMode2D(PLAYERp pp);
extern BOOL ScrollMode2D; extern SWBOOL ScrollMode2D;
if (ScrollMode2D) if (ScrollMode2D)
{ {
@ -2575,7 +2575,7 @@ drawscreen(PLAYERp pp)
DrawScreen = FALSE; DrawScreen = FALSE;
} }
VOID void
DrawCompass(PLAYERp pp) DrawCompass(PLAYERp pp)
{ {
#define COMPASS_TIC 2380 #define COMPASS_TIC 2380
@ -2637,7 +2637,7 @@ DrawCompass(PLAYERp pp)
25, 19, 15, 9, 1, 1, 9, 15, 19, 25 25, 19, 15, 9, 1, 1, 9, 15, 19, 25
}; };
extern BOOL PanelUpdateMode; extern SWBOOL PanelUpdateMode;
if (!PanelUpdateMode) if (!PanelUpdateMode)
return; return;
@ -2671,12 +2671,12 @@ DrawCompass(PLAYERp pp)
} }
VOID ScreenTileLock(void) void ScreenTileLock(void)
{ {
walock[SAVE_SCREEN_TILE] = CACHE_LOCK_MAX; walock[SAVE_SCREEN_TILE] = CACHE_LOCK_MAX;
} }
VOID ScreenTileUnLock(void) void ScreenTileUnLock(void)
{ {
walock[SAVE_SCREEN_TILE] = CACHE_UNLOCK_MAX; walock[SAVE_SCREEN_TILE] = CACHE_UNLOCK_MAX;
} }

File diff suppressed because it is too large Load diff

View file

@ -68,7 +68,7 @@ void _Assert(char *, char *, unsigned);
void dsprintf(char *, char *, ...); void dsprintf(char *, char *, ...);
#define DSPRINTF dsprintf #define DSPRINTF dsprintf
VOID PokeStringMono(BYTE Attr, BYTEp String); void PokeStringMono(uint8_t Attr, uint8_t* String);
#if 1 // !JIM! Frank, I redirect this for me you'll want to set this back for you #if 1 // !JIM! Frank, I redirect this for me you'll want to set this back for you
extern int DispMono; extern int DispMono;
@ -152,11 +152,11 @@ y++
// //
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
extern BOOL MenuInputMode; extern SWBOOL MenuInputMode;
extern BOOL MessageInputMode; extern SWBOOL MessageInputMode;
extern BOOL ConInputMode; extern SWBOOL ConInputMode;
extern BOOL ConPanel; extern SWBOOL ConPanel;
extern BOOL InputMode; extern SWBOOL InputMode;
extern char MessageInputString[256]; extern char MessageInputString[256];
extern char MessageOutputString[256]; extern char MessageOutputString[256];
@ -305,25 +305,25 @@ extern char MessageOutputString[256];
// #define PKEY(num) KEY_PRESSED(keys[num]) // #define PKEY(num) KEY_PRESSED(keys[num])
#define MK_FIXED(msw,lsw) (((LONG)(msw)<<16)|(lsw)) #define MK_FIXED(msw,lsw) (((int32_t)(msw)<<16)|(lsw))
#define FIXED(msw,lsw) MK_FIXED(msw,lsw) #define FIXED(msw,lsw) MK_FIXED(msw,lsw)
#if B_LITTLE_ENDIAN != 0 #if B_LITTLE_ENDIAN != 0
# define MSW_VAR(fixed) (*(((USHORTp)&(fixed)) + 1)) # define MSW_VAR(fixed) (*(((uint16_t*)&(fixed)) + 1))
# define LSW_VAR(fixed) (*((USHORTp)&(fixed))) # define LSW_VAR(fixed) (*((uint16_t*)&(fixed)))
# define MSB_VAR(fixed) (*(((BYTEp)&(fixed)) + 1)) # define MSB_VAR(fixed) (*(((uint8_t*)&(fixed)) + 1))
# define LSB_VAR(fixed) (*((BYTEp)&(fixed))) # define LSB_VAR(fixed) (*((uint8_t*)&(fixed)))
#else #else
# define LSW_VAR(fixed) (*(((USHORTp)&(fixed)) + 1)) # define LSW_VAR(fixed) (*(((uint16_t*)&(fixed)) + 1))
# define MSW_VAR(fixed) (*((USHORTp)&(fixed))) # define MSW_VAR(fixed) (*((uint16_t*)&(fixed)))
# define LSB_VAR(fixed) (*(((BYTEp)&(fixed)) + 1)) # define LSB_VAR(fixed) (*(((uint8_t*)&(fixed)) + 1))
# define MSB_VAR(fixed) (*((BYTEp)&(fixed))) # define MSB_VAR(fixed) (*((uint8_t*)&(fixed)))
#endif #endif
#define MSW(fixed) ((fixed)>>16) #define MSW(fixed) ((fixed)>>16)
#define LSW(fixed) (((SHORT)(fixed))) #define LSW(fixed) (((int16_t)(fixed)))
// Defines for reading in ST1 sprite tagging // Defines for reading in ST1 sprite tagging
#define SP_TAG1(sp) ((sp)->hitag) #define SP_TAG1(sp) ((sp)->hitag)
@ -453,12 +453,12 @@ int StdRandomRange(int range);
// x & y offset of tile // x & y offset of tile
#define TILE_XOFF(picnum) ((CHAR)TEST(picanm[(picnum)] >> 8, 0xFF)) #define TILE_XOFF(picnum) ((int8_t)TEST(picanm[(picnum)] >> 8, 0xFF))
#define TILE_YOFF(picnum) ((CHAR)TEST(picanm[(picnum)] >> 16, 0xFF)) #define TILE_YOFF(picnum) ((int8_t)TEST(picanm[(picnum)] >> 16, 0xFF))
// x & y offset of current sprite tile // x & y offset of current sprite tile
#define SPRITEp_XOFF(sp) ((CHAR)TEST(picanm[(sp)->picnum] >> 8, 0xFF)) #define SPRITEp_XOFF(sp) ((int8_t)TEST(picanm[(sp)->picnum] >> 8, 0xFF))
#define SPRITEp_YOFF(sp) ((CHAR)TEST(picanm[(sp)->picnum] >> 16, 0xFF)) #define SPRITEp_YOFF(sp) ((int8_t)TEST(picanm[(sp)->picnum] >> 16, 0xFF))
// Z size of top (TOS) and bottom (BOS) part of sprite // Z size of top (TOS) and bottom (BOS) part of sprite
#define SPRITEp_SIZE_TOS(sp) (DIV2(SPRITEp_SIZE_Z(sp)) + Z(SPRITEp_YOFF(sp))) #define SPRITEp_SIZE_TOS(sp) (DIV2(SPRITEp_SIZE_Z(sp)) + Z(SPRITEp_YOFF(sp)))
@ -789,7 +789,7 @@ typedef struct PANEL_SPRITEstruct PANEL_SPRITE, *PANEL_SPRITEp;
struct ANIMstruct; struct ANIMstruct;
typedef struct ANIMstruct ANIM, *ANIMp; typedef struct ANIMstruct ANIM, *ANIMp;
typedef int ANIMATOR (SHORT SpriteNum); typedef int ANIMATOR (int16_t SpriteNum);
typedef ANIMATOR *ANIMATORp; typedef ANIMATOR *ANIMATORp;
typedef void pANIMATOR (PANEL_SPRITEp); typedef void pANIMATOR (PANEL_SPRITEp);
@ -828,8 +828,8 @@ struct STATEstruct
typedef enum {WATER_FOOT, BLOOD_FOOT} FOOT_TYPE; typedef enum {WATER_FOOT, BLOOD_FOOT} FOOT_TYPE;
extern FOOT_TYPE FootMode; extern FOOT_TYPE FootMode;
extern BOOL InGame; // Declared in game.c extern SWBOOL InGame; // Declared in game.c
extern BOOL Global_PLock; // Game.c extern SWBOOL Global_PLock; // Game.c
int QueueFloorBlood(short hitsprite); // Weapon.c int QueueFloorBlood(short hitsprite); // Weapon.c
int QueueFootPrint(short hitsprite); // Weapon.c int QueueFootPrint(short hitsprite); // Weapon.c
int QueueGeneric(short SpriteNum, short pic); // Weapon.c int QueueGeneric(short SpriteNum, short pic); // Weapon.c
@ -850,7 +850,7 @@ extern int PlayerGetItemVocs[MAX_GETSOUNDS];
#define MAX_YELLSOUNDS 3 #define MAX_YELLSOUNDS 3
extern int PlayerYellVocs[MAX_YELLSOUNDS]; extern int PlayerYellVocs[MAX_YELLSOUNDS];
VOID BossHealthMeter(void); void BossHealthMeter(void);
// Global variables used for modifying variouse things from the Console // Global variables used for modifying variouse things from the Console
@ -864,8 +864,8 @@ extern int DLL_Handle; // Global DLL handle
extern char *DLL_path; // DLL path name extern char *DLL_path; // DLL path name
int DLL_Load(char *DLLpathname); int DLL_Load(char *DLLpathname);
BOOL DLL_Unload(int procHandle); SWBOOL DLL_Unload(int procHandle);
BOOL DLL_ExecFunc(int procHandle, char *fName); SWBOOL DLL_ExecFunc(int procHandle, char *fName);
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
// //
@ -898,9 +898,9 @@ void addconquote(char *daquote);
void CON_Message(const char *message, ...) PRINTF_FORMAT(1, 2); void CON_Message(const char *message, ...) PRINTF_FORMAT(1, 2);
void CON_ConMessage(const char *message, ...) PRINTF_FORMAT(1, 2); void CON_ConMessage(const char *message, ...) PRINTF_FORMAT(1, 2);
void CON_StoreArg(const char *userarg); void CON_StoreArg(const char *userarg);
BOOL CON_CheckParm(const char *userarg); SWBOOL CON_CheckParm(const char *userarg);
void CON_CommandHistory(signed char dir); void CON_CommandHistory(signed char dir);
BOOL CON_AddCommand(const char *command, void (*function)(void)); SWBOOL CON_AddCommand(const char *command, void (*function)(void));
void CON_ProcessUserCommand(void); void CON_ProcessUserCommand(void);
void CON_InitConsole(void); void CON_InitConsole(void);
@ -911,13 +911,13 @@ void CON_InitConsole(void);
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
void CDAudio_Eject(void); void CDAudio_Eject(void);
BYTE CDAudio_GetVolume(void); uint8_t CDAudio_GetVolume(void);
void CDAudio_SetVolume(BYTE volume); void CDAudio_SetVolume(uint8_t volume);
void CDAudio_Play(BYTE track, BOOL looping); void CDAudio_Play(uint8_t track, SWBOOL looping);
void CDAudio_Stop(void); void CDAudio_Stop(void);
void CDAudio_Resume(void); void CDAudio_Resume(void);
void CDAudio_Update(void); void CDAudio_Update(void);
BOOL CDAudio_Playing(void); SWBOOL CDAudio_Playing(void);
int CDAudio_Init(void); int CDAudio_Init(void);
void CDAudio_Shutdown(void); void CDAudio_Shutdown(void);
@ -939,17 +939,17 @@ void CDAudio_Shutdown(void);
typedef struct typedef struct
{ {
VOID (*Init)(PLAYERp); void (*Init)(PLAYERp);
SHORT damage_lo; int16_t damage_lo;
SHORT damage_hi; int16_t damage_hi;
unsigned int radius; unsigned int radius;
SHORT max_ammo; int16_t max_ammo;
SHORT min_ammo; int16_t min_ammo;
SHORT with_weapon; int16_t with_weapon;
char *weapon_name; char *weapon_name;
char *ammo_name; char *ammo_name;
SHORT weapon_pickup; int16_t weapon_pickup;
SHORT ammo_pickup; int16_t ammo_pickup;
} DAMAGE_DATA, *DAMAGE_DATAp; } DAMAGE_DATA, *DAMAGE_DATAp;
extern DAMAGE_DATA DamageData[]; extern DAMAGE_DATA DamageData[];
@ -958,24 +958,24 @@ extern DAMAGE_DATA DamageData[];
extern int WeaponHasNoAmmo, WeaponIsAmmo; extern int WeaponHasNoAmmo, WeaponIsAmmo;
VOID InitWeaponFist(PLAYERp); void InitWeaponFist(PLAYERp);
VOID InitWeaponStar(PLAYERp); void InitWeaponStar(PLAYERp);
VOID InitWeaponShotgun(PLAYERp); void InitWeaponShotgun(PLAYERp);
VOID InitWeaponRocket(PLAYERp); void InitWeaponRocket(PLAYERp);
VOID InitWeaponRail(PLAYERp); void InitWeaponRail(PLAYERp);
VOID InitWeaponMicro(PLAYERp); void InitWeaponMicro(PLAYERp);
VOID InitWeaponUzi(PLAYERp); void InitWeaponUzi(PLAYERp);
VOID InitWeaponSword(PLAYERp); void InitWeaponSword(PLAYERp);
VOID InitWeaponHothead(PLAYERp); void InitWeaponHothead(PLAYERp);
VOID InitWeaponElectro(PLAYERp); void InitWeaponElectro(PLAYERp);
VOID InitWeaponHeart(PLAYERp); void InitWeaponHeart(PLAYERp);
VOID InitWeaponGrenade(PLAYERp); void InitWeaponGrenade(PLAYERp);
VOID InitWeaponMine(PLAYERp); void InitWeaponMine(PLAYERp);
VOID InitWeaponNapalm(PLAYERp); void InitWeaponNapalm(PLAYERp);
VOID InitWeaponRing(PLAYERp); void InitWeaponRing(PLAYERp);
extern VOID (*InitWeapon[MAX_WEAPONS]) (PLAYERp); extern void (*InitWeapon[MAX_WEAPONS]) (PLAYERp);
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
// //
@ -1033,18 +1033,18 @@ extern char *KeyDoorMessage[MAX_KEYS];
typedef struct typedef struct
{ {
SHORT vel; int16_t vel;
SHORT svel; int16_t svel;
CHAR angvel; int8_t angvel;
CHAR aimvel; int8_t aimvel;
LONG bits; int32_t bits;
} SW_PACKET; } SW_PACKET;
extern SW_PACKET loc; extern SW_PACKET loc;
#define PACK 1 #define PACK 1
extern BOOL CameraTestMode; extern SWBOOL CameraTestMode;
enum PlayerDeathTypes enum PlayerDeathTypes
{ {
@ -1162,7 +1162,7 @@ struct PLAYERstruct
// TENSW: on really bad network connections, the sync FIFO queue can overflow if it is the // TENSW: on really bad network connections, the sync FIFO queue can overflow if it is the
// same size as the move fifo. // same size as the move fifo.
#define SYNCFIFOSIZ 1024 #define SYNCFIFOSIZ 1024
BYTE syncval[SYNCFIFOSIZ][MAXSYNCBYTES]; uint8_t syncval[SYNCFIFOSIZ][MAXSYNCBYTES];
// must start out as 0 // must start out as 0
int playerreadyflag; int playerreadyflag;
@ -1210,8 +1210,8 @@ struct PLAYERstruct
PANEL_SPRITEp MiniBarHealthBoxDigit[3], MiniBarAmmoDigit[3]; PANEL_SPRITEp MiniBarHealthBoxDigit[3], MiniBarAmmoDigit[3];
short InventoryTics[MAX_INVENTORY]; short InventoryTics[MAX_INVENTORY];
short InventoryPercent[MAX_INVENTORY]; short InventoryPercent[MAX_INVENTORY];
CHAR InventoryAmount[MAX_INVENTORY]; int8_t InventoryAmount[MAX_INVENTORY];
BOOL InventoryActive[MAX_INVENTORY]; SWBOOL InventoryActive[MAX_INVENTORY];
short DiveTics; short DiveTics;
short DiveDamageTics; short DiveDamageTics;
@ -1237,14 +1237,14 @@ struct PLAYERstruct
// palette fading up and down for player hit and get items // palette fading up and down for player hit and get items
short FadeTics; // Tics between each fade cycle short FadeTics; // Tics between each fade cycle
short FadeAmt; // Current intensity of fade short FadeAmt; // Current intensity of fade
BOOL NightVision; // Is player's night vision active? SWBOOL NightVision; // Is player's night vision active?
unsigned char StartColor; // Darkest color in color range being used unsigned char StartColor; // Darkest color in color range being used
//short electro[64]; //short electro[64];
unsigned char temp_pal[768]; // temporary working palette unsigned char temp_pal[768]; // temporary working palette
BOOL IsAI; // Is this and AI character? SWBOOL IsAI; // Is this and AI character?
short fta,ftq; // First time active and first time quote, for talking in multiplayer games short fta,ftq; // First time active and first time quote, for talking in multiplayer games
short NumFootPrints; // Number of foot prints left to lay down short NumFootPrints; // Number of foot prints left to lay down
BOOL PlayerTalking; // Is player currently talking SWBOOL PlayerTalking; // Is player currently talking
int TalkVocnum; // Number of sound that player is using int TalkVocnum; // Number of sound that player is using
int TalkVocHandle; // Handle of sound in sound queue, to access in Dose's code int TalkVocHandle; // Handle of sound in sound queue, to access in Dose's code
unsigned char WpnUziType; // Toggle between single or double uzi's if you own 2. unsigned char WpnUziType; // Toggle between single or double uzi's if you own 2.
@ -1252,14 +1252,14 @@ struct PLAYERstruct
unsigned char WpnShotgunAuto; // 50-0 automatic shotgun rounds unsigned char WpnShotgunAuto; // 50-0 automatic shotgun rounds
unsigned char WpnShotgunLastShell; // Number of last shell fired unsigned char WpnShotgunLastShell; // Number of last shell fired
unsigned char WpnRailType; // Normal Rail Gun or EMP Burst Mode unsigned char WpnRailType; // Normal Rail Gun or EMP Burst Mode
BOOL Bloody; // Is player gooey from the slaughter? SWBOOL Bloody; // Is player gooey from the slaughter?
int nukevochandle; // Stuff for the Nuke int nukevochandle; // Stuff for the Nuke
BOOL InitingNuke; SWBOOL InitingNuke;
BOOL TestNukeInit; SWBOOL TestNukeInit;
BOOL NukeInitialized; // Nuke already has counted down SWBOOL NukeInitialized; // Nuke already has counted down
short FistAng; // KungFu attack angle short FistAng; // KungFu attack angle
unsigned char WpnKungFuMove; // KungFu special moves unsigned char WpnKungFuMove; // KungFu special moves
BOOL BunnyMode; // Can shoot Bunnies out of rocket launcher SWBOOL BunnyMode; // Can shoot Bunnies out of rocket launcher
short HitBy; // SpriteNum of whatever player was last hit by short HitBy; // SpriteNum of whatever player was last hit by
short Reverb; // Player's current reverb setting short Reverb; // Player's current reverb setting
short Heads; // Number of Accursed Heads orbiting player short Heads; // Number of Accursed Heads orbiting player
@ -1396,7 +1396,7 @@ typedef struct
// wall vars for lighting // wall vars for lighting
int WallCount; int WallCount;
CHARp WallShade; // malloced - save off wall shades for lighting int8_t* WallShade; // malloced - save off wall shades for lighting
WALLp WallP; // operate on wall instead of sprite WALLp WallP; // operate on wall instead of sprite
STATEp State; STATEp State;
@ -1465,7 +1465,7 @@ typedef struct
// velocity // velocity
int vel_tgt; int vel_tgt;
short vel_rate; short vel_rate;
BYTE speed; // Ordinal Speed Range 0-3 from slow to fast uint8_t speed; // Ordinal Speed Range 0-3 from slow to fast
short Counter; short Counter;
short Counter2; short Counter2;
@ -1528,8 +1528,8 @@ typedef struct
// Need to get rid of these flags // Need to get rid of these flags
int Flag1; int Flag1;
CHAR LastWeaponNum; int8_t LastWeaponNum;
CHAR WeaponNum; int8_t WeaponNum;
short bounce; // count bounces off wall for killing shrap stuff short bounce; // count bounces off wall for killing shrap stuff
// !JIM! my extensions // !JIM! my extensions
@ -1537,7 +1537,7 @@ typedef struct
// Shell gets deleted when ShellNum < (ShellCount - MAXSHELLS) // Shell gets deleted when ShellNum < (ShellCount - MAXSHELLS)
short FlagOwner; // The spritenum of the original flag short FlagOwner; // The spritenum of the original flag
short Vis; // Shading upgrade, for shooting, etc... short Vis; // Shading upgrade, for shooting, etc...
BOOL DidAlert; // Has actor done his alert noise before? SWBOOL DidAlert; // Has actor done his alert noise before?
} USER,*USERp; } USER,*USERp;
// sprite->extra flags // sprite->extra flags
@ -1787,7 +1787,7 @@ typedef struct
speed, speed,
damage, damage,
number; // usually used for matching number number; // usually used for matching number
BYTE flags2; uint8_t flags2;
} SECT_USER, *SECT_USERp; } SECT_USER, *SECT_USERp;
extern SECT_USERp SectUser[MAXSECTORS]; extern SECT_USERp SectUser[MAXSECTORS];
@ -1799,11 +1799,11 @@ typedef struct
unsigned int size, checksum; unsigned int size, checksum;
} MEM_HDR,*MEM_HDRp; } MEM_HDR,*MEM_HDRp;
BOOL ValidPtr(VOID *ptr); SWBOOL ValidPtr(void *ptr);
VOID *AllocMem(int size); void *AllocMem(int size);
VOID *CallocMem(int size, int num); void *CallocMem(int size, int num);
VOID *ReAllocMem(VOID *ptr, int size); void *ReAllocMem(void *ptr, int size);
VOID FreeMem(VOID *ptr); void FreeMem(void *ptr);
typedef struct typedef struct
{ {
@ -1921,7 +1921,7 @@ typedef struct
typedef struct typedef struct
{ {
BYTE FromRange,ToRange,FromColor,ToColor; uint8_t FromRange,ToRange,FromColor,ToColor;
} COLOR_MAP, *COLOR_MAPp; } COLOR_MAP, *COLOR_MAPp;
#define MAX_TRACKS 100 #define MAX_TRACKS 100
@ -2095,17 +2095,17 @@ extern SECTOR_OBJECT SectorObject[MAX_SECTOR_OBJECTS];
ANIMATOR NullAnimator; ANIMATOR NullAnimator;
VOID SetBorder(PLAYERp pp, int); void SetBorder(PLAYERp pp, int);
VOID SetFragBar(PLAYERp pp); void SetFragBar(PLAYERp pp);
int Distance(int x1, int y1, int x2, int y2); int Distance(int x1, int y1, int x2, int y2);
short GetDeltaAngle(short, short); short GetDeltaAngle(short, short);
int SetActorRotation(short SpriteNum,int,int); int SetActorRotation(short SpriteNum,int,int);
int NewStateGroup(short SpriteNum, STATEp SpriteGroup[]); int NewStateGroup(short SpriteNum, STATEp SpriteGroup[]);
VOID SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid); void SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid);
USERp SpawnUser(short SpriteNum, short id, STATEp state); USERp SpawnUser(short SpriteNum, short id, STATEp state);
short ActorFindTrack(short SpriteNum, CHAR player_dir, int track_type, short *track_point_num, short *track_dir); short ActorFindTrack(short SpriteNum, int8_t player_dir, int track_type, short *track_point_num, short *track_dir);
SECT_USERp GetSectUser(short sectnum); SECT_USERp GetSectUser(short sectnum);
@ -2119,14 +2119,14 @@ ANIMATOR DoActorBeginJump,DoActorJump,DoActorBeginFall,DoActorFall,DoActorDeathM
int SpawnShrap(short,short); int SpawnShrap(short,short);
VOID PlayerUpdateHealth(PLAYERp pp, short value); void PlayerUpdateHealth(PLAYERp pp, short value);
VOID PlayerUpdateAmmo(PLAYERp pp, short WeaponNum, short value); void PlayerUpdateAmmo(PLAYERp pp, short WeaponNum, short value);
VOID PlayerUpdateWeapon(PLAYERp pp, short WeaponNum); void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum);
VOID PlayerUpdateKills(PLAYERp pp, short value); void PlayerUpdateKills(PLAYERp pp, short value);
VOID PlayerUpdatePanelInfo(PLAYERp pp); void PlayerUpdatePanelInfo(PLAYERp pp);
VOID RefreshInfoLine(PLAYERp pp); void RefreshInfoLine(PLAYERp pp);
VOID DoAnim(int numtics); void DoAnim(int numtics);
void AnimDelete(int *animptr); void AnimDelete(int *animptr);
short AnimGetGoal(int *animptr); short AnimGetGoal(int *animptr);
short AnimSet(int *animptr, int thegoal, int thevel); short AnimSet(int *animptr, int thegoal, int thevel);
@ -2134,23 +2134,23 @@ short AnimSet(int *animptr, int thegoal, int thevel);
short AnimSetCallback(short anim_ndx, ANIM_CALLBACKp call, ANIM_DATAp data); short AnimSetCallback(short anim_ndx, ANIM_CALLBACKp call, ANIM_DATAp data);
short AnimSetVelAdj(short anim_ndx, short vel_adj); short AnimSetVelAdj(short anim_ndx, short vel_adj);
VOID EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person); void EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp person);
VOID getzrangepoint(int x, int y, int z, short sectnum, LONGp ceilz, LONGp ceilhit, LONGp florz, LONGp florhit); void getzrangepoint(int x, int y, int z, short sectnum, int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit);
int move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics); int move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
int move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics); int move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics);
int DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets); int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets);
VOID change_sprite_stat(short, short); void change_sprite_stat(short, short);
VOID SetOwner(short, short); void SetOwner(short, short);
VOID SetAttach(short, short); void SetAttach(short, short);
VOID analyzesprites(int,int,int,BOOL); void analyzesprites(int,int,int,SWBOOL);
VOID ChangeState(short SpriteNum, STATEp statep); void ChangeState(short SpriteNum, STATEp statep);
VOID UpdateSectorFAF_Connect(short SpriteNum, int newz); void UpdateSectorFAF_Connect(short SpriteNum, int newz);
#if 0 #if 0
BOOL FAF_ConnectCeiling(short sectnum); SWBOOL FAF_ConnectCeiling(short sectnum);
BOOL FAF_ConnectFloor(short sectnum); SWBOOL FAF_ConnectFloor(short sectnum);
#else #else
#define FAF_PLACE_MIRROR_PIC 341 #define FAF_PLACE_MIRROR_PIC 341
#define FAF_MIRROR_PIC 2356 #define FAF_MIRROR_PIC 2356
@ -2159,30 +2159,30 @@ BOOL FAF_ConnectFloor(short sectnum);
#define FAF_ConnectArea(sectnum) (FAF_ConnectCeiling(sectnum) || FAF_ConnectFloor(sectnum)) #define FAF_ConnectArea(sectnum) (FAF_ConnectCeiling(sectnum) || FAF_ConnectFloor(sectnum))
#endif #endif
void updatesectorz(int, int, int, short *); void updatesectorz(int, int, int, short *);
VOID FAF_ConnectPlayerCeiling(PLAYERp pp); void FAF_ConnectPlayerCeiling(PLAYERp pp);
VOID FAF_ConnectPlayerFloor(PLAYERp pp); void FAF_ConnectPlayerFloor(PLAYERp pp);
BOOL PlayerCeilingHit(PLAYERp pp, int zlimit); SWBOOL PlayerCeilingHit(PLAYERp pp, int zlimit);
BOOL PlayerFloorHit(PLAYERp pp, int zlimit); SWBOOL PlayerFloorHit(PLAYERp pp, int zlimit);
VOID FAFhitscan(LONG x, LONG y, LONG z, SHORT sectnum, void FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONG xvect, LONG yvect, LONG zvect, int32_t xvect, int32_t yvect, int32_t zvect,
SHORTp hitsect, SHORTp hitwall, SHORTp hitsprite, int16_t* hitsect, int16_t* hitwall, int16_t* hitsprite,
LONGp hitx, LONGp hity, LONGp hitz, LONG clipmask); int32_t* hitx, int32_t* hity, int32_t* hitz, int32_t clipmask);
BOOL FAFcansee(LONG xs, LONG ys, LONG zs, SHORT sects, LONG xe, LONG ye, LONG ze, SHORT secte); SWBOOL FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects, int32_t xe, int32_t ye, int32_t ze, int16_t secte);
VOID FAFgetzrange(LONG x, LONG y, LONG z, SHORT sectnum, void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONGp hiz, LONGp ceilhit, int32_t* hiz, int32_t* ceilhit,
LONGp loz, LONGp florhit, int32_t* loz, int32_t* florhit,
LONG clipdist, LONG clipmask); int32_t clipdist, int32_t clipmask);
VOID FAFgetzrangepoint(LONG x, LONG y, LONG z, SHORT sectnum, void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONGp hiz, LONGp ceilhit, int32_t* hiz, int32_t* ceilhit,
LONGp loz, LONGp florhit); int32_t* loz, int32_t* florhit);
VOID COVERupdatesector(LONG x, LONG y, SHORTp newsector); void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector);
void updatesectorz(int,int,int,SHORTp); void updatesectorz(int,int,int,int16_t*);
extern int clipmoveboxtracenum; extern int clipmoveboxtracenum;
@ -2199,7 +2199,7 @@ enum SoundType
SOUND_EVERYTHING_TYPE SOUND_EVERYTHING_TYPE
}; };
VOID DoSoundSpotMatch(short match, short sound_num, short sound_type); void DoSoundSpotMatch(short match, short sound_num, short sound_type);
#define ACTOR_GRAVITY 8 #define ACTOR_GRAVITY 8
@ -2209,10 +2209,10 @@ VOID DoSoundSpotMatch(short match, short sound_num, short sound_type);
// //
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
extern BOOL ExitLevel; extern SWBOOL ExitLevel;
extern BOOL Warping; extern SWBOOL Warping;
extern BYTE CommPlayers; extern uint8_t CommPlayers;
extern BOOL CommEnabled; extern SWBOOL CommEnabled;
extern char CommPlayerName[]; extern char CommPlayerName[];
extern short Level; extern short Level;
extern short Episode; extern short Episode;
@ -2287,7 +2287,7 @@ void sendlogoff(void);
/////////////////////////// ///////////////////////////
extern int ototalclock, save_totalclock, gotlastpacketclock,smoothratio; extern int ototalclock, save_totalclock, gotlastpacketclock,smoothratio;
extern BOOL ready2send; extern SWBOOL ready2send;
// local copy of variables updated by faketimerhandler // local copy of variables updated by faketimerhandler
extern int locselectedgun; extern int locselectedgun;
@ -2296,7 +2296,7 @@ extern int locselectedgun;
extern int movefifoplc, movefifoend[]; extern int movefifoplc, movefifoend[];
extern BOOL MoveSkip4, MoveSkip2, MoveSkip8; extern SWBOOL MoveSkip4, MoveSkip2, MoveSkip8;
#define MASTER_SWITCHING 1 #define MASTER_SWITCHING 1
@ -2309,7 +2309,7 @@ extern int dimensionmode, zoom;
extern int vel,svel,angvel; extern int vel,svel,angvel;
#define STAT_DAMAGE_LIST_SIZE 20 #define STAT_DAMAGE_LIST_SIZE 20
extern SHORT StatDamageList[STAT_DAMAGE_LIST_SIZE]; extern int16_t StatDamageList[STAT_DAMAGE_LIST_SIZE];
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// //
@ -2321,7 +2321,7 @@ extern SHORT StatDamageList[STAT_DAMAGE_LIST_SIZE];
extern void SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor); extern void SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor);
extern void DoPaletteFlash(PLAYERp pp); extern void DoPaletteFlash(PLAYERp pp);
extern unsigned char palette_data[256][3]; extern unsigned char palette_data[256][3];
extern BOOL NightVision; extern SWBOOL NightVision;
#endif #endif
int _PlayerSound(char *file, int line, int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp); int _PlayerSound(char *file, int line, int num, int *x, int *y, int *z, Voc3D_Flags flags, PLAYERp pp);
@ -2340,24 +2340,24 @@ int PickJumpMaxSpeed(short SpriteNum, short max_speed); // ripper.c
int DoRipperRipHeart(short SpriteNum); // ripper.c int DoRipperRipHeart(short SpriteNum); // ripper.c
int DoRipper2RipHeart(short SpriteNum); // ripper2.c int DoRipper2RipHeart(short SpriteNum); // ripper2.c
int BunnyHatch2(short Weapon); // bunny.c int BunnyHatch2(short Weapon); // bunny.c
int DoSkullBeginDeath(SHORT SpriteNum); // skull.c int DoSkullBeginDeath(int16_t SpriteNum); // skull.c
void AnimateCacheCursor(void); // game.c void AnimateCacheCursor(void); // game.c
void MapSetAll2D(BYTE fill); // game.c void MapSetAll2D(uint8_t fill); // game.c
void TerminateGame(void); // game.c void TerminateGame(void); // game.c
void TerminateLevel(void); // game.c void TerminateLevel(void); // game.c
void ResetKeys(void); // game.c void ResetKeys(void); // game.c
BOOL KeyPressed(void); // game.c SWBOOL KeyPressed(void); // game.c
void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c void drawoverheadmap(int cposx,int cposy,int czoom,short cang); // game.c
void COVERsetbrightness(int bright, unsigned char *pal); // game.c void COVERsetbrightness(int bright, unsigned char *pal); // game.c
void DrawMenuLevelScreen(void); // game.c void DrawMenuLevelScreen(void); // game.c
VOID DebugWriteString(char *string); // game.c void DebugWriteString(char *string); // game.c
VOID ManualPlayerInsert(PLAYERp pp); // game.c void ManualPlayerInsert(PLAYERp pp); // game.c
VOID SetRedrawScreen(PLAYERp pp); // border.c void SetRedrawScreen(PLAYERp pp); // border.c
void SetupAspectRatio(void); // border.c void SetupAspectRatio(void); // border.c
VOID ClearStartMost(VOID); // border.c void ClearStartMost(void); // border.c
VOID SetCrosshair(VOID); // border.c void SetCrosshair(void); // border.c
void initsynccrc(void); // sync.c void initsynccrc(void); // sync.c
void demosync_record(void); // sync.c void demosync_record(void); // sync.c
@ -2368,14 +2368,14 @@ void SyncStatMessage(void); // sync.c
void drawscreen(PLAYERp pp); // draw.c void drawscreen(PLAYERp pp); // draw.c
void post_analyzesprites(void); // draw.c void post_analyzesprites(void); // draw.c
int COVERsetgamemode(int mode, int xdim, int ydim, int bpp); // draw.c int COVERsetgamemode(int mode, int xdim, int ydim, int bpp); // draw.c
VOID ScreenCaptureKeys(VOID); // draw.c void ScreenCaptureKeys(void); // draw.c
int minigametext(int x,int y,char *t,char s,short dabits); // jplayer.c int minigametext(int x,int y,char *t,char s,short dabits); // jplayer.c
void computergetinput(int snum,SW_PACKET *syn); // jplayer.c void computergetinput(int snum,SW_PACKET *syn); // jplayer.c
void DrawOverlapRoom(int tx,int ty,int tz,short tang,int thoriz,short tsectnum); // rooms.c void DrawOverlapRoom(int tx,int ty,int tz,short tang,int thoriz,short tsectnum); // rooms.c
void SetupMirrorTiles(void); // rooms.c void SetupMirrorTiles(void); // rooms.c
BOOL FAF_Sector(short sectnum); // rooms.c SWBOOL FAF_Sector(short sectnum); // rooms.c
int GetZadjustment(short sectnum,short hitag); // rooms.c int GetZadjustment(short sectnum,short hitag); // rooms.c
void TermSetup(void); // swconfig.c void TermSetup(void); // swconfig.c
@ -2391,7 +2391,7 @@ void EveryCheatToggle(PLAYERp pp,char *cheat_string); // cheats.c
int PlayerInitChemBomb(PLAYERp pp); // jweapon.c int PlayerInitChemBomb(PLAYERp pp); // jweapon.c
int PlayerInitFlashBomb(PLAYERp pp); // jweapon.c int PlayerInitFlashBomb(PLAYERp pp); // jweapon.c
int PlayerInitCaltrops(PLAYERp pp); // jweapon.c int PlayerInitCaltrops(PLAYERp pp); // jweapon.c
int InitPhosphorus(SHORT SpriteNum); // jweapon.c int InitPhosphorus(int16_t SpriteNum); // jweapon.c
void SpawnFloorSplash(short SpriteNum); // jweapon.c void SpawnFloorSplash(short SpriteNum); // jweapon.c
int SaveGame(short save_num); // save.c int SaveGame(short save_num); // save.c
@ -2401,8 +2401,8 @@ void LoadGameDescr(short save_num, char *descr); // save.c
void SetRotatorActive(short SpriteNum); // rotator.c void SetRotatorActive(short SpriteNum); // rotator.c
BOOL VatorSwitch(short match, short setting); // vator.c SWBOOL VatorSwitch(short match, short setting); // vator.c
void MoveSpritesWithSector(short sectnum,int z_amt,BOOL type); // vator.c void MoveSpritesWithSector(short sectnum,int z_amt,SWBOOL type); // vator.c
void SetVatorActive(short SpriteNum); // vator.c void SetVatorActive(short SpriteNum); // vator.c
short DoSpikeMatch(PLAYERp pp,short match); // spike.c short DoSpikeMatch(PLAYERp pp,short match); // spike.c
@ -2421,7 +2421,7 @@ void CopySectorMatch(short match); // copysect.c
int DoWallMoveMatch(short match); // wallmove.c int DoWallMoveMatch(short match); // wallmove.c
int DoWallMove(SPRITEp sp); // wallmove.c int DoWallMove(SPRITEp sp); // wallmove.c
BOOL CanSeeWallMove(SPRITEp wp,short match); // wallmove.c SWBOOL CanSeeWallMove(SPRITEp wp,short match); // wallmove.c
short DoSpikeOperate(PLAYERp pp,short sectnum); // spike.c short DoSpikeOperate(PLAYERp pp,short sectnum); // spike.c
void SetSpikeActive(short SpriteNum); // spike.c void SetSpikeActive(short SpriteNum); // spike.c

View file

@ -46,37 +46,37 @@ extern short NormalVisibility;
short InventoryBarXpos[] = {110, 110, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80}; short InventoryBarXpos[] = {110, 110, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80};
short InventoryBarYpos[] = {172, 172, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130}; short InventoryBarYpos[] = {172, 172, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130};
VOID PlayerUpdateInventory(PLAYERp pp, short InventoryNum); void PlayerUpdateInventory(PLAYERp pp, short InventoryNum);
void SpawnInventoryBar(PLAYERp pp); void SpawnInventoryBar(PLAYERp pp);
VOID InventoryBarUpdatePosition(PLAYERp pp); void InventoryBarUpdatePosition(PLAYERp pp);
VOID InvBorderRefresh(PLAYERp pp); void InvBorderRefresh(PLAYERp pp);
VOID InventoryUse(PLAYERp pp); void InventoryUse(PLAYERp pp);
VOID InventoryStop(PLAYERp pp, short InventoryNum); void InventoryStop(PLAYERp pp, short InventoryNum);
VOID KillInventoryBar(PLAYERp pp); void KillInventoryBar(PLAYERp pp);
VOID PlayerUpdateInventoryPercent(PLAYERp pp); void PlayerUpdateInventoryPercent(PLAYERp pp);
VOID PlayerUpdateInventoryPic(PLAYERp pp); void PlayerUpdateInventoryPic(PLAYERp pp);
VOID PlayerUpdateInventoryState(PLAYERp pp); void PlayerUpdateInventoryState(PLAYERp pp);
//#define INVENTORY_ICON_WIDTH 32 //#define INVENTORY_ICON_WIDTH 32
#define INVENTORY_ICON_WIDTH 28 #define INVENTORY_ICON_WIDTH 28
VOID UseInventoryRepairKit(PLAYERp pp); void UseInventoryRepairKit(PLAYERp pp);
VOID UseInventoryMedkit(PLAYERp pp); void UseInventoryMedkit(PLAYERp pp);
VOID UseInventoryRepairKit(PLAYERp pp); void UseInventoryRepairKit(PLAYERp pp);
VOID UseInventoryCloak(PLAYERp pp); void UseInventoryCloak(PLAYERp pp);
VOID UseInventoryEnvironSuit(PLAYERp pp); void UseInventoryEnvironSuit(PLAYERp pp);
VOID UseInventoryNightVision(PLAYERp pp); void UseInventoryNightVision(PLAYERp pp);
VOID UseInventoryChemBomb(PLAYERp pp); void UseInventoryChemBomb(PLAYERp pp);
VOID UseInventoryFlashBomb(PLAYERp pp); void UseInventoryFlashBomb(PLAYERp pp);
VOID UseInventoryCaltrops(PLAYERp pp); void UseInventoryCaltrops(PLAYERp pp);
VOID StopInventoryRepairKit(PLAYERp pp, short); void StopInventoryRepairKit(PLAYERp pp, short);
VOID StopInventoryMedkit(PLAYERp pp, short); void StopInventoryMedkit(PLAYERp pp, short);
VOID StopInventoryRepairKit(PLAYERp pp, short); void StopInventoryRepairKit(PLAYERp pp, short);
VOID StopInventoryCloak(PLAYERp pp, short); void StopInventoryCloak(PLAYERp pp, short);
VOID StopInventoryEnvironSuit(PLAYERp pp, short); void StopInventoryEnvironSuit(PLAYERp pp, short);
VOID StopInventoryNightVision(PLAYERp pp, short); void StopInventoryNightVision(PLAYERp pp, short);
extern PANEL_STATE ps_PanelEnvironSuit[]; extern PANEL_STATE ps_PanelEnvironSuit[];
extern PANEL_STATE ps_PanelCloak[]; extern PANEL_STATE ps_PanelCloak[];
@ -101,16 +101,16 @@ INVENTORY_DATA InventoryData[MAX_INVENTORY+1] =
{NULL, NULL, NULL, NULL, 0, 0, 0, 0} {NULL, NULL, NULL, NULL, 0, 0, 0, 0}
}; };
VOID PanelInvTestSuicide(PANEL_SPRITEp psp); void PanelInvTestSuicide(PANEL_SPRITEp psp);
VOID UpdateMiniBar(PLAYERp pp) void UpdateMiniBar(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
short i; short i;
int x,y; int x,y;
BOOL found; SWBOOL found;
INVENTORY_DATAp id; INVENTORY_DATAp id;
extern BOOL PanelUpdateMode; extern SWBOOL PanelUpdateMode;
#define MINI_BAR_Y 174 #define MINI_BAR_Y 174
@ -176,7 +176,7 @@ VOID UpdateMiniBar(PLAYERp pp)
} }
VOID void
PanelInvTestSuicide(PANEL_SPRITEp psp) PanelInvTestSuicide(PANEL_SPRITEp psp)
{ {
if (TEST(psp->flags, PANF_SUICIDE)) if (TEST(psp->flags, PANF_SUICIDE))
@ -217,7 +217,7 @@ SpawnInventoryIcon(PLAYERp pp, short InventoryNum)
return psp; return psp;
} }
VOID void
KillPanelInv(PLAYERp pp, short InventoryNum) KillPanelInv(PLAYERp pp, short InventoryNum)
{ {
ASSERT(pp->InventorySprite[InventoryNum]); ASSERT(pp->InventorySprite[InventoryNum]);
@ -228,14 +228,14 @@ KillPanelInv(PLAYERp pp, short InventoryNum)
pp->InventorySprite[InventoryNum] = NULL; pp->InventorySprite[InventoryNum] = NULL;
} }
VOID void
KillPlayerIcon(PLAYERp pp, PANEL_SPRITEp *pspp) KillPlayerIcon(PLAYERp pp, PANEL_SPRITEp *pspp)
{ {
SET((*pspp)->flags, PANF_SUICIDE); SET((*pspp)->flags, PANF_SUICIDE);
(*pspp) = NULL; (*pspp) = NULL;
} }
VOID void
KillAllPanelInv(PLAYERp pp) KillAllPanelInv(PLAYERp pp)
{ {
short i; short i;
@ -274,7 +274,7 @@ SpawnIcon(PLAYERp pp, PANEL_STATEp state)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID AutoPickInventory(PLAYERp pp) void AutoPickInventory(PLAYERp pp)
{ {
int i; int i;
@ -300,7 +300,7 @@ VOID AutoPickInventory(PLAYERp pp)
} }
} }
VOID void
UseInventoryMedkit(PLAYERp pp) UseInventoryMedkit(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -349,7 +349,7 @@ UseInventoryMedkit(PLAYERp pp)
// CHEMICAL WARFARE CANISTERS // CHEMICAL WARFARE CANISTERS
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID void
UseInventoryChemBomb(PLAYERp pp) UseInventoryChemBomb(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -375,7 +375,7 @@ UseInventoryChemBomb(PLAYERp pp)
// FLASH BOMBS // FLASH BOMBS
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID void
UseInventoryFlashBomb(PLAYERp pp) UseInventoryFlashBomb(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -401,7 +401,7 @@ UseInventoryFlashBomb(PLAYERp pp)
// CALTROPS // CALTROPS
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID void
UseInventoryCaltrops(PLAYERp pp) UseInventoryCaltrops(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -428,7 +428,7 @@ UseInventoryCaltrops(PLAYERp pp)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID void
UseInventoryRepairKit(PLAYERp pp) UseInventoryRepairKit(PLAYERp pp)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -458,7 +458,7 @@ UseInventoryRepairKit(PLAYERp pp)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID void
UseInventoryCloak(PLAYERp pp) UseInventoryCloak(PLAYERp pp)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -485,7 +485,7 @@ UseInventoryCloak(PLAYERp pp)
PlayerSound(DIGI_IAMSHADOW,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp); PlayerSound(DIGI_IAMSHADOW,&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
} }
VOID void
StopInventoryCloak(PLAYERp pp, short InventoryNum) StopInventoryCloak(PLAYERp pp, short InventoryNum)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -514,7 +514,7 @@ StopInventoryCloak(PLAYERp pp, short InventoryNum)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
#if 0 #if 0
VOID void
UseInventoryEnvironSuit(PLAYERp pp) UseInventoryEnvironSuit(PLAYERp pp)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -529,7 +529,7 @@ UseInventoryEnvironSuit(PLAYERp pp)
} }
} }
VOID void
StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum) StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -560,7 +560,7 @@ StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum)
static char sectorfloorpals[MAXSECTORS], sectorceilingpals[MAXSECTORS], wallpals[MAXWALLS]; static char sectorfloorpals[MAXSECTORS], sectorceilingpals[MAXSECTORS], wallpals[MAXWALLS];
#if 0 #if 0
VOID void
DoPlayerNightVisionPalette(PLAYERp pp) DoPlayerNightVisionPalette(PLAYERp pp)
{ {
extern char DefaultPalette[]; extern char DefaultPalette[];
@ -608,7 +608,7 @@ DoPlayerNightVisionPalette(PLAYERp pp)
} }
#endif #endif
VOID void
DoPlayerNightVisionPalette(PLAYERp pp) DoPlayerNightVisionPalette(PLAYERp pp)
{ {
extern char DefaultPalette[]; extern char DefaultPalette[];
@ -639,7 +639,7 @@ DoPlayerNightVisionPalette(PLAYERp pp)
} }
} }
VOID void
UseInventoryNightVision(PLAYERp pp) UseInventoryNightVision(PLAYERp pp)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -660,7 +660,7 @@ UseInventoryNightVision(PLAYERp pp)
PlaySound(DIGI_NIGHTON, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow); PlaySound(DIGI_NIGHTON, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow);
} }
VOID void
StopInventoryNightVision(PLAYERp pp, short InventoryNum) StopInventoryNightVision(PLAYERp pp, short InventoryNum)
{ {
SPRITEp sp = pp->SpriteP; SPRITEp sp = pp->SpriteP;
@ -690,7 +690,7 @@ StopInventoryNightVision(PLAYERp pp, short InventoryNum)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID InventoryKeys(PLAYERp pp) void InventoryKeys(PLAYERp pp)
{ {
short inv_hotkey; short inv_hotkey;
@ -797,7 +797,7 @@ VOID InventoryKeys(PLAYERp pp)
} }
} }
VOID InvBorderRefresh(PLAYERp pp) void InvBorderRefresh(PLAYERp pp)
{ {
int x,y; int x,y;
@ -811,7 +811,7 @@ VOID InvBorderRefresh(PLAYERp pp)
//BorderRefreshClip(pp, x-5, y-5, x + (MAX_INVENTORY * INVENTORY_ICON_WIDTH), y + 24); //BorderRefreshClip(pp, x-5, y-5, x + (MAX_INVENTORY * INVENTORY_ICON_WIDTH), y + 24);
} }
VOID InventoryTimer(PLAYERp pp) void InventoryTimer(PLAYERp pp)
{ {
// called every time through loop // called every time through loop
short inv = 0; short inv = 0;
@ -904,7 +904,7 @@ VOID InventoryTimer(PLAYERp pp)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
VOID SpawnInventoryBar(PLAYERp pp) void SpawnInventoryBar(PLAYERp pp)
{ {
short inv = 0; short inv = 0;
INVENTORY_DATAp id; INVENTORY_DATAp id;
@ -935,14 +935,14 @@ VOID SpawnInventoryBar(PLAYERp pp)
pp->InventoryBarTics = SEC(2); pp->InventoryBarTics = SEC(2);
} }
VOID KillInventoryBar(PLAYERp pp) void KillInventoryBar(PLAYERp pp)
{ {
KillAllPanelInv(pp); KillAllPanelInv(pp);
KillPlayerIcon(pp, &pp->InventorySelectionBox); KillPlayerIcon(pp, &pp->InventorySelectionBox);
} }
// In case the BorderNum changes - move the postions // In case the BorderNum changes - move the postions
VOID InventoryBarUpdatePosition(PLAYERp pp) void InventoryBarUpdatePosition(PLAYERp pp)
{ {
short inv = 0; short inv = 0;
short x,y; short x,y;
@ -965,7 +965,7 @@ VOID InventoryBarUpdatePosition(PLAYERp pp)
} }
VOID InventoryUse(PLAYERp pp) void InventoryUse(PLAYERp pp)
{ {
INVENTORY_DATAp id = &InventoryData[pp->InventoryNum]; INVENTORY_DATAp id = &InventoryData[pp->InventoryNum];
@ -973,7 +973,7 @@ VOID InventoryUse(PLAYERp pp)
(*id->Init)(pp); (*id->Init)(pp);
} }
VOID InventoryStop(PLAYERp pp, short InventoryNum) void InventoryStop(PLAYERp pp, short InventoryNum)
{ {
INVENTORY_DATAp id = &InventoryData[InventoryNum]; INVENTORY_DATAp id = &InventoryData[InventoryNum];
@ -995,7 +995,7 @@ short InventoryBoxX;
short InventoryBoxY; short InventoryBoxY;
short InventoryXoff; short InventoryXoff;
short InventoryYoff; short InventoryYoff;
VOID (*InventoryDisplayString)(PLAYERp, short, short, short, const char *); void (*InventoryDisplayString)(PLAYERp, short, short, short, const char *);
#define INVENTORY_PIC_XOFF 1 #define INVENTORY_PIC_XOFF 1
#define INVENTORY_PIC_YOFF 1 #define INVENTORY_PIC_YOFF 1
@ -1006,7 +1006,7 @@ VOID (*InventoryDisplayString)(PLAYERp, short, short, short, const char *);
#define INVENTORY_STATE_XOFF 19 #define INVENTORY_STATE_XOFF 19
#define INVENTORY_STATE_YOFF 1 #define INVENTORY_STATE_YOFF 1
VOID void
PlayerUpdateInventory(PLAYERp pp, short InventoryNum) PlayerUpdateInventory(PLAYERp pp, short InventoryNum)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -1089,7 +1089,7 @@ PlayerUpdateInventory(PLAYERp pp, short InventoryNum)
} }
} }
VOID void
PlayerUpdateInventoryPercent(PLAYERp pp) PlayerUpdateInventoryPercent(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -1111,7 +1111,7 @@ PlayerUpdateInventoryPercent(PLAYERp pp)
} }
} }
VOID void
PlayerUpdateInventoryPic(PLAYERp pp) PlayerUpdateInventoryPic(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -1130,7 +1130,7 @@ PlayerUpdateInventoryPic(PLAYERp pp)
psp->scale = id->Scale; psp->scale = id->Scale;
} }
VOID void
PlayerUpdateInventoryState(PLAYERp pp) PlayerUpdateInventoryState(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];

View file

@ -39,8 +39,8 @@ enum InventoryNames
typedef struct typedef struct
{ {
char *Name; char *Name;
VOID (*Init)(PLAYERp); void (*Init)(PLAYERp);
VOID (*Stop)(PLAYERp, short); void (*Stop)(PLAYERp, short);
PANEL_STATEp State; PANEL_STATEp State;
short DecPerSec; short DecPerSec;
short MaxInv; short MaxInv;

View file

@ -48,8 +48,8 @@ static char tempbuf[256];
void Message(char *string, char color); void Message(char *string, char color);
long GetAToken(char *name, char *tc, long length); long GetAToken(char *name, char *tc, long length);
BYTEp BKeyPressed(VOID); uint8_t* BKeyPressed(void);
VOID ResetKeys(VOID); void ResetKeys(void);
// Functions // Functions

View file

@ -42,7 +42,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
void ToggleFAF(void); // brooms.c void ToggleFAF(void); // brooms.c
void FAF_AfterDrawRooms(void); // brooms.c void FAF_AfterDrawRooms(void); // brooms.c
VOID ResetBuildFAF(VOID); // brooms.c void ResetBuildFAF(void); // brooms.c
// Jim's Vars // Jim's Vars
@ -66,12 +66,12 @@ short siNextEndTag = 1; // Shows the hightest possible next
int loaded_numwalls; int loaded_numwalls;
// Boolean flags used for sprite searching // Boolean flags used for sprite searching
BOOL bFindPicNum = TRUE; // Default SWBOOL bFindPicNum = TRUE; // Default
BOOL bFindHiTag = FALSE; SWBOOL bFindHiTag = FALSE;
BOOL bFindLowTag = FALSE; SWBOOL bFindLowTag = FALSE;
BOOL bVoxelsOn = TRUE; // Turn voxels on by default SWBOOL bVoxelsOn = TRUE; // Turn voxels on by default
BOOL bSpinBobVoxels = TRUE; // Do twizzly stuff to voxels SWBOOL bSpinBobVoxels = TRUE; // Do twizzly stuff to voxels
BOOL bAutoSize = TRUE; // Autosizing on/off SWBOOL bAutoSize = TRUE; // Autosizing on/off
int nextvoxid = 0; int nextvoxid = 0;
char *defsfilename = "sw.def"; char *defsfilename = "sw.def";
@ -84,7 +84,7 @@ short FindSpriteNum = 0;
void ContextHelp(short spritenum); void ContextHelp(short spritenum);
void LoadKVXFromScript(char *filename); void LoadKVXFromScript(char *filename);
//void LogUserTime( BOOL bIsLoggingIn ); //void LogUserTime( SWBOOL bIsLoggingIn );
// voxelarray format is: // voxelarray format is:
// spritenumber, voxelnumber // spritenumber, voxelnumber
@ -161,7 +161,7 @@ extern short temppicnum, tempcstat, templotag, temphitag, tempextra;
void SectorMoveFloorZ(int); void SectorMoveFloorZ(int);
void SectorMoveCeilingZ(int); void SectorMoveCeilingZ(int);
VOID BuildStagTable(VOID); void BuildStagTable(void);
void Message(char *string, char color); void Message(char *string, char color);
void ShowMessage(void); void ShowMessage(void);
void ShadeMenu(void); void ShadeMenu(void);
@ -170,7 +170,7 @@ void ShowNextTag(void);
void FindSprite(short picnum, short findspritenum); void FindSprite(short picnum, short findspritenum);
void FindNextSprite(short picnum); void FindNextSprite(short picnum);
void SetClipdist2D(void); void SetClipdist2D(void);
VOID DrawClipBox(short spritenum); void DrawClipBox(short spritenum);
//printext16 parameters: //printext16 parameters:
//printext16(int xpos, int ypos, short col, short backcol, //printext16(int xpos, int ypos, short col, short backcol,
@ -207,8 +207,8 @@ VOID DrawClipBox(short spritenum);
// searchwall is the sprite if searchstat = 3 (Yeah, I know - it says wall, // searchwall is the sprite if searchstat = 3 (Yeah, I know - it says wall,
// but trust me, it's the sprite number) // but trust me, it's the sprite number)
VOID void
ResetKeys(VOID) ResetKeys(void)
{ {
unsigned i; unsigned i;
@ -225,7 +225,7 @@ void ExtPreCheckKeys(void)
// Toggle sprites on/off. Good for frame rate checks. // Toggle sprites on/off. Good for frame rate checks.
BOOL DebugActorFreeze = 0; SWBOOL DebugActorFreeze = 0;
void void
ToggleSprites() ToggleSprites()
@ -559,12 +559,12 @@ ExtAnalyzeSprites(void)
} }
BYTEp uint8_t*
BKeyPressed(VOID) BKeyPressed(void)
{ {
BYTEp k; uint8_t* k;
for (k = (BYTEp) & KEY_PRESSED(0); k < (BYTEp) &KEY_PRESSED(SIZ(keystatus)); k++) for (k = (uint8_t*) & KEY_PRESSED(0); k < (uint8_t*) &KEY_PRESSED(SIZ(keystatus)); k++)
{ {
if (*k) if (*k)
return k; return k;
@ -573,10 +573,10 @@ BKeyPressed(VOID)
return NULL; return NULL;
} }
BYTEp uint8_t*
KeyPressedRange(BYTEp kb, BYTEp ke) KeyPressedRange(uint8_t* kb, uint8_t* ke)
{ {
BYTEp k; uint8_t* k;
for (k = kb; k <= ke; k++) for (k = kb; k <= ke; k++)
{ {
@ -587,10 +587,10 @@ KeyPressedRange(BYTEp kb, BYTEp ke)
return NULL; return NULL;
} }
VOID void
ResetKeyRange(BYTEp kb, BYTEp ke) ResetKeyRange(uint8_t* kb, uint8_t* ke)
{ {
BYTEp k; uint8_t* k;
for (k = kb; k <= ke; k++) for (k = kb; k <= ke; k++)
{ {
@ -602,7 +602,7 @@ ResetKeyRange(BYTEp kb, BYTEp ke)
void void
ExtInit(void) ExtInit(void)
{ {
VOID InitPalette(VOID); void InitPalette(void);
int i, fil; int i, fil;
initgroupfile("sw.grp"); initgroupfile("sw.grp");
@ -682,7 +682,7 @@ ExtInit(void)
#endif #endif
VOID InitPalette(VOID); void InitPalette(void);
int i, fil; int i, fil;
// Store user log in time // Store user log in time
@ -785,8 +785,8 @@ ExtUnInit(void)
// now. // now.
} }
VOID void
SetSpriteExtra(VOID) SetSpriteExtra(void)
{ {
SPRITEp sp; SPRITEp sp;
int i; int i;
@ -826,8 +826,8 @@ SetSpriteExtra(VOID)
loaded_numwalls = numwalls; loaded_numwalls = numwalls;
} }
VOID void
ResetSpriteFound(VOID) ResetSpriteFound(void)
{ {
SPRITEp sp; SPRITEp sp;
@ -839,8 +839,8 @@ ResetSpriteFound(VOID)
// imported from allen code // imported from allen code
VOID void
Keys3D(VOID) Keys3D(void)
{ {
int i; int i;
@ -907,7 +907,7 @@ Keys3D(VOID)
// '+ = Shade down a floor ceiling while keeping sprites constant // '+ = Shade down a floor ceiling while keeping sprites constant
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GPLUS]) if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GPLUS])
{ {
BOOL dospriteshade = FALSE; SWBOOL dospriteshade = FALSE;
keystatus[KEYSC_GPLUS] = 0; keystatus[KEYSC_GPLUS] = 0;
@ -945,7 +945,7 @@ Keys3D(VOID)
// '- = Shade down a floor ceiling while keeping sprites constant // '- = Shade down a floor ceiling while keeping sprites constant
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GMINUS]) if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GMINUS])
{ {
BOOL dospriteshade = FALSE; SWBOOL dospriteshade = FALSE;
keystatus[KEYSC_GMINUS] = 0; keystatus[KEYSC_GMINUS] = 0;
@ -1359,7 +1359,7 @@ PrintStatus(char *string, int num, char x, char y, char color)
printext16(x * 8, ydim16+y * 8, color, -1, tempbuf, 0); printext16(x * 8, ydim16+y * 8, color, -1, tempbuf, 0);
} }
VOID void
MoreKeys(short searchstat, short searchwall, short searchsector, short pointhighlight) MoreKeys(short searchstat, short searchwall, short searchsector, short pointhighlight)
{ {
@ -2258,7 +2258,7 @@ ExtGetSpriteCaption(short spritenum)
char name[64]; char name[64];
char tp[30]; char tp[30];
char multi_str[30] = ""; char multi_str[30] = "";
SHORT data; int16_t data;
data = TEST(sp->extra, SPRX_SKILL); data = TEST(sp->extra, SPRX_SKILL);
@ -2695,7 +2695,7 @@ ExtGetSpriteCaption(short spritenum)
return tempbuf; return tempbuf;
} }
VOID void
SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid) SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid)
{ {
short startwall, endwall, j; short startwall, endwall, j;
@ -2717,7 +2717,7 @@ SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid)
*zmid = DIV2(sector[sectnum].floorz + sector[sectnum].ceilingz); *zmid = DIV2(sector[sectnum].floorz + sector[sectnum].ceilingz);
} }
VOID void
DrawClipBox(short spritenum) DrawClipBox(short spritenum)
{ {
int x, y, z; int x, y, z;
@ -2974,7 +2974,7 @@ ExtEditWallData(short wallnum) // F8
void void
ExtEditSpriteData(short spritenum) // F8 ExtEditSpriteData(short spritenum) // F8
{ {
BYTEp key; uint8_t* key;
short data; short data;
SPRITEp sp; SPRITEp sp;
@ -2999,7 +2999,7 @@ ExtEditSpriteData(short spritenum) // F8
while ((key = BKeyPressed()) == NULL) handleevents(); while ((key = BKeyPressed()) == NULL) handleevents();
if (key == (BYTEp)&KEY_PRESSED(KEYSC_1) || key == (BYTEp)&KEY_PRESSED(KEYSC_F8)) if (key == (uint8_t*)&KEY_PRESSED(KEYSC_1) || key == (uint8_t*)&KEY_PRESSED(KEYSC_F8))
{ {
*key = FALSE; *key = FALSE;
@ -3015,13 +3015,13 @@ ExtEditSpriteData(short spritenum) // F8
RESET(sp->extra, SPRX_SKILL); RESET(sp->extra, SPRX_SKILL);
SET(sp->extra, data); SET(sp->extra, data);
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_2) || key == (BYTEp)&KEY_PRESSED(KEYSC_F9)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_2) || key == (uint8_t*)&KEY_PRESSED(KEYSC_F9))
{ {
*key = FALSE; *key = FALSE;
FLIP(sprite[spritenum].extra, SPRX_MULTI_ITEM); FLIP(sprite[spritenum].extra, SPRX_MULTI_ITEM);
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_3) || key == (BYTEp)&KEY_PRESSED(KEYSC_F10)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_3) || key == (uint8_t*)&KEY_PRESSED(KEYSC_F10))
{ {
*key = FALSE; *key = FALSE;
@ -3064,17 +3064,17 @@ DISPLAY:
while ((key = BKeyPressed()) == NULL) handleevents(); while ((key = BKeyPressed()) == NULL) handleevents();
if (key == (BYTEp)&KEY_PRESSED(KEYSC_1)) if (key == (uint8_t*)&KEY_PRESSED(KEYSC_1))
{ {
*key = FALSE; *key = FALSE;
bFindPicNum = !bFindPicNum; bFindPicNum = !bFindPicNum;
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_2)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_2))
{ {
*key = FALSE; *key = FALSE;
bFindHiTag = !bFindHiTag; bFindHiTag = !bFindHiTag;
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_3)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_3))
{ {
*key = FALSE; *key = FALSE;
bFindLowTag = !bFindLowTag; bFindLowTag = !bFindLowTag;
@ -3087,7 +3087,7 @@ DISPLAY:
FindSprite(sprite[spritenum].picnum, spritenum); FindSprite(sprite[spritenum].picnum, spritenum);
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_4)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_4))
{ {
*key = FALSE; *key = FALSE;
FLIP(sprite[spritenum].extra, SPRX_BLOCK); FLIP(sprite[spritenum].extra, SPRX_BLOCK);
@ -3359,7 +3359,7 @@ FindSprite(short picnum, short findspritenum)
short SpriteNum, NextSprite; short SpriteNum, NextSprite;
SPRITEp sp; SPRITEp sp;
BOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; SWBOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt;
if (qsetmode == 200) // In 3D mode if (qsetmode == 200) // In 3D mode
@ -3432,7 +3432,7 @@ FindNextSprite(short picnum)
SPRITEp sp; SPRITEp sp;
short animlen; short animlen;
BOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; SWBOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt;
if (qsetmode == 200) // In 3D mode if (qsetmode == 200) // In 3D mode
return; return;
@ -3486,7 +3486,7 @@ short tagcheck[] = {0, 1, 3, 5, 16, 23, 25, 27, 29, 30, 31, 32, 33, 34, 37, 38,
72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 90, 94, 97, 98, 99, 100, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 90, 94, 97, 98, 99, 100,
101, 102, 135, 110, 111, 112, 113, 114, 115, 9002}; 101, 102, 135, 110, 111, 112, 113, 114, 115, 9002};
BOOL SWBOOL
DoMatchCheck(SPRITEp sp) DoMatchCheck(SPRITEp sp)
{ {
unsigned i; unsigned i;
@ -3554,7 +3554,7 @@ FindNextTag(void)
void void
ShadeMenu(void) // F8 ShadeMenu(void) // F8
{ {
BYTEp key; uint8_t* key;
if (qsetmode == 200) // In 3D mode if (qsetmode == 200) // In 3D mode
return; return;
@ -3569,22 +3569,22 @@ ShadeMenu(void) // F8
while ((key = BKeyPressed()) == NULL) ; while ((key = BKeyPressed()) == NULL) ;
if (key == (BYTEp)&KEY_PRESSED(KEYSC_1)) if (key == (uint8_t*)&KEY_PRESSED(KEYSC_1))
{ {
*key = FALSE; *key = FALSE;
PlaxSetShade(); PlaxSetShade();
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_2)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_2))
{ {
*key = FALSE; *key = FALSE;
PlaxAdjustShade(); PlaxAdjustShade();
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_3)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_3))
{ {
*key = FALSE; *key = FALSE;
AdjustShade(); AdjustShade();
} }
else if (key == (BYTEp)&KEY_PRESSED(KEYSC_4)) else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_4))
{ {
*key = FALSE; *key = FALSE;
AdjustVisibility(); AdjustVisibility();
@ -3706,8 +3706,8 @@ dsprintf_null(char *str, char *format, ...)
} }
VOID void
BuildStagTable(VOID) BuildStagTable(void)
{ {
#define MAKE_STAG_TABLE #define MAKE_STAG_TABLE
#include "stag.h" #include "stag.h"

View file

@ -52,7 +52,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "bots.h" #include "bots.h"
BOOL WeaponOK(PLAYERp pp); SWBOOL WeaponOK(PLAYERp pp);
#define MAXANGVEL 80 #define MAXANGVEL 80
@ -424,7 +424,7 @@ void computergetinput(int snum, SW_PACKET *syn)
int myx, myy, myz, myang, mycursectnum; int myx, myy, myz, myang, mycursectnum;
USERp u; USERp u;
short weap; short weap;
//extern BOOL Pachinko_Win_Cheat; //extern SWBOOL Pachinko_Win_Cheat;
if (!MoveSkip4) return; // Make it so the bots don't slow the game down so bad! if (!MoveSkip4) return; // Make it so the bots don't slow the game down so bad!

View file

@ -52,17 +52,17 @@ MIRRORTYPE mirror[MAXMIRRORS];
short mirrorcnt; //, floormirrorcnt; short mirrorcnt; //, floormirrorcnt;
//short floormirrorsector[MAXMIRRORS]; //short floormirrorsector[MAXMIRRORS];
BOOL mirrorinview; SWBOOL mirrorinview;
static char tempbuf[/*max(576, */ MAXXDIM /*)*/]; static char tempbuf[/*max(576, */ MAXXDIM /*)*/];
BOOL MirrorMoveSkip16 = 0; SWBOOL MirrorMoveSkip16 = 0;
// Voxel stuff // Voxel stuff
//BOOL bVoxelsOn = TRUE; // Turn voxels on by default //SWBOOL bVoxelsOn = TRUE; // Turn voxels on by default
BOOL bSpinBobVoxels = FALSE; // Do twizzly stuff to voxels, but SWBOOL bSpinBobVoxels = FALSE; // Do twizzly stuff to voxels, but
// not by default // not by default
BOOL bAutoSize = TRUE; // Autosizing on/off SWBOOL bAutoSize = TRUE; // Autosizing on/off
//extern int chainnumpages; //extern int chainnumpages;
extern AMB_INFO ambarray[]; extern AMB_INFO ambarray[];
@ -76,7 +76,7 @@ extern ParentalStruct aVoxelArray[MAXTILES];
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// SpawnWallSound // SpawnWallSound
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
VOID void
SpawnWallSound(short sndnum, short i) SpawnWallSound(short sndnum, short i)
{ {
short SpriteNum; short SpriteNum;
@ -321,7 +321,7 @@ JS_InitMirrors(void)
short SpriteNum = 0, NextSprite; short SpriteNum = 0, NextSprite;
SPRITEp sp; SPRITEp sp;
static short on_cam = 0; static short on_cam = 0;
BOOL Found_Cam = FALSE; SWBOOL Found_Cam = FALSE;
// Set all the mirror struct values to -1 // Set all the mirror struct values to -1
@ -601,8 +601,8 @@ JS_ProcessEchoSpot()
SPRITEp tp; SPRITEp tp;
int j,dist; int j,dist;
PLAYERp pp = Player+screenpeek; PLAYERp pp = Player+screenpeek;
SHORT reverb; int16_t reverb;
BOOL reverb_set = FALSE; SWBOOL reverb_set = FALSE;
// Process echo sprites // Process echo sprites
TRAVERSE_SPRITE_STAT(headspritestat[STAT_ECHO], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_ECHO], i, nexti)
@ -654,7 +654,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
// long tx, ty, tz, tpang; // Interpolate so mirror doesn't // long tx, ty, tz, tpang; // Interpolate so mirror doesn't
// drift! // drift!
BOOL bIsWallMirror = FALSE; SWBOOL bIsWallMirror = FALSE;
MirrorMoveSkip16 = (MirrorMoveSkip16 + 1) & 15; MirrorMoveSkip16 = (MirrorMoveSkip16 + 1) & 15;
@ -796,7 +796,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
} }
else else
{ {
BOOL DoCam = FALSE; SWBOOL DoCam = FALSE;
if (mirror[cnt].campic == -1) if (mirror[cnt].campic == -1)
{ {
@ -1161,7 +1161,7 @@ InitOrgTile(OrgTileListP thelist)
return tp; return tp;
} }
VOID void
KillOrgTile(OrgTileP tp) KillOrgTile(OrgTileP tp)
{ {
ASSERT(tp); ASSERT(tp);
@ -1190,7 +1190,7 @@ FindOrgTile(short index, OrgTileListP thelist)
} }
// Call this at terminate game time // Call this at terminate game time
VOID void
JS_UnInitLockouts(void) JS_UnInitLockouts(void)
{ {
OrgTileP tp=NULL, next_tp=NULL; OrgTileP tp=NULL, next_tp=NULL;

View file

@ -52,7 +52,7 @@ typedef struct
short spawnspots[MAXMIRRORMONSTERS]; // One spot for each possible skill short spawnspots[MAXMIRRORMONSTERS]; // One spot for each possible skill
// level for a // level for a
// max of up to 4 coolie ghosts to spawn. // max of up to 4 coolie ghosts to spawn.
BOOL ismagic; // Is this a magic mirror? SWBOOL ismagic; // Is this a magic mirror?
MIRRORSTATE mstate; // What state the mirror is currently MIRRORSTATE mstate; // What state the mirror is currently
// in // in
int maxtics; // Tic count used to time mirror int maxtics; // Tic count used to time mirror
@ -65,7 +65,7 @@ extern MIRRORTYPE mirror[MAXMIRRORS];
extern short mirrorcnt, floormirrorcnt; extern short mirrorcnt, floormirrorcnt;
extern short floormirrorsector[MAXMIRRORS]; extern short floormirrorsector[MAXMIRRORS];
extern BOOL mirrorinview; extern SWBOOL mirrorinview;
extern short NormalVisibility; extern short NormalVisibility;
void JAnalyzeSprites(SPRITEp tspr); void JAnalyzeSprites(SPRITEp tspr);

View file

@ -45,14 +45,14 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
ANIMATOR NullAnimator,DoSuicide; ANIMATOR NullAnimator,DoSuicide;
ANIMATOR DoBloodSpray; ANIMATOR DoBloodSpray;
int SpawnFlashBombOnActor(SHORT enemy); int SpawnFlashBombOnActor(int16_t enemy);
ANIMATOR DoPuff, BloodSprayFall; ANIMATOR DoPuff, BloodSprayFall;
extern STATE s_Puff[]; extern STATE s_Puff[];
extern STATE s_FireballFlames[]; extern STATE s_FireballFlames[];
extern STATE s_GoreFloorSplash[]; extern STATE s_GoreFloorSplash[];
extern STATE s_GoreSplash[]; extern STATE s_GoreSplash[];
extern BOOL GlobalSkipZrange; extern SWBOOL GlobalSkipZrange;
#define CHEMTICS SEC(40) #define CHEMTICS SEC(40)
@ -370,11 +370,11 @@ SpawnFloorSplash(short SpriteNum)
int int
DoBloodSpray(SHORT Weapon) DoBloodSpray(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
LONG dax, day, daz; int32_t dax, day, daz;
int cz,fz; int cz,fz;
if (TEST(u->Flags, SPR_UNDERWATER)) if (TEST(u->Flags, SPR_UNDERWATER))
@ -519,7 +519,7 @@ DoBloodSpray(SHORT Weapon)
case HIT_SECTOR: case HIT_SECTOR:
{ {
BOOL hitwall; SWBOOL hitwall;
// hit floor // hit floor
if (sp->z > DIV2(u->hiz + u->loz)) if (sp->z > DIV2(u->hiz + u->loz))
@ -608,11 +608,11 @@ DoBloodSpray(SHORT Weapon)
int int
DoPhosphorus(SHORT Weapon) DoPhosphorus(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
LONG dax, day, daz; int32_t dax, day, daz;
if (TEST(u->Flags, SPR_UNDERWATER)) if (TEST(u->Flags, SPR_UNDERWATER))
{ {
@ -706,7 +706,7 @@ DoPhosphorus(SHORT Weapon)
case HIT_SECTOR: case HIT_SECTOR:
{ {
BOOL hitwall; SWBOOL hitwall;
if (SlopeBounce(Weapon, &hitwall)) if (SlopeBounce(Weapon, &hitwall))
{ {
@ -835,11 +835,11 @@ DoPhosphorus(SHORT Weapon)
} }
int int
DoChemBomb(SHORT Weapon) DoChemBomb(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
LONG dax, day, daz; int32_t dax, day, daz;
if (TEST(u->Flags, SPR_UNDERWATER)) if (TEST(u->Flags, SPR_UNDERWATER))
{ {
@ -935,7 +935,7 @@ DoChemBomb(SHORT Weapon)
case HIT_SECTOR: case HIT_SECTOR:
{ {
BOOL hitwall; SWBOOL hitwall;
if (SlopeBounce(Weapon, &hitwall)) if (SlopeBounce(Weapon, &hitwall))
{ {
@ -1084,7 +1084,7 @@ DoChemBomb(SHORT Weapon)
} }
int int
DoCaltropsStick(SHORT Weapon) DoCaltropsStick(int16_t Weapon)
{ {
USERp u = User[Weapon]; USERp u = User[Weapon];
@ -1097,11 +1097,11 @@ DoCaltropsStick(SHORT Weapon)
} }
int int
DoCaltrops(SHORT Weapon) DoCaltrops(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
LONG dax, day, daz; int32_t dax, day, daz;
if (TEST(u->Flags, SPR_UNDERWATER)) if (TEST(u->Flags, SPR_UNDERWATER))
{ {
@ -1182,7 +1182,7 @@ DoCaltrops(SHORT Weapon)
case HIT_SECTOR: case HIT_SECTOR:
{ {
BOOL hitwall; SWBOOL hitwall;
if (SlopeBounce(Weapon, &hitwall)) if (SlopeBounce(Weapon, &hitwall))
{ {
@ -1462,7 +1462,7 @@ PlayerInitChemBomb(PLAYERp pp)
} }
int int
InitSpriteChemBomb(SHORT SpriteNum) InitSpriteChemBomb(int16_t SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
USERp wu; USERp wu;
@ -1666,7 +1666,7 @@ PlayerInitFlashBomb(PLAYERp pp)
} }
int int
InitFlashBomb(SHORT SpriteNum) InitFlashBomb(int16_t SpriteNum)
{ {
short pnum, i, nexti; short pnum, i, nexti;
unsigned int stat; unsigned int stat;
@ -1731,7 +1731,7 @@ InitFlashBomb(SHORT SpriteNum)
// This is a sneaky function to make actors look blinded by flashbomb while using flaming code // This is a sneaky function to make actors look blinded by flashbomb while using flaming code
int int
SpawnFlashBombOnActor(SHORT enemy) SpawnFlashBombOnActor(int16_t enemy)
{ {
SPRITEp ep = &sprite[enemy]; SPRITEp ep = &sprite[enemy];
USERp eu = User[enemy]; USERp eu = User[enemy];
@ -1904,7 +1904,7 @@ PlayerInitCaltrops(PLAYERp pp)
} }
int int
InitCaltrops(SHORT SpriteNum) InitCaltrops(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -1957,7 +1957,7 @@ InitCaltrops(SHORT SpriteNum)
} }
int int
InitPhosphorus(SHORT SpriteNum) InitPhosphorus(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -2017,7 +2017,7 @@ InitPhosphorus(SHORT SpriteNum)
} }
int int
InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity) InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -2107,7 +2107,7 @@ InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity)
} }
int int
BloodSprayFall(SHORT SpriteNum) BloodSprayFall(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -2127,8 +2127,8 @@ BloodSprayFall(SHORT SpriteNum)
////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////
// Update the scoreboard for team color that just scored. // Update the scoreboard for team color that just scored.
VOID void
DoFlagScore(SHORT pal) DoFlagScore(int16_t pal)
{ {
SPRITEp sp; SPRITEp sp;
int SpriteNum = 0, NextSprite = 0; int SpriteNum = 0, NextSprite = 0;
@ -2199,7 +2199,7 @@ DoFlagRangeTest(short Weapon, short range)
} }
int int
DoCarryFlag(SHORT Weapon) DoCarryFlag(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
@ -2354,7 +2354,7 @@ DoCarryFlag(SHORT Weapon)
} }
int int
DoCarryFlagNoDet(SHORT Weapon) DoCarryFlagNoDet(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
@ -2422,7 +2422,7 @@ DoCarryFlagNoDet(SHORT Weapon)
int int
SetCarryFlag(SHORT Weapon) SetCarryFlag(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
@ -2444,11 +2444,11 @@ SetCarryFlag(SHORT Weapon)
} }
int int
DoFlag(SHORT Weapon) DoFlag(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
USERp u = User[Weapon]; USERp u = User[Weapon];
SHORT hitsprite = -1; int16_t hitsprite = -1;
hitsprite = DoFlagRangeTest(Weapon, 1000); hitsprite = DoFlagRangeTest(Weapon, 1000);
@ -2474,7 +2474,7 @@ DoFlag(SHORT Weapon)
int int
InitShell(SHORT SpriteNum, SHORT ShellNum) InitShell(int16_t SpriteNum, int16_t ShellNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
USERp wu; USERp wu;

View file

@ -51,7 +51,7 @@ void SectorLightShade(SPRITEp sp, short intensity)
{ {
short w, startwall, endwall; short w, startwall, endwall;
void *void_ptr; void *void_ptr;
CHARp wall_shade; int8_t* wall_shade;
short base_shade; short base_shade;
short wallcount; short wallcount;
@ -102,7 +102,7 @@ void SectorLightShade(SPRITEp sp, short intensity)
} }
VOID DiffuseLighting(SPRITEp sp) void DiffuseLighting(SPRITEp sp)
{ {
short i, nexti; short i, nexti;
short count; short count;
@ -133,7 +133,7 @@ VOID DiffuseLighting(SPRITEp sp)
} }
} }
VOID DoLightingMatch(short match, short state) void DoLightingMatch(short match, short state)
{ {
short i,nexti; short i,nexti;
SPRITEp sp; SPRITEp sp;
@ -255,7 +255,7 @@ VOID DoLightingMatch(short match, short state)
} }
} }
VOID InitLighting(VOID) void InitLighting(void)
{ {
short i,nexti; short i,nexti;
SPRITEp sp; SPRITEp sp;
@ -274,7 +274,7 @@ VOID InitLighting(VOID)
} }
} }
VOID DoLighting(VOID) void DoLighting(void)
{ {
short i,nexti; short i,nexti;
SPRITEp sp; SPRITEp sp;

View file

@ -26,10 +26,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
void SectorLightShade(SPRITEp sp, short intensity); void SectorLightShade(SPRITEp sp, short intensity);
VOID DiffuseLighting(SPRITEp sp); void DiffuseLighting(SPRITEp sp);
VOID DoLightingMatch(short match, short state); void DoLightingMatch(short match, short state);
VOID InitLighting(VOID); void InitLighting(void);
VOID DoLighting(VOID); void DoLighting(void);
// Descriptive Light variables mapped from other variables // Descriptive Light variables mapped from other variables

View file

@ -36,8 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//#define PokeByte(a,b,c) (*((char far *)MK_FP((a),(b)))=(char)(c)) //#define PokeByte(a,b,c) (*((char far *)MK_FP((a),(b)))=(char)(c))
//#if DEBUG //#if DEBUG
VOID void
PokeStringMono(BYTE Attr, BYTEp String) PokeStringMono(uint8_t Attr, uint8_t* String)
{ {
fprintf(stderr,"MONO: %s\n",String); fprintf(stderr,"MONO: %s\n",String);
#if 0 #if 0
@ -46,8 +46,8 @@ PokeStringMono(BYTE Attr, BYTEp String)
// EXAMPLE: PokeStringMono(MDA_NORMAL, "Hello, world."); // EXAMPLE: PokeStringMono(MDA_NORMAL, "Hello, world.");
BYTEp Src, Dest; uint8_t* Src, Dest;
LONGp s,d; int32_t* s,d;
static char MonoBuf[4000]; static char MonoBuf[4000];
#define BASE (MonoBuf) #define BASE (MonoBuf)
@ -56,8 +56,8 @@ PokeStringMono(BYTE Attr, BYTEp String)
// First scroll the screen up one line. // First scroll the screen up one line.
// copy lines 1-24 up to 0 // copy lines 1-24 up to 0
s = (LONGp)(BASE + LINE_SIZE); s = (int32_t*)(BASE + LINE_SIZE);
d = (LONGp)BASE; d = (int32_t*)BASE;
memmove(d,s,LINE_OFFSET(24)); memmove(d,s,LINE_OFFSET(24));
// clear bottom line // clear bottom line

View file

@ -59,40 +59,40 @@ short TimeLimitTable[9] = {0,3,5,10,15,20,30,45,60};
short QuickLoadNum = -1; short QuickLoadNum = -1;
char QuickLoadDescrDialog[32]; char QuickLoadDescrDialog[32];
BOOL QuickSaveMode = FALSE; SWBOOL QuickSaveMode = FALSE;
BOOL SavePrompt = FALSE; SWBOOL SavePrompt = FALSE;
extern BOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo; extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo;
extern BYTE RedBookSong[40]; extern uint8_t RedBookSong[40];
extern BOOL ExitLevel, NewGame; extern SWBOOL ExitLevel, NewGame;
extern short Level, Skill; extern short Level, Skill;
extern BOOL MusicInitialized, FxInitialized; extern SWBOOL MusicInitialized, FxInitialized;
BOOL MNU_CheckUserMap(MenuItem *item); SWBOOL MNU_CheckUserMap(MenuItem *item);
BOOL MNU_SaveGameCheck(MenuItem_p item); SWBOOL MNU_SaveGameCheck(MenuItem_p item);
BOOL MNU_TeamPlayCheck(MenuItem *item); SWBOOL MNU_TeamPlayCheck(MenuItem *item);
BOOL MNU_CoopPlayCheck(MenuItem *item); SWBOOL MNU_CoopPlayCheck(MenuItem *item);
BOOL MNU_StatCheck(MenuItem *item); SWBOOL MNU_StatCheck(MenuItem *item);
BOOL MNU_LoadGameCheck(MenuItem *item); SWBOOL MNU_LoadGameCheck(MenuItem *item);
BOOL MNU_TenCheck(MenuItem *item); SWBOOL MNU_TenCheck(MenuItem *item);
static BOOL MNU_TryMusicInit(void); static SWBOOL MNU_TryMusicInit(void);
static void MNU_UpLevel(void); static void MNU_UpLevel(void);
BOOL MNU_LoadSaveDraw(UserCall call, MenuItem *item); SWBOOL MNU_LoadSaveDraw(UserCall call, MenuItem *item);
BOOL MNU_LoadSaveMove(UserCall call, MenuItem *item); SWBOOL MNU_LoadSaveMove(UserCall call, MenuItem *item);
BOOL MenuButtonAutoRun = FALSE; SWBOOL MenuButtonAutoRun = FALSE;
BOOL MenuButtonAutoAim = FALSE; SWBOOL MenuButtonAutoAim = FALSE;
// misc load-save vars // misc load-save vars
short LastSaveNum = 99; short LastSaveNum = 99;
char SaveGameDescr[10][80]; char SaveGameDescr[10][80];
char BackupSaveGameDescr[80]; char BackupSaveGameDescr[80];
short screen_tile = -1; short screen_tile = -1;
BOOL MenuInputMode = FALSE; SWBOOL MenuInputMode = FALSE;
SHORT MenuTextShade = 0; int16_t MenuTextShade = 0;
BOOL passwordvalid = FALSE; SWBOOL passwordvalid = FALSE;
BOOL MNU_HurtTeammateCheck(MenuItem *item); SWBOOL MNU_HurtTeammateCheck(MenuItem *item);
BOOL MNU_TeamPlayChange(void); SWBOOL MNU_TeamPlayChange(void);
// Font pic table // Font pic table
unsigned short xlatfont[] = unsigned short xlatfont[] =
@ -123,7 +123,7 @@ short buttonsettings[btn_max];
#define XDIM 320 #define XDIM 320
#define YDIM 200 #define YDIM 200
extern char DefaultPalette[]; extern char DefaultPalette[];
extern BOOL QuitFlag; extern SWBOOL QuitFlag;
void TerminateGame(void); void TerminateGame(void);
void ResetKeys(void); void ResetKeys(void);
@ -158,7 +158,7 @@ static void UpdateValidModes(int bpp, int fs)
numvalidresolutions++; numvalidresolutions++;
} }
} }
static BOOL ApplyModeSettings(void) static SWBOOL ApplyModeSettings(void)
{ {
int lastx, lasty, lastbpp, lastfs; int lastx, lasty, lastbpp, lastfs;
int newx, newy, newbpp, newfs; int newx, newy, newbpp, newfs;
@ -175,7 +175,7 @@ static BOOL ApplyModeSettings(void)
setgamemode(lastfs, lastx, lasty, lastbpp); setgamemode(lastfs, lastx, lasty, lastbpp);
else else
{ {
extern int32 ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP; // Because I'm too lazy to include config.h extern int32_t ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP; // Because I'm too lazy to include config.h
ScreenMode = newfs; ScreenMode = newfs;
ScreenWidth = newx; ScreenWidth = newx;
ScreenHeight = newy; ScreenHeight = newy;
@ -253,9 +253,9 @@ MenuGroup mousegroup = {65, 5, "^Mouse", mouse_i, pic_newgametitl, 0, m_defshade
MenuGroup keysetupgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_KeySetupCustom, NULL, 0}; MenuGroup keysetupgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_KeySetupCustom, NULL, 0};
static char MouseButtonFunctions[10][MAXFUNCTIONLENGTH]; static char MouseButtonFunctions[10][MAXFUNCTIONLENGTH];
static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item); static SWBOOL MNU_SetMouseButtonFunctions(MenuItem_p item);
static BOOL MNU_MouseButtonPostProcess(MenuItem_p item); static SWBOOL MNU_MouseButtonPostProcess(MenuItem_p item);
static BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item); static SWBOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item);
MenuGroup mousebuttongroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_MouseButtonSetupCustom, NULL, 0}; MenuGroup mousebuttongroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_MouseButtonSetupCustom, NULL, 0};
MenuItem mousesetup_i[] = MenuItem mousesetup_i[] =
{ {
@ -289,11 +289,11 @@ static char JoystickButtonPageName[MAXJOYSTICKBUTTONPAGES][64];
static char JoystickButtonFunctions[MAXJOYBUTTONS*2][MAXFUNCTIONLENGTH]; static char JoystickButtonFunctions[MAXJOYBUTTONS*2][MAXFUNCTIONLENGTH];
static char JoystickButtonNames[MAXJOYBUTTONS*2][64]; static char JoystickButtonNames[MAXJOYBUTTONS*2][64];
static int JoystickButtonPage = 0; static int JoystickButtonPage = 0;
static BOOL MNU_JoystickButtonsInitialise(MenuItem_p item); static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p item);
static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item); static SWBOOL MNU_SetJoystickButtonFunctions(MenuItem_p item);
static BOOL MNU_JoystickButtonPostProcess(MenuItem_p item); static SWBOOL MNU_JoystickButtonPostProcess(MenuItem_p item);
static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem_p item); static SWBOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem_p item);
static BOOL MNU_JoystickButtonNextPage(void); static SWBOOL MNU_JoystickButtonNextPage(void);
MenuGroup joybuttonsgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_JoystickButtonSetupCustom, NULL, 0}; MenuGroup joybuttonsgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_JoystickButtonSetupCustom, NULL, 0};
MenuItem joybuttons_i[MAXJOYSTICKBUTTONPAGES][JOYSTICKITEMSPERPAGE*2+3] = // itemsperpage * Layer/Inert + Pagetext + Next + DefNone MenuItem joybuttons_i[MAXJOYSTICKBUTTONPAGES][JOYSTICKITEMSPERPAGE*2+3] = // itemsperpage * Layer/Inert + Pagetext + Next + DefNone
{ {
@ -306,11 +306,11 @@ static char JoystickAxisName[64];
static char JoystickAxisPageName[64]; static char JoystickAxisPageName[64];
static char JoystickAxisFunctions[2][MAXFUNCTIONLENGTH]; static char JoystickAxisFunctions[2][MAXFUNCTIONLENGTH];
static int JoystickAxisPage = 0; static int JoystickAxisPage = 0;
static BOOL MNU_JoystickAxesInitialise(MenuItem_p item); static SWBOOL MNU_JoystickAxesInitialise(MenuItem_p item);
static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item); static SWBOOL MNU_SetJoystickAxisFunctions(MenuItem_p item);
static BOOL MNU_JoystickAxisPostProcess(MenuItem_p item); static SWBOOL MNU_JoystickAxisPostProcess(MenuItem_p item);
static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem_p item); static SWBOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem_p item);
static BOOL MNU_JoystickAxisNextPage(void); static SWBOOL MNU_JoystickAxisNextPage(void);
MenuGroup joyaxesgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_JoystickAxisSetupCustom, NULL, 0}; MenuGroup joyaxesgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_JoystickAxisSetupCustom, NULL, 0};
MenuItem joyaxes_i[] = MenuItem joyaxes_i[] =
{ {
@ -340,9 +340,9 @@ MenuGroup joyaxessetupgroup = {65, 5, "^Joystick Axes", joyaxes_i, pic_newgameti
static char AdvancedMouseAxisFunctions[4][MAXAXISFUNCTIONLENGTH] = { "", "", "", "" }; static char AdvancedMouseAxisFunctions[4][MAXAXISFUNCTIONLENGTH] = { "", "", "", "" };
static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item); static SWBOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item);
static BOOL MNU_MouseDigitalPostProcess(MenuItem_p item); static SWBOOL MNU_MouseDigitalPostProcess(MenuItem_p item);
static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item); static SWBOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item);
MenuGroup advancedmousedigigroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_MouseDigitalSetupCustom, NULL, 0}; MenuGroup advancedmousedigigroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_MouseDigitalSetupCustom, NULL, 0};
MenuItem advancedmouse_i[] = MenuItem advancedmouse_i[] =
{ {
@ -536,7 +536,7 @@ CTLType ControlPanelType;
#define MaxLayers 10 // Maximum layers deep a menu can go #define MaxLayers 10 // Maximum layers deep a menu can go
short menuarrayptr; // Index into menuarray short menuarrayptr; // Index into menuarray
MenuGroup *menuarray[MaxLayers], *currentmenu; MenuGroup *menuarray[MaxLayers], *currentmenu;
BOOL UsingMenus = FALSE; SWBOOL UsingMenus = FALSE;
#define MAXDIALOG 2 // Maximum number of dialog strings allowed #define MAXDIALOG 2 // Maximum number of dialog strings allowed
char *dialog[MAXDIALOG]; char *dialog[MAXDIALOG];
@ -556,18 +556,18 @@ int SENSITIVITY = SENSE_MIN + (SENSE_DEFAULT *SENSE_MUL);
UserInput mnu_input, mnu_input_buffered, order_input_buffered; UserInput mnu_input, mnu_input_buffered, order_input_buffered;
// Menu function call back pointer for multiplay menus // Menu function call back pointer for multiplay menus
BOOL(*cust_callback)(UserCall call, MenuItem_p item); SWBOOL(*cust_callback)(UserCall call, MenuItem_p item);
UserCall cust_callback_call; UserCall cust_callback_call;
MenuItem_p cust_callback_item; MenuItem_p cust_callback_item;
// Prototypes /////////////////////////////////////////////////////////////////////////////////// // Prototypes ///////////////////////////////////////////////////////////////////////////////////
static void MNU_ClearDialog(void); static void MNU_ClearDialog(void);
static BOOL MNU_Dialog(void); static SWBOOL MNU_Dialog(void);
VOID LoadSaveMsg(char *msg); void LoadSaveMsg(char *msg);
static VOID MNU_ItemPreProcess(MenuGroup *group); static void MNU_ItemPreProcess(MenuGroup *group);
static void MNU_SelectItem(MenuGroup *group, short index, BOOL draw); static void MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw);
static void MNU_PushItem(MenuItem *item, BOOL draw); static void MNU_PushItem(MenuItem *item, SWBOOL draw);
static int MNU_ControlAxisOffset(int num); static int MNU_ControlAxisOffset(int num);
static int MNU_ControlAxisNum(int offset); static int MNU_ControlAxisNum(int offset);
@ -578,7 +578,7 @@ static int MNU_ControlAxisNum(int offset);
// CUSTOM ROUTINES //////////////////////////////////////////////////////////////////////////////// // CUSTOM ROUTINES ////////////////////////////////////////////////////////////////////////////////
// CTW REMOVED // CTW REMOVED
/* /*
BOOL SWBOOL
MNU_Ten(void) MNU_Ten(void)
{ {
TEN_Setup(); TEN_Setup();
@ -587,7 +587,7 @@ MNU_Ten(void)
} }
*/ */
// CTW REMOVED END // CTW REMOVED END
BOOL SWBOOL
MNU_DoEpisodeSelect(UserCall call, MenuItem *item) MNU_DoEpisodeSelect(UserCall call, MenuItem *item)
{ {
short w,h; short w,h;
@ -604,12 +604,12 @@ MNU_DoEpisodeSelect(UserCall call, MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_DoParentalPassword(UserCall call, MenuItem_p item) MNU_DoParentalPassword(UserCall call, MenuItem_p item)
{ {
short w,h; short w,h;
signed char MNU_InputString(char *, short); signed char MNU_InputString(char *, short);
static BOOL cur_show; static SWBOOL cur_show;
char TempString[80]; char TempString[80];
char *extra_text; char *extra_text;
@ -727,7 +727,7 @@ MNU_DoParentalPassword(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_ParentalCustom(void) MNU_ParentalCustom(void)
{ {
@ -753,7 +753,7 @@ MNU_ParentalCustom(void)
return TRUE; return TRUE;
} }
BOOL MNU_KeySetupCustom(UserCall call, MenuItem *item) SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
{ {
static int currentkey = 0, currentcol = 0; static int currentkey = 0, currentcol = 0;
static int currentmode = 0; static int currentmode = 0;
@ -1067,13 +1067,13 @@ static int MNU_SelectButtonFunction(const char *buttonname, int *currentfunc)
static MenuItem_p mouse_button_item = NULL; static MenuItem_p mouse_button_item = NULL;
static BOOL MNU_MouseButtonPostProcess(MenuItem_p item) static SWBOOL MNU_MouseButtonPostProcess(MenuItem_p item)
{ {
mouse_button_item = item; mouse_button_item = item;
return TRUE; return TRUE;
} }
BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item) SWBOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item)
{ {
static int currentfunc = 0; static int currentfunc = 0;
@ -1136,7 +1136,7 @@ BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item) static SWBOOL MNU_SetMouseButtonFunctions(MenuItem_p item)
{ {
int button, clicked, function; int button, clicked, function;
char *p; char *p;
@ -1173,13 +1173,13 @@ static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item)
static MenuItem_p mouse_digital_item = NULL; static MenuItem_p mouse_digital_item = NULL;
static BOOL MNU_MouseDigitalPostProcess(MenuItem_p item) static SWBOOL MNU_MouseDigitalPostProcess(MenuItem_p item)
{ {
mouse_digital_item = item; mouse_digital_item = item;
return TRUE; return TRUE;
} }
static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item) static SWBOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item)
{ {
static int currentfunc = 0; static int currentfunc = 0;
@ -1227,7 +1227,7 @@ static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item) static SWBOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item)
{ {
int axis; int axis;
char *p; char *p;
@ -1254,7 +1254,7 @@ static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item)
static MenuItem_p joystick_button_item = NULL; static MenuItem_p joystick_button_item = NULL;
static BOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem) static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
{ {
MenuItem_p item; MenuItem_p item;
MenuItem templayer = { DefLayer(0, JoystickButtonNames[0], &joybuttonsgroup), OPT_XS, OPT_LINE(0), 1, m_defshade, 0, NULL, NULL, MNU_JoystickButtonPostProcess }; MenuItem templayer = { DefLayer(0, JoystickButtonNames[0], &joybuttonsgroup), OPT_XS, OPT_LINE(0), 1, m_defshade, 0, NULL, NULL, MNU_JoystickButtonPostProcess };
@ -1364,13 +1364,13 @@ static BOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickButtonPostProcess(MenuItem_p item) static SWBOOL MNU_JoystickButtonPostProcess(MenuItem_p item)
{ {
joystick_button_item = item; joystick_button_item = item;
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item) static SWBOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item)
{ {
static int currentfunc = 0; static int currentfunc = 0;
@ -1434,7 +1434,7 @@ static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item)
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickButtonNextPage(void) static SWBOOL MNU_JoystickButtonNextPage(void)
{ {
JoystickButtonPage = (JoystickButtonPage + 1) % (((joynumbuttons * 2 + (joynumhats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1); JoystickButtonPage = (JoystickButtonPage + 1) % (((joynumbuttons * 2 + (joynumhats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1);
joybuttonssetupgroup.items = &joybuttons_i[JoystickButtonPage][0]; joybuttonssetupgroup.items = &joybuttons_i[JoystickButtonPage][0];
@ -1443,7 +1443,7 @@ static BOOL MNU_JoystickButtonNextPage(void)
return TRUE; return TRUE;
} }
static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item) static SWBOOL MNU_SetJoystickButtonFunctions(MenuItem_p item)
{ {
int button, clicked, function; int button, clicked, function;
char *p; char *p;
@ -1479,7 +1479,7 @@ static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item)
static MenuItem_p joystick_axis_item = NULL; static MenuItem_p joystick_axis_item = NULL;
static BOOL MNU_JoystickAxesInitialise(MenuItem_p mitem) static SWBOOL MNU_JoystickAxesInitialise(MenuItem_p mitem)
{ {
if (!CONTROL_JoyPresent) if (!CONTROL_JoyPresent)
{ {
@ -1500,13 +1500,13 @@ static BOOL MNU_JoystickAxesInitialise(MenuItem_p mitem)
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickAxisPostProcess(MenuItem_p item) static SWBOOL MNU_JoystickAxisPostProcess(MenuItem_p item)
{ {
joystick_axis_item = item; joystick_axis_item = item;
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item) static SWBOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item)
{ {
static int currentfunc = 0; static int currentfunc = 0;
@ -1555,7 +1555,7 @@ static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item)
return TRUE; return TRUE;
} }
static BOOL MNU_JoystickAxisNextPage(void) static SWBOOL MNU_JoystickAxisNextPage(void)
{ {
JoystickAxisPage = (JoystickAxisPage + 1) % MNU_ControlAxisOffset(analog_maxtype); JoystickAxisPage = (JoystickAxisPage + 1) % MNU_ControlAxisOffset(analog_maxtype);
joyaxessetupgroup.cursor = 1; joyaxessetupgroup.cursor = 1;
@ -1564,7 +1564,7 @@ static BOOL MNU_JoystickAxisNextPage(void)
return TRUE; return TRUE;
} }
static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item) static SWBOOL MNU_SetJoystickAxisFunctions(MenuItem_p item)
{ {
int function; int function;
char *p; char *p;
@ -1587,16 +1587,16 @@ static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item)
} }
BOOL SWBOOL
MNU_OrderCustom(UserCall call, MenuItem *item) MNU_OrderCustom(UserCall call, MenuItem *item)
{ {
static signed char on_screen = 0,last_screen = 0; static signed char on_screen = 0,last_screen = 0;
UserInput order_input; UserInput order_input;
static int limitmove=0; static int limitmove=0;
UserInput tst_input; UserInput tst_input;
BOOL select_held = FALSE; SWBOOL select_held = FALSE;
int zero = 0; int zero = 0;
static BOOL DidOrderSound = FALSE; static SWBOOL DidOrderSound = FALSE;
short choose_snd; short choose_snd;
static int wanghandle; static int wanghandle;
@ -1858,14 +1858,14 @@ MNU_OrderCustom(UserCall call, MenuItem *item)
return TRUE; return TRUE;
} }
BOOL MNU_LoadModernDefaults(void) SWBOOL MNU_LoadModernDefaults(void)
{ {
SetDefaultKeyDefinitions(1); SetDefaultKeyDefinitions(1);
SetMouseDefaults(1); SetMouseDefaults(1);
return TRUE; return TRUE;
} }
BOOL MNU_LoadClassicDefaults(void) SWBOOL MNU_LoadClassicDefaults(void)
{ {
SetDefaultKeyDefinitions(0); SetDefaultKeyDefinitions(0);
SetMouseDefaults(0); SetMouseDefaults(0);
@ -1888,7 +1888,7 @@ ExitMenus(void)
SetRedrawScreen(&Player[myconnectindex]); SetRedrawScreen(&Player[myconnectindex]);
} }
BOOL SWBOOL
MNU_StartGame(void) MNU_StartGame(void)
{ {
PLAYERp pp = Player + screenpeek; PLAYERp pp = Player + screenpeek;
@ -1930,16 +1930,16 @@ MNU_StartGame(void)
return TRUE; return TRUE;
} }
VOID ResetMenuInput(VOID) void ResetMenuInput(void)
{ {
cust_callback = NULL; cust_callback = NULL;
InputMode = FALSE; InputMode = FALSE;
} }
BOOL SWBOOL
MNU_StartNetGame(void) MNU_StartNetGame(void)
{ {
extern BOOL ExitLevel, ShortGameMode, DemoInitOnce, FirstTimeIntoGame; extern SWBOOL ExitLevel, ShortGameMode, DemoInitOnce, FirstTimeIntoGame;
extern short Level, Skill; extern short Level, Skill;
// CTW REMOVED // CTW REMOVED
//extern int gTenActivated; //extern int gTenActivated;
@ -2010,7 +2010,7 @@ MNU_StartNetGame(void)
p.TimeLimit = gs.NetTimeLimit; p.TimeLimit = gs.NetTimeLimit;
p.Nuke = gs.NetNuke; p.Nuke = gs.NetNuke;
netbroadcastpacket((BYTEp)(&p), sizeof(p)); // TENSW netbroadcastpacket((uint8_t*)(&p), sizeof(p)); // TENSW
} }
@ -2018,7 +2018,7 @@ MNU_StartNetGame(void)
} }
BOOL SWBOOL
MNU_EpisodeCustom(void) MNU_EpisodeCustom(void)
{ {
EpisodeMenuSelection = currentmenu->cursor; EpisodeMenuSelection = currentmenu->cursor;
@ -2026,12 +2026,12 @@ MNU_EpisodeCustom(void)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_QuitCustom(UserCall call, MenuItem_p item) MNU_QuitCustom(UserCall call, MenuItem_p item)
{ {
int select; int select;
int ret; int ret;
extern BOOL DrawScreen; extern SWBOOL DrawScreen;
// Ignore the special touchup calls // Ignore the special touchup calls
if (call == uc_touchup) if (call == uc_touchup)
@ -2087,15 +2087,15 @@ MNU_QuitCustom(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_QuickLoadCustom(UserCall call, MenuItem_p item) MNU_QuickLoadCustom(UserCall call, MenuItem_p item)
{ {
int select; int select;
extern BOOL ReloadPrompt; extern SWBOOL ReloadPrompt;
int bak; int bak;
PLAYERp pp = Player + myconnectindex; PLAYERp pp = Player + myconnectindex;
extern short GlobInfoStringTime; extern short GlobInfoStringTime;
extern BOOL DrawScreen; extern SWBOOL DrawScreen;
int ret; int ret;
if (cust_callback == NULL) if (cust_callback == NULL)
@ -2595,7 +2595,7 @@ MNU_InputSmallString(char *name, short pix_width)
//////////////////////////////////////////////// ////////////////////////////////////////////////
// Draw dialog text on screen // Draw dialog text on screen
//////////////////////////////////////////////// ////////////////////////////////////////////////
static BOOL static SWBOOL
MNU_Dialog(void) MNU_Dialog(void)
{ {
short ndx, linecnt, w[MAXDIALOG], h, x, y; short ndx, linecnt, w[MAXDIALOG], h, x, y;
@ -2695,7 +2695,7 @@ MNU_InputString(char *name, short pix_width)
#define SS_YSTART SD_YSTART #define SS_YSTART SD_YSTART
#define SS_BORDER_SIZE 5L #define SS_BORDER_SIZE 5L
VOID LoadSaveMsg(char *msg) void LoadSaveMsg(char *msg)
{ {
short w,h; short w,h;
@ -2716,7 +2716,7 @@ VOID LoadSaveMsg(char *msg)
// I'm figuring it need to do the following: // I'm figuring it need to do the following:
// . Load the game if there is one by calling: MNU_LoadGameCustom. // . Load the game if there is one by calling: MNU_LoadGameCustom.
//////////////////////////////////////////////// ////////////////////////////////////////////////
BOOL SWBOOL
MNU_GetLoadCustom(void) MNU_GetLoadCustom(void)
{ {
short load_num; short load_num;
@ -2783,11 +2783,11 @@ MNU_GetLoadCustom(void)
// . Call MNU_GetInput to allow string input of description. // . Call MNU_GetInput to allow string input of description.
// . Save the game if there is one by calling: MNU_SaveGameCustom. // . Save the game if there is one by calling: MNU_SaveGameCustom.
//////////////////////////////////////////////// ////////////////////////////////////////////////
BOOL SWBOOL
MNU_GetSaveCustom(void) MNU_GetSaveCustom(void)
{ {
short save_num; short save_num;
extern BOOL InMenuLevel, LoadGameOutsideMoveLoop; extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop;
save_num = currentmenu->cursor; save_num = currentmenu->cursor;
@ -2837,7 +2837,7 @@ MNU_GetSaveCustom(void)
// This function gets called each frame by DrawMenus // This function gets called each frame by DrawMenus
//////////////////////////////////////////////// ////////////////////////////////////////////////
static BOOL static SWBOOL
MNU_DrawLoadSave(short game_num) MNU_DrawLoadSave(short game_num)
{ {
// screen border // screen border
@ -2858,14 +2858,14 @@ MNU_DrawLoadSave(short game_num)
static char SaveGameInfo1[80]; static char SaveGameInfo1[80];
static char SaveGameInfo2[80]; static char SaveGameInfo2[80];
BOOL SWBOOL
MNU_LoadSaveMove(UserCall call, MenuItem_p item) MNU_LoadSaveMove(UserCall call, MenuItem_p item)
{ {
short i; short i;
short game_num; short game_num;
short tile; short tile;
static short SaveGameEpisode, SaveGameLevel, SaveGameSkill; static short SaveGameEpisode, SaveGameLevel, SaveGameSkill;
BOOL GotInput = FALSE; SWBOOL GotInput = FALSE;
if (!UsingMenus) if (!UsingMenus)
return TRUE; return TRUE;
@ -2967,7 +2967,7 @@ MNU_LoadSaveMove(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_LoadSaveDraw(UserCall call, MenuItem_p item) MNU_LoadSaveDraw(UserCall call, MenuItem_p item)
{ {
short i; short i;
@ -2984,7 +2984,7 @@ MNU_LoadSaveDraw(UserCall call, MenuItem_p item)
{ {
if (i == game_num && MenuInputMode && !SavePrompt) if (i == game_num && MenuInputMode && !SavePrompt)
{ {
static BOOL cur_show; static SWBOOL cur_show;
char tmp[sizeof(SaveGameDescr[0])]; char tmp[sizeof(SaveGameDescr[0])];
//cur_show ^= 1; //cur_show ^= 1;
@ -3034,7 +3034,7 @@ MNU_LoadSaveDraw(UserCall call, MenuItem_p item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_ShareWareCheck(MenuItem *item) MNU_ShareWareCheck(MenuItem *item)
{ {
if (SW_SHAREWARE) if (SW_SHAREWARE)
@ -3045,7 +3045,7 @@ MNU_ShareWareCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_CheckUserMap(MenuItem *item) MNU_CheckUserMap(MenuItem *item)
{ {
if (UserMapName[0] == '\0') if (UserMapName[0] == '\0')
@ -3055,7 +3055,7 @@ MNU_CheckUserMap(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_ShareWareMessage(MenuItem *item) MNU_ShareWareMessage(MenuItem *item)
{ {
char *extra_text; char *extra_text;
@ -3086,11 +3086,11 @@ MNU_ShareWareMessage(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_SaveGameCheck(MenuItem *item) MNU_SaveGameCheck(MenuItem *item)
{ {
extern BOOL InMenuLevel; extern SWBOOL InMenuLevel;
extern BOOL DemoMode; extern SWBOOL DemoMode;
if (0) // JBF: Until we fix the symbol table dilemma, saving is off limits if (0) // JBF: Until we fix the symbol table dilemma, saving is off limits
{ {
@ -3118,7 +3118,7 @@ MNU_SaveGameCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_TenCheck(MenuItem *item) MNU_TenCheck(MenuItem *item)
{ {
if (CommEnabled || numplayers > 1) if (CommEnabled || numplayers > 1)
@ -3130,7 +3130,7 @@ MNU_TenCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_LoadGameCheck(MenuItem *item) MNU_LoadGameCheck(MenuItem *item)
{ {
@ -3149,7 +3149,7 @@ MNU_LoadGameCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_StatCheck(MenuItem *item) MNU_StatCheck(MenuItem *item)
{ {
if (CommEnabled || numplayers > 1) if (CommEnabled || numplayers > 1)
@ -3161,7 +3161,7 @@ MNU_StatCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_HurtTeammateCheck(MenuItem *item) MNU_HurtTeammateCheck(MenuItem *item)
{ {
switch (gs.NetGameType+1) switch (gs.NetGameType+1)
@ -3183,7 +3183,7 @@ MNU_HurtTeammateCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_TeamPlayCheck(MenuItem *item) MNU_TeamPlayCheck(MenuItem *item)
{ {
switch (gs.NetGameType+1) switch (gs.NetGameType+1)
@ -3200,7 +3200,7 @@ MNU_TeamPlayCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_CoopPlayCheck(MenuItem *item) MNU_CoopPlayCheck(MenuItem *item)
{ {
switch (gs.NetGameType+1) switch (gs.NetGameType+1)
@ -3217,7 +3217,7 @@ MNU_CoopPlayCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_TeamPlayChange(void) MNU_TeamPlayChange(void)
{ {
// if team play changes then do a pre process again // if team play changes then do a pre process again
@ -3225,7 +3225,7 @@ MNU_TeamPlayChange(void)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_MouseCheck(MenuItem *item) MNU_MouseCheck(MenuItem *item)
{ {
if (!CONTROL_MousePresent) if (!CONTROL_MousePresent)
@ -3240,7 +3240,7 @@ MNU_MouseCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_JoystickCheck(MenuItem *item) MNU_JoystickCheck(MenuItem *item)
{ {
if (!CONTROL_JoyPresent) if (!CONTROL_JoyPresent)
@ -3256,7 +3256,7 @@ MNU_JoystickCheck(MenuItem *item)
} }
// This is only called when Enter is pressed // This is only called when Enter is pressed
static BOOL static SWBOOL
MNU_TryMusicInit(void) MNU_TryMusicInit(void)
{ {
if (PlaySong(0, RedBookSong[Level], TRUE, FALSE)) if (PlaySong(0, RedBookSong[Level], TRUE, FALSE))
@ -3268,7 +3268,7 @@ MNU_TryMusicInit(void)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_MusicCheck(MenuItem *item) MNU_MusicCheck(MenuItem *item)
{ {
if (SW_SHAREWARE) if (SW_SHAREWARE)
@ -3299,7 +3299,7 @@ MNU_MusicCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_FxCheck(MenuItem *item) MNU_FxCheck(MenuItem *item)
{ {
if (FXDevice < 0 || !FxInitialized) if (FXDevice < 0 || !FxInitialized)
@ -3314,7 +3314,7 @@ MNU_FxCheck(MenuItem *item)
return TRUE; return TRUE;
} }
BOOL SWBOOL
MNU_MusicFxCheck(MenuItem *item) MNU_MusicFxCheck(MenuItem *item)
{ {
if (FXDevice < 0 && MusicDevice < 0) if (FXDevice < 0 && MusicDevice < 0)
@ -3333,10 +3333,10 @@ MNU_MusicFxCheck(MenuItem *item)
// Do a toggle button // Do a toggle button
//////////////////////////////////////////////// ////////////////////////////////////////////////
void void
MNU_DoButton(MenuItem_p item, BOOL draw) MNU_DoButton(MenuItem_p item, SWBOOL draw)
{ {
int x, y; int x, y;
BOOL state; SWBOOL state;
int last_value; int last_value;
short shade = MENU_SHADE_DEFAULT; short shade = MENU_SHADE_DEFAULT;
extern char LevelSong[]; extern char LevelSong[];
@ -3344,7 +3344,7 @@ MNU_DoButton(MenuItem_p item, BOOL draw)
PLAYERp pp = &Player[myconnectindex]; PLAYERp pp = &Player[myconnectindex];
int button_x,zero=0; int button_x,zero=0;
int handle=0; int handle=0;
extern BOOL MusicInitialized,FxInitialized; extern SWBOOL MusicInitialized,FxInitialized;
button_x = OPT_XSIDE; button_x = OPT_XSIDE;
@ -3430,7 +3430,7 @@ MNU_DoButton(MenuItem_p item, BOOL draw)
gs.MusicOn = state = buttonsettings[item->button]; gs.MusicOn = state = buttonsettings[item->button];
if (gs.MusicOn != last_value) if (gs.MusicOn != last_value)
{ {
BOOL bak; SWBOOL bak;
if (gs.MusicOn) if (gs.MusicOn)
{ {
@ -3611,7 +3611,7 @@ char *playercolors[] = {"Brown","Gray","Purple","Red","Yellow","Olive","Green","
char *monsterskills[] = {"No Monsters","Easy","Normal","Hard","Insane!"}; char *monsterskills[] = {"No Monsters","Easy","Normal","Hard","Insane!"};
void void
MNU_DoSlider(short dir, MenuItem_p item, BOOL draw) MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw)
{ {
short offset, i, barwidth; short offset, i, barwidth;
int x, y, knobx; int x, y, knobx;
@ -4154,7 +4154,7 @@ MNU_SetupGroup(void)
MNU_DrawMenu(); MNU_DrawMenu();
} }
static VOID static void
MNU_ItemPreProcess(MenuGroup *group) MNU_ItemPreProcess(MenuGroup *group)
{ {
MenuItem *item; MenuItem *item;
@ -4171,7 +4171,7 @@ MNU_ItemPreProcess(MenuGroup *group)
} }
} }
VOID void
MNU_ItemPostProcess(MenuGroup *group) MNU_ItemPostProcess(MenuGroup *group)
{ {
MenuItem *item; MenuItem *item;
@ -4445,7 +4445,7 @@ MNU_DrawMenu(void)
// Select a menu item // Select a menu item
//////////////////////////////////////////////// ////////////////////////////////////////////////
void void
MNU_SelectItem(MenuGroup *group, short index, BOOL draw) MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw)
{ {
MenuItem *item; MenuItem *item;
@ -4468,7 +4468,7 @@ MNU_SelectItem(MenuGroup *group, short index, BOOL draw)
// Toggle a menu radio button on/off // Toggle a menu radio button on/off
//////////////////////////////////////////////// ////////////////////////////////////////////////
static void static void
MNU_PushItem(MenuItem *item, BOOL draw) MNU_PushItem(MenuItem *item, SWBOOL draw)
{ {
if (item->type != mt_button) if (item->type != mt_button)
return; return;
@ -4526,7 +4526,7 @@ MNU_PrevItem(void)
//////////////////////////////////////////////// ////////////////////////////////////////////////
// Find hotkey press on current menu, if any. // Find hotkey press on current menu, if any.
//////////////////////////////////////////////// ////////////////////////////////////////////////
static BOOL static SWBOOL
MNU_DoHotkey(void) MNU_DoHotkey(void)
{ {
MenuItem_p item; MenuItem_p item;
@ -4575,12 +4575,12 @@ SetupMenu(void)
void MNU_DoMenu(CTLType type, PLAYERp pp) void MNU_DoMenu(CTLType type, PLAYERp pp)
{ {
BOOL resetitem; SWBOOL resetitem;
UCHAR key; UCHAR key;
int zero = 0; int zero = 0;
static int handle2 = 0; static int handle2 = 0;
static int limitmove=0; static int limitmove=0;
static BOOL select_held=FALSE; static SWBOOL select_held=FALSE;
resetitem = TRUE; resetitem = TRUE;
@ -4602,7 +4602,7 @@ void MNU_DoMenu(CTLType type, PLAYERp pp)
if (!MenuInputMode) if (!MenuInputMode)
{ {
UserInput tst_input; UserInput tst_input;
BOOL select_held = FALSE; SWBOOL select_held = FALSE;
// Zero out the input structure // Zero out the input structure
@ -4720,7 +4720,7 @@ void MNU_DoMenu(CTLType type, PLAYERp pp)
void void
MNU_CheckForMenus(void) MNU_CheckForMenus(void)
{ {
extern BOOL GamePaused; extern SWBOOL GamePaused;
if (UsingMenus) if (UsingMenus)
{ {
@ -5263,7 +5263,7 @@ DoPaletteFlash(PLAYERp pp)
} }
VOID ResetPalette(PLAYERp pp) void ResetPalette(PLAYERp pp)
{ {
if (getrendermode() < 3) if (getrendermode() < 3)
COVERsetbrightness(gs.Brightness,&palette_data[0][0]); COVERsetbrightness(gs.Brightness,&palette_data[0][0]);

View file

@ -39,11 +39,11 @@ typedef enum
ct_quitmenu, ct_ordermenu, ct_episodemenu, ct_max ct_quitmenu, ct_ordermenu, ct_episodemenu, ct_max
} CTLType; } CTLType;
extern BOOL UsingMenus; extern SWBOOL UsingMenus;
extern int SENSITIVITY; extern int SENSITIVITY;
extern CTLType ControlPanelType; extern CTLType ControlPanelType;
extern SHORT MenuTextShade; extern int16_t MenuTextShade;
extern SHORT MenuTextPalette; extern int16_t MenuTextPalette;
// Prototypes // Prototypes
//void MNU_DoMenu( CTLType type, PLAYERp pp ); //void MNU_DoMenu( CTLType type, PLAYERp pp );
@ -67,10 +67,10 @@ void MNU_DrawStringLarge(short x, short y, const char *string);
//void Fade_Timer(int clicks); //void Fade_Timer(int clicks);
void FadeIn(unsigned char targetcolor, unsigned int clicks); void FadeIn(unsigned char targetcolor, unsigned int clicks);
void FadeOut(unsigned char targetcolor, unsigned int clicks); void FadeOut(unsigned char targetcolor, unsigned int clicks);
VOID ResetPalette(PLAYERp pp); void ResetPalette(PLAYERp pp);
void ExitMenus(void); void ExitMenus(void);
VOID ResetMenuInput(VOID); void ResetMenuInput(void);
#define BUTTONSET(x,value) \ #define BUTTONSET(x,value) \
( \ ( \
@ -79,9 +79,9 @@ VOID ResetMenuInput(VOID);
(CONTROL_ButtonState1 |= (value<<(x))) \ (CONTROL_ButtonState1 |= (value<<(x))) \
) )
extern BOOL BorderAdjust; extern SWBOOL BorderAdjust;
extern int FXDevice,MusicDevice; extern int FXDevice,MusicDevice;
extern BOOL MultiPlayQuitFlag; extern SWBOOL MultiPlayQuitFlag;
// Make memcpy an intrinsic function for an easy frame rate boost // Make memcpy an intrinsic function for an easy frame rate boost
//#pragma intrinsic( memcpy ); //#pragma intrinsic( memcpy );
@ -259,10 +259,10 @@ typedef struct MENU_ITEM
short pic; // Startpic to use short pic; // Startpic to use
char shade; // Shade of pic char shade; // Shade of pic
int tics; // Ticcount for item int tics; // Ticcount for item
BOOL(*custom)(void); // Work function on item select SWBOOL(*custom)(void); // Work function on item select
BOOL (*preprocess)(struct MENU_ITEM *); SWBOOL (*preprocess)(struct MENU_ITEM *);
BOOL (*postprocess)(struct MENU_ITEM *); // Can do things on items select SWBOOL (*postprocess)(struct MENU_ITEM *); // Can do things on items select
} MenuItem, *MenuItem_p; } MenuItem, *MenuItem_p;
typedef struct typedef struct
@ -275,8 +275,8 @@ typedef struct
// anim sequence if animated. // anim sequence if animated.
char shade; // Title pic shade char shade; // Title pic shade
BOOL(*draw_custom)(UserCall, MenuItem *); // Custom routine SWBOOL(*draw_custom)(UserCall, MenuItem *); // Custom routine
BOOL(*move_custom)(UserCall, MenuItem *); // Custom routine SWBOOL(*move_custom)(UserCall, MenuItem *); // Custom routine
short cursor; // This is the current menu item the short cursor; // This is the current menu item the
// cursor is resting on. // cursor is resting on.
@ -284,37 +284,37 @@ typedef struct
// Custom Routine Prototypes //////////////////////////////////////////////////////////////////// // Custom Routine Prototypes ////////////////////////////////////////////////////////////////////
BOOL MNU_QuitCustom(UserCall call, MenuItem *item); SWBOOL MNU_QuitCustom(UserCall call, MenuItem *item);
BOOL MNU_QuickLoadCustom(UserCall call, MenuItem *item); SWBOOL MNU_QuickLoadCustom(UserCall call, MenuItem *item);
BOOL MNU_LoadSaveTouchupCustom(UserCall call, MenuItem *item); SWBOOL MNU_LoadSaveTouchupCustom(UserCall call, MenuItem *item);
BOOL MNU_DoParentalPassword(UserCall call, MenuItem *item); SWBOOL MNU_DoParentalPassword(UserCall call, MenuItem *item);
BOOL MNU_OrderCustom(UserCall call, MenuItem *item); SWBOOL MNU_OrderCustom(UserCall call, MenuItem *item);
BOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item); SWBOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item);
BOOL MNU_MusicFxCheck(MenuItem_p item); SWBOOL MNU_MusicFxCheck(MenuItem_p item);
BOOL MNU_MusicCheck(MenuItem_p item); SWBOOL MNU_MusicCheck(MenuItem_p item);
BOOL MNU_FxCheck(MenuItem_p item); SWBOOL MNU_FxCheck(MenuItem_p item);
BOOL MNU_MouseCheck(MenuItem_p item); SWBOOL MNU_MouseCheck(MenuItem_p item);
BOOL MNU_JoystickCheck(MenuItem_p item); SWBOOL MNU_JoystickCheck(MenuItem_p item);
BOOL MNU_BorderCheck(MenuItem_p item); SWBOOL MNU_BorderCheck(MenuItem_p item);
BOOL MNU_ShareWareCheck(MenuItem_p item); SWBOOL MNU_ShareWareCheck(MenuItem_p item);
BOOL MNU_MenuLevelCheck(MenuItem_p item); SWBOOL MNU_MenuLevelCheck(MenuItem_p item);
BOOL MNU_ShareWareMessage(MenuItem_p item); SWBOOL MNU_ShareWareMessage(MenuItem_p item);
// Custom MenuItem Routines ///////////////////////////////////////////////////////////////////// // Custom MenuItem Routines /////////////////////////////////////////////////////////////////////
BOOL MNU_StartGame(void); SWBOOL MNU_StartGame(void);
BOOL MNU_StartNetGame(void); SWBOOL MNU_StartNetGame(void);
BOOL MNU_EpisodeCustom(void); SWBOOL MNU_EpisodeCustom(void);
BOOL MNU_GetDescripCustom(void); SWBOOL MNU_GetDescripCustom(void);
BOOL MNU_LoadGameCustom(void); SWBOOL MNU_LoadGameCustom(void);
BOOL MNU_SaveGameCustom(void); SWBOOL MNU_SaveGameCustom(void);
BOOL MNU_GetLoadCustom(void); SWBOOL MNU_GetLoadCustom(void);
BOOL MNU_GetSaveCustom(void); SWBOOL MNU_GetSaveCustom(void);
BOOL MNU_ParentalCustom(void); SWBOOL MNU_ParentalCustom(void);
BOOL MNU_KeySetupCustom(UserCall call, MenuItem *item); SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item);
BOOL MNU_LoadModernDefaults(void); SWBOOL MNU_LoadModernDefaults(void);
BOOL MNU_LoadClassicDefaults(void); SWBOOL MNU_LoadClassicDefaults(void);
// Menu Definitions ///////////////////////////////////////////////////////////////////////////// // Menu Definitions /////////////////////////////////////////////////////////////////////////////

View file

@ -156,7 +156,7 @@ int DoToiletGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int handle=0; static int handle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -217,7 +217,7 @@ int NullToiletGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -404,7 +404,7 @@ int DoWashGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int handle=0; static int handle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -472,7 +472,7 @@ int NullWashGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -745,7 +745,7 @@ int PachinkoLightOperate(short SpriteNum)
// PACHINKO MACHINE #1 // PACHINKO MACHINE #1
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
BOOL Pachinko_Win_Cheat = FALSE; SWBOOL Pachinko_Win_Cheat = FALSE;
ATTRIBUTE Pachinko1Attrib = ATTRIBUTE Pachinko1Attrib =
{ {
@ -1291,7 +1291,7 @@ int DoCarGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int handle=0; static int handle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1342,7 +1342,7 @@ int NullCarGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -1518,7 +1518,7 @@ int DoMechanicGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int handle=0; static int handle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1569,7 +1569,7 @@ int NullMechanicGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);
@ -1746,7 +1746,7 @@ int DoSailorGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int handle=0; static int handle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -1801,7 +1801,7 @@ int NullSailorGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
static short alreadythrew = 0; static short alreadythrew = 0;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
@ -1966,7 +1966,7 @@ int DoPruneGirl(short SpriteNum)
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
short rnd_range = 0; short rnd_range = 0;
static int madhandle=0,coyhandle=0; static int madhandle=0,coyhandle=0;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,SPRITEp_MID(u->tgt_sp),u->tgt_sp->sectnum);
@ -2031,7 +2031,7 @@ int NullPruneGirl(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
BOOL ICanSee = FALSE; SWBOOL ICanSee = FALSE;
DoActorPickClosePlayer(SpriteNum); DoActorPickClosePlayer(SpriteNum);
ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum); ICanSee = FAFcansee(sp->x,sp->y,SPRITEp_MID(sp),sp->sectnum,u->tgt_sp->x,u->tgt_sp->y,u->tgt_sp->z,u->tgt_sp->sectnum);

View file

@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "player.h" #include "player.h"
#include "game.h" #include "game.h"
VOID ScaleSectorObject(SECTOR_OBJECTp); void ScaleSectorObject(SECTOR_OBJECTp);
short short
DoSectorObjectSetScale(short match) DoSectorObjectSetScale(short match)
@ -185,7 +185,7 @@ DoSOevent(short match, short state)
// SCALING - PreAnimator // SCALING - PreAnimator
// //
VOID ScaleSectorObject(SECTOR_OBJECTp sop) void ScaleSectorObject(SECTOR_OBJECTp sop)
{ {
switch (sop->scale_type) switch (sop->scale_type)
{ {
@ -252,7 +252,7 @@ VOID ScaleSectorObject(SECTOR_OBJECTp sop)
} }
} }
VOID ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int *dx, int *dy) void ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int *dx, int *dy)
{ {
int xmul,ymul; int xmul,ymul;
@ -293,7 +293,7 @@ VOID ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int
// Morph point - move point around // Morph point - move point around
// //
VOID void
MorphTornado(SECTOR_OBJECTp sop) MorphTornado(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;
@ -375,7 +375,7 @@ MorphTornado(SECTOR_OBJECTp sop)
} }
// moves center point around and aligns slope // moves center point around and aligns slope
VOID void
MorphFloor(SECTOR_OBJECTp sop) MorphFloor(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;
@ -455,7 +455,7 @@ MorphFloor(SECTOR_OBJECTp sop)
} }
} }
VOID void
SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z) SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
@ -471,7 +471,7 @@ SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
} }
VOID void
SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z) SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
@ -487,7 +487,7 @@ SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
} }
VOID void
SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z) SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
@ -505,7 +505,7 @@ SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
// moves center point around and aligns slope // moves center point around and aligns slope
VOID void
SpikeFloor(SECTOR_OBJECTp sop) SpikeFloor(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;

View file

@ -28,40 +28,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define TYPES_H #define TYPES_H
// CTW ADDITION (from Duke 3d TYPES.H) #ifndef FALSE
typedef unsigned char uint8;
typedef uint8 byte;
typedef signed char int8;
typedef unsigned short int uint16;
typedef uint16 word;
typedef short int int16;
typedef unsigned int uint32;
typedef int int32;
typedef uint32 dword;
typedef int32 fixed;
typedef int32 boolean;
typedef float float32;
typedef double float64;
//typedef long double float128;
typedef float64 appfloat;
#define MAXINT32 0x7fffffff
#define MININT32 -0x80000000
#define MAXUINT32 0xffffffff
#define MINUINT32 0
#define MAXINT16 0x7fff
#define MININT16 -0x8000
#define MAXUINT16 0xffff
#define MINUINT16 0
// CTW ADDITION END
#define FALSE 0 #define FALSE 0
#endif
#ifndef TRUE
#define TRUE (!FALSE) #define TRUE (!FALSE)
#endif
#ifndef NULL #ifndef NULL
#define NULL 0 #define NULL 0
#endif #endif
@ -69,135 +41,7 @@ typedef float64 appfloat;
#define OFF 0 #define OFF 0
#define ON (!OFF) #define ON (!OFF)
typedef unsigned char BOOL; typedef unsigned char SWBOOL;
typedef BOOL *BOOLp;
typedef BOOL *fBOOLp;
typedef signed char CHAR;
typedef CHAR *CHARp;
typedef CHAR *fCHARp;
#define MINCHAR ((CHAR) -128)
#define MAXCHAR ((CHAR) 127)
typedef short SHORT;
typedef SHORT *SHORTp;
typedef SHORT *fSHORTp;
typedef unsigned short USHORT;
typedef USHORT *USHORTp;
typedef USHORT *fUSHORTp;
typedef unsigned char UCHAR;
typedef UCHAR *UCHARp;
typedef UCHAR *fUCHARp;
#define MINUCHAR ((UCHAR) 0)
#define MAXUCHAR ((UCHAR) 255)
typedef UCHARp TEXT;
typedef fUCHARp fTEXT;
typedef UCHAR BYTE;
typedef BYTE *BYTEp;
typedef BYTE *fBYTEp;
#define MINBYTE ((BYTE) 0)
#define MAXBYTE ((BYTE) 255)
typedef int INT;
typedef int *INTp;
typedef int *fINTp;
#define MININT (-32768)
#define MAXINT 32767
typedef unsigned int WORD;
typedef WORD *WORDp;
typedef WORD *fWORDp;
#define MINWORD ((WORD) 0)
#define MAXWORD ((WORD) 65535U)
typedef int LONG;
typedef LONG *LONGp;
typedef LONG *fLONGp;
typedef
union
{
LONG l;
struct
{
WORD lsw;
WORD msw;
} w;
} DD, * DDp, * fDDp;
#define MINLONG (-2147483648L)
#define MAXLONG (2147483647L)
typedef unsigned int ULONG;
typedef ULONG *ULONGp;
typedef ULONG *fULONGp;
#define MINULONG (0L)
#define MAXULONG (ULONG(-1))
typedef float FLOAT;
typedef FLOAT *FLOATp;
typedef FLOAT *fFLOATp;
#define VOID void
typedef VOID *nPTR;
typedef VOID *fPTR;
#if 0
#define FN pascal
#define fFN pascal
#define cFN cdecl
#define fcFN cdecl
#else
#define FN
#define fFN
#define cFN
#define fcFN
#endif
typedef VOID FN VOIDfn (VOID);
typedef BOOL FN BOOLfn (VOID);
typedef CHAR FN CHARfn (VOID);
typedef SHORT FN SHORTfn (VOID);
typedef UCHAR FN UCHARfn (VOID);
typedef TEXT FN TEXTfn (VOID);
typedef fTEXT FN fTEXTfn (VOID);
typedef BYTE FN BYTEfn (VOID);
typedef int FN INTfn (VOID);
typedef WORD FN WORDfn (VOID);
typedef LONG FN LONGfn (VOID);
typedef ULONG FN ULONGfn (VOID);
typedef VOID fFN VOIDfFN (VOID);
typedef BOOL fFN BOOLfFN (VOID);
typedef CHAR fFN CHARfFN (VOID);
typedef SHORT fFN SHORTfFN (VOID);
typedef UCHAR fFN UCHARfFN (VOID);
typedef TEXT fFN TEXTfFN (VOID);
typedef fTEXT fFN fTEXTfFN (VOID);
typedef BYTE fFN BYTEfFN (VOID);
typedef int fFN INTfFN (VOID);
typedef WORD fFN WORDfFN (VOID);
typedef LONG fFN LONGfFN (VOID);
typedef ULONG fFN ULONGfFN (VOID);
/* /*
=========================== ===========================

View file

@ -62,9 +62,9 @@ SYNC BUG NOTES:
//#undef MAXSYNCBYTES //#undef MAXSYNCBYTES
//#define MAXSYNCBYTES 16 //#define MAXSYNCBYTES 16
BYTE tempbuf[576], packbuf[576]; uint8_t tempbuf[576], packbuf[576];
int PlayClock; int PlayClock;
extern BOOL PauseKeySet; extern SWBOOL PauseKeySet;
extern char CommPlayerName[32]; extern char CommPlayerName[32];
gNET gNet; gNET gNet;
@ -80,16 +80,16 @@ SW_PACKET loc;
//SW_PACKET oloc; //SW_PACKET oloc;
BOOL ready2send = 0; SWBOOL ready2send = 0;
BOOL CommEnabled = FALSE; SWBOOL CommEnabled = FALSE;
BYTE CommPlayers = 0; uint8_t CommPlayers = 0;
int movefifoplc, movefifosendplc; //, movefifoend[MAX_SW_PLAYERS]; int movefifoplc, movefifosendplc; //, movefifoend[MAX_SW_PLAYERS];
unsigned int MoveThingsCount; unsigned int MoveThingsCount;
//int myminlag[MAX_SW_PLAYERS]; //int myminlag[MAX_SW_PLAYERS];
int mymaxlag, otherminlag, bufferjitter = 1; int mymaxlag, otherminlag, bufferjitter = 1;
extern CHAR sync_first[MAXSYNCBYTES][60]; extern int8_t sync_first[MAXSYNCBYTES][60];
extern int sync_found; extern int sync_found;
// //
@ -97,21 +97,21 @@ extern int sync_found;
// //
typedef struct typedef struct
{ {
LONG vel; int32_t vel;
LONG svel; int32_t svel;
LONG angvel; int32_t angvel;
LONG aimvel; int32_t aimvel;
LONG bits; int32_t bits;
} SW_AVERAGE_PACKET; } SW_AVERAGE_PACKET;
int MovesPerPacket = 1; int MovesPerPacket = 1;
SW_AVERAGE_PACKET AveragePacket; SW_AVERAGE_PACKET AveragePacket;
// GAME.C sync state variables // GAME.C sync state variables
BYTE syncstat[MAXSYNCBYTES]; uint8_t syncstat[MAXSYNCBYTES];
//int syncvalhead[MAX_SW_PLAYERS]; //int syncvalhead[MAX_SW_PLAYERS];
int syncvaltail, syncvaltottail; int syncvaltail, syncvaltottail;
void GetSyncInfoFromPacket(BYTEp packbuf, int packbufleng, int *j, int otherconnectindex); void GetSyncInfoFromPacket(uint8_t* packbuf, int packbufleng, int *j, int otherconnectindex);
// when you set totalclock to 0 also set this one // when you set totalclock to 0 also set this one
int ototalclock; int ototalclock;
@ -120,14 +120,14 @@ int save_totalclock;
// must start out as 0 // must start out as 0
BOOL GamePaused = FALSE; SWBOOL GamePaused = FALSE;
BOOL NetBroadcastMode = TRUE; SWBOOL NetBroadcastMode = TRUE;
BOOL NetModeOverride = FALSE; SWBOOL NetModeOverride = FALSE;
void netsendpacket(int ind, BYTEp buf, int len) void netsendpacket(int ind, uint8_t* buf, int len)
{ {
BYTE bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)]; uint8_t bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)];
PACKET_PROXYp prx = (PACKET_PROXYp)bbuf; PACKET_PROXYp prx = (PACKET_PROXYp)bbuf;
int i; int i;
@ -146,7 +146,7 @@ void netsendpacket(int ind, BYTEp buf, int len)
buildputs("\n"); buildputs("\n");
prx->PacketType = PACKET_TYPE_PROXY; prx->PacketType = PACKET_TYPE_PROXY;
prx->PlayerIndex = (BYTE)ind; prx->PlayerIndex = (uint8_t)ind;
memcpy(&prx[1], buf, len); // &prx[1] == (char*)prx + sizeof(PACKET_PROXY) memcpy(&prx[1], buf, len); // &prx[1] == (char*)prx + sizeof(PACKET_PROXY)
len += sizeof(PACKET_PROXY); len += sizeof(PACKET_PROXY);
@ -162,10 +162,10 @@ void netsendpacket(int ind, BYTEp buf, int len)
buildputs("\n"); buildputs("\n");
} }
void netbroadcastpacket(BYTEp buf, int len) void netbroadcastpacket(uint8_t* buf, int len)
{ {
int i; int i;
BYTE bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)]; uint8_t bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)];
PACKET_PROXYp prx = (PACKET_PROXYp)bbuf; PACKET_PROXYp prx = (PACKET_PROXYp)bbuf;
// broadcast via master if in M/S mode and we are not the master // broadcast via master if in M/S mode and we are not the master
@ -183,7 +183,7 @@ void netbroadcastpacket(BYTEp buf, int len)
buildputs("\n"); buildputs("\n");
prx->PacketType = PACKET_TYPE_PROXY; prx->PacketType = PACKET_TYPE_PROXY;
prx->PlayerIndex = (BYTE)(-1); prx->PlayerIndex = (uint8_t)(-1);
memcpy(&prx[1], buf, len); memcpy(&prx[1], buf, len);
len += sizeof(PACKET_PROXY); len += sizeof(PACKET_PROXY);
@ -203,7 +203,7 @@ void netbroadcastpacket(BYTEp buf, int len)
buildputs("\n"); buildputs("\n");
} }
int netgetpacket(int *ind, BYTEp buf) int netgetpacket(int *ind, uint8_t* buf)
{ {
int i; int i;
int len; int len;
@ -233,12 +233,12 @@ int netgetpacket(int *ind, BYTEp buf)
{ {
// I am the master // I am the master
if (prx->PlayerIndex == (BYTE)(-1)) if (prx->PlayerIndex == (uint8_t)(-1))
{ {
// broadcast // broadcast
// Rewrite the player index to be the sender's connection number // Rewrite the player index to be the sender's connection number
prx->PlayerIndex = (BYTE)*ind; prx->PlayerIndex = (uint8_t)*ind;
// Transmit to all the other players except ourselves and the sender // Transmit to all the other players except ourselves and the sender
for (i = connecthead; i >= 0; i = connectpoint2[i]) for (i = connecthead; i >= 0; i = connectpoint2[i])
@ -260,7 +260,7 @@ int netgetpacket(int *ind, BYTEp buf)
i = prx->PlayerIndex; i = prx->PlayerIndex;
// Rewrite the player index to be the sender's connection number // Rewrite the player index to be the sender's connection number
prx->PlayerIndex = (BYTE)*ind; prx->PlayerIndex = (uint8_t)*ind;
// Transmit to the intended recipient // Transmit to the intended recipient
if (i == myconnectindex) if (i == myconnectindex)
@ -291,9 +291,9 @@ int netgetpacket(int *ind, BYTEp buf)
} }
int EncodeBits(SW_PACKET *pak, SW_PACKET *old_pak, BYTEp buf) int EncodeBits(SW_PACKET *pak, SW_PACKET *old_pak, uint8_t* buf)
{ {
BYTEp base_ptr = buf; uint8_t* base_ptr = buf;
unsigned i; unsigned i;
// skipping the bits field sync test fake byte (Ed. Ken) // skipping the bits field sync test fake byte (Ed. Ken)
@ -342,9 +342,9 @@ int EncodeBits(SW_PACKET *pak, SW_PACKET *old_pak, BYTEp buf)
return buf - base_ptr; return buf - base_ptr;
} }
int DecodeBits(SW_PACKET *pak, SW_PACKET *old_pak, BYTEp buf) int DecodeBits(SW_PACKET *pak, SW_PACKET *old_pak, uint8_t* buf)
{ {
BYTEp base_ptr = buf; uint8_t* base_ptr = buf;
unsigned i; unsigned i;
// skipping the bits field sync test fake byte (Ed. Ken) // skipping the bits field sync test fake byte (Ed. Ken)
@ -390,8 +390,8 @@ int DecodeBits(SW_PACKET *pak, SW_PACKET *old_pak, BYTEp buf)
return buf - base_ptr; return buf - base_ptr;
} }
VOID void
PauseGame(VOID) PauseGame(void)
{ {
if (PauseKeySet) if (PauseKeySet)
return; return;
@ -406,8 +406,8 @@ PauseGame(VOID)
GamePaused = TRUE; GamePaused = TRUE;
} }
VOID void
ResumeGame(VOID) ResumeGame(void)
{ {
if (PauseKeySet) if (PauseKeySet)
return; return;
@ -419,21 +419,21 @@ ResumeGame(VOID)
GamePaused = FALSE; GamePaused = FALSE;
} }
VOID void
PauseAction(VOID) PauseAction(void)
{ {
ready2send = 0; ready2send = 0;
save_totalclock = totalclock; save_totalclock = totalclock;
} }
VOID void
ResumeAction(VOID) ResumeAction(void)
{ {
ready2send = 1; ready2send = 1;
totalclock = save_totalclock; totalclock = save_totalclock;
} }
VOID void
SendMessage(short pnum, char *text) SendMessage(short pnum, char *text)
{ {
if (!CommEnabled) if (!CommEnabled)
@ -445,8 +445,8 @@ SendMessage(short pnum, char *text)
} }
VOID void
InitNetPlayerOptions(VOID) InitNetPlayerOptions(void)
{ {
short pnum; short pnum;
PLAYERp pp = Player + myconnectindex; PLAYERp pp = Player + myconnectindex;
@ -476,13 +476,13 @@ InitNetPlayerOptions(VOID)
//if (pnum != myconnectindex) //if (pnum != myconnectindex)
{ {
//netsendpacket(pnum, (char *)(&p), sizeof(p)); //netsendpacket(pnum, (char *)(&p), sizeof(p));
netbroadcastpacket((BYTEp)(&p), sizeof(p)); netbroadcastpacket((uint8_t*)(&p), sizeof(p));
} }
} }
} }
} }
VOID void
SendMulitNameChange(char *new_name) SendMulitNameChange(char *new_name)
{ {
short pnum; short pnum;
@ -504,12 +504,12 @@ SendMulitNameChange(char *new_name)
p.PacketType = PACKET_TYPE_NAME_CHANGE; p.PacketType = PACKET_TYPE_NAME_CHANGE;
strcpy(p.PlayerName, pp->PlayerName); strcpy(p.PlayerName, pp->PlayerName);
//netsendpacket(pnum, (char *)(&p), sizeof(p)); //netsendpacket(pnum, (char *)(&p), sizeof(p));
netbroadcastpacket((BYTEp)(&p), sizeof(p)); netbroadcastpacket((uint8_t*)(&p), sizeof(p));
} }
} }
} }
VOID void
SendVersion(int version) SendVersion(int version)
{ {
short pnum; short pnum;
@ -528,12 +528,12 @@ SendVersion(int version)
p.PacketType = PACKET_TYPE_VERSION; p.PacketType = PACKET_TYPE_VERSION;
p.Version = version; p.Version = version;
//netsendpacket(pnum, (char *)(&p), sizeof(p)); //netsendpacket(pnum, (char *)(&p), sizeof(p));
netbroadcastpacket((BYTEp)(&p), sizeof(p)); netbroadcastpacket((uint8_t*)(&p), sizeof(p));
} }
} }
} }
VOID void
CheckVersion(int GameVersion) CheckVersion(int GameVersion)
{ {
short pnum; short pnum;
@ -573,8 +573,8 @@ CheckVersion(int GameVersion)
} }
} }
VOID void
Connect(VOID) Connect(void)
{ {
int players_found, i, yline; int players_found, i, yline;
short other; short other;
@ -602,7 +602,7 @@ Connect(VOID)
} }
int wfe_Clock; int wfe_Clock;
BOOL (*wfe_ExitCallback)(VOID); SWBOOL (*wfe_ExitCallback)(void);
void void
waitforeverybody(void) waitforeverybody(void)
@ -699,12 +699,12 @@ waitforeverybody(void)
} }
BOOL MyCommPlayerQuit(void) SWBOOL MyCommPlayerQuit(void)
{ {
PLAYERp pp; PLAYERp pp;
short i; short i;
short prev_player = 0; short prev_player = 0;
extern BOOL QuitFlag; extern SWBOOL QuitFlag;
short found = FALSE; short found = FALSE;
short quit_player_index = 0; short quit_player_index = 0;
@ -782,7 +782,7 @@ BOOL MyCommPlayerQuit(void)
return FALSE; return FALSE;
} }
BOOL MenuCommPlayerQuit(short quit_player) SWBOOL MenuCommPlayerQuit(short quit_player)
{ {
PLAYERp pp; PLAYERp pp;
short i; short i;
@ -833,7 +833,7 @@ BOOL MenuCommPlayerQuit(short quit_player)
return FALSE; return FALSE;
} }
VOID ErrorCorrectionQuit(VOID) void ErrorCorrectionQuit(void)
{ {
int oldtotalclock; int oldtotalclock;
short i,j; short i,j;
@ -855,8 +855,8 @@ VOID ErrorCorrectionQuit(VOID)
} }
} }
VOID void
InitNetVars(VOID) InitNetVars(void)
{ {
short pnum; short pnum;
PLAYERp pp; PLAYERp pp;
@ -889,8 +889,8 @@ InitNetVars(VOID)
otherminlag = mymaxlag = 0; otherminlag = mymaxlag = 0;
} }
VOID void
InitTimingVars(VOID) InitTimingVars(void)
{ {
PlayClock = 0; PlayClock = 0;
@ -939,7 +939,7 @@ faketimerhandler(void)
PLAYERp pp; PLAYERp pp;
short pnum; short pnum;
void getinput(SW_PACKET *); void getinput(SW_PACKET *);
extern BOOL BotMode; extern SWBOOL BotMode;
#if 0 #if 0
if (KEY_PRESSED(KEYSC_PERIOD)) if (KEY_PRESSED(KEYSC_PERIOD))
@ -1247,13 +1247,13 @@ faketimerhandler(void)
} }
} }
VOID void
checkmasterslaveswitch(VOID) checkmasterslaveswitch(void)
{ {
} }
VOID void
getpackets(VOID) getpackets(void)
{ {
int otherconnectindex, packbufleng; int otherconnectindex, packbufleng;
int i, j, k, l, fifoCheck, sb; int i, j, k, l, fifoCheck, sb;
@ -1473,7 +1473,7 @@ getpackets(VOID)
case PACKET_TYPE_NEW_GAME: case PACKET_TYPE_NEW_GAME:
{ {
extern BOOL NewGame, ShortGameMode, DemoInitOnce; extern SWBOOL NewGame, ShortGameMode, DemoInitOnce;
PACKET_NEW_GAMEp p; PACKET_NEW_GAMEp p;
extern short TimeLimitTable[]; extern short TimeLimitTable[];

View file

@ -66,50 +66,50 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
// Master->Slave: PlayerIndex = who sent the packet originally // Master->Slave: PlayerIndex = who sent the packet originally
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
BYTE PlayerIndex; uint8_t PlayerIndex;
} PACKET_PROXY,*PACKET_PROXYp; } PACKET_PROXY,*PACKET_PROXYp;
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
BYTE FirstPlayerIndex; uint8_t FirstPlayerIndex;
BOOL AutoAim; SWBOOL AutoAim;
BYTE Level; uint8_t Level;
BYTE Episode; uint8_t Episode;
CHAR Skill; int8_t Skill;
BYTE GameType; uint8_t GameType;
BOOL HurtTeammate; SWBOOL HurtTeammate;
BOOL SpawnMarkers; SWBOOL SpawnMarkers;
BOOL TeamPlay; SWBOOL TeamPlay;
BYTE KillLimit; uint8_t KillLimit;
BYTE TimeLimit; uint8_t TimeLimit;
BOOL Nuke; SWBOOL Nuke;
} PACKET_NEW_GAME,*PACKET_NEW_GAMEp; } PACKET_NEW_GAME,*PACKET_NEW_GAMEp;
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
BOOL AutoRun; SWBOOL AutoRun;
BYTE Color; uint8_t Color;
char PlayerName[32]; char PlayerName[32];
} PACKET_OPTIONS,*PACKET_OPTIONSp; } PACKET_OPTIONS,*PACKET_OPTIONSp;
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
char PlayerName[32]; char PlayerName[32];
} PACKET_NAME_CHANGE,*PACKET_NAME_CHANGEp; } PACKET_NAME_CHANGE,*PACKET_NAME_CHANGEp;
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
BYTE RTSnum; uint8_t RTSnum;
} PACKET_RTS,*PACKET_RTSp; } PACKET_RTS,*PACKET_RTSp;
typedef struct PACKED typedef struct PACKED
{ {
BYTE PacketType; // first byte is always packet type uint8_t PacketType; // first byte is always packet type
int Version; int Version;
} PACKET_VERSION,*PACKET_VERSIONp; } PACKET_VERSION,*PACKET_VERSIONp;
@ -121,13 +121,13 @@ typedef struct PACKED
# pragma pack(pop); # pragma pack(pop);
#endif #endif
extern BYTE syncstat[MAXSYNCBYTES]; extern uint8_t syncstat[MAXSYNCBYTES];
extern BOOL PredictionOn; extern SWBOOL PredictionOn;
extern PLAYER PredictPlayer; extern PLAYER PredictPlayer;
extern PLAYERp ppp; extern PLAYERp ppp;
extern short predictangpos[MOVEFIFOSIZ]; extern short predictangpos[MOVEFIFOSIZ];
extern int predictmovefifoplc; extern int predictmovefifoplc;
extern BOOL Prediction; extern SWBOOL Prediction;
extern short NumSyncBytes; extern short NumSyncBytes;
void InitPrediction(PLAYERp pp); void InitPrediction(PLAYERp pp);
@ -135,9 +135,9 @@ void DoPrediction(PLAYERp ppp);
void CorrectPrediction(int actualfifoplc); void CorrectPrediction(int actualfifoplc);
//TENSW: safe packet senders //TENSW: safe packet senders
void netsendpacket(int ind, BYTEp buf, int len); void netsendpacket(int ind, uint8_t* buf, int len);
void netbroadcastpacket(BYTEp buf, int len); void netbroadcastpacket(uint8_t* buf, int len);
int netgetpacket(int *ind, BYTEp buf); int netgetpacket(int *ind, uint8_t* buf);
enum MultiGameTypes enum MultiGameTypes
@ -149,23 +149,23 @@ enum MultiGameTypes
MULTI_GAME_AI_BOTS MULTI_GAME_AI_BOTS
}; };
//extern SHORT MultiGameType; // defaults to NONE //extern int16_t MultiGameType; // defaults to NONE
// global net vars // global net vars
// not saved in .CFG file // not saved in .CFG file
// used for current game // used for current game
typedef struct typedef struct
{ {
LONG KillLimit; int32_t KillLimit;
LONG TimeLimit; int32_t TimeLimit;
LONG TimeLimitClock; int32_t TimeLimitClock;
SHORT MultiGameType; // used to be a stand alone global int16_t MultiGameType; // used to be a stand alone global
BOOL TeamPlay; SWBOOL TeamPlay;
BOOL HurtTeammate; SWBOOL HurtTeammate;
BOOL SpawnMarkers; SWBOOL SpawnMarkers;
BOOL AutoAim; SWBOOL AutoAim;
BOOL NoRespawn; // for commbat type games SWBOOL NoRespawn; // for commbat type games
BOOL Nuke; SWBOOL Nuke;
} gNET,*gNETp; } gNET,*gNETp;
extern gNET gNet; extern gNET gNet;
@ -185,22 +185,22 @@ typedef struct
} AUTO_NET, *AUTO_NETp; } AUTO_NET, *AUTO_NETp;
extern AUTO_NET Auto; extern AUTO_NET Auto;
extern BOOL AutoNet; extern SWBOOL AutoNet;
VOID getpackets(VOID); void getpackets(void);
VOID SendMulitNameChange(char *new_name); void SendMulitNameChange(char *new_name);
VOID InitNetVars(void); void InitNetVars(void);
VOID InitTimingVars(void); void InitTimingVars(void);
VOID PauseAction(void); void PauseAction(void);
VOID ResumeAction(void); void ResumeAction(void);
void ErrorCorrectionQuit(void); void ErrorCorrectionQuit(void);
void Connect(void); void Connect(void);
void waitforeverybody(void); void waitforeverybody(void);
BOOL MenuCommPlayerQuit(short quit_player); SWBOOL MenuCommPlayerQuit(short quit_player);
VOID SendVersion(int version); void SendVersion(int version);
VOID InitNetPlayerOptions(void); void InitNetPlayerOptions(void);
VOID CheckVersion(int GameVersion); void CheckVersion(int GameVersion);
VOID SendMessage(short pnum,char *text); void SendMessage(short pnum,char *text);
void PauseGame(void); void PauseGame(void);
void ResumeGame(void); void ResumeGame(void);

View file

@ -2140,8 +2140,8 @@ DoNinjaCeiling(short SpriteNum)
// too convienent to put it here. // too convienent to put it here.
// //
VOID void
InitAllPlayerSprites(VOID) InitAllPlayerSprites(void)
{ {
short i, sp_num; short i, sp_num;
USERp u; USERp u;
@ -2153,7 +2153,7 @@ InitAllPlayerSprites(VOID)
} }
VOID void
PlayerLevelReset(PLAYERp pp) PlayerLevelReset(PLAYERp pp)
{ {
SPRITEp sp = &sprite[pp->PlayerSprite]; SPRITEp sp = &sprite[pp->PlayerSprite];
@ -2195,7 +2195,7 @@ PlayerLevelReset(PLAYERp pp)
DamageData[u->WeaponNum].Init(pp); DamageData[u->WeaponNum].Init(pp);
} }
VOID void
PlayerDeathReset(PLAYERp pp) PlayerDeathReset(PLAYERp pp)
{ {
SPRITEp sp = &sprite[pp->PlayerSprite]; SPRITEp sp = &sprite[pp->PlayerSprite];
@ -2265,8 +2265,8 @@ PlayerDeathReset(PLAYERp pp)
DamageData[u->WeaponNum].Init(pp); DamageData[u->WeaponNum].Init(pp);
} }
VOID void
PlayerPanelSetup(VOID) PlayerPanelSetup(void)
{ {
short pnum; short pnum;
PLAYERp pp; PLAYERp pp;
@ -2289,7 +2289,7 @@ PlayerPanelSetup(VOID)
} }
} }
VOID void
PlayerGameReset(PLAYERp pp) PlayerGameReset(PLAYERp pp)
{ {
SPRITEp sp = &sprite[pp->PlayerSprite]; SPRITEp sp = &sprite[pp->PlayerSprite];
@ -2356,7 +2356,7 @@ PlayerGameReset(PLAYERp pp)
extern ACTOR_ACTION_SET PlayerNinjaActionSet; extern ACTOR_ACTION_SET PlayerNinjaActionSet;
VOID void
PlayerSpriteLoadLevel(short SpriteNum) PlayerSpriteLoadLevel(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -2367,14 +2367,14 @@ PlayerSpriteLoadLevel(short SpriteNum)
u->ActorActionSet = &PlayerNinjaActionSet; u->ActorActionSet = &PlayerNinjaActionSet;
} }
VOID void
InitPlayerSprite(PLAYERp pp) InitPlayerSprite(PLAYERp pp)
{ {
short i, sp_num; short i, sp_num;
SPRITE *sp; SPRITE *sp;
USERp u; USERp u;
int pnum = pp - Player; int pnum = pp - Player;
extern BOOL NewGame; extern SWBOOL NewGame;
COVER_SetReverb(0); // Turn off any echoing that may have been going before COVER_SetReverb(0); // Turn off any echoing that may have been going before
pp->Reverb = 0; pp->Reverb = 0;
@ -2450,7 +2450,7 @@ InitPlayerSprite(PLAYERp pp)
PlayerUpdatePanelInfo(pp); PlayerUpdatePanelInfo(pp);
} }
VOID void
SpawnPlayerUnderSprite(PLAYERp pp) SpawnPlayerUnderSprite(PLAYERp pp)
{ {
USERp pu = User[pp->PlayerSprite], u; USERp pu = User[pp->PlayerSprite], u;

View file

@ -45,7 +45,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
//#define UK_VERSION TRUE //#define UK_VERSION TRUE
#define PANF_UZI_XFLIP (BIT(21)) #define PANF_UZI_XFLIP (BIT(21))
extern BOOL UsingMenus; extern SWBOOL UsingMenus;
#define XDIM 320 #define XDIM 320
#define YDIM 200 #define YDIM 200
@ -58,17 +58,17 @@ typedef struct
} PANEL_SHRAP, *PANEL_SHRAPp; } PANEL_SHRAP, *PANEL_SHRAPp;
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y); PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y);
VOID DisplayFragNumbers(PLAYERp pp_kill_chg); void DisplayFragNumbers(PLAYERp pp_kill_chg);
VOID PanelInvTestSuicide(PANEL_SPRITEp psp); void PanelInvTestSuicide(PANEL_SPRITEp psp);
void InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp); void InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp);
VOID pKillSprite(PANEL_SPRITEp psp); void pKillSprite(PANEL_SPRITEp psp);
void pWeaponBob(PANEL_SPRITEp psp, short condition); void pWeaponBob(PANEL_SPRITEp psp, short condition);
void pSuicide(PANEL_SPRITEp psp); void pSuicide(PANEL_SPRITEp psp);
VOID pNextState(PANEL_SPRITEp psp); void pNextState(PANEL_SPRITEp psp);
VOID pStatePlusOne(PANEL_SPRITEp psp); void pStatePlusOne(PANEL_SPRITEp psp);
VOID pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state); void pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state);
VOID pStateControl(PANEL_SPRITEp psp); void pStateControl(PANEL_SPRITEp psp);
int DoPanelFall(PANEL_SPRITEp psp); int DoPanelFall(PANEL_SPRITEp psp);
int DoBeginPanelFall(PANEL_SPRITEp psp); int DoBeginPanelFall(PANEL_SPRITEp psp);
@ -78,13 +78,13 @@ void SpawnHeartBlood(PANEL_SPRITEp psp);
void SpawnUziShell(PANEL_SPRITEp psp); void SpawnUziShell(PANEL_SPRITEp psp);
void PlayerUpdateWeaponSummary(PLAYERp pp,short UpdateWeaponNum); void PlayerUpdateWeaponSummary(PLAYERp pp,short UpdateWeaponNum);
BOOL pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); SWBOOL pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state);
BOOL pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); SWBOOL pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state);
void pHotHeadOverlays(PANEL_SPRITEp psp, short mode); void pHotHeadOverlays(PANEL_SPRITEp psp, short mode);
char UziRecoilYadj = 0; char UziRecoilYadj = 0;
extern BOOL QuitFlag; extern SWBOOL QuitFlag;
extern short screenpeek; extern short screenpeek;
BORDER_INFO BorderInfo; BORDER_INFO BorderInfo;
@ -149,12 +149,12 @@ pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri)
return NULL; return NULL;
} }
BOOL SWBOOL
pKillScreenSpiteIDs(PLAYERp pp, short id) pKillScreenSpiteIDs(PLAYERp pp, short id)
{ {
PANEL_SPRITEp nsp=NULL; PANEL_SPRITEp nsp=NULL;
PANEL_SPRITEp psp=NULL, next; PANEL_SPRITEp psp=NULL, next;
BOOL found = FALSE; SWBOOL found = FALSE;
// Kill ALL sprites with the correct id // Kill ALL sprites with the correct id
TRAVERSE(&pp->PanelSpriteList, psp, next) TRAVERSE(&pp->PanelSpriteList, psp, next)
@ -227,7 +227,7 @@ void pSetSuicide(PANEL_SPRITEp psp)
psp->PanelSpriteFunc = pSuicide; psp->PanelSpriteFunc = pSuicide;
} }
VOID pToggleCrosshair(PLAYERp pp) void pToggleCrosshair(PLAYERp pp)
{ {
if (gs.Crosshair) if (gs.Crosshair)
gs.Crosshair = FALSE; gs.Crosshair = FALSE;
@ -236,7 +236,7 @@ VOID pToggleCrosshair(PLAYERp pp)
} }
// Player has a chance of yelling out during combat, when firing a weapon. // Player has a chance of yelling out during combat, when firing a weapon.
VOID DoPlayerChooseYell(PLAYERp pp) void DoPlayerChooseYell(PLAYERp pp)
{ {
int choose_snd = 0; int choose_snd = 0;
short weapon; short weapon;
@ -255,7 +255,7 @@ VOID DoPlayerChooseYell(PLAYERp pp)
PlayerSound(PlayerYellVocs[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp); PlayerSound(PlayerYellVocs[choose_snd],&pp->posx,&pp->posy,&pp->posz,v3df_follow|v3df_dontpan,pp);
} }
VOID ArmorCalc(int damage_amt, int *armor_damage, int *player_damage) void ArmorCalc(int damage_amt, int *armor_damage, int *player_damage)
{ {
int damage_percent; int damage_percent;
@ -275,7 +275,7 @@ VOID ArmorCalc(int damage_amt, int *armor_damage, int *player_damage)
} }
VOID void
PlayerUpdateHealth(PLAYERp pp, short value) PlayerUpdateHealth(PLAYERp pp, short value)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -301,8 +301,8 @@ PlayerUpdateHealth(PLAYERp pp, short value)
if (value < 0) if (value < 0)
{ {
BOOL IsChem = FALSE; SWBOOL IsChem = FALSE;
BOOL NoArmor = FALSE; SWBOOL NoArmor = FALSE;
if (value <= -2000) if (value <= -2000)
{ {
@ -402,7 +402,7 @@ PlayerUpdateHealth(PLAYERp pp, short value)
} }
VOID void
PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -469,7 +469,7 @@ PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value)
DisplayPanelNumber(pp, x, y, pp->WpnAmmo[WeaponNum]); DisplayPanelNumber(pp, x, y, pp->WpnAmmo[WeaponNum]);
} }
VOID void
PlayerUpdateWeaponSummary(PLAYERp pp, short UpdateWeaponNum) PlayerUpdateWeaponSummary(PLAYERp pp, short UpdateWeaponNum)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -536,7 +536,7 @@ PlayerUpdateWeaponSummary(PLAYERp pp, short UpdateWeaponNum)
DisplaySummaryString(pp, x+6, y, color, shade, ds); DisplaySummaryString(pp, x+6, y, color, shade, ds);
} }
VOID PlayerUpdateWeaponSummaryAll(PLAYERp pp) void PlayerUpdateWeaponSummaryAll(PLAYERp pp)
{ {
short i; short i;
@ -549,7 +549,7 @@ VOID PlayerUpdateWeaponSummaryAll(PLAYERp pp)
} }
} }
VOID void
PlayerUpdateWeapon(PLAYERp pp, short WeaponNum) PlayerUpdateWeapon(PLAYERp pp, short WeaponNum)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -567,7 +567,7 @@ PlayerUpdateWeapon(PLAYERp pp, short WeaponNum)
PlayerUpdateWeaponSummaryAll(pp); PlayerUpdateWeaponSummaryAll(pp);
} }
VOID void
PlayerUpdateKills(PLAYERp pp, short value) PlayerUpdateKills(PLAYERp pp, short value)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -616,7 +616,7 @@ PlayerUpdateKills(PLAYERp pp, short value)
DisplayFragNumbers(pp); DisplayFragNumbers(pp);
} }
VOID void
PlayerUpdateArmor(PLAYERp pp, short value) PlayerUpdateArmor(PLAYERp pp, short value)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -652,7 +652,7 @@ PlayerUpdateArmor(PLAYERp pp, short value)
} }
VOID void
PlayerUpdateKeys(PLAYERp pp) PlayerUpdateKeys(PLAYERp pp)
{ {
#define PANEL_KEYS_BOX_X 276 #define PANEL_KEYS_BOX_X 276
@ -735,7 +735,7 @@ PlayerUpdateKeys(PLAYERp pp)
} }
} }
VOID void
PlayerUpdateTimeLimit(PLAYERp pp) PlayerUpdateTimeLimit(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -762,7 +762,7 @@ PlayerUpdateTimeLimit(PLAYERp pp)
DisplaySummaryString(pp, PANEL_KEYS_BOX_X+1, PANEL_BOX_Y+6, 0, 0, ds); DisplaySummaryString(pp, PANEL_KEYS_BOX_X+1, PANEL_BOX_Y+6, 0, 0, ds);
} }
VOID void
PlayerUpdatePanelInfo(PLAYERp pp) PlayerUpdatePanelInfo(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -995,7 +995,7 @@ WeaponOperate(PLAYERp pp)
return 0; return 0;
} }
BOOL SWBOOL
WeaponOK(PLAYERp pp) WeaponOK(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -1233,7 +1233,7 @@ PANEL_STATE ps_RetractSword[] =
#define SWORD_POWER_VEL 2500 #define SWORD_POWER_VEL 2500
VOID SpecialUziRetractFunc(PANEL_SPRITEp psp) void SpecialUziRetractFunc(PANEL_SPRITEp psp)
{ {
psp->y += 4 * synctics; psp->y += 4 * synctics;
@ -1243,7 +1243,7 @@ VOID SpecialUziRetractFunc(PANEL_SPRITEp psp)
} }
} }
VOID void
RetractCurWpn(PLAYERp pp) RetractCurWpn(PLAYERp pp)
{ {
// Retract old weapon // Retract old weapon
@ -1280,7 +1280,7 @@ RetractCurWpn(PLAYERp pp)
} }
} }
VOID void
InitWeaponSword(PLAYERp pp) InitWeaponSword(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -1558,7 +1558,7 @@ pSwordHide(PANEL_SPRITEp psp)
void void
pSwordRest(PANEL_SPRITEp psp) pSwordRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
#if 0 #if 0
if (KEY_PRESSED(KEYSC_SEMI)) if (KEY_PRESSED(KEYSC_SEMI))
@ -1729,7 +1729,7 @@ PANEL_STATE ps_RetractStar[] =
void void
pStarRestTest(PANEL_SPRITEp psp) pStarRestTest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT)) if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
{ {
@ -1748,7 +1748,7 @@ pStarRestTest(PANEL_SPRITEp psp)
pSetState(psp, psp->RestState); pSetState(psp, psp->RestState);
} }
VOID void
InitWeaponStar(PLAYERp pp) InitWeaponStar(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = NULL;
@ -1877,7 +1877,7 @@ pStarHide(PANEL_SPRITEp psp)
void void
pStarRest(PANEL_SPRITEp psp) pStarRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_StarHide)) if (pWeaponHideKeys(psp, ps_StarHide))
return; return;
@ -1954,19 +1954,19 @@ void pUziRest(PANEL_SPRITEp);
void pUziHide(PANEL_SPRITEp); void pUziHide(PANEL_SPRITEp);
void pUziPresentReload(PANEL_SPRITEp); void pUziPresentReload(PANEL_SPRITEp);
VOID pSpawnUziClip(PANEL_SPRITEp); void pSpawnUziClip(PANEL_SPRITEp);
VOID pSpawnUziReload(PANEL_SPRITEp); void pSpawnUziReload(PANEL_SPRITEp);
VOID pUziReload(PANEL_SPRITEp); void pUziReload(PANEL_SPRITEp);
VOID pUziReloadRetract(PANEL_SPRITEp); void pUziReloadRetract(PANEL_SPRITEp);
VOID pUziClip(PANEL_SPRITEp); void pUziClip(PANEL_SPRITEp);
VOID pUziDoneReload(PANEL_SPRITEp); void pUziDoneReload(PANEL_SPRITEp);
VOID pUziEjectDown(PANEL_SPRITEp); void pUziEjectDown(PANEL_SPRITEp);
VOID pUziEjectUp(PANEL_SPRITEp); void pUziEjectUp(PANEL_SPRITEp);
// CTW MODIFICATION // CTW MODIFICATION
//VOID SetVisNorm(VOID); //void SetVisNorm(void);
int SetVisNorm(VOID); int SetVisNorm(void);
// CTW MODIFICATION END // CTW MODIFICATION END
pANIMATOR pSetVisNorm; pANIMATOR pSetVisNorm;
@ -2144,7 +2144,7 @@ pUziOverlays(PANEL_SPRITEp psp, short mode)
// Uzi Reload // Uzi Reload
// //
VOID void
pUziEjectDown(PANEL_SPRITEp gun) pUziEjectDown(PANEL_SPRITEp gun)
{ {
gun->y += 5 * synctics; gun->y += 5 * synctics;
@ -2156,7 +2156,7 @@ pUziEjectDown(PANEL_SPRITEp gun)
} }
} }
VOID void
pUziEjectUp(PANEL_SPRITEp gun) pUziEjectUp(PANEL_SPRITEp gun)
{ {
@ -2172,7 +2172,7 @@ pUziEjectUp(PANEL_SPRITEp gun)
} }
VOID void
pSpawnUziClip(PANEL_SPRITEp gun) pSpawnUziClip(PANEL_SPRITEp gun)
{ {
PANEL_SPRITEp new; PANEL_SPRITEp new;
@ -2201,7 +2201,7 @@ pSpawnUziClip(PANEL_SPRITEp gun)
new->sibling = gun; new->sibling = gun;
} }
VOID void
pSpawnUziReload(PANEL_SPRITEp oclip) pSpawnUziReload(PANEL_SPRITEp oclip)
{ {
PANEL_SPRITEp nclip; PANEL_SPRITEp nclip;
@ -2220,7 +2220,7 @@ pSpawnUziReload(PANEL_SPRITEp oclip)
nclip->sibling = oclip->sibling; nclip->sibling = oclip->sibling;
} }
VOID void
pUziReload(PANEL_SPRITEp nclip) pUziReload(PANEL_SPRITEp nclip)
{ {
int nx, ny; int nx, ny;
@ -2288,7 +2288,7 @@ pUziReload(PANEL_SPRITEp nclip)
} }
} }
VOID void
pUziReloadRetract(PANEL_SPRITEp nclip) pUziReloadRetract(PANEL_SPRITEp nclip)
{ {
int nx, ny; int nx, ny;
@ -2328,7 +2328,7 @@ pUziReloadRetract(PANEL_SPRITEp nclip)
} }
} }
VOID void
pUziDoneReload(PANEL_SPRITEp psp) pUziDoneReload(PANEL_SPRITEp psp)
{ {
PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp); PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp);
@ -2374,7 +2374,7 @@ pUziDoneReload(PANEL_SPRITEp psp)
} }
} }
VOID void
pUziClip(PANEL_SPRITEp oclip) pUziClip(PANEL_SPRITEp oclip)
{ {
int nx, ny, ox, oy; int nx, ny, ox, oy;
@ -2430,7 +2430,7 @@ pUziClip(PANEL_SPRITEp oclip)
// Uzi Basic Stuff // Uzi Basic Stuff
// //
VOID void
InitWeaponUzi(PLAYERp pp) InitWeaponUzi(PLAYERp pp)
{ {
PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp); PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp);
@ -2673,7 +2673,7 @@ void
pUziRest(PANEL_SPRITEp psp) pUziRest(PANEL_SPRITEp psp)
{ {
char shooting; char shooting;
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
// If you have two uzi's, but one didn't come up, spawn it // If you have two uzi's, but one didn't come up, spawn it
@ -2725,7 +2725,7 @@ void
pUziAction(PANEL_SPRITEp psp) pUziAction(PANEL_SPRITEp psp)
{ {
char shooting; char shooting;
static BOOL alternate = FALSE; static SWBOOL alternate = FALSE;
shooting = TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT) && FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT); shooting = TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT) && FLAG_KEY_PRESSED(psp->PlayerP, SK_SHOOT);
@ -3077,7 +3077,7 @@ void pShotgunBobSetup(PANEL_SPRITEp psp);
void pShotgunRecoilUp(PANEL_SPRITEp psp); void pShotgunRecoilUp(PANEL_SPRITEp psp);
void pShotgunRecoilDown(PANEL_SPRITEp psp); void pShotgunRecoilDown(PANEL_SPRITEp psp);
BOOL pShotgunReloadTest(PANEL_SPRITEp psp); SWBOOL pShotgunReloadTest(PANEL_SPRITEp psp);
extern PANEL_STATE ps_ShotgunReload[]; extern PANEL_STATE ps_ShotgunReload[];
@ -3172,7 +3172,7 @@ PANEL_STATE ps_RetractShotgun[] =
#define SHOTGUN_YOFF 200 #define SHOTGUN_YOFF 200
#define SHOTGUN_XOFF (160+42) #define SHOTGUN_XOFF (160+42)
VOID void
InitWeaponShotgun(PLAYERp pp) InitWeaponShotgun(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = NULL;
@ -3362,7 +3362,7 @@ pShotgunBobSetup(PANEL_SPRITEp psp)
psp->bob_height_shift = 3; psp->bob_height_shift = 3;
} }
BOOL SWBOOL
pShotgunOverlays(PANEL_SPRITEp psp) pShotgunOverlays(PANEL_SPRITEp psp)
{ {
#define SHOTGUN_AUTO_XOFF 28 #define SHOTGUN_AUTO_XOFF 28
@ -3422,7 +3422,7 @@ pShotgunHide(PANEL_SPRITEp psp)
} }
#if 1 #if 1
BOOL SWBOOL
pShotgunReloadTest(PANEL_SPRITEp psp) pShotgunReloadTest(PANEL_SPRITEp psp)
{ {
//short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType]; //short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType];
@ -3444,7 +3444,7 @@ pShotgunReloadTest(PANEL_SPRITEp psp)
void void
pShotgunRest(PANEL_SPRITEp psp) pShotgunRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
//short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType]; //short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType];
short ammo = psp->PlayerP->WpnAmmo[WPN_SHOTGUN]; short ammo = psp->PlayerP->WpnAmmo[WPN_SHOTGUN];
char lastammo = psp->PlayerP->WpnShotgunLastShell; char lastammo = psp->PlayerP->WpnShotgunLastShell;
@ -3493,7 +3493,7 @@ pShotgunRest(PANEL_SPRITEp psp)
void void
pShotgunRestTest(PANEL_SPRITEp psp) pShotgunRestTest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (psp->PlayerP->WpnShotgunType == 1 && !pShotgunReloadTest(psp)) if (psp->PlayerP->WpnShotgunType == 1 && !pShotgunReloadTest(psp))
force = TRUE; force = TRUE;
@ -3576,7 +3576,7 @@ void pRailRecoilDown(PANEL_SPRITEp psp);
void pRailBobSetup(PANEL_SPRITEp psp); void pRailBobSetup(PANEL_SPRITEp psp);
BOOL pRailReloadTest(PANEL_SPRITEp psp); SWBOOL pRailReloadTest(PANEL_SPRITEp psp);
#define Rail_BEAT_RATE 24 #define Rail_BEAT_RATE 24
#define Rail_ACTION_RATE 3 // !JIM! Was 10 #define Rail_ACTION_RATE 3 // !JIM! Was 10
@ -3688,7 +3688,7 @@ PANEL_STATE ps_RetractRail[] =
static int railvochandle=0; static int railvochandle=0;
VOID void
InitWeaponRail(PLAYERp pp) InitWeaponRail(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = NULL;
@ -3864,7 +3864,7 @@ void
pRailRest(PANEL_SPRITEp psp) pRailRest(PANEL_SPRITEp psp)
{ {
int InitLaserSight(PLAYERp pp); int InitLaserSight(PLAYERp pp);
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (SW_SHAREWARE) return; if (SW_SHAREWARE) return;
@ -3899,7 +3899,7 @@ pRailRest(PANEL_SPRITEp psp)
void void
pRailRestTest(PANEL_SPRITEp psp) pRailRestTest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_RailHide)) if (pWeaponHideKeys(psp, ps_RailHide))
return; return;
@ -4145,7 +4145,7 @@ pHotHeadOverlays(PANEL_SPRITEp psp, short mode)
#define HOTHEAD_XOFF (200 + HOTHEAD_BOB_X_AMT + 6) #define HOTHEAD_XOFF (200 + HOTHEAD_BOB_X_AMT + 6)
#define HOTHEAD_YOFF 200 #define HOTHEAD_YOFF 200
VOID void
InitWeaponHothead(PLAYERp pp) InitWeaponHothead(PLAYERp pp)
{ {
PANEL_SPRITEp psp = NULL; PANEL_SPRITEp psp = NULL;
@ -4200,7 +4200,7 @@ InitWeaponHothead(PLAYERp pp)
void void
pHotheadRestTest(PANEL_SPRITEp psp) pHotheadRestTest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT)) if (TEST_SYNC_KEY(psp->PlayerP, SK_SHOOT))
{ {
@ -4281,7 +4281,7 @@ pHotheadHide(PANEL_SPRITEp psp)
void void
pHotheadRest(PANEL_SPRITEp psp) pHotheadRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (SW_SHAREWARE) return; if (SW_SHAREWARE) return;
@ -4589,7 +4589,7 @@ pMicroSetRecoil(PANEL_SPRITEp psp)
psp->ang = NORM_ANGLE(-256); psp->ang = NORM_ANGLE(-256);
} }
VOID void
InitWeaponMicro(PLAYERp pp) InitWeaponMicro(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -4759,7 +4759,7 @@ pMicroHide(PANEL_SPRITEp psp)
} }
} }
BOOL SWBOOL
pMicroOverlays(PANEL_SPRITEp psp) pMicroOverlays(PANEL_SPRITEp psp)
{ {
//#define MICRO_SIGHT_XOFF 29 //#define MICRO_SIGHT_XOFF 29
@ -4859,7 +4859,7 @@ void
pMicroRest(PANEL_SPRITEp psp) pMicroRest(PANEL_SPRITEp psp)
{ {
PLAYERp pp = psp->PlayerP; PLAYERp pp = psp->PlayerP;
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_MicroHide)) if (pWeaponHideKeys(psp, ps_MicroHide))
return; return;
@ -5097,7 +5097,7 @@ PANEL_STATE ps_RetractHeart[] =
#define HEART_YOFF 212 #define HEART_YOFF 212
VOID void
InitWeaponHeart(PLAYERp pp) InitWeaponHeart(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -5191,7 +5191,7 @@ pHeartHide(PANEL_SPRITEp psp)
void void
pHeartRest(PANEL_SPRITEp psp) pHeartRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_HeartHide)) if (pWeaponHideKeys(psp, ps_HeartHide))
return; return;
@ -5596,7 +5596,7 @@ pGrenadePresentSetup(PANEL_SPRITEp psp)
psp->vel = 680; psp->vel = 680;
} }
VOID void
InitWeaponGrenade(PLAYERp pp) InitWeaponGrenade(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -5769,7 +5769,7 @@ pGrenadeHide(PANEL_SPRITEp psp)
void void
pGrenadeRest(PANEL_SPRITEp psp) pGrenadeRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_GrenadeHide)) if (pWeaponHideKeys(psp, ps_GrenadeHide))
return; return;
@ -5884,7 +5884,7 @@ PANEL_STATE ps_RetractMine[] =
//#define MINE_XOFF (160+20) //#define MINE_XOFF (160+20)
#define MINE_XOFF (160+50) #define MINE_XOFF (160+50)
VOID void
InitWeaponMine(PLAYERp pp) InitWeaponMine(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -6015,7 +6015,7 @@ pMineHide(PANEL_SPRITEp psp)
void void
pMineRest(PANEL_SPRITEp psp) pMineRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_MineHide)) if (pWeaponHideKeys(psp, ps_MineHide))
return; return;
@ -6164,7 +6164,7 @@ PANEL_STATE ps_ChopsRetract[] =
#define CHOPS_YOFF 200 #define CHOPS_YOFF 200
#define CHOPS_XOFF (160+20) #define CHOPS_XOFF (160+20)
VOID void
InitChops(PLAYERp pp) InitChops(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -6197,7 +6197,7 @@ InitChops(PLAYERp pp)
void void
pChopsClick(PANEL_SPRITEp psp) pChopsClick(PANEL_SPRITEp psp)
{ {
SHORT rnd_rng; int16_t rnd_rng;
PlaySound(DIGI_CHOP_CLICK,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_none); PlaySound(DIGI_CHOP_CLICK,&psp->PlayerP->posx,&psp->PlayerP->posy,&psp->PlayerP->posz,v3df_none);
rnd_rng = RANDOM_RANGE(1000); rnd_rng = RANDOM_RANGE(1000);
@ -6260,7 +6260,7 @@ pChopsShake(PANEL_SPRITEp psp)
void void
pChopsWait(PANEL_SPRITEp psp) pChopsWait(PANEL_SPRITEp psp)
{ {
//extern BOOL GamePaused; //extern SWBOOL GamePaused;
//if (!GamePaused && RANDOM_P2(1024) < 10) //if (!GamePaused && RANDOM_P2(1024) < 10)
if (RANDOM_P2(1024) < 10) if (RANDOM_P2(1024) < 10)
@ -6550,7 +6550,7 @@ PANEL_STATE ps_RetractFist[] =
#define FIST_VEL 3000 #define FIST_VEL 3000
#define FIST_POWER_VEL 3000 #define FIST_POWER_VEL 3000
VOID void
InitWeaponFist(PLAYERp pp) InitWeaponFist(PLAYERp pp)
{ {
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -6929,7 +6929,7 @@ pFistHide(PANEL_SPRITEp psp)
void void
pFistRest(PANEL_SPRITEp psp) pFistRest(PANEL_SPRITEp psp)
{ {
BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT);
if (pWeaponHideKeys(psp, ps_FistHide)) if (pWeaponHideKeys(psp, ps_FistHide))
return; return;
@ -7063,13 +7063,13 @@ pFistBlock(PANEL_SPRITEp psp)
VOID void
pWeaponForceRest(PLAYERp pp) pWeaponForceRest(PLAYERp pp)
{ {
pSetState(pp->CurWpn, pp->CurWpn->RestState); pSetState(pp->CurWpn, pp->CurWpn->RestState);
} }
BOOL SWBOOL
pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state) pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{ {
// initing the other weapon will take care of this // initing the other weapon will take care of this
@ -7117,7 +7117,7 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
return FALSE; return FALSE;
} }
BOOL SWBOOL
pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state) pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state)
{ {
if (TEST(psp->PlayerP->Flags, PF_DEAD)) if (TEST(psp->PlayerP->Flags, PF_DEAD))
@ -7197,7 +7197,7 @@ InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp)
PANEL_SPRITEp PANEL_SPRITEp
pSpawnSprite(PLAYERp pp, PANEL_STATEp state, BYTE priority, int x, int y) pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, int x, int y)
{ {
unsigned i; unsigned i;
PANEL_SPRITEp psp; PANEL_SPRITEp psp;
@ -7239,13 +7239,13 @@ pSpawnSprite(PLAYERp pp, PANEL_STATEp state, BYTE priority, int x, int y)
return psp; return psp;
} }
VOID void
pSuicide(PANEL_SPRITEp psp) pSuicide(PANEL_SPRITEp psp)
{ {
pKillSprite(psp); pKillSprite(psp);
} }
VOID void
pKillSprite(PANEL_SPRITEp psp) pKillSprite(PANEL_SPRITEp psp)
{ {
PRODUCTION_ASSERT(psp); PRODUCTION_ASSERT(psp);
@ -7256,7 +7256,7 @@ pKillSprite(PANEL_SPRITEp psp)
FreeMem(psp); FreeMem(psp);
} }
VOID void
pClearSpriteList(PLAYERp pp) pClearSpriteList(PLAYERp pp)
{ {
PANEL_SPRITEp psp=NULL, next_psp=NULL; PANEL_SPRITEp psp=NULL, next_psp=NULL;
@ -7332,8 +7332,8 @@ pWeaponBob(PANEL_SPRITEp psp, short condition)
// //
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
BOOL DrawBeforeView = FALSE; SWBOOL DrawBeforeView = FALSE;
VOID void
pDisplaySprites(PLAYERp pp) pDisplaySprites(PLAYERp pp)
{ {
USERp u = User[pp->PlayerSprite]; USERp u = User[pp->PlayerSprite];
@ -7345,7 +7345,7 @@ pDisplaySprites(PLAYERp pp)
unsigned i; unsigned i;
SECT_USERp sectu = SectUser[pp->cursectnum]; SECT_USERp sectu = SectUser[pp->cursectnum];
BYTE pal = 0; uint8_t pal = 0;
short ang; short ang;
int flags; int flags;
int x1,y1,x2,y2; int x1,y1,x2,y2;
@ -7634,7 +7634,7 @@ pDisplaySprites(PLAYERp pp)
} }
} }
VOID pFlushPerms(PLAYERp pp) void pFlushPerms(PLAYERp pp)
{ {
PANEL_SPRITEp psp=NULL, next=NULL; PANEL_SPRITEp psp=NULL, next=NULL;
@ -7650,7 +7650,7 @@ VOID pFlushPerms(PLAYERp pp)
} }
} }
VOID void
pSpriteControl(PLAYERp pp) pSpriteControl(PLAYERp pp)
{ {
PANEL_SPRITEp psp=NULL, next=NULL; PANEL_SPRITEp psp=NULL, next=NULL;
@ -7662,7 +7662,7 @@ pSpriteControl(PLAYERp pp)
// RULE: Sprites can only kill themselves // RULE: Sprites can only kill themselves
PRODUCTION_ASSERT(psp); PRODUCTION_ASSERT(psp);
ASSERT(ValidPtr(psp)); ASSERT(ValidPtr(psp));
ASSERT((ULONG) psp->Next != 0xCCCCCCCC); ASSERT((uint32_t) psp->Next != 0xCCCCCCCC);
if (psp->State) if (psp->State)
pStateControl(psp); pStateControl(psp);
@ -7676,7 +7676,7 @@ pSpriteControl(PLAYERp pp)
} }
} }
VOID void
pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state) pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state)
{ {
PRODUCTION_ASSERT(psp); PRODUCTION_ASSERT(psp);
@ -7687,7 +7687,7 @@ pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state)
} }
VOID void
pNextState(PANEL_SPRITEp psp) pNextState(PANEL_SPRITEp psp)
{ {
// Transition to the next state // Transition to the next state
@ -7700,7 +7700,7 @@ pNextState(PANEL_SPRITEp psp)
} }
} }
VOID void
pStatePlusOne(PANEL_SPRITEp psp) pStatePlusOne(PANEL_SPRITEp psp)
{ {
psp->tics = 0; psp->tics = 0;
@ -7714,7 +7714,7 @@ pStatePlusOne(PANEL_SPRITEp psp)
} }
VOID void
pStateControl(PANEL_SPRITEp psp) pStateControl(PANEL_SPRITEp psp)
{ {
unsigned i; unsigned i;
@ -7761,11 +7761,11 @@ pStateControl(PANEL_SPRITEp psp)
} }
VOID void
UpdatePanel(void) UpdatePanel(void)
{ {
short pnum; short pnum;
extern BOOL DebugPanel,PanelUpdateMode; extern SWBOOL DebugPanel,PanelUpdateMode;
if (!PanelUpdateMode) if (!PanelUpdateMode)
return; return;
@ -7780,11 +7780,11 @@ UpdatePanel(void)
} }
} }
VOID void
PreUpdatePanel(void) PreUpdatePanel(void)
{ {
short pnum; short pnum;
extern BOOL DebugPanel,PanelUpdateMode; extern SWBOOL DebugPanel,PanelUpdateMode;
if (!PanelUpdateMode) if (!PanelUpdateMode)
return; return;

View file

@ -60,9 +60,9 @@ struct PANEL_STATEstruct
int tics; int tics;
void (*Animator)(PANEL_SPRITEp); // JBF: return type was long void (*Animator)(PANEL_SPRITEp); // JBF: return type was long
PANEL_STATEp NextState; PANEL_STATEp NextState;
ULONG flags; uint32_t flags;
BYTE xvel; uint8_t xvel;
BYTE yvel; uint8_t yvel;
}; };
#define PANF_PRIMARY (BIT(0)) // denotes primary weapon #define PANF_PRIMARY (BIT(0)) // denotes primary weapon
@ -91,7 +91,7 @@ struct PANEL_STATEstruct
#define PANF_DRAW_BEFORE_VIEW (BIT(30)) // draw before drawrooms #define PANF_DRAW_BEFORE_VIEW (BIT(30)) // draw before drawrooms
#define PANF_NOT_ALL_PAGES (BIT(31)) // DONT use permanentwritesprite bit for rotatesprite #define PANF_NOT_ALL_PAGES (BIT(31)) // DONT use permanentwritesprite bit for rotatesprite
typedef VOID (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp); typedef void (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp);
typedef struct typedef struct
{ {
@ -110,10 +110,10 @@ struct PANEL_SPRITEstruct
PANEL_STATEp State, RetractState, PresentState, ActionState, RestState; PANEL_STATEp State, RetractState, PresentState, ActionState, RestState;
PLAYERp PlayerP; PLAYERp PlayerP;
// Do not change the order of this line // Do not change the order of this line
USHORT xfract; uint16_t xfract;
SHORT x; int16_t x;
USHORT yfract; uint16_t yfract;
SHORT y; // Do not change the order of this int16_t y; // Do not change the order of this
// line // line
PANEL_SPRITE_OVERLAY over[8]; PANEL_SPRITE_OVERLAY over[8];
@ -182,13 +182,13 @@ enum BorderTypes
#define SHOTGUN_AUTO_NUM 0 #define SHOTGUN_AUTO_NUM 0
#define SHOTGUN_AUTO 2078 #define SHOTGUN_AUTO 2078
PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATEp state, BYTE priority, int x, int y); PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, int x, int y);
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y); PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y);
PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y); PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y);
void pSetSuicide(PANEL_SPRITEp psp); void pSetSuicide(PANEL_SPRITEp psp);
BOOL pKillScreenSpiteIDs(PLAYERp pp, short id); SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id);
VOID pFlushPerms(PLAYERp pp); void pFlushPerms(PLAYERp pp);
VOID PreUpdatePanel(void); void PreUpdatePanel(void);
void UpdatePanel(void); void UpdatePanel(void);
void PlayerUpdateKeys(PLAYERp pp); void PlayerUpdateKeys(PLAYERp pp);
void PlayerUpdateArmor(PLAYERp pp,short value); void PlayerUpdateArmor(PLAYERp pp,short value);
@ -196,6 +196,6 @@ void pToggleCrosshair(PLAYERp pp);
void pKillSprite(PANEL_SPRITEp psp); void pKillSprite(PANEL_SPRITEp psp);
void InitChops(PLAYERp pp); void InitChops(PLAYERp pp);
void ChopsSetRetract(PLAYERp pp); void ChopsSetRetract(PLAYERp pp);
VOID PlayerUpdateTimeLimit(PLAYERp pp); void PlayerUpdateTimeLimit(PLAYERp pp);
#endif #endif

View file

@ -32,13 +32,13 @@ extern char token[MAXTOKEN];
extern char *scriptbuffer,*script_p,*scriptend_p; extern char *scriptbuffer,*script_p,*scriptend_p;
extern int grabbed; extern int grabbed;
extern int scriptline; extern int scriptline;
extern BOOL endofscript; extern SWBOOL endofscript;
BOOL LoadScriptFile(char *filename); SWBOOL LoadScriptFile(char *filename);
void GetToken(BOOL crossline); void GetToken(SWBOOL crossline);
void UnGetToken(void); void UnGetToken(void);
BOOL TokenAvailable(void); SWBOOL TokenAvailable(void);
void DefaultExtension(char *path, char *extension); void DefaultExtension(char *path, char *extension);
void DefaultPath(char *path, char *basepath); void DefaultPath(char *path, char *basepath);

File diff suppressed because it is too large Load diff

View file

@ -121,10 +121,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
int SetVisHigh(void); int SetVisHigh(void);
int SetVisNorm(void); int SetVisNorm(void);
VOID DoWeapon(VOID); void DoWeapon(void);
VOID HeadBobStateControl(VOID); void HeadBobStateControl(void);
int DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets); int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets);
VOID DoPlayer(VOID); void DoPlayer(void);
void domovethings(void); void domovethings(void);
void InitAllPlayers(void); void InitAllPlayers(void);
void InitMultiPlayerInfo(void); void InitMultiPlayerInfo(void);
@ -139,7 +139,7 @@ int DoPlayerWadeSuperJump(PLAYERp pp);
void DoPlayerWarpTeleporter(PLAYERp pp); void DoPlayerWarpTeleporter(PLAYERp pp);
void UpdatePlayerSprite(PLAYERp pp); void UpdatePlayerSprite(PLAYERp pp);
void PlaySOsound(short sectnum,short sound_num); void PlaySOsound(short sectnum,short sound_num);
VOID DoSpawnTeleporterEffectPlace(SPRITEp sp); void DoSpawnTeleporterEffectPlace(SPRITEp sp);
void FindMainSector(SECTOR_OBJECTp sop); void FindMainSector(SECTOR_OBJECTp sop);
#endif #endif

View file

@ -41,8 +41,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "net.h" #include "net.h"
//#include "symutil.h" //#include "symutil.h"
BOOL PredictionOn = TRUE; SWBOOL PredictionOn = TRUE;
BOOL Prediction = FALSE; SWBOOL Prediction = FALSE;
PLAYER PredictPlayer; PLAYER PredictPlayer;
USER PredictUser; USER PredictUser;
PLAYERp ppp = &PredictPlayer; PLAYERp ppp = &PredictPlayer;
@ -56,15 +56,15 @@ typedef struct
PREDICT Predict[MOVEFIFOSIZ]; PREDICT Predict[MOVEFIFOSIZ];
int predictmovefifoplc; int predictmovefifoplc;
VOID DoPlayerSectorUpdatePreMove(PLAYERp); void DoPlayerSectorUpdatePreMove(PLAYERp);
VOID DoPlayerSectorUpdatePostMove(PLAYERp); void DoPlayerSectorUpdatePostMove(PLAYERp);
extern BOOL GamePaused; extern SWBOOL GamePaused;
#define PREDICT_DEBUG 0 #define PREDICT_DEBUG 0
#if PREDICT_DEBUG #if PREDICT_DEBUG
VOID (*pred_last_func)(PLAYERp) = NULL; void (*pred_last_func)(PLAYERp) = NULL;
#endif #endif
void void
@ -102,10 +102,10 @@ PredictDebug(PLAYERp ppp)
if (ppp->DoPlayerAction != pred_last_func) if (ppp->DoPlayerAction != pred_last_func)
{ {
extern ULONG MoveThingsCount; extern uint32_t MoveThingsCount;
SYM_TABLEp st_ptr; SYM_TABLEp st_ptr;
ULONG unrelocated_offset; uint32_t unrelocated_offset;
ULONG offset_from_symbol; uint32_t offset_from_symbol;
unrelocated_offset = SymCodePtrToOffset((void *)ppp->DoPlayerAction); unrelocated_offset = SymCodePtrToOffset((void *)ppp->DoPlayerAction);
st_ptr = SearchSymTableByOffset(SymTableCode, SymCountCode, unrelocated_offset, &offset_from_symbol); st_ptr = SearchSymTableByOffset(SymTableCode, SymCountCode, unrelocated_offset, &offset_from_symbol);

View file

@ -48,7 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
// only for timed quakes // only for timed quakes
#define QUAKE_WaitForTrigger(sp) (TEST_BOOL3(sp)) #define QUAKE_WaitForTrigger(sp) (TEST_BOOL3(sp))
extern BOOL GamePaused; extern SWBOOL GamePaused;
short CopyQuakeSpotToOn(SPRITEp sp) short CopyQuakeSpotToOn(SPRITEp sp)
{ {
@ -274,7 +274,7 @@ int SpawnQuake(short sectnum, int x, int y, int z,
return SpriteNum; return SpriteNum;
} }
BOOL SWBOOL
SetQuake(PLAYERp pp, short tics, short amt) SetQuake(PLAYERp pp, short tics, short amt)
{ {
SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, tics, amt, 30000); SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, tics, amt, 30000);
@ -282,7 +282,7 @@ SetQuake(PLAYERp pp, short tics, short amt)
} }
int int
SetExpQuake(SHORT Weapon) SetExpQuake(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
@ -291,7 +291,7 @@ SetExpQuake(SHORT Weapon)
} }
int int
SetGunQuake(SHORT SpriteNum) SetGunQuake(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -310,7 +310,7 @@ SetPlayerQuake(PLAYERp pp)
} }
int int
SetNuclearQuake(SHORT Weapon) SetNuclearQuake(int16_t Weapon)
{ {
SPRITEp sp = &sprite[Weapon]; SPRITEp sp = &sprite[Weapon];
@ -319,7 +319,7 @@ SetNuclearQuake(SHORT Weapon)
} }
int int
SetSumoQuake(SHORT SpriteNum) SetSumoQuake(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -328,7 +328,7 @@ SetSumoQuake(SHORT SpriteNum)
} }
int int
SetSumoFartQuake(SHORT SpriteNum) SetSumoFartQuake(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];

View file

@ -29,11 +29,11 @@ void ProcessQuakeOn(void);
void ProcessQuakeSpot(void); void ProcessQuakeSpot(void);
void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *ang_diff); void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *ang_diff);
void DoQuake(PLAYERp pp); void DoQuake(PLAYERp pp);
BOOL SetQuake(PLAYERp pp, short tics, short amt); SWBOOL SetQuake(PLAYERp pp, short tics, short amt);
int SetExpQuake(SHORT Weapon); int SetExpQuake(int16_t Weapon);
int SetGunQuake(SHORT SpriteNum); int SetGunQuake(int16_t SpriteNum);
int SetPlayerQuake(PLAYERp mpp); int SetPlayerQuake(PLAYERp mpp);
int SetNuclearQuake(SHORT Weapon); int SetNuclearQuake(int16_t Weapon);
int SetSumoQuake(SHORT SpriteNum); int SetSumoQuake(int16_t SpriteNum);
int SetSumoFartQuake(SHORT SpriteNum); int SetSumoFartQuake(int16_t SpriteNum);

View file

@ -947,7 +947,7 @@ InitRipperHang(short SpriteNum)
short hitsprite = -2, hitsect = -2; short hitsprite = -2, hitsect = -2;
int hitx, hity, hitz; int hitx, hity, hitz;
BOOL Found = FALSE; SWBOOL Found = FALSE;
short dang, tang; short dang, tang;
for (dang = 0; dang < 2048; dang += 128) for (dang = 0; dang < 2048; dang += 128)

View file

@ -946,7 +946,7 @@ InitRipper2Hang(short SpriteNum)
short hitsprite = -2, hitsect = -2; short hitsprite = -2, hitsect = -2;
int hitx, hity, hitz; int hitx, hity, hitz;
BOOL Found = FALSE; SWBOOL Found = FALSE;
short dang, tang; short dang, tang;
for (dang = 0; dang < 2048; dang += 128) for (dang = 0; dang < 2048; dang += 128)

View file

@ -43,18 +43,18 @@ void FAF_DrawRooms(int posx, int posy, int posz, short ang, int horiz, short cur
#define ZMAX 400 #define ZMAX 400
typedef struct typedef struct
{ {
LONG zval[ZMAX]; int32_t zval[ZMAX];
SHORT sectnum[ZMAX]; int16_t sectnum[ZMAX];
SHORT pic[ZMAX]; int16_t pic[ZMAX];
SHORT zcount; int16_t zcount;
SHORT slope[ZMAX]; int16_t slope[ZMAX];
} SAVE, *SAVEp; } SAVE, *SAVEp;
SAVE save; SAVE save;
BOOL FAF_DebugView = 0; SWBOOL FAF_DebugView = 0;
VOID COVERupdatesector(LONG x, LONG y, SHORTp newsector) void COVERupdatesector(int32_t x, int32_t y, int16_t* newsector)
{ {
ASSERT(*newsector>=0 && *newsector<MAXSECTORS); ASSERT(*newsector>=0 && *newsector<MAXSECTORS);
updatesector(x,y,newsector); updatesector(x,y,newsector);
@ -85,12 +85,12 @@ int COVERinsertsprite(short sectnum, short stat)
return spnum; return spnum;
} }
BOOL SWBOOL
FAF_Sector(short sectnum) FAF_Sector(short sectnum)
{ {
short SpriteNum, Next; short SpriteNum, Next;
SPRITEp sp; SPRITEp sp;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[sectnum], SpriteNum, Next) TRAVERSE_SPRITE_SECT(headspritesect[sectnum], SpriteNum, Next)
{ {
@ -106,7 +106,7 @@ FAF_Sector(short sectnum)
return FALSE; return FALSE;
} }
VOID SetWallWarpHitscan(short sectnum) void SetWallWarpHitscan(short sectnum)
{ {
short start_wall, wall_num; short start_wall, wall_num;
SPRITEp sp_warp; SPRITEp sp_warp;
@ -130,7 +130,7 @@ VOID SetWallWarpHitscan(short sectnum)
while (wall_num != start_wall); while (wall_num != start_wall);
} }
VOID ResetWallWarpHitscan(short sectnum) void ResetWallWarpHitscan(short sectnum)
{ {
short start_wall, wall_num; short start_wall, wall_num;
@ -146,16 +146,16 @@ VOID ResetWallWarpHitscan(short sectnum)
while (wall_num != start_wall); while (wall_num != start_wall);
} }
VOID void
FAFhitscan(LONG x, LONG y, LONG z, SHORT sectnum, FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONG xvect, LONG yvect, LONG zvect, int32_t xvect, int32_t yvect, int32_t zvect,
SHORTp hitsect, SHORTp hitwall, SHORTp hitsprite, int16_t* hitsect, int16_t* hitwall, int16_t* hitsprite,
LONGp hitx, LONGp hity, LONGp hitz, LONG clipmask) int32_t* hitx, int32_t* hity, int32_t* hitz, int32_t clipmask)
{ {
int loz, hiz; int loz, hiz;
short newsectnum = sectnum; short newsectnum = sectnum;
int startclipmask = 0; int startclipmask = 0;
BOOL plax_found = FALSE; SWBOOL plax_found = FALSE;
int sx,sy,sz; int sx,sy,sz;
if (clipmask == CLIPMASK_MISSILE) if (clipmask == CLIPMASK_MISSILE)
@ -271,9 +271,9 @@ FAFhitscan(LONG x, LONG y, LONG z, SHORT sectnum,
} }
} }
BOOL SWBOOL
FAFcansee(LONG xs, LONG ys, LONG zs, SHORT sects, FAFcansee(int32_t xs, int32_t ys, int32_t zs, int16_t sects,
LONG xe, LONG ye, LONG ze, SHORT secte) int32_t xe, int32_t ye, int32_t ze, int16_t secte)
{ {
int loz, hiz; int loz, hiz;
short newsectnum = sects; short newsectnum = sects;
@ -282,7 +282,7 @@ FAFcansee(LONG xs, LONG ys, LONG zs, SHORT sects,
short hitsect, hitwall, hitsprite; short hitsect, hitwall, hitsprite;
int hitx, hity, hitz; int hitx, hity, hitz;
int dist; int dist;
BOOL plax_found = FALSE; SWBOOL plax_found = FALSE;
ASSERT(sects >= 0 && secte >= 0); ASSERT(sects >= 0 && secte >= 0);
@ -379,12 +379,12 @@ GetZadjustment(short sectnum, short hitag)
return 0L; return 0L;
} }
BOOL SectorZadjust(int ceilhit, LONGp hiz, short florhit, LONGp loz) SWBOOL SectorZadjust(int ceilhit, int32_t* hiz, short florhit, int32_t* loz)
{ {
extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust; extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
int z_amt = 0; int z_amt = 0;
BOOL SkipFAFcheck = FALSE; SWBOOL SkipFAFcheck = FALSE;
if ((int)florhit != -1) if ((int)florhit != -1)
{ {
@ -493,7 +493,7 @@ BOOL SectorZadjust(int ceilhit, LONGp hiz, short florhit, LONGp loz)
return SkipFAFcheck; return SkipFAFcheck;
} }
VOID WaterAdjust(short florhit, LONGp loz) void WaterAdjust(short florhit, int32_t* loz)
{ {
switch (TEST(florhit, HIT_MASK)) switch (TEST(florhit, HIT_MASK))
{ {
@ -510,14 +510,14 @@ VOID WaterAdjust(short florhit, LONGp loz)
} }
} }
VOID FAFgetzrange(LONG x, LONG y, LONG z, SHORT sectnum, void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONGp hiz, LONGp ceilhit, int32_t* hiz, int32_t* ceilhit,
LONGp loz, LONGp florhit, int32_t* loz, int32_t* florhit,
LONG clipdist, LONG clipmask) int32_t clipdist, int32_t clipmask)
{ {
int foo1; int foo1;
int foo2; int foo2;
BOOL SkipFAFcheck; SWBOOL SkipFAFcheck;
// IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// This will return invalid FAF ceiling and floor heights inside of analyzesprite // This will return invalid FAF ceiling and floor heights inside of analyzesprite
@ -582,13 +582,13 @@ VOID FAFgetzrange(LONG x, LONG y, LONG z, SHORT sectnum,
} }
} }
VOID FAFgetzrangepoint(LONG x, LONG y, LONG z, SHORT sectnum, void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum,
LONGp hiz, LONGp ceilhit, int32_t* hiz, int32_t* ceilhit,
LONGp loz, LONGp florhit) int32_t* loz, int32_t* florhit)
{ {
int foo1; int foo1;
int foo2; int foo2;
BOOL SkipFAFcheck; SWBOOL SkipFAFcheck;
// IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// This will return invalid FAF ceiling and floor heights inside of analyzesprite // This will return invalid FAF ceiling and floor heights inside of analyzesprite
@ -645,13 +645,13 @@ VOID FAFgetzrangepoint(LONG x, LONG y, LONG z, SHORT sectnum,
} }
#if 0 #if 0
BOOL SWBOOL
FAF_ConnectCeiling(short sectnum) FAF_ConnectCeiling(short sectnum)
{ {
return sector[sectnum].ceilingpicnum == FAF_MIRROR_PIC; return sector[sectnum].ceilingpicnum == FAF_MIRROR_PIC;
} }
BOOL SWBOOL
FAF_ConnectFloor(short sectnum) FAF_ConnectFloor(short sectnum)
{ {
return sector[sectnum].floorpicnum == FAF_MIRROR_PIC; return sector[sectnum].floorpicnum == FAF_MIRROR_PIC;
@ -660,8 +660,8 @@ FAF_ConnectFloor(short sectnum)
// doesn't work for blank pics // doesn't work for blank pics
BOOL SWBOOL
PicInView(short tile_num, BOOL reset) PicInView(short tile_num, SWBOOL reset)
{ {
if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7))) if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7)))
{ {
@ -674,13 +674,13 @@ PicInView(short tile_num, BOOL reset)
return FALSE; return FALSE;
} }
VOID void
SetupMirrorTiles(VOID) SetupMirrorTiles(void)
{ {
short i, nexti; short i, nexti;
short j, nextj; short j, nextj;
SPRITEp sp; SPRITEp sp;
BOOL found; SWBOOL found;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_FAF], i, nexti)
{ {
@ -790,7 +790,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
// will not hurt if GlobStackSect is invalid - inside checks for this // will not hurt if GlobStackSect is invalid - inside checks for this
if (inside(x, y, GlobStackSect[i]) == 1) if (inside(x, y, GlobStackSect[i]) == 1)
{ {
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[GlobStackSect[i]], SpriteNum, Next) TRAVERSE_SPRITE_SECT(headspritesect[GlobStackSect[i]], SpriteNum, Next)
{ {
@ -820,7 +820,7 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
{ {
if (inside(x, y, (short) i) == 1) if (inside(x, y, (short) i) == 1)
{ {
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next) TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next)
{ {
@ -881,8 +881,8 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower)
} }
} }
BOOL SWBOOL
FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) FindCeilingView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
{ {
int xoff = 0; int xoff = 0;
int yoff = 0; int yoff = 0;
@ -969,8 +969,8 @@ FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum)
return TRUE; return TRUE;
} }
BOOL SWBOOL
FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum)
{ {
int xoff = 0; int xoff = 0;
int yoff = 0; int yoff = 0;
@ -1097,7 +1097,7 @@ ViewSectorInScene(short cursectnum, short type, short level)
return -1; return -1;
} }
VOID void
DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
{ {
short i; short i;

View file

@ -35,10 +35,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "interp.h" #include "interp.h"
#include "sprite.h" #include "sprite.h"
short DoRotatorMatch(PLAYERp pp, short match, BOOL); short DoRotatorMatch(PLAYERp pp, short match, SWBOOL);
BOOL TestRotatorMatchActive(short match); SWBOOL TestRotatorMatchActive(short match);
VOID InterpSectorSprites(short sectnum, BOOL state); void InterpSectorSprites(short sectnum, SWBOOL state);
VOID DoMatchEverything(PLAYERp pp, short match, short state); void DoMatchEverything(PLAYERp pp, short match, short state);
void DoRotatorSetInterp(short SpriteNum); void DoRotatorSetInterp(short SpriteNum);
void DoRotatorStopInterp(short SpriteNum); void DoRotatorStopInterp(short SpriteNum);
@ -71,12 +71,12 @@ void ReverseRotator(short SpriteNum)
r->vel = -r->vel; r->vel = -r->vel;
} }
BOOL SWBOOL
RotatorSwitch(short match, short setting) RotatorSwitch(short match, short setting)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{ {
@ -154,7 +154,7 @@ short DoRotatorOperate(PLAYERp pp, short sectnum)
// called from switches and triggers // called from switches and triggers
// returns first vator found // returns first vator found
short short
DoRotatorMatch(PLAYERp pp, short match, BOOL manual) DoRotatorMatch(PLAYERp pp, short match, SWBOOL manual)
{ {
USERp fu; USERp fu;
SPRITEp fsp; SPRITEp fsp;
@ -174,7 +174,7 @@ DoRotatorMatch(PLAYERp pp, short match, BOOL manual)
fu = User[i]; fu = User[i];
// single play only vator // single play only vator
// BOOL 8 must be set for message to display // SWBOOL 8 must be set for message to display
if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS)) if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS))
{ {
if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play."); if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play.");
@ -233,7 +233,7 @@ DoRotatorMatch(PLAYERp pp, short match, BOOL manual)
} }
BOOL SWBOOL
TestRotatorMatchActive(short match) TestRotatorMatchActive(short match)
{ {
USERp fu; USERp fu;
@ -311,7 +311,7 @@ int DoRotatorMove(short SpriteNum)
int i, nexti; int i, nexti;
int nx,ny; int nx,ny;
int dist,closest; int dist,closest;
BOOL kill = FALSE; SWBOOL kill = FALSE;
r = u->rotator; r = u->rotator;

View file

@ -51,7 +51,7 @@ unsigned char lumplockbyte[11];
// STATICS // STATICS
//============= //=============
static int32 numlumps = 0; static int32_t numlumps = 0;
static void **lumpcache = NULL; static void **lumpcache = NULL;
static lumpinfo_t *lumpinfo = NULL; // location of each lump on disk static lumpinfo_t *lumpinfo = NULL; // location of each lump on disk
@ -75,13 +75,13 @@ static lumpinfo_t *lumpinfo = NULL; // location of each lump on dis
==================== ====================
*/ */
int32 RTS_AddFile(char *filename) int32_t RTS_AddFile(char *filename)
{ {
wadinfo_t header; wadinfo_t header;
lumpinfo_t *lump_p; lumpinfo_t *lump_p;
int32 i; int32_t i;
int32 handle, length; int32_t handle, length;
int32 startlump; int32_t startlump;
filelump_t *fileinfo, *fileinfoo; filelump_t *fileinfo, *fileinfoo;
// //
@ -159,7 +159,7 @@ int32 RTS_AddFile(char *filename)
void RTS_Init(char *filename) void RTS_Init(char *filename)
{ {
int32 length; int32_t length;
// //
// open all the files, load headers, and count lumps // open all the files, load headers, and count lumps
// //
@ -192,7 +192,7 @@ void RTS_Init(char *filename)
void RTS_Shutdown(void) void RTS_Shutdown(void)
{ {
int32 i; int32_t i;
if (lumpcache) if (lumpcache)
{ {
@ -223,7 +223,7 @@ void RTS_Shutdown(void)
==================== ====================
*/ */
int32 RTS_NumSounds(void) int32_t RTS_NumSounds(void)
{ {
return numlumps-1; return numlumps-1;
} }
@ -238,7 +238,7 @@ int32 RTS_NumSounds(void)
==================== ====================
*/ */
int32 RTS_SoundLength(int32 lump) int32_t RTS_SoundLength(int32_t lump)
{ {
lump++; lump++;
if (lump >= numlumps) if (lump >= numlumps)
@ -254,7 +254,7 @@ int32 RTS_SoundLength(int32 lump)
==================== ====================
*/ */
char *RTS_GetSoundName(int32 i) char *RTS_GetSoundName(int32_t i)
{ {
i++; i++;
if (i>=numlumps) if (i>=numlumps)
@ -271,7 +271,7 @@ char *RTS_GetSoundName(int32 i)
= =
==================== ====================
*/ */
void RTS_ReadLump(int32 lump, void *dest) void RTS_ReadLump(int32_t lump, void *dest)
{ {
lumpinfo_t *l; lumpinfo_t *l;
@ -295,10 +295,10 @@ void RTS_ReadLump(int32 lump, void *dest)
// allocates off the cache // allocates off the cache
void *RTS_GetSound(int32 lump) void *RTS_GetSound(int32_t lump)
{ {
lump++; lump++;
if ((uint32)lump >= (uint32)numlumps) if ((uint16_t)lump >= (uint16_t)numlumps)
Error("RTS_GetSound: %i >= %i\n",lump,numlumps); Error("RTS_GetSound: %i >= %i\n",lump,numlumps);
if (lumpcache[lump] == NULL) if (lumpcache[lump] == NULL)
@ -324,10 +324,10 @@ void *RTS_GetSound(int32 lump)
= =
==================== ====================
*/ */
void *RTS_GetSound(int32 lump) void *RTS_GetSound(int32_t lump)
{ {
lump++; lump++;
if ((uint32)lump >= numlumps) if ((uint16_t)lump >= numlumps)
Error("RTS_GetSound: %i >= numlumps",lump); Error("RTS_GetSound: %i >= numlumps",lump);
else if (lump < 0) else if (lump < 0)

View file

@ -79,7 +79,7 @@ void RTS_Shutdown(void);
==================== ====================
*/ */
int32 RTS_NumSounds(void); int32_t RTS_NumSounds(void);
/* /*
==================== ====================
= =
@ -90,7 +90,7 @@ int32 RTS_NumSounds(void);
==================== ====================
*/ */
int32 RTS_SoundLength(int32 lump); int32_t RTS_SoundLength(int32_t lump);
/* /*
==================== ====================
= =
@ -99,7 +99,7 @@ int32 RTS_SoundLength(int32 lump);
==================== ====================
*/ */
char *RTS_GetSoundName(int32 i); char *RTS_GetSoundName(int32_t i);
/* /*
==================== ====================
= =
@ -107,5 +107,5 @@ char *RTS_GetSoundName(int32 i);
= =
==================== ====================
*/ */
void *RTS_GetSound(int32 lump); void *RTS_GetSound(int32_t lump);
#endif #endif

View file

@ -67,7 +67,7 @@ TO DO
*/ */
extern int lastUpdate; extern int lastUpdate;
extern BYTE RedBookSong[40]; extern uint8_t RedBookSong[40];
extern char UserMapName[80]; extern char UserMapName[80];
extern char LevelSong[16]; extern char LevelSong[16];
extern char SaveGameDescr[10][80]; extern char SaveGameDescr[10][80];
@ -75,26 +75,26 @@ extern int PlayClock;
extern short TotalKillable; extern short TotalKillable;
extern short LevelSecrets; extern short LevelSecrets;
extern short Bunny_Count; extern short Bunny_Count;
extern BOOL NewGame; extern SWBOOL NewGame;
extern char CacheLastLevel[]; extern char CacheLastLevel[];
extern short PlayingLevel; extern short PlayingLevel;
extern int GodMode; extern int GodMode;
extern int GameVersion; extern int GameVersion;
//extern short Zombies; //extern short Zombies;
extern BOOL serpwasseen; extern SWBOOL serpwasseen;
extern BOOL sumowasseen; extern SWBOOL sumowasseen;
extern BOOL zillawasseen; extern SWBOOL zillawasseen;
extern short BossSpriteNum[3]; extern short BossSpriteNum[3];
VOID ScreenTileLock(void); void ScreenTileLock(void);
VOID ScreenTileUnLock(void); void ScreenTileUnLock(void);
int ScreenSaveSetup(PLAYERp pp); int ScreenSaveSetup(PLAYERp pp);
VOID ScreenSave(FILE *fout); void ScreenSave(FILE *fout);
int ScreenLoadSaveSetup(PLAYERp pp); int ScreenLoadSaveSetup(PLAYERp pp);
VOID ScreenLoad(FILE *fin); void ScreenLoad(FILE *fin);
#define PANEL_SAVE 1 #define PANEL_SAVE 1
#define ANIM_SAVE 1 #define ANIM_SAVE 1
@ -225,9 +225,9 @@ int SaveGame(short save_num)
USERp u; USERp u;
ANIM tanim; ANIM tanim;
ANIMp a; ANIMp a;
CHAR code; int8_t code;
BYTE data_code; uint8_t data_code;
SHORT data_ndx; int16_t data_ndx;
PANEL_SPRITE tpanel_sprite; PANEL_SPRITE tpanel_sprite;
PANEL_SPRITEp psp,cur,next; PANEL_SPRITEp psp,cur,next;
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
@ -512,11 +512,11 @@ int SaveGame(short save_num)
{ {
if (User[j]) if (User[j])
{ {
BYTEp bp = (BYTEp)User[j]; uint8_t* bp = (uint8_t*)User[j];
if ((BYTEp)a->ptr >= bp && (BYTEp)a->ptr < bp + sizeof(USER)) if ((uint8_t*)a->ptr >= bp && (uint8_t*)a->ptr < bp + sizeof(USER))
{ {
offset = (intptr_t)((BYTEp)a->ptr - bp); // offset from user data offset = (intptr_t)((uint8_t*)a->ptr - bp); // offset from user data
a->ptr = (int *)-2; a->ptr = (int *)-2;
break; break;
} }
@ -529,11 +529,11 @@ int SaveGame(short save_num)
{ {
if (SectUser[j]) if (SectUser[j])
{ {
BYTEp bp = (BYTEp)SectUser[j]; uint8_t* bp = (uint8_t*)SectUser[j];
if ((BYTEp)a->ptr >= bp && (BYTEp)a->ptr < bp + sizeof(SECT_USER)) if ((uint8_t*)a->ptr >= bp && (uint8_t*)a->ptr < bp + sizeof(SECT_USER))
{ {
offset = (intptr_t)((BYTEp)a->ptr - bp); // offset from user data offset = (intptr_t)((uint8_t*)a->ptr - bp); // offset from user data
a->ptr = (int *)-3; a->ptr = (int *)-3;
break; break;
} }
@ -752,10 +752,10 @@ int LoadGame(short save_num)
USERp u; USERp u;
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
SECT_USERp sectu; SECT_USERp sectu;
CHAR code; int8_t code;
ANIMp a; ANIMp a;
BYTE data_code; uint8_t data_code;
SHORT data_ndx; int16_t data_ndx;
PANEL_SPRITEp psp,next,cur; PANEL_SPRITEp psp,next,cur;
PANEL_SPRITE tpanel_sprite; PANEL_SPRITE tpanel_sprite;
char game_name[80]; char game_name[80];
@ -765,7 +765,7 @@ int LoadGame(short save_num)
int StateStartNdx; int StateStartNdx;
int StateNdx; int StateNdx;
int StateEndNdx; int StateEndNdx;
extern BOOL InMenuLevel; extern SWBOOL InMenuLevel;
Saveable_Init(); Saveable_Init();
@ -1157,9 +1157,9 @@ int LoadGame(short save_num)
MREAD(palette_data,sizeof(palette_data),1,fil); MREAD(palette_data,sizeof(palette_data),1,fil);
{ {
BOOL AmbBak = gs.Ambient; SWBOOL AmbBak = gs.Ambient;
BOOL MusicBak = gs.MusicOn; SWBOOL MusicBak = gs.MusicOn;
BOOL FxBak = gs.FxOn; SWBOOL FxBak = gs.FxOn;
short SndVolBak = gs.SoundVolume; short SndVolBak = gs.SoundVolume;
short MusVolBak = gs.MusicVolume; short MusVolBak = gs.MusicVolume;
MREAD(&gs,sizeof(gs),1,fil); MREAD(&gs,sizeof(gs),1,fil);
@ -1300,7 +1300,7 @@ int LoadGame(short save_num)
return 0; return 0;
} }
VOID void
ScreenSave(MFILE fout) ScreenSave(MFILE fout)
{ {
int num; int num;
@ -1308,7 +1308,7 @@ ScreenSave(MFILE fout)
ASSERT(num == 1); ASSERT(num == 1);
} }
VOID void
ScreenLoad(MFILE fin) ScreenLoad(MFILE fin)
{ {
int num; int num;

View file

@ -82,8 +82,8 @@ char token[MAXTOKEN];
char *scriptbuffer,*script_p,*scriptend_p; char *scriptbuffer,*script_p,*scriptend_p;
int grabbed; int grabbed;
int scriptline; int scriptline;
BOOL endofscript; SWBOOL endofscript;
BOOL tokenready; // only TRUE if UnGetToken was just called SWBOOL tokenready; // only TRUE if UnGetToken was just called
/* /*
============== ==============
@ -93,7 +93,7 @@ BOOL tokenready; // only TRUE if UnGetToken was just call
============== ==============
*/ */
BOOL LoadScriptFile(char *filename) SWBOOL LoadScriptFile(char *filename)
{ {
int size, readsize; int size, readsize;
int fp; int fp;
@ -161,7 +161,7 @@ void UnGetToken(void)
============== ==============
*/ */
void GetToken(BOOL crossline) void GetToken(SWBOOL crossline)
{ {
char *token_p; char *token_p;
@ -249,7 +249,7 @@ skipspace:
============== ==============
*/ */
BOOL TokenAvailable(void) SWBOOL TokenAvailable(void)
{ {
char *search_p; char *search_p;

View file

@ -52,19 +52,19 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
short FindNextSectorByTag(short sectnum, int tag); short FindNextSectorByTag(short sectnum, int tag);
short LevelSecrets; short LevelSecrets;
BOOL TestVatorMatchActive(short match); SWBOOL TestVatorMatchActive(short match);
BOOL TestSpikeMatchActive(short match); SWBOOL TestSpikeMatchActive(short match);
BOOL TestRotatorMatchActive(short match); SWBOOL TestRotatorMatchActive(short match);
BOOL TestSlidorMatchActive(short match); SWBOOL TestSlidorMatchActive(short match);
int PlayerCheckDeath(PLAYERp, short); int PlayerCheckDeath(PLAYERp, short);
short DoVatorOperate(PLAYERp, short); short DoVatorOperate(PLAYERp, short);
short DoVatorMatch(PLAYERp pp, short match); short DoVatorMatch(PLAYERp pp, short match);
short DoRotatorOperate(PLAYERp, short); short DoRotatorOperate(PLAYERp, short);
short DoRotatorMatch(PLAYERp pp, short match, BOOL); short DoRotatorMatch(PLAYERp pp, short match, SWBOOL);
short DoSlidorOperate(PLAYERp, short); short DoSlidorOperate(PLAYERp, short);
short DoSlidorMatch(PLAYERp pp, short match, BOOL); short DoSlidorMatch(PLAYERp pp, short match, SWBOOL);
VOID KillMatchingCrackSprites(short match); void KillMatchingCrackSprites(short match);
int DoTrapReset(short match); int DoTrapReset(short match);
int DoTrapMatch(short match); int DoTrapMatch(short match);
@ -88,7 +88,7 @@ SINE_WALL SineWall[MAX_SINE_WALL][MAX_SINE_WALL_POINTS];
SPRING_BOARD SpringBoard[20]; SPRING_BOARD SpringBoard[20];
int x_min_bound, y_min_bound, x_max_bound, y_max_bound; int x_min_bound, y_min_bound, x_max_bound, y_max_bound;
void SetSectorWallBits(short sectnum, int bit_mask, BOOL set_sectwall, BOOL set_nextwall) void SetSectorWallBits(short sectnum, int bit_mask, SWBOOL set_sectwall, SWBOOL set_nextwall)
{ {
short wall_num, start_wall; short wall_num, start_wall;
@ -108,7 +108,7 @@ void SetSectorWallBits(short sectnum, int bit_mask, BOOL set_sectwall, BOOL set_
} }
VOID WallSetupDontMove(VOID) void WallSetupDontMove(void)
{ {
int i,j,nexti,nextj; int i,j,nexti,nextj;
SPRITEp spu, spl; SPRITEp spu, spl;
@ -135,8 +135,8 @@ VOID WallSetupDontMove(VOID)
} }
} }
VOID void
WallSetup(VOID) WallSetup(void)
{ {
short i = 0; short i = 0;
short NextSineWall = 0; short NextSineWall = 0;
@ -423,7 +423,7 @@ WallSetup(VOID)
} }
VOID void
SectorLiquidSet(short i) SectorLiquidSet(short i)
{ {
SECT_USERp sectu; SECT_USERp sectu;
@ -468,8 +468,8 @@ SectorLiquidSet(short i)
} }
} }
VOID void
SectorSetup(VOID) SectorSetup(void)
{ {
short i = 0, k, tag; short i = 0, k, tag;
short NextSineWave = 0, rotcnt = 0, swingcnt = 0; short NextSineWave = 0, rotcnt = 0, swingcnt = 0;
@ -706,7 +706,7 @@ SectorSetup(VOID)
} }
} }
VOID void
SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid) SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid)
{ {
short startwall, endwall, j; short startwall, endwall, j;
@ -729,12 +729,12 @@ SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid)
} }
VOID void
DoSpringBoard(PLAYERp pp, short sectnum) DoSpringBoard(PLAYERp pp, short sectnum)
{ {
int sb; int sb;
int i; int i;
VOID DoPlayerBeginForceJump(PLAYERp); void DoPlayerBeginForceJump(PLAYERp);
#if 0 #if 0
i = AnimGetGoal(&sector[sectnum].floorz); i = AnimGetGoal(&sector[sectnum].floorz);
@ -768,8 +768,8 @@ DoSpringBoard(PLAYERp pp, short sectnum)
} }
VOID void
DoSpringBoardDown(VOID) DoSpringBoardDown(void)
{ {
unsigned sb; unsigned sb;
SPRING_BOARD *sbp; SPRING_BOARD *sbp;
@ -1120,7 +1120,7 @@ AnimateSwitch(SPRITEp sp, short tgt_value)
} }
VOID void
SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh) SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -1163,7 +1163,7 @@ SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh)
} }
VOID void
DoExplodeSector(short match) DoExplodeSector(short match)
{ {
short orig_ang; short orig_ang;
@ -1239,7 +1239,7 @@ int DoSpawnSpot(short SpriteNum)
} }
// spawns shrap when killing an object // spawns shrap when killing an object
VOID void
DoSpawnSpotsForKill(short match) DoSpawnSpotsForKill(short match)
{ {
short sn, next_sn; short sn, next_sn;
@ -1268,7 +1268,7 @@ DoSpawnSpotsForKill(short match)
} }
// spawns shrap when damaging an object // spawns shrap when damaging an object
VOID void
DoSpawnSpotsForDamage(short match) DoSpawnSpotsForDamage(short match)
{ {
short sn, next_sn; short sn, next_sn;
@ -1296,7 +1296,7 @@ DoSpawnSpotsForDamage(short match)
} }
} }
VOID void
DoSoundSpotMatch(short match, short sound_num, short sound_type) DoSoundSpotMatch(short match, short sound_num, short sound_type)
{ {
short sn, next_sn; short sn, next_sn;
@ -1384,7 +1384,7 @@ DoSoundSpotMatch(short match, short sound_num, short sound_type)
} }
} }
VOID void
DoSoundSpotStopSound(short match) DoSoundSpotStopSound(short match)
{ {
short sn, next_sn; short sn, next_sn;
@ -1402,7 +1402,7 @@ DoSoundSpotStopSound(short match)
} }
} }
VOID void
DoStopSoundSpotMatch(short match) DoStopSoundSpotMatch(short match)
{ {
short sn, next_sn; short sn, next_sn;
@ -1420,7 +1420,7 @@ DoStopSoundSpotMatch(short match)
} }
BOOL TestKillSectorObject(SECTOR_OBJECTp sop) SWBOOL TestKillSectorObject(SECTOR_OBJECTp sop)
{ {
if (TEST(sop->flags, SOBJ_KILLABLE)) if (TEST(sop->flags, SOBJ_KILLABLE))
{ {
@ -1453,7 +1453,7 @@ DoSectorObjectKillMatch(short match)
} }
BOOL SWBOOL
SearchExplodeSectorMatch(short match) SearchExplodeSectorMatch(short match)
{ {
short i,nexti; short i,nexti;
@ -1474,7 +1474,7 @@ SearchExplodeSectorMatch(short match)
return FALSE; return FALSE;
} }
VOID void
KillMatchingCrackSprites(short match) KillMatchingCrackSprites(short match)
{ {
short i,nexti; short i,nexti;
@ -1494,7 +1494,7 @@ KillMatchingCrackSprites(short match)
} }
} }
VOID void
WeaponExplodeSectorInRange(short weapon) WeaponExplodeSectorInRange(short weapon)
{ {
short i, nexti; short i, nexti;
@ -1540,7 +1540,7 @@ WeaponExplodeSectorInRange(short weapon)
} }
VOID void
ShootableSwitch(short SpriteNum, short Weapon) ShootableSwitch(short SpriteNum, short Weapon)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -1561,7 +1561,7 @@ ShootableSwitch(short SpriteNum, short Weapon)
} }
} }
VOID DoDeleteSpriteMatch(short match) void DoDeleteSpriteMatch(short match)
{ {
static short StatList[] = static short StatList[] =
{ {
@ -1629,7 +1629,7 @@ VOID DoDeleteSpriteMatch(short match)
} }
} }
VOID void
DoChangorMatch(short match) DoChangorMatch(short match)
{ {
short sn, next_sn; short sn, next_sn;
@ -1683,7 +1683,7 @@ DoChangorMatch(short match)
} }
} }
VOID DoMatchEverything(PLAYERp pp, short match, short state) void DoMatchEverything(PLAYERp pp, short match, short state)
{ {
PLAYERp bak; PLAYERp bak;
@ -1733,11 +1733,11 @@ VOID DoMatchEverything(PLAYERp pp, short match, short state)
DoDeleteSpriteMatch(match); DoDeleteSpriteMatch(match);
} }
BOOL ComboSwitchTest(short combo_type, short match) SWBOOL ComboSwitchTest(short combo_type, short match)
{ {
short i,nexti; short i,nexti;
SPRITEp sp; SPRITEp sp;
BOOL state; SWBOOL state;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{ {
@ -2002,7 +2002,7 @@ OperateSprite(short SpriteNum, short player_is_operating)
case TAG_LEVEL_EXIT_SWITCH: case TAG_LEVEL_EXIT_SWITCH:
{ {
extern short Level; extern short Level;
extern BOOL QuitFlag, ExitLevel, FinishedLevel; extern SWBOOL QuitFlag, ExitLevel, FinishedLevel;
AnimateSwitch(sp, -1); AnimateSwitch(sp, -1);
@ -2173,7 +2173,7 @@ int DoTrapMatch(short match)
} }
VOID void
OperateTripTrigger(PLAYERp pp) OperateTripTrigger(PLAYERp pp)
{ {
SECTORp sectp = &sector[pp->cursectnum]; SECTORp sectp = &sector[pp->cursectnum];
@ -2211,7 +2211,7 @@ OperateTripTrigger(PLAYERp pp)
case TAG_LEVEL_EXIT_SWITCH: case TAG_LEVEL_EXIT_SWITCH:
{ {
extern short Level; extern short Level;
extern BOOL QuitFlag, ExitLevel, FinishedLevel; extern SWBOOL QuitFlag, ExitLevel, FinishedLevel;
if (sectp->hitag) if (sectp->hitag)
Level = sectp->hitag; Level = sectp->hitag;
@ -2332,7 +2332,7 @@ OperateTripTrigger(PLAYERp pp)
} }
} }
VOID void
OperateContinuousTrigger(PLAYERp pp) OperateContinuousTrigger(PLAYERp pp)
{ {
if (Prediction) if (Prediction)
@ -2418,7 +2418,7 @@ short PlayerTakeSectorDamage(PLAYERp pp)
// Needed in order to see if Player should grunt if he can't find a wall to operate on // Needed in order to see if Player should grunt if he can't find a wall to operate on
// If player is too far away, don't grunt // If player is too far away, don't grunt
#define PLAYER_SOUNDEVENT_TAG 900 #define PLAYER_SOUNDEVENT_TAG 900
BOOL NearThings(PLAYERp pp) SWBOOL NearThings(PLAYERp pp)
{ {
short sectnum; short sectnum;
short rndnum; short rndnum;
@ -2680,12 +2680,12 @@ int DoPlayerGrabStar(PLAYERp pp)
VOID void
PlayerOperateEnv(PLAYERp pp) PlayerOperateEnv(PLAYERp pp)
{ {
SECT_USERp sectu = SectUser[pp->cursectnum]; SECT_USERp sectu = SectUser[pp->cursectnum];
SECTORp sectp = &sector[pp->cursectnum]; SECTORp sectp = &sector[pp->cursectnum];
BOOL found; SWBOOL found;
if (Prediction) if (Prediction)
return; return;
@ -2869,8 +2869,8 @@ PlayerOperateEnv(PLAYERp pp)
VOID void
DoSineWaveFloor(VOID) DoSineWaveFloor(void)
{ {
SINE_WAVE_FLOOR *swf; SINE_WAVE_FLOOR *swf;
int newz; int newz;
@ -2934,8 +2934,8 @@ DoSineWaveFloor(VOID)
} }
VOID void
DoSineWaveWall(VOID) DoSineWaveWall(void)
{ {
SINE_WALL *sw; SINE_WALL *sw;
int new; int new;
@ -2964,7 +2964,7 @@ DoSineWaveWall(VOID)
} }
} }
VOID void
DoAnim(int numtics) DoAnim(int numtics)
{ {
int i, animval; int i, animval;
@ -3024,8 +3024,8 @@ DoAnim(int numtics)
} }
} }
VOID void
AnimClear(VOID) AnimClear(void)
{ {
int i, animval; int i, animval;
@ -3320,8 +3320,8 @@ void movelava(char *dapic)
} }
VOID void
DoPanning(VOID) DoPanning(void)
{ {
int nx, ny; int nx, ny;
short i,nexti; short i,nexti;
@ -3376,13 +3376,13 @@ DoPanning(VOID)
} }
VOID void
DoSector(VOID) DoSector(void)
{ {
short i; short i;
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
BOOL riding; SWBOOL riding;
extern BOOL DebugActorFreeze; extern SWBOOL DebugActorFreeze;
int sync_flag; int sync_flag;
short pnum; short pnum;
int min_dist,dist,a,b,c; int min_dist,dist,a,b,c;

View file

@ -28,16 +28,16 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define SECTOR_H #define SECTOR_H
VOID SectorSetup(VOID); void SectorSetup(void);
DOOR_AUTO_CLOSEp SetDoorAutoClose(short SectorNum, short Type); DOOR_AUTO_CLOSEp SetDoorAutoClose(short SectorNum, short Type);
VOID DoDragging(VOID); void DoDragging(void);
int MoveDoorVert(short door_sector, short dir, short door_speed); int MoveDoorVert(short door_sector, short dir, short door_speed);
int MoveDoorUp(short door_sector, short auto_close, short door_speed); int MoveDoorUp(short door_sector, short auto_close, short door_speed);
int MoveDoorDown(short door_sector, short dir, short door_speed); int MoveDoorDown(short door_sector, short dir, short door_speed);
int MoveDoorHoriz(short door_sector, short dir, short door_speed); int MoveDoorHoriz(short door_sector, short dir, short door_speed);
VOID DoDoorsClose(VOID); void DoDoorsClose(void);
short Switch(short SwitchSector); short Switch(short SwitchSector);
VOID PlayerOperateEnv(PLAYERp pp); void PlayerOperateEnv(PLAYERp pp);
int TeleportToSector(PLAYERp pp, int newsector); int TeleportToSector(PLAYERp pp, int newsector);
int OperateSector(short sectnum,short player_is_operating); int OperateSector(short sectnum,short player_is_operating);
int OperateSprite(short SpriteNum, short player_is_operating); int OperateSprite(short SpriteNum, short player_is_operating);
@ -63,15 +63,15 @@ typedef struct
} NEAR_TAG_INFO, *NEAR_TAG_INFOp; } NEAR_TAG_INFO, *NEAR_TAG_INFOp;
extern short nti_cnt; extern short nti_cnt;
VOID DoSpawnSpotsForKill(short match); void DoSpawnSpotsForKill(short match);
VOID DoSpawnSpotsForDamage(short match); void DoSpawnSpotsForDamage(short match);
VOID DoMatchEverything(PLAYERp pp, short match, short state); void DoMatchEverything(PLAYERp pp, short match, short state);
BOOL ComboSwitchTest(short combo_type,short match); SWBOOL ComboSwitchTest(short combo_type,short match);
void DoSoundSpotStopSound(short match); void DoSoundSpotStopSound(short match);
void DoSector(void); void DoSector(void);
short AnimateSwitch(SPRITEp sp,short tgt_value); short AnimateSwitch(SPRITEp sp,short tgt_value);
void ShootableSwitch(short SpriteNum,short Weapon); void ShootableSwitch(short SpriteNum,short Weapon);
BOOL TestKillSectorObject(SECTOR_OBJECTp sop); SWBOOL TestKillSectorObject(SECTOR_OBJECTp sop);
void WeaponExplodeSectorInRange(short weapon); void WeaponExplodeSectorInRange(short weapon);
void initlava(void); void initlava(void);

View file

@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "track.h" #include "track.h"
#include "sector.h" #include "sector.h"
extern BYTE RedBookSong[40]; extern uint8_t RedBookSong[40];
extern short BossSpriteNum[3]; extern short BossSpriteNum[3];
DECISION SerpBattle[] = DECISION SerpBattle[] =
@ -811,7 +811,7 @@ int DoDeathSpecial(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
static BOOL alreadydid = FALSE; static SWBOOL alreadydid = FALSE;
DoMatchEverything(NULL, sp->lotag, ON); DoMatchEverything(NULL, sp->lotag, ON);

View file

@ -33,41 +33,41 @@ typedef struct
int MouseSpeed; int MouseSpeed;
int MusicVolume; int MusicVolume;
int SoundVolume; int SoundVolume;
CHAR BorderNum; int8_t BorderNum;
CHAR Brightness; int8_t Brightness;
CHAR BorderTile; int8_t BorderTile;
BOOL MouseAimingType; SWBOOL MouseAimingType;
BOOL MouseLook; SWBOOL MouseLook;
BOOL MouseInvert; SWBOOL MouseInvert;
BOOL Bobbing; SWBOOL Bobbing;
BOOL Tilting; SWBOOL Tilting;
BOOL Shadows; SWBOOL Shadows;
BOOL AutoRun; SWBOOL AutoRun;
BOOL Crosshair; SWBOOL Crosshair;
BOOL AutoAim; SWBOOL AutoAim;
BOOL Messages; SWBOOL Messages;
BOOL FxOn; SWBOOL FxOn;
BOOL MusicOn; SWBOOL MusicOn;
BOOL Talking; SWBOOL Talking;
BOOL Ambient; SWBOOL Ambient;
BOOL FlipStereo; SWBOOL FlipStereo;
// Net Options from Menus // Net Options from Menus
BYTE NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn] uint8_t NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn]
BYTE NetLevel; // 1-28 uint8_t NetLevel; // 1-28
BYTE NetMonsters; // Cycle skill levels uint8_t NetMonsters; // Cycle skill levels
BOOL NetHurtTeammate; // Allow friendly kills SWBOOL NetHurtTeammate; // Allow friendly kills
BOOL NetSpawnMarkers; // Respawn markers on/off SWBOOL NetSpawnMarkers; // Respawn markers on/off
BOOL NetTeamPlay; // Team play SWBOOL NetTeamPlay; // Team play
BYTE NetKillLimit; // Number of frags at which game ends uint8_t NetKillLimit; // Number of frags at which game ends
BYTE NetTimeLimit; // Limit time of game uint8_t NetTimeLimit; // Limit time of game
BYTE NetColor; // Chosen color for player uint8_t NetColor; // Chosen color for player
BYTE ParentalLock; // Parental Lock on/off uint8_t ParentalLock; // Parental Lock on/off
char Password[20]; // Parental Lock password char Password[20]; // Parental Lock password
BOOL NetNuke; SWBOOL NetNuke;
BOOL Voxels; SWBOOL Voxels;
BOOL Stats; SWBOOL Stats;
BOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming SWBOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming
BOOL PlayCD; SWBOOL PlayCD;
char OggTrackName[MAXOGGTRACKLENGTH]; char OggTrackName[MAXOGGTRACKLENGTH];
} GAME_SET, *GAME_SETp; } GAME_SET, *GAME_SETp;

View file

@ -99,9 +99,9 @@ void CenterRudder(void)
=================== ===================
*/ */
static int32 timert; static int32_t timert;
int32 GetTime(void) int32_t GetTime(void)
{ {
return totalclock; return totalclock;
//return timert++; //return timert++;
@ -170,8 +170,8 @@ void TermSetup(void)
#include "rts.h" #include "rts.h"
#include "timer.h" #include "timer.h"
int32 timerhandle=0; int32_t timerhandle=0;
volatile int32 timer; volatile int32_t timer;
/* /*
=================== ===================
= =
@ -250,7 +250,7 @@ void SetupGameButtons(void)
=================== ===================
*/ */
int32 GetTime(void) int32_t GetTime(void)
{ {
return timer; return timer;
} }
@ -324,7 +324,7 @@ void main()
{ {
char *song; char *song;
char *voc; char *voc;
volatile int32 lasttime; volatile int32_t lasttime;
RegisterShutdownFunction(ShutDown); RegisterShutdownFunction(ShutDown);
KB_Startup(); KB_Startup();
@ -351,7 +351,7 @@ void main()
lasttime = timer; lasttime = timer;
while (1) while (1)
{ {
int32 i; int32_t i;
ControlInfo info; ControlInfo info;
while (lasttime==timer) while (lasttime==timer)
@ -384,7 +384,7 @@ void main()
{ {
if (KB_KeyPressed(sc_F1+i)) if (KB_KeyPressed(sc_F1+i))
{ {
byte *ptr; uint8_t *ptr;
KB_ClearKeyDown(sc_F1+i); KB_ClearKeyDown(sc_F1+i);
ptr = RTS_GetSound(i); ptr = RTS_GetSound(i);
FX_PlayVOC(ptr, 0, 255, 255, 255, 255, 0); FX_PlayVOC(ptr, 0, 255, 255, 255, 255, 0);

View file

@ -37,7 +37,7 @@ int InitSpriteGrenade(short SpriteNum);
int InitSpriteChemBomb(short SpriteNum); int InitSpriteChemBomb(short SpriteNum);
int InitFlashBomb(short SpriteNum); int InitFlashBomb(short SpriteNum);
int InitCaltrops(short SpriteNum); int InitCaltrops(short SpriteNum);
int InitPhosphorus(SHORT SpriteNum); int InitPhosphorus(int16_t SpriteNum);
////////////////////// //////////////////////
// //
@ -260,11 +260,11 @@ SetupSkull(short SpriteNum)
} }
int int
DoSkullMove(SHORT SpriteNum) DoSkullMove(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
LONG dax, day, daz; int32_t dax, day, daz;
dax = MOVEx(sp->xvel, sp->ang); dax = MOVEx(sp->xvel, sp->ang);
day = MOVEy(sp->xvel, sp->ang); day = MOVEy(sp->xvel, sp->ang);
@ -277,11 +277,11 @@ DoSkullMove(SHORT SpriteNum)
} }
int int
DoSkullBeginDeath(SHORT SpriteNum) DoSkullBeginDeath(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SHORT i,num_ord=0; int16_t i,num_ord=0;
//extern short *DamageRadiusSkull; //extern short *DamageRadiusSkull;
// Decrease for Serp God // Decrease for Serp God
@ -386,7 +386,7 @@ int DoSkullJump(short SpriteNum)
// jump/fall type // jump/fall type
if (sp->xvel) if (sp->xvel)
{ {
BOOL SpriteOverlapZ(SHORT, SHORT, int); SWBOOL SpriteOverlapZ(int16_t, int16_t, int);
int dist,a,b,c; int dist,a,b,c;
@ -680,11 +680,11 @@ SetupBetty(short SpriteNum)
} }
int int
DoBettyMove(SHORT SpriteNum) DoBettyMove(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
LONG dax, day, daz; int32_t dax, day, daz;
dax = MOVEx(sp->xvel, sp->ang); dax = MOVEx(sp->xvel, sp->ang);
day = MOVEy(sp->xvel, sp->ang); day = MOVEy(sp->xvel, sp->ang);
@ -697,11 +697,11 @@ DoBettyMove(SHORT SpriteNum)
} }
int int
DoBettyBeginDeath(SHORT SpriteNum) DoBettyBeginDeath(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SHORT i,num_ord=0; int16_t i,num_ord=0;
//extern short *DamageRadiusBetty; //extern short *DamageRadiusBetty;
// starts the explosion that does the actual damage // starts the explosion that does the actual damage
@ -801,7 +801,7 @@ int DoBettyJump(short SpriteNum)
// jump/fall type // jump/fall type
if (sp->xvel) if (sp->xvel)
{ {
BOOL SpriteOverlapZ(SHORT, SHORT, int); SWBOOL SpriteOverlapZ(int16_t, int16_t, int);
int dist,a,b,c; int dist,a,b,c;

View file

@ -66,12 +66,12 @@ void ReverseSlidor(short SpriteNum)
} }
BOOL SWBOOL
SlidorSwitch(short match, short setting) SlidorSwitch(short match, short setting)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{ {
@ -150,7 +150,7 @@ short DoSlidorOperate(PLAYERp pp, short sectnum)
// called from switches and triggers // called from switches and triggers
// returns first vator found // returns first vator found
short short
DoSlidorMatch(PLAYERp pp, short match, BOOL manual) DoSlidorMatch(PLAYERp pp, short match, SWBOOL manual)
{ {
USERp fu; USERp fu;
SPRITEp fsp; SPRITEp fsp;
@ -170,7 +170,7 @@ DoSlidorMatch(PLAYERp pp, short match, BOOL manual)
fu = User[i]; fu = User[i];
// single play only vator // single play only vator
// BOOL 8 must be set for message to display // SWBOOL 8 must be set for message to display
if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS)) if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS))
{ {
if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play."); if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play.");
@ -229,7 +229,7 @@ DoSlidorMatch(PLAYERp pp, short match, BOOL manual)
} }
BOOL SWBOOL
TestSlidorMatchActive(short match) TestSlidorMatchActive(short match)
{ {
USERp fu; USERp fu;
@ -540,7 +540,7 @@ int DoSlidorMove(short SpriteNum)
int nx,ny; int nx,ny;
int dist,closest; int dist,closest;
int old_pos; int old_pos;
BOOL kill = FALSE; SWBOOL kill = FALSE;
r = u->rotator; r = u->rotator;
@ -625,7 +625,7 @@ int DoSlidorMove(short SpriteNum)
int i,nexti; int i,nexti;
SPRITEp bsp; SPRITEp bsp;
USERp bu; USERp bu;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{ {

View file

@ -27,9 +27,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#ifndef SLIDOR_PUBLIC_ #ifndef SLIDOR_PUBLIC_
#define SLIDOR_PUBLIC_ #define SLIDOR_PUBLIC_
short DoSlidorMatch(PLAYERp pp, short match, BOOL); short DoSlidorMatch(PLAYERp pp, short match, SWBOOL);
BOOL TestSlidorMatchActive(short match); SWBOOL TestSlidorMatchActive(short match);
VOID InterpSectorSprites(short sectnum, BOOL state); void InterpSectorSprites(short sectnum, SWBOOL state);
typedef void INTERP_FUNC (int *); typedef void INTERP_FUNC (int *);
typedef INTERP_FUNC *INTERP_FUNCp; typedef INTERP_FUNC *INTERP_FUNCp;

View file

@ -63,7 +63,7 @@ int PLocked_Sounds[] =
558,557 558,557
}; };
BYTE RedBookSong[40] = uint8_t RedBookSong[40] =
{ {
2,4,9,12,10, // Title and ShareWare levels 2,4,9,12,10, // Title and ShareWare levels
5,6,8,11,12,5,10,4,6,9,7,10,8,7,9,10,11,5, // Registered levels 5,6,8,11,12,5,10,4,6,9,7,10,8,7,9,10,11,5, // Registered levels
@ -73,15 +73,15 @@ BYTE RedBookSong[40] =
// Global vars used by ambient sounds to set spritenum of ambient sounds for later lookups in // Global vars used by ambient sounds to set spritenum of ambient sounds for later lookups in
// the sprite array so FAFcansee can know the sound sprite's current sector location // the sprite array so FAFcansee can know the sound sprite's current sector location
BOOL Use_SoundSpriteNum = FALSE; SWBOOL Use_SoundSpriteNum = FALSE;
SHORT SoundSpriteNum = -1; // Always set this back to -1 for proper validity checking! int16_t SoundSpriteNum = -1; // Always set this back to -1 for proper validity checking!
BOOL CDInitialized = FALSE; SWBOOL CDInitialized = FALSE;
BOOL MusicInitialized = FALSE; SWBOOL MusicInitialized = FALSE;
BOOL FxInitialized = FALSE; SWBOOL FxInitialized = FALSE;
void SoundCallBack(unsigned int num); void SoundCallBack(unsigned int num);
BOOL LoadSong(const char *track); SWBOOL LoadSong(const char *track);
#define MUSIC_ID -65536 #define MUSIC_ID -65536
@ -128,7 +128,7 @@ char *SongName = NULL;
int SongTrack = 0; int SongTrack = 0;
SongType_t SongType = SongTypeNone; SongType_t SongType = SongTypeNone;
int SongVoice = -1; int SongVoice = -1;
extern BOOL DemoMode; extern SWBOOL DemoMode;
// //
// Includes digi.h to build the table // Includes digi.h to build the table
@ -156,7 +156,7 @@ AMB_INFO ambarray[] =
#define MAXSONGS 10 // This is the max songs per episode #define MAXSONGS 10 // This is the max songs per episode
BOOL OpenSound(VOC_INFOp vp, int *handle, int *length); SWBOOL OpenSound(VOC_INFOp vp, int *handle, int *length);
int ReadSound(int handle, VOC_INFOp vp, int length); int ReadSound(int handle, VOC_INFOp vp, int length);
// 3d sound engine function prototype // 3d sound engine function prototype
@ -321,15 +321,15 @@ ClearSoundLocks(void)
} }
} }
VOID void
UnInitSound(VOID) UnInitSound(void)
{ {
SoundShutdown(); SoundShutdown();
MusicShutdown(); MusicShutdown();
} }
VOID void
InitFX(VOID) InitFX(void)
{ {
VOC_INFOp vp; VOC_INFOp vp;
short i; short i;
@ -360,16 +360,16 @@ InitFX(VOID)
FX_SetCallBack(SoundCallBack); FX_SetCallBack(SoundCallBack);
} }
VOID void
InitMusic(VOID) InitMusic(void)
{ {
// Select which cards to use // Select which cards to use
MusicStartup(); MusicStartup();
//SendGeneralMidiSysX(); //SendGeneralMidiSysX();
} }
VOID void
ExternalSoundMod(VOID) ExternalSoundMod(void)
{ {
FILE *fin; FILE *fin;
VOC_INFOp vp; VOC_INFOp vp;
@ -411,8 +411,8 @@ ExternalSoundMod(VOID)
extern short Level; extern short Level;
BOOL SWBOOL
PlaySong(char *song_file_name, int cdaudio_track, BOOL loop, BOOL restart) PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart)
{ {
if (!gs.MusicOn) if (!gs.MusicOn)
{ {
@ -531,14 +531,14 @@ PlaySong(char *song_file_name, int cdaudio_track, BOOL loop, BOOL restart)
return FALSE; return FALSE;
} }
VOID void
StopFX(VOID) StopFX(void)
{ {
FX_StopAllSounds(); FX_StopAllSounds();
} }
void void
StopSong(VOID) StopSong(void)
{ {
if (DemoMode) if (DemoMode)
return; return;
@ -572,8 +572,8 @@ StopSong(VOID)
} }
} }
VOID void
PauseSong(BOOL pauseon) PauseSong(SWBOOL pauseon)
{ {
if (!gs.MusicOn) return; if (!gs.MusicOn) return;
@ -592,14 +592,14 @@ SetSongVolume(int volume)
{ {
} }
BOOL SWBOOL
SongIsPlaying(void) SongIsPlaying(void)
{ {
return FALSE; return FALSE;
} }
VOID void
StopSound(VOID) StopSound(void)
{ {
StopFX(); StopFX();
StopSong(); StopSong();
@ -759,7 +759,7 @@ void LockSound(int num)
} }
} }
BOOL CacheSound(int num, int type) SWBOOL CacheSound(int num, int type)
{ {
VOC_INFOp vp = &voc[num]; VOC_INFOp vp = &voc[num];
extern char cachedebug; extern char cachedebug;
@ -841,11 +841,11 @@ PlaySound(int num, int *x, int *y, int *z, Voc3D_Flags flags)
int pitch = 0; int pitch = 0;
short angle, sound_dist; short angle, sound_dist;
int tx, ty, tz; int tx, ty, tz;
BYTE priority; uint8_t priority;
SPRITEp sp=NULL; SPRITEp sp=NULL;
// DEBUG // DEBUG
//extern BOOL Pachinko_Win_Cheat; //extern SWBOOL Pachinko_Win_Cheat;
// Don't play game sounds when in menus // Don't play game sounds when in menus
@ -1090,7 +1090,7 @@ PlaySound(int num, int *x, int *y, int *z, Voc3D_Flags flags)
return voice; return voice;
} }
VOID PlaySoundRTS(int rts_num) void PlaySoundRTS(int rts_num)
{ {
char *rtsptr; char *rtsptr;
int voice=-1; int voice=-1;
@ -1112,7 +1112,7 @@ VOID PlaySoundRTS(int rts_num)
/////////////////////////////////////////////// ///////////////////////////////////////////////
BOOL SWBOOL
OpenSound(VOC_INFOp vp, int *handle, int *length) OpenSound(VOC_INFOp vp, int *handle, int *length)
{ {
*handle = kopen4load(vp->name, 0); *handle = kopen4load(vp->name, 0);
@ -1144,7 +1144,7 @@ ReadSound(int handle, VOC_INFOp vp, int length)
return 0; return 0;
} }
BOOL SWBOOL
LoadSong(const char *filename) LoadSong(const char *filename)
{ {
int handle; int handle;
@ -1189,7 +1189,7 @@ void FlipStereo(void)
void void
SoundStartup(void) SoundStartup(void)
{ {
int32 status; int32_t status;
void *initdata = 0; void *initdata = 0;
int fxdevicetype; int fxdevicetype;
@ -1248,7 +1248,7 @@ SoundStartup(void)
void void
SoundShutdown(void) SoundShutdown(void)
{ {
int32 status; int32_t status;
// if they chose None lets return // if they chose None lets return
if (FXDevice < 0) if (FXDevice < 0)
@ -1292,7 +1292,7 @@ void loadtmb(void)
void MusicStartup(void) void MusicStartup(void)
{ {
int32 status; int32_t status;
int devicetype; int devicetype;
// if they chose None lets return // if they chose None lets return
@ -1354,7 +1354,7 @@ void COVER_SetReverb(int amt)
void void
MusicShutdown(void) MusicShutdown(void)
{ {
int32 status; int32_t status;
if (CDInitialized) if (CDInitialized)
CD_Shutdown(); CD_Shutdown();
@ -1596,7 +1596,7 @@ Delete3DSounds(void)
else // JBF: added null check else // JBF: added null check
if (vp->vp->priority == PRI_PLAYERVOICE || vp->vp->priority == PRI_PLAYERDEATH) if (vp->vp->priority == PRI_PLAYERVOICE || vp->vp->priority == PRI_PLAYERDEATH)
{ {
SHORT pnum; int16_t pnum;
TRAVERSE_CONNECT(pnum) TRAVERSE_CONNECT(pnum)
{ {
@ -1709,7 +1709,7 @@ void
StopAmbientSound(void) StopAmbientSound(void)
{ {
VOC3D_INFOp p; VOC3D_INFOp p;
extern BOOL InMenuLevel; extern SWBOOL InMenuLevel;
if (InMenuLevel) return; if (InMenuLevel) return;
@ -1740,7 +1740,7 @@ StartAmbientSound(void)
{ {
VOC3D_INFOp p; VOC3D_INFOp p;
short i,nexti; short i,nexti;
extern BOOL InMenuLevel; extern SWBOOL InMenuLevel;
if (InMenuLevel) return; // Don't restart ambience if no level is active! Will crash game. if (InMenuLevel) return; // Don't restart ambience if no level is active! Will crash game.
@ -1761,22 +1761,22 @@ typedef struct
{ {
VOC3D_INFOp p; VOC3D_INFOp p;
short dist; short dist;
BYTE priority; uint8_t priority;
} TVOC_INFO, *TVOC_INFOp; } TVOC_INFO, *TVOC_INFOp;
void void
DoUpdateSounds3D(void) DoUpdateSounds3D(void)
{ {
VOC3D_INFOp p; VOC3D_INFOp p;
BOOL looping; SWBOOL looping;
int pitch = 0, pitchmax; int pitch = 0, pitchmax;
int delta; int delta;
short dist, angle; short dist, angle;
BOOL deletesound = FALSE; SWBOOL deletesound = FALSE;
TVOC_INFO TmpVocArray[32]; TVOC_INFO TmpVocArray[32];
int i; int i;
static BOOL MoveSkip8 = 0; static SWBOOL MoveSkip8 = 0;
if (UsingMenus) return; if (UsingMenus) return;

View file

@ -77,22 +77,22 @@ void PlaySpriteSound(short spritenum, int attrib_ndx, Voc3D_Flags flags);
void DeleteNoSoundOwner(short spritenum); void DeleteNoSoundOwner(short spritenum);
void DeleteNoFollowSoundOwner(short spritenum); void DeleteNoFollowSoundOwner(short spritenum);
BOOL CacheSound(int num, int type); SWBOOL CacheSound(int num, int type);
void COVER_SetReverb(int amt); void COVER_SetReverb(int amt);
VOID UnInitSound(VOID); void UnInitSound(void);
void InitFX(void); void InitFX(void);
VOID InitMusic(VOID); void InitMusic(void);
VOID StopFX(VOID); void StopFX(void);
void FlipStereo(void); void FlipStereo(void);
void StopSong(void); void StopSong(void);
void PauseSong(BOOL pauseon); void PauseSong(SWBOOL pauseon);
void StopSound(void); void StopSound(void);
void StartAmbientSound(void); void StartAmbientSound(void);
void StopAmbientSound(void); void StopAmbientSound(void);
BOOL PlaySong(char *song_file_name, int cdaudio_track, BOOL loop, BOOL restart); SWBOOL PlaySong(char *song_file_name, int cdaudio_track, SWBOOL loop, SWBOOL restart);
void SetSongVolume(int volume); void SetSongVolume(int volume);
BOOL SongIsPlaying(void); SWBOOL SongIsPlaying(void);
VOID PlaySoundRTS(int rts_num); void PlaySoundRTS(int rts_num);
// //
// Standard VOC format information - generally don't need this // Standard VOC format information - generally don't need this
@ -100,20 +100,20 @@ VOID PlaySoundRTS(int rts_num);
typedef struct typedef struct
{ {
BYTE filler[0x1a]; uint8_t filler[0x1a];
BYTE type; uint8_t type;
WORD length; uint32_t length;
BYTE filler2; uint8_t filler2;
BYTE freq; uint8_t freq;
BYTE pack; uint8_t pack;
BYTE data[1]; uint8_t data[1];
} *VOC_HDRp; } *VOC_HDRp;
// Ambient Sound Structure // Ambient Sound Structure
struct ambientstruct struct ambientstruct
{ {
SHORT name; int16_t name;
SHORT diginame; int16_t diginame;
Voc3D_Flags ambient_flags; Voc3D_Flags ambient_flags;
int maxtics; // When tics reaches this number next int maxtics; // When tics reaches this number next
// sound happens // sound happens
@ -137,16 +137,16 @@ typedef enum
struct VOCstruct struct VOCstruct
{ {
char name[14]; // name of voc file on disk char name[14]; // name of voc file on disk
BYTEp data; // pointer to voc data uint8_t* data; // pointer to voc data
int datalen; // length of voc data int datalen; // length of voc data
SHORT pitch_lo; // lo pitch value int16_t pitch_lo; // lo pitch value
SHORT pitch_hi; // hi pitch value int16_t pitch_hi; // hi pitch value
BYTE priority; // priority at which vocs are played uint8_t priority; // priority at which vocs are played
SHORT voc_num; // Backward reference to parent sound int16_t voc_num; // Backward reference to parent sound
int voc_distance; // Sound's distance effectiveness int voc_distance; // Sound's distance effectiveness
Voc_Flags voc_flags; // Various allowable flag settings for voc Voc_Flags voc_flags; // Various allowable flag settings for voc
BYTE lock; // locking byte for caching uint8_t lock; // locking byte for caching
BYTE playing; // number of this type of sound currently playing uint8_t playing; // number of this type of sound currently playing
}; };
@ -169,12 +169,12 @@ struct VOC3Dstruct
// callback of looping sounds // callback of looping sounds
// If sound is active but user == 0, stop the sound // If sound is active but user == 0, stop the sound
short dist; // Current distance of sound from player short dist; // Current distance of sound from player
BYTE priority; // Used to force a higher priority based on distance uint8_t priority; // Used to force a higher priority based on distance
int tics; // Tics used to count to next sound occurance int tics; // Tics used to count to next sound occurance
int maxtics; // Tics until next sound occurance int maxtics; // Tics until next sound occurance
// for intermittent sounds // for intermittent sounds
BOOL deleted; // Has sound been marked for deletion? SWBOOL deleted; // Has sound been marked for deletion?
BOOL FX_Ok; // Did this sound play ok? SWBOOL FX_Ok; // Did this sound play ok?
}; };
extern VOC_INFO voc[]; extern VOC_INFO voc[];

View file

@ -33,9 +33,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "sprite.h" #include "sprite.h"
short DoSpikeMatch(PLAYERp pp, short match); short DoSpikeMatch(PLAYERp pp, short match);
BOOL TestSpikeMatchActive(short match); SWBOOL TestSpikeMatchActive(short match);
int DoVatorMove(short SpriteNum, int *lptr); int DoVatorMove(short SpriteNum, int *lptr);
VOID InterpSectorSprites(short sectnum, BOOL state); void InterpSectorSprites(short sectnum, SWBOOL state);
void ReverseSpike(short SpriteNum) void ReverseSpike(short SpriteNum)
{ {
@ -69,12 +69,12 @@ void ReverseSpike(short SpriteNum)
u->vel_rate = -u->vel_rate; u->vel_rate = -u->vel_rate;
} }
BOOL SWBOOL
SpikeSwitch(short match, short setting) SpikeSwitch(short match, short setting)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{ {
@ -213,7 +213,7 @@ DoSpikeMatch(PLAYERp pp, short match)
} }
BOOL SWBOOL
TestSpikeMatchActive(short match) TestSpikeMatchActive(short match)
{ {
USERp fu; USERp fu;
@ -281,13 +281,13 @@ int DoSpikeMove(short SpriteNum, int *lptr)
return 0; return 0;
} }
VOID SpikeAlign(short SpriteNum) void SpikeAlign(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = u->SpriteP; SPRITEp sp = u->SpriteP;
// either work on single sector or all tagged in SOBJ // either work on single sector or all tagged in SOBJ
if ((CHAR)SP_TAG7(sp) < 0) if ((int8_t)SP_TAG7(sp) < 0)
{ {
if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP)) if (TEST(sp->cstat, CSTAT_SPRITE_YFLIP))
alignceilslope(sp->sectnum, sp->x, sp->y, u->zclip); alignceilslope(sp->sectnum, sp->x, sp->y, u->zclip);
@ -303,7 +303,7 @@ VOID SpikeAlign(short SpriteNum)
} }
} }
VOID MoveSpritesWithSpike(short sectnum) void MoveSpritesWithSpike(short sectnum)
{ {
SECTORp sectp = &sector[sectnum]; SECTORp sectp = &sector[sectnum];
SPRITEp sp; SPRITEp sp;
@ -406,7 +406,7 @@ int DoSpike(short SpriteNum)
int i,nexti; int i,nexti;
SPRITEp bsp; SPRITEp bsp;
USERp bu; USERp bu;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{ {

View file

@ -48,8 +48,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "player.h" #include "player.h"
BOOL FAF_Sector(short sectnum); SWBOOL FAF_Sector(short sectnum);
BOOL MoveSkip4, MoveSkip2, MoveSkip8; SWBOOL MoveSkip4, MoveSkip2, MoveSkip8;
extern STATE s_CarryFlag[]; extern STATE s_CarryFlag[];
extern STATE s_CarryFlagNoDet[]; extern STATE s_CarryFlagNoDet[];
@ -57,10 +57,10 @@ extern STATE s_CarryFlagNoDet[];
static int globhiz, globloz, globhihit, globlohit; static int globhiz, globloz, globhihit, globlohit;
short wait_active_check_offset; short wait_active_check_offset;
int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust; int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust;
void SetSectorWallBits(short sectnum, int bit_mask, BOOL set_sectwall, BOOL set_nextwall); void SetSectorWallBits(short sectnum, int bit_mask, SWBOOL set_sectwall, SWBOOL set_nextwall);
int DoActorDebris(short SpriteNum); int DoActorDebris(short SpriteNum);
void ActorWarpUpdatePos(short SpriteNum,short sectnum); void ActorWarpUpdatePos(short SpriteNum,short sectnum);
VOID ActorWarpType(SPRITEp sp, SPRITEp sp_warp); void ActorWarpType(SPRITEp sp, SPRITEp sp_warp);
int MissileZrange(short SpriteNum); int MissileZrange(short SpriteNum);
#define ACTIVE_CHECK_TIME (3*120) #define ACTIVE_CHECK_TIME (3*120)
@ -68,7 +68,7 @@ int MissileZrange(short SpriteNum);
/* /*
short GetDeltaAngle(short ang1, short ang2); short GetDeltaAngle(short ang1, short ang2);
short GetRotation(short sn); short GetRotation(short sn);
int StateControl(SHORT SpriteNum); int StateControl(int16_t SpriteNum);
void PreCacheRange(short, short); void PreCacheRange(short, short);
*/ */
@ -100,7 +100,7 @@ STATE s_DebrisStarFish[] =
{426, 100, DoActorDebris, &s_DebrisStarFish[0]}, {426, 100, DoActorDebris, &s_DebrisStarFish[0]},
}; };
extern BOOL DebugActor; extern SWBOOL DebugActor;
extern int score; extern int score;
ANIMATOR DoGet, DoKey, DoSpriteFade; ANIMATOR DoGet, DoKey, DoSpriteFade;
@ -542,7 +542,7 @@ STATE s_IconFlag[] =
{ICON_FLAG + 2, 32, DoGet, &s_IconFlag[0]} {ICON_FLAG + 2, 32, DoGet, &s_IconFlag[0]}
}; };
VOID void
SetOwner(short owner, short child) SetOwner(short owner, short child)
{ {
SPRITEp op; SPRITEp op;
@ -569,7 +569,7 @@ SetOwner(short owner, short child)
cp->owner = owner; cp->owner = owner;
} }
VOID void
SetAttach(short owner, short child) SetAttach(short owner, short child)
{ {
SPRITEp op = &sprite[owner]; SPRITEp op = &sprite[owner];
@ -583,8 +583,8 @@ SetAttach(short owner, short child)
cu->Attach = owner; cu->Attach = owner;
} }
VOID void
KillSprite(SHORT SpriteNum) KillSprite(int16_t SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -770,7 +770,7 @@ KillSprite(SHORT SpriteNum)
sp->sectnum = sectnum; sp->sectnum = sectnum;
} }
VOID ChangeState(short SpriteNum, STATEp statep) void ChangeState(short SpriteNum, STATEp statep)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -780,7 +780,7 @@ VOID ChangeState(short SpriteNum, STATEp statep)
PicAnimOff(u->State->Pic); PicAnimOff(u->State->Pic);
} }
VOID void
change_sprite_stat(short SpriteNum, short stat) change_sprite_stat(short SpriteNum, short stat)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -909,11 +909,11 @@ GetSectUser(short sectnum)
} }
SHORT int16_t
SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int init_ang, int vel) SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int init_ang, int vel)
{ {
SPRITEp sp; SPRITEp sp;
SHORT SpriteNum; int16_t SpriteNum;
USERp u; USERp u;
ASSERT(!Prediction); ASSERT(!Prediction);
@ -959,7 +959,7 @@ SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int
return SpriteNum; return SpriteNum;
} }
VOID void
PicAnimOff(short picnum) PicAnimOff(short picnum)
{ {
int i; int i;
@ -984,7 +984,7 @@ PicAnimOff(short picnum)
RESET(picanm[picnum], TILE_ANIM_TYPE); RESET(picanm[picnum], TILE_ANIM_TYPE);
} }
BOOL SWBOOL
IconSpawn(SPRITEp sp) IconSpawn(SPRITEp sp)
{ {
// if multi item and not a modem game // if multi item and not a modem game
@ -997,7 +997,7 @@ IconSpawn(SPRITEp sp)
return TRUE; return TRUE;
} }
BOOL SWBOOL
ActorTestSpawn(SPRITEp sp) ActorTestSpawn(SPRITEp sp)
{ {
if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR) if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR)
@ -1054,25 +1054,25 @@ ActorTestSpawn(SPRITEp sp)
} }
VOID PreCacheRipper(VOID); void PreCacheRipper(void);
VOID PreCacheRipper2(VOID); void PreCacheRipper2(void);
VOID PreCacheCoolie(VOID); void PreCacheCoolie(void);
VOID PreCacheSerpent(VOID); void PreCacheSerpent(void);
VOID PreCacheGuardian(VOID); void PreCacheGuardian(void);
VOID PreCacheNinja(VOID); void PreCacheNinja(void);
VOID PreCacheSumo(VOID); void PreCacheSumo(void);
VOID PreCacheEel(VOID); void PreCacheEel(void);
VOID PreCacheToiletGirl(VOID); void PreCacheToiletGirl(void);
VOID PreCacheWashGirl(VOID); void PreCacheWashGirl(void);
VOID PreCacheTrash(VOID); void PreCacheTrash(void);
VOID PreCacheBunny(VOID); void PreCacheBunny(void);
VOID PreCacheSkel(VOID); void PreCacheSkel(void);
VOID PreCacheHornet(VOID); void PreCacheHornet(void);
VOID PreCacheSkull(VOID); void PreCacheSkull(void);
VOID PreCacheBetty(VOID); void PreCacheBetty(void);
VOID PreCachePachinko(VOID); void PreCachePachinko(void);
BOOL SWBOOL
ActorSpawn(SPRITEp sp) ActorSpawn(SPRITEp sp)
{ {
int ret = TRUE; int ret = TRUE;
@ -1550,7 +1550,7 @@ ActorSpawn(SPRITEp sp)
} }
VOID void
IconDefault(short SpriteNum) IconDefault(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -1565,13 +1565,13 @@ IconDefault(short SpriteNum)
DoActorZrange(SpriteNum); DoActorZrange(SpriteNum);
} }
VOID PreMapCombineFloors(VOID) void PreMapCombineFloors(void)
{ {
#define MAX_FLOORS 32 #define MAX_FLOORS 32
SPRITEp sp; SPRITEp sp;
int xoff,yoff; int xoff,yoff;
int i, j, k; int i, j, k;
SHORT SpriteNum, NextSprite; int16_t SpriteNum, NextSprite;
WALLp wp; WALLp wp;
int base_offset; int base_offset;
PLAYERp pp = &Player[myconnectindex]; PLAYERp pp = &Player[myconnectindex];
@ -1678,7 +1678,7 @@ VOID PreMapCombineFloors(VOID)
#if 0 #if 0
// example of way to traverse through sectors from closest to farthest // example of way to traverse through sectors from closest to farthest
VOID TraverseSectors(short start_sect) void TraverseSectors(short start_sect)
{ {
int i, j, k; int i, j, k;
short sectlist[MAXSECTORS]; short sectlist[MAXSECTORS];
@ -1729,8 +1729,8 @@ VOID TraverseSectors(short start_sect)
#endif #endif
VOID void
SpriteSetupPost(VOID) SpriteSetupPost(void)
{ {
SPRITEp ds; SPRITEp ds;
USERp u; USERp u;
@ -1774,8 +1774,8 @@ SpriteSetupPost(VOID)
} }
VOID void
SpriteSetup(VOID) SpriteSetup(void)
{ {
SPRITEp sp; SPRITEp sp;
short SpriteNum = 0, NextSprite, ndx; short SpriteNum = 0, NextSprite, ndx;
@ -2565,7 +2565,7 @@ SpriteSetup(VOID)
short w, startwall, endwall; short w, startwall, endwall;
short wallcount; short wallcount;
void *void_ptr; void *void_ptr;
CHARp wall_shade; int8_t* wall_shade;
USERp u; USERp u;
LIGHT_Tics(sp) = 0; LIGHT_Tics(sp) = 0;
@ -2622,7 +2622,7 @@ SpriteSetup(VOID)
short w, startwall, endwall; short w, startwall, endwall;
short wallcount; short wallcount;
void *void_ptr; void *void_ptr;
CHARp wall_shade; int8_t* wall_shade;
USERp u; USERp u;
LIGHT_Tics(sp) = 0; LIGHT_Tics(sp) = 0;
@ -3804,9 +3804,9 @@ NUKE_REPLACEMENT:
} }
} }
BOOL ItemSpotClear(SPRITEp sip, short statnum, short id) SWBOOL ItemSpotClear(SPRITEp sip, short statnum, short id)
{ {
BOOL found = FALSE; SWBOOL found = FALSE;
short i,nexti; short i,nexti;
if (TEST_BOOL2(sip)) if (TEST_BOOL2(sip))
@ -3824,7 +3824,7 @@ BOOL ItemSpotClear(SPRITEp sip, short statnum, short id)
return !found; return !found;
} }
VOID SetupItemForJump(SPRITEp sip, short SpriteNum) void SetupItemForJump(SPRITEp sip, short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -4143,7 +4143,7 @@ int SpawnItemsMatch(short match)
short SpriteNum; short SpriteNum;
short si, nextsi; short si, nextsi;
SPRITEp sp,sip; SPRITEp sp,sip;
BOOL found; SWBOOL found;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_ITEMS],si,nextsi) TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_ITEMS],si,nextsi)
{ {
@ -4555,7 +4555,7 @@ int SpawnItemsMatch(short match)
short num; short num;
USERp u; USERp u;
BYTE KeyPal[] = uint8_t KeyPal[] =
{ {
PALETTE_PLAYER9, PALETTE_PLAYER9,
PALETTE_PLAYER7, PALETTE_PLAYER7,
@ -4611,7 +4611,7 @@ int SpawnItemsMatch(short match)
} }
// CTW MODIFICATION // CTW MODIFICATION
//VOID //void
int int
// CTW MODIFICATION END // CTW MODIFICATION END
NewStateGroup(short SpriteNum, STATEp StateGroup[]) NewStateGroup(short SpriteNum, STATEp StateGroup[])
@ -4645,8 +4645,8 @@ NewStateGroup(short SpriteNum, STATEp StateGroup[])
} }
BOOL SWBOOL
SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b) SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b)
{ {
SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b]; SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b];
@ -4686,8 +4686,8 @@ SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b)
} }
BOOL SWBOOL
SpriteOverlapZ(SHORT spritenum_a, SHORT spritenum_b, int z_overlap) SpriteOverlapZ(int16_t spritenum_a, int16_t spritenum_b, int z_overlap)
{ {
SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b]; SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b];
@ -4719,9 +4719,9 @@ SpriteOverlapZ(SHORT spritenum_a, SHORT spritenum_b, int z_overlap)
} }
VOID void
getzrangepoint(int x, int y, int z, short sectnum, getzrangepoint(int x, int y, int z, short sectnum,
LONGp ceilz, LONGp ceilhit, LONGp florz, LONGp florhit) int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit)
{ {
spritetype *spr; spritetype *spr;
int i, j, k, l, dax, day, daz, xspan, yspan, xoff, yoff; int i, j, k, l, dax, day, daz, xspan, yspan, xoff, yoff;
@ -4844,7 +4844,7 @@ getzrangepoint(int x, int y, int z, short sectnum,
} }
VOID void
DoActorZrange(short SpriteNum) DoActorZrange(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -4926,7 +4926,7 @@ DoActorGlobZ(short SpriteNum)
} }
BOOL SWBOOL
ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_height) ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_height)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -4997,7 +4997,7 @@ ActorDrop(short SpriteNum, int x, int y, int z, short new_sector, short min_heig
} }
// Primarily used in ai.c for now - need to get rid of // Primarily used in ai.c for now - need to get rid of
BOOL SWBOOL
DropAhead(short SpriteNum, short min_height) DropAhead(short SpriteNum, short min_height)
{ {
@ -5142,7 +5142,7 @@ int
DoGrating(short SpriteNum) DoGrating(short SpriteNum)
{ {
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
SHORT x, y; int16_t x, y;
int dir; int dir;
#define GRATE_FACTOR 3 #define GRATE_FACTOR 3
@ -5511,7 +5511,7 @@ char *ReadFortune[MAX_FORTUNES] =
}; };
BOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN) SWBOOL CanGetWeapon(PLAYERp pp, short SpriteNum, int WPN)
{ {
USERp u = User[SpriteNum], pu; USERp u = User[SpriteNum], pu;
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
@ -5583,9 +5583,9 @@ DoGet(short SpriteNum)
PLAYERp pp; PLAYERp pp;
short pnum, key_num; short pnum, key_num;
int dist, a,b,c; int dist, a,b,c;
VOID InitWeaponRocket(PLAYERp); void InitWeaponRocket(PLAYERp);
VOID InitWeaponUzi(PLAYERp); void InitWeaponUzi(PLAYERp);
BOOL can_see; SWBOOL can_see;
int cstat_bak; int cstat_bak;
// For flag stuff // For flag stuff
@ -5742,7 +5742,7 @@ KeyMain:
case ICON_SM_MEDKIT: case ICON_SM_MEDKIT:
if (pu->Health < 100) if (pu->Health < 100)
{ {
BOOL putbackmax=FALSE; SWBOOL putbackmax=FALSE;
PutStringInfo(Player+pnum, InventoryDecls[InvDecl_SmMedkit].name); PutStringInfo(Player+pnum, InventoryDecls[InvDecl_SmMedkit].name);
@ -6378,7 +6378,7 @@ KeyMain:
#define TEXT_SPELL_INFO_LINE 20 #define TEXT_SPELL_INFO_LINE 20
static CHARp SpellName[] = static int8_t* SpellName[] =
{ {
"Icon of Flight", "Icon of Flight",
"EnvironSuit Skin", "EnvironSuit Skin",
@ -6474,7 +6474,7 @@ KeyMain:
*/ */
VOID void
SetEnemyActive(short SpriteNum) SetEnemyActive(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -6484,7 +6484,7 @@ SetEnemyActive(short SpriteNum)
u->inactive_time = 0; u->inactive_time = 0;
} }
VOID void
SetEnemyInactive(short SpriteNum) SetEnemyInactive(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -6496,7 +6496,7 @@ SetEnemyInactive(short SpriteNum)
// This function mostly only adjust the active_range field // This function mostly only adjust the active_range field
VOID void
ProcessActiveVars(short SpriteNum) ProcessActiveVars(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -6519,7 +6519,7 @@ ProcessActiveVars(short SpriteNum)
u->wait_active_check += ACTORMOVETICS; u->wait_active_check += ACTORMOVETICS;
} }
VOID void
AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist) AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -6657,7 +6657,7 @@ AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist)
*/ */
int int
StateControl(SHORT SpriteNum) StateControl(int16_t SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -6750,16 +6750,16 @@ StateControl(SHORT SpriteNum)
VOID void
SpriteControl(VOID) SpriteControl(void)
{ {
LONG i, nexti, stat; int32_t i, nexti, stat;
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
short pnum, CloseToPlayer; short pnum, CloseToPlayer;
PLAYERp pp; PLAYERp pp;
int tx, ty, tmin, dist; int tx, ty, tmin, dist;
extern BOOL DebugActorFreeze; extern SWBOOL DebugActorFreeze;
short StateTics; short StateTics;
if (DebugActorFreeze) if (DebugActorFreeze)
@ -7016,7 +7016,7 @@ SpriteControl(VOID)
*/ */
int int
move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics) move_sprite(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
{ {
int daz; int daz;
int retval=0, zh; int retval=0, zh;
@ -7169,7 +7169,7 @@ int pushmove_sprite(short SpriteNum)
return 0; return 0;
} }
VOID MissileWarpUpdatePos(short SpriteNum, short sectnum) void MissileWarpUpdatePos(short SpriteNum, short sectnum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = u->SpriteP; SPRITEp sp = u->SpriteP;
@ -7180,7 +7180,7 @@ VOID MissileWarpUpdatePos(short SpriteNum, short sectnum)
MissileZrange(SpriteNum); MissileZrange(SpriteNum);
} }
VOID ActorWarpUpdatePos(short SpriteNum, short sectnum) void ActorWarpUpdatePos(short SpriteNum, short sectnum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = u->SpriteP; SPRITEp sp = u->SpriteP;
@ -7191,7 +7191,7 @@ VOID ActorWarpUpdatePos(short SpriteNum, short sectnum)
DoActorZrange(SpriteNum); DoActorZrange(SpriteNum);
} }
VOID MissileWarpType(SPRITEp sp, SPRITEp sp_warp) void MissileWarpType(SPRITEp sp, SPRITEp sp_warp)
{ {
switch (SP_TAG1(sp_warp)) switch (SP_TAG1(sp_warp))
{ {
@ -7212,7 +7212,7 @@ VOID MissileWarpType(SPRITEp sp, SPRITEp sp_warp)
} }
} }
VOID ActorWarpType(SPRITEp sp, SPRITEp sp_warp) void ActorWarpType(SPRITEp sp, SPRITEp sp_warp)
{ {
switch (SP_TAG3(sp_warp)) switch (SP_TAG3(sp_warp))
{ {
@ -7267,7 +7267,7 @@ MissileZrange(short SpriteNum)
int int
move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics) move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
{ {
int daz; int daz;
int retval, zh; int retval, zh;
@ -7406,7 +7406,7 @@ move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildis
int int
move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics) move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics)
{ {
int daz; int daz;
int retval=0, zh; int retval=0, zh;

View file

@ -28,9 +28,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define SPRITE_H #define SPRITE_H
VOID KillSprite(SHORT SpriteNum); void KillSprite(int16_t SpriteNum);
SHORT SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel); int16_t SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel);
VOID SpriteSetup(VOID); void SpriteSetup(void);
int move_actor(short SpriteNum, int xchange, int ychange, int zchange); int move_actor(short SpriteNum, int xchange, int ychange, int zchange);
short GetSpriteDir(short sn); short GetSpriteDir(short sn);
short GetDirToPlayer(short sn); short GetDirToPlayer(short sn);
@ -41,21 +41,21 @@ short SpriteCanGoForward(short SpriteNum, short range);
void SpriteFindNewDirection(short SpriteNum, short range); void SpriteFindNewDirection(short SpriteNum, short range);
int DoWalk(short SpriteNum); int DoWalk(short SpriteNum);
int DoBody(short SpriteNum); int DoBody(short SpriteNum);
BOOL CanMoveHere(SHORT spritenum); SWBOOL CanMoveHere(int16_t spritenum);
BOOL SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b); SWBOOL SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b);
int DoActorDie(short SpriteNum, short weapon); int DoActorDie(short SpriteNum, short weapon);
int DoGet(short SpriteNum); int DoGet(short SpriteNum);
VOID SpriteControl(VOID); void SpriteControl(void);
VOID SetEnemyInactive(short SpriteNum); void SetEnemyInactive(short SpriteNum);
VOID DoActorZrange(short SpriteNum); void DoActorZrange(short SpriteNum);
void PreMapCombineFloors(void); void PreMapCombineFloors(void);
void SpriteSetupPost(void); void SpriteSetupPost(void);
int ActorCoughItem(short SpriteNum); int ActorCoughItem(short SpriteNum);
BOOL ActorSpawn(SPRITEp sp); SWBOOL ActorSpawn(SPRITEp sp);
int SpawnItemsMatch(short match); int SpawnItemsMatch(short match);
void PicAnimOff(short picnum); void PicAnimOff(short picnum);
int MissileWaterAdjust(short SpriteNum); int MissileWaterAdjust(short SpriteNum);
BOOL SpriteOverlapZ(SHORT spritenum_a,SHORT spritenum_b,int z_overlap); SWBOOL SpriteOverlapZ(int16_t spritenum_a,int16_t spritenum_b,int z_overlap);
enum enum
{ {

View file

@ -714,7 +714,7 @@ int startwin_idle(void *s)
return 0; return 0;
} }
extern int32 ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP, ForceSetup, UseMouse, UseJoystick; extern int32_t ScreenMode, ScreenWidth, ScreenHeight, ScreenBPP, ForceSetup, UseMouse, UseJoystick;
extern char *grpfile; // game.c extern char *grpfile; // game.c
int startwin_run(void) int startwin_run(void)

View file

@ -37,11 +37,11 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "weapon.h" #include "weapon.h"
#include "sector.h" #include "sector.h"
extern BYTE RedBookSong[40]; extern uint8_t RedBookSong[40];
extern BYTE playTrack; extern uint8_t playTrack;
BOOL serpwasseen = FALSE; SWBOOL serpwasseen = FALSE;
BOOL sumowasseen = FALSE; SWBOOL sumowasseen = FALSE;
BOOL zillawasseen = FALSE; SWBOOL zillawasseen = FALSE;
short BossSpriteNum[3] = {-1,-1,-1}; short BossSpriteNum[3] = {-1,-1,-1};
@ -790,7 +790,7 @@ int DoSumoDeathMelt(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
static BOOL alreadydid = FALSE; static SWBOOL alreadydid = FALSE;
PlaySound(DIGI_SUMOFART, &sp->x, &sp->y, &sp->z, v3df_follow); PlaySound(DIGI_SUMOFART, &sp->x, &sp->y, &sp->z, v3df_follow);
@ -811,7 +811,7 @@ int DoSumoDeathMelt(short SpriteNum)
} }
VOID void
BossHealthMeter(void) BossHealthMeter(void)
{ {
SPRITEp sp; SPRITEp sp;
@ -820,10 +820,10 @@ BossHealthMeter(void)
short color=0,i=0,nexti,metertics,meterunit; short color=0,i=0,nexti,metertics,meterunit;
int y; int y;
extern char buffer[]; extern char buffer[];
extern BOOL NoMeters; extern SWBOOL NoMeters;
short health; short health;
BOOL bosswasseen; SWBOOL bosswasseen;
static BOOL triedplay = FALSE; static SWBOOL triedplay = FALSE;
if (NoMeters) return; if (NoMeters) return;

View file

@ -56,7 +56,7 @@ void SetGameDefaults(void)
{ {
} }
extern BOOL DrawScreen; extern SWBOOL DrawScreen;
void EncodePassword(char *pw) void EncodePassword(char *pw)
{ {
@ -106,7 +106,7 @@ void DecodePassword(char *pw)
=================== ===================
*/ */
void ReadGameSetup(int32 scripthandle) void ReadGameSetup(int32_t scripthandle)
{ {
int dummy; int dummy;
int ret; int ret;
@ -270,7 +270,7 @@ void ReadGameSetup(int32 scripthandle)
=================== ===================
*/ */
void WriteGameSetup(int32 scripthandle) void WriteGameSetup(int32_t scripthandle)
{ {
int dummy; int dummy;
@ -353,7 +353,7 @@ void WriteGameSetup(int32 scripthandle)
void TermSetup(void) void TermSetup(void)
{ {
extern BOOL BotMode; extern SWBOOL BotMode;
CONFIG_WriteSetup(); CONFIG_WriteSetup();
RTS_Shutdown(); RTS_Shutdown();
} }

View file

@ -32,7 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "net.h" #include "net.h"
#include "menus.h" #include "menus.h"
BOOL SyncPrintMode = TRUE; SWBOOL SyncPrintMode = TRUE;
short NumSyncBytes = 1; short NumSyncBytes = 1;
char sync_first[MAXSYNCBYTES][60]; char sync_first[MAXSYNCBYTES][60];
int sync_found = FALSE; int sync_found = FALSE;
@ -60,8 +60,8 @@ void initsynccrc(void)
} }
#if SYNC_TEST #if SYNC_TEST
BYTE uint8_t
PlayerSync(VOID) PlayerSync(void)
{ {
short i, j; short i, j;
unsigned short crc = 0; unsigned short crc = 0;
@ -76,11 +76,11 @@ PlayerSync(VOID)
updatecrc(crc, pp->pang & 255); updatecrc(crc, pp->pang & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
PlayerSync2(VOID) PlayerSync2(void)
{ {
short i, j; short i, j;
unsigned short crc = 0; unsigned short crc = 0;
@ -95,11 +95,11 @@ PlayerSync2(VOID)
updatecrc(crc, pp->bcnt & 255); updatecrc(crc, pp->bcnt & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
SOSync(VOID) SOSync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
@ -118,12 +118,12 @@ SOSync(VOID)
updatecrc(crc, (sop->spin_ang) & 255); updatecrc(crc, (sop->spin_ang) & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
EnemySync(VOID) EnemySync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
short j, nextj; short j, nextj;
@ -165,11 +165,11 @@ EnemySync(VOID)
} }
#endif #endif
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
MissileSync(VOID) MissileSync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
short j, nextj; short j, nextj;
@ -184,11 +184,11 @@ MissileSync(VOID)
updatecrc(crc, (spr->ang) & 255); updatecrc(crc, (spr->ang) & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
MissileSkip4Sync(VOID) MissileSkip4Sync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
short j, nextj; short j, nextj;
@ -203,11 +203,11 @@ MissileSkip4Sync(VOID)
updatecrc(crc, (spr->ang) & 255); updatecrc(crc, (spr->ang) & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
ShrapSync(VOID) ShrapSync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
short j, nextj; short j, nextj;
@ -222,11 +222,11 @@ ShrapSync(VOID)
updatecrc(crc, (spr->ang) & 255); updatecrc(crc, (spr->ang) & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
MiscSync(VOID) MiscSync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
short j, nextj; short j, nextj;
@ -241,11 +241,11 @@ MiscSync(VOID)
updatecrc(crc, (spr->ang) & 255); updatecrc(crc, (spr->ang) & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
BYTE uint8_t
RandomSync(VOID) RandomSync(void)
{ {
unsigned short crc = 0; unsigned short crc = 0;
@ -259,7 +259,7 @@ RandomSync(VOID)
updatecrc(crc,MissileSync() & 255); updatecrc(crc,MissileSync() & 255);
} }
return (BYTE) crc & 255; return (uint8_t) crc & 255;
} }
/* /*
@ -291,7 +291,7 @@ char *SyncNames[] =
NULL NULL
}; };
static BYTE(*SyncFunc[MAXSYNCBYTES + 1]) (VOID) = static uint8_t(*SyncFunc[MAXSYNCBYTES + 1]) (void) =
{ {
RandomSync, RandomSync,
PlayerSync, PlayerSync,
@ -424,7 +424,7 @@ GetSyncInfoFromPacket(char *packbuf, int packbufleng, int *j, int otherconnectin
int sb, i; int sb, i;
extern int syncvaltail, syncvaltottail; extern int syncvaltail, syncvaltottail;
PLAYERp ppo = &Player[otherconnectindex]; PLAYERp ppo = &Player[otherconnectindex];
BOOL found = FALSE; SWBOOL found = FALSE;
// have had problems with this routine crashing when players quit // have had problems with this routine crashing when players quit
// games. // games.
@ -504,7 +504,7 @@ void
demosync_record(void) demosync_record(void)
{ {
int i; int i;
BYTE sync_val; uint8_t sync_val;
for (i = 0; SyncFunc[i]; i++) for (i = 0; SyncFunc[i]; i++)
{ {
@ -517,7 +517,7 @@ void
demosync_test(int cnt) demosync_test(int cnt)
{ {
int i; int i;
BYTE sync_val; uint8_t sync_val;
for (i = 0; SyncFunc[i]; i++) for (i = 0; SyncFunc[i]; i++)
{ {

View file

@ -58,7 +58,7 @@ char *KeyDoorMessage[MAX_KEYS] =
"You need a RED key for this door." "You need a RED key for this door."
}; };
VOID void
DisplaySummaryString(PLAYERp pp, short xs, short ys, short color, short shade, const char *buffer) DisplaySummaryString(PLAYERp pp, short xs, short ys, short color, short shade, const char *buffer)
{ {
short size,x; short size,x;
@ -247,7 +247,7 @@ pClearSpriteID(PLAYERp pp, short id)
} }
VOID void
DisplayPanelNumber(PLAYERp pp, short xs, short ys, int number) DisplayPanelNumber(PLAYERp pp, short xs, short ys, int number)
{ {
char buffer[32]; char buffer[32];
@ -270,7 +270,7 @@ DisplayPanelNumber(PLAYERp pp, short xs, short ys, int number)
} }
} }
VOID void
DisplayMiniBarNumber(PLAYERp pp, short xs, short ys, int number) DisplayMiniBarNumber(PLAYERp pp, short xs, short ys, int number)
{ {
char buffer[32]; char buffer[32];
@ -298,7 +298,7 @@ DisplayMiniBarNumber(PLAYERp pp, short xs, short ys, int number)
} }
} }
VOID void
DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer) DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer)
{ {
short size=4,x; short size=4,x;
@ -324,7 +324,7 @@ DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const char *bu
} }
} }
VOID void
DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer) DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer)
{ {
short size=4,x; short size=4,x;
@ -349,7 +349,7 @@ DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer)
} }
} }
VOID void
DisplayFragString(PLAYERp pp, short xs, short ys, const char *buffer) DisplayFragString(PLAYERp pp, short xs, short ys, const char *buffer)
{ {
short size=4,x; short size=4,x;
@ -380,7 +380,7 @@ DisplayFragString(PLAYERp pp, short xs, short ys, const char *buffer)
} }
} }
VOID void
DisplayFragNumbers(PLAYERp pp) DisplayFragNumbers(PLAYERp pp)
{ {
char buffer[32]; char buffer[32];
@ -420,7 +420,7 @@ DisplayFragNumbers(PLAYERp pp)
DisplayFragString(pp, xs, ys, buffer); DisplayFragString(pp, xs, ys, buffer);
} }
VOID void
DisplayFragNames(PLAYERp pp) DisplayFragNames(PLAYERp pp)
{ {
char *ptr; char *ptr;
@ -453,7 +453,7 @@ DisplayFragNames(PLAYERp pp)
} }
short GlobInfoStringTime = TEXT_INFO_TIME; short GlobInfoStringTime = TEXT_INFO_TIME;
VOID PutStringInfo(PLAYERp pp, const char *string) void PutStringInfo(PLAYERp pp, const char *string)
{ {
if (pp-Player != myconnectindex) if (pp-Player != myconnectindex)
return; return;
@ -465,7 +465,7 @@ VOID PutStringInfo(PLAYERp pp, const char *string)
PutStringInfoLine(pp, string); PutStringInfoLine(pp, string);
} }
VOID PutStringInfoLine(PLAYERp pp, const char *string) void PutStringInfoLine(PLAYERp pp, const char *string)
{ {
short x,y; short x,y;
short w,h; short w,h;
@ -489,7 +489,7 @@ VOID PutStringInfoLine(PLAYERp pp, const char *string)
//PutStringInfoLine2(pp, ""); //PutStringInfoLine2(pp, "");
} }
VOID PutStringInfoLine2(PLAYERp pp, const char *string) void PutStringInfoLine2(PLAYERp pp, const char *string)
{ {
short x,y; short x,y;
short w,h; short w,h;
@ -515,7 +515,7 @@ pMenuClearTextLine(PLAYERp pp)
#define TEXT_PLAYER_INFO_TIME (3) #define TEXT_PLAYER_INFO_TIME (3)
#define TEXT_PLAYER_INFO_Y (200 - 40) #define TEXT_PLAYER_INFO_Y (200 - 40)
VOID PutStringPlayerInfo(PLAYERp pp, const char *string) void PutStringPlayerInfo(PLAYERp pp, const char *string)
{ {
short x,y; short x,y;
short w,h; short w,h;

View file

@ -32,14 +32,14 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#define TEXT_INFO_LINE(line) (TEXT_INFO_Y + ((line) * TEXT_INFO_YOFF)) #define TEXT_INFO_LINE(line) (TEXT_INFO_Y + ((line) * TEXT_INFO_YOFF))
//#define TEXT_INFO_LINE(line) (TEXT_INFO_Y + ((line) * TEXT_INFO_YOFF) + GlobalInfoLineOffset) //#define TEXT_INFO_LINE(line) (TEXT_INFO_Y + ((line) * TEXT_INFO_YOFF) + GlobalInfoLineOffset)
VOID DisplayFragNames(PLAYERp pp); void DisplayFragNames(PLAYERp pp);
VOID DisplayMiniBarSmString(PLAYERp pp,short xs,short ys, short pal, const char *buffer); void DisplayMiniBarSmString(PLAYERp pp,short xs,short ys, short pal, const char *buffer);
VOID DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer); void DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer);
VOID DisplayMiniBarNumber(PLAYERp pp,short xs,short ys,int number); void DisplayMiniBarNumber(PLAYERp pp,short xs,short ys,int number);
void DisplaySummaryString(PLAYERp pp,short xs,short ys,short color,short shade,const char *buffer); void DisplaySummaryString(PLAYERp pp,short xs,short ys,short color,short shade,const char *buffer);
void DisplayPanelNumber(PLAYERp pp,short xs,short ys,int number); void DisplayPanelNumber(PLAYERp pp,short xs,short ys,int number);
VOID PutStringInfo(PLAYERp pp, const char *string); void PutStringInfo(PLAYERp pp, const char *string);
VOID PutStringInfoLine(PLAYERp pp, const char *string); void PutStringInfoLine(PLAYERp pp, const char *string);
VOID PutStringInfoLine2(PLAYERp pp, const char *string); void PutStringInfoLine2(PLAYERp pp, const char *string);
void pClearTextLine(PLAYERp pp,long y); void pClearTextLine(PLAYERp pp,long y);
void pMenuClearTextLine(PLAYERp pp); void pMenuClearTextLine(PLAYERp pp);

View file

@ -39,7 +39,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "weapon.h" #include "weapon.h"
VOID DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny); void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny);
void DoAutoTurretObject(SECTOR_OBJECTp sop); void DoAutoTurretObject(SECTOR_OBJECTp sop);
void DoTornadoObject(SECTOR_OBJECTp sop); void DoTornadoObject(SECTOR_OBJECTp sop);
@ -118,7 +118,7 @@ point to the sprite.
*/ */
short short
ActorFindTrack(short SpriteNum, CHAR player_dir, int track_type, short *track_point_num, short *track_dir) ActorFindTrack(short SpriteNum, int8_t player_dir, int track_type, short *track_point_num, short *track_dir)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
SPRITEp sp = User[SpriteNum]->SpriteP; SPRITEp sp = User[SpriteNum]->SpriteP;
@ -272,7 +272,7 @@ ActorFindTrack(short SpriteNum, CHAR player_dir, int track_type, short *track_po
} }
VOID void
NextTrackPoint(SECTOR_OBJECTp sop) NextTrackPoint(SECTOR_OBJECTp sop)
{ {
sop->point += sop->dir; sop->point += sop->dir;
@ -285,7 +285,7 @@ NextTrackPoint(SECTOR_OBJECTp sop)
} }
VOID void
NextActorTrackPoint(short SpriteNum) NextActorTrackPoint(short SpriteNum)
{ {
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
@ -299,7 +299,7 @@ NextActorTrackPoint(short SpriteNum)
u->point = Track[u->track].NumPoints - 1; u->point = Track[u->track].NumPoints - 1;
} }
VOID void
TrackAddPoint(TRACKp t, TRACK_POINTp tp, short SpriteNum) TrackAddPoint(TRACKp t, TRACK_POINTp tp, short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
@ -585,8 +585,8 @@ void QuickLadderSetup(short stat, short lotag, short type)
} }
VOID void
TrackSetup(VOID) TrackSetup(void)
{ {
short SpriteNum = 0, NextSprite, ndx; short SpriteNum = 0, NextSprite, ndx;
TRACK_POINTp tp; TRACK_POINTp tp;
@ -715,15 +715,15 @@ FindBoundSprite(short tag)
} }
VOID void
SectorObjectSetupBounds(SECTOR_OBJECTp sop) SectorObjectSetupBounds(SECTOR_OBJECTp sop)
{ {
int xlow, ylow, xhigh, yhigh; int xlow, ylow, xhigh, yhigh;
short sp_num, next_sp_num, sn, startwall, endwall; short sp_num, next_sp_num, sn, startwall, endwall;
int i, k, j; int i, k, j;
SPRITEp BoundSprite; SPRITEp BoundSprite;
BOOL FoundOutsideLoop = FALSE, FoundSector = FALSE; SWBOOL FoundOutsideLoop = FALSE, FoundSector = FALSE;
BOOL SectorInBounds; SWBOOL SectorInBounds;
SECTORp *sectp; SECTORp *sectp;
PLAYERp pp; PLAYERp pp;
short pnum; short pnum;
@ -1025,7 +1025,7 @@ cont:
} }
VOID void
SetupSectorObject(short sectnum, short tag) SetupSectorObject(short sectnum, short tag)
{ {
SPRITEp sp; SPRITEp sp;
@ -1045,11 +1045,11 @@ SetupSectorObject(short sectnum, short tag)
// initialize stuff first time through // initialize stuff first time through
if (sop->num_sectors == -1) if (sop->num_sectors == -1)
{ {
VOID DoTornadoObject(SECTOR_OBJECTp sop); void DoTornadoObject(SECTOR_OBJECTp sop);
VOID MorphTornado(SECTOR_OBJECTp sop); void MorphTornado(SECTOR_OBJECTp sop);
VOID MorphFloor(SECTOR_OBJECTp sop); void MorphFloor(SECTOR_OBJECTp sop);
VOID ScaleSectorObject(SECTOR_OBJECTp sop); void ScaleSectorObject(SECTOR_OBJECTp sop);
VOID DoAutoTurretObject(SECTOR_OBJECTp sop); void DoAutoTurretObject(SECTOR_OBJECTp sop);
memset(sop->sectp, 0, sizeof(sop->sectp)); memset(sop->sectp, 0, sizeof(sop->sectp));
sop->crush_z = 0; sop->crush_z = 0;
@ -1151,7 +1151,7 @@ SetupSectorObject(short sectnum, short tag)
} }
if (SP_TAG4(sp)) if (SP_TAG4(sp))
sop->scale_point_rand_freq = (BYTE)SP_TAG4(sp); sop->scale_point_rand_freq = (uint8_t)SP_TAG4(sp);
else else
sop->scale_point_rand_freq = 64; sop->scale_point_rand_freq = 64;
@ -1170,7 +1170,7 @@ SetupSectorObject(short sectnum, short tag)
sop->scale_active_type = SP_TAG7(sp); sop->scale_active_type = SP_TAG7(sp);
if (SP_TAG8(sp)) if (SP_TAG8(sp))
sop->scale_rand_freq = (BYTE)SP_TAG8(sp); sop->scale_rand_freq = (uint8_t)SP_TAG8(sp);
else else
sop->scale_rand_freq = 64>>3; sop->scale_rand_freq = 64>>3;
@ -1414,8 +1414,8 @@ SetupSectorObject(short sectnum, short tag)
} }
VOID void
PostSetupSectorObject(VOID) PostSetupSectorObject(void)
{ {
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
@ -1456,11 +1456,11 @@ PlayerOnObject(short sectnum_match)
} }
VOID void
PlaceSectorObjectsOnTracks(VOID) PlaceSectorObjectsOnTracks(void)
{ {
short i, j, k, startwall, endwall; short i, j, k, startwall, endwall;
BOOL found; SWBOOL found;
// place each sector object on the track // place each sector object on the track
for (i = 0; i < MAX_SECTOR_OBJECTS; i++) for (i = 0; i < MAX_SECTOR_OBJECTS; i++)
@ -1534,8 +1534,8 @@ PlaceSectorObjectsOnTracks(VOID)
} }
VOID void
PlaceActorsOnTracks(VOID) PlaceActorsOnTracks(void)
{ {
short i, nexti, j, tag, htag, new_ang; short i, nexti, j, tag, htag, new_ang;
SPRITEp sp; SPRITEp sp;
@ -1595,10 +1595,10 @@ PlaceActorsOnTracks(VOID)
} }
VOID void
MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny) MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
{ {
VOID DoPlayerZrange(PLAYERp pp); void DoPlayerZrange(PLAYERp pp);
// make sure your standing on the so // make sure your standing on the so
if (TEST(pp->Flags, PF_JUMPING | PF_FALLING | PF_FLYING)) if (TEST(pp->Flags, PF_JUMPING | PF_FALLING | PF_FLYING))
@ -1672,7 +1672,7 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny)
UpdatePlayerSprite(pp); UpdatePlayerSprite(pp);
} }
VOID void
MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny) MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
{ {
int j, k, c, rx, ry; int j, k, c, rx, ry;
@ -1683,7 +1683,7 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny)
WALLp wp; WALLp wp;
USERp u; USERp u;
short i, nexti, rot_ang; short i, nexti, rot_ang;
BOOL PlayerMove = TRUE; SWBOOL PlayerMove = TRUE;
if (sop->xmid >= (int)MAXSO) if (sop->xmid >= (int)MAXSO)
PlayerMove = FALSE; PlayerMove = FALSE;
@ -1771,7 +1771,7 @@ PlayerPart:
{ {
#if 0 #if 0
short nr, nextnr; short nr, nextnr;
BOOL skip = TRUE; SWBOOL skip = TRUE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_NO_RIDE], nr, nextnr) TRAVERSE_SPRITE_STAT(headspritestat[STAT_NO_RIDE], nr, nextnr)
{ {
if (sprite[nr].lotag == sop - SectorObject) if (sprite[nr].lotag == sop - SectorObject)
@ -1928,8 +1928,8 @@ PlayerPart:
} }
} }
VOID void
RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, BOOL dynamic) RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, SWBOOL dynamic)
{ {
short wallcount = 0, j, k, startwall, endwall, delta_ang_from_orig; short wallcount = 0, j, k, startwall, endwall, delta_ang_from_orig;
SECTORp *sectp; SECTORp *sectp;
@ -2018,7 +2018,7 @@ RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, BOOL dynamic)
(*sop->PostMoveAnimator)(sop); (*sop->PostMoveAnimator)(sop);
} }
VOID KillSectorObjectSprites(SECTOR_OBJECTp sop) void KillSectorObjectSprites(SECTOR_OBJECTp sop)
{ {
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
@ -2042,7 +2042,7 @@ VOID KillSectorObjectSprites(SECTOR_OBJECTp sop)
sop->sp_num[0] = -1; sop->sp_num[0] = -1;
} }
VOID UpdateSectorObjectSprites(SECTOR_OBJECTp sop) void UpdateSectorObjectSprites(SECTOR_OBJECTp sop)
{ {
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
@ -2124,7 +2124,7 @@ DetectSectorObjectByWall(WALLp wph)
} }
VOID void
CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny) CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny)
{ {
short j, k, startwall, endwall; short j, k, startwall, endwall;
@ -2161,7 +2161,7 @@ CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny)
} }
VOID void
MoveZ(SECTOR_OBJECTp sop) MoveZ(SECTOR_OBJECTp sop)
{ {
short i; short i;
@ -2337,7 +2337,7 @@ void CallbackSOsink(ANIMp ap, void *data)
} }
VOID void
MoveSectorObjects(SECTOR_OBJECTp sop, short locktics) MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
{ {
int j, k, c, nx, ny, nz, rx, ry, dx, dy, dz; int j, k, c, nx, ny, nz, rx, ry, dx, dy, dz;
@ -2422,7 +2422,7 @@ MoveSectorObjects(SECTOR_OBJECTp sop, short locktics)
} }
} }
VOID DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny) void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
{ {
TRACK_POINTp tpoint; TRACK_POINTp tpoint;
int dx, dy, dz; int dx, dy, dz;
@ -2768,7 +2768,7 @@ VOID DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny)
} }
VOID void
OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy) OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
{ {
int i, nx, ny; int i, nx, ny;
@ -2815,13 +2815,13 @@ OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE); RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE);
} }
VOID void
PlaceSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy) PlaceSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy)
{ {
RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE); RefreshPoints(sop, newx - sop->xmid, newy - sop->ymid, FALSE);
} }
VOID VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator) void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator)
{ {
short SpriteNum, NextSprite; short SpriteNum, NextSprite;
SECTORp *sectp; SECTORp *sectp;
@ -2865,7 +2865,7 @@ VOID VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator)
} }
VOID void
KillSectorObject(SECTOR_OBJECTp sop) KillSectorObject(SECTOR_OBJECTp sop)
{ {
int nx, ny, nz; int nx, ny, nz;
@ -2895,7 +2895,7 @@ KillSectorObject(SECTOR_OBJECTp sop)
} }
VOID TornadoSpin(SECTOR_OBJECTp sop) void TornadoSpin(SECTOR_OBJECTp sop)
{ {
short delta_ang, speed; short delta_ang, speed;
short locktics = synctics; short locktics = synctics;
@ -2927,7 +2927,7 @@ VOID TornadoSpin(SECTOR_OBJECTp sop)
} }
} }
VOID void
DoTornadoObject(SECTOR_OBJECTp sop) DoTornadoObject(SECTOR_OBJECTp sop)
{ {
short delta_ang; short delta_ang;
@ -2962,7 +2962,7 @@ DoTornadoObject(SECTOR_OBJECTp sop)
RefreshPoints(sop, x - sop->xmid, y - sop->ymid, TRUE); RefreshPoints(sop, x - sop->xmid, y - sop->ymid, TRUE);
} }
VOID void
DoAutoTurretObject(SECTOR_OBJECTp sop) DoAutoTurretObject(SECTOR_OBJECTp sop)
{ {
short SpriteNum = sop->sp_child - sprite; short SpriteNum = sop->sp_child - sprite;
@ -3146,7 +3146,7 @@ ScanToWall
*/ */
BOOL SWBOOL
ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum) ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum)
{ {
SPRITEp sp; SPRITEp sp;

View file

@ -1,6 +1,6 @@
int ActorFollowTrack(short SpriteNum,short locktics); int ActorFollowTrack(short SpriteNum,short locktics);
void ActorLeaveTrack(short SpriteNum); void ActorLeaveTrack(short SpriteNum);
void RefreshPoints(SECTOR_OBJECTp sop,int nx,int ny,BOOL dynamic); void RefreshPoints(SECTOR_OBJECTp sop,int nx,int ny,SWBOOL dynamic);
void TrackSetup(void); void TrackSetup(void);
void PlaceSectorObject(SECTOR_OBJECTp sop,short newang,int newx,int newy); void PlaceSectorObject(SECTOR_OBJECTp sop,short newang,int newx,int newy);
void PlaceSectorObjectsOnTracks(void); void PlaceSectorObjectsOnTracks(void);

View file

@ -38,9 +38,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
short DoVatorMatch(PLAYERp pp, short match); short DoVatorMatch(PLAYERp pp, short match);
BOOL TestVatorMatchActive(short match); SWBOOL TestVatorMatchActive(short match);
VOID InterpSectorSprites(short sectnum, BOOL state); void InterpSectorSprites(short sectnum, SWBOOL state);
int InitBloodSpray(short, BOOL, short); int InitBloodSpray(short, SWBOOL, short);
void ReverseVator(short SpriteNum) void ReverseVator(short SpriteNum)
{ {
@ -74,12 +74,12 @@ void ReverseVator(short SpriteNum)
u->vel_rate = -u->vel_rate; u->vel_rate = -u->vel_rate;
} }
BOOL SWBOOL
VatorSwitch(short match, short setting) VatorSwitch(short match, short setting)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti)
{ {
@ -161,7 +161,7 @@ short DoVatorOperate(PLAYERp pp, short sectnum)
sectnum = fsp->sectnum; sectnum = fsp->sectnum;
// single play only vator // single play only vator
// BOOL 8 must be set for message to display // SWBOOL 8 must be set for message to display
if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS)) if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS))
{ {
if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play."); if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play.");
@ -236,7 +236,7 @@ DoVatorMatch(PLAYERp pp, short match)
first_vator = i; first_vator = i;
// single play only vator // single play only vator
// BOOL 8 must be set for message to display // SWBOOL 8 must be set for message to display
if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS)) if (TEST_BOOL4(fsp) && (gNet.MultiGameType == MULTI_GAME_COMMBAT || gNet.MultiGameType == MULTI_GAME_AI_BOTS))
{ {
if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play."); if (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play.");
@ -287,7 +287,7 @@ DoVatorMatch(PLAYERp pp, short match)
} }
BOOL SWBOOL
TestVatorMatchActive(short match) TestVatorMatchActive(short match)
{ {
USERp fu; USERp fu;
@ -316,7 +316,7 @@ TestVatorMatchActive(short match)
return FALSE; return FALSE;
} }
VOID InterpSectorSprites(short sectnum, BOOL state) void InterpSectorSprites(short sectnum, SWBOOL state)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
@ -341,12 +341,12 @@ VOID InterpSectorSprites(short sectnum, BOOL state)
} }
} }
VOID MoveSpritesWithSector(short sectnum, int z_amt, BOOL type) void MoveSpritesWithSector(short sectnum, int z_amt, SWBOOL type)
{ {
SECTORp sectp = &sector[sectnum]; SECTORp sectp = &sector[sectnum];
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL both = FALSE; SWBOOL both = FALSE;
if (SectUser[sectnum]) if (SectUser[sectnum])
both = !!TEST(SectUser[sectnum]->flags, SECTFU_VATOR_BOTH); both = !!TEST(SectUser[sectnum]->flags, SECTFU_VATOR_BOTH);
@ -542,7 +542,7 @@ int DoVator(short SpriteNum)
int i,nexti; int i,nexti;
SPRITEp bsp; SPRITEp bsp;
USERp bu; USERp bu;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{ {
@ -595,7 +595,7 @@ int DoVator(short SpriteNum)
int i,nexti; int i,nexti;
SPRITEp bsp; SPRITEp bsp;
USERp bu; USERp bu;
BOOL found = FALSE; SWBOOL found = FALSE;
TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti)
{ {

View file

@ -35,7 +35,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "sprite.h" #include "sprite.h"
extern short NormalVisibility; // player.c extern short NormalVisibility; // player.c
extern BOOL GamePaused; extern SWBOOL GamePaused;
#define VIS_VisCur(sp) (SP_TAG2(sp)) #define VIS_VisCur(sp) (SP_TAG2(sp))
#define VIS_VisDir(sp) (SP_TAG3(sp)) #define VIS_VisDir(sp) (SP_TAG3(sp))

View file

@ -86,9 +86,9 @@ int DoWallMove(SPRITEp sp)
short shade1,shade2,ang,picnum1,picnum2; short shade1,shade2,ang,picnum1,picnum2;
WALLp wallp; WALLp wallp;
short prev_wall; short prev_wall;
BOOL found = FALSE; SWBOOL found = FALSE;
short dang; short dang;
BOOL SOsprite = FALSE; SWBOOL SOsprite = FALSE;
dist = SP_TAG13(sp); dist = SP_TAG13(sp);
ang = SP_TAG4(sp); ang = SP_TAG4(sp);
@ -162,10 +162,10 @@ int DoWallMove(SPRITEp sp)
return found; return found;
} }
BOOL CanSeeWallMove(SPRITEp wp, short match) SWBOOL CanSeeWallMove(SPRITEp wp, short match)
{ {
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
SPRITEp sp; SPRITEp sp;
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE_CANSEE], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE_CANSEE], i, nexti)
@ -193,7 +193,7 @@ int DoWallMoveMatch(short match)
{ {
SPRITEp sp; SPRITEp sp;
short i,nexti; short i,nexti;
BOOL found = FALSE; SWBOOL found = FALSE;
// just all with the same matching tags // just all with the same matching tags
TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE], i, nexti) TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE], i, nexti)

View file

@ -37,9 +37,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
extern BOOL Prediction; extern SWBOOL Prediction;
BOOL SWBOOL
WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor) WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor)
{ {
int i,nexti; int i,nexti;
@ -79,7 +79,7 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor)
} }
SPRITEp SPRITEp
WarpPlane(LONGp x, LONGp y, LONGp z, SHORTp sectnum) WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum)
{ {
SPRITEp sp_floor, sp_ceiling; SPRITEp sp_floor, sp_ceiling;
@ -109,7 +109,7 @@ WarpPlane(LONGp x, LONGp y, LONGp z, SHORTp sectnum)
} }
SPRITEp SPRITEp
WarpToArea(SPRITEp sp_from, LONGp x, LONGp y, LONGp z, SHORTp sectnum) WarpToArea(SPRITEp sp_from, int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum)
{ {
int xoff; int xoff;
int yoff; int yoff;
@ -207,7 +207,7 @@ WarpToArea(SPRITEp sp_from, LONGp x, LONGp y, LONGp z, SHORTp sectnum)
// //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
BOOL SWBOOL
WarpSectorInfo(short sectnum, SPRITEp *sp_warp) WarpSectorInfo(short sectnum, SPRITEp *sp_warp)
{ {
int i,nexti; int i,nexti;
@ -239,7 +239,7 @@ WarpSectorInfo(short sectnum, SPRITEp *sp_warp)
} }
SPRITEp SPRITEp
Warp(LONGp x, LONGp y, LONGp z, SHORTp sectnum) Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum)
{ {
SPRITEp sp_warp; SPRITEp sp_warp;

View file

@ -24,8 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
*/ */
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
BOOL WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor); SWBOOL WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor);
SPRITEp WarpPlane(LONGp x, LONGp y, LONGp z, SHORTp sectnum); SPRITEp WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum);
SPRITEp WarpToArea(SPRITEp sp_from, LONGp x, LONGp y, LONGp z, SHORTp sectnum); SPRITEp WarpToArea(SPRITEp sp_from, int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum);
BOOL WarpSectorInfo(short sectnum, SPRITEp *sp_warp); SWBOOL WarpSectorInfo(short sectnum, SPRITEp *sp_warp);
SPRITEp Warp(LONGp x, LONGp y, LONGp z, SHORTp sectnum); SPRITEp Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum);

File diff suppressed because it is too large Load diff

View file

@ -62,25 +62,25 @@ extern short GenericQueue[MAX_GENERIC_QUEUE];
extern short LoWangsQueueHead; extern short LoWangsQueueHead;
extern short LoWangsQueue[MAX_LOWANGS_QUEUE]; extern short LoWangsQueue[MAX_LOWANGS_QUEUE];
VOID ChangeState(short SpriteNum, STATEp statep); void ChangeState(short SpriteNum, STATEp statep);
void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt); void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt);
SECTOR_OBJECTp DetectSectorObject(SECTORp); SECTOR_OBJECTp DetectSectorObject(SECTORp);
SECTOR_OBJECTp DetectSectorObjectByWall(WALLp); SECTOR_OBJECTp DetectSectorObjectByWall(WALLp);
VOID ScaleSpriteVector(short SpriteNum, int scale); void ScaleSpriteVector(short SpriteNum, int scale);
int QueueHole(short ang, short hitsect, short hitwall, int hitx, int hity, int hitz); int QueueHole(short ang, short hitsect, short hitwall, int hitx, int hity, int hitz);
int QueueWallBlood(short hitsprite,short ang); int QueueWallBlood(short hitsprite,short ang);
BOOL SlopeBounce(short SpriteNum, BOOL *hitwall); SWBOOL SlopeBounce(short SpriteNum, SWBOOL *hitwall);
BOOL HitscanSpriteAdjust(short SpriteNum, short hitwall); SWBOOL HitscanSpriteAdjust(short SpriteNum, short hitwall);
int SpawnSwordSparks(PLAYERp pp, short hitsect, short hitwall, int hitx, int hity, int hitz, short hitang); int SpawnSwordSparks(PLAYERp pp, short hitsect, short hitwall, int hitx, int hity, int hitz, short hitang);
int SpawnBubble(short SpriteNum); int SpawnBubble(short SpriteNum);
int SpawnFireballExp(SHORT Weapon); int SpawnFireballExp(int16_t Weapon);
int SpawnFireballFlames(SHORT SpriteNum,SHORT enemy); int SpawnFireballFlames(int16_t SpriteNum,int16_t enemy);
int SpawnRadiationCloud(short SpriteNum); int SpawnRadiationCloud(short SpriteNum);
int SpawnGrenadeExp(SHORT Weapon); int SpawnGrenadeExp(int16_t Weapon);
int SpawnSectorExp(SHORT Weapon); int SpawnSectorExp(int16_t Weapon);
int DoShrapVelocity(SHORT SpriteNum); int DoShrapVelocity(int16_t SpriteNum);
int ShrapKillSprite(short SpriteNum); int ShrapKillSprite(short SpriteNum);
BOOL MissileSetPos(short Weapon,ANIMATORp DoWeapon,int dist); SWBOOL MissileSetPos(short Weapon,ANIMATORp DoWeapon,int dist);
int ActorPain(short SpriteNum); int ActorPain(short SpriteNum);
// //
@ -150,12 +150,12 @@ extern int WeaponIsAmmo;
extern short target_ang; extern short target_ang;
BOOL SpriteOverlap(short, short); SWBOOL SpriteOverlap(short, short);
int SpawnShotgunSparks(PLAYERp pp, short hitsect, short hitwall, int hitx, int hity, int hitz, short hitang); int SpawnShotgunSparks(PLAYERp pp, short hitsect, short hitwall, int hitx, int hity, int hitz, short hitang);
int DoActorBeginSlide(short SpriteNum, short ang, short vel, short dec); int DoActorBeginSlide(short SpriteNum, short ang, short vel, short dec);
int GetOverlapSector(int x, int y, short *over, short *under); int GetOverlapSector(int x, int y, short *over, short *under);
BOOL MissileHitDiveArea(short SpriteNum); SWBOOL MissileHitDiveArea(short SpriteNum);
int DoDamageTest(short); int DoDamageTest(short);
@ -165,7 +165,7 @@ extern short StatDamageList[STAT_DAMAGE_LIST_SIZE];
#define MUSHROOM_CLOUD 3280 #define MUSHROOM_CLOUD 3280
extern STATE s_NukeMushroom[]; extern STATE s_NukeMushroom[];
VOID WallBounce(short SpriteNum, short ang); void WallBounce(short SpriteNum, short ang);
#define PUFF 1748 #define PUFF 1748
#define CALTROPS 2218 #define CALTROPS 2218
@ -174,14 +174,14 @@ VOID WallBounce(short SpriteNum, short ang);
int PlayerInitChemBomb(PLAYERp pp); int PlayerInitChemBomb(PLAYERp pp);
int InitChemBomb(short SpriteNum); int InitChemBomb(short SpriteNum);
int PlayerInitCaltrops(PLAYERp pp); int PlayerInitCaltrops(PLAYERp pp);
int InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity); int InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity);
int SpawnBunnyExp(SHORT Weapon); int SpawnBunnyExp(int16_t Weapon);
int InitBunnyRocket(PLAYERp pp); int InitBunnyRocket(PLAYERp pp);
int GetDamage(short SpriteNum, short Weapon, short DamageNdx); int GetDamage(short SpriteNum, short Weapon, short DamageNdx);
int DoFlamesDamageTest(short Weapon); int DoFlamesDamageTest(short Weapon);
VOID DoActorSpawnIcon(SHORT SpriteNum); void DoActorSpawnIcon(int16_t SpriteNum);
typedef struct typedef struct
{ {
@ -199,7 +199,7 @@ enum ShrapPos
}; };
int SetSuicide(short SpriteNum); int SetSuicide(short SpriteNum);
VOID UpdateSinglePlayKills(short SpriteNum); void UpdateSinglePlayKills(short SpriteNum);
int InitPlasmaFountain(SPRITEp wp, SPRITEp sp); int InitPlasmaFountain(SPRITEp wp, SPRITEp sp);
int InitCoolgDrip(short SpriteNum); int InitCoolgDrip(short SpriteNum);
int InitFireball(PLAYERp pp); int InitFireball(PLAYERp pp);
@ -212,26 +212,26 @@ int InitSpearTrap(short SpriteNum);
int InitTurretMgun(SECTOR_OBJECTp sop); int InitTurretMgun(SECTOR_OBJECTp sop);
int InitVulcanBoulder(short SpriteNum); int InitVulcanBoulder(short SpriteNum);
int DoBladeDamage(short SpriteNum); int DoBladeDamage(short SpriteNum);
int DoFindGround(SHORT SpriteNum); int DoFindGround(int16_t SpriteNum);
int DoFindGroundPoint(SHORT SpriteNum); int DoFindGroundPoint(int16_t SpriteNum);
VOID SpriteQueueDelete(short SpriteNum); void SpriteQueueDelete(short SpriteNum);
int HelpMissileLateral(SHORT Weapon,int dist); int HelpMissileLateral(int16_t Weapon,int dist);
int AddSpriteToSectorObject(short SpriteNum,SECTOR_OBJECTp sop); int AddSpriteToSectorObject(short SpriteNum,SECTOR_OBJECTp sop);
void QueueReset(void); void QueueReset(void);
int PlayerCheckDeath(PLAYERp pp,short Weapon); int PlayerCheckDeath(PLAYERp pp,short Weapon);
BOOL SpriteWarpToUnderwater(SPRITEp sp); SWBOOL SpriteWarpToUnderwater(SPRITEp sp);
int PlayerDamageSlide(PLAYERp pp,short damage,short ang); int PlayerDamageSlide(PLAYERp pp,short damage,short ang);
BOOL VehicleMoveHit(short SpriteNum); SWBOOL VehicleMoveHit(short SpriteNum);
int SpawnSplash(short SpriteNum); int SpawnSplash(short SpriteNum);
int SpawnMineExp(SHORT Weapon); int SpawnMineExp(int16_t Weapon);
int SpawnLittleExp(SHORT Weapon); int SpawnLittleExp(int16_t Weapon);
int SpawnLargeExp(SHORT Weapon); int SpawnLargeExp(int16_t Weapon);
int SpawnNuclearExp(SHORT Weapon); int SpawnNuclearExp(int16_t Weapon);
int SpawnBoltExp(SHORT Weapon); int SpawnBoltExp(int16_t Weapon);
int SpawnTracerExp(SHORT Weapon); int SpawnTracerExp(int16_t Weapon);
int SpawnGoroFireballExp(SHORT Weapon); int SpawnGoroFireballExp(int16_t Weapon);
BOOL MissileHitMatch(short Weapon,short WeaponNum,short hitsprite); SWBOOL MissileHitMatch(short Weapon,short WeaponNum,short hitsprite);
int DoItemFly(SHORT SpriteNum); int DoItemFly(int16_t SpriteNum);
int SpawnVehicleSmoke(short SpriteNum); int SpawnVehicleSmoke(short SpriteNum);
short PrevWall(short wall_num); short PrevWall(short wall_num);
int DoDamage(short SpriteNum,short Weapon); int DoDamage(short SpriteNum,short Weapon);

View file

@ -36,7 +36,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "track.h" #include "track.h"
#include "fx_man.h" #include "fx_man.h"
extern BYTE RedBookSong[40]; extern uint8_t RedBookSong[40];
extern short BossSpriteNum[3]; extern short BossSpriteNum[3];
ANIMATOR InitZillaCharge; ANIMATOR InitZillaCharge;
@ -759,13 +759,13 @@ int DoZillaStomp(short SpriteNum)
return 0; return 0;
} }
extern int SpawnGrenadeExp(SHORT Weapon); extern int SpawnGrenadeExp(int16_t Weapon);
int DoZillaDeathMelt(short SpriteNum) int DoZillaDeathMelt(short SpriteNum)
{ {
SPRITEp sp = &sprite[SpriteNum]; SPRITEp sp = &sprite[SpriteNum];
USERp u = User[SpriteNum]; USERp u = User[SpriteNum];
static BOOL alreadydid = FALSE; static SWBOOL alreadydid = FALSE;
if (RANDOM_RANGE(1000) > 800) if (RANDOM_RANGE(1000) > 800)
SpawnGrenadeExp(SpriteNum); SpawnGrenadeExp(SpriteNum);