diff --git a/source/games/sw/src/_polymost.cpp b/source/games/sw/src/_polymost.cpp index c37bc21d7..c8b0ef6b7 100644 --- a/source/games/sw/src/_polymost.cpp +++ b/source/games/sw/src/_polymost.cpp @@ -1,7 +1,7 @@ BEGIN_SW_NS -bool FindCeilingView(int match, int* x, int* y, int z, sectortype** sectnum); -bool FindFloorView(int match, int* x, int* y, int z, sectortype** sectnum); +bool FindCeilingView(int match, int* x, int* y, int z, sectortype** sect); +bool FindFloorView(int match, int* x, int* y, int z, sectortype** sect); int ViewSectorInScene(sectortype* cursect, int level) diff --git a/source/games/sw/src/break.cpp b/source/games/sw/src/break.cpp index a00fac5c9..5b0c8a2f0 100644 --- a/source/games/sw/src/break.cpp +++ b/source/games/sw/src/break.cpp @@ -799,8 +799,8 @@ bool HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, int ang, int type) //if (hit_x == INT32_MAX) { - sectortype* sectnum = nullptr; - WallBreakPosition(wp, §num, &hit_x, &hit_y, &hit_z, &ang); + sectortype* sect = nullptr; + WallBreakPosition(wp, §, &hit_x, &hit_y, &hit_z, &ang); } AutoBreakWall(wp, hit_x, hit_y, hit_z, ang, type); @@ -1030,7 +1030,7 @@ int HitBreakSprite(DSWActor* breakActor, int type) void DoWallBreakMatch(int match) { - sectortype* sectnum = nullptr; + sectortype* sect = nullptr; int x,y,z; int wall_ang; @@ -1038,7 +1038,7 @@ void DoWallBreakMatch(int match) { if (wal.hitag == match) { - WallBreakPosition(&wal, §num, &x, &y, &z, &wall_ang); + WallBreakPosition(&wal, §, &x, &y, &z, &wall_ang); wal.hitag = 0; // Reset the hitag AutoBreakWall(&wal, x, y, z, wall_ang, 0); diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index a40659e36..bb63fdb5e 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -1789,7 +1789,7 @@ ANIMATOR NullAnimator; int Distance(int x1, int y1, int x2, int y2); int NewStateGroup(DSWActor* actor, STATEp SpriteGroup[]); -void SectorMidPoint(sectortype* sectnum, int *xmid, int *ymid, int *zmid); +void SectorMidPoint(sectortype* sect, int *xmid, int *ymid, int *zmid); USERp SpawnUser(DSWActor* actor, short id, STATEp state); short ActorFindTrack(DSWActor* actor, int8_t player_dir, int track_type, int *track_point_num, int *track_dir); @@ -1897,7 +1897,7 @@ inline bool FAF_ConnectArea(sectortype* sect) bool PlayerCeilingHit(PLAYERp pp, int zlimit); bool PlayerFloorHit(PLAYERp pp, int zlimit); -void FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sectnum, +void FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect, int32_t xvect, int32_t yvect, int32_t zvect, HitInfo& hit, int32_t clipmask); @@ -2032,8 +2032,8 @@ void ScreenCaptureKeys(void); // draw.c void computergetinput(int snum,InputPacket *syn); // jplayer.c void SetupMirrorTiles(void); // rooms.c -bool FAF_Sector(sectortype* sectnum); // rooms.c -int GetZadjustment(sectortype* sectnum,short hitag); // rooms.c +bool FAF_Sector(sectortype* sect); // rooms.c +int GetZadjustment(sectortype* sect,short hitag); // rooms.c void InitSetup(void); // setup.c diff --git a/source/games/sw/src/misc.h b/source/games/sw/src/misc.h index 4dfd79ae1..0e471b91a 100644 --- a/source/games/sw/src/misc.h +++ b/source/games/sw/src/misc.h @@ -18,9 +18,9 @@ void InitCheats(); void MapColors(short num,COLOR_MAP cm,short create); int32_t CONFIG_ReadSetup(void); -DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, int* sectnum); +DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, int* sect); bool WarpSectorInfo(sectortype* sect, DSWActor** sp_warp); -DSWActor* Warp(int32_t* x, int32_t* y, int32_t* z, int* sectnum); +DSWActor* Warp(int32_t* x, int32_t* y, int32_t* z, int* sect); inline DSWActor* Warp(int32_t* x, int32_t* y, int32_t* z, sectortype** sect) { int sn = sectnum(*sect); @@ -51,7 +51,7 @@ void TrackSetup(void); void PlaceSectorObject(SECTOR_OBJECTp sop, int newx, int newy); void PlaceSectorObjectsOnTracks(void); void PlaceActorsOnTracks(void); -void SetupSectorObject(sectortype* sectnum, short tag); +void SetupSectorObject(sectortype* sect, short tag); void PostSetupSectorObject(void); void VehicleSetSmoke(SECTOR_OBJECTp sop, ANIMATORp animator); void CollapseSectorObject(SECTOR_OBJECTp sop, int nx, int ny); diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 8fbfd2a05..73b0d2145 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -2256,10 +2256,10 @@ void DoPlayerSectorUpdatePostMove(PLAYERp pp) } -void PlaySOsound(sectortype* sectnum, short sound_num) +void PlaySOsound(sectortype* sect, short sound_num) { // play idle sound - sound 1 - SWSectIterator it(sectnum); + SWSectIterator it(sect); while (auto actor = it.Next()) { auto sp = &actor->s(); @@ -2271,10 +2271,10 @@ void PlaySOsound(sectortype* sectnum, short sound_num) } } -void StopSOsound(sectortype* sectnum) +void StopSOsound(sectortype* sect) { // play idle sound - sound 1 - SWSectIterator it(sectnum); + SWSectIterator it(sect); while (auto actor = it.Next()) { auto sp = &actor->s(); diff --git a/source/games/sw/src/player.h b/source/games/sw/src/player.h index c94342da4..a14e5bb18 100644 --- a/source/games/sw/src/player.h +++ b/source/games/sw/src/player.h @@ -136,7 +136,7 @@ void DoPlayerSpriteThrow(PLAYERp pp); int DoPlayerWadeSuperJump(PLAYERp pp); void DoPlayerWarpTeleporter(PLAYERp pp); void UpdatePlayerSprite(PLAYERp pp); -void PlaySOsound(sectortype* sectnum,short sound_num); +void PlaySOsound(sectortype* sect,short sound_num); void DoSpawnTeleporterEffectPlace(SPRITEp sp); void FindMainSector(SECTOR_OBJECTp sop); diff --git a/source/games/sw/src/rooms.cpp b/source/games/sw/src/rooms.cpp index 6a490ec4a..24e1f3b8b 100644 --- a/source/games/sw/src/rooms.cpp +++ b/source/games/sw/src/rooms.cpp @@ -81,11 +81,11 @@ DSWActor* InsertActor(int sectnum, int stat) return pActor; } -bool FAF_Sector(sectortype* sectnum) +bool FAF_Sector(sectortype* sect) { SPRITEp sp; - SWSectIterator it(sectnum); + SWSectIterator it(sect); while (auto actor = it.Next()) { sp = &actor->s(); diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 53a363acd..463a9cc11 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -61,7 +61,7 @@ enum ANIMATOR DoGrating; void DoPlayerBeginForceJump(PLAYERp); -sectortype* FindNextSectorByTag(sectortype* sectnum, int tag); +sectortype* FindNextSectorByTag(sectortype* sect, int tag); short LevelSecrets; bool TestVatorMatchActive(short match); bool TestSpikeMatchActive(short match); diff --git a/source/games/sw/src/warp.cpp b/source/games/sw/src/warp.cpp index 1b38fa0f9..ceffdaff2 100644 --- a/source/games/sw/src/warp.cpp +++ b/source/games/sw/src/warp.cpp @@ -39,7 +39,7 @@ BEGIN_SW_NS //////////////////////////////////////////////////////////////////////////////// extern bool Prediction; -DSWActor* WarpToArea(DSWActor* sp_from, int32_t* x, int32_t* y, int32_t* z, int* sectnum); +DSWActor* WarpToArea(DSWActor* sp_from, int32_t* x, int32_t* y, int32_t* z, int* sect); bool WarpPlaneSectorInfo(short sectnum, DSWActor** sp_ceiling, DSWActor** sp_floor) { @@ -77,21 +77,21 @@ bool WarpPlaneSectorInfo(short sectnum, DSWActor** sp_ceiling, DSWActor** sp_flo return true; } -DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, int* sectnum) +DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, int* sect) { DSWActor* sp_floor,* sp_ceiling; if (Prediction) return nullptr; - if (!WarpPlaneSectorInfo(*sectnum, &sp_ceiling, &sp_floor)) + if (!WarpPlaneSectorInfo(*sect, &sp_ceiling, &sp_floor)) return nullptr; if (sp_ceiling) { if (*z <= sp_ceiling->s().z) { - return WarpToArea(sp_ceiling, x, y, z, sectnum); + return WarpToArea(sp_ceiling, x, y, z, sect); } } @@ -99,7 +99,7 @@ DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, int* sectnum) { if (*z >= sp_floor->s().z) { - return WarpToArea(sp_floor, x, y, z, sectnum); + return WarpToArea(sp_floor, x, y, z, sect); } } diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index fc7f3f7c4..0086049a4 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -98,8 +98,8 @@ ANIMATOR DoShrapJumpFall; ANIMATOR DoFastShrapJumpFall; int SpawnSmokePuff(DSWActor* actor); -bool WarpToUnderwater(sectortype** sectnum, int *x, int *y, int *z); -bool WarpToSurface(sectortype** sectnum, int *x, int *y, int *z); +bool WarpToUnderwater(sectortype** sect, int *x, int *y, int *z); +bool WarpToSurface(sectortype** sect, int *x, int *y, int *z); int InitElectroJump(SPRITEp wp, SPRITEp sp); bool TestDontStickSector(sectortype* hit_sect); ANIMATOR SpawnShrapX;