From a35900362e71d95daf3682e0a587e98fe719a8b6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Nov 2021 20:23:52 +0100 Subject: [PATCH] - only use un-deprecated variants of updatesector(z) in SW. --- source/build/include/build.h | 14 -------------- source/games/sw/src/break.cpp | 6 +++--- source/games/sw/src/break.h | 2 +- source/games/sw/src/game.h | 2 +- source/games/sw/src/weapon.cpp | 4 ++-- 5 files changed, 7 insertions(+), 21 deletions(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index 561a9bf94..4ce265ca8 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -434,21 +434,7 @@ int32_t try_facespr_intersect(uspriteptr_t const spr, vec3_t const in, #define MAXUPDATESECTORDIST 1536 #define INITIALUPDATESECTORDIST 256 void updatesector(int const x, int const y, int * const sectnum) ATTRIBUTE((nonnull(3))); -[[deprecated]] -inline void updatesector(int32_t const x, int32_t const y, int16_t * const sectnum) -{ - int snum = *sectnum; - updatesector(x, y, &snum); - *sectnum = snum; -} void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int * const sectnum) ATTRIBUTE((nonnull(4))); -[[deprecated]] -inline void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int16_t* const sectnum) -{ - int snum = *sectnum; - updatesectorz(x, y, z, &snum); - *sectnum = snum; -} void updatesectorneighbor(int32_t const x, int32_t const y, int * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(3))); void updatesectorneighborz(int32_t const x, int32_t const y, int32_t const z, int * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(4))); diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index a38ea510f..552a30c48 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -745,7 +745,7 @@ bool UserBreakWall(WALLp wp, short) return false; } -int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, short *ang) +int WallBreakPosition(short hit_wall, int *sectnum, int *x, int *y, int *z, short *ang) { short w,nw; WALLp wp; @@ -823,7 +823,7 @@ bool HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, short ang, short ty //if (hit_x == INT32_MAX) { - short sectnum; + int sectnum; WallBreakPosition(short(wp - wall), §num, &hit_x, &hit_y, &hit_z, &ang); } @@ -1091,7 +1091,7 @@ static int SectorOfWall(short theline) void DoWallBreakMatch(short match) { - short i,sectnum; + int i,sectnum; int x,y,z; WALLp wp; short wall_ang; diff --git a/source/games/sw/src/break.h b/source/games/sw/src/break.h index 133b9f9bf..846f2f972 100644 --- a/source/games/sw/src/break.h +++ b/source/games/sw/src/break.h @@ -51,7 +51,7 @@ short FindBreakSpriteMatch(short match); bool HitBreakWall(WALLp wp, int, int, int, short ang, short type); int HitBreakSprite(short BreakSprite, short type); bool CheckBreakToughness(BREAK_INFOp break_info, short ID); -int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, short *ang); +int WallBreakPosition(short hit_wall, int *sectnum, int *x, int *y, int *z, short *ang); void SortBreakInfo(void); END_SW_NS diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index c5916c627..2788382b7 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1692,6 +1692,7 @@ struct SECTOR_OBJECTstruct drive_speed, drive_slide, crush_z, + op_main_sector, // main sector operational SO moves in - for speed purposes flags; short sector[MAX_SO_SECTOR], // hold the sector numbers of the sector object @@ -1727,7 +1728,6 @@ struct SECTOR_OBJECTstruct turn_speed, // shift value determines how fast SO turns to match new angle bob_sine_ndx, // index into sine table bob_speed, // shift value for speed - op_main_sector, // main sector operational SO moves in - for speed purposes save_vel, // save velocity save_spin_speed, // save spin speed match_event, // match number diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index ea91aa5bb..c9fe326cb 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -7652,7 +7652,6 @@ short StatBreakList[] = void TraverseBreakableWalls(short start_sect, int x, int y, int z, short ang, int radius) { - int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, short *ang); int j, k; short sectlist[MAXSECTORS]; // !JIM! Frank, 512 was not big enough for $dozer, was asserting out! short sectlistplc, sectlistend, sect, startwall, endwall, nextsector; @@ -7660,7 +7659,8 @@ void TraverseBreakableWalls(short start_sect, int x, int y, int z, short ang, in int dist; short break_count; - short sectnum,wall_ang; + int sectnum; + short wall_ang; int hit_x,hit_y,hit_z; sectlist[0] = start_sect;