diff --git a/polymer/eduke32/source/sw/src/_rts.h b/polymer/eduke32/source/sw/src/_rts.h index 6a44becb4..0b3b933e2 100644 --- a/polymer/eduke32/source/sw/src/_rts.h +++ b/polymer/eduke32/source/sw/src/_rts.h @@ -59,20 +59,20 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms typedef struct { char name[8]; - int32 handle,position,size; + int32_t handle,position,size; } lumpinfo_t; typedef struct { char identification[4]; // should be IWAD - int32 numlumps; - int32 infotableofs; + int32_t numlumps; + int32_t infotableofs; } wadinfo_t; typedef struct { - int32 filepos; - int32 size; + int32_t filepos; + int32_t size; char name[8]; } filelump_t; diff --git a/polymer/eduke32/source/sw/src/actor.c b/polymer/eduke32/source/sw/src/actor.c index 330f5492c..a7d38f98f 100644 --- a/polymer/eduke32/source/sw/src/actor.c +++ b/polymer/eduke32/source/sw/src/actor.c @@ -280,7 +280,7 @@ DoActorDie(short SpriteNum, short weapon) return 0; } -VOID +void DoDebrisCurrent(SPRITEp sp) { int xvect, yvect; @@ -515,7 +515,7 @@ DoGenerateSewerDebris(short SpriteNum) // !AIC - Tries to keep actors correctly on the floor. More that a bit messy. -VOID +void KeepActorOnFloor(short SpriteNum) { USERp u = User[SpriteNum]; diff --git a/polymer/eduke32/source/sw/src/ai.c b/polymer/eduke32/source/sw/src/ai.c index 09ac6cb09..9c82c2d35 100644 --- a/polymer/eduke32/source/sw/src/ai.c +++ b/polymer/eduke32/source/sw/src/ai.c @@ -38,9 +38,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "net.h" -BOOL PlayerTakeDamage(PLAYERp, short); +SWBOOL PlayerTakeDamage(PLAYERp, short); ANIMATOR InitActorRunToward; -BOOL FAF_Sector(short); +SWBOOL FAF_Sector(short); short FindTrackToPlayer(USERp u); ANIMATORp ChooseAction(DECISION decision[]); @@ -54,11 +54,11 @@ short AttackOrRun = 200; #define CHOOSE2(value) (RANDOM_P2(1024) < (value)) -VOID DebugMoveHit(short SpriteNum) +void DebugMoveHit(short SpriteNum) { SPRITEp sp; USERp u = User[SpriteNum]; - extern BOOL DebugActor; + extern SWBOOL DebugActor; return; @@ -93,7 +93,7 @@ VOID DebugMoveHit(short SpriteNum) } -BOOL ActorMoveHitReact(short SpriteNum) +SWBOOL ActorMoveHitReact(short SpriteNum) { USERp u = User[SpriteNum]; 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]; SPRITEp sp = User[SpriteNum]->SpriteP; @@ -165,8 +165,8 @@ BOOL ActorFlaming(short SpriteNum) return FALSE; } -VOID -DoActorSetSpeed(short SpriteNum, BYTE speed) +void +DoActorSetSpeed(short SpriteNum, uint8_t speed) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; @@ -385,8 +385,8 @@ DoActorPickClosePlayer(short SpriteNum) PLAYERp pp,tp; // if actor can still see the player int look_height = SPRITEp_TOS(sp); - BOOL ICanSee = FALSE; - BOOL found = FALSE; + SWBOOL ICanSee = FALSE; + SWBOOL found = FALSE; int i,nexti; if (u->ID == ZOMBIE_RUN_R0 && gNet.MultiGameType == MULTI_GAME_COOPERATIVE) @@ -629,7 +629,7 @@ DoActorActionDecide(short SpriteNum) ANIMATORp action; PLAYERp pp; USERp pu=NULL; - BOOL ICanSee=FALSE; + SWBOOL ICanSee=FALSE; // REMINDER: This function is not even called if SpriteControl doesn't let // 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; int nx,ny; - ULONG cliptype = CLIPMASK_ACTOR; + uint32_t cliptype = CLIPMASK_ACTOR; int ret; short sang,ss; @@ -1769,7 +1769,7 @@ FindNewAngle(short SpriteNum, signed char dir, int DistToMove) { USERp u = User[SpriteNum]; 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] = { @@ -1788,7 +1788,7 @@ FindNewAngle(short SpriteNum, signed char dir, int DistToMove) }; - SHORTp adp = NULL; + int16_t* adp = NULL; short new_ang, oang; short save_ang = -1; diff --git a/polymer/eduke32/source/sw/src/ai.h b/polymer/eduke32/source/sw/src/ai.h index 7c1994dac..923c94910 100644 --- a/polymer/eduke32/source/sw/src/ai.h +++ b/polymer/eduke32/source/sw/src/ai.h @@ -61,8 +61,8 @@ typedef enum struct ATTRIBUTEstruct { short Speed[MAX_SPEED]; - CHAR TicAdjust[MAX_SPEED]; - BYTE MaxWeapons; + int8_t TicAdjust[MAX_SPEED]; + uint8_t MaxWeapons; /*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 void DebugMoveHit(short SpriteNum); -BOOL ActorMoveHitReact(short SpriteNum); -BOOL ActorFlaming(short SpriteNum); -void DoActorSetSpeed(short SpriteNum,BYTE speed); +SWBOOL ActorMoveHitReact(short SpriteNum); +SWBOOL ActorFlaming(short SpriteNum); +void DoActorSetSpeed(short SpriteNum,uint8_t speed); short ChooseActionNumber(short decision[]); int DoActorNoise(ANIMATORp Action,short SpriteNum); int CanSeePlayer(short SpriteNum); @@ -161,6 +161,6 @@ DoActorExtra5Noise, DoActorExtra6Noise; */ -VOID DoActorSetSpeed(short SpriteNum, BYTE speed); +void DoActorSetSpeed(short SpriteNum, uint8_t speed); #endif diff --git a/polymer/eduke32/source/sw/src/ambient.h b/polymer/eduke32/source/sw/src/ambient.h index 90402935e..bab2d5f92 100644 --- a/polymer/eduke32/source/sw/src/ambient.h +++ b/polymer/eduke32/source/sw/src/ambient.h @@ -109,7 +109,7 @@ AMB_ENTRY(19, DIGI_THUNDER, AMB_PAN|AMB_INTERMIT, AMB_60) // UNDERWATER AMBIENCE 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(22, DIGI_VOID2, AMB_NONE, AMB_NOTICS) AMB_ENTRY(23, DIGI_VOID3, AMB_NONE, AMB_NOTICS) diff --git a/polymer/eduke32/source/sw/src/anim.c b/polymer/eduke32/source/sw/src/anim.c index 6187058e3..6c29f672e 100644 --- a/polymer/eduke32/source/sw/src/anim.c +++ b/polymer/eduke32/source/sw/src/anim.c @@ -67,7 +67,7 @@ char *ANIMname[] = #define ANIM_TILE(num) (MAXTILES-11 + (num)) -VOID AnimShareIntro(int frame, int numframes) +void AnimShareIntro(int frame, int numframes) { 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; 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; 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; ototalclock += 16; @@ -265,7 +265,7 @@ playanm(short anim_num) { unsigned char *animbuf, *palptr; int i, j, k, length = 0, numframes = 0; - int32 handle = -1; + int32_t handle = -1; unsigned char ANIMvesapal[4*256]; unsigned char tempbuf[256]; unsigned char *palook_bak = palookup[0]; diff --git a/polymer/eduke32/source/sw/src/bldscript.c b/polymer/eduke32/source/sw/src/bldscript.c index 5afa176be..6eb46d91b 100644 --- a/polymer/eduke32/source/sw/src/bldscript.c +++ b/polymer/eduke32/source/sw/src/bldscript.c @@ -73,8 +73,8 @@ char token[MAXTOKEN]; char *scriptbuffer,*script_p,*scriptend_p; int grabbed; int scriptline; -BOOL endofscript; -BOOL tokenready; // only TRUE if UnGetToken was just called +SWBOOL endofscript; +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 fp; @@ -152,7 +152,7 @@ void UnGetToken(void) ============== */ -void GetToken(BOOL crossline) +void GetToken(SWBOOL crossline) { char *token_p; @@ -240,7 +240,7 @@ skipspace: ============== */ -BOOL TokenAvailable(void) +SWBOOL TokenAvailable(void) { char *search_p; @@ -455,7 +455,7 @@ void LoadKVXFromScript(char *filename) extern int idleclock,slackerclock; // Watch dog function. Tracks user's work times. -void LogUserTime( BOOL bIsLoggingIn ) +void LogUserTime( SWBOOL bIsLoggingIn ) { int size, readsize; time_t time_of_day; diff --git a/polymer/eduke32/source/sw/src/border.c b/polymer/eduke32/source/sw/src/border.c index 54a938fcb..664cac8fe 100644 --- a/polymer/eduke32/source/sw/src/border.c +++ b/polymer/eduke32/source/sw/src/border.c @@ -65,19 +65,19 @@ short SWBorderTest[] = #define X_TO_FIXED(val) (x_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 CrosshairX, CrosshairY; -extern BOOL BorderAdjust; -BOOL GlobSpriteBoxUpdateEveryFrame = FALSE; +extern SWBOOL BorderAdjust; +SWBOOL GlobSpriteBoxUpdateEveryFrame = FALSE; PANEL_SPRITEp pSpawnFullScreenSpriteBox(PLAYERp pp, short id, short pic, short pri, int x, int y, short x1, short y1, short x2, short y2) { PANEL_SPRITEp psp; - extern BOOL DrawBeforeView; + extern SWBOOL DrawBeforeView; 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; } -VOID SetCrosshair(VOID) +void SetCrosshair(void) { int wdx,wdy,x,y; @@ -122,8 +122,8 @@ VOID SetCrosshair(VOID) } -VOID -SetupAspectRatio(VOID) +void +SetupAspectRatio(void) { f_xdim = FIXED(xdim, 0); f_ydim = FIXED(ydim, 0); @@ -135,8 +135,8 @@ SetupAspectRatio(VOID) y_aspect_mul = (f_ydim / 200); } -VOID -SetConsoleDmost(VOID) +void +SetConsoleDmost(void) { int ystart; int xstart; @@ -166,7 +166,7 @@ SetConsoleDmost(VOID) } } -VOID ClearStartMost(VOID) +void ClearStartMost(void) { int i; @@ -176,12 +176,12 @@ VOID ClearStartMost(VOID) memset(startumost, 0, sizeof(startumost)); } -VOID +void SetFragBar(PLAYERp pp) { short i, num_frag_bars; int y; - extern SHORT OrigCommPlayers; + extern int16_t OrigCommPlayers; if (numplayers <= 1) 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 (tx1 <= bx2) @@ -232,7 +232,7 @@ BOOL RectOverlap(short tx1, short ty1, short bx1, short by1, short tx2, short ty 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; PANEL_SPRITEp psp; @@ -279,12 +279,12 @@ VOID DrawBorderShade(PLAYERp pp, short shade_num, short wx1, short wy1, short wx } } -VOID -BorderShade(PLAYERp pp, BOOL refresh) +void +BorderShade(PLAYERp pp, SWBOOL refresh) { int i, j, k, l, wx1, wx2, wy1, wy2; PANEL_SPRITEp psp; - BYTE lines; + uint8_t lines; wx1 = windowx1 - 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 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 count = 0; @@ -415,7 +415,7 @@ VOID DrawPanelBorderSides(PLAYERp pp, short x, short y, short x2, short y2, shor } 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); 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 // -static VOID +static void BorderRefresh(PLAYERp pp) { int i, j; @@ -515,11 +515,11 @@ BorderRefresh(PLAYERp pp) // Redraw the whole screen // -VOID SetBorder(PLAYERp pp, int value) +void SetBorder(PLAYERp pp, int value) { int diff; int Xdim, Ydim, ScreenSize; - BOOL set_view = TRUE; + SWBOOL set_view = TRUE; if (pp != Player + myconnectindex) return; @@ -558,7 +558,7 @@ VOID SetBorder(PLAYERp pp, int value) SetFragBar(pp); } -VOID +void SetRedrawScreen(PLAYERp pp) { int i, j; diff --git a/polymer/eduke32/source/sw/src/bots.h b/polymer/eduke32/source/sw/src/bots.h index 58565e0eb..49de9357d 100644 --- a/polymer/eduke32/source/sw/src/bots.h +++ b/polymer/eduke32/source/sw/src/bots.h @@ -58,7 +58,7 @@ struct NODETREEstruct { short SpriteNum; // Sprite number in sprite array of goal item 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 }; diff --git a/polymer/eduke32/source/sw/src/break.c b/polymer/eduke32/source/sw/src/break.c index 61b08ae27..eca8935fb 100644 --- a/polymer/eduke32/source/sw/src/break.c +++ b/polymer/eduke32/source/sw/src/break.c @@ -660,7 +660,7 @@ int AutoBreakWall(WALLp wallp, int hitx, int hity, int hitz, short ang, short ty return TRUE; } -BOOL UserBreakWall(WALLp wp, short UNUSED(ang)) +SWBOOL UserBreakWall(WALLp wp, short UNUSED(ang)) { short SpriteNum; 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 -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 match = wp->hitag; @@ -957,7 +957,7 @@ int AutoBreakSprite(short BreakSprite, short type) SPRITEp bp = &sprite[BreakSprite]; BREAK_INFOp break_info; extern void DoWallBreakMatch(short match); - int SpawnBreakFlames(SHORT SpriteNum); + int SpawnBreakFlames(int16_t SpriteNum); break_info = FindSpriteBreakInfo(bp->picnum); @@ -1028,7 +1028,7 @@ int AutoBreakSprite(short BreakSprite, short type) 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 diff --git a/polymer/eduke32/source/sw/src/break.h b/polymer/eduke32/source/sw/src/break.h index 5eed346f8..663bd73d8 100644 --- a/polymer/eduke32/source/sw/src/break.h +++ b/polymer/eduke32/source/sw/src/break.h @@ -46,9 +46,9 @@ void SortBreakInfo(void); BREAK_INFOp SetupWallForBreak(WALLp wallp); BREAK_INFOp SetupSpriteForBreak(SPRITEp sp); 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); -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); void SortBreakInfo(void); diff --git a/polymer/eduke32/source/sw/src/brooms.c b/polymer/eduke32/source/sw/src/brooms.c index ed0c23b33..a1b21f541 100644 --- a/polymer/eduke32/source/sw/src/brooms.c +++ b/polymer/eduke32/source/sw/src/brooms.c @@ -40,8 +40,8 @@ extern short ang; extern int horiz; extern int qsetmode; -BOOL FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum); -BOOL FindFloorView(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); +SWBOOL FindFloorView(short match, int32_t* x, int32_t* y, int32_t z, int16_t* sectnum); short ViewSectorInScene(short cursectnum, short type, short level); void Message(char *string, char color); @@ -65,24 +65,24 @@ _Assert(char *expr, char *strFile, unsigned uLine) #define ZMAX 400 typedef struct { - LONG zval[ZMAX]; - SHORT sectnum[ZMAX]; - SHORT pic[ZMAX]; - SHORT slope[ZMAX]; - SHORT zcount; + int32_t zval[ZMAX]; + int16_t sectnum[ZMAX]; + int16_t pic[ZMAX]; + int16_t slope[ZMAX]; + int16_t zcount; } SAVE, *SAVEp; SAVE save; -BOOL FAF_DebugView = 0; -BOOL FAFon = 0; -BOOL FAF_DontMoveSectors = FALSE; +SWBOOL FAF_DebugView = 0; +SWBOOL FAFon = 0; +SWBOOL FAF_DontMoveSectors = FALSE; short bak_searchsector, bak_searchwall, bak_searchstat; extern short searchsector, searchwall, searchstat, searchit; -VOID SetupBuildFAF(VOID); -VOID ResetBuildFAF(VOID); +void SetupBuildFAF(void); +void ResetBuildFAF(void); void ToggleFAF(void) { @@ -174,8 +174,8 @@ void FAF_AfterDrawRooms(void) } } -VOID -SetupBuildFAF(VOID) +void +SetupBuildFAF(void) { short i, nexti; SPRITEp sp,vc_sp,vf_sp,vl_sp; @@ -315,8 +315,8 @@ SetupBuildFAF(VOID) } -VOID -ResetBuildFAF(VOID) +void +ResetBuildFAF(void) { short i, nexti; SPRITEp sp; @@ -354,8 +354,8 @@ ResetBuildFAF(VOID) } -BOOL -PicInView(short tile_num, BOOL reset) +SWBOOL +PicInView(short tile_num, SWBOOL reset) { 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) { - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next) { @@ -448,8 +448,8 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower) } } -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) { int xoff = 0; int yoff = 0; @@ -538,8 +538,8 @@ FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) return TRUE; } -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) { int xoff = 0; int yoff = 0; @@ -631,7 +631,7 @@ FindFloorView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) return TRUE; } -BOOL +SWBOOL SectorInScene(short tile_num) { if (TEST(gotsector[tile_num >> 3], 1 << (tile_num & 7))) @@ -677,7 +677,7 @@ ViewSectorInScene(short cursectnum, short type, short level) return -1; } -VOID +void DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) { short i; diff --git a/polymer/eduke32/source/sw/src/bunny.c b/polymer/eduke32/source/sw/src/bunny.c index c2c758aef..700070e91 100644 --- a/polymer/eduke32/source/sw/src/bunny.c +++ b/polymer/eduke32/source/sw/src/bunny.c @@ -935,7 +935,7 @@ DoPickCloseBunny(short SpriteNum) // if actor can still see the player int look_height = SPRITEp_TOS(sp); - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_ENEMY], i, nexti) { diff --git a/polymer/eduke32/source/sw/src/cache.c b/polymer/eduke32/source/sw/src/cache.c index cbc6a7b12..c8c1908ef 100644 --- a/polymer/eduke32/source/sw/src/cache.c +++ b/polymer/eduke32/source/sw/src/cache.c @@ -46,7 +46,7 @@ not load" error messages. // It will save out the tile and sound number every time one caches. // // sw -map $bullet -cacheprint > foofile -extern BOOL PreCaching; +extern SWBOOL PreCaching; // player weaponry, item usage, etc. Precache every time. short Player_SCTable[] = @@ -159,7 +159,7 @@ short Pachinko_SCTable[] = void PreCacheSoundList(short table[], int num); void PreCacheTable(short table[], int num); -VOID PreCacheGhost(VOID); +void PreCacheGhost(void); void SetupPreCache(void) @@ -251,19 +251,19 @@ SetupPreCache(void) } } -VOID PreCacheRipper(VOID) +void PreCacheRipper(void) { PreCacheSoundList(Ripper_SCTable, SIZ(Ripper_SCTable)); PreCacheRange(1580, 1644); } -VOID PreCacheRipper2(VOID) +void PreCacheRipper2(void) { PreCacheSoundList(Ripper2_SCTable, SIZ(Ripper2_SCTable)); PreCacheRange(4320, 4427); } -VOID PreCacheCoolie(VOID) +void PreCacheCoolie(void) { PreCacheGhost(); PreCacheSoundList(Coolie_SCTable, SIZ(Coolie_SCTable)); @@ -271,125 +271,125 @@ VOID PreCacheCoolie(VOID) PreCacheRange(4260, 4276); // coolie explode } -VOID PreCacheGhost(VOID) +void PreCacheGhost(void) { PreCacheSoundList(Ghost_SCTable, SIZ(Ghost_SCTable)); PreCacheRange(4277, 4312); } -VOID PreCacheSerpent(VOID) +void PreCacheSerpent(void) { PreCacheSoundList(Serpent_SCTable, SIZ(Serpent_SCTable)); PreCacheRange(960, 1016); PreCacheRange(1300, 1314); } -VOID PreCacheGuardian(VOID) +void PreCacheGuardian(void) { PreCacheSoundList(Guardian_SCTable, SIZ(Guardian_SCTable)); PreCacheRange(1469,1497); } -VOID PreCacheNinja(VOID) +void PreCacheNinja(void) { PreCacheSoundList(Ninja_SCTable, SIZ(Ninja_SCTable)); PreCacheRange(4096, 4239); } -VOID PreCacheNinjaGirl(VOID) +void PreCacheNinjaGirl(void) { //PreCacheSoundList(NinjaGirl_SCTable, SIZ(NinjaGirl_SCTable)); PreCacheRange(5162, 5260); } -VOID PreCacheSumo(VOID) +void PreCacheSumo(void) { PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable)); PreCacheRange(4490, 4544); } -VOID PreCacheZilla(VOID) +void PreCacheZilla(void) { PreCacheSoundList(Sumo_SCTable, SIZ(Sumo_SCTable)); PreCacheRange(4490, 4544); } -VOID PreCacheEel(VOID) +void PreCacheEel(void) { PreCacheRange(4430, 4479); } -VOID PreCacheToiletGirl(VOID) +void PreCacheToiletGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(5023, 5027); } -VOID PreCacheWashGirl(VOID) +void PreCacheWashGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(5032, 5035); } -VOID PreCacheCarGirl(VOID) +void PreCacheCarGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(4594,4597); } -VOID PreCacheMechanicGirl(VOID) +void PreCacheMechanicGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(4590,4593); } -VOID PreCacheSailorGirl(VOID) +void PreCacheSailorGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(4600,4602); } -VOID PreCachePruneGirl(VOID) +void PreCachePruneGirl(void) { PreCacheSoundList(Toilet_SCTable, SIZ(Toilet_SCTable)); PreCacheRange(4604,4604); } -VOID PreCacheTrash(VOID) +void PreCacheTrash(void) { PreCacheSoundList(Trash_SCTable, SIZ(Trash_SCTable)); PreCacheRange(2540, 2546); } -VOID PreCacheBunny(VOID) +void PreCacheBunny(void) { PreCacheSoundList(Bunny_SCTable, SIZ(Bunny_SCTable)); PreCacheRange(4550, 4584); } -VOID PreCacheSkel(VOID) +void PreCacheSkel(void) { PreCacheRange(1320, 1396); } -VOID PreCacheHornet(VOID) +void PreCacheHornet(void) { PreCacheSoundList(Hornet_SCTable, SIZ(Hornet_SCTable)); PreCacheRange(800, 811); } -VOID PreCacheSkull(VOID) +void PreCacheSkull(void) { PreCacheSoundList(Head_SCTable, SIZ(Head_SCTable)); PreCacheRange(820, 854); } -VOID PreCacheBetty(VOID) +void PreCacheBetty(void) { PreCacheRange(817, 819); } -VOID PreCachePachinko(VOID) +void PreCachePachinko(void) { 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 num; @@ -451,7 +451,7 @@ VOID PreCacheAmbient(VOID) } } -VOID PreCacheOverride(VOID) +void PreCacheOverride(void) { int i,nexti; @@ -463,7 +463,7 @@ VOID PreCacheOverride(VOID) } -VOID PreCacheSoundSpot(VOID) +void PreCacheSoundSpot(void) { int i,nexti; int num; @@ -489,8 +489,8 @@ VOID PreCacheSoundSpot(VOID) } } -VOID -PreCacheActor(VOID) +void +PreCacheActor(void) { int i; short pic; diff --git a/polymer/eduke32/source/sw/src/cheats.c b/polymer/eduke32/source/sw/src/cheats.c index 0a297edab..4e77fbdbe 100644 --- a/polymer/eduke32/source/sw/src/cheats.c +++ b/polymer/eduke32/source/sw/src/cheats.c @@ -37,50 +37,50 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#include "inv.h" -BOOL CheatInputMode = FALSE; +SWBOOL CheatInputMode = FALSE; char CheatInputString[256]; -BOOL EveryCheat = FALSE; -BOOL ResCheat = FALSE; +SWBOOL EveryCheat = FALSE; +SWBOOL ResCheat = FALSE; -VOID ResCheatOn(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void ResCheatOn(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { ResCheat = TRUE; } -VOID VoxCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void VoxCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { //gs.Voxel ^= 1; } -VOID RestartCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void RestartCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { 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; } -VOID SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void SecretCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { gs.Stats = !gs.Stats; } -VOID NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void NextCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { Level++; ExitLevel = TRUE; } -VOID PrevCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void PrevCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { Level--; ExitLevel = TRUE; } -VOID MapCheat(PLAYERp pp, char *UNUSED(cheat_string)) +void MapCheat(PLAYERp pp, char *UNUSED(cheat_string)) { 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++; if (LocationInfo > 2) LocationInfo = 0; } -VOID WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) +void WeaponCheat(PLAYERp UNUSED(pp), char *UNUSED(cheat_string)) { PLAYERp p; 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 @@ -142,7 +142,7 @@ VOID GodCheat(PLAYERp pp, char *UNUSED(cheat_string)) 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); @@ -150,7 +150,7 @@ VOID ClipCheat(PLAYERp pp, char *UNUSED(cheat_string)) PutStringInfo(pp, ds); } -VOID WarpCheat(PLAYERp pp, char *cheat_string) +void WarpCheat(PLAYERp pp, char *cheat_string) { char *cp = cheat_string; int episode_num; @@ -180,7 +180,7 @@ VOID WarpCheat(PLAYERp pp, char *cheat_string) PutStringInfo(pp, ds); } -VOID ItemCheat(PLAYERp pp, char *cheat_string) +void ItemCheat(PLAYERp pp, char *cheat_string) { // // Get all ITEMS @@ -231,7 +231,7 @@ VOID ItemCheat(PLAYERp pp, char *cheat_string) PlayerUpdateKeys(pp); } -VOID EveryCheatToggle(PLAYERp pp, char *cheat_string) +void EveryCheatToggle(PLAYERp pp, char *cheat_string) { EveryCheat ^= 1; @@ -243,18 +243,18 @@ VOID EveryCheatToggle(PLAYERp pp, char *cheat_string) 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, &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); } -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); } @@ -316,9 +316,9 @@ CHEAT_INFO ci[] = // !JIM! My simplified version of CheatInput which simply processes MessageInputString void CheatInput(void) { - static BOOL cur_show; + static SWBOOL cur_show; int ret; - BOOL match = FALSE; + SWBOOL match = FALSE; unsigned int i; //if (CommEnabled) @@ -382,10 +382,10 @@ void CheatInput(void) /* OLD CODE void CheatInput(void) { - static BOOL cur_show; + static SWBOOL cur_show; signed char MNU_InputString(char *, short); int ret; - BOOL match = FALSE; + SWBOOL match = FALSE; short i; // don't use InputMode here - its set for CheatInputMode diff --git a/polymer/eduke32/source/sw/src/colormap.c b/polymer/eduke32/source/sw/src/colormap.c index f83d7f9f5..e66b5287b 100644 --- a/polymer/eduke32/source/sw/src/colormap.c +++ b/polymer/eduke32/source/sw/src/colormap.c @@ -33,7 +33,7 @@ short f_c = 3; static unsigned char tempbuf[256]; unsigned char DefaultPalette[256 * 32]; #if 1 -VOID +void MapColors(short num, COLOR_MAP cm, short create) { int i; @@ -56,7 +56,7 @@ MapColors(short num, COLOR_MAP cm, short create) tempbuf[i + cm.FromColor] = (i*inc) + cm.ToColor; } #else -VOID +void MapColors(short num, COLOR_MAP cm, short create) { int i; @@ -155,8 +155,8 @@ static COLOR_MAP PlayerColorMap[PLAYER_COLOR_MAPS][1] = }; -VOID -InitPalette(VOID) +void +InitPalette(void) { static COLOR_MAP AllToRed[] = { @@ -415,7 +415,7 @@ VBE_setPalette(0, 256, mypalette); #define NRED 2 #define NRESERVED 3 -VOID SetPaletteToVESA(unsigned char *pal) +void SetPaletteToVESA(unsigned char *pal) { /* char pal_buff[1024]; @@ -435,12 +435,12 @@ VOID SetPaletteToVESA(unsigned char *pal) // fprintf(stderr,"SetPaletteToVESA() called\n"); } -VOID set_pal(unsigned char *pal) +void set_pal(unsigned char *pal) { SetPaletteToVESA(pal); } -VOID GetPaletteFromVESA(unsigned char *pal) +void GetPaletteFromVESA(unsigned char *pal) { /* char pal_buff[1024]; diff --git a/polymer/eduke32/source/sw/src/config.c b/polymer/eduke32/source/sw/src/config.c index fdaef0b7f..5a94d8b28 100644 --- a/polymer/eduke32/source/sw/src/config.c +++ b/polymer/eduke32/source/sw/src/config.c @@ -48,57 +48,57 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "_functio.h" #include "_config.h" -extern void ReadGameSetup(int32 scripthandle); -extern void WriteGameSetup(int32 scripthandle); +extern void ReadGameSetup(int32_t scripthandle); +extern void WriteGameSetup(int32_t scripthandle); // // Comm variables // char CommPlayerName[32]; -int32 NumberPlayers,CommPort,PortSpeed,IrqNumber,UartAddress; +int32_t NumberPlayers,CommPort,PortSpeed,IrqNumber,UartAddress; // // Sound variables // -int32 FXDevice = 0; -int32 MusicDevice = 0; -int32 NumVoices = 32; -int32 NumChannels = 2; -int32 NumBits = 16; -int32 MixRate = 44100; +int32_t FXDevice = 0; +int32_t MusicDevice = 0; +int32_t NumVoices = 32; +int32_t NumChannels = 2; +int32_t NumBits = 16; +int32_t MixRate = 44100; -int32 UseMouse = 1, UseJoystick = 0; +int32_t UseMouse = 1, UseJoystick = 0; -byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; -int32 MouseButtons[MAXMOUSEBUTTONS]; -int32 MouseButtonsClicked[MAXMOUSEBUTTONS]; -int32 MouseDigitalAxes[MAXMOUSEAXES][2]; -int32 MouseAnalogAxes[MAXMOUSEAXES]; -int32 MouseAnalogScale[MAXMOUSEAXES]; -int32 JoystickButtons[MAXJOYBUTTONS]; -int32 JoystickButtonsClicked[MAXJOYBUTTONS]; -int32 JoystickDigitalAxes[MAXJOYAXES][2]; -int32 JoystickAnalogAxes[MAXJOYAXES]; -int32 JoystickAnalogScale[MAXJOYAXES]; -int32 JoystickAnalogDead[MAXJOYAXES]; -int32 JoystickAnalogSaturate[MAXJOYAXES]; +uint8_t KeyboardKeys[NUMGAMEFUNCTIONS][2]; +int32_t MouseButtons[MAXMOUSEBUTTONS]; +int32_t MouseButtonsClicked[MAXMOUSEBUTTONS]; +int32_t MouseDigitalAxes[MAXMOUSEAXES][2]; +int32_t MouseAnalogAxes[MAXMOUSEAXES]; +int32_t MouseAnalogScale[MAXMOUSEAXES]; +int32_t JoystickButtons[MAXJOYBUTTONS]; +int32_t JoystickButtonsClicked[MAXJOYBUTTONS]; +int32_t JoystickDigitalAxes[MAXJOYAXES][2]; +int32_t JoystickAnalogAxes[MAXJOYAXES]; +int32_t JoystickAnalogScale[MAXJOYAXES]; +int32_t JoystickAnalogDead[MAXJOYAXES]; +int32_t JoystickAnalogSaturate[MAXJOYAXES]; // // Screen variables // -int32 ScreenMode = 1; -int32 ScreenWidth = 640; -int32 ScreenHeight = 480; -int32 ScreenBPP = 8; -int32 ForceSetup = 1; +int32_t ScreenMode = 1; +int32_t ScreenWidth = 640; +int32_t ScreenHeight = 480; +int32_t ScreenBPP = 8; +int32_t ForceSetup = 1; extern char WangBangMacro[10][64]; char RTSName[MAXRTSNAMELENGTH]; //static 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; for (i=0; i= (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")) { @@ -173,7 +173,7 @@ int32 CONFIG_AnalogNameToNum(const char *func) return -1; } -const char *CONFIG_AnalogNumToName(int32 func) +const char *CONFIG_AnalogNumToName(int32_t func) { switch (func) { @@ -202,8 +202,8 @@ const char *CONFIG_AnalogNumToName(int32 func) void CONFIG_SetDefaults(void) { // JBF 20031211 - int32 i,f; - byte k1,k2; + int32_t i,f; + uint8_t k1,k2; ScreenMode = 1; ScreenWidth = 640; @@ -248,14 +248,14 @@ void CONFIG_SetDefaults(void) memset(JoystickButtons, -1, sizeof(JoystickButtons)); 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]); JoystickButtonsClicked[i] = CONFIG_FunctionNameToNum(joystickclickeddefaults[i]); } 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; 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 numkeyentries; - int32 function; + int32_t i; + int32_t numkeyentries; + int32_t function; char keyname1[80]; char keyname2[80]; kb_scancode key1,key2; @@ -374,11 +374,11 @@ void CONFIG_ReadKeys(int32 scripthandle) key2 = 0xff; if (keyname1[0]) { - key1 = (byte) KB_StringToScanCode(keyname1); + key1 = (uint8_t) KB_StringToScanCode(keyname1); } if (keyname2[0]) { - key2 = (byte) KB_StringToScanCode(keyname2); + key2 = (uint8_t) KB_StringToScanCode(keyname2); } KeyboardKeys[function][0] = key1; KeyboardKeys[function][1] = key2; @@ -404,10 +404,10 @@ void CONFIG_ReadKeys(int32 scripthandle) void CONFIG_SetupMouse(void) { - int32 i; + int32_t i; char str[80],*p; char temp[80]; - int32 function, scale; + int32_t function, scale; if (scripthandle < 0) return; @@ -473,10 +473,10 @@ void CONFIG_SetupMouse(void) void CONFIG_SetupJoystick(void) { - int32 i; + int32_t i; char str[80],*p; char temp[80]; - int32 function, scale; + int32_t function, scale; 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; extern char ds[]; extern char PlayerNameArg[32]; @@ -570,7 +570,7 @@ int32 CONFIG_ReadSetup(void) if (ScreenBPP < 8) ScreenBPP = 8; #ifdef RENDERTYPEWIN - SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32 *)&maxrefreshfreq); + SCRIPT_GetNumber(scripthandle, "Screen Setup", "MaxRefreshFreq", (int32_t *)&maxrefreshfreq); #endif SCRIPT_GetNumber(scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode); @@ -627,7 +627,7 @@ int32 CONFIG_ReadSetup(void) void CONFIG_WriteSetup(void) { - int32 dummy; + int32_t dummy; char buf[80]; if (scripthandle < 0) diff --git a/polymer/eduke32/source/sw/src/config.h b/polymer/eduke32/source/sw/src/config.h index f396235ee..303384e5d 100644 --- a/polymer/eduke32/source/sw/src/config.h +++ b/polymer/eduke32/source/sw/src/config.h @@ -35,44 +35,44 @@ extern "C" { #define SETUPNAMEPARM "SETUPFILE" // screen externs -extern int32 ScreenMode; // Screen mode -extern int32 ScreenWidth; -extern int32 ScreenHeight; -extern int32 ScreenBPP; -extern int32 ScreenBufferMode; -extern int32 VesaBufferMode; -extern int32 ForceSetup; +extern int32_t ScreenMode; // Screen mode +extern int32_t ScreenWidth; +extern int32_t ScreenHeight; +extern int32_t ScreenBPP; +extern int32_t ScreenBufferMode; +extern int32_t VesaBufferMode; +extern int32_t ForceSetup; // sound externs -extern int32 FXDevice; // Sound FX Card number -extern int32 MusicDevice; // Music Card number -extern int32 FXVolume; // FX Volume -extern int32 MusicVolume; // Music Volume -extern int32 NumVoices; // Number of voices -extern int32 NumChannels; // Number of channels -extern int32 NumBits; // Number of bits -extern int32 MixRate; // Mixing rate -extern int32 MidiPort; // Midi Port -extern int32 ReverseStereo; // Reverse Stereo Channels +extern int32_t FXDevice; // Sound FX Card number +extern int32_t MusicDevice; // Music Card number +extern int32_t FXVolume; // FX Volume +extern int32_t MusicVolume; // Music Volume +extern int32_t NumVoices; // Number of voices +extern int32_t NumChannels; // Number of channels +extern int32_t NumBits; // Number of bits +extern int32_t MixRate; // Mixing rate +extern int32_t MidiPort; // Midi Port +extern int32_t ReverseStereo; // Reverse Stereo Channels // comm externs -extern int32 ComPort; -extern int32 IrqNumber; -extern int32 UartAddress; -extern int32 PortSpeed; +extern int32_t ComPort; +extern int32_t IrqNumber; +extern int32_t UartAddress; +extern int32_t PortSpeed; -extern int32 ToneDial; +extern int32_t ToneDial; extern char ModemName[MAXMODEMSTRING]; extern char InitString[MAXMODEMSTRING]; extern char HangupString[MAXMODEMSTRING]; extern char DialoutString[MAXMODEMSTRING]; -extern int32 SocketNumber; +extern int32_t SocketNumber; extern char CommbatMacro[MAXMACROS][MAXMACROLENGTH]; extern char PhoneNames[MAXPHONEENTRIES][PHONENAMELENGTH]; extern char PhoneNumbers[MAXPHONEENTRIES][PHONENUMBERLENGTH]; extern char PhoneNumber[PHONENUMBERLENGTH]; -extern int32 NumberPlayers; -extern int32 ConnectType; +extern int32_t NumberPlayers; +extern int32_t ConnectType; extern char PlayerName[MAXPLAYERNAMELENGTH]; extern char RTSName[MAXRTSNAMELENGTH]; extern char UserLevel[MAXUSERLEVELNAMELENGTH]; @@ -80,31 +80,31 @@ extern char RTSPath[MAXRTSPATHLENGTH]; extern char UserPath[MAXUSERLEVELPATHLENGTH]; // controller externs -extern int32 UseMouse, UseJoystick; -extern int32 JoystickPort; -extern int32 MouseSensitivity; -extern int32 MouseAiming; -extern int32 MouseAimingFlipped; +extern int32_t UseMouse, UseJoystick; +extern int32_t JoystickPort; +extern int32_t MouseSensitivity; +extern int32_t MouseAiming; +extern int32_t MouseAimingFlipped; -extern byte KeyboardKeys[NUMGAMEFUNCTIONS][2]; +extern uint8_t KeyboardKeys[NUMGAMEFUNCTIONS][2]; -extern int32 MouseButtons[MAXMOUSEBUTTONS]; -extern int32 MouseButtonsClicked[MAXMOUSEBUTTONS]; +extern int32_t MouseButtons[MAXMOUSEBUTTONS]; +extern int32_t MouseButtonsClicked[MAXMOUSEBUTTONS]; -extern int32 JoystickButtons[MAXJOYBUTTONS]; -extern int32 JoystickButtonsClicked[MAXJOYBUTTONS]; +extern int32_t JoystickButtons[MAXJOYBUTTONS]; +extern int32_t JoystickButtonsClicked[MAXJOYBUTTONS]; -extern int32 MouseAnalogAxes[MAXMOUSEAXES]; -extern int32 JoystickAnalogAxes[MAXJOYAXES]; -extern int32 MouseAnalogScale[MAXMOUSEAXES]; -extern int32 JoystickAnalogScale[MAXJOYAXES]; -extern int32 JoystickAnalogDead[MAXJOYAXES]; -extern int32 JoystickAnalogSaturate[MAXJOYAXES]; +extern int32_t MouseAnalogAxes[MAXMOUSEAXES]; +extern int32_t JoystickAnalogAxes[MAXJOYAXES]; +extern int32_t MouseAnalogScale[MAXMOUSEAXES]; +extern int32_t JoystickAnalogScale[MAXJOYAXES]; +extern int32_t JoystickAnalogDead[MAXJOYAXES]; +extern int32_t JoystickAnalogSaturate[MAXJOYAXES]; -extern int32 EnableRudder; +extern int32_t EnableRudder; -extern int32 MouseDigitalAxes[MAXMOUSEAXES][2]; -extern int32 JoystickDigitalAxes[MAXJOYAXES][2]; +extern int32_t MouseDigitalAxes[MAXMOUSEAXES][2]; +extern int32_t JoystickDigitalAxes[MAXJOYAXES][2]; extern char setupfilename[64]; extern char ExternalControlFilename[64]; @@ -115,17 +115,17 @@ void SetMouseDefaults(int style); void SetJoystickDefaults(void); void SetDefaultKeyDefinitions(int style); -int32 CONFIG_ReadSetup(void); +int32_t CONFIG_ReadSetup(void); void CONFIG_SetupMouse(void); void CONFIG_SetupJoystick(void); void CONFIG_WriteSetup(void); -void WriteCommitFile(int32 gametype); +void WriteCommitFile(int32_t gametype); void CONFIG_GetSetupFilename(void); -const char *CONFIG_FunctionNumToName(int32 func); -int32 CONFIG_FunctionNameToNum(const char *func); -const char *CONFIG_AnalogNumToName(int32 func); -int32 CONFIG_AnalogNameToNum(const char *func); +const char *CONFIG_FunctionNumToName(int32_t func); +int32_t CONFIG_FunctionNameToNum(const char *func); +const char *CONFIG_AnalogNumToName(int32_t func); +int32_t CONFIG_AnalogNameToNum(const char *func); #ifdef __cplusplus }; diff --git a/polymer/eduke32/source/sw/src/console.c b/polymer/eduke32/source/sw/src/console.c index 94f5fdc1c..3d50d3bd1 100644 --- a/polymer/eduke32/source/sw/src/console.c +++ b/polymer/eduke32/source/sw/src/console.c @@ -60,13 +60,13 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define MAX_CONSOLE_COMMANDS 100 #define MAX_HISTORY 20 -BOOL SpriteInfo = FALSE; -extern BOOL QuitFlag; +SWBOOL SpriteInfo = FALSE; +extern SWBOOL QuitFlag; // FUNCTION PROTOTYPES /////////////////////////////////////////////////////////////////////// void CON_ProcessOptions(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); // Modify actor routines @@ -167,15 +167,15 @@ CON_COMMAND pre_commands[] = CON_COMMAND commandlist[MAX_CONSOLE_COMMANDS]; // Console command array 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 -SHORT curr_history=0; // Line currently being pointed to in the history array -SHORT numhistory=0; +int16_t curr_history=0; // Line currently being pointed to in the history array +int16_t numhistory=0; // Array which stores all the user arguments passed into the game. 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 @@ -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. // -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 *cp2 = str2; @@ -208,7 +208,7 @@ BYTE CON_CommandCmp(const char *str1, const char *str2, int len) return TRUE; } -BOOL IsCommand(char *str) +SWBOOL IsCommand(char *str) { int i; 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 // -BOOL CON_CheckParm(const char *userarg) +SWBOOL CON_CheckParm(const char *userarg) { - SHORT i; + int16_t i; for (i=0; i 6144) { @@ -467,7 +467,7 @@ void CON_GetHelp(void) void CON_ModXrepeat(void) { char base[80]; - SHORT op1=64,op2=-1,op3=-1; + int16_t op1=64,op2=-1,op3=-1; short i; @@ -515,7 +515,7 @@ void CON_ModXrepeat(void) void CON_ModYrepeat(void) { char base[80]; - SHORT op1=64,op2=-1,op3=-1; + int16_t op1=64,op2=-1,op3=-1; short i; @@ -563,7 +563,7 @@ void CON_ModYrepeat(void) void CON_ModTranslucent(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; SPRITEp sp; USERp u; @@ -597,7 +597,7 @@ void CON_SoundTest(void) int handle; int zero=0; char base[80]; - SHORT op1=0; + int16_t op1=0; // Format: sound [number] if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2) @@ -620,7 +620,7 @@ void CON_SoundTest(void) void CON_Reverb(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; PLAYERp pp = Player + screenpeek; // Format: reverb [number] @@ -1008,7 +1008,7 @@ void CON_SpriteInfo(void) void CON_KillSprite(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; SPRITEp sp; short i; USERp u; @@ -1044,7 +1044,7 @@ void CON_KillSprite(void) void CON_SpriteDetail(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; SPRITEp sp; short i; @@ -1073,7 +1073,7 @@ void CON_SpriteDetail(void) void CON_UserDetail(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; SPRITEp sp; short i; USERp u; @@ -1195,7 +1195,7 @@ void CON_DamageData(void) { char base[80],field[80]; - SHORT op1=0; + int16_t op1=0; unsigned int op2, i; SPRITEp sp; USERp u; @@ -1263,7 +1263,7 @@ void CON_DamageData(void) void CON_WinPachinko(void) { - extern BOOL Pachinko_Win_Cheat; + extern SWBOOL Pachinko_Win_Cheat; PLAYERp pp = Player + myconnectindex; extern void CheckSndData(char *file, int line); @@ -1389,7 +1389,7 @@ void CON_DumpHeap(void) void CON_ShowMirror(void) { char base[80]; - SHORT op1=0; + int16_t op1=0; // Format: showmirror [SpriteNum] if (sscanf(MessageInputString,"%s %hd",base,&op1) < 2) diff --git a/polymer/eduke32/source/sw/src/coolie.c b/polymer/eduke32/source/sw/src/coolie.c index 0f830fc9d..7c9f655f1 100644 --- a/polymer/eduke32/source/sw/src/coolie.c +++ b/polymer/eduke32/source/sw/src/coolie.c @@ -403,7 +403,7 @@ ACTOR_ACTION_SET CoolieActionSet = 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]; SPRITEp sp = &sprite[SpriteNum]; @@ -411,7 +411,7 @@ VOID EnemyDefaults(short SpriteNum, ACTOR_ACTION_SETp action, PERSONALITYp perso short wpn_cnt; short depth = 0; extern short TotalKillable; - extern BOOL DebugSecret; + extern SWBOOL DebugSecret; switch (u->ID) { diff --git a/polymer/eduke32/source/sw/src/demo.c b/polymer/eduke32/source/sw/src/demo.c index 1cda6dee9..f938d5822 100644 --- a/polymer/eduke32/source/sw/src/demo.c +++ b/polymer/eduke32/source/sw/src/demo.c @@ -46,29 +46,29 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms DFILE DemoFileIn = DF_ERR; FILE *DemoFileOut; -BOOL DemoPlaying = FALSE; -BOOL DemoRecording = FALSE; -BOOL DemoEdit = FALSE; -BOOL DemoMode = FALSE; -BOOL DemoModeMenuState = FALSE; -BOOL DemoOverride = FALSE; +SWBOOL DemoPlaying = FALSE; +SWBOOL DemoRecording = FALSE; +SWBOOL DemoEdit = FALSE; +SWBOOL DemoMode = FALSE; +SWBOOL DemoModeMenuState = FALSE; +SWBOOL DemoOverride = FALSE; char DemoFileName[16] = "demo.dmo"; char DemoLevelName[16] = ""; -extern BOOL NewGame; +extern SWBOOL NewGame; // Demo sync stuff FILE *DemoSyncFile; -BOOL DemoSyncTest = FALSE, DemoSyncRecord = FALSE; +SWBOOL DemoSyncTest = FALSE, DemoSyncRecord = FALSE; char DemoTmpName[16] = ""; SW_PACKET DemoBuffer[DEMO_BUFFER_MAX]; int DemoRecCnt = 0; // Can only record 1-player game -BOOL DemoDone; +SWBOOL DemoDone; -VOID DemoWriteHeader(VOID); -VOID DemoReadHeader(VOID); -VOID DemoReadBuffer(VOID); +void DemoWriteHeader(void); +void DemoReadHeader(void); +void DemoReadBuffer(void); // @@ -76,15 +76,15 @@ VOID DemoReadBuffer(VOID); // // DemoDebugMode will close the file after every write -BOOL DemoDebugMode = FALSE; -//BOOL DemoDebugMode = TRUE; -BOOL DemoInitOnce = FALSE; +SWBOOL DemoDebugMode = FALSE; +//SWBOOL DemoDebugMode = TRUE; +SWBOOL DemoInitOnce = FALSE; short DemoDebugBufferMax = 1; extern char LevelName[]; extern char LevelSong[16]; -extern BYTE FakeMultiNumPlayers; -extern BOOL QuitFlag; +extern uint8_t FakeMultiNumPlayers; +extern SWBOOL QuitFlag; /////////////////////////////////////////// // @@ -92,7 +92,7 @@ extern BOOL QuitFlag; // /////////////////////////////////////////// -char *DemoSyncFileName(VOID) +char *DemoSyncFileName(void) { static char file_name[32]; char *ptr; @@ -110,8 +110,8 @@ char *DemoSyncFileName(VOID) return file_name; } -VOID -DemoSetup(VOID) +void +DemoSetup(void) { if (DemoRecording) { @@ -135,8 +135,8 @@ DemoSetup(VOID) } } -VOID -DemoRecordSetup(VOID) +void +DemoRecordSetup(void) { if (DemoRecording) { @@ -148,8 +148,8 @@ DemoRecordSetup(VOID) } } -VOID -DemoPlaySetup(VOID) +void +DemoPlaySetup(void) { if (DemoPlaying) { @@ -164,8 +164,8 @@ DemoPlaySetup(VOID) } } -VOID -DemoWriteHeader(VOID) +void +DemoWriteHeader(void) { DEMO_HEADER dh; DEMO_START_POS dsp; @@ -207,8 +207,8 @@ DemoWriteHeader(VOID) } } -VOID -DemoReadHeader(VOID) +void +DemoReadHeader(void) { DEMO_HEADER dh; DEMO_START_POS dsp; @@ -262,8 +262,8 @@ DemoReadHeader(VOID) DREAD(&gNet, sizeof(gNet), 1, DemoFileIn); } -VOID -DemoDebugWrite(VOID) +void +DemoDebugWrite(void) { int size; @@ -278,22 +278,22 @@ DemoDebugWrite(VOID) fclose(DemoFileOut); } -VOID -DemoWriteBuffer(VOID) +void +DemoWriteBuffer(void) { fwrite(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileOut); memset(&DemoBuffer, -1, sizeof(DemoBuffer)); } -VOID -DemoReadBuffer(VOID) +void +DemoReadBuffer(void) { memset(&DemoBuffer, -1, sizeof(DemoBuffer)); DREAD(&DemoBuffer, sizeof(DemoBuffer), 1, DemoFileIn); } -VOID -DemoBackupBuffer(VOID) +void +DemoBackupBuffer(void) { #if DEMO_FILE_TYPE != DEMO_FILE_GROUP FILE *NewDemoFile; @@ -324,8 +324,8 @@ DemoBackupBuffer(VOID) #endif } -VOID -DemoTerm(VOID) +void +DemoTerm(void) { if (DemoRecording) { @@ -379,8 +379,8 @@ DemoTerm(VOID) /////////////////////////////////////////// -VOID -DemoPlayBack(VOID) +void +DemoPlayBack(void) { int pnum, cnt; static int buf_ndx; @@ -582,8 +582,8 @@ DemoPlayBack(VOID) // Still using old method of playback - this was for opening demo // -VOID -ScenePlayBack(VOID) +void +ScenePlayBack(void) { int buf_ndx, pnum, cnt; PLAYERp pp; diff --git a/polymer/eduke32/source/sw/src/demo.h b/polymer/eduke32/source/sw/src/demo.h index 51a073163..6441e1f15 100644 --- a/polymer/eduke32/source/sw/src/demo.h +++ b/polymer/eduke32/source/sw/src/demo.h @@ -25,21 +25,21 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //------------------------------------------------------------------------- extern FILE *DemoFile; -extern BOOL DemoPlaying; -extern BOOL DemoRecording; -extern BOOL DemoEdit; -extern BOOL DemoMode; -extern BOOL DemoOverride; +extern SWBOOL DemoPlaying; +extern SWBOOL DemoRecording; +extern SWBOOL DemoEdit; +extern SWBOOL DemoMode; +extern SWBOOL DemoOverride; extern char DemoFileName[16]; extern char DemoLevelName[16]; extern FILE *DemoSyncFile; -extern BOOL DemoSyncTest; -extern BOOL DemoSyncRecord; +extern SWBOOL DemoSyncTest; +extern SWBOOL DemoSyncRecord; extern char DemoTmpName[16]; -extern BOOL DemoDebugMode; -extern BOOL DemoInitOnce; +extern SWBOOL DemoDebugMode; +extern SWBOOL DemoInitOnce; extern short DemoDebugBufferMax; #define DEMO_BUFFER_MAX 2048 diff --git a/polymer/eduke32/source/sw/src/digi.h b/polymer/eduke32/source/sw/src/digi.h index bb4db16cb..4e6e34e1e 100644 --- a/polymer/eduke32/source/sw/src/digi.h +++ b/polymer/eduke32/source/sw/src/digi.h @@ -462,7 +462,7 @@ DIGI_ENTRY("UNLOCK.VOC", DIGI_UNLOCK, 209, PRI_ENVIRONMENT, // SQUEAKY VALVE TURNING 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) 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) diff --git a/polymer/eduke32/source/sw/src/draw.c b/polymer/eduke32/source/sw/src/draw.c index 023bbe5c3..73365a1bf 100644 --- a/polymer/eduke32/source/sw/src/draw.c +++ b/polymer/eduke32/source/sw/src/draw.c @@ -55,27 +55,27 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" static int OverlapDraw = FALSE; -extern BOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet; -extern BOOL Voxel; +extern SWBOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet; +extern SWBOOL Voxel; extern char tempbuf[]; extern char buffer[]; -BOOL DrawScreen; +SWBOOL DrawScreen; extern short f_c; -extern BOOL HelpInputMode; +extern SWBOOL HelpInputMode; extern short HelpPage; extern short HelpPagePic[]; extern ParentalStruct aVoxelArray[MAXTILES]; -extern BOOL RedrawScreen; -BOOL RedrawCompass=FALSE; +extern SWBOOL RedrawScreen; +SWBOOL RedrawCompass=FALSE; extern int Follow_posx,Follow_posy; int ConnectCopySprite(SPRITEp tsp); void PreDrawStackedWater(void); -VOID DrawCompass(PLAYERp pp); +void DrawCompass(PLAYERp pp); #if 1 -VOID +void ShadeSprite(SPRITEp tsp) { // set shade of sprite @@ -236,7 +236,7 @@ DoShadowFindGroundPoint(SPRITEp sp) int ceilhit, florhit; int hiz, loz = u->loz; short save_cstat, bak_cstat; - BOOL found = FALSE; + SWBOOL found = FALSE; // recursive routine to find the ground - either sector or floor sprite // skips over enemy and other types of sprites @@ -290,8 +290,8 @@ DoShadowFindGroundPoint(SPRITEp sp) #if 0 #define GENERIC_SHADOW_PIC 66 -extern BOOL bVoxelsOn; -VOID +extern SWBOOL bVoxelsOn; +void DoVoxelShadow(SPRITEp tspr) { // Check for voxels @@ -365,7 +365,7 @@ DoVoxelShadow(SPRITEp tspr) } #endif -VOID +void DoShadows(SPRITEp tsp, int viewz) { SPRITEp new = &tsprite[spritesortcnt]; @@ -460,7 +460,7 @@ DoShadows(SPRITEp tsp, int viewz) spritesortcnt++; } -VOID +void DoMotionBlur(SPRITEp tsp) { 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); sp->picnum = pic; } -VOID WarpCopySprite(VOID) +void WarpCopySprite(void) { SPRITEp new, sp1, sp2, sp; 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_StarStuck[], s_StarDownStuck[]; @@ -665,8 +665,8 @@ VOID DoStarView(SPRITEp tsp, USERp tu, int viewz) } } -VOID -analyzesprites(int viewx, int viewy, int viewz, BOOL mirror) +void +analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror) { int tSpriteNum, j, k; short SpriteNum, pnum; @@ -807,8 +807,8 @@ analyzesprites(int viewx, int viewy, int viewz, BOOL mirror) { // if sector pal is something other than default SECT_USERp sectu = SectUser[tsp->sectnum]; - BYTE pal = sector[tsp->sectnum].floorpal; - BOOL nosectpal=FALSE; + uint8_t pal = sector[tsp->sectnum].floorpal; + SWBOOL nosectpal=FALSE; // sprite does not take on the new pal if sector flag is set if (sectu && TEST(sectu->flags, SECTFU_DONT_COPY_PALETTE)) @@ -987,7 +987,7 @@ get_tsprite(short SpriteNum) return NULL; } -VOID +void post_analyzesprites(void) { int tSpriteNum; @@ -1035,7 +1035,7 @@ post_analyzesprites(void) } #endif -VOID +void ResizeView(PLAYERp pp) { if (MenuInputMode || InputMode || HelpInputMode || ConPanel || ConInputMode || PauseKeySet) @@ -1055,7 +1055,7 @@ ResizeView(PLAYERp pp) if (KEY_PRESSED(KEYSC_ESC)) { - extern BOOL ScrollMode2D; + extern SWBOOL ScrollMode2D; KEY_PRESSED(KEYSC_ESC) = 0; dimensionmode = 3; @@ -1085,11 +1085,11 @@ ResizeView(PLAYERp pp) } // !JIM! 08/06 -extern BOOL UsingMenus; +extern SWBOOL UsingMenus; #if 0 -VOID -ViewOutsidePlayerRecurse(PLAYERp pp, LONGp vx, LONGp vy, LONGp vz, SHORTp ang, SHORTp vsectnum) +void +ViewOutsidePlayerRecurse(PLAYERp pp, int32_t* vx, int32_t* vy, int32_t* vz, int16_t* ang, int16_t* vsectnum) { int nx, ny; int ret; @@ -1370,7 +1370,7 @@ CircleCamera(int *nx, int *ny, int *nz, short *vsect, short *nang, short horiz) *nang = ang; } -VOID PrintLocationInfo(PLAYERp pp) +void PrintLocationInfo(PLAYERp pp) { #define Y_STEP 7 #define AVERAGEFRAMES 16 @@ -1405,15 +1405,15 @@ VOID PrintLocationInfo(PLAYERp pp) sprintf(buffer, "POSZ:%d", pp->posz); printext256(x, y, 1, -1, buffer, 1); 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); y += Y_STEP; } } } -BOOL DebugSecret = FALSE; -VOID SecretInfo(PLAYERp pp) +SWBOOL DebugSecret = FALSE; +void SecretInfo(PLAYERp pp) { #define Y_STEP 7 #define AVERAGEFRAMES 16 @@ -1437,7 +1437,7 @@ VOID SecretInfo(PLAYERp pp) } } -VOID PrintSpriteInfo(PLAYERp pp) +void PrintSpriteInfo(PLAYERp pp) { #define Y_STEP 7 int x = windowx1+2; @@ -1500,7 +1500,7 @@ VOID PrintSpriteInfo(PLAYERp pp) sprintf(buffer, "POSZ:%d", sp->z); printext256(x, y, 1, -1, buffer, 1); 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); 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; int i; @@ -1666,7 +1666,7 @@ void ResChange(void) } #endif -VOID ScreenCaptureKeys(VOID) +void ScreenCaptureKeys(void) { if (ConPanel) return; @@ -1682,10 +1682,10 @@ VOID ScreenCaptureKeys(VOID) } } -VOID DrawCheckKeys(PLAYERp pp) +void DrawCheckKeys(PLAYERp pp) { - extern BOOL ResCheat; - extern BOOL PauseKeySet; + extern SWBOOL ResCheat; + extern SWBOOL PauseKeySet; /* 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) @@ -1710,10 +1710,10 @@ VOID DrawCheckKeys(PLAYERp pp) } #if 0 -VOID DrawMessageInput(PLAYERp pp) +void DrawMessageInput(PLAYERp pp) { short w,h; - static BOOL cur_show; + static SWBOOL cur_show; short c; // Used to make cursor fade in and out @@ -1739,10 +1739,10 @@ VOID DrawMessageInput(PLAYERp pp) } } #else -VOID DrawMessageInput(PLAYERp pp) +void DrawMessageInput(PLAYERp pp) { short w,h; - static BOOL cur_show; + static SWBOOL cur_show; short c; // Used to make cursor fade in and out @@ -1767,12 +1767,12 @@ VOID DrawMessageInput(PLAYERp pp) } #endif -VOID DrawConInput(PLAYERp pp) +void DrawConInput(PLAYERp pp) { #define PANELINPUTX 30 #define PANELINPUTY 100 short w,h; - static BOOL cur_show; + static SWBOOL cur_show; short c; // 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 BOOL DemoMode,CameraTestMode; + extern SWBOOL DemoMode,CameraTestMode; if (!gs.Crosshair) return; @@ -1891,10 +1891,10 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, short *t int i,nexti; short ang; SPRITEp sp; - BOOL found_camera = FALSE; - BOOL player_in_camera = FALSE; - BOOL FAFcansee_test; - BOOL ang_test; + SWBOOL found_camera = FALSE; + SWBOOL player_in_camera = FALSE; + SWBOOL FAFcansee_test; + SWBOOL ang_test; if (pp == &Player[screenpeek]) { @@ -2002,8 +2002,8 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, short *t } } -VOID -PreDraw(VOID) +void +PreDraw(void) { short i, nexti; @@ -2015,8 +2015,8 @@ PreDraw(VOID) } } -VOID -PostDraw(VOID) +void +PostDraw(void) { short i, nexti; 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; -VOID +void drawscreen(PLAYERp pp) { - extern BOOL DemoMode,CameraTestMode; + extern SWBOOL DemoMode,CameraTestMode; int tx, ty, tz,thoriz,pp_siz; short tang,tsectnum; short i,j; @@ -2255,10 +2255,10 @@ drawscreen(PLAYERp pp) int bob_amt = 0; int quake_z, quake_x, quake_y; short quake_ang; - BOOL PicInView(short, BOOL); - extern BOOL FAF_DebugView; + SWBOOL PicInView(short, SWBOOL); + extern SWBOOL FAF_DebugView; PLAYERp camerapp; // prediction player if prediction is on, else regular player - VOID DoPlayerDiveMeter(PLAYERp pp); + void DoPlayerDiveMeter(PLAYERp pp); // last valid stuff static short lv_sectnum = -1; @@ -2479,8 +2479,8 @@ drawscreen(PLAYERp pp) if ((dimensionmode == 5 || dimensionmode == 6) && pp == Player+myconnectindex) { - VOID MoveScrollMode2D(PLAYERp pp); - extern BOOL ScrollMode2D; + void MoveScrollMode2D(PLAYERp pp); + extern SWBOOL ScrollMode2D; if (ScrollMode2D) { @@ -2575,7 +2575,7 @@ drawscreen(PLAYERp pp) DrawScreen = FALSE; } -VOID +void DrawCompass(PLAYERp pp) { #define COMPASS_TIC 2380 @@ -2637,7 +2637,7 @@ DrawCompass(PLAYERp pp) 25, 19, 15, 9, 1, 1, 9, 15, 19, 25 }; - extern BOOL PanelUpdateMode; + extern SWBOOL PanelUpdateMode; if (!PanelUpdateMode) return; @@ -2671,12 +2671,12 @@ DrawCompass(PLAYERp pp) } -VOID ScreenTileLock(void) +void ScreenTileLock(void) { walock[SAVE_SCREEN_TILE] = CACHE_LOCK_MAX; } -VOID ScreenTileUnLock(void) +void ScreenTileUnLock(void) { walock[SAVE_SCREEN_TILE] = CACHE_UNLOCK_MAX; } diff --git a/polymer/eduke32/source/sw/src/game.c b/polymer/eduke32/source/sw/src/game.c index 648bec012..e44894d28 100644 --- a/polymer/eduke32/source/sw/src/game.c +++ b/polymer/eduke32/source/sw/src/game.c @@ -107,61 +107,61 @@ char DemoName[15][16]; //#define PLOCK_VERSION TRUE #if PLOCK_VERSION -BOOL Global_PLock = TRUE; +SWBOOL Global_PLock = TRUE; #else -BOOL Global_PLock = FALSE; +SWBOOL Global_PLock = FALSE; #endif int GameVersion = 13; // 12 was original source release. For future releases increment by two. char DemoText[3][64]; int DemoTextYstart = 0; -BOOL DoubleInitAWE32 = FALSE; +SWBOOL DoubleInitAWE32 = FALSE; int Follow_posx=0,Follow_posy=0; -BOOL NoMeters = FALSE; +SWBOOL NoMeters = FALSE; short IntroAnimCount = 0; short PlayingLevel = -1; -BOOL GraphicsMode = FALSE; +SWBOOL GraphicsMode = FALSE; char CacheLastLevel[32] = ""; char PlayerNameArg[32] = ""; -BOOL CleanExit = FALSE; +SWBOOL CleanExit = FALSE; extern char cachedebug; -BOOL DemoModeMenuInit = FALSE; -BOOL FinishAnim = 0; -BOOL CachePrintMode = FALSE; -BOOL ShortGameMode = FALSE; -BOOL ReloadPrompt = FALSE; -BOOL ReloadPromptMode = FALSE; -BOOL NewGame = TRUE; -BOOL InMenuLevel = FALSE; -BOOL LoadGameOutsideMoveLoop = FALSE; -BOOL LoadGameFromDemo = FALSE; -BOOL ArgCheat = FALSE; -extern BOOL NetBroadcastMode, NetModeOverride; -BOOL MultiPlayQuitFlag = FALSE; +SWBOOL DemoModeMenuInit = FALSE; +SWBOOL FinishAnim = 0; +SWBOOL CachePrintMode = FALSE; +SWBOOL ShortGameMode = FALSE; +SWBOOL ReloadPrompt = FALSE; +SWBOOL ReloadPromptMode = FALSE; +SWBOOL NewGame = TRUE; +SWBOOL InMenuLevel = FALSE; +SWBOOL LoadGameOutsideMoveLoop = FALSE; +SWBOOL LoadGameFromDemo = FALSE; +SWBOOL ArgCheat = FALSE; +extern SWBOOL NetBroadcastMode, NetModeOverride; +SWBOOL MultiPlayQuitFlag = FALSE; //Miscellaneous variables char MessageInputString[256]; char MessageOutputString[256]; -BOOL MessageInputMode = FALSE; -BOOL ConInputMode = FALSE; -BOOL ConPanel = FALSE; -BOOL FinishedLevel = FALSE; -BOOL HelpInputMode = FALSE; -BOOL PanelUpdateMode = TRUE; +SWBOOL MessageInputMode = FALSE; +SWBOOL ConInputMode = FALSE; +SWBOOL ConPanel = FALSE; +SWBOOL FinishedLevel = FALSE; +SWBOOL HelpInputMode = FALSE; +SWBOOL PanelUpdateMode = TRUE; short HelpPage = 0; short HelpPagePic[] = { 5115, 5116, 5117 }; -BOOL InputMode = FALSE; -BOOL MessageInput = FALSE; -extern BOOL GamePaused; +SWBOOL InputMode = FALSE; +SWBOOL MessageInput = FALSE; +extern SWBOOL GamePaused; short screenpeek = 0; -BOOL NoDemoStartup = FALSE; -BOOL FirstTimeIntoGame; -extern BYTE RedBookSong[40]; +SWBOOL NoDemoStartup = FALSE; +SWBOOL FirstTimeIntoGame; +extern uint8_t RedBookSong[40]; -BOOL BorderAdjust = TRUE; -BOOL LocationInfo = 0; -VOID drawoverheadmap(int cposx, int cposy, int czoom, short cang); +SWBOOL BorderAdjust = TRUE; +SWBOOL LocationInfo = 0; +void drawoverheadmap(int cposx, int cposy, int czoom, short cang); int DispFrameRate = FALSE; int DispMono = TRUE; int Fog = FALSE; @@ -174,9 +174,9 @@ short BetaVersion = 900; short TotalKillable; AUTO_NET Auto; -BOOL AutoNet = FALSE; -BOOL HasAutoColor = FALSE; -BYTE AutoColor; +SWBOOL AutoNet = FALSE; +SWBOOL HasAutoColor = FALSE; +uint8_t AutoColor; const GAME_SET gs_defaults = { @@ -224,36 +224,36 @@ const GAME_SET gs_defaults = GAME_SET gs; char PlaxBits = 0; -BOOL PlayerTrackingMode = FALSE; -BOOL PauseMode = FALSE; -BOOL PauseKeySet = FALSE; -BOOL SlowMode = FALSE; -BOOL FrameAdvanceTics = 3; -BOOL ScrollMode2D = FALSE; +SWBOOL PlayerTrackingMode = FALSE; +SWBOOL PauseMode = FALSE; +SWBOOL PauseKeySet = FALSE; +SWBOOL SlowMode = FALSE; +SWBOOL FrameAdvanceTics = 3; +SWBOOL ScrollMode2D = FALSE; -BOOL DebugSO = FALSE; -BOOL DebugPanel = FALSE; -BOOL DebugSector = FALSE; -BOOL DebugActor = FALSE; -BOOL DebugAnim = FALSE; -BOOL DebugOperate = FALSE; -BOOL DebugActorFreeze = FALSE; -VOID LoadingLevelScreen(char *level_name); +SWBOOL DebugSO = FALSE; +SWBOOL DebugPanel = FALSE; +SWBOOL DebugSector = FALSE; +SWBOOL DebugActor = FALSE; +SWBOOL DebugAnim = FALSE; +SWBOOL DebugOperate = FALSE; +SWBOOL DebugActorFreeze = FALSE; +void LoadingLevelScreen(char *level_name); -BYTE FakeMultiNumPlayers; +uint8_t FakeMultiNumPlayers; int totalsynctics; int turn_scale = 256; int move_scale = 256; short Level = 0; -BOOL ExitLevel = FALSE; -SHORT OrigCommPlayers=0; -extern BYTE CommPlayers; -extern BOOL CommEnabled; +SWBOOL ExitLevel = FALSE; +int16_t OrigCommPlayers=0; +extern uint8_t CommPlayers; +extern SWBOOL CommEnabled; extern int bufferjitter; -BOOL CameraTestMode = FALSE; +SWBOOL CameraTestMode = FALSE; char ds[256]; // debug string @@ -267,32 +267,32 @@ extern unsigned char palette_data[256][3]; // Global palette array #define ACT_STATUE 0 int score; -BOOL QuitFlag = FALSE; -BOOL InGame = FALSE; +SWBOOL QuitFlag = FALSE; +SWBOOL InGame = FALSE; -BOOL CommandSetup = FALSE; +SWBOOL CommandSetup = FALSE; char UserMapName[80]="", buffer[80], ch; char LevelName[20]; -BYTE DebugPrintColor = 255; +uint8_t DebugPrintColor = 255; int krandcount; /// L O C A L P R O T O T Y P E S ///////////////////////////////////////////////////////// void BOT_DeleteAllBots(void); -VOID BotPlayerInsert(PLAYERp pp); -VOID SybexScreen(VOID); -VOID DosScreen(VOID); -VOID MenuLevel(VOID); -VOID StatScreen(PLAYERp mpp); -VOID InitRunLevel(VOID); -VOID RunLevel(VOID); +void BotPlayerInsert(PLAYERp pp); +void SybexScreen(void); +void DosScreen(void); +void MenuLevel(void); +void StatScreen(PLAYERp mpp); +void InitRunLevel(void); +void RunLevel(void); ///////////////////////////////////////////////////////////////////////////////////////////// static FILE *debug_fout = NULL; -VOID DebugWriteString(char *string) +void DebugWriteString(char *string) { #if BETA || !DEBUG @@ -313,7 +313,7 @@ VOID DebugWriteString(char *string) fflush(debug_fout); } -VOID DebugWriteLoc(char *fname, int line) +void DebugWriteLoc(char *fname, int line) { #if BETA || !DEBUG @@ -340,16 +340,16 @@ void Mono_Print(char *str) } -extern BOOL DrawScreen; +extern SWBOOL DrawScreen; #if RANDOM_DEBUG FILE *fout_err; -BOOL RandomPrint; +SWBOOL RandomPrint; int krand1(char *file, unsigned line) { ASSERT(!DrawScreen); if (RandomPrint && !Prediction) { - extern ULONG MoveThingsCount; + extern uint32_t MoveThingsCount; sprintf(ds,"mtc %d, %s, line %d, %d",MoveThingsCount,file,line,randomseed); DebugWriteString(ds); } @@ -375,7 +375,7 @@ int krand1(void) #endif -VOID * +void * CacheAlloc(void **ptr, int size, unsigned char *lock_byte) { if (*ptr == NULL) @@ -394,7 +394,7 @@ CacheAlloc(void **ptr, int size, unsigned char *lock_byte) return *ptr; } -VOID +void CacheFree(void **ptr, unsigned char *lock_byte) { if (*ptr == NULL) @@ -440,15 +440,15 @@ void HeapCheck(char *file, int line) */ #if DEBUG -BOOL -ValidPtr(VOID *ptr) +SWBOOL +ValidPtr(void *ptr) { MEM_HDRp mhp; - BYTEp check; + uint8_t* check; ASSERT(ptr != NULL); - mhp = (MEM_HDRp)(((BYTEp) ptr) - sizeof(MEM_HDR)); + mhp = (MEM_HDRp)(((uint8_t*) ptr) - sizeof(MEM_HDR)); if (mhp->size == 0 || mhp->checksum == 0) { @@ -456,7 +456,7 @@ ValidPtr(VOID *ptr) return FALSE; } - check = (BYTEp) & mhp->size; + check = (uint8_t*) & mhp->size; if (mhp->checksum == check[0] + check[1] + check[2] + check[3]) return TRUE; @@ -465,32 +465,32 @@ ValidPtr(VOID *ptr) return FALSE; } -VOID -PtrCheckSum(VOID *ptr, unsigned int *stored, unsigned int *actual) +void +PtrCheckSum(void *ptr, unsigned int *stored, unsigned int *actual) { MEM_HDRp mhp; - BYTEp check; + uint8_t* check; ASSERT(ptr != NULL); - mhp = (MEM_HDRp)(((BYTEp) ptr) - sizeof(MEM_HDR)); + mhp = (MEM_HDRp)(((uint8_t*) ptr) - sizeof(MEM_HDR)); - check = (BYTEp) & mhp->size; + check = (uint8_t*) & mhp->size; *stored = mhp->checksum; *actual = check[0] + check[1] + check[2] + check[3]; } -VOID * +void * AllocMem(int size) { - BYTEp bp; + uint8_t* bp; MEM_HDRp mhp; - BYTEp check; + uint8_t* check; ASSERT(size != 0); - bp = (BYTEp) malloc(size + sizeof(MEM_HDR)); + bp = (uint8_t*) malloc(size + sizeof(MEM_HDR)); // Used for debugging, we can remove this at ship time if (bp == NULL) @@ -505,7 +505,7 @@ AllocMem(int size) mhp = (MEM_HDRp) bp; mhp->size = size; - check = (BYTEp) & mhp->size; + check = (uint8_t*) & mhp->size; mhp->checksum = check[0] + check[1] + check[2] + check[3]; bp += sizeof(MEM_HDR); @@ -513,27 +513,27 @@ AllocMem(int size) return bp; } -VOID * -ReAllocMem(VOID *ptr, int size) +void * +ReAllocMem(void *ptr, int size) { - BYTEp bp; + uint8_t* bp; MEM_HDRp mhp; - BYTEp check; + uint8_t* check; ASSERT(size != 0); ASSERT(ValidPtr(ptr)); - mhp = (MEM_HDRp)(((BYTEp) ptr) - sizeof(MEM_HDR)); + mhp = (MEM_HDRp)(((uint8_t*) ptr) - sizeof(MEM_HDR)); - bp = (BYTEp) realloc(mhp, size + sizeof(MEM_HDR)); + bp = (uint8_t*) realloc(mhp, size + sizeof(MEM_HDR)); ASSERT(bp != NULL); mhp = (MEM_HDRp) bp; mhp->size = size; - check = (BYTEp) & mhp->size; + check = (uint8_t*) & mhp->size; mhp->checksum = check[0] + check[1] + check[2] + check[3]; bp += sizeof(MEM_HDR); @@ -544,18 +544,18 @@ ReAllocMem(VOID *ptr, int size) } -VOID * +void * CallocMem(int size, int num) { - BYTEp bp; + uint8_t* bp; MEM_HDRp mhp; - BYTEp check; + uint8_t* check; int num_bytes; ASSERT(size != 0 && num != 0); num_bytes = (size * num) + sizeof(MEM_HDR); - bp = (BYTEp) calloc(num_bytes, 1); + bp = (uint8_t*) calloc(num_bytes, 1); // Used for debugging, we can remove this at ship time if (bp == NULL) @@ -570,7 +570,7 @@ CallocMem(int size, int num) mhp = (MEM_HDRp) bp; mhp->size = size; - check = (BYTEp) & mhp->size; + check = (uint8_t*) & mhp->size; mhp->checksum = check[0] + check[1] + check[2] + check[3]; bp += sizeof(MEM_HDR); @@ -578,18 +578,18 @@ CallocMem(int size, int num) return bp; } -VOID -FreeMem(VOID *ptr) +void +FreeMem(void *ptr) { MEM_HDRp mhp; - BYTEp check; + uint8_t* check; ASSERT(ptr != NULL); ASSERT(ValidPtr(ptr)); - mhp = (MEM_HDRp)(((BYTEp) ptr) - sizeof(MEM_HDR)); - check = (BYTEp)&mhp->size; + mhp = (MEM_HDRp)(((uint8_t*) ptr) - sizeof(MEM_HDR)); + check = (uint8_t*)&mhp->size; memset(mhp, 0xCC, mhp->size + sizeof(MEM_HDR)); @@ -597,32 +597,32 @@ FreeMem(VOID *ptr) } #else -BOOL -ValidPtr(VOID *ptr) +SWBOOL +ValidPtr(void *ptr) { return TRUE; } -VOID * +void * AllocMem(int size) { return malloc(size); } -VOID * +void * CallocMem(int size, int num) { return calloc(size, num); } -VOID * -ReAllocMem(VOID *ptr, int size) +void * +ReAllocMem(void *ptr, int size) { return realloc(ptr, size); } -VOID -FreeMem(VOID *ptr) +void +FreeMem(void *ptr) { free(ptr); } @@ -654,8 +654,8 @@ Distance(int x1, int y1, int x2, int y2) return x2 + y2 - DIV2(min); } -VOID -MapSetAll2D(BYTE fill) +void +MapSetAll2D(uint8_t fill) { int i; @@ -673,8 +673,8 @@ MapSetAll2D(BYTE fill) } } -VOID -MapSetup(VOID) +void +MapSetup(void) { #define NO_AUTO_MAPPING FALSE @@ -685,16 +685,16 @@ MapSetup(VOID) #endif } -VOID -setup2dscreen(VOID) +void +setup2dscreen(void) { // qsetmode640350(); } -VOID -TerminateGame(VOID) +void +TerminateGame(void) { int i,j; int oldtotalclock; @@ -729,7 +729,7 @@ TerminateGame(VOID) uninitgroupfile(); } -VOID +void LoadLevel(char *filename) { int pos; @@ -750,7 +750,7 @@ LoadLevel(char *filename) } } -VOID +void LoadImages(char *filename) { short ndx; @@ -884,7 +884,7 @@ void MultiSharewareCheck(void) int TotalMemory = 0; int ActualHeap = 0; -VOID InitAutoNet(VOID) +void InitAutoNet(void) { if (!AutoNet) return; @@ -938,8 +938,8 @@ static const char *deffile = "sw.def"; extern int startwin_run(void); -VOID -InitGame(VOID) +void +InitGame(void) { extern int MovesPerPacket; //void *ReserveMem=NULL; @@ -1189,7 +1189,7 @@ char SkillNames[4][MAX_SKILL_NAME_LEN+2] = "^No Pain, No Gain" }; -VOID InitNewGame(VOID) +void InitNewGame(void) { int i, ready_bak; int ver_bak; @@ -1233,16 +1233,16 @@ void FindLevelInfo(char *map_name, short *level) } int ChopTics; -VOID InitLevelGlobals(VOID) +void InitLevelGlobals(void) { extern char PlayerGravity; extern short wait_active_check_offset; //extern short Zombies; extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust; - extern BOOL left_foot; - extern BOOL serpwasseen; - extern BOOL sumowasseen; - extern BOOL zillawasseen; + extern SWBOOL left_foot; + extern SWBOOL serpwasseen; + extern SWBOOL sumowasseen; + extern SWBOOL zillawasseen; extern short BossSpriteNum[3]; // A few IMPORTANT GLOBAL RESETS @@ -1270,7 +1270,7 @@ VOID InitLevelGlobals(VOID) memset(BossSpriteNum,-1,sizeof(BossSpriteNum)); } -VOID InitLevelGlobals2(VOID) +void InitLevelGlobals2(void) { extern short Bunny_Count; // GLOBAL RESETS NOT DONE for LOAD GAME @@ -1280,8 +1280,8 @@ VOID InitLevelGlobals2(VOID) Bunny_Count = 0; } -VOID -InitLevel(VOID) +void +InitLevel(void) { static int DemoNumber = 0; @@ -1407,7 +1407,7 @@ InitLevel(VOID) // fake Multi-player game setup if (FakeMultiNumPlayers && !BotMode) { - BYTE i; + uint8_t i; // insert all needed players except the first one - its already tere for (i = 0; i < FakeMultiNumPlayers - 1; i++) @@ -1423,7 +1423,7 @@ InitLevel(VOID) // Put in the BOTS if called for if (FakeMultiNumPlayers && BotMode) { - BYTE i; + uint8_t i; // insert all needed players except the first one - its already tere for (i = 0; i < FakeMultiNumPlayers; i++) @@ -1476,7 +1476,7 @@ InitLevel(VOID) if (ArgCheat) { - BOOL bak = gs.Messages; + SWBOOL bak = gs.Messages; gs.Messages = FALSE; EveryCheatToggle(&Player[0],NULL); gs.Messages = bak; @@ -1503,10 +1503,10 @@ InitLevel(VOID) } -VOID -TerminateLevel(VOID) +void +TerminateLevel(void) { - VOID pClearSpriteList(PLAYERp pp); + void pClearSpriteList(PLAYERp pp); int i, nexti, stat, pnum, ndx; SECT_USERp *sectu; @@ -1609,8 +1609,8 @@ TerminateLevel(VOID) //HEAP_CHECK(); } -VOID -NewLevel(VOID) +void +NewLevel(void) { DSPRINTF(ds,"NewLevel"); @@ -1683,8 +1683,8 @@ NewLevel(VOID) FinishAnim = 0; } -VOID -ResetKeys(VOID) +void +ResetKeys(void) { int i; @@ -1694,8 +1694,8 @@ ResetKeys(VOID) } } -BOOL -KeyPressed(VOID) +SWBOOL +KeyPressed(void) { int i; @@ -1708,10 +1708,10 @@ KeyPressed(VOID) return FALSE; } -BYTEp -KeyPressedRange(BYTEp kb, BYTEp ke) +uint8_t* +KeyPressedRange(uint8_t* kb, uint8_t* ke) { - BYTEp k; + uint8_t* k; for (k = kb; k <= ke; k++) { @@ -1722,10 +1722,10 @@ KeyPressedRange(BYTEp kb, BYTEp ke) return NULL; } -VOID -ResetKeyRange(BYTEp kb, BYTEp ke) +void +ResetKeyRange(uint8_t* kb, uint8_t* ke) { - BYTEp k; + uint8_t* k; for (k = kb; k <= ke; k++) { @@ -1734,8 +1734,8 @@ ResetKeyRange(BYTEp kb, BYTEp ke) } -VOID -LogoLevel(VOID) +void +LogoLevel(void) { char called; int fin; @@ -1830,15 +1830,15 @@ LogoLevel(VOID) } -VOID -CreditsLevel(VOID) +void +CreditsLevel(void) { char called; int fin; int i; int curpic; int handle; - ULONG timer = 0; + uint32_t timer = 0; int zero=0; short save; #define CREDITS1_PIC 5111 @@ -1921,8 +1921,8 @@ CreditsLevel(VOID) } -VOID -SybexScreen(VOID) +void +SybexScreen(void) { if (!SW_SHAREWARE) return; @@ -1938,8 +1938,8 @@ SybexScreen(VOID) // CTW REMOVED /* -VOID -TenScreen(VOID) +void +TenScreen(void) { char called; int fin; @@ -1948,7 +1948,7 @@ TenScreen(VOID) char tempbuf[256]; char *palook_bak = palookup[0]; int i; - ULONG bak; + uint32_t bak; int bakready2send; if (CommEnabled) @@ -2007,8 +2007,8 @@ TenScreen(VOID) */ // CTW REMOVED END -VOID -TitleLevel(VOID) +void +TitleLevel(void) { char called; int fin; @@ -2091,21 +2091,21 @@ TitleLevel(VOID) } -VOID DrawMenuLevelScreen(VOID) +void DrawMenuLevelScreen(void) { flushperms(); clearview(0); rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); } -VOID DrawStatScreen(VOID) +void DrawStatScreen(void) { flushperms(); clearview(0); rotatesprite(0, 0, RS_SCALE, 0, STAT_SCREEN_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1); } -VOID DrawLoadLevelScreen(VOID) +void DrawLoadLevelScreen(void) { flushperms(); clearview(0); @@ -2114,18 +2114,18 @@ VOID DrawLoadLevelScreen(VOID) short PlayerQuitMenuLevel = -1; -VOID -IntroAnimLevel(VOID) +void +IntroAnimLevel(void) { DSPRINTF(ds,"IntroAnimLevel"); MONO_PRINT(ds); playanm(0); } -VOID -MenuLevel(VOID) +void +MenuLevel(void) { - BOOL MNU_StartNetGame(void); + SWBOOL MNU_StartNetGame(void); char called; int fin; extern int totalclocklock; @@ -2254,7 +2254,7 @@ MenuLevel(VOID) if (MultiPlayQuitFlag) { short pnum; - BYTE pbuf[1]; + uint8_t pbuf[1]; QuitFlag = TRUE; pbuf[0] = PACKET_TYPE_MENU_LEVEL_QUIT; netbroadcastpacket(pbuf, 1); // TENSW @@ -2311,11 +2311,11 @@ MenuLevel(VOID) nextpage(); } -VOID -SceneLevel(VOID) +void +SceneLevel(void) { - BOOL dp_bak; - BOOL dm_bak; + SWBOOL dp_bak; + SWBOOL dm_bak; FILE *fin; #define CINEMATIC_DEMO_FILE "$scene.dmo" @@ -2342,11 +2342,11 @@ SceneLevel(VOID) DemoPlaying = dp_bak; } -VOID +void LoadingLevelScreen(char *level_name) { short w,h; - extern BOOL DemoMode; + extern SWBOOL DemoMode; extern char *MNU_LevelName[28]; DrawLoadLevelScreen(); @@ -2369,7 +2369,7 @@ LoadingLevelScreen(char *level_name) nextpage(); } -VOID +void gNextState(STATEp *State) { // Transition to the next state @@ -2383,7 +2383,7 @@ gNextState(STATEp *State) } // Generic state control -VOID +void gStateControl(STATEp *State, int *tics) { *tics += synctics; @@ -2422,11 +2422,11 @@ int BonusGrabSound(short SpriteNum) return 0; } -VOID +void BonusScreen(PLAYERp pp) { int minutes,seconds,second_tics; - extern BOOL FinishedLevel; + extern SWBOOL FinishedLevel; extern int PlayClock; extern short LevelSecrets; extern short TotalKillable; @@ -2535,7 +2535,7 @@ BonusScreen(PLAYERp pp) int Tics = 0; int line = 0; - BOOL BonusDone; + SWBOOL BonusDone; UserInput uinfo = { FALSE, FALSE, dir_None }; if (Level < 0) Level = 0; @@ -2661,9 +2661,9 @@ BonusScreen(PLAYERp pp) Terminate3DSounds(); } -VOID EndGameSequence(VOID) +void EndGameSequence(void) { - BOOL anim_ok = TRUE; + SWBOOL anim_ok = TRUE; FadeOut(0, 5); if ((gs.ParentalLock || Global_PLock) && FinishAnim == ANIM_SUMO) @@ -2702,11 +2702,11 @@ VOID EndGameSequence(VOID) } } -VOID +void StatScreen(PLAYERp mpp) { int minutes,seconds,second_tics; - extern BOOL FinishedLevel; + extern SWBOOL FinishedLevel; extern int PlayClock; extern short LevelSecrets; extern short TotalKillable; @@ -2884,8 +2884,8 @@ StatScreen(PLAYERp mpp) Terminate3DSounds(); } -VOID -GameIntro(VOID) +void +GameIntro(void) { DSPRINTF(ds,"GameIntro..."); @@ -2917,8 +2917,8 @@ GameIntro(VOID) MenuLevel(); } -VOID -Control(VOID) +void +Control(void) { InitGame(); @@ -3092,7 +3092,7 @@ void InitPlayerGameSettings(void) } -VOID InitRunLevel(VOID) +void InitRunLevel(void) { int i; if (DemoEdit) @@ -3182,8 +3182,8 @@ VOID InitRunLevel(VOID) StartAmbientSound(); } -VOID -RunLevel(VOID) +void +RunLevel(void) { int i; InitRunLevel(); @@ -3228,7 +3228,7 @@ void swexit(int exitval) exit(exitval); } -VOID DosScreen(VOID) +void DosScreen(void) { #if 0 #ifdef SW_SHAREWARE @@ -3256,7 +3256,7 @@ VOID DosScreen(VOID) } #if 0 //PLOCK_VERSION -VOID AlphaMessage(VOID) +void AlphaMessage(void) { Global_PLock = TRUE; // Set the hardwired parental lock mode! buildputs("" @@ -3273,7 +3273,7 @@ VOID AlphaMessage(VOID) #endif #if 0 //UK_VERSION -VOID AlphaMessage(VOID) +void AlphaMessage(void) { buildputs("" " SHADOW WARRIOR(tm) Version 1.2 (UK Version) \n" @@ -3288,7 +3288,7 @@ VOID AlphaMessage(VOID) #endif #if 1 //!UK_VERSION && !PLOCK_VERSION -VOID AlphaMessage(VOID) +void AlphaMessage(void) { if (SW_SHAREWARE) { @@ -3467,10 +3467,10 @@ int app_main(int argc, char const *const argv[]) int stat, nexti; char type; extern int MovesPerPacket; - VOID DoSector(VOID); - VOID gameinput(VOID); + void DoSector(void); + void gameinput(void); int cnt = 0; - ULONG TotalMemory; + uint32_t TotalMemory; for (i=1; iFlags, PF_DEAD)) { @@ -4685,11 +4685,11 @@ FunctionKeys(PLAYERp pp) } -VOID PauseKey(PLAYERp pp) +void PauseKey(PLAYERp pp) { - extern BOOL GamePaused,CheatInputMode; + extern SWBOOL GamePaused,CheatInputMode; extern short QuickLoadNum; - extern BOOL enabled; + extern SWBOOL enabled; if (KEY_PRESSED(sc_Pause) && !CommEnabled && !InputMode && !UsingMenus && !CheatInputMode && !ConPanel) { @@ -4736,18 +4736,18 @@ VOID PauseKey(PLAYERp pp) -VOID GetMessageInput(PLAYERp pp) +void GetMessageInput(PLAYERp pp) { int pnum = myconnectindex; short w,h; signed char MNU_InputSmallString(char *, short); signed char MNU_InputString(char *, short); - static BOOL cur_show; - static BOOL TeamSendAll, TeamSendTeam; + static SWBOOL cur_show; + static SWBOOL TeamSendAll, TeamSendTeam; #define TEAM_MENU "A - Send to ALL, T - Send to TEAM" static char HoldMessageInputString[256]; int i; - BOOL IsCommand(char *str); + SWBOOL IsCommand(char *str); if (!MessageInputMode && !ConInputMode) { @@ -4889,13 +4889,13 @@ SEND_MESSAGE: } } -VOID GetConInput(PLAYERp pp) +void GetConInput(PLAYERp pp) { int pnum = myconnectindex; short w,h; signed char MNU_InputSmallString(char *, short); signed char MNU_InputString(char *, short); - static BOOL cur_show; + static SWBOOL cur_show; if (MessageInputMode || HelpInputMode) return; @@ -4946,9 +4946,9 @@ VOID GetConInput(PLAYERp pp) } -VOID GetHelpInput(PLAYERp pp) +void GetHelpInput(PLAYERp pp) { - extern BOOL GamePaused; + extern SWBOOL GamePaused; if (KEY_PRESSED(KEYSC_ALT) || KEY_PRESSED(KEYSC_RALT)) return; @@ -5028,10 +5028,10 @@ VOID GetHelpInput(PLAYERp pp) short MirrorDelay; int MouseYAxisMode = -1; -VOID +void getinput(SW_PACKET *loc) { - BOOL found = FALSE; + SWBOOL found = FALSE; int i; PLAYERp pp = Player + myconnectindex; PLAYERp newpp = Player + myconnectindex; @@ -5049,16 +5049,16 @@ getinput(SW_PACKET *loc) #define SET_LOC_KEY(loc, sync_num, key_test) SET(loc, ((!!(key_test)) << (sync_num))) ControlInfo info; - boolean running; - int32 turnamount; - static int32 turnheldtime; - int32 keymove; - int32 momx, momy; + int32_t running; + int32_t turnamount; + static int32_t turnheldtime; + int32_t keymove; + int32_t momx, momy; int aimvel; int mouseaxis; - extern BOOL MenuButtonAutoRun; - extern BOOL MenuButtonAutoAim; + extern SWBOOL MenuButtonAutoRun; + extern SWBOOL MenuButtonAutoAim; if (Prediction && CommEnabled) { @@ -5527,7 +5527,7 @@ void drawoverheadmap(int cposx, int cposy, int czoom, short cang) spritetype *spr; short p; static int pspr_ndx[8]= {0,0,0,0,0,0,0,0}; - BOOL sprisplayer = FALSE; + SWBOOL sprisplayer = FALSE; short txt_x, txt_y; // draw location text @@ -5902,10 +5902,10 @@ loadtile(short tilenume) int RandomRange(int range, char *file, unsigned line) { - ULONG rand_num; - ULONG value; + uint32_t rand_num; + uint32_t value; extern FILE *fout_err; - extern ULONG MoveThingsCount; + extern uint32_t MoveThingsCount; if (RandomPrint && !Prediction) { @@ -5933,8 +5933,8 @@ RandomRange(int range, char *file, unsigned line) int RandomRange(int range) { - ULONG rand_num; - ULONG value; + uint32_t rand_num; + uint32_t value; if (range <= 0) return 0; @@ -5947,7 +5947,7 @@ RandomRange(int range) // shift values to give more precision value = (rand_num << 14) / ((65535UL << 14) / range); - if (value >= (ULONG)range) + if (value >= (uint32_t)range) value = range - 1; return value; @@ -5957,8 +5957,8 @@ RandomRange(int range) int StdRandomRange(int range) { - ULONG rand_num; - ULONG value; + uint32_t rand_num; + uint32_t value; if (range <= 0) return 0; @@ -5975,7 +5975,7 @@ StdRandomRange(int range) value = (rand_num << 14) / ((((int)RAND_MAX) << 14) / range); #endif - if (value >= (ULONG)range) + if (value >= (uint32_t)range) value = range - 1; return value; diff --git a/polymer/eduke32/source/sw/src/game.h b/polymer/eduke32/source/sw/src/game.h index e581ee0ec..3c4a97af2 100644 --- a/polymer/eduke32/source/sw/src/game.h +++ b/polymer/eduke32/source/sw/src/game.h @@ -68,7 +68,7 @@ void _Assert(char *, char *, unsigned); void dsprintf(char *, char *, ...); #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 extern int DispMono; @@ -152,11 +152,11 @@ y++ // ////////////////////////////////////////////////////// -extern BOOL MenuInputMode; -extern BOOL MessageInputMode; -extern BOOL ConInputMode; -extern BOOL ConPanel; -extern BOOL InputMode; +extern SWBOOL MenuInputMode; +extern SWBOOL MessageInputMode; +extern SWBOOL ConInputMode; +extern SWBOOL ConPanel; +extern SWBOOL InputMode; extern char MessageInputString[256]; extern char MessageOutputString[256]; @@ -305,25 +305,25 @@ extern char MessageOutputString[256]; // #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) #if B_LITTLE_ENDIAN != 0 -# define MSW_VAR(fixed) (*(((USHORTp)&(fixed)) + 1)) -# define LSW_VAR(fixed) (*((USHORTp)&(fixed))) +# define MSW_VAR(fixed) (*(((uint16_t*)&(fixed)) + 1)) +# define LSW_VAR(fixed) (*((uint16_t*)&(fixed))) -# define MSB_VAR(fixed) (*(((BYTEp)&(fixed)) + 1)) -# define LSB_VAR(fixed) (*((BYTEp)&(fixed))) +# define MSB_VAR(fixed) (*(((uint8_t*)&(fixed)) + 1)) +# define LSB_VAR(fixed) (*((uint8_t*)&(fixed))) #else -# define LSW_VAR(fixed) (*(((USHORTp)&(fixed)) + 1)) -# define MSW_VAR(fixed) (*((USHORTp)&(fixed))) +# define LSW_VAR(fixed) (*(((uint16_t*)&(fixed)) + 1)) +# define MSW_VAR(fixed) (*((uint16_t*)&(fixed))) -# define LSB_VAR(fixed) (*(((BYTEp)&(fixed)) + 1)) -# define MSB_VAR(fixed) (*((BYTEp)&(fixed))) +# define LSB_VAR(fixed) (*(((uint8_t*)&(fixed)) + 1)) +# define MSB_VAR(fixed) (*((uint8_t*)&(fixed))) #endif #define MSW(fixed) ((fixed)>>16) -#define LSW(fixed) (((SHORT)(fixed))) +#define LSW(fixed) (((int16_t)(fixed))) // Defines for reading in ST1 sprite tagging #define SP_TAG1(sp) ((sp)->hitag) @@ -453,12 +453,12 @@ int StdRandomRange(int range); // x & y offset of tile -#define TILE_XOFF(picnum) ((CHAR)TEST(picanm[(picnum)] >> 8, 0xFF)) -#define TILE_YOFF(picnum) ((CHAR)TEST(picanm[(picnum)] >> 16, 0xFF)) +#define TILE_XOFF(picnum) ((int8_t)TEST(picanm[(picnum)] >> 8, 0xFF)) +#define TILE_YOFF(picnum) ((int8_t)TEST(picanm[(picnum)] >> 16, 0xFF)) // x & y offset of current sprite tile -#define SPRITEp_XOFF(sp) ((CHAR)TEST(picanm[(sp)->picnum] >> 8, 0xFF)) -#define SPRITEp_YOFF(sp) ((CHAR)TEST(picanm[(sp)->picnum] >> 16, 0xFF)) +#define SPRITEp_XOFF(sp) ((int8_t)TEST(picanm[(sp)->picnum] >> 8, 0xFF)) +#define SPRITEp_YOFF(sp) ((int8_t)TEST(picanm[(sp)->picnum] >> 16, 0xFF)) // 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))) @@ -789,7 +789,7 @@ typedef struct PANEL_SPRITEstruct PANEL_SPRITE, *PANEL_SPRITEp; struct ANIMstruct; typedef struct ANIMstruct ANIM, *ANIMp; -typedef int ANIMATOR (SHORT SpriteNum); +typedef int ANIMATOR (int16_t SpriteNum); typedef ANIMATOR *ANIMATORp; typedef void pANIMATOR (PANEL_SPRITEp); @@ -828,8 +828,8 @@ struct STATEstruct typedef enum {WATER_FOOT, BLOOD_FOOT} FOOT_TYPE; extern FOOT_TYPE FootMode; -extern BOOL InGame; // Declared in game.c -extern BOOL Global_PLock; // Game.c +extern SWBOOL InGame; // Declared in game.c +extern SWBOOL Global_PLock; // Game.c int QueueFloorBlood(short hitsprite); // Weapon.c int QueueFootPrint(short hitsprite); // Weapon.c int QueueGeneric(short SpriteNum, short pic); // Weapon.c @@ -850,7 +850,7 @@ extern int PlayerGetItemVocs[MAX_GETSOUNDS]; #define MAX_YELLSOUNDS 3 extern int PlayerYellVocs[MAX_YELLSOUNDS]; -VOID BossHealthMeter(void); +void BossHealthMeter(void); // 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 int DLL_Load(char *DLLpathname); -BOOL DLL_Unload(int procHandle); -BOOL DLL_ExecFunc(int procHandle, char *fName); +SWBOOL DLL_Unload(int procHandle); +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_ConMessage(const char *message, ...) PRINTF_FORMAT(1, 2); void CON_StoreArg(const char *userarg); -BOOL CON_CheckParm(const char *userarg); +SWBOOL CON_CheckParm(const char *userarg); 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_InitConsole(void); @@ -911,13 +911,13 @@ void CON_InitConsole(void); /////////////////////////////////////////////////////////////////////////////////////////// void CDAudio_Eject(void); -BYTE CDAudio_GetVolume(void); -void CDAudio_SetVolume(BYTE volume); -void CDAudio_Play(BYTE track, BOOL looping); +uint8_t CDAudio_GetVolume(void); +void CDAudio_SetVolume(uint8_t volume); +void CDAudio_Play(uint8_t track, SWBOOL looping); void CDAudio_Stop(void); void CDAudio_Resume(void); void CDAudio_Update(void); -BOOL CDAudio_Playing(void); +SWBOOL CDAudio_Playing(void); int CDAudio_Init(void); void CDAudio_Shutdown(void); @@ -939,17 +939,17 @@ void CDAudio_Shutdown(void); typedef struct { - VOID (*Init)(PLAYERp); - SHORT damage_lo; - SHORT damage_hi; + void (*Init)(PLAYERp); + int16_t damage_lo; + int16_t damage_hi; unsigned int radius; - SHORT max_ammo; - SHORT min_ammo; - SHORT with_weapon; + int16_t max_ammo; + int16_t min_ammo; + int16_t with_weapon; char *weapon_name; char *ammo_name; - SHORT weapon_pickup; - SHORT ammo_pickup; + int16_t weapon_pickup; + int16_t ammo_pickup; } DAMAGE_DATA, *DAMAGE_DATAp; extern DAMAGE_DATA DamageData[]; @@ -958,24 +958,24 @@ extern DAMAGE_DATA DamageData[]; extern int WeaponHasNoAmmo, WeaponIsAmmo; -VOID InitWeaponFist(PLAYERp); -VOID InitWeaponStar(PLAYERp); -VOID InitWeaponShotgun(PLAYERp); -VOID InitWeaponRocket(PLAYERp); -VOID InitWeaponRail(PLAYERp); -VOID InitWeaponMicro(PLAYERp); -VOID InitWeaponUzi(PLAYERp); -VOID InitWeaponSword(PLAYERp); -VOID InitWeaponHothead(PLAYERp); -VOID InitWeaponElectro(PLAYERp); -VOID InitWeaponHeart(PLAYERp); -VOID InitWeaponGrenade(PLAYERp); -VOID InitWeaponMine(PLAYERp); +void InitWeaponFist(PLAYERp); +void InitWeaponStar(PLAYERp); +void InitWeaponShotgun(PLAYERp); +void InitWeaponRocket(PLAYERp); +void InitWeaponRail(PLAYERp); +void InitWeaponMicro(PLAYERp); +void InitWeaponUzi(PLAYERp); +void InitWeaponSword(PLAYERp); +void InitWeaponHothead(PLAYERp); +void InitWeaponElectro(PLAYERp); +void InitWeaponHeart(PLAYERp); +void InitWeaponGrenade(PLAYERp); +void InitWeaponMine(PLAYERp); -VOID InitWeaponNapalm(PLAYERp); -VOID InitWeaponRing(PLAYERp); +void InitWeaponNapalm(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 { - SHORT vel; - SHORT svel; - CHAR angvel; - CHAR aimvel; - LONG bits; + int16_t vel; + int16_t svel; + int8_t angvel; + int8_t aimvel; + int32_t bits; } SW_PACKET; extern SW_PACKET loc; #define PACK 1 -extern BOOL CameraTestMode; +extern SWBOOL CameraTestMode; enum PlayerDeathTypes { @@ -1162,7 +1162,7 @@ struct PLAYERstruct // TENSW: on really bad network connections, the sync FIFO queue can overflow if it is the // same size as the move fifo. #define SYNCFIFOSIZ 1024 - BYTE syncval[SYNCFIFOSIZ][MAXSYNCBYTES]; + uint8_t syncval[SYNCFIFOSIZ][MAXSYNCBYTES]; // must start out as 0 int playerreadyflag; @@ -1210,8 +1210,8 @@ struct PLAYERstruct PANEL_SPRITEp MiniBarHealthBoxDigit[3], MiniBarAmmoDigit[3]; short InventoryTics[MAX_INVENTORY]; short InventoryPercent[MAX_INVENTORY]; - CHAR InventoryAmount[MAX_INVENTORY]; - BOOL InventoryActive[MAX_INVENTORY]; + int8_t InventoryAmount[MAX_INVENTORY]; + SWBOOL InventoryActive[MAX_INVENTORY]; short DiveTics; short DiveDamageTics; @@ -1237,14 +1237,14 @@ struct PLAYERstruct // palette fading up and down for player hit and get items short FadeTics; // Tics between each fade cycle 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 //short electro[64]; 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 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 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. @@ -1252,14 +1252,14 @@ struct PLAYERstruct unsigned char WpnShotgunAuto; // 50-0 automatic shotgun rounds unsigned char WpnShotgunLastShell; // Number of last shell fired 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 - BOOL InitingNuke; - BOOL TestNukeInit; - BOOL NukeInitialized; // Nuke already has counted down + SWBOOL InitingNuke; + SWBOOL TestNukeInit; + SWBOOL NukeInitialized; // Nuke already has counted down short FistAng; // KungFu attack angle 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 Reverb; // Player's current reverb setting short Heads; // Number of Accursed Heads orbiting player @@ -1396,7 +1396,7 @@ typedef struct // wall vars for lighting 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 STATEp State; @@ -1465,7 +1465,7 @@ typedef struct // velocity int vel_tgt; 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 Counter2; @@ -1528,8 +1528,8 @@ typedef struct // Need to get rid of these flags int Flag1; - CHAR LastWeaponNum; - CHAR WeaponNum; + int8_t LastWeaponNum; + int8_t WeaponNum; short bounce; // count bounces off wall for killing shrap stuff // !JIM! my extensions @@ -1537,7 +1537,7 @@ typedef struct // Shell gets deleted when ShellNum < (ShellCount - MAXSHELLS) short FlagOwner; // The spritenum of the original flag 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; // sprite->extra flags @@ -1787,7 +1787,7 @@ typedef struct speed, damage, number; // usually used for matching number - BYTE flags2; + uint8_t flags2; } SECT_USER, *SECT_USERp; extern SECT_USERp SectUser[MAXSECTORS]; @@ -1799,11 +1799,11 @@ typedef struct unsigned int size, checksum; } MEM_HDR,*MEM_HDRp; -BOOL ValidPtr(VOID *ptr); -VOID *AllocMem(int size); -VOID *CallocMem(int size, int num); -VOID *ReAllocMem(VOID *ptr, int size); -VOID FreeMem(VOID *ptr); +SWBOOL ValidPtr(void *ptr); +void *AllocMem(int size); +void *CallocMem(int size, int num); +void *ReAllocMem(void *ptr, int size); +void FreeMem(void *ptr); typedef struct { @@ -1921,7 +1921,7 @@ typedef struct typedef struct { - BYTE FromRange,ToRange,FromColor,ToColor; + uint8_t FromRange,ToRange,FromColor,ToColor; } COLOR_MAP, *COLOR_MAPp; #define MAX_TRACKS 100 @@ -2095,17 +2095,17 @@ extern SECTOR_OBJECT SectorObject[MAX_SECTOR_OBJECTS]; ANIMATOR NullAnimator; -VOID SetBorder(PLAYERp pp, int); -VOID SetFragBar(PLAYERp pp); +void SetBorder(PLAYERp pp, int); +void SetFragBar(PLAYERp pp); int Distance(int x1, int y1, int x2, int y2); short GetDeltaAngle(short, short); int SetActorRotation(short SpriteNum,int,int); 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); -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); @@ -2119,14 +2119,14 @@ ANIMATOR DoActorBeginJump,DoActorJump,DoActorBeginFall,DoActorFall,DoActorDeathM int SpawnShrap(short,short); -VOID PlayerUpdateHealth(PLAYERp pp, short value); -VOID PlayerUpdateAmmo(PLAYERp pp, short WeaponNum, short value); -VOID PlayerUpdateWeapon(PLAYERp pp, short WeaponNum); -VOID PlayerUpdateKills(PLAYERp pp, short value); -VOID PlayerUpdatePanelInfo(PLAYERp pp); -VOID RefreshInfoLine(PLAYERp pp); +void PlayerUpdateHealth(PLAYERp pp, short value); +void PlayerUpdateAmmo(PLAYERp pp, short WeaponNum, short value); +void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum); +void PlayerUpdateKills(PLAYERp pp, short value); +void PlayerUpdatePanelInfo(PLAYERp pp); +void RefreshInfoLine(PLAYERp pp); -VOID DoAnim(int numtics); +void DoAnim(int numtics); void AnimDelete(int *animptr); short AnimGetGoal(int *animptr); 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 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); -int move_sprite(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, ULONG cliptype, int numtics); -int DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets); +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, uint32_t 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, uint32_t max_delta_ang, SWBOOL skip_targets); -VOID change_sprite_stat(short, short); -VOID SetOwner(short, short); -VOID SetAttach(short, short); -VOID analyzesprites(int,int,int,BOOL); -VOID ChangeState(short SpriteNum, STATEp statep); +void change_sprite_stat(short, short); +void SetOwner(short, short); +void SetAttach(short, short); +void analyzesprites(int,int,int,SWBOOL); +void ChangeState(short SpriteNum, STATEp statep); -VOID UpdateSectorFAF_Connect(short SpriteNum, int newz); +void UpdateSectorFAF_Connect(short SpriteNum, int newz); #if 0 -BOOL FAF_ConnectCeiling(short sectnum); -BOOL FAF_ConnectFloor(short sectnum); +SWBOOL FAF_ConnectCeiling(short sectnum); +SWBOOL FAF_ConnectFloor(short sectnum); #else #define FAF_PLACE_MIRROR_PIC 341 #define FAF_MIRROR_PIC 2356 @@ -2159,30 +2159,30 @@ BOOL FAF_ConnectFloor(short sectnum); #define FAF_ConnectArea(sectnum) (FAF_ConnectCeiling(sectnum) || FAF_ConnectFloor(sectnum)) #endif void updatesectorz(int, int, int, short *); -VOID FAF_ConnectPlayerCeiling(PLAYERp pp); -VOID FAF_ConnectPlayerFloor(PLAYERp pp); -BOOL PlayerCeilingHit(PLAYERp pp, int zlimit); -BOOL PlayerFloorHit(PLAYERp pp, int zlimit); +void FAF_ConnectPlayerCeiling(PLAYERp pp); +void FAF_ConnectPlayerFloor(PLAYERp pp); +SWBOOL PlayerCeilingHit(PLAYERp pp, int zlimit); +SWBOOL PlayerFloorHit(PLAYERp pp, int zlimit); -VOID FAFhitscan(LONG x, LONG y, LONG z, SHORT sectnum, - LONG xvect, LONG yvect, LONG zvect, - SHORTp hitsect, SHORTp hitwall, SHORTp hitsprite, - LONGp hitx, LONGp hity, LONGp hitz, LONG clipmask); +void FAFhitscan(int32_t x, int32_t y, int32_t z, int16_t sectnum, + int32_t xvect, int32_t yvect, int32_t zvect, + int16_t* hitsect, int16_t* hitwall, int16_t* hitsprite, + 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, - LONGp hiz, LONGp ceilhit, - LONGp loz, LONGp florhit, - LONG clipdist, LONG clipmask); +void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum, + int32_t* hiz, int32_t* ceilhit, + int32_t* loz, int32_t* florhit, + int32_t clipdist, int32_t clipmask); -VOID FAFgetzrangepoint(LONG x, LONG y, LONG z, SHORT sectnum, - LONGp hiz, LONGp ceilhit, - LONGp loz, LONGp florhit); +void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum, + int32_t* hiz, int32_t* ceilhit, + 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; @@ -2199,7 +2199,7 @@ enum SoundType 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 @@ -2209,10 +2209,10 @@ VOID DoSoundSpotMatch(short match, short sound_num, short sound_type); // /////////////////////////////////////////////////////////////////////////////////////////// -extern BOOL ExitLevel; -extern BOOL Warping; -extern BYTE CommPlayers; -extern BOOL CommEnabled; +extern SWBOOL ExitLevel; +extern SWBOOL Warping; +extern uint8_t CommPlayers; +extern SWBOOL CommEnabled; extern char CommPlayerName[]; extern short Level; extern short Episode; @@ -2287,7 +2287,7 @@ void sendlogoff(void); /////////////////////////// extern int ototalclock, save_totalclock, gotlastpacketclock,smoothratio; -extern BOOL ready2send; +extern SWBOOL ready2send; // local copy of variables updated by faketimerhandler extern int locselectedgun; @@ -2296,7 +2296,7 @@ extern int locselectedgun; extern int movefifoplc, movefifoend[]; -extern BOOL MoveSkip4, MoveSkip2, MoveSkip8; +extern SWBOOL MoveSkip4, MoveSkip2, MoveSkip8; #define MASTER_SWITCHING 1 @@ -2309,7 +2309,7 @@ extern int dimensionmode, zoom; extern int vel,svel,angvel; #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 DoPaletteFlash(PLAYERp pp); extern unsigned char palette_data[256][3]; -extern BOOL NightVision; +extern SWBOOL NightVision; #endif 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 DoRipper2RipHeart(short SpriteNum); // ripper2.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 MapSetAll2D(BYTE fill); // game.c +void MapSetAll2D(uint8_t fill); // game.c void TerminateGame(void); // game.c void TerminateLevel(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 COVERsetbrightness(int bright, unsigned char *pal); // game.c void DrawMenuLevelScreen(void); // game.c -VOID DebugWriteString(char *string); // game.c -VOID ManualPlayerInsert(PLAYERp pp); // game.c +void DebugWriteString(char *string); // 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 ClearStartMost(VOID); // border.c -VOID SetCrosshair(VOID); // border.c +void ClearStartMost(void); // border.c +void SetCrosshair(void); // border.c void initsynccrc(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 post_analyzesprites(void); // 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 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 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 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 PlayerInitFlashBomb(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 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 -BOOL VatorSwitch(short match, short setting); // vator.c -void MoveSpritesWithSector(short sectnum,int z_amt,BOOL type); // vator.c +SWBOOL VatorSwitch(short match, short setting); // vator.c +void MoveSpritesWithSector(short sectnum,int z_amt,SWBOOL type); // vator.c void SetVatorActive(short SpriteNum); // vator.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 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 void SetSpikeActive(short SpriteNum); // spike.c diff --git a/polymer/eduke32/source/sw/src/inv.c b/polymer/eduke32/source/sw/src/inv.c index d57e76535..48cda613d 100644 --- a/polymer/eduke32/source/sw/src/inv.c +++ b/polymer/eduke32/source/sw/src/inv.c @@ -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 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 InventoryBarUpdatePosition(PLAYERp pp); -VOID InvBorderRefresh(PLAYERp pp); -VOID InventoryUse(PLAYERp pp); -VOID InventoryStop(PLAYERp pp, short InventoryNum); -VOID KillInventoryBar(PLAYERp pp); -VOID PlayerUpdateInventoryPercent(PLAYERp pp); -VOID PlayerUpdateInventoryPic(PLAYERp pp); -VOID PlayerUpdateInventoryState(PLAYERp pp); +void InventoryBarUpdatePosition(PLAYERp pp); +void InvBorderRefresh(PLAYERp pp); +void InventoryUse(PLAYERp pp); +void InventoryStop(PLAYERp pp, short InventoryNum); +void KillInventoryBar(PLAYERp pp); +void PlayerUpdateInventoryPercent(PLAYERp pp); +void PlayerUpdateInventoryPic(PLAYERp pp); +void PlayerUpdateInventoryState(PLAYERp pp); //#define INVENTORY_ICON_WIDTH 32 #define INVENTORY_ICON_WIDTH 28 -VOID UseInventoryRepairKit(PLAYERp pp); -VOID UseInventoryMedkit(PLAYERp pp); -VOID UseInventoryRepairKit(PLAYERp pp); -VOID UseInventoryCloak(PLAYERp pp); -VOID UseInventoryEnvironSuit(PLAYERp pp); -VOID UseInventoryNightVision(PLAYERp pp); -VOID UseInventoryChemBomb(PLAYERp pp); -VOID UseInventoryFlashBomb(PLAYERp pp); -VOID UseInventoryCaltrops(PLAYERp pp); +void UseInventoryRepairKit(PLAYERp pp); +void UseInventoryMedkit(PLAYERp pp); +void UseInventoryRepairKit(PLAYERp pp); +void UseInventoryCloak(PLAYERp pp); +void UseInventoryEnvironSuit(PLAYERp pp); +void UseInventoryNightVision(PLAYERp pp); +void UseInventoryChemBomb(PLAYERp pp); +void UseInventoryFlashBomb(PLAYERp pp); +void UseInventoryCaltrops(PLAYERp pp); -VOID StopInventoryRepairKit(PLAYERp pp, short); -VOID StopInventoryMedkit(PLAYERp pp, short); -VOID StopInventoryRepairKit(PLAYERp pp, short); -VOID StopInventoryCloak(PLAYERp pp, short); -VOID StopInventoryEnvironSuit(PLAYERp pp, short); -VOID StopInventoryNightVision(PLAYERp pp, short); +void StopInventoryRepairKit(PLAYERp pp, short); +void StopInventoryMedkit(PLAYERp pp, short); +void StopInventoryRepairKit(PLAYERp pp, short); +void StopInventoryCloak(PLAYERp pp, short); +void StopInventoryEnvironSuit(PLAYERp pp, short); +void StopInventoryNightVision(PLAYERp pp, short); extern PANEL_STATE ps_PanelEnvironSuit[]; extern PANEL_STATE ps_PanelCloak[]; @@ -101,16 +101,16 @@ INVENTORY_DATA InventoryData[MAX_INVENTORY+1] = {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]; short i; int x,y; - BOOL found; + SWBOOL found; INVENTORY_DATAp id; - extern BOOL PanelUpdateMode; + extern SWBOOL PanelUpdateMode; #define MINI_BAR_Y 174 @@ -176,7 +176,7 @@ VOID UpdateMiniBar(PLAYERp pp) } -VOID +void PanelInvTestSuicide(PANEL_SPRITEp psp) { if (TEST(psp->flags, PANF_SUICIDE)) @@ -217,7 +217,7 @@ SpawnInventoryIcon(PLAYERp pp, short InventoryNum) return psp; } -VOID +void KillPanelInv(PLAYERp pp, short InventoryNum) { ASSERT(pp->InventorySprite[InventoryNum]); @@ -228,14 +228,14 @@ KillPanelInv(PLAYERp pp, short InventoryNum) pp->InventorySprite[InventoryNum] = NULL; } -VOID +void KillPlayerIcon(PLAYERp pp, PANEL_SPRITEp *pspp) { SET((*pspp)->flags, PANF_SUICIDE); (*pspp) = NULL; } -VOID +void KillAllPanelInv(PLAYERp pp) { short i; @@ -274,7 +274,7 @@ SpawnIcon(PLAYERp pp, PANEL_STATEp state) // ////////////////////////////////////////////////////////////////////// -VOID AutoPickInventory(PLAYERp pp) +void AutoPickInventory(PLAYERp pp) { int i; @@ -300,7 +300,7 @@ VOID AutoPickInventory(PLAYERp pp) } } -VOID +void UseInventoryMedkit(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -349,7 +349,7 @@ UseInventoryMedkit(PLAYERp pp) // CHEMICAL WARFARE CANISTERS // ////////////////////////////////////////////////////////////////////// -VOID +void UseInventoryChemBomb(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -375,7 +375,7 @@ UseInventoryChemBomb(PLAYERp pp) // FLASH BOMBS // ////////////////////////////////////////////////////////////////////// -VOID +void UseInventoryFlashBomb(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -401,7 +401,7 @@ UseInventoryFlashBomb(PLAYERp pp) // CALTROPS // ////////////////////////////////////////////////////////////////////// -VOID +void UseInventoryCaltrops(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -428,7 +428,7 @@ UseInventoryCaltrops(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -VOID +void UseInventoryRepairKit(PLAYERp pp) { SPRITEp sp = pp->SpriteP; @@ -458,7 +458,7 @@ UseInventoryRepairKit(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -VOID +void UseInventoryCloak(PLAYERp pp) { 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); } -VOID +void StopInventoryCloak(PLAYERp pp, short InventoryNum) { SPRITEp sp = pp->SpriteP; @@ -514,7 +514,7 @@ StopInventoryCloak(PLAYERp pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// #if 0 -VOID +void UseInventoryEnvironSuit(PLAYERp pp) { SPRITEp sp = pp->SpriteP; @@ -529,7 +529,7 @@ UseInventoryEnvironSuit(PLAYERp pp) } } -VOID +void StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum) { SPRITEp sp = pp->SpriteP; @@ -560,7 +560,7 @@ StopInventoryEnvironSuit(PLAYERp pp, short InventoryNum) static char sectorfloorpals[MAXSECTORS], sectorceilingpals[MAXSECTORS], wallpals[MAXWALLS]; #if 0 -VOID +void DoPlayerNightVisionPalette(PLAYERp pp) { extern char DefaultPalette[]; @@ -608,7 +608,7 @@ DoPlayerNightVisionPalette(PLAYERp pp) } #endif -VOID +void DoPlayerNightVisionPalette(PLAYERp pp) { extern char DefaultPalette[]; @@ -639,7 +639,7 @@ DoPlayerNightVisionPalette(PLAYERp pp) } } -VOID +void UseInventoryNightVision(PLAYERp pp) { SPRITEp sp = pp->SpriteP; @@ -660,7 +660,7 @@ UseInventoryNightVision(PLAYERp pp) PlaySound(DIGI_NIGHTON, &pp->posx, &pp->posy, &pp->posz, v3df_dontpan|v3df_follow); } -VOID +void StopInventoryNightVision(PLAYERp pp, short InventoryNum) { SPRITEp sp = pp->SpriteP; @@ -690,7 +690,7 @@ StopInventoryNightVision(PLAYERp pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// -VOID InventoryKeys(PLAYERp pp) +void InventoryKeys(PLAYERp pp) { short inv_hotkey; @@ -797,7 +797,7 @@ VOID InventoryKeys(PLAYERp pp) } } -VOID InvBorderRefresh(PLAYERp pp) +void InvBorderRefresh(PLAYERp pp) { 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); } -VOID InventoryTimer(PLAYERp pp) +void InventoryTimer(PLAYERp pp) { // called every time through loop short inv = 0; @@ -904,7 +904,7 @@ VOID InventoryTimer(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -VOID SpawnInventoryBar(PLAYERp pp) +void SpawnInventoryBar(PLAYERp pp) { short inv = 0; INVENTORY_DATAp id; @@ -935,14 +935,14 @@ VOID SpawnInventoryBar(PLAYERp pp) pp->InventoryBarTics = SEC(2); } -VOID KillInventoryBar(PLAYERp pp) +void KillInventoryBar(PLAYERp pp) { KillAllPanelInv(pp); KillPlayerIcon(pp, &pp->InventorySelectionBox); } // In case the BorderNum changes - move the postions -VOID InventoryBarUpdatePosition(PLAYERp pp) +void InventoryBarUpdatePosition(PLAYERp pp) { short inv = 0; 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]; @@ -973,7 +973,7 @@ VOID InventoryUse(PLAYERp pp) (*id->Init)(pp); } -VOID InventoryStop(PLAYERp pp, short InventoryNum) +void InventoryStop(PLAYERp pp, short InventoryNum) { INVENTORY_DATAp id = &InventoryData[InventoryNum]; @@ -995,7 +995,7 @@ short InventoryBoxX; short InventoryBoxY; short InventoryXoff; 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_YOFF 1 @@ -1006,7 +1006,7 @@ VOID (*InventoryDisplayString)(PLAYERp, short, short, short, const char *); #define INVENTORY_STATE_XOFF 19 #define INVENTORY_STATE_YOFF 1 -VOID +void PlayerUpdateInventory(PLAYERp pp, short InventoryNum) { USERp u = User[pp->PlayerSprite]; @@ -1089,7 +1089,7 @@ PlayerUpdateInventory(PLAYERp pp, short InventoryNum) } } -VOID +void PlayerUpdateInventoryPercent(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -1111,7 +1111,7 @@ PlayerUpdateInventoryPercent(PLAYERp pp) } } -VOID +void PlayerUpdateInventoryPic(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -1130,7 +1130,7 @@ PlayerUpdateInventoryPic(PLAYERp pp) psp->scale = id->Scale; } -VOID +void PlayerUpdateInventoryState(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; diff --git a/polymer/eduke32/source/sw/src/inv.h b/polymer/eduke32/source/sw/src/inv.h index f15df2d41..f12c8193b 100644 --- a/polymer/eduke32/source/sw/src/inv.h +++ b/polymer/eduke32/source/sw/src/inv.h @@ -39,8 +39,8 @@ enum InventoryNames typedef struct { char *Name; - VOID (*Init)(PLAYERp); - VOID (*Stop)(PLAYERp, short); + void (*Init)(PLAYERp); + void (*Stop)(PLAYERp, short); PANEL_STATEp State; short DecPerSec; short MaxInv; diff --git a/polymer/eduke32/source/sw/src/jbhlp.c b/polymer/eduke32/source/sw/src/jbhlp.c index 6b26f5837..3551aac32 100644 --- a/polymer/eduke32/source/sw/src/jbhlp.c +++ b/polymer/eduke32/source/sw/src/jbhlp.c @@ -48,8 +48,8 @@ static char tempbuf[256]; void Message(char *string, char color); long GetAToken(char *name, char *tc, long length); -BYTEp BKeyPressed(VOID); -VOID ResetKeys(VOID); +uint8_t* BKeyPressed(void); +void ResetKeys(void); // Functions diff --git a/polymer/eduke32/source/sw/src/jnstub.c b/polymer/eduke32/source/sw/src/jnstub.c index c819f424e..d5850dda4 100644 --- a/polymer/eduke32/source/sw/src/jnstub.c +++ b/polymer/eduke32/source/sw/src/jnstub.c @@ -42,7 +42,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms void ToggleFAF(void); // brooms.c void FAF_AfterDrawRooms(void); // brooms.c -VOID ResetBuildFAF(VOID); // brooms.c +void ResetBuildFAF(void); // brooms.c // Jim's Vars @@ -66,12 +66,12 @@ short siNextEndTag = 1; // Shows the hightest possible next int loaded_numwalls; // Boolean flags used for sprite searching -BOOL bFindPicNum = TRUE; // Default -BOOL bFindHiTag = FALSE; -BOOL bFindLowTag = FALSE; -BOOL bVoxelsOn = TRUE; // Turn voxels on by default -BOOL bSpinBobVoxels = TRUE; // Do twizzly stuff to voxels -BOOL bAutoSize = TRUE; // Autosizing on/off +SWBOOL bFindPicNum = TRUE; // Default +SWBOOL bFindHiTag = FALSE; +SWBOOL bFindLowTag = FALSE; +SWBOOL bVoxelsOn = TRUE; // Turn voxels on by default +SWBOOL bSpinBobVoxels = TRUE; // Do twizzly stuff to voxels +SWBOOL bAutoSize = TRUE; // Autosizing on/off int nextvoxid = 0; char *defsfilename = "sw.def"; @@ -84,7 +84,7 @@ short FindSpriteNum = 0; void ContextHelp(short spritenum); void LoadKVXFromScript(char *filename); -//void LogUserTime( BOOL bIsLoggingIn ); +//void LogUserTime( SWBOOL bIsLoggingIn ); // voxelarray format is: // spritenumber, voxelnumber @@ -161,7 +161,7 @@ extern short temppicnum, tempcstat, templotag, temphitag, tempextra; void SectorMoveFloorZ(int); void SectorMoveCeilingZ(int); -VOID BuildStagTable(VOID); +void BuildStagTable(void); void Message(char *string, char color); void ShowMessage(void); void ShadeMenu(void); @@ -170,7 +170,7 @@ void ShowNextTag(void); void FindSprite(short picnum, short findspritenum); void FindNextSprite(short picnum); void SetClipdist2D(void); -VOID DrawClipBox(short spritenum); +void DrawClipBox(short spritenum); //printext16 parameters: //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, // but trust me, it's the sprite number) -VOID -ResetKeys(VOID) +void +ResetKeys(void) { unsigned i; @@ -225,7 +225,7 @@ void ExtPreCheckKeys(void) // Toggle sprites on/off. Good for frame rate checks. -BOOL DebugActorFreeze = 0; +SWBOOL DebugActorFreeze = 0; void ToggleSprites() @@ -559,12 +559,12 @@ ExtAnalyzeSprites(void) } -BYTEp -BKeyPressed(VOID) +uint8_t* +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) return k; @@ -573,10 +573,10 @@ BKeyPressed(VOID) return NULL; } -BYTEp -KeyPressedRange(BYTEp kb, BYTEp ke) +uint8_t* +KeyPressedRange(uint8_t* kb, uint8_t* ke) { - BYTEp k; + uint8_t* k; for (k = kb; k <= ke; k++) { @@ -587,10 +587,10 @@ KeyPressedRange(BYTEp kb, BYTEp ke) return NULL; } -VOID -ResetKeyRange(BYTEp kb, BYTEp ke) +void +ResetKeyRange(uint8_t* kb, uint8_t* ke) { - BYTEp k; + uint8_t* k; for (k = kb; k <= ke; k++) { @@ -602,7 +602,7 @@ ResetKeyRange(BYTEp kb, BYTEp ke) void ExtInit(void) { - VOID InitPalette(VOID); + void InitPalette(void); int i, fil; initgroupfile("sw.grp"); @@ -682,7 +682,7 @@ ExtInit(void) #endif - VOID InitPalette(VOID); + void InitPalette(void); int i, fil; // Store user log in time @@ -785,8 +785,8 @@ ExtUnInit(void) // now. } -VOID -SetSpriteExtra(VOID) +void +SetSpriteExtra(void) { SPRITEp sp; int i; @@ -826,8 +826,8 @@ SetSpriteExtra(VOID) loaded_numwalls = numwalls; } -VOID -ResetSpriteFound(VOID) +void +ResetSpriteFound(void) { SPRITEp sp; @@ -839,8 +839,8 @@ ResetSpriteFound(VOID) // imported from allen code -VOID -Keys3D(VOID) +void +Keys3D(void) { int i; @@ -907,7 +907,7 @@ Keys3D(VOID) // '+ = Shade down a floor ceiling while keeping sprites constant if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GPLUS]) { - BOOL dospriteshade = FALSE; + SWBOOL dospriteshade = FALSE; keystatus[KEYSC_GPLUS] = 0; @@ -945,7 +945,7 @@ Keys3D(VOID) // '- = Shade down a floor ceiling while keeping sprites constant if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_GMINUS]) { - BOOL dospriteshade = FALSE; + SWBOOL dospriteshade = FALSE; 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); } -VOID +void MoreKeys(short searchstat, short searchwall, short searchsector, short pointhighlight) { @@ -2258,7 +2258,7 @@ ExtGetSpriteCaption(short spritenum) char name[64]; char tp[30]; char multi_str[30] = ""; - SHORT data; + int16_t data; data = TEST(sp->extra, SPRX_SKILL); @@ -2695,7 +2695,7 @@ ExtGetSpriteCaption(short spritenum) return tempbuf; } -VOID +void SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid) { 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); } -VOID +void DrawClipBox(short spritenum) { int x, y, z; @@ -2974,7 +2974,7 @@ ExtEditWallData(short wallnum) // F8 void ExtEditSpriteData(short spritenum) // F8 { - BYTEp key; + uint8_t* key; short data; SPRITEp sp; @@ -2999,7 +2999,7 @@ ExtEditSpriteData(short spritenum) // F8 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; @@ -3015,13 +3015,13 @@ ExtEditSpriteData(short spritenum) // F8 RESET(sp->extra, SPRX_SKILL); 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; 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; @@ -3064,17 +3064,17 @@ DISPLAY: while ((key = BKeyPressed()) == NULL) handleevents(); - if (key == (BYTEp)&KEY_PRESSED(KEYSC_1)) + if (key == (uint8_t*)&KEY_PRESSED(KEYSC_1)) { *key = FALSE; bFindPicNum = !bFindPicNum; } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_2)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_2)) { *key = FALSE; bFindHiTag = !bFindHiTag; } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_3)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_3)) { *key = FALSE; bFindLowTag = !bFindLowTag; @@ -3087,7 +3087,7 @@ DISPLAY: FindSprite(sprite[spritenum].picnum, spritenum); } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_4)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_4)) { *key = FALSE; FLIP(sprite[spritenum].extra, SPRX_BLOCK); @@ -3359,7 +3359,7 @@ FindSprite(short picnum, short findspritenum) short SpriteNum, NextSprite; SPRITEp sp; - BOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; + SWBOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; if (qsetmode == 200) // In 3D mode @@ -3432,7 +3432,7 @@ FindNextSprite(short picnum) SPRITEp sp; short animlen; - BOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; + SWBOOL bFoundPicNum, bFoundHiTag, bFoundLowTag, bFoundIt; if (qsetmode == 200) // In 3D mode 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, 101, 102, 135, 110, 111, 112, 113, 114, 115, 9002}; -BOOL +SWBOOL DoMatchCheck(SPRITEp sp) { unsigned i; @@ -3554,7 +3554,7 @@ FindNextTag(void) void ShadeMenu(void) // F8 { - BYTEp key; + uint8_t* key; if (qsetmode == 200) // In 3D mode return; @@ -3569,22 +3569,22 @@ ShadeMenu(void) // F8 while ((key = BKeyPressed()) == NULL) ; - if (key == (BYTEp)&KEY_PRESSED(KEYSC_1)) + if (key == (uint8_t*)&KEY_PRESSED(KEYSC_1)) { *key = FALSE; PlaxSetShade(); } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_2)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_2)) { *key = FALSE; PlaxAdjustShade(); } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_3)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_3)) { *key = FALSE; AdjustShade(); } - else if (key == (BYTEp)&KEY_PRESSED(KEYSC_4)) + else if (key == (uint8_t*)&KEY_PRESSED(KEYSC_4)) { *key = FALSE; AdjustVisibility(); @@ -3706,8 +3706,8 @@ dsprintf_null(char *str, char *format, ...) } -VOID -BuildStagTable(VOID) +void +BuildStagTable(void) { #define MAKE_STAG_TABLE #include "stag.h" diff --git a/polymer/eduke32/source/sw/src/jplayer.c b/polymer/eduke32/source/sw/src/jplayer.c index 11d419ef4..95cd25c7c 100644 --- a/polymer/eduke32/source/sw/src/jplayer.c +++ b/polymer/eduke32/source/sw/src/jplayer.c @@ -52,7 +52,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "bots.h" -BOOL WeaponOK(PLAYERp pp); +SWBOOL WeaponOK(PLAYERp pp); #define MAXANGVEL 80 @@ -424,7 +424,7 @@ void computergetinput(int snum, SW_PACKET *syn) int myx, myy, myz, myang, mycursectnum; USERp u; 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! diff --git a/polymer/eduke32/source/sw/src/jsector.c b/polymer/eduke32/source/sw/src/jsector.c index e0bd02f73..7f984a75e 100644 --- a/polymer/eduke32/source/sw/src/jsector.c +++ b/polymer/eduke32/source/sw/src/jsector.c @@ -52,17 +52,17 @@ MIRRORTYPE mirror[MAXMIRRORS]; short mirrorcnt; //, floormirrorcnt; //short floormirrorsector[MAXMIRRORS]; -BOOL mirrorinview; +SWBOOL mirrorinview; static char tempbuf[/*max(576, */ MAXXDIM /*)*/]; -BOOL MirrorMoveSkip16 = 0; +SWBOOL MirrorMoveSkip16 = 0; // Voxel stuff -//BOOL bVoxelsOn = TRUE; // Turn voxels on by default -BOOL bSpinBobVoxels = FALSE; // Do twizzly stuff to voxels, but +//SWBOOL bVoxelsOn = TRUE; // Turn voxels on by default +SWBOOL bSpinBobVoxels = FALSE; // Do twizzly stuff to voxels, but // not by default -BOOL bAutoSize = TRUE; // Autosizing on/off +SWBOOL bAutoSize = TRUE; // Autosizing on/off //extern int chainnumpages; extern AMB_INFO ambarray[]; @@ -76,7 +76,7 @@ extern ParentalStruct aVoxelArray[MAXTILES]; ///////////////////////////////////////////////////// // SpawnWallSound ///////////////////////////////////////////////////// -VOID +void SpawnWallSound(short sndnum, short i) { short SpriteNum; @@ -321,7 +321,7 @@ JS_InitMirrors(void) short SpriteNum = 0, NextSprite; SPRITEp sp; static short on_cam = 0; - BOOL Found_Cam = FALSE; + SWBOOL Found_Cam = FALSE; // Set all the mirror struct values to -1 @@ -601,8 +601,8 @@ JS_ProcessEchoSpot() SPRITEp tp; int j,dist; PLAYERp pp = Player+screenpeek; - SHORT reverb; - BOOL reverb_set = FALSE; + int16_t reverb; + SWBOOL reverb_set = FALSE; // Process echo sprites 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 // drift! - BOOL bIsWallMirror = FALSE; + SWBOOL bIsWallMirror = FALSE; MirrorMoveSkip16 = (MirrorMoveSkip16 + 1) & 15; @@ -796,7 +796,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz) } else { - BOOL DoCam = FALSE; + SWBOOL DoCam = FALSE; if (mirror[cnt].campic == -1) { @@ -1161,7 +1161,7 @@ InitOrgTile(OrgTileListP thelist) return tp; } -VOID +void KillOrgTile(OrgTileP tp) { ASSERT(tp); @@ -1190,7 +1190,7 @@ FindOrgTile(short index, OrgTileListP thelist) } // Call this at terminate game time -VOID +void JS_UnInitLockouts(void) { OrgTileP tp=NULL, next_tp=NULL; diff --git a/polymer/eduke32/source/sw/src/jsector.h b/polymer/eduke32/source/sw/src/jsector.h index b484039b1..54c5b9a8f 100644 --- a/polymer/eduke32/source/sw/src/jsector.h +++ b/polymer/eduke32/source/sw/src/jsector.h @@ -52,7 +52,7 @@ typedef struct short spawnspots[MAXMIRRORMONSTERS]; // One spot for each possible skill // level for a // 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 // in int maxtics; // Tic count used to time mirror @@ -65,7 +65,7 @@ extern MIRRORTYPE mirror[MAXMIRRORS]; extern short mirrorcnt, floormirrorcnt; extern short floormirrorsector[MAXMIRRORS]; -extern BOOL mirrorinview; +extern SWBOOL mirrorinview; extern short NormalVisibility; void JAnalyzeSprites(SPRITEp tspr); diff --git a/polymer/eduke32/source/sw/src/jweapon.c b/polymer/eduke32/source/sw/src/jweapon.c index 69e991db6..9f1c8aaf1 100644 --- a/polymer/eduke32/source/sw/src/jweapon.c +++ b/polymer/eduke32/source/sw/src/jweapon.c @@ -45,14 +45,14 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms ANIMATOR NullAnimator,DoSuicide; ANIMATOR DoBloodSpray; -int SpawnFlashBombOnActor(SHORT enemy); +int SpawnFlashBombOnActor(int16_t enemy); ANIMATOR DoPuff, BloodSprayFall; extern STATE s_Puff[]; extern STATE s_FireballFlames[]; extern STATE s_GoreFloorSplash[]; extern STATE s_GoreSplash[]; -extern BOOL GlobalSkipZrange; +extern SWBOOL GlobalSkipZrange; #define CHEMTICS SEC(40) @@ -370,11 +370,11 @@ SpawnFloorSplash(short SpriteNum) int -DoBloodSpray(SHORT Weapon) +DoBloodSpray(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; int cz,fz; if (TEST(u->Flags, SPR_UNDERWATER)) @@ -519,7 +519,7 @@ DoBloodSpray(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; // hit floor if (sp->z > DIV2(u->hiz + u->loz)) @@ -608,11 +608,11 @@ DoBloodSpray(SHORT Weapon) int -DoPhosphorus(SHORT Weapon) +DoPhosphorus(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; if (TEST(u->Flags, SPR_UNDERWATER)) { @@ -706,7 +706,7 @@ DoPhosphorus(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(Weapon, &hitwall)) { @@ -835,11 +835,11 @@ DoPhosphorus(SHORT Weapon) } int -DoChemBomb(SHORT Weapon) +DoChemBomb(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; if (TEST(u->Flags, SPR_UNDERWATER)) { @@ -935,7 +935,7 @@ DoChemBomb(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(Weapon, &hitwall)) { @@ -1084,7 +1084,7 @@ DoChemBomb(SHORT Weapon) } int -DoCaltropsStick(SHORT Weapon) +DoCaltropsStick(int16_t Weapon) { USERp u = User[Weapon]; @@ -1097,11 +1097,11 @@ DoCaltropsStick(SHORT Weapon) } int -DoCaltrops(SHORT Weapon) +DoCaltrops(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; if (TEST(u->Flags, SPR_UNDERWATER)) { @@ -1182,7 +1182,7 @@ DoCaltrops(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(Weapon, &hitwall)) { @@ -1462,7 +1462,7 @@ PlayerInitChemBomb(PLAYERp pp) } int -InitSpriteChemBomb(SHORT SpriteNum) +InitSpriteChemBomb(int16_t SpriteNum) { USERp u = User[SpriteNum]; USERp wu; @@ -1666,7 +1666,7 @@ PlayerInitFlashBomb(PLAYERp pp) } int -InitFlashBomb(SHORT SpriteNum) +InitFlashBomb(int16_t SpriteNum) { short pnum, i, nexti; 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 int -SpawnFlashBombOnActor(SHORT enemy) +SpawnFlashBombOnActor(int16_t enemy) { SPRITEp ep = &sprite[enemy]; USERp eu = User[enemy]; @@ -1904,7 +1904,7 @@ PlayerInitCaltrops(PLAYERp pp) } int -InitCaltrops(SHORT SpriteNum) +InitCaltrops(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -1957,7 +1957,7 @@ InitCaltrops(SHORT SpriteNum) } int -InitPhosphorus(SHORT SpriteNum) +InitPhosphorus(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -2017,7 +2017,7 @@ InitPhosphorus(SHORT SpriteNum) } int -InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity) +InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -2107,7 +2107,7 @@ InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity) } int -BloodSprayFall(SHORT SpriteNum) +BloodSprayFall(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -2127,8 +2127,8 @@ BloodSprayFall(SHORT SpriteNum) ////////////////////////////////////////////////////////////////////////////////////////////// // Update the scoreboard for team color that just scored. -VOID -DoFlagScore(SHORT pal) +void +DoFlagScore(int16_t pal) { SPRITEp sp; int SpriteNum = 0, NextSprite = 0; @@ -2199,7 +2199,7 @@ DoFlagRangeTest(short Weapon, short range) } int -DoCarryFlag(SHORT Weapon) +DoCarryFlag(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -2354,7 +2354,7 @@ DoCarryFlag(SHORT Weapon) } int -DoCarryFlagNoDet(SHORT Weapon) +DoCarryFlagNoDet(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -2422,7 +2422,7 @@ DoCarryFlagNoDet(SHORT Weapon) int -SetCarryFlag(SHORT Weapon) +SetCarryFlag(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -2444,11 +2444,11 @@ SetCarryFlag(SHORT Weapon) } int -DoFlag(SHORT Weapon) +DoFlag(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - SHORT hitsprite = -1; + int16_t hitsprite = -1; hitsprite = DoFlagRangeTest(Weapon, 1000); @@ -2474,7 +2474,7 @@ DoFlag(SHORT Weapon) int -InitShell(SHORT SpriteNum, SHORT ShellNum) +InitShell(int16_t SpriteNum, int16_t ShellNum) { USERp u = User[SpriteNum]; USERp wu; diff --git a/polymer/eduke32/source/sw/src/light.c b/polymer/eduke32/source/sw/src/light.c index ec43006ea..ebdbfe122 100644 --- a/polymer/eduke32/source/sw/src/light.c +++ b/polymer/eduke32/source/sw/src/light.c @@ -51,7 +51,7 @@ void SectorLightShade(SPRITEp sp, short intensity) { short w, startwall, endwall; void *void_ptr; - CHARp wall_shade; + int8_t* wall_shade; short base_shade; short wallcount; @@ -102,7 +102,7 @@ void SectorLightShade(SPRITEp sp, short intensity) } -VOID DiffuseLighting(SPRITEp sp) +void DiffuseLighting(SPRITEp sp) { short i, nexti; 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; SPRITEp sp; @@ -255,7 +255,7 @@ VOID DoLightingMatch(short match, short state) } } -VOID InitLighting(VOID) +void InitLighting(void) { short i,nexti; SPRITEp sp; @@ -274,7 +274,7 @@ VOID InitLighting(VOID) } } -VOID DoLighting(VOID) +void DoLighting(void) { short i,nexti; SPRITEp sp; diff --git a/polymer/eduke32/source/sw/src/light.h b/polymer/eduke32/source/sw/src/light.h index e82188e39..bdde8b809 100644 --- a/polymer/eduke32/source/sw/src/light.h +++ b/polymer/eduke32/source/sw/src/light.h @@ -26,10 +26,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms void SectorLightShade(SPRITEp sp, short intensity); -VOID DiffuseLighting(SPRITEp sp); -VOID DoLightingMatch(short match, short state); -VOID InitLighting(VOID); -VOID DoLighting(VOID); +void DiffuseLighting(SPRITEp sp); +void DoLightingMatch(short match, short state); +void InitLighting(void); +void DoLighting(void); // Descriptive Light variables mapped from other variables diff --git a/polymer/eduke32/source/sw/src/mdastr.c b/polymer/eduke32/source/sw/src/mdastr.c index 3431bc2b2..d073cc909 100644 --- a/polymer/eduke32/source/sw/src/mdastr.c +++ b/polymer/eduke32/source/sw/src/mdastr.c @@ -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)) //#if DEBUG -VOID -PokeStringMono(BYTE Attr, BYTEp String) +void +PokeStringMono(uint8_t Attr, uint8_t* String) { fprintf(stderr,"MONO: %s\n",String); #if 0 @@ -46,8 +46,8 @@ PokeStringMono(BYTE Attr, BYTEp String) // EXAMPLE: PokeStringMono(MDA_NORMAL, "Hello, world."); - BYTEp Src, Dest; - LONGp s,d; + uint8_t* Src, Dest; + int32_t* s,d; static char MonoBuf[4000]; #define BASE (MonoBuf) @@ -56,8 +56,8 @@ PokeStringMono(BYTE Attr, BYTEp String) // First scroll the screen up one line. // copy lines 1-24 up to 0 - s = (LONGp)(BASE + LINE_SIZE); - d = (LONGp)BASE; + s = (int32_t*)(BASE + LINE_SIZE); + d = (int32_t*)BASE; memmove(d,s,LINE_OFFSET(24)); // clear bottom line diff --git a/polymer/eduke32/source/sw/src/menus.c b/polymer/eduke32/source/sw/src/menus.c index ac21401ca..e315df054 100644 --- a/polymer/eduke32/source/sw/src/menus.c +++ b/polymer/eduke32/source/sw/src/menus.c @@ -59,40 +59,40 @@ short TimeLimitTable[9] = {0,3,5,10,15,20,30,45,60}; short QuickLoadNum = -1; char QuickLoadDescrDialog[32]; -BOOL QuickSaveMode = FALSE; -BOOL SavePrompt = FALSE; -extern BOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo; -extern BYTE RedBookSong[40]; -extern BOOL ExitLevel, NewGame; +SWBOOL QuickSaveMode = FALSE; +SWBOOL SavePrompt = FALSE; +extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop, LoadGameFromDemo; +extern uint8_t RedBookSong[40]; +extern SWBOOL ExitLevel, NewGame; extern short Level, Skill; -extern BOOL MusicInitialized, FxInitialized; -BOOL MNU_CheckUserMap(MenuItem *item); -BOOL MNU_SaveGameCheck(MenuItem_p item); -BOOL MNU_TeamPlayCheck(MenuItem *item); -BOOL MNU_CoopPlayCheck(MenuItem *item); -BOOL MNU_StatCheck(MenuItem *item); -BOOL MNU_LoadGameCheck(MenuItem *item); -BOOL MNU_TenCheck(MenuItem *item); -static BOOL MNU_TryMusicInit(void); +extern SWBOOL MusicInitialized, FxInitialized; +SWBOOL MNU_CheckUserMap(MenuItem *item); +SWBOOL MNU_SaveGameCheck(MenuItem_p item); +SWBOOL MNU_TeamPlayCheck(MenuItem *item); +SWBOOL MNU_CoopPlayCheck(MenuItem *item); +SWBOOL MNU_StatCheck(MenuItem *item); +SWBOOL MNU_LoadGameCheck(MenuItem *item); +SWBOOL MNU_TenCheck(MenuItem *item); +static SWBOOL MNU_TryMusicInit(void); static void MNU_UpLevel(void); -BOOL MNU_LoadSaveDraw(UserCall call, MenuItem *item); -BOOL MNU_LoadSaveMove(UserCall call, MenuItem *item); +SWBOOL MNU_LoadSaveDraw(UserCall call, MenuItem *item); +SWBOOL MNU_LoadSaveMove(UserCall call, MenuItem *item); -BOOL MenuButtonAutoRun = FALSE; -BOOL MenuButtonAutoAim = FALSE; +SWBOOL MenuButtonAutoRun = FALSE; +SWBOOL MenuButtonAutoAim = FALSE; // misc load-save vars short LastSaveNum = 99; char SaveGameDescr[10][80]; char BackupSaveGameDescr[80]; short screen_tile = -1; -BOOL MenuInputMode = FALSE; -SHORT MenuTextShade = 0; -BOOL passwordvalid = FALSE; +SWBOOL MenuInputMode = FALSE; +int16_t MenuTextShade = 0; +SWBOOL passwordvalid = FALSE; -BOOL MNU_HurtTeammateCheck(MenuItem *item); -BOOL MNU_TeamPlayChange(void); +SWBOOL MNU_HurtTeammateCheck(MenuItem *item); +SWBOOL MNU_TeamPlayChange(void); // Font pic table unsigned short xlatfont[] = @@ -123,7 +123,7 @@ short buttonsettings[btn_max]; #define XDIM 320 #define YDIM 200 extern char DefaultPalette[]; -extern BOOL QuitFlag; +extern SWBOOL QuitFlag; void TerminateGame(void); void ResetKeys(void); @@ -158,7 +158,7 @@ static void UpdateValidModes(int bpp, int fs) numvalidresolutions++; } } -static BOOL ApplyModeSettings(void) +static SWBOOL ApplyModeSettings(void) { int lastx, lasty, lastbpp, lastfs; int newx, newy, newbpp, newfs; @@ -175,7 +175,7 @@ static BOOL ApplyModeSettings(void) setgamemode(lastfs, lastx, lasty, lastbpp); 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; ScreenWidth = newx; 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}; static char MouseButtonFunctions[10][MAXFUNCTIONLENGTH]; -static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item); -static BOOL MNU_MouseButtonPostProcess(MenuItem_p item); -static BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item); +static SWBOOL MNU_SetMouseButtonFunctions(MenuItem_p item); +static SWBOOL MNU_MouseButtonPostProcess(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}; MenuItem mousesetup_i[] = { @@ -289,11 +289,11 @@ static char JoystickButtonPageName[MAXJOYSTICKBUTTONPAGES][64]; static char JoystickButtonFunctions[MAXJOYBUTTONS*2][MAXFUNCTIONLENGTH]; static char JoystickButtonNames[MAXJOYBUTTONS*2][64]; static int JoystickButtonPage = 0; -static BOOL MNU_JoystickButtonsInitialise(MenuItem_p item); -static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item); -static BOOL MNU_JoystickButtonPostProcess(MenuItem_p item); -static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem_p item); -static BOOL MNU_JoystickButtonNextPage(void); +static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p item); +static SWBOOL MNU_SetJoystickButtonFunctions(MenuItem_p item); +static SWBOOL MNU_JoystickButtonPostProcess(MenuItem_p item); +static SWBOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem_p item); +static SWBOOL MNU_JoystickButtonNextPage(void); 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 { @@ -306,11 +306,11 @@ static char JoystickAxisName[64]; static char JoystickAxisPageName[64]; static char JoystickAxisFunctions[2][MAXFUNCTIONLENGTH]; static int JoystickAxisPage = 0; -static BOOL MNU_JoystickAxesInitialise(MenuItem_p item); -static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item); -static BOOL MNU_JoystickAxisPostProcess(MenuItem_p item); -static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem_p item); -static BOOL MNU_JoystickAxisNextPage(void); +static SWBOOL MNU_JoystickAxesInitialise(MenuItem_p item); +static SWBOOL MNU_SetJoystickAxisFunctions(MenuItem_p item); +static SWBOOL MNU_JoystickAxisPostProcess(MenuItem_p item); +static SWBOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem_p item); +static SWBOOL MNU_JoystickAxisNextPage(void); MenuGroup joyaxesgroup = {0, 0, NULL, NULL, 0, 0, m_defshade, MNU_JoystickAxisSetupCustom, NULL, 0}; MenuItem joyaxes_i[] = { @@ -340,9 +340,9 @@ MenuGroup joyaxessetupgroup = {65, 5, "^Joystick Axes", joyaxes_i, pic_newgameti static char AdvancedMouseAxisFunctions[4][MAXAXISFUNCTIONLENGTH] = { "", "", "", "" }; -static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item); -static BOOL MNU_MouseDigitalPostProcess(MenuItem_p item); -static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item); +static SWBOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item); +static SWBOOL MNU_MouseDigitalPostProcess(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}; MenuItem advancedmouse_i[] = { @@ -536,7 +536,7 @@ CTLType ControlPanelType; #define MaxLayers 10 // Maximum layers deep a menu can go short menuarrayptr; // Index into menuarray MenuGroup *menuarray[MaxLayers], *currentmenu; -BOOL UsingMenus = FALSE; +SWBOOL UsingMenus = FALSE; #define MAXDIALOG 2 // Maximum number of dialog strings allowed char *dialog[MAXDIALOG]; @@ -556,18 +556,18 @@ int SENSITIVITY = SENSE_MIN + (SENSE_DEFAULT *SENSE_MUL); UserInput mnu_input, mnu_input_buffered, order_input_buffered; // 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; MenuItem_p cust_callback_item; // Prototypes /////////////////////////////////////////////////////////////////////////////////// static void MNU_ClearDialog(void); -static BOOL MNU_Dialog(void); -VOID LoadSaveMsg(char *msg); -static VOID MNU_ItemPreProcess(MenuGroup *group); -static void MNU_SelectItem(MenuGroup *group, short index, BOOL draw); -static void MNU_PushItem(MenuItem *item, BOOL draw); +static SWBOOL MNU_Dialog(void); +void LoadSaveMsg(char *msg); +static void MNU_ItemPreProcess(MenuGroup *group); +static void MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw); +static void MNU_PushItem(MenuItem *item, SWBOOL draw); static int MNU_ControlAxisOffset(int num); static int MNU_ControlAxisNum(int offset); @@ -578,7 +578,7 @@ static int MNU_ControlAxisNum(int offset); // CUSTOM ROUTINES //////////////////////////////////////////////////////////////////////////////// // CTW REMOVED /* -BOOL +SWBOOL MNU_Ten(void) { TEN_Setup(); @@ -587,7 +587,7 @@ MNU_Ten(void) } */ // CTW REMOVED END -BOOL +SWBOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item) { short w,h; @@ -604,12 +604,12 @@ MNU_DoEpisodeSelect(UserCall call, MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_DoParentalPassword(UserCall call, MenuItem_p item) { short w,h; signed char MNU_InputString(char *, short); - static BOOL cur_show; + static SWBOOL cur_show; char TempString[80]; char *extra_text; @@ -727,7 +727,7 @@ MNU_DoParentalPassword(UserCall call, MenuItem_p item) return TRUE; } -BOOL +SWBOOL MNU_ParentalCustom(void) { @@ -753,7 +753,7 @@ MNU_ParentalCustom(void) return TRUE; } -BOOL MNU_KeySetupCustom(UserCall call, MenuItem *item) +SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item) { static int currentkey = 0, currentcol = 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 BOOL MNU_MouseButtonPostProcess(MenuItem_p item) +static SWBOOL MNU_MouseButtonPostProcess(MenuItem_p item) { mouse_button_item = item; return TRUE; } -BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item) +SWBOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item) { static int currentfunc = 0; @@ -1136,7 +1136,7 @@ BOOL MNU_MouseButtonSetupCustom(UserCall call, MenuItem_p item) return TRUE; } -static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item) +static SWBOOL MNU_SetMouseButtonFunctions(MenuItem_p item) { int button, clicked, function; char *p; @@ -1173,13 +1173,13 @@ static BOOL MNU_SetMouseButtonFunctions(MenuItem_p item) 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; return TRUE; } -static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item) +static SWBOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item) { static int currentfunc = 0; @@ -1227,7 +1227,7 @@ static BOOL MNU_MouseDigitalSetupCustom(UserCall call, MenuItem_p item) return TRUE; } -static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item) +static SWBOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item) { int axis; char *p; @@ -1254,7 +1254,7 @@ static BOOL MNU_SetAdvancedMouseFunctions(MenuItem_p item) 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 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; } -static BOOL MNU_JoystickButtonPostProcess(MenuItem_p item) +static SWBOOL MNU_JoystickButtonPostProcess(MenuItem_p item) { joystick_button_item = item; return TRUE; } -static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item) +static SWBOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item) { static int currentfunc = 0; @@ -1434,7 +1434,7 @@ static BOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item) return TRUE; } -static BOOL MNU_JoystickButtonNextPage(void) +static SWBOOL MNU_JoystickButtonNextPage(void) { JoystickButtonPage = (JoystickButtonPage + 1) % (((joynumbuttons * 2 + (joynumhats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1); joybuttonssetupgroup.items = &joybuttons_i[JoystickButtonPage][0]; @@ -1443,7 +1443,7 @@ static BOOL MNU_JoystickButtonNextPage(void) return TRUE; } -static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item) +static SWBOOL MNU_SetJoystickButtonFunctions(MenuItem_p item) { int button, clicked, function; char *p; @@ -1479,7 +1479,7 @@ static BOOL MNU_SetJoystickButtonFunctions(MenuItem_p item) static MenuItem_p joystick_axis_item = NULL; -static BOOL MNU_JoystickAxesInitialise(MenuItem_p mitem) +static SWBOOL MNU_JoystickAxesInitialise(MenuItem_p mitem) { if (!CONTROL_JoyPresent) { @@ -1500,13 +1500,13 @@ static BOOL MNU_JoystickAxesInitialise(MenuItem_p mitem) return TRUE; } -static BOOL MNU_JoystickAxisPostProcess(MenuItem_p item) +static SWBOOL MNU_JoystickAxisPostProcess(MenuItem_p item) { joystick_axis_item = item; return TRUE; } -static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item) +static SWBOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item) { static int currentfunc = 0; @@ -1555,7 +1555,7 @@ static BOOL MNU_JoystickAxisSetupCustom(UserCall call, MenuItem *item) return TRUE; } -static BOOL MNU_JoystickAxisNextPage(void) +static SWBOOL MNU_JoystickAxisNextPage(void) { JoystickAxisPage = (JoystickAxisPage + 1) % MNU_ControlAxisOffset(analog_maxtype); joyaxessetupgroup.cursor = 1; @@ -1564,7 +1564,7 @@ static BOOL MNU_JoystickAxisNextPage(void) return TRUE; } -static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item) +static SWBOOL MNU_SetJoystickAxisFunctions(MenuItem_p item) { int function; char *p; @@ -1587,16 +1587,16 @@ static BOOL MNU_SetJoystickAxisFunctions(MenuItem_p item) } -BOOL +SWBOOL MNU_OrderCustom(UserCall call, MenuItem *item) { static signed char on_screen = 0,last_screen = 0; UserInput order_input; static int limitmove=0; UserInput tst_input; - BOOL select_held = FALSE; + SWBOOL select_held = FALSE; int zero = 0; - static BOOL DidOrderSound = FALSE; + static SWBOOL DidOrderSound = FALSE; short choose_snd; static int wanghandle; @@ -1858,14 +1858,14 @@ MNU_OrderCustom(UserCall call, MenuItem *item) return TRUE; } -BOOL MNU_LoadModernDefaults(void) +SWBOOL MNU_LoadModernDefaults(void) { SetDefaultKeyDefinitions(1); SetMouseDefaults(1); return TRUE; } -BOOL MNU_LoadClassicDefaults(void) +SWBOOL MNU_LoadClassicDefaults(void) { SetDefaultKeyDefinitions(0); SetMouseDefaults(0); @@ -1888,7 +1888,7 @@ ExitMenus(void) SetRedrawScreen(&Player[myconnectindex]); } -BOOL +SWBOOL MNU_StartGame(void) { PLAYERp pp = Player + screenpeek; @@ -1930,16 +1930,16 @@ MNU_StartGame(void) return TRUE; } -VOID ResetMenuInput(VOID) +void ResetMenuInput(void) { cust_callback = NULL; InputMode = FALSE; } -BOOL +SWBOOL MNU_StartNetGame(void) { - extern BOOL ExitLevel, ShortGameMode, DemoInitOnce, FirstTimeIntoGame; + extern SWBOOL ExitLevel, ShortGameMode, DemoInitOnce, FirstTimeIntoGame; extern short Level, Skill; // CTW REMOVED //extern int gTenActivated; @@ -2010,7 +2010,7 @@ MNU_StartNetGame(void) p.TimeLimit = gs.NetTimeLimit; 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) { EpisodeMenuSelection = currentmenu->cursor; @@ -2026,12 +2026,12 @@ MNU_EpisodeCustom(void) return TRUE; } -BOOL +SWBOOL MNU_QuitCustom(UserCall call, MenuItem_p item) { int select; int ret; - extern BOOL DrawScreen; + extern SWBOOL DrawScreen; // Ignore the special touchup calls if (call == uc_touchup) @@ -2087,15 +2087,15 @@ MNU_QuitCustom(UserCall call, MenuItem_p item) return TRUE; } -BOOL +SWBOOL MNU_QuickLoadCustom(UserCall call, MenuItem_p item) { int select; - extern BOOL ReloadPrompt; + extern SWBOOL ReloadPrompt; int bak; PLAYERp pp = Player + myconnectindex; extern short GlobInfoStringTime; - extern BOOL DrawScreen; + extern SWBOOL DrawScreen; int ret; if (cust_callback == NULL) @@ -2595,7 +2595,7 @@ MNU_InputSmallString(char *name, short pix_width) //////////////////////////////////////////////// // Draw dialog text on screen //////////////////////////////////////////////// -static BOOL +static SWBOOL MNU_Dialog(void) { 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_BORDER_SIZE 5L -VOID LoadSaveMsg(char *msg) +void LoadSaveMsg(char *msg) { short w,h; @@ -2716,7 +2716,7 @@ VOID LoadSaveMsg(char *msg) // I'm figuring it need to do the following: // . Load the game if there is one by calling: MNU_LoadGameCustom. //////////////////////////////////////////////// -BOOL +SWBOOL MNU_GetLoadCustom(void) { short load_num; @@ -2783,11 +2783,11 @@ MNU_GetLoadCustom(void) // . Call MNU_GetInput to allow string input of description. // . Save the game if there is one by calling: MNU_SaveGameCustom. //////////////////////////////////////////////// -BOOL +SWBOOL MNU_GetSaveCustom(void) { short save_num; - extern BOOL InMenuLevel, LoadGameOutsideMoveLoop; + extern SWBOOL InMenuLevel, LoadGameOutsideMoveLoop; save_num = currentmenu->cursor; @@ -2837,7 +2837,7 @@ MNU_GetSaveCustom(void) // This function gets called each frame by DrawMenus //////////////////////////////////////////////// -static BOOL +static SWBOOL MNU_DrawLoadSave(short game_num) { // screen border @@ -2858,14 +2858,14 @@ MNU_DrawLoadSave(short game_num) static char SaveGameInfo1[80]; static char SaveGameInfo2[80]; -BOOL +SWBOOL MNU_LoadSaveMove(UserCall call, MenuItem_p item) { short i; short game_num; short tile; static short SaveGameEpisode, SaveGameLevel, SaveGameSkill; - BOOL GotInput = FALSE; + SWBOOL GotInput = FALSE; if (!UsingMenus) return TRUE; @@ -2967,7 +2967,7 @@ MNU_LoadSaveMove(UserCall call, MenuItem_p item) return TRUE; } -BOOL +SWBOOL MNU_LoadSaveDraw(UserCall call, MenuItem_p item) { short i; @@ -2984,7 +2984,7 @@ MNU_LoadSaveDraw(UserCall call, MenuItem_p item) { if (i == game_num && MenuInputMode && !SavePrompt) { - static BOOL cur_show; + static SWBOOL cur_show; char tmp[sizeof(SaveGameDescr[0])]; //cur_show ^= 1; @@ -3034,7 +3034,7 @@ MNU_LoadSaveDraw(UserCall call, MenuItem_p item) return TRUE; } -BOOL +SWBOOL MNU_ShareWareCheck(MenuItem *item) { if (SW_SHAREWARE) @@ -3045,7 +3045,7 @@ MNU_ShareWareCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_CheckUserMap(MenuItem *item) { if (UserMapName[0] == '\0') @@ -3055,7 +3055,7 @@ MNU_CheckUserMap(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_ShareWareMessage(MenuItem *item) { char *extra_text; @@ -3086,11 +3086,11 @@ MNU_ShareWareMessage(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_SaveGameCheck(MenuItem *item) { - extern BOOL InMenuLevel; - extern BOOL DemoMode; + extern SWBOOL InMenuLevel; + extern SWBOOL DemoMode; if (0) // JBF: Until we fix the symbol table dilemma, saving is off limits { @@ -3118,7 +3118,7 @@ MNU_SaveGameCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_TenCheck(MenuItem *item) { if (CommEnabled || numplayers > 1) @@ -3130,7 +3130,7 @@ MNU_TenCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_LoadGameCheck(MenuItem *item) { @@ -3149,7 +3149,7 @@ MNU_LoadGameCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_StatCheck(MenuItem *item) { if (CommEnabled || numplayers > 1) @@ -3161,7 +3161,7 @@ MNU_StatCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_HurtTeammateCheck(MenuItem *item) { switch (gs.NetGameType+1) @@ -3183,7 +3183,7 @@ MNU_HurtTeammateCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_TeamPlayCheck(MenuItem *item) { switch (gs.NetGameType+1) @@ -3200,7 +3200,7 @@ MNU_TeamPlayCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_CoopPlayCheck(MenuItem *item) { switch (gs.NetGameType+1) @@ -3217,7 +3217,7 @@ MNU_CoopPlayCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_TeamPlayChange(void) { // if team play changes then do a pre process again @@ -3225,7 +3225,7 @@ MNU_TeamPlayChange(void) return TRUE; } -BOOL +SWBOOL MNU_MouseCheck(MenuItem *item) { if (!CONTROL_MousePresent) @@ -3240,7 +3240,7 @@ MNU_MouseCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_JoystickCheck(MenuItem *item) { if (!CONTROL_JoyPresent) @@ -3256,7 +3256,7 @@ MNU_JoystickCheck(MenuItem *item) } // This is only called when Enter is pressed -static BOOL +static SWBOOL MNU_TryMusicInit(void) { if (PlaySong(0, RedBookSong[Level], TRUE, FALSE)) @@ -3268,7 +3268,7 @@ MNU_TryMusicInit(void) return TRUE; } -BOOL +SWBOOL MNU_MusicCheck(MenuItem *item) { if (SW_SHAREWARE) @@ -3299,7 +3299,7 @@ MNU_MusicCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_FxCheck(MenuItem *item) { if (FXDevice < 0 || !FxInitialized) @@ -3314,7 +3314,7 @@ MNU_FxCheck(MenuItem *item) return TRUE; } -BOOL +SWBOOL MNU_MusicFxCheck(MenuItem *item) { if (FXDevice < 0 && MusicDevice < 0) @@ -3333,10 +3333,10 @@ MNU_MusicFxCheck(MenuItem *item) // Do a toggle button //////////////////////////////////////////////// void -MNU_DoButton(MenuItem_p item, BOOL draw) +MNU_DoButton(MenuItem_p item, SWBOOL draw) { int x, y; - BOOL state; + SWBOOL state; int last_value; short shade = MENU_SHADE_DEFAULT; extern char LevelSong[]; @@ -3344,7 +3344,7 @@ MNU_DoButton(MenuItem_p item, BOOL draw) PLAYERp pp = &Player[myconnectindex]; int button_x,zero=0; int handle=0; - extern BOOL MusicInitialized,FxInitialized; + extern SWBOOL MusicInitialized,FxInitialized; button_x = OPT_XSIDE; @@ -3430,7 +3430,7 @@ MNU_DoButton(MenuItem_p item, BOOL draw) gs.MusicOn = state = buttonsettings[item->button]; if (gs.MusicOn != last_value) { - BOOL bak; + SWBOOL bak; if (gs.MusicOn) { @@ -3611,7 +3611,7 @@ char *playercolors[] = {"Brown","Gray","Purple","Red","Yellow","Olive","Green"," char *monsterskills[] = {"No Monsters","Easy","Normal","Hard","Insane!"}; void -MNU_DoSlider(short dir, MenuItem_p item, BOOL draw) +MNU_DoSlider(short dir, MenuItem_p item, SWBOOL draw) { short offset, i, barwidth; int x, y, knobx; @@ -4154,7 +4154,7 @@ MNU_SetupGroup(void) MNU_DrawMenu(); } -static VOID +static void MNU_ItemPreProcess(MenuGroup *group) { MenuItem *item; @@ -4171,7 +4171,7 @@ MNU_ItemPreProcess(MenuGroup *group) } } -VOID +void MNU_ItemPostProcess(MenuGroup *group) { MenuItem *item; @@ -4445,7 +4445,7 @@ MNU_DrawMenu(void) // Select a menu item //////////////////////////////////////////////// void -MNU_SelectItem(MenuGroup *group, short index, BOOL draw) +MNU_SelectItem(MenuGroup *group, short index, SWBOOL draw) { MenuItem *item; @@ -4468,7 +4468,7 @@ MNU_SelectItem(MenuGroup *group, short index, BOOL draw) // Toggle a menu radio button on/off //////////////////////////////////////////////// static void -MNU_PushItem(MenuItem *item, BOOL draw) +MNU_PushItem(MenuItem *item, SWBOOL draw) { if (item->type != mt_button) return; @@ -4526,7 +4526,7 @@ MNU_PrevItem(void) //////////////////////////////////////////////// // Find hotkey press on current menu, if any. //////////////////////////////////////////////// -static BOOL +static SWBOOL MNU_DoHotkey(void) { MenuItem_p item; @@ -4575,12 +4575,12 @@ SetupMenu(void) void MNU_DoMenu(CTLType type, PLAYERp pp) { - BOOL resetitem; + SWBOOL resetitem; UCHAR key; int zero = 0; static int handle2 = 0; static int limitmove=0; - static BOOL select_held=FALSE; + static SWBOOL select_held=FALSE; resetitem = TRUE; @@ -4602,7 +4602,7 @@ void MNU_DoMenu(CTLType type, PLAYERp pp) if (!MenuInputMode) { UserInput tst_input; - BOOL select_held = FALSE; + SWBOOL select_held = FALSE; // Zero out the input structure @@ -4720,7 +4720,7 @@ void MNU_DoMenu(CTLType type, PLAYERp pp) void MNU_CheckForMenus(void) { - extern BOOL GamePaused; + extern SWBOOL GamePaused; if (UsingMenus) { @@ -5263,7 +5263,7 @@ DoPaletteFlash(PLAYERp pp) } -VOID ResetPalette(PLAYERp pp) +void ResetPalette(PLAYERp pp) { if (getrendermode() < 3) COVERsetbrightness(gs.Brightness,&palette_data[0][0]); diff --git a/polymer/eduke32/source/sw/src/menus.h b/polymer/eduke32/source/sw/src/menus.h index 16327af68..c7d9638c1 100644 --- a/polymer/eduke32/source/sw/src/menus.h +++ b/polymer/eduke32/source/sw/src/menus.h @@ -39,11 +39,11 @@ typedef enum ct_quitmenu, ct_ordermenu, ct_episodemenu, ct_max } CTLType; -extern BOOL UsingMenus; +extern SWBOOL UsingMenus; extern int SENSITIVITY; extern CTLType ControlPanelType; -extern SHORT MenuTextShade; -extern SHORT MenuTextPalette; +extern int16_t MenuTextShade; +extern int16_t MenuTextPalette; // Prototypes //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 FadeIn(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 ResetMenuInput(VOID); +void ResetMenuInput(void); #define BUTTONSET(x,value) \ ( \ @@ -79,9 +79,9 @@ VOID ResetMenuInput(VOID); (CONTROL_ButtonState1 |= (value<<(x))) \ ) -extern BOOL BorderAdjust; +extern SWBOOL BorderAdjust; extern int FXDevice,MusicDevice; -extern BOOL MultiPlayQuitFlag; +extern SWBOOL MultiPlayQuitFlag; // Make memcpy an intrinsic function for an easy frame rate boost //#pragma intrinsic( memcpy ); @@ -259,10 +259,10 @@ typedef struct MENU_ITEM short pic; // Startpic to use char shade; // Shade of pic 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 *); - BOOL (*postprocess)(struct MENU_ITEM *); // Can do things on items select + SWBOOL (*preprocess)(struct MENU_ITEM *); + SWBOOL (*postprocess)(struct MENU_ITEM *); // Can do things on items select } MenuItem, *MenuItem_p; typedef struct @@ -275,8 +275,8 @@ typedef struct // anim sequence if animated. char shade; // Title pic shade - BOOL(*draw_custom)(UserCall, MenuItem *); // Custom routine - BOOL(*move_custom)(UserCall, MenuItem *); // Custom routine + SWBOOL(*draw_custom)(UserCall, MenuItem *); // Custom routine + SWBOOL(*move_custom)(UserCall, MenuItem *); // Custom routine short cursor; // This is the current menu item the // cursor is resting on. @@ -284,37 +284,37 @@ typedef struct // Custom Routine Prototypes //////////////////////////////////////////////////////////////////// -BOOL MNU_QuitCustom(UserCall call, MenuItem *item); -BOOL MNU_QuickLoadCustom(UserCall call, MenuItem *item); -BOOL MNU_LoadSaveTouchupCustom(UserCall call, MenuItem *item); -BOOL MNU_DoParentalPassword(UserCall call, MenuItem *item); -BOOL MNU_OrderCustom(UserCall call, MenuItem *item); -BOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item); +SWBOOL MNU_QuitCustom(UserCall call, MenuItem *item); +SWBOOL MNU_QuickLoadCustom(UserCall call, MenuItem *item); +SWBOOL MNU_LoadSaveTouchupCustom(UserCall call, MenuItem *item); +SWBOOL MNU_DoParentalPassword(UserCall call, MenuItem *item); +SWBOOL MNU_OrderCustom(UserCall call, MenuItem *item); +SWBOOL MNU_DoEpisodeSelect(UserCall call, MenuItem *item); -BOOL MNU_MusicFxCheck(MenuItem_p item); -BOOL MNU_MusicCheck(MenuItem_p item); -BOOL MNU_FxCheck(MenuItem_p item); -BOOL MNU_MouseCheck(MenuItem_p item); -BOOL MNU_JoystickCheck(MenuItem_p item); -BOOL MNU_BorderCheck(MenuItem_p item); -BOOL MNU_ShareWareCheck(MenuItem_p item); -BOOL MNU_MenuLevelCheck(MenuItem_p item); -BOOL MNU_ShareWareMessage(MenuItem_p item); +SWBOOL MNU_MusicFxCheck(MenuItem_p item); +SWBOOL MNU_MusicCheck(MenuItem_p item); +SWBOOL MNU_FxCheck(MenuItem_p item); +SWBOOL MNU_MouseCheck(MenuItem_p item); +SWBOOL MNU_JoystickCheck(MenuItem_p item); +SWBOOL MNU_BorderCheck(MenuItem_p item); +SWBOOL MNU_ShareWareCheck(MenuItem_p item); +SWBOOL MNU_MenuLevelCheck(MenuItem_p item); +SWBOOL MNU_ShareWareMessage(MenuItem_p item); // Custom MenuItem Routines ///////////////////////////////////////////////////////////////////// -BOOL MNU_StartGame(void); -BOOL MNU_StartNetGame(void); -BOOL MNU_EpisodeCustom(void); -BOOL MNU_GetDescripCustom(void); -BOOL MNU_LoadGameCustom(void); -BOOL MNU_SaveGameCustom(void); -BOOL MNU_GetLoadCustom(void); -BOOL MNU_GetSaveCustom(void); -BOOL MNU_ParentalCustom(void); -BOOL MNU_KeySetupCustom(UserCall call, MenuItem *item); -BOOL MNU_LoadModernDefaults(void); -BOOL MNU_LoadClassicDefaults(void); +SWBOOL MNU_StartGame(void); +SWBOOL MNU_StartNetGame(void); +SWBOOL MNU_EpisodeCustom(void); +SWBOOL MNU_GetDescripCustom(void); +SWBOOL MNU_LoadGameCustom(void); +SWBOOL MNU_SaveGameCustom(void); +SWBOOL MNU_GetLoadCustom(void); +SWBOOL MNU_GetSaveCustom(void); +SWBOOL MNU_ParentalCustom(void); +SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item); +SWBOOL MNU_LoadModernDefaults(void); +SWBOOL MNU_LoadClassicDefaults(void); // Menu Definitions ///////////////////////////////////////////////////////////////////////////// diff --git a/polymer/eduke32/source/sw/src/miscactr.c b/polymer/eduke32/source/sw/src/miscactr.c index 1ca20f61b..bdf4dccb4 100644 --- a/polymer/eduke32/source/sw/src/miscactr.c +++ b/polymer/eduke32/source/sw/src/miscactr.c @@ -156,7 +156,7 @@ int DoToiletGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int handle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -217,7 +217,7 @@ int NullToiletGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -404,7 +404,7 @@ int DoWashGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int handle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -472,7 +472,7 @@ int NullWashGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -745,7 +745,7 @@ int PachinkoLightOperate(short SpriteNum) // PACHINKO MACHINE #1 //////////////////////////////////////////////////////////////////// -BOOL Pachinko_Win_Cheat = FALSE; +SWBOOL Pachinko_Win_Cheat = FALSE; ATTRIBUTE Pachinko1Attrib = { @@ -1291,7 +1291,7 @@ int DoCarGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int handle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -1342,7 +1342,7 @@ int NullCarGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -1518,7 +1518,7 @@ int DoMechanicGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int handle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -1569,7 +1569,7 @@ int NullMechanicGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -1746,7 +1746,7 @@ int DoSailorGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int handle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -1801,7 +1801,7 @@ int NullSailorGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; static short alreadythrew = 0; DoActorPickClosePlayer(SpriteNum); @@ -1966,7 +1966,7 @@ int DoPruneGirl(short SpriteNum) SPRITEp sp = User[SpriteNum]->SpriteP; short rnd_range = 0; static int madhandle=0,coyhandle=0; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); @@ -2031,7 +2031,7 @@ int NullPruneGirl(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = User[SpriteNum]->SpriteP; - BOOL ICanSee = FALSE; + SWBOOL ICanSee = FALSE; 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); diff --git a/polymer/eduke32/source/sw/src/morph.c b/polymer/eduke32/source/sw/src/morph.c index 0b6acbb21..d3da939b1 100644 --- a/polymer/eduke32/source/sw/src/morph.c +++ b/polymer/eduke32/source/sw/src/morph.c @@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" #include "game.h" -VOID ScaleSectorObject(SECTOR_OBJECTp); +void ScaleSectorObject(SECTOR_OBJECTp); short DoSectorObjectSetScale(short match) @@ -185,7 +185,7 @@ DoSOevent(short match, short state) // SCALING - PreAnimator // -VOID ScaleSectorObject(SECTOR_OBJECTp sop) +void ScaleSectorObject(SECTOR_OBJECTp sop) { 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; @@ -293,7 +293,7 @@ VOID ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int // Morph point - move point around // -VOID +void MorphTornado(SECTOR_OBJECTp sop) { int mx, my; @@ -375,7 +375,7 @@ MorphTornado(SECTOR_OBJECTp sop) } // moves center point around and aligns slope -VOID +void MorphFloor(SECTOR_OBJECTp sop) { int mx, my; @@ -455,7 +455,7 @@ MorphFloor(SECTOR_OBJECTp sop) } } -VOID +void SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z) { 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) { 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) { SECTORp *sectp; @@ -505,7 +505,7 @@ SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z) } // moves center point around and aligns slope -VOID +void SpikeFloor(SECTOR_OBJECTp sop) { int mx, my; diff --git a/polymer/eduke32/source/sw/src/mytypes.h b/polymer/eduke32/source/sw/src/mytypes.h index d3f7a8a75..0accc41af 100644 --- a/polymer/eduke32/source/sw/src/mytypes.h +++ b/polymer/eduke32/source/sw/src/mytypes.h @@ -28,40 +28,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define TYPES_H -// CTW ADDITION (from Duke 3d TYPES.H) -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 - +#ifndef FALSE #define FALSE 0 +#endif +#ifndef TRUE #define TRUE (!FALSE) - +#endif #ifndef NULL #define NULL 0 #endif @@ -69,135 +41,7 @@ typedef float64 appfloat; #define OFF 0 #define ON (!OFF) -typedef unsigned char BOOL; -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); +typedef unsigned char SWBOOL; /* =========================== diff --git a/polymer/eduke32/source/sw/src/net.c b/polymer/eduke32/source/sw/src/net.c index 49fc40723..8f9b4656f 100644 --- a/polymer/eduke32/source/sw/src/net.c +++ b/polymer/eduke32/source/sw/src/net.c @@ -62,9 +62,9 @@ SYNC BUG NOTES: //#undef MAXSYNCBYTES //#define MAXSYNCBYTES 16 -BYTE tempbuf[576], packbuf[576]; +uint8_t tempbuf[576], packbuf[576]; int PlayClock; -extern BOOL PauseKeySet; +extern SWBOOL PauseKeySet; extern char CommPlayerName[32]; gNET gNet; @@ -80,16 +80,16 @@ SW_PACKET loc; //SW_PACKET oloc; -BOOL ready2send = 0; +SWBOOL ready2send = 0; -BOOL CommEnabled = FALSE; -BYTE CommPlayers = 0; +SWBOOL CommEnabled = FALSE; +uint8_t CommPlayers = 0; int movefifoplc, movefifosendplc; //, movefifoend[MAX_SW_PLAYERS]; unsigned int MoveThingsCount; //int myminlag[MAX_SW_PLAYERS]; int mymaxlag, otherminlag, bufferjitter = 1; -extern CHAR sync_first[MAXSYNCBYTES][60]; +extern int8_t sync_first[MAXSYNCBYTES][60]; extern int sync_found; // @@ -97,21 +97,21 @@ extern int sync_found; // typedef struct { - LONG vel; - LONG svel; - LONG angvel; - LONG aimvel; - LONG bits; + int32_t vel; + int32_t svel; + int32_t angvel; + int32_t aimvel; + int32_t bits; } SW_AVERAGE_PACKET; int MovesPerPacket = 1; SW_AVERAGE_PACKET AveragePacket; // GAME.C sync state variables -BYTE syncstat[MAXSYNCBYTES]; +uint8_t syncstat[MAXSYNCBYTES]; //int syncvalhead[MAX_SW_PLAYERS]; 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 int ototalclock; @@ -120,14 +120,14 @@ int save_totalclock; // must start out as 0 -BOOL GamePaused = FALSE; -BOOL NetBroadcastMode = TRUE; -BOOL NetModeOverride = FALSE; +SWBOOL GamePaused = FALSE; +SWBOOL NetBroadcastMode = TRUE; +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; int i; @@ -146,7 +146,7 @@ void netsendpacket(int ind, BYTEp buf, int len) buildputs("\n"); 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) len += sizeof(PACKET_PROXY); @@ -162,10 +162,10 @@ void netsendpacket(int ind, BYTEp buf, int len) buildputs("\n"); } -void netbroadcastpacket(BYTEp buf, int len) +void netbroadcastpacket(uint8_t* buf, int len) { int i; - BYTE bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)]; + uint8_t bbuf[sizeof(packbuf) + sizeof(PACKET_PROXY)]; PACKET_PROXYp prx = (PACKET_PROXYp)bbuf; // 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"); prx->PacketType = PACKET_TYPE_PROXY; - prx->PlayerIndex = (BYTE)(-1); + prx->PlayerIndex = (uint8_t)(-1); memcpy(&prx[1], buf, len); len += sizeof(PACKET_PROXY); @@ -203,7 +203,7 @@ void netbroadcastpacket(BYTEp buf, int len) buildputs("\n"); } -int netgetpacket(int *ind, BYTEp buf) +int netgetpacket(int *ind, uint8_t* buf) { int i; int len; @@ -233,12 +233,12 @@ int netgetpacket(int *ind, BYTEp buf) { // I am the master - if (prx->PlayerIndex == (BYTE)(-1)) + if (prx->PlayerIndex == (uint8_t)(-1)) { // broadcast // 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 for (i = connecthead; i >= 0; i = connectpoint2[i]) @@ -260,7 +260,7 @@ int netgetpacket(int *ind, BYTEp buf) i = prx->PlayerIndex; // 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 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; // 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; } -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; // 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; } -VOID -PauseGame(VOID) +void +PauseGame(void) { if (PauseKeySet) return; @@ -406,8 +406,8 @@ PauseGame(VOID) GamePaused = TRUE; } -VOID -ResumeGame(VOID) +void +ResumeGame(void) { if (PauseKeySet) return; @@ -419,21 +419,21 @@ ResumeGame(VOID) GamePaused = FALSE; } -VOID -PauseAction(VOID) +void +PauseAction(void) { ready2send = 0; save_totalclock = totalclock; } -VOID -ResumeAction(VOID) +void +ResumeAction(void) { ready2send = 1; totalclock = save_totalclock; } -VOID +void SendMessage(short pnum, char *text) { if (!CommEnabled) @@ -445,8 +445,8 @@ SendMessage(short pnum, char *text) } -VOID -InitNetPlayerOptions(VOID) +void +InitNetPlayerOptions(void) { short pnum; PLAYERp pp = Player + myconnectindex; @@ -476,13 +476,13 @@ InitNetPlayerOptions(VOID) //if (pnum != myconnectindex) { //netsendpacket(pnum, (char *)(&p), sizeof(p)); - netbroadcastpacket((BYTEp)(&p), sizeof(p)); + netbroadcastpacket((uint8_t*)(&p), sizeof(p)); } } } } -VOID +void SendMulitNameChange(char *new_name) { short pnum; @@ -504,12 +504,12 @@ SendMulitNameChange(char *new_name) p.PacketType = PACKET_TYPE_NAME_CHANGE; strcpy(p.PlayerName, pp->PlayerName); //netsendpacket(pnum, (char *)(&p), sizeof(p)); - netbroadcastpacket((BYTEp)(&p), sizeof(p)); + netbroadcastpacket((uint8_t*)(&p), sizeof(p)); } } } -VOID +void SendVersion(int version) { short pnum; @@ -528,12 +528,12 @@ SendVersion(int version) p.PacketType = PACKET_TYPE_VERSION; p.Version = version; //netsendpacket(pnum, (char *)(&p), sizeof(p)); - netbroadcastpacket((BYTEp)(&p), sizeof(p)); + netbroadcastpacket((uint8_t*)(&p), sizeof(p)); } } } -VOID +void CheckVersion(int GameVersion) { short pnum; @@ -573,8 +573,8 @@ CheckVersion(int GameVersion) } } -VOID -Connect(VOID) +void +Connect(void) { int players_found, i, yline; short other; @@ -602,7 +602,7 @@ Connect(VOID) } int wfe_Clock; -BOOL (*wfe_ExitCallback)(VOID); +SWBOOL (*wfe_ExitCallback)(void); void waitforeverybody(void) @@ -699,12 +699,12 @@ waitforeverybody(void) } -BOOL MyCommPlayerQuit(void) +SWBOOL MyCommPlayerQuit(void) { PLAYERp pp; short i; short prev_player = 0; - extern BOOL QuitFlag; + extern SWBOOL QuitFlag; short found = FALSE; short quit_player_index = 0; @@ -782,7 +782,7 @@ BOOL MyCommPlayerQuit(void) return FALSE; } -BOOL MenuCommPlayerQuit(short quit_player) +SWBOOL MenuCommPlayerQuit(short quit_player) { PLAYERp pp; short i; @@ -833,7 +833,7 @@ BOOL MenuCommPlayerQuit(short quit_player) return FALSE; } -VOID ErrorCorrectionQuit(VOID) +void ErrorCorrectionQuit(void) { int oldtotalclock; short i,j; @@ -855,8 +855,8 @@ VOID ErrorCorrectionQuit(VOID) } } -VOID -InitNetVars(VOID) +void +InitNetVars(void) { short pnum; PLAYERp pp; @@ -889,8 +889,8 @@ InitNetVars(VOID) otherminlag = mymaxlag = 0; } -VOID -InitTimingVars(VOID) +void +InitTimingVars(void) { PlayClock = 0; @@ -939,7 +939,7 @@ faketimerhandler(void) PLAYERp pp; short pnum; void getinput(SW_PACKET *); - extern BOOL BotMode; + extern SWBOOL BotMode; #if 0 if (KEY_PRESSED(KEYSC_PERIOD)) @@ -1247,13 +1247,13 @@ faketimerhandler(void) } } -VOID -checkmasterslaveswitch(VOID) +void +checkmasterslaveswitch(void) { } -VOID -getpackets(VOID) +void +getpackets(void) { int otherconnectindex, packbufleng; int i, j, k, l, fifoCheck, sb; @@ -1473,7 +1473,7 @@ getpackets(VOID) case PACKET_TYPE_NEW_GAME: { - extern BOOL NewGame, ShortGameMode, DemoInitOnce; + extern SWBOOL NewGame, ShortGameMode, DemoInitOnce; PACKET_NEW_GAMEp p; extern short TimeLimitTable[]; diff --git a/polymer/eduke32/source/sw/src/net.h b/polymer/eduke32/source/sw/src/net.h index 2f704e40b..01e67ca79 100644 --- a/polymer/eduke32/source/sw/src/net.h +++ b/polymer/eduke32/source/sw/src/net.h @@ -66,50 +66,50 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // Master->Slave: PlayerIndex = who sent the packet originally typedef struct PACKED { - BYTE PacketType; // first byte is always packet type - BYTE PlayerIndex; + uint8_t PacketType; // first byte is always packet type + uint8_t PlayerIndex; } PACKET_PROXY,*PACKET_PROXYp; typedef struct PACKED { - BYTE PacketType; // first byte is always packet type - BYTE FirstPlayerIndex; - BOOL AutoAim; - BYTE Level; - BYTE Episode; - CHAR Skill; - BYTE GameType; - BOOL HurtTeammate; - BOOL SpawnMarkers; - BOOL TeamPlay; - BYTE KillLimit; - BYTE TimeLimit; - BOOL Nuke; + uint8_t PacketType; // first byte is always packet type + uint8_t FirstPlayerIndex; + SWBOOL AutoAim; + uint8_t Level; + uint8_t Episode; + int8_t Skill; + uint8_t GameType; + SWBOOL HurtTeammate; + SWBOOL SpawnMarkers; + SWBOOL TeamPlay; + uint8_t KillLimit; + uint8_t TimeLimit; + SWBOOL Nuke; } PACKET_NEW_GAME,*PACKET_NEW_GAMEp; typedef struct PACKED { - BYTE PacketType; // first byte is always packet type - BOOL AutoRun; - BYTE Color; + uint8_t PacketType; // first byte is always packet type + SWBOOL AutoRun; + uint8_t Color; char PlayerName[32]; } PACKET_OPTIONS,*PACKET_OPTIONSp; typedef struct PACKED { - BYTE PacketType; // first byte is always packet type + uint8_t PacketType; // first byte is always packet type char PlayerName[32]; } PACKET_NAME_CHANGE,*PACKET_NAME_CHANGEp; typedef struct PACKED { - BYTE PacketType; // first byte is always packet type - BYTE RTSnum; + uint8_t PacketType; // first byte is always packet type + uint8_t RTSnum; } PACKET_RTS,*PACKET_RTSp; typedef struct PACKED { - BYTE PacketType; // first byte is always packet type + uint8_t PacketType; // first byte is always packet type int Version; } PACKET_VERSION,*PACKET_VERSIONp; @@ -121,13 +121,13 @@ typedef struct PACKED # pragma pack(pop); #endif -extern BYTE syncstat[MAXSYNCBYTES]; -extern BOOL PredictionOn; +extern uint8_t syncstat[MAXSYNCBYTES]; +extern SWBOOL PredictionOn; extern PLAYER PredictPlayer; extern PLAYERp ppp; extern short predictangpos[MOVEFIFOSIZ]; extern int predictmovefifoplc; -extern BOOL Prediction; +extern SWBOOL Prediction; extern short NumSyncBytes; void InitPrediction(PLAYERp pp); @@ -135,9 +135,9 @@ void DoPrediction(PLAYERp ppp); void CorrectPrediction(int actualfifoplc); //TENSW: safe packet senders -void netsendpacket(int ind, BYTEp buf, int len); -void netbroadcastpacket(BYTEp buf, int len); -int netgetpacket(int *ind, BYTEp buf); +void netsendpacket(int ind, uint8_t* buf, int len); +void netbroadcastpacket(uint8_t* buf, int len); +int netgetpacket(int *ind, uint8_t* buf); enum MultiGameTypes @@ -149,23 +149,23 @@ enum MultiGameTypes MULTI_GAME_AI_BOTS }; -//extern SHORT MultiGameType; // defaults to NONE +//extern int16_t MultiGameType; // defaults to NONE // global net vars // not saved in .CFG file // used for current game typedef struct { - LONG KillLimit; - LONG TimeLimit; - LONG TimeLimitClock; - SHORT MultiGameType; // used to be a stand alone global - BOOL TeamPlay; - BOOL HurtTeammate; - BOOL SpawnMarkers; - BOOL AutoAim; - BOOL NoRespawn; // for commbat type games - BOOL Nuke; + int32_t KillLimit; + int32_t TimeLimit; + int32_t TimeLimitClock; + int16_t MultiGameType; // used to be a stand alone global + SWBOOL TeamPlay; + SWBOOL HurtTeammate; + SWBOOL SpawnMarkers; + SWBOOL AutoAim; + SWBOOL NoRespawn; // for commbat type games + SWBOOL Nuke; } gNET,*gNETp; extern gNET gNet; @@ -185,22 +185,22 @@ typedef struct } AUTO_NET, *AUTO_NETp; extern AUTO_NET Auto; -extern BOOL AutoNet; +extern SWBOOL AutoNet; -VOID getpackets(VOID); -VOID SendMulitNameChange(char *new_name); -VOID InitNetVars(void); -VOID InitTimingVars(void); -VOID PauseAction(void); -VOID ResumeAction(void); +void getpackets(void); +void SendMulitNameChange(char *new_name); +void InitNetVars(void); +void InitTimingVars(void); +void PauseAction(void); +void ResumeAction(void); void ErrorCorrectionQuit(void); void Connect(void); void waitforeverybody(void); -BOOL MenuCommPlayerQuit(short quit_player); -VOID SendVersion(int version); -VOID InitNetPlayerOptions(void); -VOID CheckVersion(int GameVersion); -VOID SendMessage(short pnum,char *text); +SWBOOL MenuCommPlayerQuit(short quit_player); +void SendVersion(int version); +void InitNetPlayerOptions(void); +void CheckVersion(int GameVersion); +void SendMessage(short pnum,char *text); void PauseGame(void); void ResumeGame(void); diff --git a/polymer/eduke32/source/sw/src/ninja.c b/polymer/eduke32/source/sw/src/ninja.c index 340065354..881948fcf 100644 --- a/polymer/eduke32/source/sw/src/ninja.c +++ b/polymer/eduke32/source/sw/src/ninja.c @@ -2140,8 +2140,8 @@ DoNinjaCeiling(short SpriteNum) // too convienent to put it here. // -VOID -InitAllPlayerSprites(VOID) +void +InitAllPlayerSprites(void) { short i, sp_num; USERp u; @@ -2153,7 +2153,7 @@ InitAllPlayerSprites(VOID) } -VOID +void PlayerLevelReset(PLAYERp pp) { SPRITEp sp = &sprite[pp->PlayerSprite]; @@ -2195,7 +2195,7 @@ PlayerLevelReset(PLAYERp pp) DamageData[u->WeaponNum].Init(pp); } -VOID +void PlayerDeathReset(PLAYERp pp) { SPRITEp sp = &sprite[pp->PlayerSprite]; @@ -2265,8 +2265,8 @@ PlayerDeathReset(PLAYERp pp) DamageData[u->WeaponNum].Init(pp); } -VOID -PlayerPanelSetup(VOID) +void +PlayerPanelSetup(void) { short pnum; PLAYERp pp; @@ -2289,7 +2289,7 @@ PlayerPanelSetup(VOID) } } -VOID +void PlayerGameReset(PLAYERp pp) { SPRITEp sp = &sprite[pp->PlayerSprite]; @@ -2356,7 +2356,7 @@ PlayerGameReset(PLAYERp pp) extern ACTOR_ACTION_SET PlayerNinjaActionSet; -VOID +void PlayerSpriteLoadLevel(short SpriteNum) { USERp u = User[SpriteNum]; @@ -2367,14 +2367,14 @@ PlayerSpriteLoadLevel(short SpriteNum) u->ActorActionSet = &PlayerNinjaActionSet; } -VOID +void InitPlayerSprite(PLAYERp pp) { short i, sp_num; SPRITE *sp; USERp u; int pnum = pp - Player; - extern BOOL NewGame; + extern SWBOOL NewGame; COVER_SetReverb(0); // Turn off any echoing that may have been going before pp->Reverb = 0; @@ -2450,7 +2450,7 @@ InitPlayerSprite(PLAYERp pp) PlayerUpdatePanelInfo(pp); } -VOID +void SpawnPlayerUnderSprite(PLAYERp pp) { USERp pu = User[pp->PlayerSprite], u; diff --git a/polymer/eduke32/source/sw/src/panel.c b/polymer/eduke32/source/sw/src/panel.c index 1d53b32f2..2e1f9ae70 100644 --- a/polymer/eduke32/source/sw/src/panel.c +++ b/polymer/eduke32/source/sw/src/panel.c @@ -45,7 +45,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#define UK_VERSION TRUE #define PANF_UZI_XFLIP (BIT(21)) -extern BOOL UsingMenus; +extern SWBOOL UsingMenus; #define XDIM 320 #define YDIM 200 @@ -58,17 +58,17 @@ typedef struct } PANEL_SHRAP, *PANEL_SHRAPp; PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y); -VOID DisplayFragNumbers(PLAYERp pp_kill_chg); -VOID PanelInvTestSuicide(PANEL_SPRITEp psp); +void DisplayFragNumbers(PLAYERp pp_kill_chg); +void PanelInvTestSuicide(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 pSuicide(PANEL_SPRITEp psp); -VOID pNextState(PANEL_SPRITEp psp); -VOID pStatePlusOne(PANEL_SPRITEp psp); -VOID pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state); -VOID pStateControl(PANEL_SPRITEp psp); +void pNextState(PANEL_SPRITEp psp); +void pStatePlusOne(PANEL_SPRITEp psp); +void pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state); +void pStateControl(PANEL_SPRITEp psp); int DoPanelFall(PANEL_SPRITEp psp); int DoBeginPanelFall(PANEL_SPRITEp psp); @@ -78,13 +78,13 @@ void SpawnHeartBlood(PANEL_SPRITEp psp); void SpawnUziShell(PANEL_SPRITEp psp); void PlayerUpdateWeaponSummary(PLAYERp pp,short UpdateWeaponNum); -BOOL pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); -BOOL pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); +SWBOOL pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); +SWBOOL pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); void pHotHeadOverlays(PANEL_SPRITEp psp, short mode); char UziRecoilYadj = 0; -extern BOOL QuitFlag; +extern SWBOOL QuitFlag; extern short screenpeek; BORDER_INFO BorderInfo; @@ -149,12 +149,12 @@ pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri) return NULL; } -BOOL +SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id) { PANEL_SPRITEp nsp=NULL; PANEL_SPRITEp psp=NULL, next; - BOOL found = FALSE; + SWBOOL found = FALSE; // Kill ALL sprites with the correct id TRAVERSE(&pp->PanelSpriteList, psp, next) @@ -227,7 +227,7 @@ void pSetSuicide(PANEL_SPRITEp psp) psp->PanelSpriteFunc = pSuicide; } -VOID pToggleCrosshair(PLAYERp pp) +void pToggleCrosshair(PLAYERp pp) { if (gs.Crosshair) gs.Crosshair = FALSE; @@ -236,7 +236,7 @@ VOID pToggleCrosshair(PLAYERp pp) } // 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; 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); } -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; @@ -275,7 +275,7 @@ VOID ArmorCalc(int damage_amt, int *armor_damage, int *player_damage) } -VOID +void PlayerUpdateHealth(PLAYERp pp, short value) { USERp u = User[pp->PlayerSprite]; @@ -301,8 +301,8 @@ PlayerUpdateHealth(PLAYERp pp, short value) if (value < 0) { - BOOL IsChem = FALSE; - BOOL NoArmor = FALSE; + SWBOOL IsChem = FALSE; + SWBOOL NoArmor = FALSE; if (value <= -2000) { @@ -402,7 +402,7 @@ PlayerUpdateHealth(PLAYERp pp, short value) } -VOID +void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) { USERp u = User[pp->PlayerSprite]; @@ -469,7 +469,7 @@ PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) DisplayPanelNumber(pp, x, y, pp->WpnAmmo[WeaponNum]); } -VOID +void PlayerUpdateWeaponSummary(PLAYERp pp, short UpdateWeaponNum) { USERp u = User[pp->PlayerSprite]; @@ -536,7 +536,7 @@ PlayerUpdateWeaponSummary(PLAYERp pp, short UpdateWeaponNum) DisplaySummaryString(pp, x+6, y, color, shade, ds); } -VOID PlayerUpdateWeaponSummaryAll(PLAYERp pp) +void PlayerUpdateWeaponSummaryAll(PLAYERp pp) { short i; @@ -549,7 +549,7 @@ VOID PlayerUpdateWeaponSummaryAll(PLAYERp pp) } } -VOID +void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum) { USERp u = User[pp->PlayerSprite]; @@ -567,7 +567,7 @@ PlayerUpdateWeapon(PLAYERp pp, short WeaponNum) PlayerUpdateWeaponSummaryAll(pp); } -VOID +void PlayerUpdateKills(PLAYERp pp, short value) { USERp u = User[pp->PlayerSprite]; @@ -616,7 +616,7 @@ PlayerUpdateKills(PLAYERp pp, short value) DisplayFragNumbers(pp); } -VOID +void PlayerUpdateArmor(PLAYERp pp, short value) { USERp u = User[pp->PlayerSprite]; @@ -652,7 +652,7 @@ PlayerUpdateArmor(PLAYERp pp, short value) } -VOID +void PlayerUpdateKeys(PLAYERp pp) { #define PANEL_KEYS_BOX_X 276 @@ -735,7 +735,7 @@ PlayerUpdateKeys(PLAYERp pp) } } -VOID +void PlayerUpdateTimeLimit(PLAYERp pp) { 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); } -VOID +void PlayerUpdatePanelInfo(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -995,7 +995,7 @@ WeaponOperate(PLAYERp pp) return 0; } -BOOL +SWBOOL WeaponOK(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -1233,7 +1233,7 @@ PANEL_STATE ps_RetractSword[] = #define SWORD_POWER_VEL 2500 -VOID SpecialUziRetractFunc(PANEL_SPRITEp psp) +void SpecialUziRetractFunc(PANEL_SPRITEp psp) { psp->y += 4 * synctics; @@ -1243,7 +1243,7 @@ VOID SpecialUziRetractFunc(PANEL_SPRITEp psp) } } -VOID +void RetractCurWpn(PLAYERp pp) { // Retract old weapon @@ -1280,7 +1280,7 @@ RetractCurWpn(PLAYERp pp) } } -VOID +void InitWeaponSword(PLAYERp pp) { PANEL_SPRITEp psp; @@ -1558,7 +1558,7 @@ pSwordHide(PANEL_SPRITEp psp) void pSwordRest(PANEL_SPRITEp psp) { - BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); + SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); #if 0 if (KEY_PRESSED(KEYSC_SEMI)) @@ -1729,7 +1729,7 @@ PANEL_STATE ps_RetractStar[] = void 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)) { @@ -1748,7 +1748,7 @@ pStarRestTest(PANEL_SPRITEp psp) pSetState(psp, psp->RestState); } -VOID +void InitWeaponStar(PLAYERp pp) { PANEL_SPRITEp psp = NULL; @@ -1877,7 +1877,7 @@ pStarHide(PANEL_SPRITEp psp) void 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)) return; @@ -1954,19 +1954,19 @@ void pUziRest(PANEL_SPRITEp); void pUziHide(PANEL_SPRITEp); void pUziPresentReload(PANEL_SPRITEp); -VOID pSpawnUziClip(PANEL_SPRITEp); -VOID pSpawnUziReload(PANEL_SPRITEp); -VOID pUziReload(PANEL_SPRITEp); -VOID pUziReloadRetract(PANEL_SPRITEp); -VOID pUziClip(PANEL_SPRITEp); -VOID pUziDoneReload(PANEL_SPRITEp); +void pSpawnUziClip(PANEL_SPRITEp); +void pSpawnUziReload(PANEL_SPRITEp); +void pUziReload(PANEL_SPRITEp); +void pUziReloadRetract(PANEL_SPRITEp); +void pUziClip(PANEL_SPRITEp); +void pUziDoneReload(PANEL_SPRITEp); -VOID pUziEjectDown(PANEL_SPRITEp); -VOID pUziEjectUp(PANEL_SPRITEp); +void pUziEjectDown(PANEL_SPRITEp); +void pUziEjectUp(PANEL_SPRITEp); // CTW MODIFICATION -//VOID SetVisNorm(VOID); -int SetVisNorm(VOID); +//void SetVisNorm(void); +int SetVisNorm(void); // CTW MODIFICATION END pANIMATOR pSetVisNorm; @@ -2144,7 +2144,7 @@ pUziOverlays(PANEL_SPRITEp psp, short mode) // Uzi Reload // -VOID +void pUziEjectDown(PANEL_SPRITEp gun) { gun->y += 5 * synctics; @@ -2156,7 +2156,7 @@ pUziEjectDown(PANEL_SPRITEp gun) } } -VOID +void pUziEjectUp(PANEL_SPRITEp gun) { @@ -2172,7 +2172,7 @@ pUziEjectUp(PANEL_SPRITEp gun) } -VOID +void pSpawnUziClip(PANEL_SPRITEp gun) { PANEL_SPRITEp new; @@ -2201,7 +2201,7 @@ pSpawnUziClip(PANEL_SPRITEp gun) new->sibling = gun; } -VOID +void pSpawnUziReload(PANEL_SPRITEp oclip) { PANEL_SPRITEp nclip; @@ -2220,7 +2220,7 @@ pSpawnUziReload(PANEL_SPRITEp oclip) nclip->sibling = oclip->sibling; } -VOID +void pUziReload(PANEL_SPRITEp nclip) { int nx, ny; @@ -2288,7 +2288,7 @@ pUziReload(PANEL_SPRITEp nclip) } } -VOID +void pUziReloadRetract(PANEL_SPRITEp nclip) { int nx, ny; @@ -2328,7 +2328,7 @@ pUziReloadRetract(PANEL_SPRITEp nclip) } } -VOID +void pUziDoneReload(PANEL_SPRITEp psp) { PANEL_SPRITEp InitWeaponUziSecondaryReload(PANEL_SPRITEp); @@ -2374,7 +2374,7 @@ pUziDoneReload(PANEL_SPRITEp psp) } } -VOID +void pUziClip(PANEL_SPRITEp oclip) { int nx, ny, ox, oy; @@ -2430,7 +2430,7 @@ pUziClip(PANEL_SPRITEp oclip) // Uzi Basic Stuff // -VOID +void InitWeaponUzi(PLAYERp pp) { PANEL_SPRITEp InitWeaponUzi2(PANEL_SPRITEp); @@ -2673,7 +2673,7 @@ void pUziRest(PANEL_SPRITEp psp) { 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 @@ -2725,7 +2725,7 @@ void pUziAction(PANEL_SPRITEp psp) { 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); @@ -3077,7 +3077,7 @@ void pShotgunBobSetup(PANEL_SPRITEp psp); void pShotgunRecoilUp(PANEL_SPRITEp psp); void pShotgunRecoilDown(PANEL_SPRITEp psp); -BOOL pShotgunReloadTest(PANEL_SPRITEp psp); +SWBOOL pShotgunReloadTest(PANEL_SPRITEp psp); extern PANEL_STATE ps_ShotgunReload[]; @@ -3172,7 +3172,7 @@ PANEL_STATE ps_RetractShotgun[] = #define SHOTGUN_YOFF 200 #define SHOTGUN_XOFF (160+42) -VOID +void InitWeaponShotgun(PLAYERp pp) { PANEL_SPRITEp psp = NULL; @@ -3362,7 +3362,7 @@ pShotgunBobSetup(PANEL_SPRITEp psp) psp->bob_height_shift = 3; } -BOOL +SWBOOL pShotgunOverlays(PANEL_SPRITEp psp) { #define SHOTGUN_AUTO_XOFF 28 @@ -3422,7 +3422,7 @@ pShotgunHide(PANEL_SPRITEp psp) } #if 1 -BOOL +SWBOOL pShotgunReloadTest(PANEL_SPRITEp psp) { //short ammo = psp->PlayerP->WpnAmmo[psp->PlayerP->WeaponType]; @@ -3444,7 +3444,7 @@ pShotgunReloadTest(PANEL_SPRITEp psp) void 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[WPN_SHOTGUN]; char lastammo = psp->PlayerP->WpnShotgunLastShell; @@ -3493,7 +3493,7 @@ pShotgunRest(PANEL_SPRITEp psp) void 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)) force = TRUE; @@ -3576,7 +3576,7 @@ void pRailRecoilDown(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_ACTION_RATE 3 // !JIM! Was 10 @@ -3688,7 +3688,7 @@ PANEL_STATE ps_RetractRail[] = static int railvochandle=0; -VOID +void InitWeaponRail(PLAYERp pp) { PANEL_SPRITEp psp = NULL; @@ -3864,7 +3864,7 @@ void pRailRest(PANEL_SPRITEp psp) { int InitLaserSight(PLAYERp pp); - BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); + SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); if (SW_SHAREWARE) return; @@ -3899,7 +3899,7 @@ pRailRest(PANEL_SPRITEp psp) void 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)) return; @@ -4145,7 +4145,7 @@ pHotHeadOverlays(PANEL_SPRITEp psp, short mode) #define HOTHEAD_XOFF (200 + HOTHEAD_BOB_X_AMT + 6) #define HOTHEAD_YOFF 200 -VOID +void InitWeaponHothead(PLAYERp pp) { PANEL_SPRITEp psp = NULL; @@ -4200,7 +4200,7 @@ InitWeaponHothead(PLAYERp pp) void 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)) { @@ -4281,7 +4281,7 @@ pHotheadHide(PANEL_SPRITEp psp) void pHotheadRest(PANEL_SPRITEp psp) { - BOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); + SWBOOL force = !!TEST(psp->flags, PANF_UNHIDE_SHOOT); if (SW_SHAREWARE) return; @@ -4589,7 +4589,7 @@ pMicroSetRecoil(PANEL_SPRITEp psp) psp->ang = NORM_ANGLE(-256); } -VOID +void InitWeaponMicro(PLAYERp pp) { PANEL_SPRITEp psp; @@ -4759,7 +4759,7 @@ pMicroHide(PANEL_SPRITEp psp) } } -BOOL +SWBOOL pMicroOverlays(PANEL_SPRITEp psp) { //#define MICRO_SIGHT_XOFF 29 @@ -4859,7 +4859,7 @@ void pMicroRest(PANEL_SPRITEp psp) { 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)) return; @@ -5097,7 +5097,7 @@ PANEL_STATE ps_RetractHeart[] = #define HEART_YOFF 212 -VOID +void InitWeaponHeart(PLAYERp pp) { PANEL_SPRITEp psp; @@ -5191,7 +5191,7 @@ pHeartHide(PANEL_SPRITEp psp) void 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)) return; @@ -5596,7 +5596,7 @@ pGrenadePresentSetup(PANEL_SPRITEp psp) psp->vel = 680; } -VOID +void InitWeaponGrenade(PLAYERp pp) { PANEL_SPRITEp psp; @@ -5769,7 +5769,7 @@ pGrenadeHide(PANEL_SPRITEp psp) void 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)) return; @@ -5884,7 +5884,7 @@ PANEL_STATE ps_RetractMine[] = //#define MINE_XOFF (160+20) #define MINE_XOFF (160+50) -VOID +void InitWeaponMine(PLAYERp pp) { PANEL_SPRITEp psp; @@ -6015,7 +6015,7 @@ pMineHide(PANEL_SPRITEp psp) void 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)) return; @@ -6164,7 +6164,7 @@ PANEL_STATE ps_ChopsRetract[] = #define CHOPS_YOFF 200 #define CHOPS_XOFF (160+20) -VOID +void InitChops(PLAYERp pp) { PANEL_SPRITEp psp; @@ -6197,7 +6197,7 @@ InitChops(PLAYERp pp) void 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); rnd_rng = RANDOM_RANGE(1000); @@ -6260,7 +6260,7 @@ pChopsShake(PANEL_SPRITEp psp) void pChopsWait(PANEL_SPRITEp psp) { - //extern BOOL GamePaused; + //extern SWBOOL GamePaused; //if (!GamePaused && RANDOM_P2(1024) < 10) if (RANDOM_P2(1024) < 10) @@ -6550,7 +6550,7 @@ PANEL_STATE ps_RetractFist[] = #define FIST_VEL 3000 #define FIST_POWER_VEL 3000 -VOID +void InitWeaponFist(PLAYERp pp) { PANEL_SPRITEp psp; @@ -6929,7 +6929,7 @@ pFistHide(PANEL_SPRITEp psp) void 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)) return; @@ -7063,13 +7063,13 @@ pFistBlock(PANEL_SPRITEp psp) -VOID +void pWeaponForceRest(PLAYERp pp) { pSetState(pp->CurWpn, pp->CurWpn->RestState); } -BOOL +SWBOOL pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state) { // initing the other weapon will take care of this @@ -7117,7 +7117,7 @@ pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state) return FALSE; } -BOOL +SWBOOL pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state) { if (TEST(psp->PlayerP->Flags, PF_DEAD)) @@ -7197,7 +7197,7 @@ InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp) 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; PANEL_SPRITEp psp; @@ -7239,13 +7239,13 @@ pSpawnSprite(PLAYERp pp, PANEL_STATEp state, BYTE priority, int x, int y) return psp; } -VOID +void pSuicide(PANEL_SPRITEp psp) { pKillSprite(psp); } -VOID +void pKillSprite(PANEL_SPRITEp psp) { PRODUCTION_ASSERT(psp); @@ -7256,7 +7256,7 @@ pKillSprite(PANEL_SPRITEp psp) FreeMem(psp); } -VOID +void pClearSpriteList(PLAYERp pp) { PANEL_SPRITEp psp=NULL, next_psp=NULL; @@ -7332,8 +7332,8 @@ pWeaponBob(PANEL_SPRITEp psp, short condition) // ////////////////////////////////////////////////////////////////////////////////////////// -BOOL DrawBeforeView = FALSE; -VOID +SWBOOL DrawBeforeView = FALSE; +void pDisplaySprites(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -7345,7 +7345,7 @@ pDisplaySprites(PLAYERp pp) unsigned i; SECT_USERp sectu = SectUser[pp->cursectnum]; - BYTE pal = 0; + uint8_t pal = 0; short ang; int flags; 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; @@ -7650,7 +7650,7 @@ VOID pFlushPerms(PLAYERp pp) } } -VOID +void pSpriteControl(PLAYERp pp) { PANEL_SPRITEp psp=NULL, next=NULL; @@ -7662,7 +7662,7 @@ pSpriteControl(PLAYERp pp) // RULE: Sprites can only kill themselves PRODUCTION_ASSERT(psp); ASSERT(ValidPtr(psp)); - ASSERT((ULONG) psp->Next != 0xCCCCCCCC); + ASSERT((uint32_t) psp->Next != 0xCCCCCCCC); if (psp->State) pStateControl(psp); @@ -7676,7 +7676,7 @@ pSpriteControl(PLAYERp pp) } } -VOID +void pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state) { PRODUCTION_ASSERT(psp); @@ -7687,7 +7687,7 @@ pSetState(PANEL_SPRITEp psp, PANEL_STATEp panel_state) } -VOID +void pNextState(PANEL_SPRITEp psp) { // Transition to the next state @@ -7700,7 +7700,7 @@ pNextState(PANEL_SPRITEp psp) } } -VOID +void pStatePlusOne(PANEL_SPRITEp psp) { psp->tics = 0; @@ -7714,7 +7714,7 @@ pStatePlusOne(PANEL_SPRITEp psp) } -VOID +void pStateControl(PANEL_SPRITEp psp) { unsigned i; @@ -7761,11 +7761,11 @@ pStateControl(PANEL_SPRITEp psp) } -VOID +void UpdatePanel(void) { short pnum; - extern BOOL DebugPanel,PanelUpdateMode; + extern SWBOOL DebugPanel,PanelUpdateMode; if (!PanelUpdateMode) return; @@ -7780,11 +7780,11 @@ UpdatePanel(void) } } -VOID +void PreUpdatePanel(void) { short pnum; - extern BOOL DebugPanel,PanelUpdateMode; + extern SWBOOL DebugPanel,PanelUpdateMode; if (!PanelUpdateMode) return; diff --git a/polymer/eduke32/source/sw/src/panel.h b/polymer/eduke32/source/sw/src/panel.h index 834197362..83b8291c3 100644 --- a/polymer/eduke32/source/sw/src/panel.h +++ b/polymer/eduke32/source/sw/src/panel.h @@ -60,9 +60,9 @@ struct PANEL_STATEstruct int tics; void (*Animator)(PANEL_SPRITEp); // JBF: return type was long PANEL_STATEp NextState; - ULONG flags; - BYTE xvel; - BYTE yvel; + uint32_t flags; + uint8_t xvel; + uint8_t yvel; }; #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_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 { @@ -110,10 +110,10 @@ struct PANEL_SPRITEstruct PANEL_STATEp State, RetractState, PresentState, ActionState, RestState; PLAYERp PlayerP; // Do not change the order of this line - USHORT xfract; - SHORT x; - USHORT yfract; - SHORT y; // Do not change the order of this + uint16_t xfract; + int16_t x; + uint16_t yfract; + int16_t y; // Do not change the order of this // line PANEL_SPRITE_OVERLAY over[8]; @@ -182,13 +182,13 @@ enum BorderTypes #define SHOTGUN_AUTO_NUM 0 #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 pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y); void pSetSuicide(PANEL_SPRITEp psp); -BOOL pKillScreenSpiteIDs(PLAYERp pp, short id); -VOID pFlushPerms(PLAYERp pp); -VOID PreUpdatePanel(void); +SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id); +void pFlushPerms(PLAYERp pp); +void PreUpdatePanel(void); void UpdatePanel(void); void PlayerUpdateKeys(PLAYERp pp); void PlayerUpdateArmor(PLAYERp pp,short value); @@ -196,6 +196,6 @@ void pToggleCrosshair(PLAYERp pp); void pKillSprite(PANEL_SPRITEp psp); void InitChops(PLAYERp pp); void ChopsSetRetract(PLAYERp pp); -VOID PlayerUpdateTimeLimit(PLAYERp pp); +void PlayerUpdateTimeLimit(PLAYERp pp); #endif diff --git a/polymer/eduke32/source/sw/src/parse.h b/polymer/eduke32/source/sw/src/parse.h index c1e290890..ec3b430c8 100644 --- a/polymer/eduke32/source/sw/src/parse.h +++ b/polymer/eduke32/source/sw/src/parse.h @@ -32,13 +32,13 @@ extern char token[MAXTOKEN]; extern char *scriptbuffer,*script_p,*scriptend_p; extern int grabbed; extern int scriptline; -extern BOOL endofscript; +extern SWBOOL endofscript; -BOOL LoadScriptFile(char *filename); -void GetToken(BOOL crossline); +SWBOOL LoadScriptFile(char *filename); +void GetToken(SWBOOL crossline); void UnGetToken(void); -BOOL TokenAvailable(void); +SWBOOL TokenAvailable(void); void DefaultExtension(char *path, char *extension); void DefaultPath(char *path, char *basepath); diff --git a/polymer/eduke32/source/sw/src/player.c b/polymer/eduke32/source/sw/src/player.c index b9682a529..590579780 100644 --- a/polymer/eduke32/source/sw/src/player.c +++ b/polymer/eduke32/source/sw/src/player.c @@ -67,7 +67,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define SO_DRIVE_SOUND 2 #define SO_IDLE_SOUND 1 -extern BOOL NoMeters; +extern SWBOOL NoMeters; extern int Follow_posx,Follow_posy; #define TEST_UNDERWATER(pp) (TEST(sector[(pp)->cursectnum].extra, SECTFX_UNDERWATER)) @@ -80,9 +80,9 @@ extern unsigned char palette_data[256][3]; // Global palette array USER puser[MAX_SW_PLAYERS_REG]; -//SHORT gNet.MultiGameType = MULTI_GAME_NONE; -BOOL NightVision = FALSE; -extern BOOL FinishedLevel; +//int16_t gNet.MultiGameType = MULTI_GAME_NONE; +SWBOOL NightVision = FALSE; +extern SWBOOL FinishedLevel; //#define PLAYER_TURN_SCALE (8) #define PLAYER_TURN_SCALE (12) @@ -138,7 +138,7 @@ char PlayerGravity = PLAYER_JUMP_GRAV; int vel, svel, angvel; extern char tempbuf[]; -extern BOOL DebugOperate; +extern SWBOOL DebugOperate; //unsigned char synctics, lastsynctics; @@ -155,47 +155,47 @@ short NormalVisibility; static short oldmousebstatus = 0; static short mousx, mousy, mousz, bstatus; -int InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity); +int InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity); SPRITEp FindNearSprite(SPRITEp sp, short stat); -BOOL PlayerOnLadder(PLAYERp pp); -VOID DoPlayerSlide(PLAYERp pp); -VOID DoPlayerBeginSwim(PLAYERp pp); -VOID DoPlayerSwim(PLAYERp pp); -VOID DoPlayerWade(PLAYERp pp); -VOID DoPlayerBeginWade(PLAYERp pp); -VOID DoPlayerBeginCrawl(PLAYERp pp); -VOID DoPlayerCrawl(PLAYERp pp); -VOID DoPlayerRun(PLAYERp pp); -VOID DoPlayerBeginRun(PLAYERp pp); -VOID DoPlayerFall(PLAYERp pp); -VOID DoPlayerBeginFall(PLAYERp pp); -VOID DoPlayerJump(PLAYERp pp); -VOID DoPlayerBeginJump(PLAYERp pp); -VOID DoPlayerForceJump(PLAYERp pp); -VOID DoPlayerBeginFly(PLAYERp pp); -VOID DoPlayerFly(PLAYERp pp); -VOID DoPlayerBeginClimb(PLAYERp pp); -VOID DoPlayerClimb(PLAYERp pp); -VOID DoPlayerBeginDie(PLAYERp pp); -VOID DoPlayerDie(PLAYERp pp); -VOID DoPlayerBeginOperateBoat(PLAYERp pp); -VOID DoPlayerBeginOperateTank(PLAYERp pp); -VOID DoPlayerBeginOperate(PLAYERp pp); -VOID DoPlayerOperateBoat(PLAYERp pp); -VOID DoPlayerOperateTank(PLAYERp pp); -VOID DoPlayerOperateTurret(PLAYERp pp); -VOID DoPlayerBeginDive(PLAYERp pp); -VOID DoPlayerDive(PLAYERp pp); -VOID DoPlayerTeleportPause(PLAYERp pp); -BOOL PlayerFlyKey(PLAYERp pp); -VOID OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy); -VOID CheckFootPrints(PLAYERp pp); -BOOL DoPlayerTestCrawl(PLAYERp pp); -VOID DoPlayerDeathFlip(PLAYERp pp); -VOID DoPlayerDeathCrumble(PLAYERp pp); -VOID DoPlayerDeathExplode(PLAYERp pp); -VOID DoPlayerDeathFall(PLAYERp pp); +SWBOOL PlayerOnLadder(PLAYERp pp); +void DoPlayerSlide(PLAYERp pp); +void DoPlayerBeginSwim(PLAYERp pp); +void DoPlayerSwim(PLAYERp pp); +void DoPlayerWade(PLAYERp pp); +void DoPlayerBeginWade(PLAYERp pp); +void DoPlayerBeginCrawl(PLAYERp pp); +void DoPlayerCrawl(PLAYERp pp); +void DoPlayerRun(PLAYERp pp); +void DoPlayerBeginRun(PLAYERp pp); +void DoPlayerFall(PLAYERp pp); +void DoPlayerBeginFall(PLAYERp pp); +void DoPlayerJump(PLAYERp pp); +void DoPlayerBeginJump(PLAYERp pp); +void DoPlayerForceJump(PLAYERp pp); +void DoPlayerBeginFly(PLAYERp pp); +void DoPlayerFly(PLAYERp pp); +void DoPlayerBeginClimb(PLAYERp pp); +void DoPlayerClimb(PLAYERp pp); +void DoPlayerBeginDie(PLAYERp pp); +void DoPlayerDie(PLAYERp pp); +void DoPlayerBeginOperateBoat(PLAYERp pp); +void DoPlayerBeginOperateTank(PLAYERp pp); +void DoPlayerBeginOperate(PLAYERp pp); +void DoPlayerOperateBoat(PLAYERp pp); +void DoPlayerOperateTank(PLAYERp pp); +void DoPlayerOperateTurret(PLAYERp pp); +void DoPlayerBeginDive(PLAYERp pp); +void DoPlayerDive(PLAYERp pp); +void DoPlayerTeleportPause(PLAYERp pp); +SWBOOL PlayerFlyKey(PLAYERp pp); +void OperateSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy); +void CheckFootPrints(PLAYERp pp); +SWBOOL DoPlayerTestCrawl(PLAYERp pp); +void DoPlayerDeathFlip(PLAYERp pp); +void DoPlayerDeathCrumble(PLAYERp pp); +void DoPlayerDeathExplode(PLAYERp pp); +void DoPlayerDeathFall(PLAYERp pp); void PlayerCheckValidMove(PLAYERp pp); void PlayerWarpUpdatePos(PLAYERp pp); @@ -1082,7 +1082,7 @@ STATEp sg_PlayerNinjaFly[] = ///////////////////////////////////////////////////////////////////////////// -VOID +void DoPlayerSpriteThrow(PLAYERp pp) { if (!TEST(pp->Flags, PF_DIVING|PF_FLYING|PF_CRAWLING)) @@ -1171,12 +1171,12 @@ int CompareTarget(TARGET_SORTp tgt1, TARGET_SORTp tgt2) return tgt2->weight - tgt1->weight; } -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); int -DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets) +DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets) { #define PICK_DIST 40000L @@ -1184,7 +1184,7 @@ DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets) int dist, zh; SPRITEp ep; USERp eu; - SHORTp shp; + int16_t* shp; USERp u = User[sp - sprite]; int ezh, ezhl, ezhm; unsigned ndx; @@ -1335,7 +1335,7 @@ DoPlayerTeleportPause(PLAYERp pp) //DoPlayerBob(pp); } -VOID +void DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp) { int cz, fz; @@ -1354,7 +1354,7 @@ DoPlayerTeleportToSprite(PLAYERp pp, SPRITEp sp) SET(pp->Flags2, PF2_TELEPORTED); } -VOID +void DoPlayerTeleportToOffset(PLAYERp pp) { int fz,cz; @@ -1367,7 +1367,7 @@ DoPlayerTeleportToOffset(PLAYERp pp) SET(pp->Flags2, PF2_TELEPORTED); } -VOID +void DoSpawnTeleporterEffect(SPRITEp sp) { extern STATE s_TeleportEffect[]; @@ -1400,7 +1400,7 @@ DoSpawnTeleporterEffect(SPRITEp sp) //ep->ang = NORM_ANGLE(ep->ang + 512); } -VOID +void DoSpawnTeleporterEffectPlace(SPRITEp sp) { extern STATE s_TeleportEffect[]; @@ -1426,7 +1426,7 @@ DoSpawnTeleporterEffectPlace(SPRITEp sp) SET(ep->cstat, CSTAT_SPRITE_WALL); } -VOID +void DoPlayerWarpTeleporter(PLAYERp pp) { USERp u = User[pp->PlayerSprite], eu; @@ -1497,7 +1497,7 @@ DoPlayerWarpTeleporter(PLAYERp pp) u->oz = sp->z; } -VOID +void DoPlayerSetWadeDepth(PLAYERp pp) { SECTORp sectp; @@ -1518,7 +1518,7 @@ DoPlayerSetWadeDepth(PLAYERp pp) } -VOID +void DoPlayerHeight(PLAYERp pp) { int diff; @@ -1528,7 +1528,7 @@ DoPlayerHeight(PLAYERp pp) pp->posz = pp->posz - (DIV4(diff) + DIV8(diff)); } -VOID +void DoPlayerJumpHeight(PLAYERp pp) { if (pp->lo_sectp && TEST(pp->lo_sectp->extra, SECTFX_DYNAMIC_AREA)) @@ -1541,7 +1541,7 @@ DoPlayerJumpHeight(PLAYERp pp) } } -VOID +void DoPlayerCrawlHeight(PLAYERp pp) { int diff; @@ -1550,7 +1550,7 @@ DoPlayerCrawlHeight(PLAYERp pp) pp->posz = pp->posz - (DIV4(diff) + DIV8(diff)); } -VOID +void DoPlayerTurn(PLAYERp pp) { int doubvel; @@ -1634,7 +1634,7 @@ DoPlayerTurn(PLAYERp pp) } } -VOID +void DoPlayerTurnBoat(PLAYERp pp) { int angvel; @@ -1665,7 +1665,7 @@ DoPlayerTurnBoat(PLAYERp pp) } } -VOID +void DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist) { int angvel; @@ -1698,7 +1698,7 @@ DoPlayerTurnTank(PLAYERp pp, int z, int floor_dist) } } -VOID +void DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy) { int angvel; @@ -1731,7 +1731,7 @@ DoPlayerTurnTankRect(PLAYERp pp, int *x, int *y, int *ox, int *oy) } } -VOID +void DoPlayerTurnTurret(PLAYERp pp) { int angvel; @@ -1810,7 +1810,7 @@ void SlipSlope(PLAYERp pp) pp->yvect += mulscale(sintable[ang], sector[pp->cursectnum].floorheinum, sectu->speed); } -VOID +void PlayerAutoLook(PLAYERp pp) { int x,y,k,j; @@ -1867,7 +1867,7 @@ PlayerAutoLook(PLAYERp pp) } extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust; -VOID +void DoPlayerHorizon(PLAYERp pp) { int i; @@ -1981,10 +1981,10 @@ DoPlayerHorizon(PLAYERp pp) } -VOID +void DoPlayerBob(PLAYERp pp) { - extern ULONG MoveThingsCount; + extern uint32_t MoveThingsCount; int dist; int amt; @@ -2031,7 +2031,7 @@ DoPlayerBob(PLAYERp pp) } } -VOID +void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt) { #if 0 @@ -2046,7 +2046,7 @@ DoPlayerBeginRecoil(PLAYERp pp, short pix_amt) #endif } -VOID +void DoPlayerRecoil(PLAYERp pp) { int dist; @@ -2068,7 +2068,7 @@ DoPlayerRecoil(PLAYERp pp) // for wading -VOID +void DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob_speed) { USERp u = User[pp->PlayerSprite]; @@ -2081,7 +2081,7 @@ DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob_spee sp->z = (pp->posz + player_height) + pp->bob_amt; } -VOID +void UpdatePlayerUnderSprite(PLAYERp pp) { SPRITEp over_sp = pp->SpriteP; @@ -2092,7 +2092,7 @@ UpdatePlayerUnderSprite(PLAYERp pp) short SpriteNum; int water_level_z, zdiff; - BOOL above_water, in_dive_area; + SWBOOL above_water, in_dive_area; if (Prediction) return; @@ -2157,7 +2157,7 @@ UpdatePlayerUnderSprite(PLAYERp pp) } -VOID +void UpdatePlayerSprite(PLAYERp pp) { SPRITEp sp = pp->SpriteP; @@ -2249,7 +2249,7 @@ UpdatePlayerSprite(PLAYERp pp) sprite[pp->PlayerSprite].ang = pp->pang; } -VOID +void DoPlayerZrange(PLAYERp pp) { int ceilhit, florhit; @@ -2296,7 +2296,7 @@ DoPlayerZrange(PLAYERp pp) } } -VOID +void DoPlayerSlide(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -2345,10 +2345,10 @@ DoPlayerSlide(PLAYERp pp) } } -VOID PlayerMoveHitDebug(short ret) +void PlayerMoveHitDebug(short ret) { SPRITEp sp; - extern BOOL DebugActor; + extern SWBOOL DebugActor; switch (TEST(ret, HIT_MASK)) { @@ -2375,7 +2375,7 @@ VOID PlayerMoveHitDebug(short ret) MONO_PRINT(ds); } -VOID PlayerCheckValidMove(PLAYERp pp) +void PlayerCheckValidMove(PLAYERp pp) { if (pp->cursectnum == -1) { @@ -2399,7 +2399,7 @@ VOID PlayerCheckValidMove(PLAYERp pp) } } -VOID +void MoveScrollMode2D(PLAYERp pp) { #define TURBOTURNTIME (120/8) @@ -2412,11 +2412,11 @@ MoveScrollMode2D(PLAYERp pp) #define MAXANGVEL 100 ControlInfo scrl_input; - boolean running; - int32 keymove; - int32 momx, momy; + int32_t running; + int32_t keymove; + int32_t momx, momy; static int mfvel=0, mfsvel=0; - extern BOOL HelpInputMode, ScrollMode2D; + extern SWBOOL HelpInputMode, ScrollMode2D; CONTROL_GetInput(&scrl_input); @@ -2525,7 +2525,7 @@ MoveScrollMode2D(PLAYERp pp) } -VOID +void DoPlayerMenuKeys(PLAYERp pp) { if (!CommEnabled) @@ -2543,7 +2543,7 @@ DoPlayerMenuKeys(PLAYERp pp) } } -VOID PlayerSectorBound(PLAYERp pp, int amt) +void PlayerSectorBound(PLAYERp pp, int amt) { int cz,fz; @@ -2566,13 +2566,13 @@ VOID PlayerSectorBound(PLAYERp pp, int amt) } -VOID +void DoPlayerMove(PLAYERp pp) { int i, ceilhit, florhit; short nvel,svel; int ret = 0; - BOOL slow = FALSE; + SWBOOL slow = FALSE; USERp u = User[pp->PlayerSprite]; int friction; int oposz; @@ -2727,7 +2727,7 @@ DoPlayerMove(PLAYERp pp) } } -VOID +void DoPlayerSectorUpdatePreMove(PLAYERp pp) { short sectnum = pp->cursectnum; @@ -2756,7 +2756,7 @@ DoPlayerSectorUpdatePreMove(PLAYERp pp) pp->cursectnum = sectnum; } -VOID +void DoPlayerSectorUpdatePostMove(PLAYERp pp) { short sectnum; @@ -2793,7 +2793,7 @@ DoPlayerSectorUpdatePostMove(PLAYERp pp) } -VOID PlaySOsound(short sectnum, short sound_num) +void PlaySOsound(short sectnum, short sound_num) { short i,nexti; @@ -2808,7 +2808,7 @@ VOID PlaySOsound(short sectnum, short sound_num) } } -VOID StopSOsound(short sectnum) +void StopSOsound(short sectnum) { short i,nexti; @@ -2820,7 +2820,7 @@ VOID StopSOsound(short sectnum) } } -VOID +void DoPlayerMoveBoat(PLAYERp pp) { int xvect, yvect, z; @@ -2914,7 +2914,7 @@ STATE s_TankTreadStill[] = }; #endif -VOID DoTankTreads(PLAYERp pp) +void DoTankTreads(PLAYERp pp) { SPRITEp sp; short i,nexti; @@ -2922,7 +2922,7 @@ VOID DoTankTreads(PLAYERp pp) SECTORp *sectp; int j; int dot; - BOOL reverse = FALSE; + SWBOOL reverse = FALSE; WALLp wp; short startwall,endwall; int k; @@ -3037,7 +3037,7 @@ VOID DoTankTreads(PLAYERp pp) } -VOID +void SetupDriveCrush(PLAYERp pp, int *x, int *y) { int radius = pp->sop_control->clipdist; @@ -3055,7 +3055,7 @@ SetupDriveCrush(PLAYERp pp, int *x, int *y) y[3] = pp->posy + radius; } -VOID +void DriveCrush(PLAYERp pp, int *x, int *y) { int testpointinquad(int x, int y, int *qx, int *qy); @@ -3215,7 +3215,7 @@ DriveCrush(PLAYERp pp, int *x, int *y) } } -VOID +void DoPlayerMoveTank(PLAYERp pp) { int xvect, yvect, z; @@ -3238,7 +3238,7 @@ DoPlayerMoveTank(PLAYERp pp) SW_PACKET last_input; int fifo_ndx; - BOOL RectClip = !!TEST(sop->flags, SOBJ_RECT_CLIP); + SWBOOL RectClip = !!TEST(sop->flags, SOBJ_RECT_CLIP); if (Prediction) return; @@ -3428,7 +3428,7 @@ DoPlayerMoveTank(PLAYERp pp) DoTankTreads(pp); } -VOID +void DoPlayerMoveTurret(PLAYERp pp) { int xvect, yvect, z; @@ -3451,7 +3451,7 @@ DoPlayerMoveTurret(PLAYERp pp) DoPlayerHorizon(pp); } -VOID +void DoPlayerBeginJump(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -3482,7 +3482,7 @@ DoPlayerBeginJump(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Jump); } -VOID +void DoPlayerBeginForceJump(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -3504,7 +3504,7 @@ DoPlayerBeginForceJump(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Jump); } -VOID +void DoPlayerJump(PLAYERp pp) { short i; @@ -3590,7 +3590,7 @@ DoPlayerJump(PLAYERp pp) } -VOID +void DoPlayerForceJump(PLAYERp pp) { short i; @@ -3630,7 +3630,7 @@ DoPlayerForceJump(PLAYERp pp) DoPlayerMove(pp); } -VOID +void DoPlayerBeginFall(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -3666,7 +3666,7 @@ void StackedWaterSplash(PLAYERp pp) } } -VOID +void DoPlayerFall(PLAYERp pp) { short i; @@ -3839,7 +3839,7 @@ DoPlayerFall(PLAYERp pp) DoPlayerMove(pp); } -VOID +void DoPlayerBeginClimb(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -3861,7 +3861,7 @@ DoPlayerBeginClimb(PLAYERp pp) } -VOID +void DoPlayerClimb(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -3874,7 +3874,7 @@ DoPlayerClimb(PLAYERp pp) short sec,wal,spr; int dist; short lastsectnum; - BOOL LadderUpdate = FALSE; + SWBOOL LadderUpdate = FALSE; if (Prediction) return; @@ -4127,9 +4127,9 @@ DoPlayerWadeSuperJump(PLAYERp pp) return FALSE; } -BOOL PlayerFlyKey(PLAYERp pp) +SWBOOL PlayerFlyKey(PLAYERp pp) { - BOOL key; + SWBOOL key; if (!GodMode) return FALSE; @@ -4146,7 +4146,7 @@ BOOL PlayerFlyKey(PLAYERp pp) } #if 0 -VOID +void DoPlayerBeginSwim(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4171,7 +4171,7 @@ DoPlayerBeginSwim(PLAYERp pp) } -VOID +void DoPlayerSwim(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4222,7 +4222,7 @@ DoPlayerSwim(PLAYERp pp) } #endif -VOID +void DoPlayerBeginCrawl(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4240,7 +4240,7 @@ DoPlayerBeginCrawl(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Crawl); } -BOOL PlayerFallTest(PLAYERp pp, int player_height) +SWBOOL PlayerFallTest(PLAYERp pp, int player_height) { // If the floor is far below you, fall hard instead of adjusting height if (labs(pp->posz - pp->loz) > player_height + PLAYER_FALL_HEIGHT) @@ -4262,7 +4262,7 @@ BOOL PlayerFallTest(PLAYERp pp, int player_height) return FALSE; } -VOID +void DoPlayerCrawl(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4379,7 +4379,7 @@ DoPlayerCrawl(PLAYERp pp) DoPlayerCrawlHeight(pp); } -VOID +void DoPlayerBeginFly(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4412,7 +4412,7 @@ int GetSinNdx(int range, int bob_amt) return bob_amt * amt; } -VOID PlayerWarpUpdatePos(PLAYERp pp) +void PlayerWarpUpdatePos(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -4427,7 +4427,7 @@ VOID PlayerWarpUpdatePos(PLAYERp pp) UpdatePlayerSprite(pp); } -BOOL PlayerCeilingHit(PLAYERp pp, int zlimit) +SWBOOL PlayerCeilingHit(PLAYERp pp, int zlimit) { if (pp->posz < zlimit) { @@ -4437,7 +4437,7 @@ BOOL PlayerCeilingHit(PLAYERp pp, int zlimit) return FALSE; } -BOOL PlayerFloorHit(PLAYERp pp, int zlimit) +SWBOOL PlayerFloorHit(PLAYERp pp, int zlimit) { if (pp->posz > zlimit) { @@ -4447,7 +4447,7 @@ BOOL PlayerFloorHit(PLAYERp pp, int zlimit) return FALSE; } -VOID +void DoPlayerFly(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4533,7 +4533,7 @@ FindNearSprite(SPRITEp sp, short stat) return near_fp; } -BOOL +SWBOOL PlayerOnLadder(PLAYERp pp) { short sec, wal, spr; @@ -4641,7 +4641,7 @@ PlayerOnLadder(PLAYERp pp) return TRUE; } -BOOL DoPlayerTestCrawl(PLAYERp pp) +SWBOOL DoPlayerTestCrawl(PLAYERp pp) { if (labs(pp->loz - pp->hiz) < PLAYER_STANDING_ROOM) return TRUE; @@ -4653,7 +4653,7 @@ int PlayerInDiveArea(PLAYERp pp) { SECTORp sectp; - BOOL InMasked=FALSE; + SWBOOL InMasked=FALSE; if (pp->lo_sectp) { @@ -4898,7 +4898,7 @@ GetOverlapSector2(int x, int y, short *over, short *under) } -VOID +void DoPlayerWarpToUnderwater(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -4974,7 +4974,7 @@ DoPlayerWarpToUnderwater(PLAYERp pp) return; } -VOID +void DoPlayerWarpToSurface(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5055,7 +5055,7 @@ DoPlayerWarpToSurface(PLAYERp pp) #if 1 -VOID +void DoPlayerDivePalette(PLAYERp pp) { extern char DefaultPalette[]; @@ -5084,7 +5084,7 @@ DoPlayerDivePalette(PLAYERp pp) #endif -VOID +void DoPlayerBeginDive(PLAYERp pp) { SPRITEp sp = &sprite[pp->PlayerSprite]; @@ -5180,7 +5180,7 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp) DoPlayerDive(pp); } -VOID +void DoPlayerStopDiveNoWarp(PLAYERp pp) { SPRITEp sp = &sprite[pp->PlayerSprite]; @@ -5215,7 +5215,7 @@ DoPlayerStopDiveNoWarp(PLAYERp pp) DoPlayerZrange(pp); } -VOID +void DoPlayerStopDive(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5251,7 +5251,7 @@ DoPlayerStopDive(PLAYERp pp) } } -VOID +void DoPlayerDiveMeter(PLAYERp pp) { short color=0,i=0,metertics,meterunit; @@ -5299,7 +5299,7 @@ DoPlayerDiveMeter(PLAYERp pp) (ROTATE_SPRITE_SCREEN_CLIP),0,0,xdim-1,ydim-1); } -VOID +void DoPlayerDive(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5500,7 +5500,7 @@ DoPlayerTestPlaxDeath(PLAYERp pp) return FALSE; } -VOID +void DoPlayerCurrent(PLAYERp pp) { int xvect, yvect; @@ -5547,7 +5547,7 @@ DoPlayerCurrent(PLAYERp pp) } } -VOID +void DoPlayerFireOutWater(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5563,7 +5563,7 @@ DoPlayerFireOutWater(PLAYERp pp) } } -VOID +void DoPlayerFireOutDeath(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5577,7 +5577,7 @@ DoPlayerFireOutDeath(PLAYERp pp) u->flame = -2; } -VOID +void DoPlayerBeginWade(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5610,7 +5610,7 @@ DoPlayerBeginWade(PLAYERp pp) } -VOID +void DoPlayerWade(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5770,7 +5770,7 @@ DoPlayerWade(PLAYERp pp) } -VOID +void DoPlayerBeginOperateBoat(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5790,7 +5790,7 @@ DoPlayerBeginOperateBoat(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run); } -VOID +void DoPlayerBeginOperateTank(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5810,7 +5810,7 @@ DoPlayerBeginOperateTank(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Stand); } -VOID +void DoPlayerBeginOperateTurret(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -5830,7 +5830,7 @@ DoPlayerBeginOperateTurret(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Stand); } -VOID FindMainSector(SECTOR_OBJECTp sop) +void FindMainSector(SECTOR_OBJECTp sop) { // find the main sector - only do this once for each sector object if (sop->op_main_sector < 0) @@ -5857,7 +5857,7 @@ VOID FindMainSector(SECTOR_OBJECTp sop) } } -VOID DoPlayerOperateMatch(PLAYERp pp, BOOL starting) +void DoPlayerOperateMatch(PLAYERp pp, SWBOOL starting) { SPRITEp sp; short i,nexti; @@ -5886,7 +5886,7 @@ VOID DoPlayerOperateMatch(PLAYERp pp, BOOL starting) } } -VOID +void DoPlayerBeginOperate(PLAYERp pp) { SECTOR_OBJECTp PlayerOnObject(short sectnum_match); @@ -5987,7 +5987,7 @@ DoPlayerBeginOperate(PLAYERp pp) } -VOID +void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECTp sop) { SECTOR_OBJECTp PlayerOnObject(short sectnum_match); @@ -6137,7 +6137,7 @@ void PlayerRemoteInit(PLAYERp pp) pp->remote.slide_yvect = 0; } -VOID +void DoPlayerStopOperate(PLAYERp pp) { RESET(pp->Flags, PF_WEAPON_DOWN); @@ -6165,7 +6165,7 @@ DoPlayerStopOperate(PLAYERp pp) DoPlayerBeginRun(pp); } -VOID +void DoPlayerOperateTurret(PLAYERp pp) { short oldang; @@ -6206,7 +6206,7 @@ DoPlayerOperateTurret(PLAYERp pp) } -VOID +void DoPlayerOperateBoat(PLAYERp pp) { short oldang; @@ -6246,7 +6246,7 @@ DoPlayerOperateBoat(PLAYERp pp) } } -VOID +void DoPlayerOperateTank(PLAYERp pp) { short oldang; @@ -6287,7 +6287,7 @@ DoPlayerOperateTank(PLAYERp pp) } } -VOID +void DoPlayerDeathJump(PLAYERp pp) { short i; @@ -6329,7 +6329,7 @@ DoPlayerDeathJump(PLAYERp pp) } } -VOID +void DoPlayerDeathFall(PLAYERp pp) { short i; @@ -6461,12 +6461,12 @@ char *KilledPlayerMessage(PLAYERp pp, PLAYERp killer) return NULL; }; -VOID +void DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer) { int pnum; short i; - BOOL SEND_OK = FALSE; + SWBOOL SEND_OK = FALSE; killer->KilledPlayer[pp-Player]++; @@ -6497,13 +6497,13 @@ DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer) } -VOID +void DoPlayerBeginDie(PLAYERp pp) { - extern BOOL ReloadPrompt; - VOID KillAllPanelInv(PLAYERp pp); - VOID DoPlayerDeathDrown(PLAYERp pp); - VOID pWeaponForceRest(PLAYERp pp); + extern SWBOOL ReloadPrompt; + void KillAllPanelInv(PLAYERp pp); + void DoPlayerDeathDrown(PLAYERp pp); + void pWeaponForceRest(PLAYERp pp); short bak; int choosesnd = 0; extern short GlobInfoStringTime; @@ -6511,7 +6511,7 @@ DoPlayerBeginDie(PLAYERp pp) USERp u = User[pp->PlayerSprite]; - static VOID (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (PLAYERp) = + static void (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (PLAYERp) = { DoPlayerDeathFlip, DoPlayerDeathCrumble, @@ -6790,7 +6790,7 @@ DoPlayerDeathTilt(PLAYERp pp, short target, short speed) } -VOID +void DoPlayerDeathZrange(PLAYERp pp) { SPRITEp sp = pp->SpriteP; @@ -6808,7 +6808,7 @@ DoPlayerDeathZrange(PLAYERp pp) //pp->hi_sectp = u->hi_sectp; } -VOID DoPlayerDeathHurl(PLAYERp pp) +void DoPlayerDeathHurl(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -6839,7 +6839,7 @@ VOID DoPlayerDeathHurl(PLAYERp pp) } -VOID DoPlayerDeathFollowKiller(PLAYERp pp) +void DoPlayerDeathFollowKiller(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -6876,12 +6876,12 @@ VOID DoPlayerDeathFollowKiller(PLAYERp pp) } } -VOID DoPlayerDeathCheckKeys(PLAYERp pp) +void DoPlayerDeathCheckKeys(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; - extern BOOL DemoMode,DemoDone; - extern BOOL InputMode; + extern SWBOOL DemoMode,DemoDone; + extern SWBOOL InputMode; //if (TEST_SYNC_KEY(pp, SK_OPERATE)) if (TEST_SYNC_KEY(pp, SK_SPACE_BAR)) @@ -6971,7 +6971,7 @@ VOID DoPlayerDeathCheckKeys(PLAYERp pp) } } -VOID +void DoPlayerHeadDebris(PLAYERp pp) { SECTORp sectp = §or[pp->cursectnum]; @@ -7126,7 +7126,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp) } } -VOID DoPlayerDeathFlip(PLAYERp pp) +void DoPlayerDeathFlip(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -7164,7 +7164,7 @@ VOID DoPlayerDeathFlip(PLAYERp pp) -VOID DoPlayerDeathDrown(PLAYERp pp) +void DoPlayerDeathDrown(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -7204,7 +7204,7 @@ VOID DoPlayerDeathDrown(PLAYERp pp) } -VOID DoPlayerDeathBounce(PLAYERp pp) +void DoPlayerDeathBounce(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -7243,7 +7243,7 @@ VOID DoPlayerDeathBounce(PLAYERp pp) -VOID DoPlayerDeathCrumble(PLAYERp pp) +void DoPlayerDeathCrumble(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -7296,7 +7296,7 @@ VOID DoPlayerDeathCrumble(PLAYERp pp) DoPlayerHeadDebris(pp); } -VOID DoPlayerDeathExplode(PLAYERp pp) +void DoPlayerDeathExplode(PLAYERp pp) { SPRITEp sp = pp->SpriteP; USERp u = User[pp->PlayerSprite]; @@ -7352,7 +7352,7 @@ VOID DoPlayerDeathExplode(PLAYERp pp) DoPlayerHeadDebris(pp); } -VOID +void DoPlayerBeginRun(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -7387,7 +7387,7 @@ DoPlayerBeginRun(PLAYERp pp) NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Stand); } -VOID +void DoPlayerRun(PLAYERp pp) { USERp u = User[pp->PlayerSprite]; @@ -7549,7 +7549,7 @@ DoPlayerRun(PLAYERp pp) int -PlayerStateControl(SHORT SpriteNum) +PlayerStateControl(int16_t SpriteNum) { USERp u; @@ -7602,8 +7602,8 @@ PlayerStateControl(SHORT SpriteNum) return 0; } -VOID -MoveSkipSavePos(VOID) +void +MoveSkipSavePos(void) { SPRITEp sp; USERp u; @@ -7667,16 +7667,16 @@ MoveSkipSavePos(VOID) } -VOID PlayerTimers(PLAYERp pp) +void PlayerTimers(PLAYERp pp) { SPRITEp sp = pp->SpriteP; InventoryTimer(pp); } -VOID ChopsCheck(PLAYERp pp) +void ChopsCheck(PLAYERp pp) { - extern BOOL HelpInputMode; + extern SWBOOL HelpInputMode; extern int ChopTics; if (!UsingMenus && !HelpInputMode && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1) @@ -7723,7 +7723,7 @@ VOID ChopsCheck(PLAYERp pp) } } -VOID PlayerGlobal(PLAYERp pp) +void PlayerGlobal(PLAYERp pp) { // This is the place for things that effect the player no matter what hes // doing @@ -7786,7 +7786,7 @@ VOID PlayerGlobal(PLAYERp pp) } -VOID UpdateScrollingMessages(VOID) +void UpdateScrollingMessages(void) { short i; @@ -7820,7 +7820,7 @@ VOID UpdateScrollingMessages(VOID) } } -VOID UpdateConMessages(VOID) +void UpdateConMessages(void) { short i; @@ -7832,11 +7832,11 @@ VOID UpdateConMessages(VOID) conbot = conbotgoal; } -VOID MultiPlayLimits(VOID) +void MultiPlayLimits(void) { short pnum; PLAYERp pp; - BOOL Done = FALSE; + SWBOOL Done = FALSE; if (ExitLevel) return; @@ -7884,10 +7884,10 @@ VOID MultiPlayLimits(VOID) void PauseMultiPlay(void) { - static BOOL SavePrediction; + static SWBOOL SavePrediction; PLAYERp pp; short pnum,p; - extern BOOL GamePaused; + extern SWBOOL GamePaused; // check for pause of multi-play game TRAVERSE_CONNECT(pnum) @@ -7931,26 +7931,26 @@ void PauseMultiPlay(void) } } -VOID -domovethings(VOID) +void +domovethings(void) { - extern BOOL DebugAnim; - extern BOOL DebugPanel; - extern BOOL DebugActor; - extern BOOL DebugSector; - extern BOOL DebugActorFreeze; - extern BOOL ResCheat; + extern SWBOOL DebugAnim; + extern SWBOOL DebugPanel; + extern SWBOOL DebugActor; + extern SWBOOL DebugSector; + extern SWBOOL DebugActorFreeze; + extern SWBOOL ResCheat; extern int PlayClock; short i, j, pnum, nexti; int WeaponOperate(PLAYERp pp); - extern BOOL GamePaused; + extern SWBOOL GamePaused; PLAYERp pp; USERp u; SPRITEp sp; - BOOL MyCommPlayerQuit(void); + SWBOOL MyCommPlayerQuit(void); extern unsigned int MoveThingsCount; - extern BOOL ScrollMode2D; - extern BOOL ReloadPrompt; + extern SWBOOL ScrollMode2D; + extern SWBOOL ReloadPrompt; extern int FinishTimer; @@ -8021,7 +8021,7 @@ domovethings(VOID) #if 0 { - extern BOOL PauseKeySet; + extern SWBOOL PauseKeySet; if (KEY_PRESSED(KEYSC_F5) && !(KEY_PRESSED(KEYSC_ALT) || KEY_PRESSED(KEYSC_RALT)) && !PauseKeySet) { KEY_PRESSED(KEYSC_F5) = 0; @@ -8082,10 +8082,10 @@ domovethings(VOID) TRAVERSE_CONNECT(pnum) { extern short screenpeek; - extern BOOL PlayerTrackingMode; + extern SWBOOL PlayerTrackingMode; void pSpriteControl(PLAYERp pp); extern PLAYERp GlobPlayerP; - extern BOOL ScrollMode2D; + extern SWBOOL ScrollMode2D; pp = Player + pnum; GlobPlayerP = pp; @@ -8157,13 +8157,13 @@ domovethings(VOID) extern unsigned char palette_data[256][3]; // Global palette array -VOID -InitAllPlayers(VOID) +void +InitAllPlayers(void) { PLAYERp pp; PLAYERp pfirst = Player; int i; - extern BOOL NewGame; + extern SWBOOL NewGame; //int fz,cz; //getzsofslope(pfirst->cursectnum, pfirst->posx, pfirst->posy, &cz, &fz); @@ -8229,7 +8229,7 @@ int SearchSpawnPosition(PLAYERp pp) SPRITEp sp; short pos_num; short pnum,spawn_sprite; - BOOL blocked; + SWBOOL blocked; do { @@ -8263,9 +8263,9 @@ int SearchSpawnPosition(PLAYERp pp) return pos_num; } -BOOL SpawnPositionUsed[MAX_SW_PLAYERS_REG+1]; +SWBOOL SpawnPositionUsed[MAX_SW_PLAYERS_REG+1]; -VOID +void PlayerSpawnPosition(PLAYERp pp) { SPRITEp sp; @@ -8341,8 +8341,8 @@ PlayerSpawnPosition(PLAYERp pp) } -VOID -InitMultiPlayerInfo(VOID) +void +InitMultiPlayerInfo(void) { PLAYERp pp; SPRITEp sp; @@ -8446,7 +8446,7 @@ DoFootPrints(short SpriteNum) return 0; } -VOID CheckFootPrints(PLAYERp pp) +void CheckFootPrints(PLAYERp pp) { if (pp->NumFootPrints <= 0 || FootMode != WATER_FOOT) { diff --git a/polymer/eduke32/source/sw/src/player.h b/polymer/eduke32/source/sw/src/player.h index 1a230a1f4..d91a599dd 100644 --- a/polymer/eduke32/source/sw/src/player.h +++ b/polymer/eduke32/source/sw/src/player.h @@ -121,10 +121,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms int SetVisHigh(void); int SetVisNorm(void); -VOID DoWeapon(VOID); -VOID HeadBobStateControl(VOID); -int DoPickTarget(SPRITEp sp, WORD max_delta_ang, BOOL skip_targets); -VOID DoPlayer(VOID); +void DoWeapon(void); +void HeadBobStateControl(void); +int DoPickTarget(SPRITEp sp, uint32_t max_delta_ang, SWBOOL skip_targets); +void DoPlayer(void); void domovethings(void); void InitAllPlayers(void); void InitMultiPlayerInfo(void); @@ -139,7 +139,7 @@ int DoPlayerWadeSuperJump(PLAYERp pp); void DoPlayerWarpTeleporter(PLAYERp pp); void UpdatePlayerSprite(PLAYERp pp); void PlaySOsound(short sectnum,short sound_num); -VOID DoSpawnTeleporterEffectPlace(SPRITEp sp); +void DoSpawnTeleporterEffectPlace(SPRITEp sp); void FindMainSector(SECTOR_OBJECTp sop); #endif diff --git a/polymer/eduke32/source/sw/src/predict.c b/polymer/eduke32/source/sw/src/predict.c index 5a7a897ad..4ec311891 100644 --- a/polymer/eduke32/source/sw/src/predict.c +++ b/polymer/eduke32/source/sw/src/predict.c @@ -41,8 +41,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "net.h" //#include "symutil.h" -BOOL PredictionOn = TRUE; -BOOL Prediction = FALSE; +SWBOOL PredictionOn = TRUE; +SWBOOL Prediction = FALSE; PLAYER PredictPlayer; USER PredictUser; PLAYERp ppp = &PredictPlayer; @@ -56,15 +56,15 @@ typedef struct PREDICT Predict[MOVEFIFOSIZ]; int predictmovefifoplc; -VOID DoPlayerSectorUpdatePreMove(PLAYERp); -VOID DoPlayerSectorUpdatePostMove(PLAYERp); +void DoPlayerSectorUpdatePreMove(PLAYERp); +void DoPlayerSectorUpdatePostMove(PLAYERp); -extern BOOL GamePaused; +extern SWBOOL GamePaused; #define PREDICT_DEBUG 0 #if PREDICT_DEBUG -VOID (*pred_last_func)(PLAYERp) = NULL; +void (*pred_last_func)(PLAYERp) = NULL; #endif void @@ -102,10 +102,10 @@ PredictDebug(PLAYERp ppp) if (ppp->DoPlayerAction != pred_last_func) { - extern ULONG MoveThingsCount; + extern uint32_t MoveThingsCount; SYM_TABLEp st_ptr; - ULONG unrelocated_offset; - ULONG offset_from_symbol; + uint32_t unrelocated_offset; + uint32_t offset_from_symbol; unrelocated_offset = SymCodePtrToOffset((void *)ppp->DoPlayerAction); st_ptr = SearchSymTableByOffset(SymTableCode, SymCountCode, unrelocated_offset, &offset_from_symbol); diff --git a/polymer/eduke32/source/sw/src/quake.c b/polymer/eduke32/source/sw/src/quake.c index d1c07400d..ffcbdb7da 100644 --- a/polymer/eduke32/source/sw/src/quake.c +++ b/polymer/eduke32/source/sw/src/quake.c @@ -48,7 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // only for timed quakes #define QUAKE_WaitForTrigger(sp) (TEST_BOOL3(sp)) -extern BOOL GamePaused; +extern SWBOOL GamePaused; short CopyQuakeSpotToOn(SPRITEp sp) { @@ -274,7 +274,7 @@ int SpawnQuake(short sectnum, int x, int y, int z, return SpriteNum; } -BOOL +SWBOOL SetQuake(PLAYERp pp, short tics, short amt) { SpawnQuake(pp->cursectnum, pp->posx, pp->posy, pp->posz, tics, amt, 30000); @@ -282,7 +282,7 @@ SetQuake(PLAYERp pp, short tics, short amt) } int -SetExpQuake(SHORT Weapon) +SetExpQuake(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; @@ -291,7 +291,7 @@ SetExpQuake(SHORT Weapon) } int -SetGunQuake(SHORT SpriteNum) +SetGunQuake(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -310,7 +310,7 @@ SetPlayerQuake(PLAYERp pp) } int -SetNuclearQuake(SHORT Weapon) +SetNuclearQuake(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; @@ -319,7 +319,7 @@ SetNuclearQuake(SHORT Weapon) } int -SetSumoQuake(SHORT SpriteNum) +SetSumoQuake(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; @@ -328,7 +328,7 @@ SetSumoQuake(SHORT SpriteNum) } int -SetSumoFartQuake(SHORT SpriteNum) +SetSumoFartQuake(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; diff --git a/polymer/eduke32/source/sw/src/quake.h b/polymer/eduke32/source/sw/src/quake.h index 6fb9e99bf..b4c59ea15 100644 --- a/polymer/eduke32/source/sw/src/quake.h +++ b/polymer/eduke32/source/sw/src/quake.h @@ -29,11 +29,11 @@ void ProcessQuakeOn(void); void ProcessQuakeSpot(void); void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *ang_diff); void DoQuake(PLAYERp pp); -BOOL SetQuake(PLAYERp pp, short tics, short amt); -int SetExpQuake(SHORT Weapon); -int SetGunQuake(SHORT SpriteNum); +SWBOOL SetQuake(PLAYERp pp, short tics, short amt); +int SetExpQuake(int16_t Weapon); +int SetGunQuake(int16_t SpriteNum); int SetPlayerQuake(PLAYERp mpp); -int SetNuclearQuake(SHORT Weapon); -int SetSumoQuake(SHORT SpriteNum); -int SetSumoFartQuake(SHORT SpriteNum); +int SetNuclearQuake(int16_t Weapon); +int SetSumoQuake(int16_t SpriteNum); +int SetSumoFartQuake(int16_t SpriteNum); diff --git a/polymer/eduke32/source/sw/src/ripper.c b/polymer/eduke32/source/sw/src/ripper.c index a6573f483..dca980209 100644 --- a/polymer/eduke32/source/sw/src/ripper.c +++ b/polymer/eduke32/source/sw/src/ripper.c @@ -947,7 +947,7 @@ InitRipperHang(short SpriteNum) short hitsprite = -2, hitsect = -2; int hitx, hity, hitz; - BOOL Found = FALSE; + SWBOOL Found = FALSE; short dang, tang; for (dang = 0; dang < 2048; dang += 128) diff --git a/polymer/eduke32/source/sw/src/ripper2.c b/polymer/eduke32/source/sw/src/ripper2.c index 8bd05f74e..e0dbc5680 100644 --- a/polymer/eduke32/source/sw/src/ripper2.c +++ b/polymer/eduke32/source/sw/src/ripper2.c @@ -946,7 +946,7 @@ InitRipper2Hang(short SpriteNum) short hitsprite = -2, hitsect = -2; int hitx, hity, hitz; - BOOL Found = FALSE; + SWBOOL Found = FALSE; short dang, tang; for (dang = 0; dang < 2048; dang += 128) diff --git a/polymer/eduke32/source/sw/src/rooms.c b/polymer/eduke32/source/sw/src/rooms.c index 71bf4e7d0..159d713ba 100644 --- a/polymer/eduke32/source/sw/src/rooms.c +++ b/polymer/eduke32/source/sw/src/rooms.c @@ -43,18 +43,18 @@ void FAF_DrawRooms(int posx, int posy, int posz, short ang, int horiz, short cur #define ZMAX 400 typedef struct { - LONG zval[ZMAX]; - SHORT sectnum[ZMAX]; - SHORT pic[ZMAX]; - SHORT zcount; - SHORT slope[ZMAX]; + int32_t zval[ZMAX]; + int16_t sectnum[ZMAX]; + int16_t pic[ZMAX]; + int16_t zcount; + int16_t slope[ZMAX]; } SAVE, *SAVEp; 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= 0 && secte >= 0); @@ -379,12 +379,12 @@ GetZadjustment(short sectnum, short hitag) 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; int z_amt = 0; - BOOL SkipFAFcheck = FALSE; + SWBOOL SkipFAFcheck = FALSE; if ((int)florhit != -1) { @@ -493,7 +493,7 @@ BOOL SectorZadjust(int ceilhit, LONGp hiz, short florhit, LONGp loz) return SkipFAFcheck; } -VOID WaterAdjust(short florhit, LONGp loz) +void WaterAdjust(short florhit, int32_t* loz) { 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, - LONGp hiz, LONGp ceilhit, - LONGp loz, LONGp florhit, - LONG clipdist, LONG clipmask) +void FAFgetzrange(int32_t x, int32_t y, int32_t z, int16_t sectnum, + int32_t* hiz, int32_t* ceilhit, + int32_t* loz, int32_t* florhit, + int32_t clipdist, int32_t clipmask) { int foo1; int foo2; - BOOL SkipFAFcheck; + SWBOOL SkipFAFcheck; // IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // 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, - LONGp hiz, LONGp ceilhit, - LONGp loz, LONGp florhit) +void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, int16_t sectnum, + int32_t* hiz, int32_t* ceilhit, + int32_t* loz, int32_t* florhit) { int foo1; int foo2; - BOOL SkipFAFcheck; + SWBOOL SkipFAFcheck; // IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // 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 -BOOL +SWBOOL FAF_ConnectCeiling(short sectnum) { return sector[sectnum].ceilingpicnum == FAF_MIRROR_PIC; } -BOOL +SWBOOL FAF_ConnectFloor(short sectnum) { return sector[sectnum].floorpicnum == FAF_MIRROR_PIC; @@ -660,8 +660,8 @@ FAF_ConnectFloor(short sectnum) // doesn't work for blank pics -BOOL -PicInView(short tile_num, BOOL reset) +SWBOOL +PicInView(short tile_num, SWBOOL reset) { if (TEST(gotpic[tile_num >> 3], 1 << (tile_num & 7))) { @@ -674,13 +674,13 @@ PicInView(short tile_num, BOOL reset) return FALSE; } -VOID -SetupMirrorTiles(VOID) +void +SetupMirrorTiles(void) { short i, nexti; short j, nextj; SPRITEp sp; - BOOL found; + SWBOOL found; 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 if (inside(x, y, GlobStackSect[i]) == 1) { - BOOL found = FALSE; + SWBOOL found = FALSE; 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) { - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[i], SpriteNum, Next) { @@ -881,8 +881,8 @@ GetUpperLowerSector(short match, int x, int y, short *upper, short *lower) } } -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) { int xoff = 0; int yoff = 0; @@ -969,8 +969,8 @@ FindCeilingView(short match, LONGp x, LONGp y, LONG z, SHORTp sectnum) return TRUE; } -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) { int xoff = 0; int yoff = 0; @@ -1097,7 +1097,7 @@ ViewSectorInScene(short cursectnum, short type, short level) return -1; } -VOID +void DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) { short i; diff --git a/polymer/eduke32/source/sw/src/rotator.c b/polymer/eduke32/source/sw/src/rotator.c index 8f9caa53c..8de4d1d55 100644 --- a/polymer/eduke32/source/sw/src/rotator.c +++ b/polymer/eduke32/source/sw/src/rotator.c @@ -35,10 +35,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "interp.h" #include "sprite.h" -short DoRotatorMatch(PLAYERp pp, short match, BOOL); -BOOL TestRotatorMatchActive(short match); -VOID InterpSectorSprites(short sectnum, BOOL state); -VOID DoMatchEverything(PLAYERp pp, short match, short state); +short DoRotatorMatch(PLAYERp pp, short match, SWBOOL); +SWBOOL TestRotatorMatchActive(short match); +void InterpSectorSprites(short sectnum, SWBOOL state); +void DoMatchEverything(PLAYERp pp, short match, short state); void DoRotatorSetInterp(short SpriteNum); void DoRotatorStopInterp(short SpriteNum); @@ -71,12 +71,12 @@ void ReverseRotator(short SpriteNum) r->vel = -r->vel; } -BOOL +SWBOOL RotatorSwitch(short match, short setting) { SPRITEp sp; short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) { @@ -154,7 +154,7 @@ short DoRotatorOperate(PLAYERp pp, short sectnum) // called from switches and triggers // returns first vator found short -DoRotatorMatch(PLAYERp pp, short match, BOOL manual) +DoRotatorMatch(PLAYERp pp, short match, SWBOOL manual) { USERp fu; SPRITEp fsp; @@ -174,7 +174,7 @@ DoRotatorMatch(PLAYERp pp, short match, BOOL manual) fu = User[i]; // 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 (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) { USERp fu; @@ -311,7 +311,7 @@ int DoRotatorMove(short SpriteNum) int i, nexti; int nx,ny; int dist,closest; - BOOL kill = FALSE; + SWBOOL kill = FALSE; r = u->rotator; diff --git a/polymer/eduke32/source/sw/src/rts.c b/polymer/eduke32/source/sw/src/rts.c index 0ade3199c..9e3ea12b3 100644 --- a/polymer/eduke32/source/sw/src/rts.c +++ b/polymer/eduke32/source/sw/src/rts.c @@ -51,7 +51,7 @@ unsigned char lumplockbyte[11]; // STATICS //============= -static int32 numlumps = 0; +static int32_t numlumps = 0; static void **lumpcache = NULL; 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; lumpinfo_t *lump_p; - int32 i; - int32 handle, length; - int32 startlump; + int32_t i; + int32_t handle, length; + int32_t startlump; filelump_t *fileinfo, *fileinfoo; // @@ -159,7 +159,7 @@ int32 RTS_AddFile(char *filename) void RTS_Init(char *filename) { - int32 length; + int32_t length; // // open all the files, load headers, and count lumps // @@ -192,7 +192,7 @@ void RTS_Init(char *filename) void RTS_Shutdown(void) { - int32 i; + int32_t i; if (lumpcache) { @@ -223,7 +223,7 @@ void RTS_Shutdown(void) ==================== */ -int32 RTS_NumSounds(void) +int32_t RTS_NumSounds(void) { return numlumps-1; } @@ -238,7 +238,7 @@ int32 RTS_NumSounds(void) ==================== */ -int32 RTS_SoundLength(int32 lump) +int32_t RTS_SoundLength(int32_t lump) { lump++; if (lump >= numlumps) @@ -254,7 +254,7 @@ int32 RTS_SoundLength(int32 lump) ==================== */ -char *RTS_GetSoundName(int32 i) +char *RTS_GetSoundName(int32_t i) { i++; 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; @@ -295,10 +295,10 @@ void RTS_ReadLump(int32 lump, void *dest) // allocates off the cache -void *RTS_GetSound(int32 lump) +void *RTS_GetSound(int32_t lump) { lump++; - if ((uint32)lump >= (uint32)numlumps) + if ((uint16_t)lump >= (uint16_t)numlumps) Error("RTS_GetSound: %i >= %i\n",lump,numlumps); 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++; - if ((uint32)lump >= numlumps) + if ((uint16_t)lump >= numlumps) Error("RTS_GetSound: %i >= numlumps",lump); else if (lump < 0) diff --git a/polymer/eduke32/source/sw/src/rts.h b/polymer/eduke32/source/sw/src/rts.h index 656425ca3..3658da3aa 100644 --- a/polymer/eduke32/source/sw/src/rts.h +++ b/polymer/eduke32/source/sw/src/rts.h @@ -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 diff --git a/polymer/eduke32/source/sw/src/save.c b/polymer/eduke32/source/sw/src/save.c index ee7c0f02d..a6787aad3 100644 --- a/polymer/eduke32/source/sw/src/save.c +++ b/polymer/eduke32/source/sw/src/save.c @@ -67,7 +67,7 @@ TO DO */ extern int lastUpdate; -extern BYTE RedBookSong[40]; +extern uint8_t RedBookSong[40]; extern char UserMapName[80]; extern char LevelSong[16]; extern char SaveGameDescr[10][80]; @@ -75,26 +75,26 @@ extern int PlayClock; extern short TotalKillable; extern short LevelSecrets; extern short Bunny_Count; -extern BOOL NewGame; +extern SWBOOL NewGame; extern char CacheLastLevel[]; extern short PlayingLevel; extern int GodMode; extern int GameVersion; //extern short Zombies; -extern BOOL serpwasseen; -extern BOOL sumowasseen; -extern BOOL zillawasseen; +extern SWBOOL serpwasseen; +extern SWBOOL sumowasseen; +extern SWBOOL zillawasseen; extern short BossSpriteNum[3]; -VOID ScreenTileLock(void); -VOID ScreenTileUnLock(void); +void ScreenTileLock(void); +void ScreenTileUnLock(void); int ScreenSaveSetup(PLAYERp pp); -VOID ScreenSave(FILE *fout); +void ScreenSave(FILE *fout); int ScreenLoadSaveSetup(PLAYERp pp); -VOID ScreenLoad(FILE *fin); +void ScreenLoad(FILE *fin); #define PANEL_SAVE 1 #define ANIM_SAVE 1 @@ -225,9 +225,9 @@ int SaveGame(short save_num) USERp u; ANIM tanim; ANIMp a; - CHAR code; - BYTE data_code; - SHORT data_ndx; + int8_t code; + uint8_t data_code; + int16_t data_ndx; PANEL_SPRITE tpanel_sprite; PANEL_SPRITEp psp,cur,next; SECTOR_OBJECTp sop; @@ -512,11 +512,11 @@ int SaveGame(short save_num) { 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; break; } @@ -529,11 +529,11 @@ int SaveGame(short save_num) { 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; break; } @@ -752,10 +752,10 @@ int LoadGame(short save_num) USERp u; SECTOR_OBJECTp sop; SECT_USERp sectu; - CHAR code; + int8_t code; ANIMp a; - BYTE data_code; - SHORT data_ndx; + uint8_t data_code; + int16_t data_ndx; PANEL_SPRITEp psp,next,cur; PANEL_SPRITE tpanel_sprite; char game_name[80]; @@ -765,7 +765,7 @@ int LoadGame(short save_num) int StateStartNdx; int StateNdx; int StateEndNdx; - extern BOOL InMenuLevel; + extern SWBOOL InMenuLevel; Saveable_Init(); @@ -1157,9 +1157,9 @@ int LoadGame(short save_num) MREAD(palette_data,sizeof(palette_data),1,fil); { - BOOL AmbBak = gs.Ambient; - BOOL MusicBak = gs.MusicOn; - BOOL FxBak = gs.FxOn; + SWBOOL AmbBak = gs.Ambient; + SWBOOL MusicBak = gs.MusicOn; + SWBOOL FxBak = gs.FxOn; short SndVolBak = gs.SoundVolume; short MusVolBak = gs.MusicVolume; MREAD(&gs,sizeof(gs),1,fil); @@ -1300,7 +1300,7 @@ int LoadGame(short save_num) return 0; } -VOID +void ScreenSave(MFILE fout) { int num; @@ -1308,7 +1308,7 @@ ScreenSave(MFILE fout) ASSERT(num == 1); } -VOID +void ScreenLoad(MFILE fin) { int num; diff --git a/polymer/eduke32/source/sw/src/scrip2.c b/polymer/eduke32/source/sw/src/scrip2.c index cea83dc1c..fa0dbad38 100644 --- a/polymer/eduke32/source/sw/src/scrip2.c +++ b/polymer/eduke32/source/sw/src/scrip2.c @@ -82,8 +82,8 @@ char token[MAXTOKEN]; char *scriptbuffer,*script_p,*scriptend_p; int grabbed; int scriptline; -BOOL endofscript; -BOOL tokenready; // only TRUE if UnGetToken was just called +SWBOOL endofscript; +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 fp; @@ -161,7 +161,7 @@ void UnGetToken(void) ============== */ -void GetToken(BOOL crossline) +void GetToken(SWBOOL crossline) { char *token_p; @@ -249,7 +249,7 @@ skipspace: ============== */ -BOOL TokenAvailable(void) +SWBOOL TokenAvailable(void) { char *search_p; diff --git a/polymer/eduke32/source/sw/src/sector.c b/polymer/eduke32/source/sw/src/sector.c index 30378c848..49a1699e2 100644 --- a/polymer/eduke32/source/sw/src/sector.c +++ b/polymer/eduke32/source/sw/src/sector.c @@ -52,19 +52,19 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms short FindNextSectorByTag(short sectnum, int tag); short LevelSecrets; -BOOL TestVatorMatchActive(short match); -BOOL TestSpikeMatchActive(short match); -BOOL TestRotatorMatchActive(short match); -BOOL TestSlidorMatchActive(short match); +SWBOOL TestVatorMatchActive(short match); +SWBOOL TestSpikeMatchActive(short match); +SWBOOL TestRotatorMatchActive(short match); +SWBOOL TestSlidorMatchActive(short match); int PlayerCheckDeath(PLAYERp, short); short DoVatorOperate(PLAYERp, short); short DoVatorMatch(PLAYERp pp, short match); short DoRotatorOperate(PLAYERp, short); -short DoRotatorMatch(PLAYERp pp, short match, BOOL); +short DoRotatorMatch(PLAYERp pp, short match, SWBOOL); 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 DoTrapMatch(short match); @@ -88,7 +88,7 @@ SINE_WALL SineWall[MAX_SINE_WALL][MAX_SINE_WALL_POINTS]; SPRING_BOARD SpringBoard[20]; 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; @@ -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; SPRITEp spu, spl; @@ -135,8 +135,8 @@ VOID WallSetupDontMove(VOID) } } -VOID -WallSetup(VOID) +void +WallSetup(void) { short i = 0; short NextSineWall = 0; @@ -423,7 +423,7 @@ WallSetup(VOID) } -VOID +void SectorLiquidSet(short i) { SECT_USERp sectu; @@ -468,8 +468,8 @@ SectorLiquidSet(short i) } } -VOID -SectorSetup(VOID) +void +SectorSetup(void) { short i = 0, k, tag; short NextSineWave = 0, rotcnt = 0, swingcnt = 0; @@ -706,7 +706,7 @@ SectorSetup(VOID) } } -VOID +void SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid) { short startwall, endwall, j; @@ -729,12 +729,12 @@ SectorMidPoint(short sectnum, int *xmid, int *ymid, int *zmid) } -VOID +void DoSpringBoard(PLAYERp pp, short sectnum) { int sb; int i; - VOID DoPlayerBeginForceJump(PLAYERp); + void DoPlayerBeginForceJump(PLAYERp); #if 0 i = AnimGetGoal(§or[sectnum].floorz); @@ -768,8 +768,8 @@ DoSpringBoard(PLAYERp pp, short sectnum) } -VOID -DoSpringBoardDown(VOID) +void +DoSpringBoardDown(void) { unsigned sb; 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) { SPRITEp sp = &sprite[SpriteNum]; @@ -1163,7 +1163,7 @@ SectorExp(short SpriteNum, short sectnum, short orig_ang, int zh) } -VOID +void DoExplodeSector(short match) { short orig_ang; @@ -1239,7 +1239,7 @@ int DoSpawnSpot(short SpriteNum) } // spawns shrap when killing an object -VOID +void DoSpawnSpotsForKill(short match) { short sn, next_sn; @@ -1268,7 +1268,7 @@ DoSpawnSpotsForKill(short match) } // spawns shrap when damaging an object -VOID +void DoSpawnSpotsForDamage(short match) { short sn, next_sn; @@ -1296,7 +1296,7 @@ DoSpawnSpotsForDamage(short match) } } -VOID +void DoSoundSpotMatch(short match, short sound_num, short sound_type) { short sn, next_sn; @@ -1384,7 +1384,7 @@ DoSoundSpotMatch(short match, short sound_num, short sound_type) } } -VOID +void DoSoundSpotStopSound(short match) { short sn, next_sn; @@ -1402,7 +1402,7 @@ DoSoundSpotStopSound(short match) } } -VOID +void DoStopSoundSpotMatch(short match) { 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)) { @@ -1453,7 +1453,7 @@ DoSectorObjectKillMatch(short match) } -BOOL +SWBOOL SearchExplodeSectorMatch(short match) { short i,nexti; @@ -1474,7 +1474,7 @@ SearchExplodeSectorMatch(short match) return FALSE; } -VOID +void KillMatchingCrackSprites(short match) { short i,nexti; @@ -1494,7 +1494,7 @@ KillMatchingCrackSprites(short match) } } -VOID +void WeaponExplodeSectorInRange(short weapon) { short i, nexti; @@ -1540,7 +1540,7 @@ WeaponExplodeSectorInRange(short weapon) } -VOID +void ShootableSwitch(short SpriteNum, short Weapon) { SPRITEp sp = &sprite[SpriteNum]; @@ -1561,7 +1561,7 @@ ShootableSwitch(short SpriteNum, short Weapon) } } -VOID DoDeleteSpriteMatch(short match) +void DoDeleteSpriteMatch(short match) { static short StatList[] = { @@ -1629,7 +1629,7 @@ VOID DoDeleteSpriteMatch(short match) } } -VOID +void DoChangorMatch(short match) { 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; @@ -1733,11 +1733,11 @@ VOID DoMatchEverything(PLAYERp pp, short match, short state) DoDeleteSpriteMatch(match); } -BOOL ComboSwitchTest(short combo_type, short match) +SWBOOL ComboSwitchTest(short combo_type, short match) { short i,nexti; SPRITEp sp; - BOOL state; + SWBOOL state; TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) { @@ -2002,7 +2002,7 @@ OperateSprite(short SpriteNum, short player_is_operating) case TAG_LEVEL_EXIT_SWITCH: { extern short Level; - extern BOOL QuitFlag, ExitLevel, FinishedLevel; + extern SWBOOL QuitFlag, ExitLevel, FinishedLevel; AnimateSwitch(sp, -1); @@ -2173,7 +2173,7 @@ int DoTrapMatch(short match) } -VOID +void OperateTripTrigger(PLAYERp pp) { SECTORp sectp = §or[pp->cursectnum]; @@ -2211,7 +2211,7 @@ OperateTripTrigger(PLAYERp pp) case TAG_LEVEL_EXIT_SWITCH: { extern short Level; - extern BOOL QuitFlag, ExitLevel, FinishedLevel; + extern SWBOOL QuitFlag, ExitLevel, FinishedLevel; if (sectp->hitag) Level = sectp->hitag; @@ -2332,7 +2332,7 @@ OperateTripTrigger(PLAYERp pp) } } -VOID +void OperateContinuousTrigger(PLAYERp pp) { 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 // If player is too far away, don't grunt #define PLAYER_SOUNDEVENT_TAG 900 -BOOL NearThings(PLAYERp pp) +SWBOOL NearThings(PLAYERp pp) { short sectnum; short rndnum; @@ -2680,12 +2680,12 @@ int DoPlayerGrabStar(PLAYERp pp) -VOID +void PlayerOperateEnv(PLAYERp pp) { SECT_USERp sectu = SectUser[pp->cursectnum]; SECTORp sectp = §or[pp->cursectnum]; - BOOL found; + SWBOOL found; if (Prediction) return; @@ -2869,8 +2869,8 @@ PlayerOperateEnv(PLAYERp pp) -VOID -DoSineWaveFloor(VOID) +void +DoSineWaveFloor(void) { SINE_WAVE_FLOOR *swf; int newz; @@ -2934,8 +2934,8 @@ DoSineWaveFloor(VOID) } -VOID -DoSineWaveWall(VOID) +void +DoSineWaveWall(void) { SINE_WALL *sw; int new; @@ -2964,7 +2964,7 @@ DoSineWaveWall(VOID) } } -VOID +void DoAnim(int numtics) { int i, animval; @@ -3024,8 +3024,8 @@ DoAnim(int numtics) } } -VOID -AnimClear(VOID) +void +AnimClear(void) { int i, animval; @@ -3320,8 +3320,8 @@ void movelava(char *dapic) } -VOID -DoPanning(VOID) +void +DoPanning(void) { int nx, ny; short i,nexti; @@ -3376,13 +3376,13 @@ DoPanning(VOID) } -VOID -DoSector(VOID) +void +DoSector(void) { short i; SECTOR_OBJECTp sop; - BOOL riding; - extern BOOL DebugActorFreeze; + SWBOOL riding; + extern SWBOOL DebugActorFreeze; int sync_flag; short pnum; int min_dist,dist,a,b,c; diff --git a/polymer/eduke32/source/sw/src/sector.h b/polymer/eduke32/source/sw/src/sector.h index e754fa999..152437a2c 100644 --- a/polymer/eduke32/source/sw/src/sector.h +++ b/polymer/eduke32/source/sw/src/sector.h @@ -28,16 +28,16 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define SECTOR_H -VOID SectorSetup(VOID); +void SectorSetup(void); 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 MoveDoorUp(short door_sector, short auto_close, short door_speed); int MoveDoorDown(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); -VOID PlayerOperateEnv(PLAYERp pp); +void PlayerOperateEnv(PLAYERp pp); int TeleportToSector(PLAYERp pp, int newsector); int OperateSector(short sectnum,short player_is_operating); int OperateSprite(short SpriteNum, short player_is_operating); @@ -63,15 +63,15 @@ typedef struct } NEAR_TAG_INFO, *NEAR_TAG_INFOp; extern short nti_cnt; -VOID DoSpawnSpotsForKill(short match); -VOID DoSpawnSpotsForDamage(short match); -VOID DoMatchEverything(PLAYERp pp, short match, short state); -BOOL ComboSwitchTest(short combo_type,short match); +void DoSpawnSpotsForKill(short match); +void DoSpawnSpotsForDamage(short match); +void DoMatchEverything(PLAYERp pp, short match, short state); +SWBOOL ComboSwitchTest(short combo_type,short match); void DoSoundSpotStopSound(short match); void DoSector(void); short AnimateSwitch(SPRITEp sp,short tgt_value); void ShootableSwitch(short SpriteNum,short Weapon); -BOOL TestKillSectorObject(SECTOR_OBJECTp sop); +SWBOOL TestKillSectorObject(SECTOR_OBJECTp sop); void WeaponExplodeSectorInRange(short weapon); void initlava(void); diff --git a/polymer/eduke32/source/sw/src/serp.c b/polymer/eduke32/source/sw/src/serp.c index 6bcaf68e5..8cd478c50 100644 --- a/polymer/eduke32/source/sw/src/serp.c +++ b/polymer/eduke32/source/sw/src/serp.c @@ -34,7 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "sector.h" -extern BYTE RedBookSong[40]; +extern uint8_t RedBookSong[40]; extern short BossSpriteNum[3]; DECISION SerpBattle[] = @@ -811,7 +811,7 @@ int DoDeathSpecial(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - static BOOL alreadydid = FALSE; + static SWBOOL alreadydid = FALSE; DoMatchEverything(NULL, sp->lotag, ON); diff --git a/polymer/eduke32/source/sw/src/settings.h b/polymer/eduke32/source/sw/src/settings.h index b2d145c90..590ba6b55 100644 --- a/polymer/eduke32/source/sw/src/settings.h +++ b/polymer/eduke32/source/sw/src/settings.h @@ -33,41 +33,41 @@ typedef struct int MouseSpeed; int MusicVolume; int SoundVolume; - CHAR BorderNum; - CHAR Brightness; - CHAR BorderTile; - BOOL MouseAimingType; - BOOL MouseLook; - BOOL MouseInvert; - BOOL Bobbing; - BOOL Tilting; - BOOL Shadows; - BOOL AutoRun; - BOOL Crosshair; - BOOL AutoAim; - BOOL Messages; - BOOL FxOn; - BOOL MusicOn; - BOOL Talking; - BOOL Ambient; - BOOL FlipStereo; + int8_t BorderNum; + int8_t Brightness; + int8_t BorderTile; + SWBOOL MouseAimingType; + SWBOOL MouseLook; + SWBOOL MouseInvert; + SWBOOL Bobbing; + SWBOOL Tilting; + SWBOOL Shadows; + SWBOOL AutoRun; + SWBOOL Crosshair; + SWBOOL AutoAim; + SWBOOL Messages; + SWBOOL FxOn; + SWBOOL MusicOn; + SWBOOL Talking; + SWBOOL Ambient; + SWBOOL FlipStereo; // Net Options from Menus - BYTE NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn] - BYTE NetLevel; // 1-28 - BYTE NetMonsters; // Cycle skill levels - BOOL NetHurtTeammate; // Allow friendly kills - BOOL NetSpawnMarkers; // Respawn markers on/off - BOOL NetTeamPlay; // Team play - BYTE NetKillLimit; // Number of frags at which game ends - BYTE NetTimeLimit; // Limit time of game - BYTE NetColor; // Chosen color for player - BYTE ParentalLock; // Parental Lock on/off + uint8_t NetGameType; // 0=DeathMatch [spawn], 1=Cooperative 2=DeathMatch [no spawn] + uint8_t NetLevel; // 1-28 + uint8_t NetMonsters; // Cycle skill levels + SWBOOL NetHurtTeammate; // Allow friendly kills + SWBOOL NetSpawnMarkers; // Respawn markers on/off + SWBOOL NetTeamPlay; // Team play + uint8_t NetKillLimit; // Number of frags at which game ends + uint8_t NetTimeLimit; // Limit time of game + uint8_t NetColor; // Chosen color for player + uint8_t ParentalLock; // Parental Lock on/off char Password[20]; // Parental Lock password - BOOL NetNuke; - BOOL Voxels; - BOOL Stats; - BOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming - BOOL PlayCD; + SWBOOL NetNuke; + SWBOOL Voxels; + SWBOOL Stats; + SWBOOL MouseAimingOn; // whether it was on or off - NOT the type of mouse aiming + SWBOOL PlayCD; char OggTrackName[MAXOGGTRACKLENGTH]; } GAME_SET, *GAME_SETp; diff --git a/polymer/eduke32/source/sw/src/setup.c b/polymer/eduke32/source/sw/src/setup.c index 09c1f9f07..0f47e502f 100644 --- a/polymer/eduke32/source/sw/src/setup.c +++ b/polymer/eduke32/source/sw/src/setup.c @@ -99,9 +99,9 @@ void CenterRudder(void) =================== */ -static int32 timert; +static int32_t timert; -int32 GetTime(void) +int32_t GetTime(void) { return totalclock; //return timert++; @@ -170,8 +170,8 @@ void TermSetup(void) #include "rts.h" #include "timer.h" -int32 timerhandle=0; -volatile int32 timer; +int32_t timerhandle=0; +volatile int32_t timer; /* =================== = @@ -250,7 +250,7 @@ void SetupGameButtons(void) =================== */ -int32 GetTime(void) +int32_t GetTime(void) { return timer; } @@ -324,7 +324,7 @@ void main() { char *song; char *voc; - volatile int32 lasttime; + volatile int32_t lasttime; RegisterShutdownFunction(ShutDown); KB_Startup(); @@ -351,7 +351,7 @@ void main() lasttime = timer; while (1) { - int32 i; + int32_t i; ControlInfo info; while (lasttime==timer) @@ -384,7 +384,7 @@ void main() { if (KB_KeyPressed(sc_F1+i)) { - byte *ptr; + uint8_t *ptr; KB_ClearKeyDown(sc_F1+i); ptr = RTS_GetSound(i); FX_PlayVOC(ptr, 0, 255, 255, 255, 255, 0); diff --git a/polymer/eduke32/source/sw/src/skull.c b/polymer/eduke32/source/sw/src/skull.c index c1d53e235..d31c08288 100644 --- a/polymer/eduke32/source/sw/src/skull.c +++ b/polymer/eduke32/source/sw/src/skull.c @@ -37,7 +37,7 @@ int InitSpriteGrenade(short SpriteNum); int InitSpriteChemBomb(short SpriteNum); int InitFlashBomb(short SpriteNum); int InitCaltrops(short SpriteNum); -int InitPhosphorus(SHORT SpriteNum); +int InitPhosphorus(int16_t SpriteNum); ////////////////////// // @@ -260,11 +260,11 @@ SetupSkull(short SpriteNum) } int -DoSkullMove(SHORT SpriteNum) +DoSkullMove(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - LONG dax, day, daz; + int32_t dax, day, daz; dax = MOVEx(sp->xvel, sp->ang); day = MOVEy(sp->xvel, sp->ang); @@ -277,11 +277,11 @@ DoSkullMove(SHORT SpriteNum) } int -DoSkullBeginDeath(SHORT SpriteNum) +DoSkullBeginDeath(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - SHORT i,num_ord=0; + int16_t i,num_ord=0; //extern short *DamageRadiusSkull; // Decrease for Serp God @@ -386,7 +386,7 @@ int DoSkullJump(short SpriteNum) // jump/fall type if (sp->xvel) { - BOOL SpriteOverlapZ(SHORT, SHORT, int); + SWBOOL SpriteOverlapZ(int16_t, int16_t, int); int dist,a,b,c; @@ -680,11 +680,11 @@ SetupBetty(short SpriteNum) } int -DoBettyMove(SHORT SpriteNum) +DoBettyMove(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - LONG dax, day, daz; + int32_t dax, day, daz; dax = MOVEx(sp->xvel, sp->ang); day = MOVEy(sp->xvel, sp->ang); @@ -697,11 +697,11 @@ DoBettyMove(SHORT SpriteNum) } int -DoBettyBeginDeath(SHORT SpriteNum) +DoBettyBeginDeath(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - SHORT i,num_ord=0; + int16_t i,num_ord=0; //extern short *DamageRadiusBetty; // starts the explosion that does the actual damage @@ -801,7 +801,7 @@ int DoBettyJump(short SpriteNum) // jump/fall type if (sp->xvel) { - BOOL SpriteOverlapZ(SHORT, SHORT, int); + SWBOOL SpriteOverlapZ(int16_t, int16_t, int); int dist,a,b,c; diff --git a/polymer/eduke32/source/sw/src/slidor.c b/polymer/eduke32/source/sw/src/slidor.c index bb141602f..d08eb0216 100644 --- a/polymer/eduke32/source/sw/src/slidor.c +++ b/polymer/eduke32/source/sw/src/slidor.c @@ -66,12 +66,12 @@ void ReverseSlidor(short SpriteNum) } -BOOL +SWBOOL SlidorSwitch(short match, short setting) { SPRITEp sp; short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) { @@ -150,7 +150,7 @@ short DoSlidorOperate(PLAYERp pp, short sectnum) // called from switches and triggers // returns first vator found short -DoSlidorMatch(PLAYERp pp, short match, BOOL manual) +DoSlidorMatch(PLAYERp pp, short match, SWBOOL manual) { USERp fu; SPRITEp fsp; @@ -170,7 +170,7 @@ DoSlidorMatch(PLAYERp pp, short match, BOOL manual) fu = User[i]; // 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 (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) { USERp fu; @@ -540,7 +540,7 @@ int DoSlidorMove(short SpriteNum) int nx,ny; int dist,closest; int old_pos; - BOOL kill = FALSE; + SWBOOL kill = FALSE; r = u->rotator; @@ -625,7 +625,7 @@ int DoSlidorMove(short SpriteNum) int i,nexti; SPRITEp bsp; USERp bu; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) { diff --git a/polymer/eduke32/source/sw/src/slidor.h b/polymer/eduke32/source/sw/src/slidor.h index 2ac9c19c9..603ddd9f5 100644 --- a/polymer/eduke32/source/sw/src/slidor.h +++ b/polymer/eduke32/source/sw/src/slidor.h @@ -27,9 +27,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef SLIDOR_PUBLIC_ #define SLIDOR_PUBLIC_ -short DoSlidorMatch(PLAYERp pp, short match, BOOL); -BOOL TestSlidorMatchActive(short match); -VOID InterpSectorSprites(short sectnum, BOOL state); +short DoSlidorMatch(PLAYERp pp, short match, SWBOOL); +SWBOOL TestSlidorMatchActive(short match); +void InterpSectorSprites(short sectnum, SWBOOL state); typedef void INTERP_FUNC (int *); typedef INTERP_FUNC *INTERP_FUNCp; diff --git a/polymer/eduke32/source/sw/src/sounds.c b/polymer/eduke32/source/sw/src/sounds.c index 8f2eea686..def2f1483 100644 --- a/polymer/eduke32/source/sw/src/sounds.c +++ b/polymer/eduke32/source/sw/src/sounds.c @@ -63,7 +63,7 @@ int PLocked_Sounds[] = 558,557 }; -BYTE RedBookSong[40] = +uint8_t RedBookSong[40] = { 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 @@ -73,15 +73,15 @@ BYTE RedBookSong[40] = // 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 -BOOL Use_SoundSpriteNum = FALSE; -SHORT SoundSpriteNum = -1; // Always set this back to -1 for proper validity checking! +SWBOOL Use_SoundSpriteNum = FALSE; +int16_t SoundSpriteNum = -1; // Always set this back to -1 for proper validity checking! -BOOL CDInitialized = FALSE; -BOOL MusicInitialized = FALSE; -BOOL FxInitialized = FALSE; +SWBOOL CDInitialized = FALSE; +SWBOOL MusicInitialized = FALSE; +SWBOOL FxInitialized = FALSE; void SoundCallBack(unsigned int num); -BOOL LoadSong(const char *track); +SWBOOL LoadSong(const char *track); #define MUSIC_ID -65536 @@ -128,7 +128,7 @@ char *SongName = NULL; int SongTrack = 0; SongType_t SongType = SongTypeNone; int SongVoice = -1; -extern BOOL DemoMode; +extern SWBOOL DemoMode; // // Includes digi.h to build the table @@ -156,7 +156,7 @@ AMB_INFO ambarray[] = #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); // 3d sound engine function prototype @@ -321,15 +321,15 @@ ClearSoundLocks(void) } } -VOID -UnInitSound(VOID) +void +UnInitSound(void) { SoundShutdown(); MusicShutdown(); } -VOID -InitFX(VOID) +void +InitFX(void) { VOC_INFOp vp; short i; @@ -360,16 +360,16 @@ InitFX(VOID) FX_SetCallBack(SoundCallBack); } -VOID -InitMusic(VOID) +void +InitMusic(void) { // Select which cards to use MusicStartup(); //SendGeneralMidiSysX(); } -VOID -ExternalSoundMod(VOID) +void +ExternalSoundMod(void) { FILE *fin; VOC_INFOp vp; @@ -411,8 +411,8 @@ ExternalSoundMod(VOID) extern short Level; -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) { if (!gs.MusicOn) { @@ -531,14 +531,14 @@ PlaySong(char *song_file_name, int cdaudio_track, BOOL loop, BOOL restart) return FALSE; } -VOID -StopFX(VOID) +void +StopFX(void) { FX_StopAllSounds(); } void -StopSong(VOID) +StopSong(void) { if (DemoMode) return; @@ -572,8 +572,8 @@ StopSong(VOID) } } -VOID -PauseSong(BOOL pauseon) +void +PauseSong(SWBOOL pauseon) { if (!gs.MusicOn) return; @@ -592,14 +592,14 @@ SetSongVolume(int volume) { } -BOOL +SWBOOL SongIsPlaying(void) { return FALSE; } -VOID -StopSound(VOID) +void +StopSound(void) { StopFX(); 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]; extern char cachedebug; @@ -841,11 +841,11 @@ PlaySound(int num, int *x, int *y, int *z, Voc3D_Flags flags) int pitch = 0; short angle, sound_dist; int tx, ty, tz; - BYTE priority; + uint8_t priority; SPRITEp sp=NULL; // DEBUG - //extern BOOL Pachinko_Win_Cheat; + //extern SWBOOL Pachinko_Win_Cheat; // 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; } -VOID PlaySoundRTS(int rts_num) +void PlaySoundRTS(int rts_num) { char *rtsptr; int voice=-1; @@ -1112,7 +1112,7 @@ VOID PlaySoundRTS(int rts_num) /////////////////////////////////////////////// -BOOL +SWBOOL OpenSound(VOC_INFOp vp, int *handle, int *length) { *handle = kopen4load(vp->name, 0); @@ -1144,7 +1144,7 @@ ReadSound(int handle, VOC_INFOp vp, int length) return 0; } -BOOL +SWBOOL LoadSong(const char *filename) { int handle; @@ -1189,7 +1189,7 @@ void FlipStereo(void) void SoundStartup(void) { - int32 status; + int32_t status; void *initdata = 0; int fxdevicetype; @@ -1248,7 +1248,7 @@ SoundStartup(void) void SoundShutdown(void) { - int32 status; + int32_t status; // if they chose None lets return if (FXDevice < 0) @@ -1292,7 +1292,7 @@ void loadtmb(void) void MusicStartup(void) { - int32 status; + int32_t status; int devicetype; // if they chose None lets return @@ -1354,7 +1354,7 @@ void COVER_SetReverb(int amt) void MusicShutdown(void) { - int32 status; + int32_t status; if (CDInitialized) CD_Shutdown(); @@ -1596,7 +1596,7 @@ Delete3DSounds(void) else // JBF: added null check if (vp->vp->priority == PRI_PLAYERVOICE || vp->vp->priority == PRI_PLAYERDEATH) { - SHORT pnum; + int16_t pnum; TRAVERSE_CONNECT(pnum) { @@ -1709,7 +1709,7 @@ void StopAmbientSound(void) { VOC3D_INFOp p; - extern BOOL InMenuLevel; + extern SWBOOL InMenuLevel; if (InMenuLevel) return; @@ -1740,7 +1740,7 @@ StartAmbientSound(void) { VOC3D_INFOp p; short i,nexti; - extern BOOL InMenuLevel; + extern SWBOOL InMenuLevel; if (InMenuLevel) return; // Don't restart ambience if no level is active! Will crash game. @@ -1761,22 +1761,22 @@ typedef struct { VOC3D_INFOp p; short dist; - BYTE priority; + uint8_t priority; } TVOC_INFO, *TVOC_INFOp; void DoUpdateSounds3D(void) { VOC3D_INFOp p; - BOOL looping; + SWBOOL looping; int pitch = 0, pitchmax; int delta; short dist, angle; - BOOL deletesound = FALSE; + SWBOOL deletesound = FALSE; TVOC_INFO TmpVocArray[32]; int i; - static BOOL MoveSkip8 = 0; + static SWBOOL MoveSkip8 = 0; if (UsingMenus) return; diff --git a/polymer/eduke32/source/sw/src/sounds.h b/polymer/eduke32/source/sw/src/sounds.h index 10b39512f..e3fb73b24 100644 --- a/polymer/eduke32/source/sw/src/sounds.h +++ b/polymer/eduke32/source/sw/src/sounds.h @@ -77,22 +77,22 @@ void PlaySpriteSound(short spritenum, int attrib_ndx, Voc3D_Flags flags); void DeleteNoSoundOwner(short spritenum); void DeleteNoFollowSoundOwner(short spritenum); -BOOL CacheSound(int num, int type); +SWBOOL CacheSound(int num, int type); void COVER_SetReverb(int amt); -VOID UnInitSound(VOID); +void UnInitSound(void); void InitFX(void); -VOID InitMusic(VOID); -VOID StopFX(VOID); +void InitMusic(void); +void StopFX(void); void FlipStereo(void); void StopSong(void); -void PauseSong(BOOL pauseon); +void PauseSong(SWBOOL pauseon); void StopSound(void); void StartAmbientSound(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); -BOOL SongIsPlaying(void); -VOID PlaySoundRTS(int rts_num); +SWBOOL SongIsPlaying(void); +void PlaySoundRTS(int rts_num); // // Standard VOC format information - generally don't need this @@ -100,20 +100,20 @@ VOID PlaySoundRTS(int rts_num); typedef struct { - BYTE filler[0x1a]; - BYTE type; - WORD length; - BYTE filler2; - BYTE freq; - BYTE pack; - BYTE data[1]; + uint8_t filler[0x1a]; + uint8_t type; + uint32_t length; + uint8_t filler2; + uint8_t freq; + uint8_t pack; + uint8_t data[1]; } *VOC_HDRp; // Ambient Sound Structure struct ambientstruct { - SHORT name; - SHORT diginame; + int16_t name; + int16_t diginame; Voc3D_Flags ambient_flags; int maxtics; // When tics reaches this number next // sound happens @@ -137,16 +137,16 @@ typedef enum struct VOCstruct { 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 - SHORT pitch_lo; // lo pitch value - SHORT pitch_hi; // hi pitch value - BYTE priority; // priority at which vocs are played - SHORT voc_num; // Backward reference to parent sound + int16_t pitch_lo; // lo pitch value + int16_t pitch_hi; // hi pitch value + uint8_t priority; // priority at which vocs are played + int16_t voc_num; // Backward reference to parent sound int voc_distance; // Sound's distance effectiveness Voc_Flags voc_flags; // Various allowable flag settings for voc - BYTE lock; // locking byte for caching - BYTE playing; // number of this type of sound currently playing + uint8_t lock; // locking byte for caching + uint8_t playing; // number of this type of sound currently playing }; @@ -169,12 +169,12 @@ struct VOC3Dstruct // callback of looping sounds // If sound is active but user == 0, stop the sound 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 maxtics; // Tics until next sound occurance // for intermittent sounds - BOOL deleted; // Has sound been marked for deletion? - BOOL FX_Ok; // Did this sound play ok? + SWBOOL deleted; // Has sound been marked for deletion? + SWBOOL FX_Ok; // Did this sound play ok? }; extern VOC_INFO voc[]; diff --git a/polymer/eduke32/source/sw/src/spike.c b/polymer/eduke32/source/sw/src/spike.c index a2b9fc31e..e011ef533 100644 --- a/polymer/eduke32/source/sw/src/spike.c +++ b/polymer/eduke32/source/sw/src/spike.c @@ -33,9 +33,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" short DoSpikeMatch(PLAYERp pp, short match); -BOOL TestSpikeMatchActive(short match); +SWBOOL TestSpikeMatchActive(short match); int DoVatorMove(short SpriteNum, int *lptr); -VOID InterpSectorSprites(short sectnum, BOOL state); +void InterpSectorSprites(short sectnum, SWBOOL state); void ReverseSpike(short SpriteNum) { @@ -69,12 +69,12 @@ void ReverseSpike(short SpriteNum) u->vel_rate = -u->vel_rate; } -BOOL +SWBOOL SpikeSwitch(short match, short setting) { SPRITEp sp; short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) { @@ -213,7 +213,7 @@ DoSpikeMatch(PLAYERp pp, short match) } -BOOL +SWBOOL TestSpikeMatchActive(short match) { USERp fu; @@ -281,13 +281,13 @@ int DoSpikeMove(short SpriteNum, int *lptr) return 0; } -VOID SpikeAlign(short SpriteNum) +void SpikeAlign(short SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; // 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)) 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 = §or[sectnum]; SPRITEp sp; @@ -406,7 +406,7 @@ int DoSpike(short SpriteNum) int i,nexti; SPRITEp bsp; USERp bu; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) { diff --git a/polymer/eduke32/source/sw/src/sprite.c b/polymer/eduke32/source/sw/src/sprite.c index bc8ce76fb..d78443be4 100644 --- a/polymer/eduke32/source/sw/src/sprite.c +++ b/polymer/eduke32/source/sw/src/sprite.c @@ -48,8 +48,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" -BOOL FAF_Sector(short sectnum); -BOOL MoveSkip4, MoveSkip2, MoveSkip8; +SWBOOL FAF_Sector(short sectnum); +SWBOOL MoveSkip4, MoveSkip2, MoveSkip8; extern STATE s_CarryFlag[]; extern STATE s_CarryFlagNoDet[]; @@ -57,10 +57,10 @@ extern STATE s_CarryFlagNoDet[]; static int globhiz, globloz, globhihit, globlohit; short wait_active_check_offset; 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); void ActorWarpUpdatePos(short SpriteNum,short sectnum); -VOID ActorWarpType(SPRITEp sp, SPRITEp sp_warp); +void ActorWarpType(SPRITEp sp, SPRITEp sp_warp); int MissileZrange(short SpriteNum); #define ACTIVE_CHECK_TIME (3*120) @@ -68,7 +68,7 @@ int MissileZrange(short SpriteNum); /* short GetDeltaAngle(short ang1, short ang2); short GetRotation(short sn); -int StateControl(SHORT SpriteNum); +int StateControl(int16_t SpriteNum); void PreCacheRange(short, short); */ @@ -100,7 +100,7 @@ STATE s_DebrisStarFish[] = {426, 100, DoActorDebris, &s_DebrisStarFish[0]}, }; -extern BOOL DebugActor; +extern SWBOOL DebugActor; extern int score; ANIMATOR DoGet, DoKey, DoSpriteFade; @@ -542,7 +542,7 @@ STATE s_IconFlag[] = {ICON_FLAG + 2, 32, DoGet, &s_IconFlag[0]} }; -VOID +void SetOwner(short owner, short child) { SPRITEp op; @@ -569,7 +569,7 @@ SetOwner(short owner, short child) cp->owner = owner; } -VOID +void SetAttach(short owner, short child) { SPRITEp op = &sprite[owner]; @@ -583,8 +583,8 @@ SetAttach(short owner, short child) cu->Attach = owner; } -VOID -KillSprite(SHORT SpriteNum) +void +KillSprite(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -770,7 +770,7 @@ KillSprite(SHORT SpriteNum) sp->sectnum = sectnum; } -VOID ChangeState(short SpriteNum, STATEp statep) +void ChangeState(short SpriteNum, STATEp statep) { USERp u = User[SpriteNum]; @@ -780,7 +780,7 @@ VOID ChangeState(short SpriteNum, STATEp statep) PicAnimOff(u->State->Pic); } -VOID +void change_sprite_stat(short SpriteNum, short stat) { 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) { SPRITEp sp; - SHORT SpriteNum; + int16_t SpriteNum; USERp u; ASSERT(!Prediction); @@ -959,7 +959,7 @@ SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int return SpriteNum; } -VOID +void PicAnimOff(short picnum) { int i; @@ -984,7 +984,7 @@ PicAnimOff(short picnum) RESET(picanm[picnum], TILE_ANIM_TYPE); } -BOOL +SWBOOL IconSpawn(SPRITEp sp) { // if multi item and not a modem game @@ -997,7 +997,7 @@ IconSpawn(SPRITEp sp) return TRUE; } -BOOL +SWBOOL ActorTestSpawn(SPRITEp sp) { if (sp->statnum == STAT_DEFAULT && sp->lotag == TAG_SPAWN_ACTOR) @@ -1054,25 +1054,25 @@ ActorTestSpawn(SPRITEp sp) } -VOID PreCacheRipper(VOID); -VOID PreCacheRipper2(VOID); -VOID PreCacheCoolie(VOID); -VOID PreCacheSerpent(VOID); -VOID PreCacheGuardian(VOID); -VOID PreCacheNinja(VOID); -VOID PreCacheSumo(VOID); -VOID PreCacheEel(VOID); -VOID PreCacheToiletGirl(VOID); -VOID PreCacheWashGirl(VOID); -VOID PreCacheTrash(VOID); -VOID PreCacheBunny(VOID); -VOID PreCacheSkel(VOID); -VOID PreCacheHornet(VOID); -VOID PreCacheSkull(VOID); -VOID PreCacheBetty(VOID); -VOID PreCachePachinko(VOID); +void PreCacheRipper(void); +void PreCacheRipper2(void); +void PreCacheCoolie(void); +void PreCacheSerpent(void); +void PreCacheGuardian(void); +void PreCacheNinja(void); +void PreCacheSumo(void); +void PreCacheEel(void); +void PreCacheToiletGirl(void); +void PreCacheWashGirl(void); +void PreCacheTrash(void); +void PreCacheBunny(void); +void PreCacheSkel(void); +void PreCacheHornet(void); +void PreCacheSkull(void); +void PreCacheBetty(void); +void PreCachePachinko(void); -BOOL +SWBOOL ActorSpawn(SPRITEp sp) { int ret = TRUE; @@ -1550,7 +1550,7 @@ ActorSpawn(SPRITEp sp) } -VOID +void IconDefault(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; @@ -1565,13 +1565,13 @@ IconDefault(short SpriteNum) DoActorZrange(SpriteNum); } -VOID PreMapCombineFloors(VOID) +void PreMapCombineFloors(void) { #define MAX_FLOORS 32 SPRITEp sp; int xoff,yoff; int i, j, k; - SHORT SpriteNum, NextSprite; + int16_t SpriteNum, NextSprite; WALLp wp; int base_offset; PLAYERp pp = &Player[myconnectindex]; @@ -1678,7 +1678,7 @@ VOID PreMapCombineFloors(VOID) #if 0 // 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; short sectlist[MAXSECTORS]; @@ -1729,8 +1729,8 @@ VOID TraverseSectors(short start_sect) #endif -VOID -SpriteSetupPost(VOID) +void +SpriteSetupPost(void) { SPRITEp ds; USERp u; @@ -1774,8 +1774,8 @@ SpriteSetupPost(VOID) } -VOID -SpriteSetup(VOID) +void +SpriteSetup(void) { SPRITEp sp; short SpriteNum = 0, NextSprite, ndx; @@ -2565,7 +2565,7 @@ SpriteSetup(VOID) short w, startwall, endwall; short wallcount; void *void_ptr; - CHARp wall_shade; + int8_t* wall_shade; USERp u; LIGHT_Tics(sp) = 0; @@ -2622,7 +2622,7 @@ SpriteSetup(VOID) short w, startwall, endwall; short wallcount; void *void_ptr; - CHARp wall_shade; + int8_t* wall_shade; USERp u; 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; if (TEST_BOOL2(sip)) @@ -3824,7 +3824,7 @@ BOOL ItemSpotClear(SPRITEp sip, short statnum, short id) return !found; } -VOID SetupItemForJump(SPRITEp sip, short SpriteNum) +void SetupItemForJump(SPRITEp sip, short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -4143,7 +4143,7 @@ int SpawnItemsMatch(short match) short SpriteNum; short si, nextsi; SPRITEp sp,sip; - BOOL found; + SWBOOL found; TRAVERSE_SPRITE_STAT(headspritestat[STAT_SPAWN_ITEMS],si,nextsi) { @@ -4555,7 +4555,7 @@ int SpawnItemsMatch(short match) short num; USERp u; - BYTE KeyPal[] = + uint8_t KeyPal[] = { PALETTE_PLAYER9, PALETTE_PLAYER7, @@ -4611,7 +4611,7 @@ int SpawnItemsMatch(short match) } // CTW MODIFICATION -//VOID +//void int // CTW MODIFICATION END NewStateGroup(short SpriteNum, STATEp StateGroup[]) @@ -4645,8 +4645,8 @@ NewStateGroup(short SpriteNum, STATEp StateGroup[]) } -BOOL -SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b) +SWBOOL +SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b) { SPRITEp spa = &sprite[spritenum_a], spb = &sprite[spritenum_b]; @@ -4686,8 +4686,8 @@ SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b) } -BOOL -SpriteOverlapZ(SHORT spritenum_a, SHORT spritenum_b, int z_overlap) +SWBOOL +SpriteOverlapZ(int16_t spritenum_a, int16_t spritenum_b, int z_overlap) { 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, - LONGp ceilz, LONGp ceilhit, LONGp florz, LONGp florhit) + int32_t* ceilz, int32_t* ceilhit, int32_t* florz, int32_t* florhit) { spritetype *spr; 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) { 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) { 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 -BOOL +SWBOOL DropAhead(short SpriteNum, short min_height) { @@ -5142,7 +5142,7 @@ int DoGrating(short SpriteNum) { SPRITEp sp = User[SpriteNum]->SpriteP; - SHORT x, y; + int16_t x, y; int dir; #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; SPRITEp sp = User[SpriteNum]->SpriteP; @@ -5583,9 +5583,9 @@ DoGet(short SpriteNum) PLAYERp pp; short pnum, key_num; int dist, a,b,c; - VOID InitWeaponRocket(PLAYERp); - VOID InitWeaponUzi(PLAYERp); - BOOL can_see; + void InitWeaponRocket(PLAYERp); + void InitWeaponUzi(PLAYERp); + SWBOOL can_see; int cstat_bak; // For flag stuff @@ -5742,7 +5742,7 @@ KeyMain: case ICON_SM_MEDKIT: if (pu->Health < 100) { - BOOL putbackmax=FALSE; + SWBOOL putbackmax=FALSE; PutStringInfo(Player+pnum, InventoryDecls[InvDecl_SmMedkit].name); @@ -6378,7 +6378,7 @@ KeyMain: #define TEXT_SPELL_INFO_LINE 20 - static CHARp SpellName[] = + static int8_t* SpellName[] = { "Icon of Flight", "EnvironSuit Skin", @@ -6474,7 +6474,7 @@ KeyMain: */ -VOID +void SetEnemyActive(short SpriteNum) { USERp u = User[SpriteNum]; @@ -6484,7 +6484,7 @@ SetEnemyActive(short SpriteNum) u->inactive_time = 0; } -VOID +void SetEnemyInactive(short SpriteNum) { USERp u = User[SpriteNum]; @@ -6496,7 +6496,7 @@ SetEnemyInactive(short SpriteNum) // This function mostly only adjust the active_range field -VOID +void ProcessActiveVars(short SpriteNum) { USERp u = User[SpriteNum]; @@ -6519,7 +6519,7 @@ ProcessActiveVars(short SpriteNum) u->wait_active_check += ACTORMOVETICS; } -VOID +void AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist) { USERp u = User[SpriteNum]; @@ -6657,7 +6657,7 @@ AdjustActiveRange(PLAYERp pp, short SpriteNum, int dist) */ int -StateControl(SHORT SpriteNum) +StateControl(int16_t SpriteNum) { USERp u = User[SpriteNum]; SPRITEp sp = &sprite[SpriteNum]; @@ -6750,16 +6750,16 @@ StateControl(SHORT SpriteNum) -VOID -SpriteControl(VOID) +void +SpriteControl(void) { - LONG i, nexti, stat; + int32_t i, nexti, stat; SPRITEp sp; USERp u; short pnum, CloseToPlayer; PLAYERp pp; int tx, ty, tmin, dist; - extern BOOL DebugActorFreeze; + extern SWBOOL DebugActorFreeze; short StateTics; if (DebugActorFreeze) @@ -7016,7 +7016,7 @@ SpriteControl(VOID) */ 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 retval=0, zh; @@ -7169,7 +7169,7 @@ int pushmove_sprite(short SpriteNum) return 0; } -VOID MissileWarpUpdatePos(short SpriteNum, short sectnum) +void MissileWarpUpdatePos(short SpriteNum, short sectnum) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; @@ -7180,7 +7180,7 @@ VOID MissileWarpUpdatePos(short SpriteNum, short sectnum) MissileZrange(SpriteNum); } -VOID ActorWarpUpdatePos(short SpriteNum, short sectnum) +void ActorWarpUpdatePos(short SpriteNum, short sectnum) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; @@ -7191,7 +7191,7 @@ VOID ActorWarpUpdatePos(short SpriteNum, short sectnum) DoActorZrange(SpriteNum); } -VOID MissileWarpType(SPRITEp sp, SPRITEp sp_warp) +void MissileWarpType(SPRITEp sp, SPRITEp 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)) { @@ -7267,7 +7267,7 @@ MissileZrange(short SpriteNum) 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 retval, zh; @@ -7406,7 +7406,7 @@ move_missile(short spritenum, int xchange, int ychange, int zchange, int ceildis 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 retval=0, zh; diff --git a/polymer/eduke32/source/sw/src/sprite.h b/polymer/eduke32/source/sw/src/sprite.h index 071895b14..30e6976c1 100644 --- a/polymer/eduke32/source/sw/src/sprite.h +++ b/polymer/eduke32/source/sw/src/sprite.h @@ -28,9 +28,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define SPRITE_H -VOID KillSprite(SHORT SpriteNum); -SHORT SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel); -VOID SpriteSetup(VOID); +void KillSprite(int16_t SpriteNum); +int16_t SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel); +void SpriteSetup(void); int move_actor(short SpriteNum, int xchange, int ychange, int zchange); short GetSpriteDir(short sn); short GetDirToPlayer(short sn); @@ -41,21 +41,21 @@ short SpriteCanGoForward(short SpriteNum, short range); void SpriteFindNewDirection(short SpriteNum, short range); int DoWalk(short SpriteNum); int DoBody(short SpriteNum); -BOOL CanMoveHere(SHORT spritenum); -BOOL SpriteOverlap(SHORT spritenum_a, SHORT spritenum_b); +SWBOOL CanMoveHere(int16_t spritenum); +SWBOOL SpriteOverlap(int16_t spritenum_a, int16_t spritenum_b); int DoActorDie(short SpriteNum, short weapon); int DoGet(short SpriteNum); -VOID SpriteControl(VOID); -VOID SetEnemyInactive(short SpriteNum); -VOID DoActorZrange(short SpriteNum); +void SpriteControl(void); +void SetEnemyInactive(short SpriteNum); +void DoActorZrange(short SpriteNum); void PreMapCombineFloors(void); void SpriteSetupPost(void); int ActorCoughItem(short SpriteNum); -BOOL ActorSpawn(SPRITEp sp); +SWBOOL ActorSpawn(SPRITEp sp); int SpawnItemsMatch(short match); void PicAnimOff(short picnum); 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 { diff --git a/polymer/eduke32/source/sw/src/startgtk.game.c b/polymer/eduke32/source/sw/src/startgtk.game.c index 0627c7dde..9f76f8089 100644 --- a/polymer/eduke32/source/sw/src/startgtk.game.c +++ b/polymer/eduke32/source/sw/src/startgtk.game.c @@ -714,7 +714,7 @@ int startwin_idle(void *s) 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 int startwin_run(void) diff --git a/polymer/eduke32/source/sw/src/sumo.c b/polymer/eduke32/source/sw/src/sumo.c index ac5c26190..f38804142 100644 --- a/polymer/eduke32/source/sw/src/sumo.c +++ b/polymer/eduke32/source/sw/src/sumo.c @@ -37,11 +37,11 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "sector.h" -extern BYTE RedBookSong[40]; -extern BYTE playTrack; -BOOL serpwasseen = FALSE; -BOOL sumowasseen = FALSE; -BOOL zillawasseen = FALSE; +extern uint8_t RedBookSong[40]; +extern uint8_t playTrack; +SWBOOL serpwasseen = FALSE; +SWBOOL sumowasseen = FALSE; +SWBOOL zillawasseen = FALSE; short BossSpriteNum[3] = {-1,-1,-1}; @@ -790,7 +790,7 @@ int DoSumoDeathMelt(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - static BOOL alreadydid = FALSE; + static SWBOOL alreadydid = FALSE; PlaySound(DIGI_SUMOFART, &sp->x, &sp->y, &sp->z, v3df_follow); @@ -811,7 +811,7 @@ int DoSumoDeathMelt(short SpriteNum) } -VOID +void BossHealthMeter(void) { SPRITEp sp; @@ -820,10 +820,10 @@ BossHealthMeter(void) short color=0,i=0,nexti,metertics,meterunit; int y; extern char buffer[]; - extern BOOL NoMeters; + extern SWBOOL NoMeters; short health; - BOOL bosswasseen; - static BOOL triedplay = FALSE; + SWBOOL bosswasseen; + static SWBOOL triedplay = FALSE; if (NoMeters) return; diff --git a/polymer/eduke32/source/sw/src/swconfig.c b/polymer/eduke32/source/sw/src/swconfig.c index 4007d87ea..5339205f1 100644 --- a/polymer/eduke32/source/sw/src/swconfig.c +++ b/polymer/eduke32/source/sw/src/swconfig.c @@ -56,7 +56,7 @@ void SetGameDefaults(void) { } -extern BOOL DrawScreen; +extern SWBOOL DrawScreen; void EncodePassword(char *pw) { @@ -106,7 +106,7 @@ void DecodePassword(char *pw) =================== */ -void ReadGameSetup(int32 scripthandle) +void ReadGameSetup(int32_t scripthandle) { int dummy; int ret; @@ -270,7 +270,7 @@ void ReadGameSetup(int32 scripthandle) =================== */ -void WriteGameSetup(int32 scripthandle) +void WriteGameSetup(int32_t scripthandle) { int dummy; @@ -353,7 +353,7 @@ void WriteGameSetup(int32 scripthandle) void TermSetup(void) { - extern BOOL BotMode; + extern SWBOOL BotMode; CONFIG_WriteSetup(); RTS_Shutdown(); } diff --git a/polymer/eduke32/source/sw/src/sync.c b/polymer/eduke32/source/sw/src/sync.c index e0c2b5f5d..5447a5737 100644 --- a/polymer/eduke32/source/sw/src/sync.c +++ b/polymer/eduke32/source/sw/src/sync.c @@ -32,7 +32,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "net.h" #include "menus.h" -BOOL SyncPrintMode = TRUE; +SWBOOL SyncPrintMode = TRUE; short NumSyncBytes = 1; char sync_first[MAXSYNCBYTES][60]; int sync_found = FALSE; @@ -60,8 +60,8 @@ void initsynccrc(void) } #if SYNC_TEST -BYTE -PlayerSync(VOID) +uint8_t +PlayerSync(void) { short i, j; unsigned short crc = 0; @@ -76,11 +76,11 @@ PlayerSync(VOID) updatecrc(crc, pp->pang & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -PlayerSync2(VOID) +uint8_t +PlayerSync2(void) { short i, j; unsigned short crc = 0; @@ -95,11 +95,11 @@ PlayerSync2(VOID) updatecrc(crc, pp->bcnt & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -SOSync(VOID) +uint8_t +SOSync(void) { unsigned short crc = 0; SECTOR_OBJECTp sop; @@ -118,12 +118,12 @@ SOSync(VOID) updatecrc(crc, (sop->spin_ang) & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -EnemySync(VOID) +uint8_t +EnemySync(void) { unsigned short crc = 0; short j, nextj; @@ -165,11 +165,11 @@ EnemySync(VOID) } #endif - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -MissileSync(VOID) +uint8_t +MissileSync(void) { unsigned short crc = 0; short j, nextj; @@ -184,11 +184,11 @@ MissileSync(VOID) updatecrc(crc, (spr->ang) & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -MissileSkip4Sync(VOID) +uint8_t +MissileSkip4Sync(void) { unsigned short crc = 0; short j, nextj; @@ -203,11 +203,11 @@ MissileSkip4Sync(VOID) updatecrc(crc, (spr->ang) & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -ShrapSync(VOID) +uint8_t +ShrapSync(void) { unsigned short crc = 0; short j, nextj; @@ -222,11 +222,11 @@ ShrapSync(VOID) updatecrc(crc, (spr->ang) & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -MiscSync(VOID) +uint8_t +MiscSync(void) { unsigned short crc = 0; short j, nextj; @@ -241,11 +241,11 @@ MiscSync(VOID) updatecrc(crc, (spr->ang) & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } -BYTE -RandomSync(VOID) +uint8_t +RandomSync(void) { unsigned short crc = 0; @@ -259,7 +259,7 @@ RandomSync(VOID) updatecrc(crc,MissileSync() & 255); } - return (BYTE) crc & 255; + return (uint8_t) crc & 255; } /* @@ -291,7 +291,7 @@ char *SyncNames[] = NULL }; -static BYTE(*SyncFunc[MAXSYNCBYTES + 1]) (VOID) = +static uint8_t(*SyncFunc[MAXSYNCBYTES + 1]) (void) = { RandomSync, PlayerSync, @@ -424,7 +424,7 @@ GetSyncInfoFromPacket(char *packbuf, int packbufleng, int *j, int otherconnectin int sb, i; extern int syncvaltail, syncvaltottail; PLAYERp ppo = &Player[otherconnectindex]; - BOOL found = FALSE; + SWBOOL found = FALSE; // have had problems with this routine crashing when players quit // games. @@ -504,7 +504,7 @@ void demosync_record(void) { int i; - BYTE sync_val; + uint8_t sync_val; for (i = 0; SyncFunc[i]; i++) { @@ -517,7 +517,7 @@ void demosync_test(int cnt) { int i; - BYTE sync_val; + uint8_t sync_val; for (i = 0; SyncFunc[i]; i++) { diff --git a/polymer/eduke32/source/sw/src/text.c b/polymer/eduke32/source/sw/src/text.c index eed791eb8..bfe1fbab1 100644 --- a/polymer/eduke32/source/sw/src/text.c +++ b/polymer/eduke32/source/sw/src/text.c @@ -58,7 +58,7 @@ char *KeyDoorMessage[MAX_KEYS] = "You need a RED key for this door." }; -VOID +void DisplaySummaryString(PLAYERp pp, short xs, short ys, short color, short shade, const char *buffer) { short size,x; @@ -247,7 +247,7 @@ pClearSpriteID(PLAYERp pp, short id) } -VOID +void DisplayPanelNumber(PLAYERp pp, short xs, short ys, int number) { 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) { 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) { 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) { 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) { short size=4,x; @@ -380,7 +380,7 @@ DisplayFragString(PLAYERp pp, short xs, short ys, const char *buffer) } } -VOID +void DisplayFragNumbers(PLAYERp pp) { char buffer[32]; @@ -420,7 +420,7 @@ DisplayFragNumbers(PLAYERp pp) DisplayFragString(pp, xs, ys, buffer); } -VOID +void DisplayFragNames(PLAYERp pp) { char *ptr; @@ -453,7 +453,7 @@ DisplayFragNames(PLAYERp pp) } short GlobInfoStringTime = TEXT_INFO_TIME; -VOID PutStringInfo(PLAYERp pp, const char *string) +void PutStringInfo(PLAYERp pp, const char *string) { if (pp-Player != myconnectindex) return; @@ -465,7 +465,7 @@ VOID PutStringInfo(PLAYERp pp, const char *string) PutStringInfoLine(pp, string); } -VOID PutStringInfoLine(PLAYERp pp, const char *string) +void PutStringInfoLine(PLAYERp pp, const char *string) { short x,y; short w,h; @@ -489,7 +489,7 @@ VOID PutStringInfoLine(PLAYERp pp, const char *string) //PutStringInfoLine2(pp, ""); } -VOID PutStringInfoLine2(PLAYERp pp, const char *string) +void PutStringInfoLine2(PLAYERp pp, const char *string) { short x,y; short w,h; @@ -515,7 +515,7 @@ pMenuClearTextLine(PLAYERp pp) #define TEXT_PLAYER_INFO_TIME (3) #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 w,h; diff --git a/polymer/eduke32/source/sw/src/text.h b/polymer/eduke32/source/sw/src/text.h index ddc3c3c11..6e34f60c0 100644 --- a/polymer/eduke32/source/sw/src/text.h +++ b/polymer/eduke32/source/sw/src/text.h @@ -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) + GlobalInfoLineOffset) -VOID DisplayFragNames(PLAYERp pp); -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 DisplayMiniBarNumber(PLAYERp pp,short xs,short ys,int number); +void DisplayFragNames(PLAYERp pp); +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 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 DisplayPanelNumber(PLAYERp pp,short xs,short ys,int number); -VOID PutStringInfo(PLAYERp pp, const char *string); -VOID PutStringInfoLine(PLAYERp pp, const char *string); -VOID PutStringInfoLine2(PLAYERp pp, const char *string); +void PutStringInfo(PLAYERp pp, const char *string); +void PutStringInfoLine(PLAYERp pp, const char *string); +void PutStringInfoLine2(PLAYERp pp, const char *string); void pClearTextLine(PLAYERp pp,long y); void pMenuClearTextLine(PLAYERp pp); diff --git a/polymer/eduke32/source/sw/src/track.c b/polymer/eduke32/source/sw/src/track.c index 12be97b86..c0734146d 100644 --- a/polymer/eduke32/source/sw/src/track.c +++ b/polymer/eduke32/source/sw/src/track.c @@ -39,7 +39,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #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 DoTornadoObject(SECTOR_OBJECTp sop); @@ -118,7 +118,7 @@ point to the sprite. */ 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]; 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) { sop->point += sop->dir; @@ -285,7 +285,7 @@ NextTrackPoint(SECTOR_OBJECTp sop) } -VOID +void NextActorTrackPoint(short SpriteNum) { USERp u = User[SpriteNum]; @@ -299,7 +299,7 @@ NextActorTrackPoint(short SpriteNum) u->point = Track[u->track].NumPoints - 1; } -VOID +void TrackAddPoint(TRACKp t, TRACK_POINTp tp, short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; @@ -585,8 +585,8 @@ void QuickLadderSetup(short stat, short lotag, short type) } -VOID -TrackSetup(VOID) +void +TrackSetup(void) { short SpriteNum = 0, NextSprite, ndx; TRACK_POINTp tp; @@ -715,15 +715,15 @@ FindBoundSprite(short tag) } -VOID +void SectorObjectSetupBounds(SECTOR_OBJECTp sop) { int xlow, ylow, xhigh, yhigh; short sp_num, next_sp_num, sn, startwall, endwall; int i, k, j; SPRITEp BoundSprite; - BOOL FoundOutsideLoop = FALSE, FoundSector = FALSE; - BOOL SectorInBounds; + SWBOOL FoundOutsideLoop = FALSE, FoundSector = FALSE; + SWBOOL SectorInBounds; SECTORp *sectp; PLAYERp pp; short pnum; @@ -1025,7 +1025,7 @@ cont: } -VOID +void SetupSectorObject(short sectnum, short tag) { SPRITEp sp; @@ -1045,11 +1045,11 @@ SetupSectorObject(short sectnum, short tag) // initialize stuff first time through if (sop->num_sectors == -1) { - VOID DoTornadoObject(SECTOR_OBJECTp sop); - VOID MorphTornado(SECTOR_OBJECTp sop); - VOID MorphFloor(SECTOR_OBJECTp sop); - VOID ScaleSectorObject(SECTOR_OBJECTp sop); - VOID DoAutoTurretObject(SECTOR_OBJECTp sop); + void DoTornadoObject(SECTOR_OBJECTp sop); + void MorphTornado(SECTOR_OBJECTp sop); + void MorphFloor(SECTOR_OBJECTp sop); + void ScaleSectorObject(SECTOR_OBJECTp sop); + void DoAutoTurretObject(SECTOR_OBJECTp sop); memset(sop->sectp, 0, sizeof(sop->sectp)); sop->crush_z = 0; @@ -1151,7 +1151,7 @@ SetupSectorObject(short sectnum, short tag) } if (SP_TAG4(sp)) - sop->scale_point_rand_freq = (BYTE)SP_TAG4(sp); + sop->scale_point_rand_freq = (uint8_t)SP_TAG4(sp); else sop->scale_point_rand_freq = 64; @@ -1170,7 +1170,7 @@ SetupSectorObject(short sectnum, short tag) sop->scale_active_type = SP_TAG7(sp); if (SP_TAG8(sp)) - sop->scale_rand_freq = (BYTE)SP_TAG8(sp); + sop->scale_rand_freq = (uint8_t)SP_TAG8(sp); else sop->scale_rand_freq = 64>>3; @@ -1414,8 +1414,8 @@ SetupSectorObject(short sectnum, short tag) } -VOID -PostSetupSectorObject(VOID) +void +PostSetupSectorObject(void) { SECTOR_OBJECTp sop; @@ -1456,11 +1456,11 @@ PlayerOnObject(short sectnum_match) } -VOID -PlaceSectorObjectsOnTracks(VOID) +void +PlaceSectorObjectsOnTracks(void) { short i, j, k, startwall, endwall; - BOOL found; + SWBOOL found; // place each sector object on the track for (i = 0; i < MAX_SECTOR_OBJECTS; i++) @@ -1534,8 +1534,8 @@ PlaceSectorObjectsOnTracks(VOID) } -VOID -PlaceActorsOnTracks(VOID) +void +PlaceActorsOnTracks(void) { short i, nexti, j, tag, htag, new_ang; SPRITEp sp; @@ -1595,10 +1595,10 @@ PlaceActorsOnTracks(VOID) } -VOID +void 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 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); } -VOID +void MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny) { int j, k, c, rx, ry; @@ -1683,7 +1683,7 @@ MovePoints(SECTOR_OBJECTp sop, short delta_ang, int nx, int ny) WALLp wp; USERp u; short i, nexti, rot_ang; - BOOL PlayerMove = TRUE; + SWBOOL PlayerMove = TRUE; if (sop->xmid >= (int)MAXSO) PlayerMove = FALSE; @@ -1771,7 +1771,7 @@ PlayerPart: { #if 0 short nr, nextnr; - BOOL skip = TRUE; + SWBOOL skip = TRUE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_NO_RIDE], nr, nextnr) { if (sprite[nr].lotag == sop - SectorObject) @@ -1928,8 +1928,8 @@ PlayerPart: } } -VOID -RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, BOOL dynamic) +void +RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, SWBOOL dynamic) { short wallcount = 0, j, k, startwall, endwall, delta_ang_from_orig; SECTORp *sectp; @@ -2018,7 +2018,7 @@ RefreshPoints(SECTOR_OBJECTp sop, int nx, int ny, BOOL dynamic) (*sop->PostMoveAnimator)(sop); } -VOID KillSectorObjectSprites(SECTOR_OBJECTp sop) +void KillSectorObjectSprites(SECTOR_OBJECTp sop) { SPRITEp sp; USERp u; @@ -2042,7 +2042,7 @@ VOID KillSectorObjectSprites(SECTOR_OBJECTp sop) sop->sp_num[0] = -1; } -VOID UpdateSectorObjectSprites(SECTOR_OBJECTp sop) +void UpdateSectorObjectSprites(SECTOR_OBJECTp sop) { SPRITEp sp; USERp u; @@ -2124,7 +2124,7 @@ DetectSectorObjectByWall(WALLp wph) } -VOID +void CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny) { short j, k, startwall, endwall; @@ -2161,7 +2161,7 @@ CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny) } -VOID +void MoveZ(SECTOR_OBJECTp sop) { short i; @@ -2337,7 +2337,7 @@ void CallbackSOsink(ANIMp ap, void *data) } -VOID +void MoveSectorObjects(SECTOR_OBJECTp sop, short locktics) { 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; 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) { 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); } -VOID +void PlaceSectorObject(SECTOR_OBJECTp sop, short newang, int newx, int newy) { 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; SECTORp *sectp; @@ -2865,7 +2865,7 @@ VOID VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator) } -VOID +void KillSectorObject(SECTOR_OBJECTp sop) { 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 locktics = synctics; @@ -2927,7 +2927,7 @@ VOID TornadoSpin(SECTOR_OBJECTp sop) } } -VOID +void DoTornadoObject(SECTOR_OBJECTp sop) { short delta_ang; @@ -2962,7 +2962,7 @@ DoTornadoObject(SECTOR_OBJECTp sop) RefreshPoints(sop, x - sop->xmid, y - sop->ymid, TRUE); } -VOID +void DoAutoTurretObject(SECTOR_OBJECTp sop) { short SpriteNum = sop->sp_child - sprite; @@ -3146,7 +3146,7 @@ ScanToWall */ -BOOL +SWBOOL ActorTrackDecide(TRACK_POINTp tpoint, short SpriteNum) { SPRITEp sp; diff --git a/polymer/eduke32/source/sw/src/track.h b/polymer/eduke32/source/sw/src/track.h index dac51e644..11a86393a 100644 --- a/polymer/eduke32/source/sw/src/track.h +++ b/polymer/eduke32/source/sw/src/track.h @@ -1,6 +1,6 @@ int ActorFollowTrack(short SpriteNum,short locktics); 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 PlaceSectorObject(SECTOR_OBJECTp sop,short newang,int newx,int newy); void PlaceSectorObjectsOnTracks(void); diff --git a/polymer/eduke32/source/sw/src/vator.c b/polymer/eduke32/source/sw/src/vator.c index 2240ce70c..2ef427797 100644 --- a/polymer/eduke32/source/sw/src/vator.c +++ b/polymer/eduke32/source/sw/src/vator.c @@ -38,9 +38,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms short DoVatorMatch(PLAYERp pp, short match); -BOOL TestVatorMatchActive(short match); -VOID InterpSectorSprites(short sectnum, BOOL state); -int InitBloodSpray(short, BOOL, short); +SWBOOL TestVatorMatchActive(short match); +void InterpSectorSprites(short sectnum, SWBOOL state); +int InitBloodSpray(short, SWBOOL, short); void ReverseVator(short SpriteNum) { @@ -74,12 +74,12 @@ void ReverseVator(short SpriteNum) u->vel_rate = -u->vel_rate; } -BOOL +SWBOOL VatorSwitch(short match, short setting) { SPRITEp sp; short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_STAT(headspritestat[STAT_DEFAULT], i, nexti) { @@ -161,7 +161,7 @@ short DoVatorOperate(PLAYERp pp, short sectnum) sectnum = fsp->sectnum; // 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 (pp && TEST_BOOL11(fsp)) PutStringInfo(pp,"This only opens in single play."); @@ -236,7 +236,7 @@ DoVatorMatch(PLAYERp pp, short match) first_vator = i; // 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 (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) { USERp fu; @@ -316,7 +316,7 @@ TestVatorMatchActive(short match) return FALSE; } -VOID InterpSectorSprites(short sectnum, BOOL state) +void InterpSectorSprites(short sectnum, SWBOOL state) { SPRITEp sp; 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 = §or[sectnum]; SPRITEp sp; short i,nexti; - BOOL both = FALSE; + SWBOOL both = FALSE; if (SectUser[sectnum]) both = !!TEST(SectUser[sectnum]->flags, SECTFU_VATOR_BOTH); @@ -542,7 +542,7 @@ int DoVator(short SpriteNum) int i,nexti; SPRITEp bsp; USERp bu; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) { @@ -595,7 +595,7 @@ int DoVator(short SpriteNum) int i,nexti; SPRITEp bsp; USERp bu; - BOOL found = FALSE; + SWBOOL found = FALSE; TRAVERSE_SPRITE_SECT(headspritesect[sp->sectnum], i, nexti) { diff --git a/polymer/eduke32/source/sw/src/vis.c b/polymer/eduke32/source/sw/src/vis.c index 28ecc976c..26feffd2a 100644 --- a/polymer/eduke32/source/sw/src/vis.c +++ b/polymer/eduke32/source/sw/src/vis.c @@ -35,7 +35,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" extern short NormalVisibility; // player.c -extern BOOL GamePaused; +extern SWBOOL GamePaused; #define VIS_VisCur(sp) (SP_TAG2(sp)) #define VIS_VisDir(sp) (SP_TAG3(sp)) diff --git a/polymer/eduke32/source/sw/src/wallmove.c b/polymer/eduke32/source/sw/src/wallmove.c index 1600ac7ff..cfd18f120 100644 --- a/polymer/eduke32/source/sw/src/wallmove.c +++ b/polymer/eduke32/source/sw/src/wallmove.c @@ -86,9 +86,9 @@ int DoWallMove(SPRITEp sp) short shade1,shade2,ang,picnum1,picnum2; WALLp wallp; short prev_wall; - BOOL found = FALSE; + SWBOOL found = FALSE; short dang; - BOOL SOsprite = FALSE; + SWBOOL SOsprite = FALSE; dist = SP_TAG13(sp); ang = SP_TAG4(sp); @@ -162,10 +162,10 @@ int DoWallMove(SPRITEp sp) return found; } -BOOL CanSeeWallMove(SPRITEp wp, short match) +SWBOOL CanSeeWallMove(SPRITEp wp, short match) { short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; SPRITEp sp; TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE_CANSEE], i, nexti) @@ -193,7 +193,7 @@ int DoWallMoveMatch(short match) { SPRITEp sp; short i,nexti; - BOOL found = FALSE; + SWBOOL found = FALSE; // just all with the same matching tags TRAVERSE_SPRITE_STAT(headspritestat[STAT_WALL_MOVE], i, nexti) diff --git a/polymer/eduke32/source/sw/src/warp.c b/polymer/eduke32/source/sw/src/warp.c index 05975a17e..732ed0723 100644 --- a/polymer/eduke32/source/sw/src/warp.c +++ b/polymer/eduke32/source/sw/src/warp.c @@ -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) { int i,nexti; @@ -79,7 +79,7 @@ WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor) } 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; @@ -109,7 +109,7 @@ WarpPlane(LONGp x, LONGp y, LONGp z, SHORTp sectnum) } 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 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) { int i,nexti; @@ -239,7 +239,7 @@ WarpSectorInfo(short sectnum, SPRITEp *sp_warp) } 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; diff --git a/polymer/eduke32/source/sw/src/warp.h b/polymer/eduke32/source/sw/src/warp.h index 0b1117165..5e791bff1 100644 --- a/polymer/eduke32/source/sw/src/warp.h +++ b/polymer/eduke32/source/sw/src/warp.h @@ -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); -SPRITEp WarpPlane(LONGp x, LONGp y, LONGp z, SHORTp sectnum); -SPRITEp WarpToArea(SPRITEp sp_from, LONGp x, LONGp y, LONGp z, SHORTp sectnum); -BOOL WarpSectorInfo(short sectnum, SPRITEp *sp_warp); -SPRITEp Warp(LONGp x, LONGp y, LONGp z, SHORTp sectnum); +SWBOOL WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor); +SPRITEp WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); +SPRITEp WarpToArea(SPRITEp sp_from, int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); +SWBOOL WarpSectorInfo(short sectnum, SPRITEp *sp_warp); +SPRITEp Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); diff --git a/polymer/eduke32/source/sw/src/weapon.c b/polymer/eduke32/source/sw/src/weapon.c index ec9ad562f..238fa5329 100644 --- a/polymer/eduke32/source/sw/src/weapon.c +++ b/polymer/eduke32/source/sw/src/weapon.c @@ -60,7 +60,7 @@ short ADJUST=120; int ADJUSTV=1<<16; FOOT_TYPE FootMode=WATER_FOOT; -BOOL left_foot = FALSE; +SWBOOL left_foot = FALSE; int FinishTimer = 0; // This is how many bullet shells have been spawned since the beginning of the game. @@ -81,7 +81,7 @@ short LoWangsQueueHead=0; short LoWangsQueue[MAX_LOWANGS_QUEUE]; int SpawnBreakStaticFlames(short); -BOOL GlobalSkipZrange = FALSE; +SWBOOL GlobalSkipZrange = FALSE; int WeaponIsAmmo = BIT(WPN_STAR) | BIT(WPN_SWORD) | BIT(WPN_MINE) | BIT(WPN_FIST); @@ -95,23 +95,23 @@ ANIMATOR DoShrapJumpFall; ANIMATOR DoFastShrapJumpFall; int SpawnSmokePuff(short SpriteNum); -BOOL WarpToUnderwater(short *sectnum, int *x, int *y, int *z); -BOOL WarpToSurface(short *sectnum, int *x, int *y, int *z); +SWBOOL WarpToUnderwater(short *sectnum, int *x, int *y, int *z); +SWBOOL WarpToSurface(short *sectnum, int *x, int *y, int *z); short ElectroFindClosestEnemy(short SpriteNum); int InitElectroJump(SPRITEp wp, SPRITEp sp); -BOOL TestDontStickSector(short hitsect); +SWBOOL TestDontStickSector(short hitsect); int SpawnShrapX(short SpriteNum); -BOOL WeaponMoveHit(short SpriteNum); -int HelpMissileLateral(SHORT Weapon, int dist); +SWBOOL WeaponMoveHit(short SpriteNum); +int HelpMissileLateral(int16_t Weapon, int dist); void SpawnMidSplash(short SpriteNum); int SopDamage(SECTOR_OBJECTp sop,short amt); int SopCheckKill(SECTOR_OBJECTp sop); int QueueStar(short SpriteNum); -int DoBlurExtend(SHORT Weapon,SHORT interval,SHORT blur_num); +int DoBlurExtend(int16_t Weapon,int16_t interval,int16_t blur_num); int SpawnDemonFist(short Weapon); -int SpawnTankShellExp(SHORT Weapon); -int SpawnMicroExp(SHORT Weapon); +int SpawnTankShellExp(int16_t Weapon); +int SpawnMicroExp(int16_t Weapon); void SpawnExpZadjust(short Weapon, SPRITEp exp, int upper_zsize, int lower_zsize); int BulletHitSprite(SPRITEp sp,short hitsprite,short hitsect,short hitwall,int hitx,int hity,int hitz,short ID); int SpawnSplashXY(int hitx,int hity,int hitz,short); @@ -2636,7 +2636,7 @@ STATE s_PaperShrapC[] = }; #if 1 -BOOL MissileHitMatch(short Weapon, short WeaponNum, short hitsprite) +SWBOOL MissileHitMatch(short Weapon, short WeaponNum, short hitsprite) { SPRITEp hsp = &sprite[hitsprite]; SPRITEp wp = &sprite[Weapon]; @@ -2756,7 +2756,7 @@ int DoLavaErupt(short SpriteNum) short i,nexti,pnum; PLAYERp pp; SPRITEp tsp; - BOOL found = FALSE; + SWBOOL found = FALSE; if (TEST_BOOL1(sp)) { @@ -2829,7 +2829,7 @@ int DoLavaErupt(short SpriteNum) } -VOID UserShrapSetup(SHRAPp shrap, STATEp state, int num_shrap) +void UserShrapSetup(SHRAPp shrap, STATEp state, int num_shrap) { shrap->state = state; shrap->num = num_shrap; @@ -3399,7 +3399,7 @@ AutoShrap: short size; SPRITEp ep; USERp eu; - int SpawnLittleExp(SHORT Weapon); + int SpawnLittleExp(int16_t Weapon); spnum = SpawnLittleExp(ParentNum); ASSERT(spnum >= 0); @@ -3866,7 +3866,7 @@ AutoShrap: } int -DoShrapMove(SHORT SpriteNum) +DoShrapMove(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -4030,7 +4030,7 @@ DoShrapJumpFall(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - SHORT rnd_num; + int16_t rnd_num; if (TEST(u->Flags, SPR_JUMPING)) { @@ -4355,14 +4355,14 @@ SpawnBlood(short SpriteNum, short Weapon, short hitang, int hitx, int hity, int } -BOOL +SWBOOL VehicleMoveHit(short SpriteNum) { USERp u = User[SpriteNum],cu; SPRITEp sp = User[SpriteNum]->SpriteP,cp; SECTOR_OBJECTp sop; SECTOR_OBJECTp hsop; - BOOL TestKillSectorObject(SECTOR_OBJECTp); + SWBOOL TestKillSectorObject(SECTOR_OBJECTp); short controller; short hitsect, hitwall; @@ -4477,7 +4477,7 @@ VehicleMoveHit(short SpriteNum) } -BOOL +SWBOOL WeaponMoveHit(short SpriteNum) { USERp u = User[SpriteNum]; @@ -4778,7 +4778,7 @@ DoFireballFlames(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum],ap; USERp u = User[SpriteNum]; - BOOL jumping = FALSE; + SWBOOL jumping = FALSE; // if no owner then stay where you are if (u->Attach >= 0) @@ -4875,7 +4875,7 @@ DoBreakFlames(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum],ap; USERp u = User[SpriteNum]; - BOOL jumping = FALSE; + SWBOOL jumping = FALSE; if (TEST(u->Flags, SPR_JUMPING)) { @@ -5005,13 +5005,13 @@ DoRipperGrow(short SpriteNum) return 0; } -VOID UpdateSinglePlayKills(short SpriteNum) +void UpdateSinglePlayKills(short SpriteNum) { // single play and coop kill count if (gNet.MultiGameType != MULTI_GAME_COMMBAT) { #if DEBUG - extern BOOL DebugSecret; + extern SWBOOL DebugSecret; if (DebugSecret) { SPRITEp sp = &sprite[SpriteNum]; @@ -5347,8 +5347,8 @@ ActorHealth(short SpriteNum, short amt) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - extern BOOL FinishAnim; - extern BOOL FinishedLevel; + extern SWBOOL FinishAnim; + extern SWBOOL FinishedLevel; if (u->ID == TRASHCAN && amt > -75) { @@ -5466,8 +5466,8 @@ SopCheckKill(SECTOR_OBJECTp sop) { SPRITEp sp = sop->sp_child; USERp u = User[sp - sprite]; - BOOL killed = FALSE; - VOID VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator); + SWBOOL killed = FALSE; + void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator); if (TEST(sop->flags, SOBJ_BROKEN)) return FALSE; @@ -5775,7 +5775,7 @@ PlayerCheckDeath(PLAYERp pp, short Weapon) if (u->Health <= 0 && !TEST(pp->Flags, PF_DEAD)) { - VOID DoPlayerBeginDie(PLAYERp); + void DoPlayerBeginDie(PLAYERp); // pick a death type if (u->LastDamage >= PLAYER_DEATH_EXPLODE_DAMMAGE_AMT) @@ -5831,7 +5831,7 @@ PlayerCheckDeath(PLAYERp pp, short Weapon) return FALSE; } -BOOL +SWBOOL PlayerTakeDamage(PLAYERp pp, short Weapon) { SPRITEp sp = pp->SpriteP; @@ -7727,7 +7727,7 @@ short StatBreakList[] = STAT_DEAD_ACTOR, }; -VOID TraverseBreakableWalls(short start_sect, int x, int y, int z, short ang, int radius) +void TraverseBreakableWalls(short start_sect, int x, int y, int z, short ang, int radius) { int WallBreakPosition(short hitwall, short *sectnum, int *x, int *y, int *z, short *ang); int i, j, k; @@ -7951,7 +7951,7 @@ int DoExpDamageTest(short Weapon) } else { - BOOL once = FALSE; + SWBOOL once = FALSE; if (DoWallMoveMatch(SP_TAG2(found_sp))) { @@ -8007,11 +8007,11 @@ int DoMineExpMine(short Weapon) } int -DoStar(SHORT Weapon) +DoStar(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG enemy, next_enemy, dax, day, daz, nextj; + int32_t enemy, next_enemy, dax, day, daz, nextj; short NewWeapon, pnum; USERp su; PLAYERp pp; @@ -8127,7 +8127,7 @@ DoStar(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; short hitsect = NORM_SECTOR(u->ret); if (sp->z > DIV2(u->hiz + u->loz)) @@ -8238,11 +8238,11 @@ DoStar(SHORT Weapon) } int -DoCrossBolt(SHORT Weapon) +DoCrossBolt(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; int offset; @@ -8281,7 +8281,7 @@ DoCrossBolt(SHORT Weapon) int -DoPlasmaDone(SHORT Weapon) +DoPlasmaDone(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8320,7 +8320,7 @@ int PickEnemyTarget(SPRITEp sp, short aware_range) } int -MissileSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range, SHORT dang_shift, SHORT turn_limit, SHORT z_limit) +MissileSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range, int16_t dang_shift, int16_t turn_limit, int16_t z_limit) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8407,7 +8407,7 @@ MissileSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range, SHORT dang_shift, // combination of vector manipulation int -ComboMissileSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range, SHORT dang_shift, SHORT turn_limit, SHORT z_limit) +ComboMissileSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range, int16_t dang_shift, int16_t turn_limit, int16_t z_limit) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8477,7 +8477,7 @@ ComboMissileSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range, SHORT dang_s // completely vector manipulation int -VectorMissileSeek(SHORT Weapon, SHORT delay_tics, SHORT turn_speed, SHORT aware_range1, SHORT aware_range2) +VectorMissileSeek(int16_t Weapon, int16_t delay_tics, int16_t turn_speed, int16_t aware_range1, int16_t aware_range2) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8577,7 +8577,7 @@ VectorMissileSeek(SHORT Weapon, SHORT delay_tics, SHORT turn_speed, SHORT aware_ // completely vector manipulation int -VectorWormSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range1, SHORT aware_range2) +VectorWormSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range1, int16_t aware_range2) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8648,7 +8648,7 @@ VectorWormSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range1, SHORT aware_r } int -DoBlurExtend(SHORT Weapon, SHORT interval, SHORT blur_num) +DoBlurExtend(int16_t Weapon, int16_t interval, int16_t blur_num) { USERp u = User[Weapon]; @@ -8698,7 +8698,7 @@ InitPlasmaFountain(SPRITEp wp, SPRITEp sp) } int -DoPlasmaFountain(SHORT Weapon) +DoPlasmaFountain(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; SPRITEp ap; @@ -8747,18 +8747,18 @@ DoPlasmaFountain(SHORT Weapon) } int -DoPlasma(SHORT Weapon) +DoPlasma(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; int ox,oy,oz; ox = sp->x; oy = sp->y; oz = sp->z; -//MissileSeek(SHORT Weapon, SHORT delay_tics, SHORT aware_range, SHORT dang_shift, SHORT turn_limit, SHORT z_limit) +//MissileSeek(int16_t Weapon, int16_t delay_tics, int16_t aware_range, int16_t dang_shift, int16_t turn_limit, int16_t z_limit) //MissileSeek(Weapon, 20, 1024, 6, 80, 6); DoBlurExtend(Weapon, 0, 4); @@ -8826,7 +8826,7 @@ DoPlasma(SHORT Weapon) int -DoCoolgFire(SHORT Weapon) +DoCoolgFire(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -8870,7 +8870,7 @@ DoEelFire(short Weapon) } -VOID ScaleSpriteVector(short SpriteNum, int scale) +void ScaleSpriteVector(short SpriteNum, int scale) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; @@ -8880,7 +8880,7 @@ VOID ScaleSpriteVector(short SpriteNum, int scale) u->zchange = mulscale16(u->zchange, scale); } -VOID WallBounce(short SpriteNum, short ang) +void WallBounce(short SpriteNum, short ang) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; @@ -8923,7 +8923,7 @@ VOID WallBounce(short SpriteNum, short ang) } -BOOL SlopeBounce(short SpriteNum, BOOL *hitwall) +SWBOOL SlopeBounce(short SpriteNum, SWBOOL *hitwall) { USERp u = User[SpriteNum]; SPRITEp sp = u->SpriteP; @@ -8996,11 +8996,11 @@ BOOL SlopeBounce(short SpriteNum, BOOL *hitwall) extern STATE s_Phosphorus[]; int -DoGrenade(SHORT Weapon) +DoGrenade(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short i; if (TEST(u->Flags, SPR_UNDERWATER)) @@ -9106,7 +9106,7 @@ DoGrenade(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(Weapon, &hitwall)) { if (hitwall) @@ -9246,11 +9246,11 @@ DoGrenade(SHORT Weapon) } int -DoVulcanBoulder(SHORT Weapon) +DoVulcanBoulder(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; u->Counter += 40; u->zchange += u->Counter; @@ -9330,7 +9330,7 @@ DoVulcanBoulder(SHORT Weapon) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(Weapon, &hitwall)) { @@ -9401,7 +9401,7 @@ DoVulcanBoulder(SHORT Weapon) return FALSE; } -BOOL +SWBOOL OwnerIsPlayer(short Weapon) { SPRITEp sp = &sprite[Weapon]; @@ -9426,7 +9426,7 @@ DoMineRangeTest(short Weapon, short range) unsigned stat; int dist, tx, ty; int tmin; - BOOL ownerisplayer = FALSE; + SWBOOL ownerisplayer = FALSE; ownerisplayer = OwnerIsPlayer(Weapon); @@ -9473,7 +9473,7 @@ DoMineRangeTest(short Weapon, short range) int -DoMineStuck(SHORT Weapon) +DoMineStuck(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -9636,7 +9636,7 @@ DoMineStuck(SHORT Weapon) } int -SetMineStuck(SHORT Weapon) +SetMineStuck(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -9655,7 +9655,7 @@ SetMineStuck(SHORT Weapon) } int -DoMine(SHORT Weapon) +DoMine(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -9843,11 +9843,11 @@ DoRailPuff(short SpriteNum) } int -DoBoltThinMan(SHORT Weapon) +DoBoltThinMan(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; DoBlurExtend(Weapon, 0, 4); @@ -9883,7 +9883,7 @@ DoBoltThinMan(SHORT Weapon) } int -DoTracer(SHORT Weapon) +DoTracer(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -9915,7 +9915,7 @@ DoTracer(SHORT Weapon) } int -DoEMP(SHORT Weapon) +DoEMP(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -9958,7 +9958,7 @@ DoEMP(SHORT Weapon) } int -DoEMPBurst(SHORT Weapon) +DoEMPBurst(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10012,7 +10012,7 @@ DoEMPBurst(SHORT Weapon) } int -DoTankShell(SHORT Weapon) +DoTankShell(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10044,7 +10044,7 @@ DoTankShell(SHORT Weapon) } int -DoTracerStart(SHORT Weapon) +DoTracerStart(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10072,7 +10072,7 @@ DoTracerStart(SHORT Weapon) } int -DoLaser(SHORT Weapon) +DoLaser(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10121,7 +10121,7 @@ DoLaser(SHORT Weapon) } int -DoLaserStart(SHORT Weapon) +DoLaserStart(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10148,11 +10148,11 @@ DoLaserStart(SHORT Weapon) } int -DoRail(SHORT Weapon) +DoRail(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; SPRITEp np; USERp nu; @@ -10241,11 +10241,11 @@ DoRail(SHORT Weapon) } int -DoRailStart(SHORT Weapon) +DoRailStart(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; SPRITEp np; USERp nu; short new; @@ -10271,11 +10271,11 @@ DoRailStart(SHORT Weapon) } int -DoRocket(SHORT Weapon) +DoRocket(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; int dist,a,b,c; @@ -10362,7 +10362,7 @@ DoRocket(SHORT Weapon) } int -DoMicroMini(SHORT Weapon) +DoMicroMini(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10393,7 +10393,7 @@ DoMicroMini(SHORT Weapon) } int -SpawnExtraMicroMini(SHORT Weapon) +SpawnExtraMicroMini(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10432,11 +10432,11 @@ SpawnExtraMicroMini(SHORT Weapon) } int -DoMicro(SHORT Weapon) +DoMicro(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short new; if (SW_SHAREWARE) return FALSE; // JBF: verify @@ -10510,11 +10510,11 @@ DoMicro(SHORT Weapon) } int -DoUziBullet(SHORT Weapon) +DoUziBullet(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], newp; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; int sx,sy; short NewWeapon; short i; @@ -10583,11 +10583,11 @@ DoUziBullet(SHORT Weapon) int -DoBoltSeeker(SHORT Weapon) +DoBoltSeeker(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], newp; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; MissileSeek(Weapon, 30, 768, 4, 48, 6); @@ -10619,23 +10619,23 @@ DoBoltSeeker(SHORT Weapon) } int -DoBoltShrapnel(SHORT Weapon) +DoBoltShrapnel(int16_t Weapon) { return 0; } int -DoBoltFatMan(SHORT Weapon) +DoBoltFatMan(int16_t Weapon) { return 0; } int -DoElectro(SHORT Weapon) +DoElectro(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], newp; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; DoBlurExtend(Weapon, 0, 4); @@ -10688,11 +10688,11 @@ DoElectro(SHORT Weapon) } int -DoLavaBoulder(SHORT Weapon) +DoLavaBoulder(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], newp; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10719,11 +10719,11 @@ DoLavaBoulder(SHORT Weapon) } int -DoSpear(SHORT Weapon) +DoSpear(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], newp; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; u->ret = move_missile(Weapon, u->xchange, u->ychange, u->zchange, u->ceiling_dist, u->floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS); @@ -10792,7 +10792,7 @@ int SpawnCoolieExp(short SpriteNum) int -SpawnBasicExp(SHORT Weapon) +SpawnBasicExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -10835,7 +10835,7 @@ SpawnBasicExp(SHORT Weapon) } int -SpawnFireballFlames(SHORT SpriteNum, SHORT enemy) +SpawnFireballFlames(int16_t SpriteNum, int16_t enemy) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -10967,7 +10967,7 @@ SpawnFireballFlames(SHORT SpriteNum, SHORT enemy) int -SpawnBreakFlames(SHORT SpriteNum, SHORT enemy) +SpawnBreakFlames(int16_t SpriteNum, int16_t enemy) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -11011,7 +11011,7 @@ SpawnBreakFlames(SHORT SpriteNum, SHORT enemy) int -SpawnBreakStaticFlames(SHORT SpriteNum) +SpawnBreakStaticFlames(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -11061,7 +11061,7 @@ SpawnBreakStaticFlames(SHORT SpriteNum) int -SpawnFireballExp(SHORT Weapon) +SpawnFireballExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11104,7 +11104,7 @@ SpawnFireballExp(SHORT Weapon) } int -SpawnGoroFireballExp(SHORT Weapon) +SpawnGoroFireballExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11143,7 +11143,7 @@ SpawnGoroFireballExp(SHORT Weapon) } int -SpawnBoltExp(SHORT Weapon) +SpawnBoltExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11185,7 +11185,7 @@ SpawnBoltExp(SHORT Weapon) } int -SpawnBunnyExp(SHORT Weapon) +SpawnBunnyExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11210,7 +11210,7 @@ SpawnBunnyExp(SHORT Weapon) } int -SpawnTankShellExp(SHORT Weapon) +SpawnTankShellExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11250,7 +11250,7 @@ SpawnTankShellExp(SHORT Weapon) int -SpawnNuclearSecondaryExp(SHORT Weapon, short ang) +SpawnNuclearSecondaryExp(int16_t Weapon, short ang) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11298,7 +11298,7 @@ SpawnNuclearSecondaryExp(SHORT Weapon, short ang) } int -SpawnNuclearExp(SHORT Weapon) +SpawnNuclearExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11392,7 +11392,7 @@ SpawnNuclearExp(SHORT Weapon) } int -SpawnTracerExp(SHORT Weapon) +SpawnTracerExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11438,7 +11438,7 @@ SpawnTracerExp(SHORT Weapon) } int -SpawnMicroExp(SHORT Weapon) +SpawnMicroExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11515,7 +11515,7 @@ AddSpriteToSectorObject(short SpriteNum, SECTOR_OBJECTp sop) } int -SpawnBigGunFlames(SHORT Weapon, SHORT Operator, SECTOR_OBJECTp sop) +SpawnBigGunFlames(int16_t Weapon, int16_t Operator, SECTOR_OBJECTp sop) { SPRITEp sp,shp; USERp u,shu; @@ -11523,7 +11523,7 @@ SpawnBigGunFlames(SHORT Weapon, SHORT Operator, SECTOR_OBJECTp sop) USERp eu; short explosion,shoot_pt; unsigned sn; - BOOL smallflames = FALSE; + SWBOOL smallflames = FALSE; if (Weapon < 0) { @@ -11595,7 +11595,7 @@ SpawnBigGunFlames(SHORT Weapon, SHORT Operator, SECTOR_OBJECTp sop) } int -SpawnGrenadeSecondaryExp(SHORT Weapon, short ang) +SpawnGrenadeSecondaryExp(int16_t Weapon, short ang) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11646,7 +11646,7 @@ SpawnGrenadeSecondaryExp(SHORT Weapon, short ang) } int -SpawnGrenadeSmallExp(SHORT Weapon) +SpawnGrenadeSmallExp(int16_t Weapon) { short ang; @@ -11656,7 +11656,7 @@ SpawnGrenadeSmallExp(SHORT Weapon) } int -SpawnGrenadeExp(SHORT Weapon) +SpawnGrenadeExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11782,7 +11782,7 @@ void SpawnExpZadjust(short Weapon, SPRITEp exp, int upper_zsize, int lower_zsize eu->oz = exp->z; } int -SpawnMineExp(SHORT Weapon) +SpawnMineExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11898,7 +11898,7 @@ int DoMineExp(short SpriteNum) } int -DoSectorExp(SHORT SpriteNum) +DoSectorExp(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -11910,7 +11910,7 @@ DoSectorExp(SHORT SpriteNum) } int -SpawnSectorExp(SHORT Weapon) +SpawnSectorExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -11947,7 +11947,7 @@ SpawnSectorExp(SHORT Weapon) // called from SpawnShrap int -SpawnLargeExp(SHORT Weapon) +SpawnLargeExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; SPRITEp exp; @@ -11981,7 +11981,7 @@ SpawnLargeExp(SHORT Weapon) } int -SpawnMeteorExp(SHORT Weapon) +SpawnMeteorExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -12032,7 +12032,7 @@ SpawnMeteorExp(SHORT Weapon) } int -SpawnLittleExp(SHORT Weapon) +SpawnLittleExp(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; SPRITEp exp; @@ -12059,11 +12059,11 @@ SpawnLittleExp(SHORT Weapon) } int -DoFireball(SHORT Weapon) +DoFireball(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; - LONG dax, day, daz; + int32_t dax, day, daz; short NewWeapon; int offset; @@ -12153,13 +12153,13 @@ DoFireball(SHORT Weapon) } int -DoFindGround(SHORT SpriteNum) +DoFindGround(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum], hsp; USERp u = User[SpriteNum]; int ceilhit, florhit; short save_cstat; - BOOL found = FALSE; + SWBOOL found = FALSE; short bak_cstat; // recursive routine to find the ground - either sector or floor sprite @@ -12213,13 +12213,13 @@ DoFindGround(SHORT SpriteNum) } int -DoFindGroundPoint(SHORT SpriteNum) +DoFindGroundPoint(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum], hsp; USERp u = User[SpriteNum]; int ceilhit, florhit; short save_cstat; - BOOL found = FALSE; + SWBOOL found = FALSE; short bak_cstat; // recursive routine to find the ground - either sector or floor sprite @@ -12273,7 +12273,7 @@ DoFindGroundPoint(SHORT SpriteNum) } int -DoNapalm(SHORT Weapon) +DoNapalm(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], exp; USERp u = User[Weapon]; @@ -12390,12 +12390,12 @@ DoNapalm(SHORT Weapon) #if WORM == 1 int -DoBloodWorm(SHORT Weapon) +DoBloodWorm(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], exp; USERp u = User[Weapon]; int offset; - int move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics); + int move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics); short ang; int x,y,z,xvect,yvect; int bx,by; @@ -12484,12 +12484,12 @@ DoBloodWorm(SHORT Weapon) #if WORM == 2 int -DoBloodWorm(SHORT Weapon) +DoBloodWorm(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], exp; USERp u = User[Weapon]; int offset; - int move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, ULONG cliptype, int numtics); + int move_ground_missile(short spritenum, int xchange, int ychange, int zchange, int ceildist, int flordist, uint32_t cliptype, int numtics); short ang; int x,y,z,xvect,yvect; int bx,by; @@ -12616,13 +12616,13 @@ DoBloodWorm(SHORT Weapon) #endif int -DoMeteor(SHORT Weapon) +DoMeteor(int16_t Weapon) { return FALSE; } int -DoSerpMeteor(SHORT Weapon) +DoSerpMeteor(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], exp; USERp u = User[Weapon]; @@ -12682,7 +12682,7 @@ DoSerpMeteor(SHORT Weapon) int -DoMirvMissile(SHORT Weapon) +DoMirvMissile(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], exp; USERp u = User[Weapon]; @@ -12717,7 +12717,7 @@ DoMirvMissile(SHORT Weapon) } int -DoMirv(SHORT Weapon) +DoMirv(int16_t Weapon) { SPRITEp sp = &sprite[Weapon], np; USERp u = User[Weapon], nu; @@ -12822,7 +12822,7 @@ DoMirv(SHORT Weapon) return FALSE; } -BOOL +SWBOOL MissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist) { SPRITEp wp = &sprite[Weapon]; @@ -12868,7 +12868,7 @@ MissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist) return retval; } -BOOL +SWBOOL TestMissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist, int zvel) { SPRITEp wp = &sprite[Weapon]; @@ -12915,7 +12915,7 @@ TestMissileSetPos(short Weapon, ANIMATORp DoWeapon, int dist, int zvel) } int -DoRing(SHORT Weapon) +DoRing(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -13012,7 +13012,7 @@ DoRing(SHORT Weapon) -VOID +void InitSpellRing(PLAYERp pp) { short ang, ang_diff, ang_start, ang_finish, SpriteNum, missiles; @@ -13080,7 +13080,7 @@ InitSpellRing(PLAYERp pp) } int -DoSerpRing(SHORT Weapon) +DoSerpRing(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -13550,7 +13550,7 @@ InitSerpRing2(short SpriteNum) } #endif -VOID +void InitSpellNapalm(PLAYERp pp) { short SpriteNum; @@ -13849,7 +13849,7 @@ InitSwordAttack(PLAYERp pp) int nx,ny; short random_amt; - static SHORT dangs[] = + static int16_t dangs[] = { -256, -128, 0, 128, 256 }; @@ -14028,7 +14028,7 @@ InitFistAttack(PLAYERp pp) int nx,ny; short random_amt; - static SHORT dangs[] = + static int16_t dangs[] = { -128,128 }; @@ -14441,7 +14441,7 @@ InitMiniSumoClap(short SpriteNum) } int -WeaponAutoAim(SPRITEp sp, short Missile, short ang, BOOL test) +WeaponAutoAim(SPRITEp sp, short Missile, short ang, SWBOOL test) { USERp wu = User[Missile]; USERp u = User[sp - sprite]; @@ -14511,7 +14511,7 @@ WeaponAutoAim(SPRITEp sp, short Missile, short ang, BOOL test) } int -WeaponAutoAimZvel(SPRITEp sp, short Missile, int *zvel, short ang, BOOL test) +WeaponAutoAimZvel(SPRITEp sp, short Missile, int *zvel, short ang, SWBOOL test) { USERp wu = User[Missile]; USERp u = User[sp - sprite]; @@ -14639,7 +14639,7 @@ AimHitscanToTarget(SPRITEp sp, int *z, short *ang, int z_ratio) } int -WeaponAutoAimHitscan(SPRITEp sp, int *z, short *ang, BOOL test) +WeaponAutoAimHitscan(SPRITEp sp, int *z, short *ang, SWBOOL test) { USERp u = User[sp - sprite]; short hitsprite = -1; @@ -14692,7 +14692,7 @@ WeaponAutoAimHitscan(SPRITEp sp, int *z, short *ang, BOOL test) return hitsprite; } -VOID +void WeaponHitscanShootFeet(SPRITEp sp, SPRITEp hp, int *zvect) { int dist; @@ -14745,7 +14745,7 @@ InitStar(PLAYERp pp) SPRITEp np; USERp nu; short nw; - BOOL AutoAim = FALSE; + SWBOOL AutoAim = FALSE; #define STAR_REPEAT 26 #define STAR_HORIZ_ADJ 100L //#define STAR_HORIZ_ADJ 0 @@ -14860,7 +14860,7 @@ InitStar(PLAYERp pp) } #if WORM == 1 -VOID +void InitHeartAttack(PLAYERp pp) { short SpriteNum; @@ -14933,7 +14933,7 @@ InitHeartAttack(PLAYERp pp) #endif #if WORM == 2 -VOID +void InitHeartAttack(PLAYERp pp) { short SpriteNum; @@ -16200,7 +16200,7 @@ InitSerpSlash(short SpriteNum) return 0; } -BOOL +SWBOOL WallSpriteInsideSprite(SPRITEp wsp, SPRITEp sp) { int x1, y1, x2, y2; @@ -16522,7 +16522,7 @@ InitSerpSpell(short SpriteNum) } int -SpawnDemonFist(SHORT Weapon) +SpawnDemonFist(int16_t Weapon) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -17850,7 +17850,7 @@ int SpawnWallHole(short hitsect, short hitwall, int hitx, int hity, int hitz) return SpriteNum; } -BOOL +SWBOOL HitscanSpriteAdjust(short SpriteNum, short hitwall) { SPRITEp sp = &sprite[SpriteNum]; @@ -17904,14 +17904,14 @@ InitUzi(PLAYERp pp) int nx,ny; int xvect,yvect,zvect; short cstat = 0; - BYTE pal = 0; + uint8_t pal = 0; //static char alternate=0; static int uziclock=0; int clockdiff=0; - BOOL FireSnd = FALSE; + SWBOOL FireSnd = FALSE; #define UZIFIRE_WAIT 20 - VOID InitUziShell(PLAYERp); + void InitUziShell(PLAYERp); PlayerUpdateAmmo(pp, u->WeaponNum, -1); @@ -18117,7 +18117,7 @@ InitEMP(PLAYERp pp) int hitx, hity, hitz, daz, nz; int nx,ny; short cstat = 0; - BYTE pal = 0; + uint8_t pal = 0; if (SW_SHAREWARE) return FALSE; // JBF: verify @@ -18773,7 +18773,7 @@ InitSobjGun(PLAYERp pp) USERp u = User[pp->PlayerSprite]; short i; SPRITEp sp; - BOOL first = FALSE; + SWBOOL first = FALSE; for (i = 0; pp->sop->sp_num[i] != -1; i++) { @@ -18792,7 +18792,7 @@ InitSobjGun(PLAYERp pp) } // inert shoot point - if ((BYTE)SP_TAG3(sp) == 255) + if ((uint8_t)SP_TAG3(sp) == 255) return 0; if (!first) @@ -19224,7 +19224,7 @@ InitEnemyUzi(short SpriteNum) int ret = -2; int hitx = -2, hity = -2, hitz = -2, daz; int zh; - VOID InitUziShell(PLAYERp); + void InitUziShell(PLAYERp); static short alternate; @@ -19385,7 +19385,7 @@ InitGrenade(PLAYERp pp) short oclipdist; int dist; int zvel; - BOOL auto_aim = FALSE; + SWBOOL auto_aim = FALSE; DoPlayerBeginRecoil(pp, GRENADE_RECOIL_AMT); @@ -19687,7 +19687,7 @@ InitEnemyMine(short SpriteNum) } int -HelpMissileLateral(SHORT Weapon, int dist) +HelpMissileLateral(int16_t Weapon, int dist) { SPRITEp sp = &sprite[Weapon]; USERp u = User[Weapon]; @@ -19899,7 +19899,7 @@ InitEnemyFireball(short SpriteNum) // for hitscans or other uses /////////////////////////////////////////////////////////////////////////////// -BOOL +SWBOOL WarpToUnderwater(short *sectnum, int *x, int *y, int *z) { short i, nexti; @@ -19971,7 +19971,7 @@ WarpToUnderwater(short *sectnum, int *x, int *y, int *z) return TRUE; } -BOOL +SWBOOL WarpToSurface(short *sectnum, int *x, int *y, int *z) { short i, nexti; @@ -20043,7 +20043,7 @@ WarpToSurface(short *sectnum, int *x, int *y, int *z) } -BOOL +SWBOOL SpriteWarpToUnderwater(SPRITEp sp) { USERp u = User[sp - sprite]; @@ -20121,7 +20121,7 @@ SpriteWarpToUnderwater(SPRITEp sp) return TRUE; } -BOOL +SWBOOL SpriteWarpToSurface(SPRITEp sp) { USERp u = User[sp - sprite]; @@ -20316,7 +20316,7 @@ SpawnUnderSplash(short SpriteNum) return 0; } -BOOL +SWBOOL MissileHitDiveArea(short SpriteNum) { USERp u = User[SpriteNum]; @@ -20587,7 +20587,7 @@ DoBubble(short SpriteNum) // this needs to be called before killsprite // whenever killing a sprite that you aren't completely sure what it is, like // with the drivables, copy sectors, break sprites, etc -VOID +void SpriteQueueDelete(short SpriteNum) { int i; @@ -20648,7 +20648,7 @@ void QueueReset(void) LoWangsQueue[i] = -1; } -BOOL TestDontStick(short SpriteNum, short hitsect, short hitwall, int hitz) +SWBOOL TestDontStick(short SpriteNum, short hitsect, short hitwall, int hitz) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; @@ -20673,7 +20673,7 @@ BOOL TestDontStick(short SpriteNum, short hitsect, short hitwall, int hitz) return FALSE; } -BOOL TestDontStickSector(short hitsect) +SWBOOL TestDontStickSector(short hitsect) { if (TEST(sector[hitsect].extra, SECTFX_DYNAMIC_AREA|SECTFX_SECTOR_OBJECT)) return TRUE; @@ -20876,7 +20876,7 @@ int QueueFootPrint(short hitsprite) USERp u = User[hitsprite]; USERp nu; short rnd_num=0; - BOOL Found=FALSE; + SWBOOL Found=FALSE; SPRITEp under_sp; short i, nexti; SECT_USERp sectu = SectUser[hsp->sectnum]; @@ -21318,7 +21318,7 @@ DoShellShrap(short SpriteNum) int SpawnShell(short SpriteNum, short ShellNum) { - extern int InitShell(SHORT SpriteNum, SHORT ShellNum); + extern int InitShell(int16_t SpriteNum, int16_t ShellNum); //ShellCount++; //SpawnShrap(SpriteNum,ShellNum); // -2 signifies right Uzi shell @@ -21331,11 +21331,11 @@ SpawnShell(short SpriteNum, short ShellNum) int -DoShrapVelocity(SHORT SpriteNum) +DoShrapVelocity(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - LONG dax, day, daz; + int32_t dax, day, daz; if (TEST(u->Flags, SPR_UNDERWATER) || SpriteInUnderwaterArea(sp)) { @@ -21401,7 +21401,7 @@ DoShrapVelocity(SHORT SpriteNum) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; if (SlopeBounce(SpriteNum, &hitwall)) { @@ -21635,7 +21635,7 @@ ShrapKillSprite(short SpriteNum) return 0; } -BOOL CheckBreakToughness(BREAK_INFOp break_info, short ID) +SWBOOL CheckBreakToughness(BREAK_INFOp break_info, short ID) { ////DSPRINTF(ds,"CheckBreakToughness called with %d",ID); //CON_Message(ds); @@ -21671,11 +21671,11 @@ BOOL CheckBreakToughness(BREAK_INFOp break_info, short ID) } int -DoItemFly(SHORT SpriteNum) +DoItemFly(int16_t SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - LONG dax, day, daz; + int32_t dax, day, daz; if (TEST(u->Flags, SPR_UNDERWATER)) { @@ -21741,7 +21741,7 @@ DoItemFly(SHORT SpriteNum) case HIT_SECTOR: { - BOOL hitwall; + SWBOOL hitwall; // hit floor if (sp->z > DIV2(u->hiz + u->loz)) { diff --git a/polymer/eduke32/source/sw/src/weapon.h b/polymer/eduke32/source/sw/src/weapon.h index fd1262655..23dc28bc1 100644 --- a/polymer/eduke32/source/sw/src/weapon.h +++ b/polymer/eduke32/source/sw/src/weapon.h @@ -62,25 +62,25 @@ extern short GenericQueue[MAX_GENERIC_QUEUE]; extern short LoWangsQueueHead; 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); SECTOR_OBJECTp DetectSectorObject(SECTORp); 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 QueueWallBlood(short hitsprite,short ang); -BOOL SlopeBounce(short SpriteNum, BOOL *hitwall); -BOOL HitscanSpriteAdjust(short SpriteNum, short hitwall); +SWBOOL SlopeBounce(short SpriteNum, SWBOOL *hitwall); +SWBOOL HitscanSpriteAdjust(short SpriteNum, short hitwall); int SpawnSwordSparks(PLAYERp pp, short hitsect, short hitwall, int hitx, int hity, int hitz, short hitang); int SpawnBubble(short SpriteNum); -int SpawnFireballExp(SHORT Weapon); -int SpawnFireballFlames(SHORT SpriteNum,SHORT enemy); +int SpawnFireballExp(int16_t Weapon); +int SpawnFireballFlames(int16_t SpriteNum,int16_t enemy); int SpawnRadiationCloud(short SpriteNum); -int SpawnGrenadeExp(SHORT Weapon); -int SpawnSectorExp(SHORT Weapon); -int DoShrapVelocity(SHORT SpriteNum); +int SpawnGrenadeExp(int16_t Weapon); +int SpawnSectorExp(int16_t Weapon); +int DoShrapVelocity(int16_t 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); // @@ -150,12 +150,12 @@ extern int WeaponIsAmmo; 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 DoActorBeginSlide(short SpriteNum, short ang, short vel, short dec); int GetOverlapSector(int x, int y, short *over, short *under); -BOOL MissileHitDiveArea(short SpriteNum); +SWBOOL MissileHitDiveArea(short SpriteNum); int DoDamageTest(short); @@ -165,7 +165,7 @@ extern short StatDamageList[STAT_DAMAGE_LIST_SIZE]; #define MUSHROOM_CLOUD 3280 extern STATE s_NukeMushroom[]; -VOID WallBounce(short SpriteNum, short ang); +void WallBounce(short SpriteNum, short ang); #define PUFF 1748 #define CALTROPS 2218 @@ -174,14 +174,14 @@ VOID WallBounce(short SpriteNum, short ang); int PlayerInitChemBomb(PLAYERp pp); int InitChemBomb(short SpriteNum); int PlayerInitCaltrops(PLAYERp pp); -int InitBloodSpray(SHORT SpriteNum, BOOL dogib, short velocity); -int SpawnBunnyExp(SHORT Weapon); +int InitBloodSpray(int16_t SpriteNum, SWBOOL dogib, short velocity); +int SpawnBunnyExp(int16_t Weapon); int InitBunnyRocket(PLAYERp pp); int GetDamage(short SpriteNum, short Weapon, short DamageNdx); int DoFlamesDamageTest(short Weapon); -VOID DoActorSpawnIcon(SHORT SpriteNum); +void DoActorSpawnIcon(int16_t SpriteNum); typedef struct { @@ -199,7 +199,7 @@ enum ShrapPos }; int SetSuicide(short SpriteNum); -VOID UpdateSinglePlayKills(short SpriteNum); +void UpdateSinglePlayKills(short SpriteNum); int InitPlasmaFountain(SPRITEp wp, SPRITEp sp); int InitCoolgDrip(short SpriteNum); int InitFireball(PLAYERp pp); @@ -212,26 +212,26 @@ int InitSpearTrap(short SpriteNum); int InitTurretMgun(SECTOR_OBJECTp sop); int InitVulcanBoulder(short SpriteNum); int DoBladeDamage(short SpriteNum); -int DoFindGround(SHORT SpriteNum); -int DoFindGroundPoint(SHORT SpriteNum); -VOID SpriteQueueDelete(short SpriteNum); -int HelpMissileLateral(SHORT Weapon,int dist); +int DoFindGround(int16_t SpriteNum); +int DoFindGroundPoint(int16_t SpriteNum); +void SpriteQueueDelete(short SpriteNum); +int HelpMissileLateral(int16_t Weapon,int dist); int AddSpriteToSectorObject(short SpriteNum,SECTOR_OBJECTp sop); void QueueReset(void); int PlayerCheckDeath(PLAYERp pp,short Weapon); -BOOL SpriteWarpToUnderwater(SPRITEp sp); +SWBOOL SpriteWarpToUnderwater(SPRITEp sp); int PlayerDamageSlide(PLAYERp pp,short damage,short ang); -BOOL VehicleMoveHit(short SpriteNum); +SWBOOL VehicleMoveHit(short SpriteNum); int SpawnSplash(short SpriteNum); -int SpawnMineExp(SHORT Weapon); -int SpawnLittleExp(SHORT Weapon); -int SpawnLargeExp(SHORT Weapon); -int SpawnNuclearExp(SHORT Weapon); -int SpawnBoltExp(SHORT Weapon); -int SpawnTracerExp(SHORT Weapon); -int SpawnGoroFireballExp(SHORT Weapon); -BOOL MissileHitMatch(short Weapon,short WeaponNum,short hitsprite); -int DoItemFly(SHORT SpriteNum); +int SpawnMineExp(int16_t Weapon); +int SpawnLittleExp(int16_t Weapon); +int SpawnLargeExp(int16_t Weapon); +int SpawnNuclearExp(int16_t Weapon); +int SpawnBoltExp(int16_t Weapon); +int SpawnTracerExp(int16_t Weapon); +int SpawnGoroFireballExp(int16_t Weapon); +SWBOOL MissileHitMatch(short Weapon,short WeaponNum,short hitsprite); +int DoItemFly(int16_t SpriteNum); int SpawnVehicleSmoke(short SpriteNum); short PrevWall(short wall_num); int DoDamage(short SpriteNum,short Weapon); diff --git a/polymer/eduke32/source/sw/src/zilla.c b/polymer/eduke32/source/sw/src/zilla.c index 6b3684002..097f9c23a 100644 --- a/polymer/eduke32/source/sw/src/zilla.c +++ b/polymer/eduke32/source/sw/src/zilla.c @@ -36,7 +36,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "fx_man.h" -extern BYTE RedBookSong[40]; +extern uint8_t RedBookSong[40]; extern short BossSpriteNum[3]; ANIMATOR InitZillaCharge; @@ -759,13 +759,13 @@ int DoZillaStomp(short SpriteNum) return 0; } -extern int SpawnGrenadeExp(SHORT Weapon); +extern int SpawnGrenadeExp(int16_t Weapon); int DoZillaDeathMelt(short SpriteNum) { SPRITEp sp = &sprite[SpriteNum]; USERp u = User[SpriteNum]; - static BOOL alreadydid = FALSE; + static SWBOOL alreadydid = FALSE; if (RANDOM_RANGE(1000) > 800) SpawnGrenadeExp(SpriteNum);