diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index 947ff7e19..2df23ca4d 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -368,7 +368,6 @@ void InitLevel(MapRecord *maprec) PlaceActorsOnTracks(); PostSetupSectorObject(); SetupMirrorTiles(); - initlava(); CollectPortals(); // reset NewGame diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 91bf2412a..4b30f89c0 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -891,7 +891,6 @@ struct PLAYERstruct short Armor; short MaxHealth; - //char RocketBarrel; char PlayerName[32]; uint8_t UziShellLeftAlt; @@ -2033,9 +2032,6 @@ extern int MinEnemySkill; #define MASTER_SWITCHING 1 -extern char option[]; -extern char keys[]; - extern short screenpeek; #define STAT_DAMAGE_LIST_SIZE 20 @@ -2149,7 +2145,7 @@ extern short LevelSecrets; extern short TotalKillable; extern int OrigCommPlayers; -extern char PlayerGravity; +extern uint8_t PlayerGravity; extern short wait_active_check_offset; //extern short Zombies; extern int PlaxCeilGlobZadjust, PlaxFloorGlobZadjust; diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 6c0f48dc3..21c023532 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2391,7 +2391,7 @@ void InitPlayerSprite(PLAYERp pp) sp->picnum = u->State->Pic; sp->shade = -60; // was 15 - sp->clipdist = (char)(256L >> 2); + sp->clipdist = (256 >> 2); sp->xrepeat = PLAYER_NINJA_XREPEAT; sp->yrepeat = PLAYER_NINJA_YREPEAT; diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 03ca39045..168641044 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -93,7 +93,7 @@ bool pWeaponUnHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); bool pWeaponHideKeys(PANEL_SPRITEp psp, PANEL_STATEp state); void pHotHeadOverlays(PANEL_SPRITEp psp, short mode); -char UziRecoilYadj = 0; +uint8_t UziRecoilYadj = 0; extern short screenpeek; @@ -655,7 +655,7 @@ WeaponOK(PLAYERp pp) { USERp u; short min_ammo, WeaponNum, FindWeaponNum; - static char wpn_order[] = {2,3,4,5,6,7,8,9,1,0}; + static const uint8_t wpn_order[] = {2,3,4,5,6,7,8,9,1,0}; unsigned wpn_ndx=0; if (!pp->Actor()) @@ -2287,10 +2287,9 @@ pUziRest(PANEL_SPRITEp psp) void pUziAction(PANEL_SPRITEp psp) { - char shooting; static int alternate = 0; - shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE); + bool shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE); if (shooting) { @@ -2918,8 +2917,8 @@ pShotgunRest(PANEL_SPRITEp psp) { bool 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; + int ammo = psp->PlayerP->WpnAmmo[WPN_SHOTGUN]; + int lastammo = psp->PlayerP->WpnShotgunLastShell; if (pWeaponHideKeys(psp, ps_ShotgunHide)) return; @@ -3771,9 +3770,7 @@ pHotheadRest(PANEL_SPRITEp psp) void pHotheadAction(PANEL_SPRITEp psp) { - char shooting; - - shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE); + bool shooting = (psp->PlayerP->input.actions & SB_FIRE) && (psp->PlayerP->KeyPressBits & SB_FIRE); if (shooting) { diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 672fcebbb..07f463739 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -117,7 +117,7 @@ extern int FinishAnim; #define PLAYER_JUMP_AMT (-650) #define PLAYER_CLIMB_JUMP_AMT (-1100) #define MAX_JUMP_DURATION 12 -char PlayerGravity = PLAYER_JUMP_GRAV; +uint8_t PlayerGravity = PLAYER_JUMP_GRAV; #endif bool ToggleFlyMode = false; @@ -3199,7 +3199,7 @@ void DoPlayerClimb(PLAYERp pp) { USERp u = pp->Actor()->u(); int climb_amt; - char i; + int i; SPRITEp sp = &pp->Actor()->s(); int climbvel; int dot; diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index d62fc477c..53977268d 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -69,7 +69,6 @@ TO DO void InitLevelGlobals(void); extern int lastUpdate; -extern char SaveGameDescr[10][80]; extern short Bunny_Count; extern bool NewGame; extern int GodMode; diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 96112b6e1..6c2f29937 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -2572,8 +2572,8 @@ void DoSineWaveFloor(void) { SINE_WAVE_FLOOR *swf; int newz; - short wave; - char flags; + int wave; + int flags; for (wave = 0; wave < MAX_SINE_WAVE; wave++) { @@ -2830,14 +2830,6 @@ short AnimSetVelAdj(short anim_ndx, short vel_adj) } -void initlava(void) -{ -} - -void movelava(char *dapic) -{ -} - void DoPanning(void) { diff --git a/source/games/sw/src/sector.h b/source/games/sw/src/sector.h index 48da7136a..5e21c44e0 100644 --- a/source/games/sw/src/sector.h +++ b/source/games/sw/src/sector.h @@ -75,8 +75,6 @@ void ShootableSwitch(DSWActor*); bool TestKillSectorObject(SECTOR_OBJECTp sop); void WeaponExplodeSectorInRange(DSWActor*); -void initlava(void); -void movelava(char *dapic); END_SW_NS diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index e6b05765a..6820b279a 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -4807,7 +4807,7 @@ getzrangepoint(int x, int y, int z, short sectnum, int j, k, l, dax, day, daz, xspan, yspan, xoff, yoff; int x1, y1, x2, y2, x3, y3, x4, y4, cosang, sinang, tilenum; short cstat; - char clipyou; + uint8_t clipyou; if (sectnum < 0) { diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index 86c7e9ff3..6e27f523c 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -2225,11 +2225,11 @@ void CallbackSOsink(ANIMp ap, void *data) SPRITEp sp; USERp u; SECT_USERp su; - short startwall, endwall, j; - short dest_sector = -1; - short src_sector = -1; - short i, ndx; - char found = false; + int startwall, endwall, j; + int dest_sector = -1; + int src_sector = -1; + int i, ndx; + bool found = false; int tgt_depth; sop = (SECTOR_OBJECTp)data; diff --git a/source/games/sw/src/wallmove.cpp b/source/games/sw/src/wallmove.cpp index 08c1de368..3e3813c0f 100644 --- a/source/games/sw/src/wallmove.cpp +++ b/source/games/sw/src/wallmove.cpp @@ -143,7 +143,7 @@ int DoWallMove(DSWActor* actor) } SP_TAG9(sp)--; - if ((signed char)SP_TAG9(sp) <= 0) + if ((int8_t)SP_TAG9(sp) <= 0) { KillActor(actor); } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 3a0fada6f..31a93a79c 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -3259,7 +3259,7 @@ SpawnShrap(DSWActor* parentActor, DSWActor* secondaryActor, int means, BREAK_INF UserShrap: - shrap_delta_size = (signed char)SP_TAG10(parent); + shrap_delta_size = (int8_t)SP_TAG10(parent); shrap_rand_zamt = SP_TAG9(parent); // Hey, better limit this in case mappers go crazy, like I did. :) // Kills frame rate! @@ -4763,7 +4763,7 @@ DoFireballFlames(DSWActor* actor) sp->xrepeat--; sp->yrepeat--; - if (((signed char)sp->xrepeat) == 0) + if (((int8_t)sp->xrepeat) == 0) { if (u->attachActor != nullptr) { @@ -4839,7 +4839,7 @@ DoBreakFlames(DSWActor* actor) sp->xrepeat--; sp->yrepeat--; - if (((signed char)sp->xrepeat) == 0) + if (((int8_t)sp->xrepeat) == 0) { if (u->attachActor != nullptr) { @@ -5077,9 +5077,7 @@ ActorChooseDeath(short SpriteNum, short Weapon) if (wu->WeaponNum == WPN_FIST && STD_RANDOM_RANGE(1000)>500 && pp == Player+myconnectindex) { - char choosesnd = 0; - - choosesnd=STD_RANDOM_RANGE(6); + int choosesnd = STD_RANDOM_RANGE(6); if (choosesnd == 0) PlayerSound(DIGI_KUNGFU, v3df_follow|v3df_dontpan,pp); @@ -11854,7 +11852,7 @@ DoFireball(DSWActor* actor) if (u->ret) { - char hit_burn = 0; + bool hit_burn = false; if (WeaponMoveHit(Weapon)) {