diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index 34a4a50d4..ba44fc9f0 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -238,7 +238,7 @@ int CanHitPlayer(DSWActor* actor) int DoActorPickClosePlayer(DSWActor* actor) { int pnum; - PLAYER* pp; + SWPlayer* pp; // if actor can still see the player bool found = false; int i; @@ -362,7 +362,7 @@ TARGETACTOR: DSWActor* GetPlayerSpriteNum(DSWActor* actor) { int pnum; - PLAYER* pp; + SWPlayer* pp; TRAVERSE_CONNECT(pnum) { diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 977db27bd..0faf77f28 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -993,7 +993,7 @@ int DoBunnyQuickJump(DSWActor* actor) { if ((hitActor->spr.extra & SPRX_PLAYER_OR_ENEMY)) { - PLAYER* pp = nullptr; + SWPlayer* pp = nullptr; if (RandomRange(1000) < 995 && hitActor->user.spal != PALETTE_PLAYER0) return false; diff --git a/source/games/sw/src/cheats.cpp b/source/games/sw/src/cheats.cpp index e4a0c5ac0..d217e1485 100644 --- a/source/games/sw/src/cheats.cpp +++ b/source/games/sw/src/cheats.cpp @@ -51,7 +51,7 @@ extern bool FAF_DebugView; extern bool ToggleFlyMode; const char *CheatKeyType; -void KeysCheat(PLAYER* pp, const char *cheat_string); +void KeysCheat(SWPlayer* pp, const char *cheat_string); //--------------------------------------------------------------------------- // @@ -59,7 +59,7 @@ void KeysCheat(PLAYER* pp, const char *cheat_string); // //--------------------------------------------------------------------------- -static PLAYER* checkCheat(cheatseq_t* c) +static SWPlayer* checkCheat(cheatseq_t* c) { if (::CheckCheatmode(true, true)) return nullptr; return &Player[screenpeek]; @@ -142,7 +142,7 @@ bool PrevCheat(cheatseq_t* c) bool MapCheat(cheatseq_t* c) { - PLAYER* pp; + SWPlayer* pp; if (!(pp=checkCheat(c))) return false; gFullMap = !gFullMap; // Need to do this differently. The code here was completely broken. @@ -158,7 +158,7 @@ bool MapCheat(cheatseq_t* c) bool WarpCheat(cheatseq_t* c) { - PLAYER* pp; + SWPlayer* pp; if (!(pp = checkCheat(c))) return false; int level_num; diff --git a/source/games/sw/src/d_menu.cpp b/source/games/sw/src/d_menu.cpp index 7db930af6..a064982f5 100644 --- a/source/games/sw/src/d_menu.cpp +++ b/source/games/sw/src/d_menu.cpp @@ -97,7 +97,7 @@ bool GameInterface::CanSave() bool GameInterface::StartGame(FNewGameStartup& gs) { - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; int handle = 0; int zero = 0; diff --git a/source/games/sw/src/draw.cpp b/source/games/sw/src/draw.cpp index 278cde417..b1d6db514 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -608,7 +608,7 @@ static void analyzesprites(tspriteArray& tsprites, const DVector3& viewpos, doub { int tSpriteNum; static int ang = 0; - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; int newshade=0; const int DART_PIC = 2526; @@ -966,7 +966,7 @@ void post_analyzesprites(tspriteArray& tsprites) // //--------------------------------------------------------------------------- -void PrintSpriteInfo(PLAYER* pp) +void PrintSpriteInfo(SWPlayer* pp) { const int Y_STEP = 7; @@ -1010,7 +1010,7 @@ void PrintSpriteInfo(PLAYER* pp) // //--------------------------------------------------------------------------- -static void DrawCrosshair(PLAYER* pp, const double interpfrac) +static void DrawCrosshair(SWPlayer* pp, const double interpfrac) { auto offsets = pp->Angles.getCrosshairOffsets(interpfrac); ::DrawCrosshair(pp->GetActor()->user.Health, offsets.first.X, offsets.first.Y + ((pp->Flags & PF_VIEW_FROM_OUTSIDE) ? 5 : 0), 2, offsets.second, shadeToLight(10)); @@ -1111,7 +1111,7 @@ void PreDrawStackedWater(void) } -void DoPlayerDiveMeter(PLAYER* pp); +void DoPlayerDiveMeter(SWPlayer* pp); //--------------------------------------------------------------------------- // @@ -1212,10 +1212,10 @@ void RestorePortalState() // //--------------------------------------------------------------------------- -void drawscreen(PLAYER* pp, double interpfrac, bool sceneonly) +void drawscreen(SWPlayer* pp, double interpfrac, bool sceneonly) { // prediction player if prediction is on, else regular player - PLAYER* camerapp = (PredictionOn && CommEnabled && pp == Player+myconnectindex) ? ppp : pp; + SWPlayer* camerapp = (PredictionOn && CommEnabled && pp == Player+myconnectindex) ? ppp : pp; PreDraw(); PreUpdatePanel(interpfrac); diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index b7ebc2dff..dbebe6ec7 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -148,7 +148,7 @@ void markgcroots() } -void pClearSpriteList(PLAYER* pp); +void pClearSpriteList(SWPlayer* pp); int GameVersion = 20; @@ -573,7 +573,7 @@ void TerminateLevel(void) TRAVERSE_CONNECT(pnum) { - PLAYER* pp = &Player[pnum]; + SWPlayer* pp = &Player[pnum]; if (pp->Flags & PF_DEAD) PlayerDeathReset(pp); diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 9f454a4ab..3ec547739 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -327,7 +327,7 @@ enum dam // Forward declarations struct STATE; struct PANEL_STATE; -struct PLAYER; +struct SWPlayer; struct PERSONALITY; struct ATTRIBUTE; struct SECTOR_OBJECT; @@ -427,7 +427,7 @@ enum struct DAMAGE_DATA { - void (*Init)(PLAYER*); + void (*Init)(SWPlayer*); int16_t damage_lo; int16_t damage_hi; unsigned int radius; @@ -444,24 +444,24 @@ extern DAMAGE_DATA DamageData[]; extern int WeaponHasNoAmmo, WeaponIsAmmo; -void InitWeaponFist(PLAYER*); -void InitWeaponStar(PLAYER*); -void InitWeaponShotgun(PLAYER*); -void InitWeaponRocket(PLAYER*); -void InitWeaponRail(PLAYER*); -void InitWeaponMicro(PLAYER*); -void InitWeaponUzi(PLAYER*); -void InitWeaponSword(PLAYER*); -void InitWeaponHothead(PLAYER*); -void InitWeaponElectro(PLAYER*); -void InitWeaponHeart(PLAYER*); -void InitWeaponGrenade(PLAYER*); -void InitWeaponMine(PLAYER*); +void InitWeaponFist(SWPlayer*); +void InitWeaponStar(SWPlayer*); +void InitWeaponShotgun(SWPlayer*); +void InitWeaponRocket(SWPlayer*); +void InitWeaponRail(SWPlayer*); +void InitWeaponMicro(SWPlayer*); +void InitWeaponUzi(SWPlayer*); +void InitWeaponSword(SWPlayer*); +void InitWeaponHothead(SWPlayer*); +void InitWeaponElectro(SWPlayer*); +void InitWeaponHeart(SWPlayer*); +void InitWeaponGrenade(SWPlayer*); +void InitWeaponMine(SWPlayer*); -void InitWeaponNapalm(PLAYER*); -void InitWeaponRing(PLAYER*); +void InitWeaponNapalm(SWPlayer*); +void InitWeaponRing(SWPlayer*); -extern void (*InitWeapon[MAX_WEAPONS]) (PLAYER*); +extern void (*InitWeapon[MAX_WEAPONS]) (SWPlayer*); /////////////////////////////////////////////////////////////////////////////////////////// // @@ -525,7 +525,7 @@ enum PlayerDeathTypes PLAYER_DEATH_FLIP, PLAYER_DEATH_CRUMBLE, PLAYER_DEATH_EXPLODE, PLAYER_DEATH_RIPPER, PLAYER_DEATH_SQUISH, PLAYER_DEATH_DROWN, MAX_PLAYER_DEATHS }; -typedef void (*PLAYER_ACTION_FUNCp)(PLAYER*); +typedef void (*PLAYER_ACTION_FUNCp)(SWPlayer*); #include "inv.h" @@ -755,7 +755,7 @@ struct USER // if a player's sprite points to player structure - PLAYER* PlayerP; + SWPlayer* PlayerP; int16_t Sibling; @@ -1413,10 +1413,10 @@ enum short SoundAngle(int x, int y); //void PlaySound(int num, short angle, short vol); -int _PlaySound(FSoundID num, DSWActor* sprite, PLAYER* player, const DVector3 *const pos, int flags, int channel, EChanFlags sndflags); +int _PlaySound(FSoundID num, DSWActor* sprite, SWPlayer* player, const DVector3 *const pos, int flags, int channel, EChanFlags sndflags); void InitAmbient(int num, DSWActor* actor); -inline void PlaySound(int num, PLAYER* player, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) +inline void PlaySound(int num, SWPlayer* player, int flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) { _PlaySound(soundEngine->FindSoundByResID(num), nullptr, player, nullptr, flags | v3df_follow, channel, sndflags); } @@ -1429,20 +1429,20 @@ inline void PlaySound(int num, const DVector3 &pos, int flags, int channel = 8, _PlaySound(soundEngine->FindSoundByResID(num), nullptr, nullptr, &pos, flags, channel, sndflags); } -int _PlayerSound(int num, PLAYER* pp); -inline int PlayerSound(int num, int flags, PLAYER* pp) { return _PlayerSound(num, pp); } -void StopPlayerSound(PLAYER* pp, int which = -1); +int _PlayerSound(int num, SWPlayer* pp); +inline int PlayerSound(int num, int flags, SWPlayer* pp) { return _PlayerSound(num, pp); } +void StopPlayerSound(SWPlayer* pp, int which = -1); bool SoundValidAndActive(DSWActor* spr, int channel); struct BREAK_INFO; int SpawnShrap(DSWActor*, DSWActor*, int = -1, BREAK_INFO* breakinfo = nullptr); -void PlayerUpdateHealth(PLAYER* pp, short value); -void PlayerUpdateAmmo(PLAYER* pp, short WeaponNum, short value); -void PlayerUpdateWeapon(PLAYER* pp, short WeaponNum); -void PlayerUpdateKills(PLAYER* pp, short value); -void RefreshInfoLine(PLAYER* pp); +void PlayerUpdateHealth(SWPlayer* pp, short value); +void PlayerUpdateAmmo(SWPlayer* pp, short WeaponNum, short value); +void PlayerUpdateWeapon(SWPlayer* pp, short WeaponNum); +void PlayerUpdateKills(SWPlayer* pp, short value); +void RefreshInfoLine(SWPlayer* pp); void DoAnim(int numtics); void AnimDelete(int animtype, int animindex, DSWActor*); @@ -1571,8 +1571,8 @@ extern int16_t StatDamageList[STAT_DAMAGE_LIST_SIZE]; // /////////////////////////////////////////////////////////////// -extern void SetFadeAmt(PLAYER* pp, short damage, uint8_t startcolor); -extern void DoPaletteFlash(PLAYER* pp); +extern void SetFadeAmt(SWPlayer* pp, short damage, uint8_t startcolor); +extern void DoPaletteFlash(SWPlayer* pp); extern bool NightVision; @@ -1608,9 +1608,9 @@ void InitSetup(void); // setup.c void LoadKVXFromScript(TilesetBuildInfo& info, const char *filename); // scrip2.c void LoadCustomInfoFromScript(const char *filename); // scrip2.c -int PlayerInitChemBomb(PLAYER* pp); // jweapon.c -int PlayerInitFlashBomb(PLAYER* pp); // jweapon.c -int PlayerInitCaltrops(PLAYER* pp); // jweapon.c +int PlayerInitChemBomb(SWPlayer* pp); // jweapon.c +int PlayerInitFlashBomb(SWPlayer* pp); // jweapon.c +int PlayerInitCaltrops(SWPlayer* pp); // jweapon.c int InitPhosphorus(DSWActor*); // jweapon.c void SpawnFloorSplash(DSWActor*); // jweapon.c @@ -1676,7 +1676,7 @@ END_SW_NS BEGIN_SW_NS -struct PLAYER +struct SWPlayer { DSWActor* actor; // this may not be a TObjPtr! TObjPtr lowActor, highActor; @@ -1861,7 +1861,7 @@ struct PLAYER } }; -extern PLAYER Player[MAX_SW_PLAYERS_REG+1]; +extern SWPlayer Player[MAX_SW_PLAYERS_REG+1]; struct GameInterface : public ::GameInterface @@ -1923,7 +1923,7 @@ inline bool SectorIsUnderwaterArea(sectortype* sect) return sect && sect->extra & (SECTFX_UNDERWATER | SECTFX_UNDERWATER2); } -inline bool PlayerFacingRange(PLAYER* pp, DSWActor* a, DAngle range) +inline bool PlayerFacingRange(SWPlayer* pp, DSWActor* a, DAngle range) { return absangle((a->spr.pos.XY() - pp->GetActor()->spr.pos.XY()).Angle(), pp->GetActor()->spr.Angles.Yaw) < range; } @@ -2078,7 +2078,7 @@ inline bool SpriteInUnderwaterArea(DSWActor* a) // just determine if the player is moving -inline bool PLAYER_MOVING(PLAYER* pp) +inline bool PLAYER_MOVING(SWPlayer* pp) { return !pp->vect.isZero(); } diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index 00f2ffaef..3341f6b58 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -551,7 +551,7 @@ int DoHornetDeath(DSWActor* actor) int DoCheckSwarm(DSWActor* actor) { double dist, pdist; - PLAYER* pp; + SWPlayer* pp; if (!MoveSkip8) return 0; // Don't over check diff --git a/source/games/sw/src/input.cpp b/source/games/sw/src/input.cpp index 87fe00c24..67560de45 100644 --- a/source/games/sw/src/input.cpp +++ b/source/games/sw/src/input.cpp @@ -70,7 +70,7 @@ enum // //--------------------------------------------------------------------------- -void processWeapon(PLAYER* const pp) +void processWeapon(SWPlayer* const pp) { DSWActor* plActor = pp->GetActor(); if (plActor == nullptr) return; diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 961f9ee92..56c29fdb5 100644 --- a/source/games/sw/src/inv.cpp +++ b/source/games/sw/src/inv.cpp @@ -44,28 +44,28 @@ BEGIN_SW_NS extern short NormalVisibility; -void PlayerUpdateInventory(PLAYER* pp, short InventoryNum); -void InventoryUse(PLAYER* pp); -void InventoryStop(PLAYER* pp, short InventoryNum); +void PlayerUpdateInventory(SWPlayer* pp, short InventoryNum); +void InventoryUse(SWPlayer* pp); +void InventoryStop(SWPlayer* pp, short InventoryNum); -void UseInventoryRepairKit(PLAYER* pp); -void UseInventoryMedkit(PLAYER* pp); -void UseInventoryRepairKit(PLAYER* pp); -void UseInventoryCloak(PLAYER* pp); -void UseInventoryEnvironSuit(PLAYER* pp); -void UseInventoryNightVision(PLAYER* pp); -void UseInventoryChemBomb(PLAYER* pp); -void UseInventoryFlashBomb(PLAYER* pp); -void UseInventoryCaltrops(PLAYER* pp); +void UseInventoryRepairKit(SWPlayer* pp); +void UseInventoryMedkit(SWPlayer* pp); +void UseInventoryRepairKit(SWPlayer* pp); +void UseInventoryCloak(SWPlayer* pp); +void UseInventoryEnvironSuit(SWPlayer* pp); +void UseInventoryNightVision(SWPlayer* pp); +void UseInventoryChemBomb(SWPlayer* pp); +void UseInventoryFlashBomb(SWPlayer* pp); +void UseInventoryCaltrops(SWPlayer* pp); -void StopInventoryRepairKit(PLAYER* pp, short); -void StopInventoryMedkit(PLAYER* pp, short); -void StopInventoryRepairKit(PLAYER* pp, short); -void StopInventoryCloak(PLAYER* pp, short); -void StopInventoryEnvironSuit(PLAYER* pp, short); -void StopInventoryNightVision(PLAYER* pp, short); +void StopInventoryRepairKit(SWPlayer* pp, short); +void StopInventoryMedkit(SWPlayer* pp, short); +void StopInventoryRepairKit(SWPlayer* pp, short); +void StopInventoryCloak(SWPlayer* pp, short); +void StopInventoryEnvironSuit(SWPlayer* pp, short); +void StopInventoryNightVision(SWPlayer* pp, short); extern PANEL_STATE ps_PanelEnvironSuit[]; @@ -96,14 +96,14 @@ void PanelInvTestSuicide(PANEL_SPRITE* psp) } } -void KillPanelInv(PLAYER* pp, short InventoryNum) +void KillPanelInv(SWPlayer* pp, short InventoryNum) { ASSERT(InventoryNum < MAX_INVENTORY); pp->InventoryTics[InventoryNum] = 0; } -void KillAllPanelInv(PLAYER* pp) +void KillAllPanelInv(SWPlayer* pp) { for (int i = 0; i < MAX_INVENTORY; i++) { @@ -117,7 +117,7 @@ void KillAllPanelInv(PLAYER* pp) // ////////////////////////////////////////////////////////////////////// -void AutoPickInventory(PLAYER* pp) +void AutoPickInventory(SWPlayer* pp) { int i; @@ -149,7 +149,7 @@ void AutoPickInventory(PLAYER* pp) // //--------------------------------------------------------------------------- -void UseInventoryMedkit(PLAYER* pp) +void UseInventoryMedkit(SWPlayer* pp) { short diff; short inv = INVENTORY_MEDKIT; @@ -196,7 +196,7 @@ void UseInventoryMedkit(PLAYER* pp) // CHEMICAL WARFARE CANISTERS // ////////////////////////////////////////////////////////////////////// -void UseInventoryChemBomb(PLAYER* pp) +void UseInventoryChemBomb(SWPlayer* pp) { short inv = INVENTORY_CHEMBOMB; @@ -219,7 +219,7 @@ void UseInventoryChemBomb(PLAYER* pp) // FLASH BOMBS // ////////////////////////////////////////////////////////////////////// -void UseInventoryFlashBomb(PLAYER* pp) +void UseInventoryFlashBomb(SWPlayer* pp) { short inv = INVENTORY_FLASHBOMB; @@ -242,7 +242,7 @@ void UseInventoryFlashBomb(PLAYER* pp) // CALTROPS // ////////////////////////////////////////////////////////////////////// -void UseInventoryCaltrops(PLAYER* pp) +void UseInventoryCaltrops(SWPlayer* pp) { short inv = INVENTORY_CALTROPS; @@ -266,7 +266,7 @@ void UseInventoryCaltrops(PLAYER* pp) // ////////////////////////////////////////////////////////////////////// -void UseInventoryRepairKit(PLAYER* pp) +void UseInventoryRepairKit(SWPlayer* pp) { short inv = INVENTORY_REPAIR_KIT; @@ -294,7 +294,7 @@ void UseInventoryRepairKit(PLAYER* pp) // ////////////////////////////////////////////////////////////////////// -void UseInventoryCloak(PLAYER* pp) +void UseInventoryCloak(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -319,7 +319,7 @@ void UseInventoryCloak(PLAYER* pp) PlayerSound(DIGI_IAMSHADOW, v3df_follow|v3df_dontpan,pp); } -void StopInventoryCloak(PLAYER* pp, short InventoryNum) +void StopInventoryCloak(SWPlayer* pp, short InventoryNum) { DSWActor* plActor = pp->GetActor(); @@ -347,7 +347,7 @@ void StopInventoryCloak(PLAYER* pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// -void DoPlayerNightVisionPalette(PLAYER* pp) +void DoPlayerNightVisionPalette(SWPlayer* pp) { if (pp != Player + screenpeek) return; @@ -370,7 +370,7 @@ void DoPlayerNightVisionPalette(PLAYER* pp) } } -void UseInventoryNightVision(PLAYER* pp) +void UseInventoryNightVision(SWPlayer* pp) { if (pp->InventoryActive[pp->InventoryNum]) { @@ -387,7 +387,7 @@ void UseInventoryNightVision(PLAYER* pp) PlaySound(DIGI_NIGHTON, pp, v3df_dontpan|v3df_follow); } -void StopInventoryNightVision(PLAYER* pp, short InventoryNum) +void StopInventoryNightVision(SWPlayer* pp, short InventoryNum) { pp->InventoryActive[InventoryNum] = false; @@ -414,7 +414,7 @@ void StopInventoryNightVision(PLAYER* pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// -void InventoryKeys(PLAYER* pp) +void InventoryKeys(SWPlayer* pp) { // scroll SPELLs left if (pp->input.actions & SB_INVPREV) @@ -507,7 +507,7 @@ void InventoryKeys(PLAYER* pp) // //--------------------------------------------------------------------------- -void InventoryTimer(PLAYER* pp) +void InventoryTimer(SWPlayer* pp) { // called every time through loop short inv = 0; @@ -591,7 +591,7 @@ void InventoryTimer(PLAYER* pp) // //--------------------------------------------------------------------------- -void InventoryUse(PLAYER* pp) +void InventoryUse(SWPlayer* pp) { INVENTORY_DATA* id = &InventoryData[pp->InventoryNum]; @@ -599,7 +599,7 @@ void InventoryUse(PLAYER* pp) (*id->Init)(pp); } -void InventoryStop(PLAYER* pp, short InventoryNum) +void InventoryStop(SWPlayer* pp, short InventoryNum) { INVENTORY_DATA* id = &InventoryData[InventoryNum]; @@ -613,7 +613,7 @@ void InventoryStop(PLAYER* pp, short InventoryNum) // ///////////////////////////////////////////////////////////////// -void PlayerUpdateInventory(PLAYER* pp, short InventoryNum) +void PlayerUpdateInventory(SWPlayer* pp, short InventoryNum) { pp->InventoryNum = InventoryNum; diff --git a/source/games/sw/src/inv.h b/source/games/sw/src/inv.h index 5a4cdc0cf..1fe0e477f 100644 --- a/source/games/sw/src/inv.h +++ b/source/games/sw/src/inv.h @@ -39,8 +39,8 @@ enum InventoryNames struct INVENTORY_DATA { const char* Name; - void (*Init)(PLAYER*); - void (*Stop)(PLAYER*, short); + void (*Init)(SWPlayer*); + void (*Stop)(SWPlayer*, short); short DecPerSec; short MaxInv; int Scale; @@ -56,7 +56,7 @@ enum EInvFlags INVF_COUNT = 4 }; -void PlayerUpdateInventory(PLAYER* pp, short InventoryNum); -void InventoryKeys(PLAYER* pp); -void UseInventoryRepairKit(PLAYER* pp); -void InventoryTimer(PLAYER* pp); +void PlayerUpdateInventory(SWPlayer* pp, short InventoryNum); +void InventoryKeys(SWPlayer* pp); +void UseInventoryRepairKit(SWPlayer* pp); +void InventoryTimer(SWPlayer* pp); diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 8bb21c87c..aff969786 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -376,7 +376,7 @@ void drawroomstotile(const DVector3& pos, DAngle ang, DAngle horiz, sectortype* void JS_ProcessEchoSpot() { - PLAYER* pp = Player+screenpeek; + SWPlayer* pp = Player+screenpeek; int16_t reverb; bool reverb_set = false; @@ -417,7 +417,7 @@ short camplayerview = 1; // Don't show yourself! // Hack job alert! // Mirrors and cameras are maintained in the same data structure, but for hardware rendering they cannot be interleaved. // So this function replicates JS_DrawMirrors to only process the camera textures but not change any global state. -void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio) +void JS_DrawCameras(SWPlayer* pp, const DVector3& campos, double smoothratio) { int cnt; double dist; @@ -557,7 +557,7 @@ void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio) { if (dist < MAXCAMDIST) { - PLAYER* cp = Player + camplayerview; + SWPlayer* cp = Player + camplayerview; if (TEST_BOOL11(camactor) && numplayers > 1) { @@ -577,11 +577,11 @@ void JS_DrawCameras(PLAYER* pp, const DVector3& campos, double smoothratio) // Workaround until the camera code can be refactored to process all camera textures that were visible last frame. // Need to stash the parameters for later use. This is only used to find the nearest camera. -static PLAYER* cam_pp; +static SWPlayer* cam_pp; DVector3 cam_pos; static int oldstat; -void JS_CameraParms(PLAYER* pp, const DVector3& tpos) +void JS_CameraParms(SWPlayer* pp, const DVector3& tpos) { cam_pp = pp; cam_pos = tpos; diff --git a/source/games/sw/src/jsector.h b/source/games/sw/src/jsector.h index 5c778b12c..1cb529aef 100644 --- a/source/games/sw/src/jsector.h +++ b/source/games/sw/src/jsector.h @@ -64,7 +64,7 @@ extern bool mirrorinview; extern short NormalVisibility; void JAnalyzeSprites(tspritetype* tspr); -void JS_CameraParms(PLAYER* pp, const DVector3& tpos); +void JS_CameraParms(SWPlayer* pp, const DVector3& tpos); void JS_InitMirrors(void); void JS_ProcessEchoSpot(void); void JS_SpriteSetup(void); diff --git a/source/games/sw/src/jweapon.cpp b/source/games/sw/src/jweapon.cpp index f9d4cbc00..c7d0ac8b0 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1231,7 +1231,7 @@ int DoRadiationCloud(DSWActor* actor) // Inventory Chemical Bombs // ////////////////////////////////////////////// -int PlayerInitChemBomb(PLAYER* pp) +int PlayerInitChemBomb(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -1398,7 +1398,7 @@ int InitChemBomb(DSWActor* actor) // //--------------------------------------------------------------------------- -int PlayerInitFlashBomb(PLAYER* pp) +int PlayerInitFlashBomb(SWPlayer* pp) { unsigned int stat; @@ -1473,7 +1473,7 @@ int InitFlashBomb(DSWActor* actor) int i; unsigned int stat; short damage; - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler); @@ -1605,7 +1605,7 @@ void SpawnFlashBombOnActor(DSWActor* actor) // //--------------------------------------------------------------------------- -int PlayerInitCaltrops(PLAYER* pp) +int PlayerInitCaltrops(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); diff --git a/source/games/sw/src/mclip.cpp b/source/games/sw/src/mclip.cpp index d152134e7..627fe4f64 100644 --- a/source/games/sw/src/mclip.cpp +++ b/source/games/sw/src/mclip.cpp @@ -43,7 +43,7 @@ BEGIN_SW_NS // //--------------------------------------------------------------------------- -Collision MultiClipMove(PLAYER* pp, double zz, double floordist) +Collision MultiClipMove(SWPlayer* pp, double zz, double floordist) { int i; DVector3 opos[MAX_CLIPBOX], pos[MAX_CLIPBOX]; @@ -122,7 +122,7 @@ Collision MultiClipMove(PLAYER* pp, double zz, double floordist) // //--------------------------------------------------------------------------- -int MultiClipTurn(PLAYER* pp, DAngle new_ang, double zz, double floordist) +int MultiClipTurn(SWPlayer* pp, DAngle new_ang, double zz, double floordist) { int i; SECTOR_OBJECT* sop = pp->sop; @@ -192,7 +192,7 @@ int testquadinsect(int *point_num, DVector2 const * qp, sectortype* sect) // //--------------------------------------------------------------------------- -int RectClipMove(PLAYER* pp, DVector2* qpos) +int RectClipMove(SWPlayer* pp, DVector2* qpos) { int i; DVector2 xy[4]; @@ -253,7 +253,7 @@ int RectClipMove(PLAYER* pp, DVector2* qpos) // //--------------------------------------------------------------------------- -short RectClipTurn(PLAYER* pp, DAngle new_angl, DVector2* qpos, DVector2* opos) +short RectClipTurn(SWPlayer* pp, DAngle new_angl, DVector2* qpos, DVector2* opos) { int i; DVector2 xy[4]; diff --git a/source/games/sw/src/mclip.h b/source/games/sw/src/mclip.h index b6cbe194e..18e895302 100644 --- a/source/games/sw/src/mclip.h +++ b/source/games/sw/src/mclip.h @@ -27,9 +27,9 @@ BEGIN_SW_NS #define RECT_CLIP 1 -Collision MultiClipMove(PLAYER* pp, double z, double floor_dist); -int MultiClipTurn(PLAYER* pp, DAngle new_ang, double zz, double floordist); -int RectClipMove(PLAYER* pp, DVector2* qpos); +Collision MultiClipMove(SWPlayer* pp, double z, double floor_dist); +int MultiClipTurn(SWPlayer* pp, DAngle new_ang, double zz, double floordist); +int RectClipMove(SWPlayer* pp, DVector2* qpos); //short RectClipTurn(PLAYER* pp, short new_ang, int z, int floor_dist, int *qx, int *qy); -short RectClipTurn(PLAYER* pp, short new_ang, int *qx, int *qy, int *ox, int *oy); +short RectClipTurn(SWPlayer* pp, short new_ang, int *qx, int *qy, int *ox, int *oy); END_SW_NS diff --git a/source/games/sw/src/menus.cpp b/source/games/sw/src/menus.cpp index 21ef62205..6e9846529 100644 --- a/source/games/sw/src/menus.cpp +++ b/source/games/sw/src/menus.cpp @@ -80,7 +80,7 @@ static int faderamp[32] = // Set the amount of redness for damage // the player just took ////////////////////////////////////////// -void SetFadeAmt(PLAYER* pp, short damage, uint8_t startcolor) +void SetFadeAmt(SWPlayer* pp, short damage, uint8_t startcolor) { const int FADE_DAMAGE_FACTOR = 3; // 100 health / 32 shade cycles = 3.125 @@ -143,7 +143,7 @@ void SetFadeAmt(PLAYER* pp, short damage, uint8_t startcolor) ////////////////////////////////////////// // Do the screen reddness based on damage ////////////////////////////////////////// -void DoPaletteFlash(PLAYER* pp) +void DoPaletteFlash(SWPlayer* pp) { const int MAXFADETICS = 5; diff --git a/source/games/sw/src/misc.h b/source/games/sw/src/misc.h index 5346eaf2d..01407fa43 100644 --- a/source/games/sw/src/misc.h +++ b/source/games/sw/src/misc.h @@ -25,7 +25,7 @@ DSWActor* WarpPlane(DVector3& pos, sectortype** sect, double testz = DBL_MAX); void ProcessVisOn(void); -void VisViewChange(PLAYER* pp, int* vis); +void VisViewChange(SWPlayer* pp, int* vis); void SpawnVis(DSWActor* Parent, sectortype* sect, const DVector3& pos, int amt); enum TriggerType { TRIGGER_TYPE_REMOTE_SO }; @@ -53,10 +53,10 @@ int DoActorFall(DSWActor* actor); #define TEXT_INFO_YOFF (10) inline constexpr int TEXT_INFO_LINE(int line) { return (TEXT_INFO_Y + ((line)*TEXT_INFO_YOFF)); } -void PutStringInfo(PLAYER* pp, const char* string); +void PutStringInfo(SWPlayer* pp, const char* string); -void DoSlidorMatch(PLAYER* pp, short match, bool); +void DoSlidorMatch(SWPlayer* pp, short match, bool); bool TestSlidorMatchActive(short match); void InterpSectorSprites(sectortype* sect, bool state); @@ -75,21 +75,21 @@ int DoActorSectorDamage(DSWActor* actor); int DoScaleSprite(DSWActor* actor); int DoActorStopFall(DSWActor* actor); -void InitPlayerSprite(PLAYER* pp, const DVector3& spawnpos, const DAngle startang); +void InitPlayerSprite(SWPlayer* pp, const DVector3& spawnpos, const DAngle startang); void InitAllPlayerSprites(const DVector3& spawnpos, const DAngle startang); void PlayerPanelSetup(void); -void PlayerDeathReset(PLAYER* pp); -void SpawnPlayerUnderSprite(PLAYER* pp); +void PlayerDeathReset(SWPlayer* pp); +void SpawnPlayerUnderSprite(SWPlayer* pp); void DoQuakeMatch(short match); void ProcessQuakeOn(void); void ProcessQuakeSpot(void); -void QuakeViewChange(PLAYER* pp, DVector3& tpos, DAngle& tang); -void DoQuake(PLAYER* pp); -bool SetQuake(PLAYER* pp, short tics, short amt); +void QuakeViewChange(SWPlayer* pp, DVector3& tpos, DAngle& tang); +void DoQuake(SWPlayer* pp); +bool SetQuake(SWPlayer* pp, short tics, short amt); int SetExpQuake(DSWActor*); int SetGunQuake(DSWActor*); -int SetPlayerQuake(PLAYER* mpp); +int SetPlayerQuake(SWPlayer* mpp); int SetNuclearQuake(DSWActor*); int SetSumoQuake(DSWActor*); int SetSumoFartQuake(DSWActor*); diff --git a/source/games/sw/src/network.cpp b/source/games/sw/src/network.cpp index a8e7db448..66dbacd23 100644 --- a/source/games/sw/src/network.cpp +++ b/source/games/sw/src/network.cpp @@ -60,7 +60,7 @@ uint8_t CommPlayers = 0; void InitNetPlayerOptions(void) { // short pnum; - PLAYER* pp = Player + myconnectindex; + SWPlayer* pp = Player + myconnectindex; strncpy(pp->PlayerName, playername, 31); diff --git a/source/games/sw/src/network.h b/source/games/sw/src/network.h index 55f4aa91e..751ee8a07 100644 --- a/source/games/sw/src/network.h +++ b/source/games/sw/src/network.h @@ -32,14 +32,14 @@ enum MAXSYNCBYTES = 16 }; extern bool PredictionOn; -extern PLAYER PredictPlayer; -extern PLAYER* ppp; +extern SWPlayer PredictPlayer; +extern SWPlayer* ppp; extern short predictangpos[]; extern int predictmovefifoplc; extern bool Prediction; -void InitPrediction(PLAYER* pp); -void DoPrediction(PLAYER* ppp); +void InitPrediction(SWPlayer* pp); +void DoPrediction(SWPlayer* ppp); void CorrectPrediction(int actualfifoplc); diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 18cd71d47..d367c5bf0 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2120,7 +2120,7 @@ void InitAllPlayerSprites(const DVector3& spawnpos, const DAngle startang) // //--------------------------------------------------------------------------- -void PlayerLevelReset(PLAYER* pp) +void PlayerLevelReset(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -2163,7 +2163,7 @@ void PlayerLevelReset(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerDeathReset(PLAYER* pp) +void PlayerDeathReset(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -2255,7 +2255,7 @@ void PlayerPanelSetup(void) // //--------------------------------------------------------------------------- -void PlayerGameReset(PLAYER* pp) +void PlayerGameReset(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -2319,7 +2319,7 @@ extern ACTOR_ACTION_SET PlayerNinjaActionSet; // //--------------------------------------------------------------------------- -void InitPlayerSprite(PLAYER* pp, const DVector3& spawnpos, const DAngle startang) +void InitPlayerSprite(SWPlayer* pp, const DVector3& spawnpos, const DAngle startang) { int pnum = int(pp - Player); double fz,cz; @@ -2404,7 +2404,7 @@ void InitPlayerSprite(PLAYER* pp, const DVector3& spawnpos, const DAngle startan // //--------------------------------------------------------------------------- -void SpawnPlayerUnderSprite(PLAYER* pp) +void SpawnPlayerUnderSprite(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); diff --git a/source/games/sw/src/osdcmds.cpp b/source/games/sw/src/osdcmds.cpp index 5d0e0d00a..14e289698 100644 --- a/source/games/sw/src/osdcmds.cpp +++ b/source/games/sw/src/osdcmds.cpp @@ -131,7 +131,7 @@ void GameInterface::SwitchCoopView() } else { - PLAYER* tp = Player + screenpeek; + SWPlayer* tp = Player + screenpeek; DoPlayerDivePalette(tp); DoPlayerNightVisionPalette(tp); } diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index a02840236..c39662058 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -46,17 +46,17 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -int InitSwordAttack(PLAYER* pp); +int InitSwordAttack(SWPlayer* pp); PANEL_SPRITE* InitWeaponUziSecondaryReload(PANEL_SPRITE*); PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE*); -int InitShotgun(PLAYER* pp); -int InitRail(PLAYER* pp); -int InitMicro(PLAYER* pp); -int InitRocket(PLAYER* pp); -int InitNuke(PLAYER* pp); -int InitGrenade(PLAYER* pp); -int InitMine(PLAYER* pp); -int InitFistAttack(PLAYER* pp); +int InitShotgun(SWPlayer* pp); +int InitRail(SWPlayer* pp); +int InitMicro(SWPlayer* pp); +int InitRocket(SWPlayer* pp); +int InitNuke(SWPlayer* pp); +int InitGrenade(SWPlayer* pp); +int InitMine(SWPlayer* pp); +int InitFistAttack(SWPlayer* pp); struct PANEL_SHRAP { @@ -67,7 +67,7 @@ struct PANEL_SHRAP void PanelInvTestSuicide(PANEL_SPRITE* psp); -void InsertPanelSprite(PLAYER* pp, PANEL_SPRITE* psp); +void InsertPanelSprite(SWPlayer* pp, PANEL_SPRITE* psp); void pKillSprite(PANEL_SPRITE* psp); void pWeaponBob(PANEL_SPRITE* psp, short condition); void pSuicide(PANEL_SPRITE* psp); @@ -92,8 +92,8 @@ uint8_t UziRecoilYadj = 0; extern short screenpeek; pANIMATOR pNullAnimator; -int InitStar(PLAYER*); -int ChangeWeapon(PLAYER*); +int InitStar(SWPlayer*); +int ChangeWeapon(SWPlayer*); int NullAnimator(DSWActor*) { @@ -117,7 +117,7 @@ inline int pspheight(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -PANEL_SPRITE* pFindMatchingSprite(PLAYER* pp, int x, int y, short pri) +PANEL_SPRITE* pFindMatchingSprite(SWPlayer* pp, int x, int y, short pri) { PANEL_SPRITE* next; @@ -143,7 +143,7 @@ PANEL_SPRITE* pFindMatchingSprite(PLAYER* pp, int x, int y, short pri) // //--------------------------------------------------------------------------- -PANEL_SPRITE* pFindMatchingSpriteID(PLAYER* pp, short id, int x, int y, short pri) +PANEL_SPRITE* pFindMatchingSpriteID(SWPlayer* pp, short id, int x, int y, short pri) { PANEL_SPRITE* next; @@ -169,7 +169,7 @@ PANEL_SPRITE* pFindMatchingSpriteID(PLAYER* pp, short id, int x, int y, short pr // //--------------------------------------------------------------------------- -bool pKillScreenSpiteIDs(PLAYER* pp, short id) +bool pKillScreenSpiteIDs(SWPlayer* pp, short id) { PANEL_SPRITE* next; bool found = false; @@ -213,7 +213,7 @@ void pToggleCrosshair(void) // //--------------------------------------------------------------------------- -void DoPlayerChooseYell(PLAYER* pp) +void DoPlayerChooseYell(SWPlayer* pp) { int choose_snd = 0; @@ -257,7 +257,7 @@ void ArmorCalc(int damage_amt, int *armor_damage, int *player_damage) // //--------------------------------------------------------------------------- -void PlayerUpdateHealth(PLAYER* pp, short value) +void PlayerUpdateHealth(SWPlayer* pp, short value) { DSWActor* plActor = pp->GetActor(); short x,y; @@ -367,7 +367,7 @@ void PlayerUpdateHealth(PLAYER* pp, short value) // //--------------------------------------------------------------------------- -void PlayerUpdateAmmo(PLAYER* pp, short UpdateWeaponNum, short value) +void PlayerUpdateAmmo(SWPlayer* pp, short UpdateWeaponNum, short value) { short x,y; short WeaponNum; @@ -411,7 +411,7 @@ void PlayerUpdateAmmo(PLAYER* pp, short UpdateWeaponNum, short value) // //--------------------------------------------------------------------------- -void PlayerUpdateWeapon(PLAYER* pp, short WeaponNum) +void PlayerUpdateWeapon(SWPlayer* pp, short WeaponNum) { DSWActor* plActor = pp->GetActor(); @@ -428,7 +428,7 @@ void PlayerUpdateWeapon(PLAYER* pp, short WeaponNum) // //--------------------------------------------------------------------------- -void PlayerUpdateKills(PLAYER* pp, short value) +void PlayerUpdateKills(SWPlayer* pp, short value) { if (Prediction) return; @@ -440,7 +440,7 @@ void PlayerUpdateKills(PLAYER* pp, short value) if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.TeamPlay) { short pnum; - PLAYER* opp; + SWPlayer* opp; TRAVERSE_CONNECT(pnum) { @@ -463,7 +463,7 @@ void PlayerUpdateKills(PLAYER* pp, short value) // //--------------------------------------------------------------------------- -void PlayerUpdateArmor(PLAYER* pp, short value) +void PlayerUpdateArmor(SWPlayer* pp, short value) { if (Prediction) return; @@ -486,7 +486,7 @@ void PlayerUpdateArmor(PLAYER* pp, short value) // //--------------------------------------------------------------------------- -int WeaponOperate(PLAYER* pp) +int WeaponOperate(SWPlayer* pp) { short weapon; DSWActor* plActor = pp->GetActor(); @@ -710,7 +710,7 @@ int WeaponOperate(PLAYER* pp) // //--------------------------------------------------------------------------- -bool WeaponOK(PLAYER* pp) +bool WeaponOK(SWPlayer* pp) { short min_ammo, WeaponNum, FindWeaponNum; static const uint8_t wpn_order[] = {2,3,4,5,6,7,8,9,1,0}; @@ -990,7 +990,7 @@ void SpecialUziRetractFunc(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void RetractCurWpn(PLAYER* pp) +void RetractCurWpn(SWPlayer* pp) { // Retract old weapon if (pp->CurWpn) @@ -1033,7 +1033,7 @@ void RetractCurWpn(PLAYER* pp) // //--------------------------------------------------------------------------- -void InitWeaponSword(PLAYER* pp) +void InitWeaponSword(SWPlayer* pp) { PANEL_SPRITE* psp; short rnd_num; @@ -1485,7 +1485,7 @@ void pStarRestTest(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void InitWeaponStar(PLAYER* pp) +void InitWeaponStar(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr; @@ -2093,7 +2093,7 @@ void pUziReloadRetract(PANEL_SPRITE* nclip) void pUziDoneReload(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; if (psp->flags & (PANF_PRIMARY) && pp->WpnUziType == 3) @@ -2180,7 +2180,7 @@ void pUziClip(PANEL_SPRITE* oclip) // //--------------------------------------------------------------------------- -void InitWeaponUzi(PLAYER* pp) +void InitWeaponUzi(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr; @@ -2269,7 +2269,7 @@ void InitWeaponUzi(PLAYER* pp) PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE* uzi_orig) { PANEL_SPRITE* New; - PLAYER* pp = uzi_orig->PlayerP; + SWPlayer* pp = uzi_orig->PlayerP; // There is already a second uzi, or it's retracting @@ -2310,7 +2310,7 @@ PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE* uzi_orig) PANEL_SPRITE* InitWeaponUziSecondaryReload(PANEL_SPRITE* uzi_orig) { PANEL_SPRITE* New; - PLAYER* pp = uzi_orig->PlayerP; + SWPlayer* pp = uzi_orig->PlayerP; New = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF); New->pos.Y += pspheight(New); @@ -2567,7 +2567,7 @@ void pUziAction(PANEL_SPRITE* psp) void pUziFire(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; if (!WeaponOK(psp->PlayerP)) return; @@ -2698,7 +2698,7 @@ PANEL_STATE ps_Uzi2Shell[] = void SpawnUziShell(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; if (psp->State && (psp->State->flags & psf_Xflip)) { @@ -2773,7 +2773,7 @@ PANEL_STATE ps_ShotgunShell[] = void SpawnShotgunShell(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; SpawnShell(pp->GetActor(),-4); } @@ -2920,7 +2920,7 @@ PANEL_STATE ps_RetractShotgun[] = // //--------------------------------------------------------------------------- -void InitWeaponShotgun(PLAYER* pp) +void InitWeaponShotgun(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr; @@ -3468,7 +3468,7 @@ PANEL_STATE ps_RetractRail[] = // //--------------------------------------------------------------------------- -void InitWeaponRail(PLAYER* pp) +void InitWeaponRail(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr; @@ -3971,7 +3971,7 @@ void pHotHeadOverlays(PANEL_SPRITE* psp, short mode) #define HOTHEAD_XOFF (200 + HOTHEAD_BOB_X_AMT + 6) #define HOTHEAD_YOFF 200 -void InitWeaponHothead(PLAYER* pp) +void InitWeaponHothead(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr; @@ -4272,7 +4272,7 @@ PANEL_STATE ps_OnFire[] = // //--------------------------------------------------------------------------- -void SpawnOnFire(PLAYER* pp) +void SpawnOnFire(SWPlayer* pp) { PANEL_SPRITE* fire; int x = 50; @@ -4451,7 +4451,7 @@ void pMicroSetRecoil(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void InitWeaponMicro(PLAYER* pp) +void InitWeaponMicro(SWPlayer* pp) { PANEL_SPRITE* psp; @@ -4565,7 +4565,7 @@ void pMicroRecoilUp(PANEL_SPRITE* psp) void pMicroPresent(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT)) return; @@ -4743,7 +4743,7 @@ PANEL_STATE ps_MicroNukeFlash[] = void pMicroRest(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; bool force = !!(psp->flags & PANF_UNHIDE_SHOOT); if (pWeaponHideKeys(psp, ps_MicroHide)) @@ -4877,7 +4877,7 @@ void pMicroRetract(PANEL_SPRITE* psp) void pNukeAction(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; #if 0 // Code commented out as it's causing interpolation issues when initialising a nuke. psp->backupy(); @@ -4904,7 +4904,7 @@ void pNukeAction(PANEL_SPRITE* psp) void pMicroStandBy(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; pMicroOverlays(psp); PlaySound(DIGI_NUKESTDBY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); @@ -4912,14 +4912,14 @@ void pMicroStandBy(PANEL_SPRITE* psp) void pMicroCount(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; PlaySound(DIGI_NUKECDOWN, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); } void pMicroReady(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; PlaySound(DIGI_NUKEREADY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); pp->NukeInitialized = true; @@ -4997,7 +4997,7 @@ PANEL_STATE ps_RetractHeart[] = // //--------------------------------------------------------------------------- -void InitWeaponHeart(PLAYER* pp) +void InitWeaponHeart(SWPlayer* pp) { PANEL_SPRITE* psp; @@ -5188,7 +5188,7 @@ void pHeartActionBlood(PANEL_SPRITE* psp) SpawnHeartBlood(psp); } -void InitHeartAttack(PLAYER* pp); +void InitHeartAttack(SWPlayer* pp); //--------------------------------------------------------------------------- // @@ -5198,7 +5198,7 @@ void InitHeartAttack(PLAYER* pp); void pHeartAttack(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; // CTW MODIFICATION //int InitHeartAttack(PLAYER* pp); // CTW MODIFICATION END @@ -5270,7 +5270,7 @@ PANEL_STATE ps_HeartBloodSmall[] = void SpawnHeartBlood(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; PANEL_SPRITE* blood; PANEL_SHRAP* hsp; @@ -5315,7 +5315,7 @@ void SpawnHeartBlood(PANEL_SPRITE* psp) void SpawnSmallHeartBlood(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; PANEL_SPRITE* blood; PANEL_SHRAP* hsp; @@ -5553,7 +5553,7 @@ void pGrenadePresentSetup(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void InitWeaponGrenade(PLAYER* pp) +void InitWeaponGrenade(SWPlayer* pp) { PANEL_SPRITE* psp; @@ -5857,7 +5857,7 @@ PANEL_STATE ps_RetractMine[] = //#define MINE_XOFF (160+20) #define MINE_XOFF (160+50) -void InitWeaponMine(PLAYER* pp) +void InitWeaponMine(SWPlayer* pp) { PANEL_SPRITE* psp; @@ -5911,7 +5911,7 @@ void InitWeaponMine(PLAYER* pp) void pMineUpSound(PANEL_SPRITE* psp) { - PLAYER* pp = psp->PlayerP; + SWPlayer* pp = psp->PlayerP; PlaySound(DIGI_MINE_UP, pp, v3df_follow); } @@ -6190,7 +6190,7 @@ PANEL_STATE ps_ChopsRetract[] = // //--------------------------------------------------------------------------- -void InitChops(PLAYER* pp) +void InitChops(SWPlayer* pp) { PANEL_SPRITE* psp; @@ -6339,7 +6339,7 @@ void pChopsWait(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void ChopsSetRetract(PLAYER* pp) +void ChopsSetRetract(SWPlayer* pp) { if (pp == nullptr || pp->Chops == nullptr) return; @@ -6615,7 +6615,7 @@ PANEL_STATE ps_RetractFist[] = // //--------------------------------------------------------------------------- -void InitWeaponFist(PLAYER* pp) +void InitWeaponFist(SWPlayer* pp) { PANEL_SPRITE* psp; short rnd_num; @@ -7066,7 +7066,7 @@ void pFistBlock(PANEL_SPRITE* psp) -void pWeaponForceRest(PLAYER* pp) +void pWeaponForceRest(SWPlayer* pp) { pSetState(pp->CurWpn, pp->CurWpn->RestState); } @@ -7171,7 +7171,7 @@ bool pWeaponHideKeys(PANEL_SPRITE* psp, PANEL_STATE* state) // //--------------------------------------------------------------------------- -void InsertPanelSprite(PLAYER* pp, PANEL_SPRITE* psp) +void InsertPanelSprite(SWPlayer* pp, PANEL_SPRITE* psp) { PANEL_SPRITE* cur,* nxt; @@ -7219,7 +7219,7 @@ void InsertPanelSprite(PLAYER* pp, PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -PANEL_SPRITE* pSpawnSprite(PLAYER* pp, PANEL_STATE* state, uint8_t priority, double x, double y) +PANEL_SPRITE* pSpawnSprite(SWPlayer* pp, PANEL_STATE* state, uint8_t priority, double x, double y) { unsigned i; PANEL_SPRITE* psp; @@ -7287,7 +7287,7 @@ void pKillSprite(PANEL_SPRITE* psp) // //--------------------------------------------------------------------------- -void pClearSpriteList(PLAYER* pp) +void pClearSpriteList(SWPlayer* pp) { PANEL_SPRITE* psp = nullptr, * next_psp = nullptr; auto l = &pp->PanelSpriteList; @@ -7363,7 +7363,7 @@ void pWeaponBob(PANEL_SPRITE* psp, short condition) ////////////////////////////////////////////////////////////////////////////////////////// bool DrawBeforeView = false; -void pDisplaySprites(PLAYER* pp, double interpfrac) +void pDisplaySprites(SWPlayer* pp, double interpfrac) { DSWActor* plActor = pp->GetActor(); PANEL_SPRITE* next=nullptr; @@ -7656,7 +7656,7 @@ void pDisplaySprites(PLAYER* pp, double interpfrac) // //--------------------------------------------------------------------------- -void pSpriteControl(PLAYER* pp) +void pSpriteControl(SWPlayer* pp) { PANEL_SPRITE* next=nullptr; diff --git a/source/games/sw/src/panel.h b/source/games/sw/src/panel.h index 2ee96fa42..086549de9 100644 --- a/source/games/sw/src/panel.h +++ b/source/games/sw/src/panel.h @@ -109,7 +109,7 @@ struct PANEL_SPRITE PANEL_SPRITE* Next, * Prev; PANEL_SPRITE* sibling; PANEL_STATE* State, *RetractState, *PresentState, *ActionState, *RestState; - PLAYER* PlayerP; + SWPlayer* PlayerP; DVector2 pos, opos, bobpos; PANEL_SPRITE_OVERLAY over[8]; @@ -177,16 +177,16 @@ enum }; -PANEL_SPRITE* pSpawnSprite(PLAYER* pp, PANEL_STATE* state, uint8_t priority, double x, double y); +PANEL_SPRITE* pSpawnSprite(SWPlayer* pp, PANEL_STATE* state, uint8_t priority, double x, double y); void pSetSuicide(PANEL_SPRITE* psp); -bool pKillScreenSpiteIDs(PLAYER* pp, short id); +bool pKillScreenSpiteIDs(SWPlayer* pp, short id); void PreUpdatePanel(double interpfrac); void UpdatePanel(double interpfrac); -void PlayerUpdateArmor(PLAYER* pp,short value); +void PlayerUpdateArmor(SWPlayer* pp,short value); void pToggleCrosshair(void); void pKillSprite(PANEL_SPRITE* psp); -void InitChops(PLAYER* pp); -void ChopsSetRetract(PLAYER* pp); +void InitChops(SWPlayer* pp); +void ChopsSetRetract(SWPlayer* pp); END_SW_NS diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 1c1a31d47..969af1bad 100644 --- a/source/games/sw/src/player.cpp +++ b/source/games/sw/src/player.cpp @@ -58,13 +58,13 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -void pSpriteControl(PLAYER* pp); -int WeaponOperate(PLAYER* pp); +void pSpriteControl(SWPlayer* pp); +int WeaponOperate(SWPlayer* pp); SECTOR_OBJECT* PlayerOnObject(sectortype* sect_match); -void PlayerRemoteReset(PLAYER* pp, sectortype* sect); -void KillAllPanelInv(PLAYER* pp); -void DoPlayerDeathDrown(PLAYER* pp); -void pWeaponForceRest(PLAYER* pp); +void PlayerRemoteReset(SWPlayer* pp, sectortype* sect); +void KillAllPanelInv(SWPlayer* pp); +void DoPlayerDeathDrown(SWPlayer* pp); +void pWeaponForceRest(SWPlayer* pp); #define SO_DRIVE_SOUND 2 #define SO_IDLE_SOUND 1 @@ -119,61 +119,61 @@ extern bool DebugOperate; int ChopTics; -PLAYER Player[MAX_SW_PLAYERS_REG + 1]; +SWPlayer Player[MAX_SW_PLAYERS_REG + 1]; // These are a bunch of kens variables for the player short NormalVisibility; DSWActor* FindNearSprite(DSWActor*, short stat); -bool PlayerOnLadder(PLAYER* pp); -void DoPlayerSlide(PLAYER* pp); -void DoPlayerBeginSwim(PLAYER* pp); -void DoPlayerSwim(PLAYER* pp); -void DoPlayerWade(PLAYER* pp); -void DoPlayerBeginWade(PLAYER* pp); -void DoPlayerBeginCrawl(PLAYER* pp); -void DoPlayerCrawl(PLAYER* pp); -void DoPlayerRun(PLAYER* pp); -void DoPlayerBeginRun(PLAYER* pp); -void DoPlayerFall(PLAYER* pp); -void DoPlayerBeginFall(PLAYER* pp); -void DoPlayerJump(PLAYER* pp); -void DoPlayerBeginJump(PLAYER* pp); -void DoPlayerForceJump(PLAYER* pp); -void DoPlayerBeginFly(PLAYER* pp); -void DoPlayerFly(PLAYER* pp); -void DoPlayerBeginClimb(PLAYER* pp); -void DoPlayerClimb(PLAYER* pp); -void DoPlayerBeginDie(PLAYER* pp); +bool PlayerOnLadder(SWPlayer* pp); +void DoPlayerSlide(SWPlayer* pp); +void DoPlayerBeginSwim(SWPlayer* pp); +void DoPlayerSwim(SWPlayer* pp); +void DoPlayerWade(SWPlayer* pp); +void DoPlayerBeginWade(SWPlayer* pp); +void DoPlayerBeginCrawl(SWPlayer* pp); +void DoPlayerCrawl(SWPlayer* pp); +void DoPlayerRun(SWPlayer* pp); +void DoPlayerBeginRun(SWPlayer* pp); +void DoPlayerFall(SWPlayer* pp); +void DoPlayerBeginFall(SWPlayer* pp); +void DoPlayerJump(SWPlayer* pp); +void DoPlayerBeginJump(SWPlayer* pp); +void DoPlayerForceJump(SWPlayer* pp); +void DoPlayerBeginFly(SWPlayer* pp); +void DoPlayerFly(SWPlayer* pp); +void DoPlayerBeginClimb(SWPlayer* pp); +void DoPlayerClimb(SWPlayer* pp); +void DoPlayerBeginDie(SWPlayer* pp); // void DoPlayerBeginOperateBoat(PLAYER* pp); -void DoPlayerBeginOperateVehicle(PLAYER* pp); -void DoPlayerBeginOperate(PLAYER* pp); +void DoPlayerBeginOperateVehicle(SWPlayer* pp); +void DoPlayerBeginOperate(SWPlayer* pp); // void DoPlayerOperateBoat(PLAYER* pp); -void DoPlayerOperateVehicle(PLAYER* pp); -void DoPlayerOperateTurret(PLAYER* pp); -void DoPlayerBeginDive(PLAYER* pp); -void DoPlayerDive(PLAYER* pp); -void DoPlayerTeleportPause(PLAYER* pp); +void DoPlayerOperateVehicle(SWPlayer* pp); +void DoPlayerOperateTurret(SWPlayer* pp); +void DoPlayerBeginDive(SWPlayer* pp); +void DoPlayerDive(SWPlayer* pp); +void DoPlayerTeleportPause(SWPlayer* pp); bool PlayerFlyKey(void); void OperateSectorObject(SECTOR_OBJECT* sop, DAngle newang, const DVector2& newpos); -void CheckFootPrints(PLAYER* pp); -bool DoPlayerTestCrawl(PLAYER* pp); -void DoPlayerDeathFlip(PLAYER* pp); -void DoPlayerDeathCrumble(PLAYER* pp); -void DoPlayerDeathExplode(PLAYER* pp); -void DoPlayerDeathFall(PLAYER* pp); +void CheckFootPrints(SWPlayer* pp); +bool DoPlayerTestCrawl(SWPlayer* pp); +void DoPlayerDeathFlip(SWPlayer* pp); +void DoPlayerDeathCrumble(SWPlayer* pp); +void DoPlayerDeathExplode(SWPlayer* pp); +void DoPlayerDeathFall(SWPlayer* pp); -void PlayerCheckValidMove(PLAYER* pp); -void PlayerWarpUpdatePos(PLAYER* pp, const DVector3& oldpos); -void DoPlayerBeginDiveNoWarp(PLAYER* pp); -int PlayerCanDiveNoWarp(PLAYER* pp); -void DoPlayerCurrent(PLAYER* pp); +void PlayerCheckValidMove(SWPlayer* pp); +void PlayerWarpUpdatePos(SWPlayer* pp, const DVector3& oldpos); +void DoPlayerBeginDiveNoWarp(SWPlayer* pp); +int PlayerCanDiveNoWarp(SWPlayer* pp); +void DoPlayerCurrent(SWPlayer* pp); int GetOverlapSector2(const DVector2& pos, sectortype** over, sectortype** under); -void PlayerToRemote(PLAYER* pp); -void PlayerRemoteInit(PLAYER* pp); -void PlayerSpawnPosition(PLAYER* pp); -void processWeapon(PLAYER* const pp); +void PlayerToRemote(SWPlayer* pp); +void PlayerRemoteInit(SWPlayer* pp); +void PlayerSpawnPosition(SWPlayer* pp); +void processWeapon(SWPlayer* const pp); extern short target_ang; @@ -952,7 +952,7 @@ STATE* sg_PlayerNinjaFly[] = // //--------------------------------------------------------------------------- -void DoPlayerSpriteThrow(PLAYER* pp) +void DoPlayerSpriteThrow(SWPlayer* pp) { if (!(pp->Flags & (PF_DIVING|PF_FLYING|PF_CRAWLING))) { @@ -971,7 +971,7 @@ void DoPlayerSpriteThrow(PLAYER* pp) int DoPlayerSpriteReset(DSWActor* actor) { - PLAYER* pp; + SWPlayer* pp; if (!actor->user.PlayerP) return 0; @@ -1166,7 +1166,7 @@ DSWActor* DoPickTarget(DSWActor* actor, DAngle max_delta_ang, int skip_targets) // //--------------------------------------------------------------------------- -void DoPlayerResetMovement(PLAYER* pp) +void DoPlayerResetMovement(SWPlayer* pp) { pp->vect.Zero(); pp->ovect.Zero(); @@ -1181,7 +1181,7 @@ void DoPlayerResetMovement(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerTeleportPause(PLAYER* pp) +void DoPlayerTeleportPause(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -1204,7 +1204,7 @@ void DoPlayerTeleportPause(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang) +void DoPlayerTeleportToSprite(SWPlayer* pp, DVector3& pos, DAngle ang) { pp->GetActor()->spr.Angles.Yaw = ang; pp->GetActor()->spr.pos = pos; @@ -1220,7 +1220,7 @@ void DoPlayerTeleportToSprite(PLAYER* pp, DVector3& pos, DAngle ang) // //--------------------------------------------------------------------------- -void DoPlayerTeleportToOffset(PLAYER* pp) +void DoPlayerTeleportToOffset(SWPlayer* pp) { pp->GetActor()->backupvec2(); @@ -1280,7 +1280,7 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor) // //--------------------------------------------------------------------------- -void DoPlayerWarpTeleporter(PLAYER* pp) +void DoPlayerWarpTeleporter(SWPlayer* pp) { auto ppActor = pp->GetActor(); short pnum; @@ -1327,7 +1327,7 @@ void DoPlayerWarpTeleporter(PLAYER* pp) { if (pnum != pp - Player) { - PLAYER* npp = &Player[pnum]; + SWPlayer* npp = &Player[pnum]; // if someone already standing there if (npp->cursector == pp->cursector) @@ -1352,7 +1352,7 @@ void DoPlayerWarpTeleporter(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSetWadeDepth(PLAYER* pp) +void DoPlayerSetWadeDepth(SWPlayer* pp) { sectortype* sectp; @@ -1378,18 +1378,18 @@ void DoPlayerSetWadeDepth(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerViewOffset(PLAYER* pp) +void DoPlayerViewOffset(SWPlayer* pp) { pp->GetActor()->viewzoffset -= (pp->GetActor()->viewzoffset + pp->height) * 0.375; } -void DoPlayerHeight(PLAYER* pp) +void DoPlayerHeight(SWPlayer* pp) { DoPlayerViewOffset(pp); pp->GetActor()->spr.pos.Z -= (pp->GetActor()->spr.pos.Z - pp->loz) * 0.375; } -void DoPlayerJumpHeight(PLAYER* pp) +void DoPlayerJumpHeight(SWPlayer* pp) { if (pp->lo_sectp && (pp->lo_sectp->extra & SECTFX_DYNAMIC_AREA)) { @@ -1407,7 +1407,7 @@ void DoPlayerJumpHeight(PLAYER* pp) // //--------------------------------------------------------------------------- -void UpdatePlayerSpriteAngle(PLAYER* pp) +void UpdatePlayerSpriteAngle(SWPlayer* pp) { DSWActor* plActor = pp->PlayerUnderActor; @@ -1424,7 +1424,7 @@ void UpdatePlayerSpriteAngle(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerTurnVehicle(PLAYER* pp, double zz, double floordist) +void DoPlayerTurnVehicle(SWPlayer* pp, double zz, double floordist) { SECTOR_OBJECT* sop = pp->sop; @@ -1456,7 +1456,7 @@ void DoPlayerTurnVehicle(PLAYER* pp, double zz, double floordist) // //--------------------------------------------------------------------------- -void DoPlayerTurnVehicleRect(PLAYER* pp, DVector2* pos, DVector2* opos) +void DoPlayerTurnVehicleRect(SWPlayer* pp, DVector2* pos, DVector2* opos) { float avel; SECTOR_OBJECT* sop = pp->sop; @@ -1489,7 +1489,7 @@ void DoPlayerTurnVehicleRect(PLAYER* pp, DVector2* pos, DVector2* opos) // //--------------------------------------------------------------------------- -void DoPlayerTurnTurret(PLAYER* pp) +void DoPlayerTurnTurret(SWPlayer* pp) { DAngle new_ang, diff; SECTOR_OBJECT* sop = pp->sop; @@ -1535,7 +1535,7 @@ void DoPlayerTurnTurret(PLAYER* pp) // //--------------------------------------------------------------------------- -void SlipSlope(PLAYER* pp) +void SlipSlope(SWPlayer* pp) { if (!pp->insector() || !pp->cursector->hasU()) return; @@ -1556,7 +1556,7 @@ void SlipSlope(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSlopeTilting(PLAYER* pp) +void DoPlayerSlopeTilting(SWPlayer* pp) { const bool canslopetilt = (pp->input.actions & SB_AIMMODE) && !(pp->Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)); pp->Angles.doViewPitch(canslopetilt, pp->Flags & PF_CLIMBING); @@ -1568,7 +1568,7 @@ void DoPlayerSlopeTilting(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBob(PLAYER* pp) +void DoPlayerBob(SWPlayer* pp) { double amt; @@ -1605,7 +1605,7 @@ void DoPlayerBob(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginRecoil(PLAYER* pp, double pix_amt) +void DoPlayerBeginRecoil(SWPlayer* pp, double pix_amt) { pp->Flags |= (PF_RECOIL); @@ -1621,7 +1621,7 @@ void DoPlayerBeginRecoil(PLAYER* pp, double pix_amt) // //--------------------------------------------------------------------------- -void DoPlayerRecoil(PLAYER* pp) +void DoPlayerRecoil(SWPlayer* pp) { // controls how fast you move through the sin table pp->recoil_ndx += pp->recoil_speed; @@ -1644,7 +1644,7 @@ void DoPlayerRecoil(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSpriteBob(PLAYER* pp, double player_height, double bobamt, short bob_speed) +void DoPlayerSpriteBob(SWPlayer* pp, double player_height, double bobamt, short bob_speed) { pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047; pp->pbob_amt = bobamt * BobVal(pp->bob_ndx); @@ -1656,7 +1656,7 @@ void DoPlayerSpriteBob(PLAYER* pp, double player_height, double bobamt, short bo // //--------------------------------------------------------------------------- -void UpdatePlayerUnderSprite(PLAYER* pp) +void UpdatePlayerUnderSprite(SWPlayer* pp) { DSWActor* act_over = pp->GetActor(); @@ -1722,7 +1722,7 @@ void UpdatePlayerUnderSprite(PLAYER* pp) // //--------------------------------------------------------------------------- -void UpdatePlayerSprite(PLAYER* pp) +void UpdatePlayerSprite(SWPlayer* pp) { // Adjust player height according to the next action. if (!(pp->Flags & PF_DEAD)) @@ -1741,7 +1741,7 @@ void UpdatePlayerSprite(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerZrange(PLAYER* pp) +void DoPlayerZrange(SWPlayer* pp) { Collision ceilhit, florhit; @@ -1801,7 +1801,7 @@ void DoPlayerZrange(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSlide(PLAYER* pp) +void DoPlayerSlide(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -1856,7 +1856,7 @@ void DoPlayerSlide(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerCheckValidMove(PLAYER* pp) +void PlayerCheckValidMove(SWPlayer* pp) { if (!pp->insector()) { @@ -1871,7 +1871,7 @@ void PlayerCheckValidMove(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerSectorBound(PLAYER* pp, double amt) +void PlayerSectorBound(SWPlayer* pp, double amt) { if (!pp->insector()) return; @@ -1903,7 +1903,7 @@ void PlayerSectorBound(PLAYER* pp, double amt) // //--------------------------------------------------------------------------- -void DoPlayerMove(PLAYER* pp) +void DoPlayerMove(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); int friction; @@ -1915,7 +1915,7 @@ void DoPlayerMove(PLAYER* pp) // the player gets pushed by a wall (e.g., on the boat in level 5). bool interpolate_ride = pp->sop_riding && (!cl_sointerpolation || CommEnabled); - void SlipSlope(PLAYER* pp); + void SlipSlope(SWPlayer* pp); SlipSlope(pp); @@ -2080,7 +2080,7 @@ void DoPlayerMove(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSectorUpdatePreMove(PLAYER* pp) +void DoPlayerSectorUpdatePreMove(SWPlayer* pp) { auto sect = pp->cursector; @@ -2117,7 +2117,7 @@ void DoPlayerSectorUpdatePreMove(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerSectorUpdatePostMove(PLAYER* pp) +void DoPlayerSectorUpdatePostMove(SWPlayer* pp) { auto sect = pp->cursector; double fz,cz; @@ -2194,7 +2194,7 @@ void StopSOsound(sectortype* sect) // //--------------------------------------------------------------------------- -void DoTankTreads(PLAYER* pp) +void DoTankTreads(SWPlayer* pp) { int i; sectortype* *sectp; @@ -2293,7 +2293,7 @@ void DoTankTreads(PLAYER* pp) // //--------------------------------------------------------------------------- -void DriveCrush(PLAYER* pp, DVector2* quad) +void DriveCrush(SWPlayer* pp, DVector2* quad) { SECTOR_OBJECT* sop = pp->sop_control; short stat; @@ -2440,7 +2440,7 @@ void DriveCrush(PLAYER* pp, DVector2* quad) // //--------------------------------------------------------------------------- -void DoPlayerMoveVehicle(PLAYER* pp) +void DoPlayerMoveVehicle(SWPlayer* pp) { DSWActor* actor = pp->sop->sp_child; if (!actor) return; @@ -2629,7 +2629,7 @@ void DoPlayerMoveVehicle(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerMoveTurret(PLAYER* pp) +void DoPlayerMoveTurret(SWPlayer* pp) { if (!Prediction) { @@ -2657,7 +2657,7 @@ void DoPlayerMoveTurret(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginJump(PLAYER* pp) +void DoPlayerBeginJump(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -2692,7 +2692,7 @@ void DoPlayerBeginJump(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginForceJump(PLAYER* pp) +void DoPlayerBeginForceJump(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -2719,12 +2719,12 @@ void DoPlayerBeginForceJump(PLAYER* pp) // //--------------------------------------------------------------------------- -bool PlayerCeilingHit(PLAYER* pp, double zlimit) +bool PlayerCeilingHit(SWPlayer* pp, double zlimit) { return (pp->GetActor()->getOffsetZ() < zlimit); } -bool PlayerFloorHit(PLAYER* pp, double zlimit) +bool PlayerFloorHit(SWPlayer* pp, double zlimit) { return (pp->GetActor()->getOffsetZ() > zlimit); } @@ -2735,7 +2735,7 @@ bool PlayerFloorHit(PLAYER* pp, double zlimit) // //--------------------------------------------------------------------------- -void DoPlayerJump(PLAYER* pp) +void DoPlayerJump(SWPlayer* pp) { short i; @@ -2825,7 +2825,7 @@ void DoPlayerJump(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerForceJump(PLAYER* pp) +void DoPlayerForceJump(SWPlayer* pp) { short i; @@ -2869,7 +2869,7 @@ void DoPlayerForceJump(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginFall(PLAYER* pp) +void DoPlayerBeginFall(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -2894,7 +2894,7 @@ void DoPlayerBeginFall(PLAYER* pp) // //--------------------------------------------------------------------------- -void StackedWaterSplash(PLAYER* pp) +void StackedWaterSplash(SWPlayer* pp) { if (FAF_ConnectArea(pp->cursector)) { @@ -2915,7 +2915,7 @@ void StackedWaterSplash(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerFall(PLAYER* pp) +void DoPlayerFall(SWPlayer* pp) { short i; double depth; @@ -3076,7 +3076,7 @@ void DoPlayerFall(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginClimb(PLAYER* pp) +void DoPlayerBeginClimb(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -3097,7 +3097,7 @@ void DoPlayerBeginClimb(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerClimb(PLAYER* pp) +void DoPlayerClimb(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); int i; @@ -3285,7 +3285,7 @@ void DoPlayerClimb(PLAYER* pp) // //--------------------------------------------------------------------------- -int DoPlayerWadeSuperJump(PLAYER* pp) +int DoPlayerWadeSuperJump(SWPlayer* pp) { HitInfo hit{}; unsigned i; @@ -3339,7 +3339,7 @@ bool PlayerFlyKey(void) // //--------------------------------------------------------------------------- -void DoPlayerBeginCrawl(PLAYER* pp) +void DoPlayerBeginCrawl(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -3362,7 +3362,7 @@ void DoPlayerBeginCrawl(PLAYER* pp) // //--------------------------------------------------------------------------- -bool PlayerFallTest(PLAYER* pp, double player_height) +bool PlayerFallTest(SWPlayer* pp, double player_height) { // If the floor is far below you, fall hard instead of adjusting height if (abs(pp->GetActor()->getOffsetZ() - pp->loz) > player_height + PLAYER_FALL_HEIGHTF) @@ -3392,7 +3392,7 @@ bool PlayerFallTest(PLAYER* pp, double player_height) const int PLAYER_STANDING_ROOM = 68; -void DoPlayerCrawl(PLAYER* pp) +void DoPlayerCrawl(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -3463,7 +3463,7 @@ void DoPlayerCrawl(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginFly(PLAYER* pp) +void DoPlayerBeginFly(SWPlayer* pp) { pp->Flags &= ~(PF_FALLING | PF_JUMPING | PF_CRAWLING); pp->Flags |= (PF_FLYING); @@ -3487,7 +3487,7 @@ void DoPlayerBeginFly(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerWarpUpdatePos(PLAYER* pp, const DVector3& oldpos) +void PlayerWarpUpdatePos(SWPlayer* pp, const DVector3& oldpos) { if (Prediction) return; @@ -3503,7 +3503,7 @@ void PlayerWarpUpdatePos(PLAYER* pp, const DVector3& oldpos) // //--------------------------------------------------------------------------- -void DoPlayerFly(PLAYER* pp) +void DoPlayerFly(SWPlayer* pp) { if (SectorIsUnderwaterArea(pp->cursector)) { @@ -3586,7 +3586,7 @@ DSWActor* FindNearSprite(DSWActor* actor, short stat) // //--------------------------------------------------------------------------- -bool PlayerOnLadder(PLAYER* pp) +bool PlayerOnLadder(SWPlayer* pp) { int nx, ny; unsigned i; @@ -3665,7 +3665,7 @@ bool PlayerOnLadder(PLAYER* pp) // //--------------------------------------------------------------------------- -bool DoPlayerTestCrawl(PLAYER* pp) +bool DoPlayerTestCrawl(SWPlayer* pp) { return abs(pp->loz - pp->hiz) < PLAYER_STANDING_ROOM; } @@ -3676,7 +3676,7 @@ bool DoPlayerTestCrawl(PLAYER* pp) // //--------------------------------------------------------------------------- -int PlayerInDiveArea(PLAYER* pp) +int PlayerInDiveArea(SWPlayer* pp) { sectortype* sectp; @@ -3706,7 +3706,7 @@ int PlayerInDiveArea(PLAYER* pp) // //--------------------------------------------------------------------------- -int PlayerCanDive(PLAYER* pp) +int PlayerCanDive(SWPlayer* pp) { if (Prediction) return false; @@ -3740,7 +3740,7 @@ int PlayerCanDive(PLAYER* pp) // //--------------------------------------------------------------------------- -int PlayerCanDiveNoWarp(PLAYER* pp) +int PlayerCanDiveNoWarp(SWPlayer* pp) { if (Prediction) return false; @@ -3950,7 +3950,7 @@ int GetOverlapSector2(const DVector2& pos, sectortype** over, sectortype** under // //--------------------------------------------------------------------------- -void DoPlayerWarpToUnderwater(PLAYER* pp) +void DoPlayerWarpToUnderwater(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4023,7 +4023,7 @@ void DoPlayerWarpToUnderwater(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerWarpToSurface(PLAYER* pp) +void DoPlayerWarpToSurface(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); auto sectu = pp->cursector; @@ -4099,7 +4099,7 @@ void DoPlayerWarpToSurface(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDivePalette(PLAYER* pp) +void DoPlayerDivePalette(SWPlayer* pp) { if (pp != Player + screenpeek) return; @@ -4125,7 +4125,7 @@ void DoPlayerDivePalette(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginDive(PLAYER* pp) +void DoPlayerBeginDive(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4177,7 +4177,7 @@ void DoPlayerBeginDive(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginDiveNoWarp(PLAYER* pp) +void DoPlayerBeginDiveNoWarp(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4229,7 +4229,7 @@ void DoPlayerBeginDiveNoWarp(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerStopDiveNoWarp(PLAYER* pp) +void DoPlayerStopDiveNoWarp(SWPlayer* pp) { if (Prediction) return; @@ -4260,7 +4260,7 @@ void DoPlayerStopDiveNoWarp(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerStopDive(PLAYER* pp) +void DoPlayerStopDive(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -4293,7 +4293,7 @@ void DoPlayerStopDive(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDiveMeter(PLAYER* pp) +void DoPlayerDiveMeter(SWPlayer* pp) { short color=0,metertics,meterunit; int y; @@ -4344,7 +4344,7 @@ void DoPlayerDiveMeter(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDive(PLAYER* pp) +void DoPlayerDive(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); auto sectu = pp->cursector; @@ -4514,7 +4514,7 @@ void DoPlayerDive(PLAYER* pp) // //--------------------------------------------------------------------------- -int DoPlayerTestPlaxDeath(PLAYER* pp) +int DoPlayerTestPlaxDeath(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4535,7 +4535,7 @@ int DoPlayerTestPlaxDeath(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerCurrent(PLAYER* pp) +void DoPlayerCurrent(SWPlayer* pp) { int xvect, yvect; auto sectu = pp->cursector; @@ -4588,7 +4588,7 @@ void DoPlayerCurrent(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerFireOutWater(PLAYER* pp) +void DoPlayerFireOutWater(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4610,7 +4610,7 @@ void DoPlayerFireOutWater(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerFireOutDeath(PLAYER* pp) +void DoPlayerFireOutDeath(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4630,7 +4630,7 @@ void DoPlayerFireOutDeath(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginWade(PLAYER* pp) +void DoPlayerBeginWade(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4668,7 +4668,7 @@ void DoPlayerBeginWade(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerWade(PLAYER* pp) +void DoPlayerWade(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4813,7 +4813,7 @@ void DoPlayerWade(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginOperateVehicle(PLAYER* pp) +void DoPlayerBeginOperateVehicle(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4838,7 +4838,7 @@ void DoPlayerBeginOperateVehicle(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginOperateTurret(PLAYER* pp) +void DoPlayerBeginOperateTurret(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -4887,7 +4887,7 @@ void FindMainSector(SECTOR_OBJECT* sop) // //--------------------------------------------------------------------------- -void DoPlayerOperateMatch(PLAYER* pp, bool starting) +void DoPlayerOperateMatch(SWPlayer* pp, bool starting) { if (!pp->sop) return; @@ -4918,7 +4918,7 @@ void DoPlayerOperateMatch(PLAYER* pp, bool starting) // //--------------------------------------------------------------------------- -void DoPlayerBeginOperate(PLAYER* pp) +void DoPlayerBeginOperate(SWPlayer* pp) { SECTOR_OBJECT* sop; double cz, fz; @@ -5022,7 +5022,7 @@ void DoPlayerBeginOperate(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginRemoteOperate(PLAYER* pp, SECTOR_OBJECT* sop) +void DoPlayerBeginRemoteOperate(SWPlayer* pp, SECTOR_OBJECT* sop) { double cz, fz; int i; @@ -5106,7 +5106,7 @@ void DoPlayerBeginRemoteOperate(PLAYER* pp, SECTOR_OBJECT* sop) // //--------------------------------------------------------------------------- -void PlayerToRemote(PLAYER* pp) +void PlayerToRemote(SWPlayer* pp) { pp->remote.cursectp = pp->cursector; pp->remote.lastcursectp = pp->lastcursector; @@ -5118,7 +5118,7 @@ void PlayerToRemote(PLAYER* pp) pp->remote.slide_vect = pp->slide_vect; } -void RemoteToPlayer(PLAYER* pp) +void RemoteToPlayer(SWPlayer* pp) { pp->setcursector(pp->remote.cursectp); pp->lastcursector = pp->remote.lastcursectp; @@ -5130,7 +5130,7 @@ void RemoteToPlayer(PLAYER* pp) pp->slide_vect = pp->remote.slide_vect; } -void PlayerRemoteReset(PLAYER* pp, sectortype* sect) +void PlayerRemoteReset(SWPlayer* pp, sectortype* sect) { pp->setcursector(sect); pp->lastcursector = pp->cursector; @@ -5146,7 +5146,7 @@ void PlayerRemoteReset(PLAYER* pp, sectortype* sect) UpdatePlayerSprite(pp); } -void PlayerRemoteInit(PLAYER* pp) +void PlayerRemoteInit(SWPlayer* pp) { pp->remote.vect.Zero(); pp->remote.ovect.Zero(); @@ -5159,7 +5159,7 @@ void PlayerRemoteInit(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerStopOperate(PLAYER* pp) +void DoPlayerStopOperate(SWPlayer* pp) { pp->Flags &= ~(PF_WEAPON_DOWN); DoPlayerResetMovement(pp); @@ -5190,7 +5190,7 @@ void DoPlayerStopOperate(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerOperateTurret(PLAYER* pp) +void DoPlayerOperateTurret(SWPlayer* pp) { if (pp->input.actions & SB_OPEN) { @@ -5234,7 +5234,7 @@ void DoPlayerOperateTurret(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerOperateVehicle(PLAYER* pp) +void DoPlayerOperateVehicle(SWPlayer* pp) { if (pp->input.actions & SB_OPEN) { @@ -5276,7 +5276,7 @@ void DoPlayerOperateVehicle(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathJump(PLAYER* pp) +void DoPlayerDeathJump(SWPlayer* pp) { short i; @@ -5323,7 +5323,7 @@ void DoPlayerDeathJump(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathFall(PLAYER* pp) +void DoPlayerDeathFall(SWPlayer* pp) { double loz; @@ -5380,7 +5380,7 @@ const char *SuicideNote[MAX_SUICIDE] = "did everyone a favor and offed himself." }; -char *KilledPlayerMessage(PLAYER* pp, PLAYER* killer) +char *KilledPlayerMessage(SWPlayer* pp, SWPlayer* killer) { const int MAX_KILL_NOTES = 16; short rnd = StdRandomRange(MAX_KILL_NOTES); @@ -5453,7 +5453,7 @@ char *KilledPlayerMessage(PLAYER* pp, PLAYER* killer) // //--------------------------------------------------------------------------- -void DoPlayerDeathMessage(PLAYER* pp, PLAYER* killer) +void DoPlayerDeathMessage(SWPlayer* pp, SWPlayer* killer) { int pnum; bool SEND_OK = false; @@ -5503,7 +5503,7 @@ constexpr DAngle PLAYER_DEATH_HORIZ_UP_VALUEF = DAngle::fromDeg(-22.922); constexpr DAngle PLAYER_DEATH_HORIZ_JUMP_VALUEF = DAngle::fromDeg(-21.33686); constexpr DAngle PLAYER_DEATH_HORIZ_FALL_VALUEF = -PLAYER_DEATH_HORIZ_JUMP_VALUEF; -void DoPlayerBeginDie(PLAYER* pp) +void DoPlayerBeginDie(SWPlayer* pp) { extern bool ReloadPrompt; short bak; @@ -5511,7 +5511,7 @@ void DoPlayerBeginDie(PLAYER* pp) DSWActor* plActor = pp->GetActor(); - static void (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (PLAYER*) = + static void (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (SWPlayer*) = { DoPlayerDeathFlip, DoPlayerDeathCrumble, @@ -5713,7 +5713,7 @@ void DoPlayerBeginDie(PLAYER* pp) // //--------------------------------------------------------------------------- -static inline void DoPlayerDeathHoriz(PLAYER* pp, const DAngle target, const double speed) +static inline void DoPlayerDeathHoriz(SWPlayer* pp, const DAngle target, const double speed) { auto& pitch = pp->GetActor()->spr.Angles.Pitch; auto pspeed = DAngle::fromDeg(speed); @@ -5735,7 +5735,7 @@ static inline void DoPlayerDeathHoriz(PLAYER* pp, const DAngle target, const dou // //--------------------------------------------------------------------------- -void DoPlayerDeathZrange(PLAYER* pp) +void DoPlayerDeathZrange(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -5754,7 +5754,7 @@ void DoPlayerDeathZrange(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathHurl(PLAYER* pp) +void DoPlayerDeathHurl(SWPlayer* pp) { if (numplayers > 1) { @@ -5788,7 +5788,7 @@ void DoPlayerDeathHurl(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathFollowKiller(PLAYER* pp) +void DoPlayerDeathFollowKiller(SWPlayer* pp) { // if it didn't make it to this angle because of a low ceiling or something // continue on to it @@ -5818,7 +5818,7 @@ void DoPlayerDeathFollowKiller(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathCheckKeys(PLAYER* pp) +void DoPlayerDeathCheckKeys(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -5886,7 +5886,7 @@ void DoPlayerDeathCheckKeys(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerHeadDebris(PLAYER* pp) +void DoPlayerHeadDebris(SWPlayer* pp) { sectortype* sectp = pp->cursector; @@ -5906,7 +5906,7 @@ void DoPlayerHeadDebris(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathCheckKick(PLAYER* pp) +void DoPlayerDeathCheckKick(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); unsigned stat; @@ -5964,7 +5964,7 @@ void DoPlayerDeathCheckKick(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathMoveHead(PLAYER* pp) +void DoPlayerDeathMoveHead(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6027,7 +6027,7 @@ void DoPlayerDeathMoveHead(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathFlip(PLAYER* pp) +void DoPlayerDeathFlip(SWPlayer* pp) { if (Prediction) return; @@ -6064,7 +6064,7 @@ void DoPlayerDeathFlip(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathDrown(PLAYER* pp) +void DoPlayerDeathDrown(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -6105,7 +6105,7 @@ void DoPlayerDeathDrown(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathBounce(PLAYER* pp) +void DoPlayerDeathBounce(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6137,7 +6137,7 @@ void DoPlayerDeathBounce(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathCrumble(PLAYER* pp) +void DoPlayerDeathCrumble(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6194,7 +6194,7 @@ void DoPlayerDeathCrumble(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerDeathExplode(PLAYER* pp) +void DoPlayerDeathExplode(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6252,7 +6252,7 @@ void DoPlayerDeathExplode(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerBeginRun(PLAYER* pp) +void DoPlayerBeginRun(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6292,7 +6292,7 @@ void DoPlayerBeginRun(PLAYER* pp) // //--------------------------------------------------------------------------- -void DoPlayerRun(PLAYER* pp) +void DoPlayerRun(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -6503,7 +6503,7 @@ void MoveSkipSavePos(void) { int i; short pnum; - PLAYER* pp; + SWPlayer* pp; MoveSkip8 = (MoveSkip8 + 1) & 7; MoveSkip4 = (MoveSkip4 + 1) & 3; @@ -6569,12 +6569,12 @@ void MoveSkipSavePos(void) // //--------------------------------------------------------------------------- -void PlayerTimers(PLAYER* pp) +void PlayerTimers(SWPlayer* pp) { InventoryTimer(pp); } -void ChopsCheck(PLAYER* pp) +void ChopsCheck(SWPlayer* pp) { if (!M_Active() && !(pp->Flags & PF_DEAD) && !pp->sop_riding && numplayers <= 1) { @@ -6627,7 +6627,7 @@ void ChopsCheck(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerGlobal(PLAYER* pp) +void PlayerGlobal(SWPlayer* pp) { // This is the place for things that effect the player no matter what hes // doing @@ -6685,7 +6685,7 @@ void PlayerGlobal(PLAYER* pp) void MultiPlayLimits(void) { short pnum; - PLAYER* pp; + SWPlayer* pp; bool Done = false; if (gNet.MultiGameType != MULTI_GAME_COMMBAT) @@ -6734,7 +6734,7 @@ void domovethings(const ticcmd_t* playercmds) { short pnum; - PLAYER* pp; + SWPlayer* pp; extern int FinishTimer; @@ -6773,7 +6773,7 @@ void domovethings(const ticcmd_t* playercmds) { extern short screenpeek; extern bool PlayerTrackingMode; - extern PLAYER* GlobPlayerP; + extern SWPlayer* GlobPlayerP; pp = Player + pnum; GlobPlayerP = pp; @@ -6866,8 +6866,8 @@ void domovethings(const ticcmd_t* playercmds) void InitAllPlayers(void) { - PLAYER* pp; - PLAYER* pfirst = Player; + SWPlayer* pp; + SWPlayer* pfirst = Player; int i; extern bool NewGame; //int fz,cz; @@ -6919,9 +6919,9 @@ void InitAllPlayers(void) // //--------------------------------------------------------------------------- -int SearchSpawnPosition(PLAYER* pp) +int SearchSpawnPosition(SWPlayer* pp) { - PLAYER* opp; // other player + SWPlayer* opp; // other player short pos_num; short pnum; bool blocked; @@ -6965,7 +6965,7 @@ bool SpawnPositionUsed[MAX_SW_PLAYERS_REG+1]; // //--------------------------------------------------------------------------- -void PlayerSpawnPosition(PLAYER* pp) +void PlayerSpawnPosition(SWPlayer* pp) { short pnum = short(pp - Player); short pos_num = pnum; @@ -7046,7 +7046,7 @@ void PlayerSpawnPosition(PLAYER* pp) void InitMultiPlayerInfo(const DVector3& spawnpos, const DAngle startang) { - PLAYER* pp; + SWPlayer* pp; short pnum; unsigned stat; int tag; @@ -7156,7 +7156,7 @@ int DoFootPrints(DSWActor* actor) return 0; } -void CheckFootPrints(PLAYER* pp) +void CheckFootPrints(SWPlayer* pp) { if (pp->NumFootPrints <= 0 || FootMode != WATER_FOOT) { @@ -7238,16 +7238,16 @@ saveable_module saveable_player = SIZ(saveable_player_data) }; -DEFINE_FIELD_X(SWPlayer, PLAYER, sop_remote) -DEFINE_FIELD_X(SWPlayer, PLAYER, jump_count) -DEFINE_FIELD_X(SWPlayer, PLAYER, jump_speed) -DEFINE_FIELD_X(SWPlayer, PLAYER, z_speed) -DEFINE_FIELD_X(SWPlayer, PLAYER, climb_ndx) -DEFINE_FIELD_X(SWPlayer, PLAYER, hiz) -DEFINE_FIELD_X(SWPlayer, PLAYER, loz) -DEFINE_FIELD_X(SWPlayer, PLAYER, p_ceiling_dist) -DEFINE_FIELD_X(SWPlayer, PLAYER, p_floor_dist) -DEFINE_FIELD_X(SWPlayer, PLAYER, circle_camera_dist) +DEFINE_FIELD_X(SWPlayer, SWPlayer, sop_remote) +DEFINE_FIELD_X(SWPlayer, SWPlayer, jump_count) +DEFINE_FIELD_X(SWPlayer, SWPlayer, jump_speed) +DEFINE_FIELD_X(SWPlayer, SWPlayer, z_speed) +DEFINE_FIELD_X(SWPlayer, SWPlayer, climb_ndx) +DEFINE_FIELD_X(SWPlayer, SWPlayer, hiz) +DEFINE_FIELD_X(SWPlayer, SWPlayer, loz) +DEFINE_FIELD_X(SWPlayer, SWPlayer, p_ceiling_dist) +DEFINE_FIELD_X(SWPlayer, SWPlayer, p_floor_dist) +DEFINE_FIELD_X(SWPlayer, SWPlayer, circle_camera_dist) //DEFINE_FIELD_X(SWPlayer, PLAYER, six) //DEFINE_FIELD_X(SWPlayer, PLAYER, siy) //DEFINE_FIELD_X(SWPlayer, PLAYER, siz) @@ -7255,113 +7255,113 @@ DEFINE_FIELD_X(SWPlayer, PLAYER, circle_camera_dist) //DEFINE_FIELD_X(SWPlayer, PLAYER, yvect) //DEFINE_FIELD_X(SWPlayer, PLAYER, oxvect) //DEFINE_FIELD_X(SWPlayer, PLAYER, oyvect) -DEFINE_FIELD_X(SWPlayer, PLAYER, friction) +DEFINE_FIELD_X(SWPlayer, SWPlayer, friction) //DEFINE_FIELD_X(SWPlayer, PLAYER, slide_xvect) //DEFINE_FIELD_X(SWPlayer, PLAYER, slide_yvect) -DEFINE_FIELD_X(SWPlayer, PLAYER, slide_ang) -DEFINE_FIELD_X(SWPlayer, PLAYER, slide_dec) -DEFINE_FIELD_X(SWPlayer, PLAYER, drive_avel) -DEFINE_FIELD_X(SWPlayer, PLAYER, circle_camera_ang) -DEFINE_FIELD_X(SWPlayer, PLAYER, camera_check_time_delay) -DEFINE_FIELD_X(SWPlayer, PLAYER, cursector) -DEFINE_FIELD_X(SWPlayer, PLAYER, lastcursector) -DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_amt) -DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_speed) -DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_ndx) -DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_horizoff) -DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_ohorizoff) +DEFINE_FIELD_X(SWPlayer, SWPlayer, slide_ang) +DEFINE_FIELD_X(SWPlayer, SWPlayer, slide_dec) +DEFINE_FIELD_X(SWPlayer, SWPlayer, drive_avel) +DEFINE_FIELD_X(SWPlayer, SWPlayer, circle_camera_ang) +DEFINE_FIELD_X(SWPlayer, SWPlayer, camera_check_time_delay) +DEFINE_FIELD_X(SWPlayer, SWPlayer, cursector) +DEFINE_FIELD_X(SWPlayer, SWPlayer, lastcursector) +DEFINE_FIELD_X(SWPlayer, SWPlayer, recoil_amt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, recoil_speed) +DEFINE_FIELD_X(SWPlayer, SWPlayer, recoil_ndx) +DEFINE_FIELD_X(SWPlayer, SWPlayer, recoil_horizoff) +DEFINE_FIELD_X(SWPlayer, SWPlayer, recoil_ohorizoff) //DEFINE_FIELD_X(SWPlayer, PLAYER, oldposx) //DEFINE_FIELD_X(SWPlayer, PLAYER, oldposy) //DEFINE_FIELD_X(SWPlayer, PLAYER, oldposz) //DEFINE_FIELD_X(SWPlayer, PLAYER, Revolve) -DEFINE_FIELD_X(SWPlayer, PLAYER, RevolveDeltaAng) -DEFINE_FIELD_X(SWPlayer, PLAYER, pnum) -DEFINE_FIELD_X(SWPlayer, PLAYER, LadderSector) +DEFINE_FIELD_X(SWPlayer, SWPlayer, RevolveDeltaAng) +DEFINE_FIELD_X(SWPlayer, SWPlayer, pnum) +DEFINE_FIELD_X(SWPlayer, SWPlayer, LadderSector) //DEFINE_FIELD_X(SWPlayer, PLAYER, lx) //DEFINE_FIELD_X(SWPlayer, PLAYER, ly) -DEFINE_FIELD_X(SWPlayer, PLAYER, JumpDuration) -DEFINE_FIELD_X(SWPlayer, PLAYER, WadeDepth) -DEFINE_FIELD_X(SWPlayer, PLAYER, pbob_amt) -DEFINE_FIELD_X(SWPlayer, PLAYER, bob_ndx) -DEFINE_FIELD_X(SWPlayer, PLAYER, bcnt) -DEFINE_FIELD_X(SWPlayer, PLAYER, bob_z) -DEFINE_FIELD_X(SWPlayer, PLAYER, obob_z) -DEFINE_FIELD_X(SWPlayer, PLAYER, playerreadyflag) -DEFINE_FIELD_X(SWPlayer, PLAYER, Flags) -DEFINE_FIELD_X(SWPlayer, PLAYER, Flags2) -DEFINE_FIELD_X(SWPlayer, PLAYER, HasKey) -DEFINE_FIELD_X(SWPlayer, PLAYER, SwordAng) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnGotOnceFlags) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFlags) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnAmmo) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnNum) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketType) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketHeat) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketNuke) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFlameType) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFirstType) -DEFINE_FIELD_X(SWPlayer, PLAYER, WeaponType) -DEFINE_FIELD_X(SWPlayer, PLAYER, FirePause) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryNum) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryBarTics) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryTics) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryPercent) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryAmount) -DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryActive) -DEFINE_FIELD_X(SWPlayer, PLAYER, DiveTics) -DEFINE_FIELD_X(SWPlayer, PLAYER, DiveDamageTics) -DEFINE_FIELD_X(SWPlayer, PLAYER, DeathType) -DEFINE_FIELD_X(SWPlayer, PLAYER, Armor) -DEFINE_FIELD_X(SWPlayer, PLAYER, MaxHealth) -DEFINE_FIELD_X(SWPlayer, PLAYER, UziShellLeftAlt) -DEFINE_FIELD_X(SWPlayer, PLAYER, UziShellRightAlt) -DEFINE_FIELD_X(SWPlayer, PLAYER, TeamColor) -DEFINE_FIELD_X(SWPlayer, PLAYER, FadeTics) -DEFINE_FIELD_X(SWPlayer, PLAYER, FadeAmt) -DEFINE_FIELD_X(SWPlayer, PLAYER, NightVision) -DEFINE_FIELD_X(SWPlayer, PLAYER, StartColor) -DEFINE_FIELD_X(SWPlayer, PLAYER, IsAI) -DEFINE_FIELD_X(SWPlayer, PLAYER, fta) -DEFINE_FIELD_X(SWPlayer, PLAYER, ftq) -DEFINE_FIELD_X(SWPlayer, PLAYER, NumFootPrints) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnUziType) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunType) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunAuto) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunLastShell) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRailType) -DEFINE_FIELD_X(SWPlayer, PLAYER, Bloody) -DEFINE_FIELD_X(SWPlayer, PLAYER, InitingNuke) -DEFINE_FIELD_X(SWPlayer, PLAYER, TestNukeInit) -DEFINE_FIELD_X(SWPlayer, PLAYER, NukeInitialized) -DEFINE_FIELD_X(SWPlayer, PLAYER, FistAng) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnKungFuMove) -DEFINE_FIELD_X(SWPlayer, PLAYER, HitBy) -DEFINE_FIELD_X(SWPlayer, PLAYER, Reverb) -DEFINE_FIELD_X(SWPlayer, PLAYER, Heads) -DEFINE_FIELD_X(SWPlayer, PLAYER, PlayerVersion) -DEFINE_FIELD_X(SWPlayer, PLAYER, WpnReloadState) +DEFINE_FIELD_X(SWPlayer, SWPlayer, JumpDuration) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WadeDepth) +DEFINE_FIELD_X(SWPlayer, SWPlayer, pbob_amt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, bob_ndx) +DEFINE_FIELD_X(SWPlayer, SWPlayer, bcnt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, bob_z) +DEFINE_FIELD_X(SWPlayer, SWPlayer, obob_z) +DEFINE_FIELD_X(SWPlayer, SWPlayer, playerreadyflag) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Flags) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Flags2) +DEFINE_FIELD_X(SWPlayer, SWPlayer, HasKey) +DEFINE_FIELD_X(SWPlayer, SWPlayer, SwordAng) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnGotOnceFlags) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnFlags) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnAmmo) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnNum) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnRocketType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnRocketHeat) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnRocketNuke) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnFlameType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnFirstType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WeaponType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, FirePause) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryNum) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryBarTics) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryTics) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryPercent) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryAmount) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InventoryActive) +DEFINE_FIELD_X(SWPlayer, SWPlayer, DiveTics) +DEFINE_FIELD_X(SWPlayer, SWPlayer, DiveDamageTics) +DEFINE_FIELD_X(SWPlayer, SWPlayer, DeathType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Armor) +DEFINE_FIELD_X(SWPlayer, SWPlayer, MaxHealth) +DEFINE_FIELD_X(SWPlayer, SWPlayer, UziShellLeftAlt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, UziShellRightAlt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, TeamColor) +DEFINE_FIELD_X(SWPlayer, SWPlayer, FadeTics) +DEFINE_FIELD_X(SWPlayer, SWPlayer, FadeAmt) +DEFINE_FIELD_X(SWPlayer, SWPlayer, NightVision) +DEFINE_FIELD_X(SWPlayer, SWPlayer, StartColor) +DEFINE_FIELD_X(SWPlayer, SWPlayer, IsAI) +DEFINE_FIELD_X(SWPlayer, SWPlayer, fta) +DEFINE_FIELD_X(SWPlayer, SWPlayer, ftq) +DEFINE_FIELD_X(SWPlayer, SWPlayer, NumFootPrints) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnUziType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnShotgunType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnShotgunAuto) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnShotgunLastShell) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnRailType) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Bloody) +DEFINE_FIELD_X(SWPlayer, SWPlayer, InitingNuke) +DEFINE_FIELD_X(SWPlayer, SWPlayer, TestNukeInit) +DEFINE_FIELD_X(SWPlayer, SWPlayer, NukeInitialized) +DEFINE_FIELD_X(SWPlayer, SWPlayer, FistAng) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnKungFuMove) +DEFINE_FIELD_X(SWPlayer, SWPlayer, HitBy) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Reverb) +DEFINE_FIELD_X(SWPlayer, SWPlayer, Heads) +DEFINE_FIELD_X(SWPlayer, SWPlayer, PlayerVersion) +DEFINE_FIELD_X(SWPlayer, SWPlayer, WpnReloadState) DEFINE_ACTION_FUNCTION(_SWPlayer, WeaponNum) { - PARAM_SELF_STRUCT_PROLOGUE(PLAYER); + PARAM_SELF_STRUCT_PROLOGUE(SWPlayer); ACTION_RETURN_INT(self->GetActor()->user.WeaponNum); } DEFINE_ACTION_FUNCTION(_SWPlayer, Health) { - PARAM_SELF_STRUCT_PROLOGUE(PLAYER); + PARAM_SELF_STRUCT_PROLOGUE(SWPlayer); ACTION_RETURN_INT(self->GetActor()->user.Health); } DEFINE_ACTION_FUNCTION(_SWPlayer, MaxUserHealth) { - PARAM_SELF_STRUCT_PROLOGUE(PLAYER); + PARAM_SELF_STRUCT_PROLOGUE(SWPlayer); ACTION_RETURN_INT(self->GetActor()->user.MaxHealth); } DEFINE_ACTION_FUNCTION(_SWPlayer, GetBuildAngle) { - PARAM_SELF_STRUCT_PROLOGUE(PLAYER); + PARAM_SELF_STRUCT_PROLOGUE(SWPlayer); ACTION_RETURN_INT(self->GetActor()->spr.Angles.Yaw.Buildang()); } diff --git a/source/games/sw/src/player.h b/source/games/sw/src/player.h index 3c9ed42e7..451ab7d49 100644 --- a/source/games/sw/src/player.h +++ b/source/games/sw/src/player.h @@ -125,15 +125,15 @@ void DoPlayer(void); void domovethings(const ticcmd_t* playercmds); void InitAllPlayers(void); void InitMultiPlayerInfo(const DVector3& spawnpos, const DAngle startang); -void DoPlayerDivePalette(PLAYER* pp); -void DoPlayerNightVisionPalette(PLAYER* pp); -void DoPlayerStopDiveNoWarp(PLAYER* pp); -void DoPlayerResetMovement(PLAYER* pp); -void DoPlayerZrange(PLAYER* pp); -void DoPlayerSpriteThrow(PLAYER* pp); -int DoPlayerWadeSuperJump(PLAYER* pp); -void DoPlayerWarpTeleporter(PLAYER* pp); -void UpdatePlayerSprite(PLAYER* pp); +void DoPlayerDivePalette(SWPlayer* pp); +void DoPlayerNightVisionPalette(SWPlayer* pp); +void DoPlayerStopDiveNoWarp(SWPlayer* pp); +void DoPlayerResetMovement(SWPlayer* pp); +void DoPlayerZrange(SWPlayer* pp); +void DoPlayerSpriteThrow(SWPlayer* pp); +int DoPlayerWadeSuperJump(SWPlayer* pp); +void DoPlayerWarpTeleporter(SWPlayer* pp); +void UpdatePlayerSprite(SWPlayer* pp); void PlaySOsound(sectortype* sect,short sound_num); void DoSpawnTeleporterEffectPlace(DSWActor* sp); void FindMainSector(SECTOR_OBJECT* sop); diff --git a/source/games/sw/src/predict.cpp b/source/games/sw/src/predict.cpp index 566957b76..65fcd2610 100644 --- a/source/games/sw/src/predict.cpp +++ b/source/games/sw/src/predict.cpp @@ -38,9 +38,9 @@ BEGIN_SW_NS bool PredictionOn = true; bool Prediction = false; -PLAYER PredictPlayer; +SWPlayer PredictPlayer; //USER PredictUser; -PLAYER* ppp = &PredictPlayer; +SWPlayer* ppp = &PredictPlayer; struct PREDICT { @@ -53,11 +53,11 @@ struct PREDICT PREDICT Predict[/*MOVEFIFOSIZ*/256]; int predictmovefifoplc; -void DoPlayerSectorUpdatePreMove(PLAYER*); -void DoPlayerSectorUpdatePostMove(PLAYER*); +void DoPlayerSectorUpdatePreMove(SWPlayer*); +void DoPlayerSectorUpdatePostMove(SWPlayer*); -void InitPrediction(PLAYER* pp) +void InitPrediction(SWPlayer* pp) { if (!PredictionOn) return; @@ -67,7 +67,7 @@ void InitPrediction(PLAYER* pp) //PredictUser = *pp->actor->user; } -void DoPrediction(PLAYER* ppp) +void DoPrediction(SWPlayer* ppp) { #if 0 spritetype spr; diff --git a/source/games/sw/src/quake.cpp b/source/games/sw/src/quake.cpp index 0094d5976..00fd2c631 100644 --- a/source/games/sw/src/quake.cpp +++ b/source/games/sw/src/quake.cpp @@ -179,7 +179,7 @@ void ProcessQuakeSpot(void) // // //--------------------------------------------------------------------------- -void QuakeViewChange(PLAYER* pp, DVector3& tpos, DAngle& tang) +void QuakeViewChange(SWPlayer* pp, DVector3& tpos, DAngle& tang) { DSWActor* save_act = nullptr; double save_dist = 62500; @@ -275,7 +275,7 @@ void SpawnQuake(sectortype* sect, const DVector3& pos, int tics, int amt, int ra // //--------------------------------------------------------------------------- -bool SetQuake(PLAYER* pp, short tics, short amt) +bool SetQuake(SWPlayer* pp, short tics, short amt) { SpawnQuake(pp->cursector, pp->GetActor()->getPosWithOffsetZ(), tics, amt, 30000); return false; @@ -293,7 +293,7 @@ int SetGunQuake(DSWActor* actor) return 0; } -int SetPlayerQuake(PLAYER* pp) +int SetPlayerQuake(SWPlayer* pp) { SpawnQuake(pp->cursector, pp->GetActor()->getPosWithOffsetZ(), 40, 8, 40000); return 0; diff --git a/source/games/sw/src/rotator.cpp b/source/games/sw/src/rotator.cpp index 924ac7c11..9660582d8 100644 --- a/source/games/sw/src/rotator.cpp +++ b/source/games/sw/src/rotator.cpp @@ -38,9 +38,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -void DoRotatorMatch(PLAYER* pp, short match, bool); +void DoRotatorMatch(SWPlayer* pp, short match, bool); bool TestRotatorMatchActive(short match); -void DoMatchEverything(PLAYER* pp, short match, short state); +void DoMatchEverything(SWPlayer* pp, short match, short state); void DoRotatorSetInterp(DSWActor*); void DoRotatorStopInterp(DSWActor*); @@ -149,7 +149,7 @@ void SetRotatorInactive(DSWActor* actor) // //--------------------------------------------------------------------------- -void DoRotatorOperate(PLAYER* pp, sectortype* sect) +void DoRotatorOperate(SWPlayer* pp, sectortype* sect) { short match = sect->hitag; @@ -167,7 +167,7 @@ void DoRotatorOperate(PLAYER* pp, sectortype* sect) // //--------------------------------------------------------------------------- -void DoRotatorMatch(PLAYER* pp, short match, bool manual) +void DoRotatorMatch(SWPlayer* pp, short match, bool manual) { DSWActor* firstVator = nullptr; diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index beecad958..4e7a15612 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -417,7 +417,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, REMOTE_CONTROL& w, // //--------------------------------------------------------------------------- -FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER*& w, PLAYER** def) +FSerializer& Serialize(FSerializer& arc, const char* keyname, SWPlayer*& w, SWPlayer** def) { int ndx = w ? int(w - Player) : -1; arc(keyname, ndx); @@ -431,7 +431,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER*& w, PLAYER // //--------------------------------------------------------------------------- -FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER* def) +FSerializer& Serialize(FSerializer& arc, const char* keyname, SWPlayer& w, SWPlayer* def) { if (arc.BeginObject(keyname)) { diff --git a/source/games/sw/src/sbar.cpp b/source/games/sw/src/sbar.cpp index d92fea3ef..d1c7369cf 100644 --- a/source/games/sw/src/sbar.cpp +++ b/source/games/sw/src/sbar.cpp @@ -89,7 +89,7 @@ void UpdateStatusBar() ::UpdateStatusBar(&info); - PLAYER* pp = &Player[screenpeek]; + SWPlayer* pp = &Player[screenpeek]; if (pp->cookieTime > 0) { const int MESSAGE_LINE = 142; // Used to be 164 diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index 0c8c248c6..256234e3c 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -58,20 +58,20 @@ enum SINE_SLOPED = BIT(3), }; -void DoPlayerBeginForceJump(PLAYER*); +void DoPlayerBeginForceJump(SWPlayer*); sectortype* FindNextSectorByTag(sectortype* sect, int tag); bool TestVatorMatchActive(short match); bool TestSpikeMatchActive(short match); bool TestRotatorMatchActive(short match); bool TestSlidorMatchActive(short match); -int PlayerCheckDeath(PLAYER*, DSWActor*); -void DoVatorOperate(PLAYER*, sectortype*); -void DoVatorMatch(PLAYER* pp, short match); -void DoRotatorOperate(PLAYER*, sectortype*); -void DoRotatorMatch(PLAYER* pp, short match, bool); -void DoSlidorOperate(PLAYER*, sectortype*); -void DoSlidorMatch(PLAYER* pp, short match, bool); +int PlayerCheckDeath(SWPlayer*, DSWActor*); +void DoVatorOperate(SWPlayer*, sectortype*); +void DoVatorMatch(SWPlayer* pp, short match); +void DoRotatorOperate(SWPlayer*, sectortype*); +void DoRotatorMatch(SWPlayer* pp, short match, bool); +void DoSlidorOperate(SWPlayer*, sectortype*); +void DoSlidorMatch(SWPlayer* pp, short match, bool); void DoTornadoObject(SECTOR_OBJECT* sop); void DoAutoTurretObject(SECTOR_OBJECT* sop); @@ -80,7 +80,7 @@ void KillMatchingCrackSprites(short match); int DoTrapReset(short match); int DoTrapMatch(short match); -PLAYER* GlobPlayerP; +SWPlayer* GlobPlayerP; ANIM Anim[MAXANIM]; short AnimCnt = 0; @@ -644,7 +644,7 @@ DVector3 SectorMidPoint(sectortype* sectp) // //--------------------------------------------------------------------------- -void DoSpringBoard(PLAYER* pp) +void DoSpringBoard(SWPlayer* pp) { pp->jump_speed = -pp->cursector->hitag; @@ -744,7 +744,7 @@ short DoSpawnActorTrigger(short match) int OperateSector(sectortype* sect, short player_is_operating) { - PLAYER* pp = GlobPlayerP; + SWPlayer* pp = GlobPlayerP; // Don't let actors operate locked or secret doors if (!player_is_operating) @@ -1084,7 +1084,7 @@ void DoSoundSpotMatch(short match, short sound_num, short sound_type) if (TEST_BOOL7(actor)) { - PLAYER* pp = GlobPlayerP; + SWPlayer* pp = GlobPlayerP; if (pp) { @@ -1413,9 +1413,9 @@ void DoChangorMatch(short match) // //--------------------------------------------------------------------------- -void DoMatchEverything(PLAYER* pp, short match, short state) +void DoMatchEverything(SWPlayer* pp, short match, short state) { - PLAYER* bak; + SWPlayer* bak; bak = GlobPlayerP; GlobPlayerP = pp; @@ -1500,7 +1500,7 @@ bool ComboSwitchTest(short combo_type, short match) int OperateSprite(DSWActor* actor, short player_is_operating) { - PLAYER* pp = nullptr; + SWPlayer* pp = nullptr; short state; short key_num=0; extern STATE s_Pachinko1Operate[]; @@ -1903,7 +1903,7 @@ int DoTrapMatch(short match) // //--------------------------------------------------------------------------- -void TriggerSecret(sectortype* sectp, PLAYER* pp) +void TriggerSecret(sectortype* sectp, SWPlayer* pp) { if (pp == Player + myconnectindex) PlayerSound(DIGI_ANCIENTSECRET, v3df_dontpan | v3df_doppler | v3df_follow, pp); @@ -1922,7 +1922,7 @@ void TriggerSecret(sectortype* sectp, PLAYER* pp) // //--------------------------------------------------------------------------- -void OperateTripTrigger(PLAYER* pp) +void OperateTripTrigger(SWPlayer* pp) { if (Prediction) return; @@ -2048,7 +2048,7 @@ void OperateTripTrigger(PLAYER* pp) // //--------------------------------------------------------------------------- -void OperateContinuousTrigger(PLAYER* pp) +void OperateContinuousTrigger(SWPlayer* pp) { if (Prediction) return; @@ -2073,7 +2073,7 @@ void OperateContinuousTrigger(PLAYER* pp) // //--------------------------------------------------------------------------- -short PlayerTakeSectorDamage(PLAYER* pp) +short PlayerTakeSectorDamage(SWPlayer* pp) { auto sectu = pp->cursector; DSWActor* actor = pp->GetActor(); @@ -2097,7 +2097,7 @@ short PlayerTakeSectorDamage(PLAYER* pp) //--------------------------------------------------------------------------- enum { PLAYER_SOUNDEVENT_TAG = 900 }; -bool NearThings(PLAYER* pp) +bool NearThings(SWPlayer* pp) { HitInfo near; @@ -2184,7 +2184,7 @@ bool NearThings(PLAYER* pp) static int nti_cnt; -void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, double z, double dist, int type, int count) +void NearTagList(NEAR_TAG_INFO* ntip, SWPlayer* pp, double z, double dist, int type, int count) { short save_lotag, save_hitag; HitInfo near; @@ -2292,7 +2292,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, double z, double dist, int typ // //--------------------------------------------------------------------------- -void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYER* pp, double z, double dist, int type, int count) +void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, SWPlayer* pp, double z, double dist, int type, int count) { memset(ntip, -1, size); nti_cnt = 0; @@ -2305,7 +2305,7 @@ void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYER* pp, double z, doubl // //--------------------------------------------------------------------------- -int DoPlayerGrabStar(PLAYER* pp) +int DoPlayerGrabStar(SWPlayer* pp) { int i; @@ -2345,7 +2345,7 @@ int DoPlayerGrabStar(PLAYER* pp) // //--------------------------------------------------------------------------- -void PlayerOperateEnv(PLAYER* pp) +void PlayerOperateEnv(SWPlayer* pp) { bool found; @@ -2880,7 +2880,7 @@ void DoSector(void) bool riding; int sync_flag; short pnum; - PLAYER* pp; + SWPlayer* pp; for (sop = SectorObject; sop < &SectorObject[MAX_SECTOR_OBJECTS]; sop++) { diff --git a/source/games/sw/src/sector.h b/source/games/sw/src/sector.h index 6933a554a..851182466 100644 --- a/source/games/sw/src/sector.h +++ b/source/games/sw/src/sector.h @@ -38,11 +38,11 @@ int MoveDoorDown(short door_sector, short dir, short door_speed); int MoveDoorHoriz(short door_sector, short dir, short door_speed); void DoDoorsClose(void); short Switch(short SwitchSector); -void PlayerOperateEnv(PLAYER* pp); -int TeleportToSector(PLAYER* pp, int newsector); +void PlayerOperateEnv(SWPlayer* pp); +int TeleportToSector(SWPlayer* pp, int newsector); int OperateSector(sectortype* sect,short player_is_operating); int OperateSprite(DSWActor*, short player_is_operating); -void OperateTripTrigger(PLAYER* pp); +void OperateTripTrigger(SWPlayer* pp); enum SO_SCALE_TYPE { @@ -65,7 +65,7 @@ struct NEAR_TAG_INFO void DoSpawnSpotsForKill(short match); void DoSpawnSpotsForDamage(short match); -void DoMatchEverything(PLAYER* pp, short match, short state); +void DoMatchEverything(SWPlayer* pp, short match, short state); bool ComboSwitchTest(short combo_type,short match); void DoSoundSpotStopSound(short match); void DoSector(void); diff --git a/source/games/sw/src/slidor.cpp b/source/games/sw/src/slidor.cpp index 504735639..7d736a919 100644 --- a/source/games/sw/src/slidor.cpp +++ b/source/games/sw/src/slidor.cpp @@ -144,7 +144,7 @@ void SetSlidorInactive(DSWActor* actor) // //--------------------------------------------------------------------------- -void DoSlidorOperate(PLAYER* pp, sectortype* sect) +void DoSlidorOperate(SWPlayer* pp, sectortype* sect) { short match; @@ -165,7 +165,7 @@ void DoSlidorOperate(PLAYER* pp, sectortype* sect) // //--------------------------------------------------------------------------- -void DoSlidorMatch(PLAYER* pp, short match, bool manual) +void DoSlidorMatch(SWPlayer* pp, short match, bool manual) { SWStatIterator it(STAT_SLIDOR); while (auto actor = it.Next()) @@ -577,7 +577,7 @@ int DoSlidor(DSWActor* actor) if (!found) { short pnum; - PLAYER* pp; + SWPlayer* pp; // go ahead and look for players clip box bounds TRAVERSE_CONNECT(pnum) { diff --git a/source/games/sw/src/sounds.cpp b/source/games/sw/src/sounds.cpp index 12d61c9d8..cb6679f8f 100644 --- a/source/games/sw/src/sounds.cpp +++ b/source/games/sw/src/sounds.cpp @@ -324,7 +324,7 @@ static void UpdateAmbients() if (sdist < 255 && sfx->ResourceId == DIGI_WHIPME) { - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; if (!FAFcansee(spot->spr.pos, spot->sector(), pp->GetActor()->getPosWithOffsetZ(), pp->cursector)) { sdist = 255; @@ -379,7 +379,7 @@ public: int SoundSourceIndex(FSoundChan* chan) override { - if (chan->SourceType == SOURCE_Player) return int((PLAYER*)(chan->Source) - Player); + if (chan->SourceType == SOURCE_Player) return int((SWPlayer*)(chan->Source) - Player); return 0; } @@ -425,7 +425,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], { if (pos != nullptr) { - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; FVector3 campos = GetSoundPos(pp->GetActor() ? pp->GetActor()->getPosWithOffsetZ() : DVector3()); DVector3 vPos = {}; bool pancheck = false; @@ -446,7 +446,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], } else { - auto act = ((PLAYER*)source)->GetActor(); + auto act = ((SWPlayer*)source)->GetActor(); if (act) vPos = act->getPosWithOffsetZ(); else if (pp->GetActor()) vPos = pp->GetActor()->getPosWithOffsetZ(); @@ -513,7 +513,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], void GameInterface::UpdateSounds(void) { - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; SoundListener listener; DAngle tang; @@ -549,7 +549,7 @@ void GameInterface::UpdateSounds(void) // //========================================================================== -int _PlaySound(const FSoundID sndid, DSWActor* actor, PLAYER* pp, const DVector3* const ppos, int flags, int channel, EChanFlags cflags) +int _PlaySound(const FSoundID sndid, DSWActor* actor, SWPlayer* pp, const DVector3* const ppos, int flags, int channel, EChanFlags cflags) { if (Prediction || !SoundEnabled() || !soundEngine->isValidSoundId(sndid)) return -1; @@ -715,7 +715,7 @@ void PlaySpriteSound(DSWActor* actor, int attrib_ndx, int flags) // //========================================================================== -int _PlayerSound(int num, PLAYER* pp) +int _PlayerSound(int num, SWPlayer* pp) { int handle; @@ -759,7 +759,7 @@ int _PlayerSound(int num, PLAYER* pp) return 0; } -void StopPlayerSound(PLAYER* pp, int which) +void StopPlayerSound(SWPlayer* pp, int which) { soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE, soundEngine->FindSoundByResID(which)); } diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index 431797979..56e33e1d8 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -413,7 +413,7 @@ int DoSpike(DSWActor* actor) if (!found) { short pnum; - PLAYER* pp; + SWPlayer* pp; // go ahead and look for players clip box bounds TRAVERSE_CONNECT(pnum) { diff --git a/source/games/sw/src/sprite.cpp b/source/games/sw/src/sprite.cpp index 71a4228ec..e79dea786 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -87,8 +87,8 @@ int SetupPachinko4(DSWActor*); int SetupGirlNinja(DSWActor*); int DoSlidorInstantClose(DSWActor*); -void InitWeaponRocket(PLAYER*); -void InitWeaponUzi(PLAYER*); +void InitWeaponRocket(SWPlayer*); +void InitWeaponUzi(SWPlayer*); int MoveSkip4, MoveSkip2, MoveSkip8; int MinEnemySkill; @@ -547,7 +547,7 @@ void KillActor(DSWActor* actor) if (actor->hasU()) { - PLAYER* pp; + SWPlayer* pp; int pnum; // doing a MissileSetPos - don't allow killing @@ -4887,7 +4887,7 @@ int DoSpawnItemTeleporterEffect(DSWActor* actor) // //--------------------------------------------------------------------------- -void ChoosePlayerGetSound(PLAYER* pp) +void ChoosePlayerGetSound(SWPlayer* pp) { int choose_snd=0; @@ -4904,7 +4904,7 @@ void ChoosePlayerGetSound(PLAYER* pp) // //--------------------------------------------------------------------------- -bool CanGetWeapon(PLAYER* pp, DSWActor* actor, int WPN) +bool CanGetWeapon(SWPlayer* pp, DSWActor* actor, int WPN) { switch (gNet.MultiGameType) { @@ -4964,7 +4964,7 @@ enum }; int DoGet(DSWActor* actor) { - PLAYER* pp; + SWPlayer* pp; short pnum, key_num; bool can_see; @@ -5865,7 +5865,7 @@ void ProcessActiveVars(DSWActor* actor) // //--------------------------------------------------------------------------- -void AdjustActiveRange(PLAYER* pp, DSWActor* actor, double dist) +void AdjustActiveRange(SWPlayer* pp, DSWActor* actor, double dist) { DSWActor* plActor = pp->GetActor(); @@ -6011,7 +6011,7 @@ void SpriteControl(void) { int32_t stat; short pnum, CloseToPlayer; - PLAYER* pp; + SWPlayer* pp; short StateTics; SWStatIterator it(STAT_MISC); diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 6034a9292..81c520267 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -694,7 +694,7 @@ int DoSumoDeathMelt(DSWActor* actor) void BossHealthMeter(void) { - PLAYER* pp = Player + myconnectindex; + SWPlayer* pp = Player + myconnectindex; short color=0,metertics,meterunit; int y; extern bool NoMeters; diff --git a/source/games/sw/src/text.cpp b/source/games/sw/src/text.cpp index 233a35c8a..3dbfcfd2b 100644 --- a/source/games/sw/src/text.cpp +++ b/source/games/sw/src/text.cpp @@ -45,7 +45,7 @@ BEGIN_SW_NS // //--------------------------------------------------------------------------- -void PutStringInfo(PLAYER* pp, const char *string) +void PutStringInfo(SWPlayer* pp, const char *string) { if (pp-Player == myconnectindex) Printf(PRINT_MEDIUM|PRINT_NOTIFY, "%s\n", string); // Put it in the console too diff --git a/source/games/sw/src/track.cpp b/source/games/sw/src/track.cpp index b3e9497a4..efecf04bd 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -1453,9 +1453,9 @@ void PlaceActorsOnTracks(void) } -void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, const DVector2& move) +void MovePlayer(SWPlayer* pp, SECTOR_OBJECT* sop, const DVector2& move) { - void DoPlayerZrange(PLAYER* pp); + void DoPlayerZrange(SWPlayer* pp); // make sure your standing on the so if (pp->Flags & (PF_JUMPING | PF_FALLING | PF_FLYING)) @@ -1527,7 +1527,7 @@ void MovePoints(SECTOR_OBJECT* sop, DAngle deltaangle, const DVector2& move) { int j; int pnum; - PLAYER* pp; + SWPlayer* pp; sectortype** sectp; int i; DAngle rot_ang; @@ -3316,7 +3316,7 @@ present time. int ActorFollowTrack(DSWActor* actor, short locktics) { - PLAYER* pp; + SWPlayer* pp; TRACK_POINT* tpoint; short pnum; diff --git a/source/games/sw/src/vator.cpp b/source/games/sw/src/vator.cpp index 1acd7d779..76c4668ae 100644 --- a/source/games/sw/src/vator.cpp +++ b/source/games/sw/src/vator.cpp @@ -40,7 +40,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -void DoVatorMatch(PLAYER* pp, short match); +void DoVatorMatch(SWPlayer* pp, short match); bool TestVatorMatchActive(short match); void ReverseVator(DSWActor* actor) @@ -133,7 +133,7 @@ void SetVatorInactive(DSWActor* actor) } // called for operation from the space bar -void DoVatorOperate(PLAYER* pp, sectortype* sect) +void DoVatorOperate(SWPlayer* pp, sectortype* sect) { short match; @@ -180,7 +180,7 @@ void DoVatorOperate(PLAYER* pp, sectortype* sect) // called from switches and triggers // returns first vator found -void DoVatorMatch(PLAYER* pp, short match) +void DoVatorMatch(SWPlayer* pp, short match) { SWStatIterator it(STAT_VATOR); while (auto actor = it.Next()) @@ -479,7 +479,7 @@ int DoVator(DSWActor* actor) if (!found) { short pnum; - PLAYER* pp; + SWPlayer* pp; // go ahead and look for players clip box bounds TRAVERSE_CONNECT(pnum) { diff --git a/source/games/sw/src/vis.cpp b/source/games/sw/src/vis.cpp index c64a30608..175f00602 100644 --- a/source/games/sw/src/vis.cpp +++ b/source/games/sw/src/vis.cpp @@ -80,7 +80,7 @@ void ProcessVisOn(void) } } -void VisViewChange(PLAYER* pp, int *vis) +void VisViewChange(SWPlayer* pp, int *vis) { short BrightestVis = NormalVisibility; DVector3 pos; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index 196680190..2c84f9b16 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -54,7 +54,7 @@ struct MISSILE_PLACEMENT void SpawnZombie2(DSWActor*); Collision move_ground_missile(DSWActor* actor, const DVector2& change, double ceildist, double flordist, uint32_t cliptype, int numtics); -void DoPlayerBeginDie(PLAYER*); +void DoPlayerBeginDie(SWPlayer*); void ScaleSpriteVector(DSWActor* actor, int scalex, int scaley, int scalez); void ScaleSpriteVector(DSWActor* actor, int scale); @@ -118,7 +118,7 @@ void SpawnMicroExp(DSWActor*); void SpawnExpZadjust(DSWActor* actor, DSWActor* expActor, double upper_zsize, double lower_zsize); int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, const DVector3& pos, short ID); int SpawnSplashXY(const DVector3& pos, sectortype*); -DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); +DSWActor* SpawnBoatSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); short StatDamageList[STAT_DAMAGE_LIST_SIZE] = { @@ -2540,7 +2540,7 @@ int SpawnShrapX(DSWActor* actor) int DoLavaErupt(DSWActor* actor) { short i,pnum; - PLAYER* pp; + SWPlayer* pp; bool found = false; if (TEST_BOOL1(actor)) @@ -3334,7 +3334,7 @@ AutoShrap: p = StdShrap; if (parentActor->user.PlayerP) { - PLAYER* pp = parentActor->user.PlayerP; + SWPlayer* pp = parentActor->user.PlayerP; if (pp->DeathType == PLAYER_DEATH_CRUMBLE) p = PlayerGoreFall; @@ -4628,7 +4628,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) actor->user.ID == CARGIRL_R0 || actor->user.ID == MECHANICGIRL_R0 || actor->user.ID == SAILORGIRL_R0 || actor->user.ID == PRUNEGIRL_R0 || actor->user.ID == WASHGIRL_R0) && weapActor->hasU() && weapActor->user.ID == NINJA_RUN_R0 && weapActor->user.PlayerP) { - PLAYER* pp = weapActor->user.PlayerP; + SWPlayer* pp = weapActor->user.PlayerP; if (pp && !(pp->Flags & PF_DIVING)) // JBF: added null test pp->Bloody = true; PlaySound(DIGI_TOILETGIRLSCREAM, actor, v3df_none); @@ -4653,7 +4653,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) case NINJA_RUN_R0: //sword if (weapActor->user.PlayerP) { - PLAYER* pp = weapActor->user.PlayerP; + SWPlayer* pp = weapActor->user.PlayerP; if (weapActor->user.WeaponNum == WPN_FIST && StdRandomRange(1000)>500 && pp == Player+myconnectindex) { @@ -4752,7 +4752,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) // Random chance of taunting the AI's here if (RandomRange(1000) > 400) { - PLAYER* pp; + SWPlayer* pp; auto own = GetOwner(weapActor); if (own && own->hasU()) @@ -5109,7 +5109,7 @@ int ActorDamageSlide(DSWActor* actor, int damage, DAngle angle) // //--------------------------------------------------------------------------- -int PlayerDamageSlide(PLAYER* pp, int damage, DAngle angle) +int PlayerDamageSlide(SWPlayer* pp, int damage, DAngle angle) { damage = abs(damage); @@ -5196,7 +5196,7 @@ int GetDamage(DSWActor* actor, DSWActor* weapActor, int DamageNdx) // //--------------------------------------------------------------------------- -int PlayerCheckDeath(PLAYER* pp, DSWActor* weapActor) +int PlayerCheckDeath(SWPlayer* pp, DSWActor* weapActor) { DSWActor* actor = pp->GetActor(); @@ -5263,7 +5263,7 @@ int PlayerCheckDeath(PLAYER* pp, DSWActor* weapActor) // //--------------------------------------------------------------------------- -bool PlayerTakeDamage(PLAYER* pp, DSWActor* weapActor) +bool PlayerTakeDamage(SWPlayer* pp, DSWActor* weapActor) { if (weapActor == nullptr) return true; @@ -5449,7 +5449,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor) } else { - PLAYER* pp = Player + screenpeek; + SWPlayer* pp = Player + screenpeek; ActorHealth(actor, damage); if (actor->user.Health <= 0) @@ -6710,7 +6710,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor) { if (PlayerTakeDamage(actor->user.PlayerP, weapActor)) { - PLAYER* pp = actor->user.PlayerP; + SWPlayer* pp = actor->user.PlayerP; PlayerSound(DIGI_GASHURT, v3df_dontpan|v3df_follow|v3df_doppler,pp); PlayerUpdateHealth(actor->user.PlayerP, damage-1000); @@ -8738,7 +8738,7 @@ int DoMine(DSWActor* actor) // check to see if sprite is player or enemy if ((hitActor->spr.extra & SPRX_PLAYER_OR_ENEMY)) { - PLAYER* pp; + SWPlayer* pp; // attach weapon to sprite SetAttach(hitActor, actor); @@ -10069,7 +10069,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, DAngle ang) void SpawnNuclearExp(DSWActor* actor) { DAngle ang=nullAngle; - PLAYER* pp = nullptr; + SWPlayer* pp = nullptr; short rnd_rng; ASSERT(actor->hasU()); @@ -11228,7 +11228,7 @@ int DoRing(DSWActor* actor) { auto own = GetOwner(actor); if (!own) return 0; // this would crash. - PLAYER* pp = own->user.PlayerP; + SWPlayer* pp = own->user.PlayerP; double cz,fz; if (actor->user.Flags & (SPR_UNDERWATER)) @@ -11315,7 +11315,7 @@ int DoRing(DSWActor* actor) // //--------------------------------------------------------------------------- -void InitSpellRing(PLAYER* pp) +void InitSpellRing(SWPlayer* pp) { short missiles; short max_missiles = 16; @@ -11690,7 +11690,7 @@ int InitSerpRing(DSWActor* actor) // //--------------------------------------------------------------------------- -void InitSpellNapalm(PLAYER* pp) +void InitSpellNapalm(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); unsigned i; @@ -11846,7 +11846,7 @@ int InitEnemyNapalm(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitSpellMirv(PLAYER* pp) +int InitSpellMirv(SWPlayer* pp) { PlaySound(DIGI_MIRVFIRE, pp, v3df_none); @@ -11925,7 +11925,7 @@ int InitEnemyMirv(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitSwordAttack(PLAYER* pp) +int InitSwordAttack(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); unsigned stat; @@ -12093,7 +12093,7 @@ int InitSwordAttack(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitFistAttack(PLAYER* pp) +int InitFistAttack(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); unsigned stat; @@ -12707,7 +12707,7 @@ void WeaponHitscanShootFeet(DSWActor* actor, DSWActor* hitActor, double *zvect) } } -int InitStar(PLAYER* pp) +int InitStar(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); @@ -12811,7 +12811,7 @@ int InitStar(PLAYER* pp) // //--------------------------------------------------------------------------- -void InitHeartAttack(PLAYER* pp) +void InitHeartAttack(SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); short i = 0; @@ -12864,7 +12864,7 @@ void InitHeartAttack(PLAYER* pp) // //--------------------------------------------------------------------------- -int ContinueHitscan(PLAYER* pp, sectortype* sect, const DVector3& start, DAngle ang, const DVector3& vect) +int ContinueHitscan(SWPlayer* pp, sectortype* sect, const DVector3& start, DAngle ang, const DVector3& vect) { HitInfo hit{}; DSWActor* actor = pp->GetActor(); @@ -12948,7 +12948,7 @@ int ContinueHitscan(PLAYER* pp, sectortype* sect, const DVector3& start, DAngle // //--------------------------------------------------------------------------- -int InitShotgun(PLAYER* pp) +int InitShotgun(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); HitInfo hit{}; @@ -13114,7 +13114,7 @@ int InitShotgun(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitLaser(PLAYER* pp) +int InitLaser(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -13204,7 +13204,7 @@ int InitLaser(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitRail(PLAYER* pp) +int InitRail(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); double zvel; @@ -13361,7 +13361,7 @@ int InitZillaRail(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitRocket(PLAYER* pp) +int InitRocket(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); double zvel; @@ -13471,7 +13471,7 @@ int InitRocket(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitBunnyRocket(PLAYER* pp) +int InitBunnyRocket(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); double zvel; @@ -13576,7 +13576,7 @@ int InitBunnyRocket(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitNuke(PLAYER* pp) +int InitNuke(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); double zvel; @@ -13743,7 +13743,7 @@ int InitEnemyNuke(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitMicro(PLAYER* pp) +int InitMicro(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); short i; @@ -14432,7 +14432,7 @@ int InitEnemyRail(DSWActor* actor) // if co-op don't hurt teammate if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE && actor->user.ID == ZOMBIE_RUN_R0) { - PLAYER* pp; + SWPlayer* pp; // Check all players TRAVERSE_CONNECT(pnum) @@ -14959,7 +14959,7 @@ int DoDefaultStat(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitTracerUzi(PLAYER* pp) +int InitTracerUzi(SWPlayer* pp) { if (!pp->insector()) return 0; @@ -15222,7 +15222,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall) // //--------------------------------------------------------------------------- -int InitUzi(PLAYER* pp) +int InitUzi(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); HitInfo hit{}; @@ -15233,7 +15233,7 @@ int InitUzi(PLAYER* pp) bool FireSnd = false; const int UZIFIRE_WAIT = 20; - void InitUziShell(PLAYER*); + void InitUziShell(SWPlayer*); PlayerUpdateAmmo(pp, actor->user.WeaponNum, -1); @@ -15423,7 +15423,7 @@ int InitUzi(PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTankShell(DSWActor* actor, PLAYER* pp) +int InitTankShell(DSWActor* actor, SWPlayer* pp) { if (!SW_SHAREWARE) PlaySound(DIGI_CANNON, pp, v3df_dontpan|v3df_doppler); @@ -15466,7 +15466,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTurretMicro(DSWActor* actor, PLAYER* pp) +int InitTurretMicro(DSWActor* actor, SWPlayer* pp) { DSWActor* plActor = pp->GetActor(); TARGET_SORT* ts = TargetSort; @@ -15562,7 +15562,7 @@ int InitTurretMicro(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTurretRocket(DSWActor* actor, PLAYER* pp) +int InitTurretRocket(DSWActor* actor, SWPlayer* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15601,7 +15601,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTurretFireball(DSWActor* actor, PLAYER* pp) +int InitTurretFireball(DSWActor* actor, SWPlayer* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15641,7 +15641,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTurretRail(DSWActor* actor, PLAYER* pp) +int InitTurretRail(DSWActor* actor, SWPlayer* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15687,7 +15687,7 @@ int InitTurretRail(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitTurretLaser(DSWActor* actor, PLAYER* pp) +int InitTurretLaser(DSWActor* actor, SWPlayer* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15730,7 +15730,7 @@ int InitTurretLaser(DSWActor* actor, PLAYER* pp) // //--------------------------------------------------------------------------- -int InitSobjMachineGun(DSWActor* actor, PLAYER* pp) +int InitSobjMachineGun(DSWActor* actor, SWPlayer* pp) { HitInfo hit{}; short cstat = 0; @@ -15820,7 +15820,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYER* pp) return 0; } -int InitSobjGun(PLAYER* pp) +int InitSobjGun(SWPlayer* pp) { short i; bool first = false; @@ -15932,7 +15932,7 @@ int InitSobjGun(PLAYER* pp) // //--------------------------------------------------------------------------- -DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) +DSWActor* SpawnBoatSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) { auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit_sect, hitpos, hit_ang, 0); actorNew->spr.shade = -40; @@ -15972,7 +15972,7 @@ DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, // //--------------------------------------------------------------------------- -int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) +int SpawnSwordSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) { DSWActor* actor = pp->GetActor(); @@ -16050,7 +16050,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, const DVec // //--------------------------------------------------------------------------- -DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) +DSWActor* SpawnShotgunSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang) { const double SHOTGUN_SMOKE_REPEAT = 0.28125; @@ -16248,7 +16248,7 @@ int InitEnemyUzi(DSWActor* actor) DAngle daang; HitInfo hit{}; double zh; - void InitUziShell(PLAYER*); + void InitUziShell(SWPlayer*); static short alternate; @@ -16391,7 +16391,7 @@ int InitEnemyUzi(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitGrenade(PLAYER* pp) +int InitGrenade(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); double zvel; @@ -16536,7 +16536,7 @@ int InitSpriteGrenade(DSWActor* actor) // //--------------------------------------------------------------------------- -int InitMine(PLAYER* pp) +int InitMine(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -16664,7 +16664,7 @@ int HelpMissileLateral(DSWActor* actor, int dist) // //--------------------------------------------------------------------------- -int InitFireball(PLAYER* pp) +int InitFireball(SWPlayer* pp) { DSWActor* actor = pp->GetActor(); @@ -17952,7 +17952,7 @@ int DoFloorBlood(DSWActor* actor) constexpr double FEET_IN_BLOOD_DIST = 18.75; short pnum; - PLAYER* pp; + SWPlayer* pp; double scale; diff --git a/source/games/sw/src/weapon.h b/source/games/sw/src/weapon.h index 8122ac449..91299e290 100644 --- a/source/games/sw/src/weapon.h +++ b/source/games/sw/src/weapon.h @@ -38,7 +38,7 @@ inline DAngle AngToSprite(DSWActor* actor, DSWActor* other) return (actor->spr.pos - other->spr.pos).Angle(); } -inline DAngle AngToPlayer(PLAYER* player, DSWActor* other) +inline DAngle AngToPlayer(SWPlayer* player, DSWActor* other) { return (player->GetActor()->getPosWithOffsetZ() - other->spr.pos).Angle(); } @@ -81,14 +81,14 @@ extern int LoWangsQueueHead; extern TObjPtr LoWangsQueue[MAX_LOWANGS_QUEUE]; void ChangeState(DSWActor* actor, STATE* statep); -void DoPlayerBeginRecoil(PLAYER* pp, double pix_amt); +void DoPlayerBeginRecoil(SWPlayer* pp, double pix_amt); SECTOR_OBJECT* DetectSectorObject(sectortype*); SECTOR_OBJECT* DetectSectorObjectByWall(walltype*); void ScaleSpriteVector(DSWActor* actor, int scale); void QueueHole(sectortype* hit_sect, walltype* hit_wall, const DVector3& pos); DSWActor* QueueWallBlood(DSWActor* hit, DAngle ang); bool SlopeBounce(DSWActor*, bool *hit_wall); -int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); +int SpawnSwordSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); DSWActor* SpawnBubble(DSWActor*); void SpawnFireballExp(DSWActor*); void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor); @@ -100,7 +100,7 @@ int ShrapKillSprite(DSWActor*); bool MissileSetPos(DSWActor*,VMFunction* DoWeapon,int dist); int ActorPain(DSWActor*); int SpawnBreakFlames(DSWActor*); -bool PlayerTakeDamage(PLAYER* pp, DSWActor* weapActor); +bool PlayerTakeDamage(SWPlayer* pp, DSWActor* weapActor); const char *DeathString(DSWActor*); // @@ -163,7 +163,7 @@ inline double CloseRangeDist(DSWActor* a1, DSWActor* a2, double fudge = 25) extern short target_ang; -DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); +DSWActor* SpawnShotgunSparks(SWPlayer* pp, sectortype* hit_sect, walltype* hit_wall, const DVector3& hitpos, DAngle hit_ang); int DoActorBeginSlide(DSWActor* actor, DAngle ang, double vel); int GetOverlapSector(const DVector2& pos, sectortype** over, sectortype** under); @@ -183,12 +183,12 @@ void WallBounce(DSWActor*, DAngle ang); #define CALTROPS 2218 #define PHOSPHORUS 1397 -int PlayerInitChemBomb(PLAYER* pp); +int PlayerInitChemBomb(SWPlayer* pp); int InitChemBomb(DSWActor*); -int PlayerInitCaltrops(PLAYER* pp); +int PlayerInitCaltrops(SWPlayer* pp); int InitBloodSpray(DSWActor* actor, bool dogib, short velocity); int SpawnBunnyExp(DSWActor* actor); -int InitBunnyRocket(PLAYER* pp); +int InitBunnyRocket(SWPlayer* pp); int GetDamage(DSWActor*, DSWActor*, int DamageNdx); int DoFlamesDamageTest(DSWActor*); @@ -212,12 +212,12 @@ int SetSuicide(DSWActor*); void UpdateSinglePlayKills(DSWActor* actor); int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor); int InitCoolgDrip(DSWActor*); -int InitFireball(PLAYER* pp); -void InitSpellRing(PLAYER* pp); -void InitSpellNapalm(PLAYER* pp); +int InitFireball(SWPlayer* pp); +void InitSpellRing(SWPlayer* pp); +void InitSpellNapalm(SWPlayer* pp); int DoStaticFlamesDamage(DSWActor*); -int InitUzi(PLAYER* pp); -int InitSobjGun(PLAYER* pp); +int InitUzi(SWPlayer* pp); +int InitSobjGun(SWPlayer* pp); void InitFireballTrap(DSWActor* actor); void InitBoltTrap(DSWActor* actor); void InitSpearTrap(DSWActor*); @@ -230,9 +230,9 @@ void SpriteQueueDelete(DSWActor* actor); int HelpMissileLateral(DSWActor*, int dist); void AddSpriteToSectorObject(DSWActor*,SECTOR_OBJECT* sop); void QueueReset(void); -int PlayerCheckDeath(PLAYER* pp,DSWActor*); +int PlayerCheckDeath(SWPlayer* pp,DSWActor*); bool SpriteWarpToUnderwater(DSWActor* actor); -int PlayerDamageSlide(PLAYER* pp,int damage,DAngle ang); +int PlayerDamageSlide(SWPlayer* pp,int damage,DAngle ang); bool VehicleMoveHit(DSWActor*); int SpawnSplash(DSWActor*); void SpawnMineExp(DSWActor*); diff --git a/source/games/sw/src/zombie.cpp b/source/games/sw/src/zombie.cpp index 5ba159543..c847a33f8 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -771,7 +771,7 @@ int SetupZombie(DSWActor* actor) // //--------------------------------------------------------------------------- -void SpawnZombie(PLAYER* pp, DSWActor* weaponActor) +void SpawnZombie(SWPlayer* pp, DSWActor* weaponActor) { auto ownerActor = GetOwner(weaponActor);