diff --git a/source/games/sw/src/_polymost.cpp b/source/games/sw/src/_polymost.cpp index 01caf4c43..2079921df 100644 --- a/source/games/sw/src/_polymost.cpp +++ b/source/games/sw/src/_polymost.cpp @@ -140,7 +140,7 @@ void FAF_DrawRooms(int x, int y, int z, fixed_t q16ang, fixed_t q16horiz, int se } } -void polymost_drawscreen(PLAYERp pp, int tx, int ty, int tz, binangle tang, fixedhoriz thoriz, sectortype* tsect) +void polymost_drawscreen(PLAYER* pp, int tx, int ty, int tz, binangle tang, fixedhoriz thoriz, sectortype* tsect) { videoSetCorrectedAspect(); renderSetAspect(xs_CRoundToInt(double(viewingrange) * tan(r_fov * (pi::pi() / 360.))), yxaspect); @@ -166,7 +166,7 @@ void polymost_drawscreen(PLAYERp pp, int tx, int ty, int tz, binangle tang, fixe } -void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed_t tpq16horiz) +void JS_DrawMirrors(PLAYER* pp, int tx, int ty, int tz, fixed_t tpq16ang, fixed_t tpq16horiz) { int j, cnt; int dist; diff --git a/source/games/sw/src/ai.cpp b/source/games/sw/src/ai.cpp index b9c8afd3b..cf935a0aa 100644 --- a/source/games/sw/src/ai.cpp +++ b/source/games/sw/src/ai.cpp @@ -277,7 +277,7 @@ int DoActorPickClosePlayer(DSWActor* actor) { int dist, near_dist = MAX_ACTIVE_RANGE, a,b,c; int pnum; - PLAYERp pp; + PLAYER* pp; // if actor can still see the player int look_height = ActorZOfTop(actor); bool found = false; @@ -393,7 +393,7 @@ TARGETACTOR: DSWActor* GetPlayerSpriteNum(DSWActor* actor) { int pnum; - PLAYERp pp; + PLAYER* pp; TRAVERSE_CONNECT(pnum) { diff --git a/source/games/sw/src/bunny.cpp b/source/games/sw/src/bunny.cpp index 56eb82a34..7f2eef62c 100644 --- a/source/games/sw/src/bunny.cpp +++ b/source/games/sw/src/bunny.cpp @@ -981,7 +981,7 @@ int DoBunnyQuickJump(DSWActor* actor) { if ((hitActor->spr.extra & SPRX_PLAYER_OR_ENEMY)) { - PLAYERp pp = nullptr; + PLAYER* 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 fa640565a..359d4129f 100644 --- a/source/games/sw/src/cheats.cpp +++ b/source/games/sw/src/cheats.cpp @@ -51,9 +51,9 @@ extern bool FAF_DebugView; extern bool ToggleFlyMode; const char *CheatKeyType; -void KeysCheat(PLAYERp pp, const char *cheat_string); +void KeysCheat(PLAYER* pp, const char *cheat_string); -static PLAYERp checkCheat(cheatseq_t* c) +static PLAYER* checkCheat(cheatseq_t* c) { if (::CheckCheatmode(true, true)) return nullptr; return &Player[screenpeek]; @@ -131,7 +131,7 @@ bool PrevCheat(cheatseq_t* c) bool MapCheat(cheatseq_t* c) { - PLAYERp pp; + PLAYER* pp; if (!(pp=checkCheat(c))) return false; gFullMap = !gFullMap; // Need to do this differently. The code here was completely broken. @@ -142,7 +142,7 @@ bool MapCheat(cheatseq_t* c) bool WarpCheat(cheatseq_t* c) { - PLAYERp pp; + PLAYER* 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 ad3a01d75..5a3b3e875 100644 --- a/source/games/sw/src/d_menu.cpp +++ b/source/games/sw/src/d_menu.cpp @@ -91,7 +91,7 @@ bool GameInterface::CanSave() bool GameInterface::StartGame(FNewGameStartup& gs) { - PLAYERp pp = Player + screenpeek; + PLAYER* 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 44f0908a6..cf7cebd6b 100644 --- a/source/games/sw/src/draw.cpp +++ b/source/games/sw/src/draw.cpp @@ -592,7 +592,7 @@ void analyzesprites(tspritetype* tsprite, int& spritesortcnt, int viewx, int vie int tSpriteNum; int smr4, smr2; static int ang = 0; - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; int newshade=0; const int DART_PIC = 2526; @@ -942,7 +942,7 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang, HitInfo hit{}; int i, vx, vy, vz, hx, hy; int daang; - PLAYERp pp = &Player[screenpeek]; + PLAYER* pp = &Player[screenpeek]; binangle ang; ang = *nang + buildang(pp->circle_camera_ang); @@ -1041,7 +1041,7 @@ void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang, FString GameInterface::GetCoordString() { - PLAYERp pp = Player + myconnectindex; + PLAYER* pp = Player + myconnectindex; FString out; out.AppendFormat("POSX:%d ", pp->pos.X); out.AppendFormat("POSY:%d ", pp->pos.Y); @@ -1052,7 +1052,7 @@ FString GameInterface::GetCoordString() } -void PrintSpriteInfo(PLAYERp pp) +void PrintSpriteInfo(PLAYER* pp) { const int Y_STEP = 7; @@ -1090,7 +1090,7 @@ void PrintSpriteInfo(PLAYERp pp) } -void DrawCrosshair(PLAYERp pp) +void DrawCrosshair(PLAYER* pp) { if (!(CameraTestMode)) { @@ -1098,7 +1098,7 @@ void DrawCrosshair(PLAYERp pp) } } -void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, sectortype** tsect, binangle *tang, fixedhoriz *thoriz) +void CameraView(PLAYER* pp, int *tx, int *ty, int *tz, sectortype** tsect, binangle *tang, fixedhoriz *thoriz) { binangle ang; bool found_camera = false; @@ -1285,9 +1285,9 @@ void PreDrawStackedWater(void) short ScreenSavePic = false; -void DoPlayerDiveMeter(PLAYERp pp); +void DoPlayerDiveMeter(PLAYER* pp); -void polymost_drawscreen(PLAYERp pp, int tx, int ty, int tz, binangle tang, fixedhoriz thoriz, sectortype* tsect); +void polymost_drawscreen(PLAYER* pp, int tx, int ty, int tz, binangle tang, fixedhoriz thoriz, sectortype* tsect); void UpdateWallPortalState() @@ -1372,7 +1372,7 @@ void RestorePortalState() } } -void drawscreen(PLAYERp pp, double smoothratio) +void drawscreen(PLAYER* pp, double smoothratio) { extern bool CameraTestMode; int tx, ty, tz; @@ -1384,7 +1384,7 @@ void drawscreen(PLAYERp pp, double smoothratio) int quake_z, quake_x, quake_y; short quake_ang; extern bool FAF_DebugView; - PLAYERp camerapp; // prediction player if prediction is on, else regular player + PLAYER* camerapp; // prediction player if prediction is on, else regular player int const viewingRange = viewingrange; diff --git a/source/games/sw/src/game.cpp b/source/games/sw/src/game.cpp index 0a9146b34..90298a33b 100644 --- a/source/games/sw/src/game.cpp +++ b/source/games/sw/src/game.cpp @@ -144,7 +144,7 @@ void markgcroots() } -void pClearSpriteList(PLAYERp pp); +void pClearSpriteList(PLAYER* pp); extern int sw_snd_scratch; @@ -539,7 +539,7 @@ void TerminateLevel(void) TRAVERSE_CONNECT(pnum) { - PLAYERp pp = &Player[pnum]; + PLAYER* pp = &Player[pnum]; // Free panel sprites for players pClearSpriteList(pp); @@ -808,7 +808,7 @@ ReservedSpace GameInterface::GetReservedScreenSpace(int viewsize) GameStats GameInterface::getStats() { - PLAYERp pp = Player + myconnectindex; + PLAYER* pp = Player + myconnectindex; return { pp->Kills, TotalKillable, pp->SecretsFound, LevelSecrets, PlayClock / 120, 0 }; } diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index 18978b364..bda339b2a 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -369,10 +369,7 @@ struct STATE; typedef STATE* STATEp; struct PANEL_STATE; - struct PLAYER; -typedef PLAYER *PLAYERp; - struct PERSONALITY; struct ATTRIBUTE; struct SECTOR_OBJECT; @@ -466,7 +463,7 @@ enum struct DAMAGE_DATA { - void (*Init)(PLAYERp); + void (*Init)(PLAYER*); int16_t damage_lo; int16_t damage_hi; unsigned int radius; @@ -483,24 +480,24 @@ extern DAMAGE_DATA DamageData[]; extern int WeaponHasNoAmmo, WeaponIsAmmo; -void InitWeaponFist(PLAYERp); -void InitWeaponStar(PLAYERp); -void InitWeaponShotgun(PLAYERp); -void InitWeaponRocket(PLAYERp); -void InitWeaponRail(PLAYERp); -void InitWeaponMicro(PLAYERp); -void InitWeaponUzi(PLAYERp); -void InitWeaponSword(PLAYERp); -void InitWeaponHothead(PLAYERp); -void InitWeaponElectro(PLAYERp); -void InitWeaponHeart(PLAYERp); -void InitWeaponGrenade(PLAYERp); -void InitWeaponMine(PLAYERp); +void InitWeaponFist(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 InitWeaponNapalm(PLAYERp); -void InitWeaponRing(PLAYERp); +void InitWeaponNapalm(PLAYER*); +void InitWeaponRing(PLAYER*); -extern void (*InitWeapon[MAX_WEAPONS]) (PLAYERp); +extern void (*InitWeapon[MAX_WEAPONS]) (PLAYER*); /////////////////////////////////////////////////////////////////////////////////////////// // @@ -566,7 +563,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)(PLAYERp); +typedef void (*PLAYER_ACTION_FUNCp)(PLAYER*); #include "inv.h" @@ -970,7 +967,7 @@ struct USER // if a player's sprite points to player structure - PLAYERp PlayerP; + PLAYER* PlayerP; int16_t Sibling; @@ -1618,10 +1615,10 @@ enum short SoundDist(int x, int y, int z, int basedist); short SoundAngle(int x, int y); //void PlaySound(int num, short angle, short vol); -int _PlaySound(int num, DSWActor* sprite, PLAYERp player, vec3_t *pos, Voc3D_Flags flags, int channel, EChanFlags sndflags); +int _PlaySound(int num, DSWActor* sprite, PLAYER* player, vec3_t *pos, Voc3D_Flags flags, int channel, EChanFlags sndflags); void InitAmbient(int num, DSWActor* actor); -inline void PlaySound(int num, PLAYERp player, Voc3D_Flags flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) +inline void PlaySound(int num, PLAYER* player, Voc3D_Flags flags, int channel = 8, EChanFlags sndflags = CHANF_NONE) { _PlaySound(num, nullptr, player, nullptr, flags, channel, sndflags); } @@ -1634,9 +1631,9 @@ inline void PlaySound(int num, vec3_t *pos, Voc3D_Flags flags, int channel = 8, _PlaySound(num, nullptr, nullptr, pos, flags, channel, sndflags); } -int _PlayerSound(int num, PLAYERp pp); -inline int PlayerSound(int num, int flags, PLAYERp pp) { return _PlayerSound(num, pp); } -void StopPlayerSound(PLAYERp pp, int which = -1); +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); bool SoundValidAndActive(DSWActor* spr, int channel); @@ -1645,11 +1642,11 @@ ANIMATOR DoActorBeginJump,DoActorJump,DoActorBeginFall,DoActorFall,DoActorDeathM struct BREAK_INFO; int SpawnShrap(DSWActor*, DSWActor*, int = -1, BREAK_INFO* breakinfo = nullptr); -void PlayerUpdateHealth(PLAYERp pp, short value); -void PlayerUpdateAmmo(PLAYERp pp, short WeaponNum, short value); -void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum); -void PlayerUpdateKills(PLAYERp pp, short value); -void RefreshInfoLine(PLAYERp pp); +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 DoAnim(int numtics); void AnimDelete(int animtype, int animindex, DSWActor*); @@ -1702,8 +1699,8 @@ inline bool FAF_ConnectArea(sectortype* sect) return sect && (FAF_ConnectCeiling(sect) || FAF_ConnectFloor(sect)); } -bool PlayerCeilingHit(PLAYERp pp, int zlimit); -bool PlayerFloorHit(PLAYERp pp, int zlimit); +bool PlayerCeilingHit(PLAYER* pp, int zlimit); +bool PlayerFloorHit(PLAYER* pp, int zlimit); void FAFhitscan(int32_t x, int32_t y, int32_t z, sectortype* sect, int32_t xvect, int32_t yvect, int32_t zvect, @@ -1794,8 +1791,8 @@ extern int16_t StatDamageList[STAT_DAMAGE_LIST_SIZE]; // /////////////////////////////////////////////////////////////// -extern void SetFadeAmt(PLAYERp pp, short damage, uint8_t startcolor); -extern void DoPaletteFlash(PLAYERp pp); +extern void SetFadeAmt(PLAYER* pp, short damage, uint8_t startcolor); +extern void DoPaletteFlash(PLAYER* pp); extern bool NightVision; @@ -1819,7 +1816,7 @@ void DebugWriteString(char *string); // game.c void getsyncstat(void); // sync.c void SyncStatMessage(void); // sync.c -void drawscreen(PLAYERp pp, double smoothratio); // draw.c +void drawscreen(PLAYER* pp, double smoothratio); // draw.c int COVERsetgamemode(int mode, int xdim, int ydim, int bpp); // draw.c void ScreenCaptureKeys(void); // draw.c @@ -1834,9 +1831,9 @@ void InitSetup(void); // setup.c void LoadKVXFromScript(const char *filename); // scrip2.c void LoadCustomInfoFromScript(const char *filename); // scrip2.c -int PlayerInitChemBomb(PLAYERp pp); // jweapon.c -int PlayerInitFlashBomb(PLAYERp pp); // jweapon.c -int PlayerInitCaltrops(PLAYERp pp); // jweapon.c +int PlayerInitChemBomb(PLAYER* pp); // jweapon.c +int PlayerInitFlashBomb(PLAYER* pp); // jweapon.c +int PlayerInitCaltrops(PLAYER* pp); // jweapon.c int InitPhosphorus(DSWActor*); // jweapon.c void SpawnFloorSplash(DSWActor*); // jweapon.c @@ -1966,7 +1963,7 @@ inline bool SectorIsUnderwaterArea(sectortype* sect) return (sect->extra & (SECTFX_UNDERWATER | SECTFX_UNDERWATER2)) ? true : false; } -inline int PlayerFacingRange(PLAYERp pp, DSWActor* a, int range) +inline int PlayerFacingRange(PLAYER* pp, DSWActor* a, int range) { return (abs(getincangle(getangle(a->spr.pos.X - (pp)->pos.X, a->spr.pos.Y - (pp)->pos.Y), (pp)->angle.ang.asbuild())) < (range)); } @@ -2102,7 +2099,7 @@ inline bool SpriteInUnderwaterArea(DSWActor* a) // just determine if the player is moving -inline bool PLAYER_MOVING(PLAYERp pp) +inline bool PLAYER_MOVING(PLAYER* pp) { return (pp->vect.X | pp->vect.Y); } diff --git a/source/games/sw/src/hornet.cpp b/source/games/sw/src/hornet.cpp index c679b33c3..ba944e016 100644 --- a/source/games/sw/src/hornet.cpp +++ b/source/games/sw/src/hornet.cpp @@ -529,7 +529,7 @@ int DoHornetDeath(DSWActor* actor) int DoCheckSwarm(DSWActor* actor) { int dist, pdist, a,b,c; - PLAYERp pp; + PLAYER* 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 046622bcc..3e365c69b 100644 --- a/source/games/sw/src/input.cpp +++ b/source/games/sw/src/input.cpp @@ -34,10 +34,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -void DoPlayerHorizon(PLAYERp pp, float const horz, double const scaleAdjust); -void DoPlayerTurn(PLAYERp pp, float const avel, double const scaleAdjust); -void DoPlayerTurnVehicle(PLAYERp pp, float avel, int z, int floor_dist); -void DoPlayerTurnTurret(PLAYERp pp, float avel); +void DoPlayerHorizon(PLAYER* pp, float const horz, double const scaleAdjust); +void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust); +void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist); +void DoPlayerTurnTurret(PLAYER* pp, float avel); static InputPacket loc; @@ -76,7 +76,7 @@ enum // //--------------------------------------------------------------------------- -static void processWeapon(PLAYERp const pp) +static void processWeapon(PLAYER* const pp) { DSWActor* plActor = pp->actor; if (plActor == nullptr) return; @@ -158,7 +158,7 @@ static void processWeapon(PLAYERp const pp) void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdjust, InputPacket *packet) { - PLAYERp pp = &Player[myconnectindex]; + PLAYER* pp = &Player[myconnectindex]; if (paused || M_Active() || pp->actor == nullptr) { diff --git a/source/games/sw/src/inv.cpp b/source/games/sw/src/inv.cpp index 30aef8e58..7eb1dd3af 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(PLAYERp pp, short InventoryNum); -void InventoryUse(PLAYERp pp); -void InventoryStop(PLAYERp pp, short InventoryNum); +void PlayerUpdateInventory(PLAYER* pp, short InventoryNum); +void InventoryUse(PLAYER* pp); +void InventoryStop(PLAYER* pp, short InventoryNum); -void UseInventoryRepairKit(PLAYERp pp); -void UseInventoryMedkit(PLAYERp pp); -void UseInventoryRepairKit(PLAYERp pp); -void UseInventoryCloak(PLAYERp pp); -void UseInventoryEnvironSuit(PLAYERp pp); -void UseInventoryNightVision(PLAYERp pp); -void UseInventoryChemBomb(PLAYERp pp); -void UseInventoryFlashBomb(PLAYERp pp); -void UseInventoryCaltrops(PLAYERp pp); +void UseInventoryRepairKit(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 StopInventoryRepairKit(PLAYERp pp, short); -void StopInventoryMedkit(PLAYERp pp, short); -void StopInventoryRepairKit(PLAYERp pp, short); -void StopInventoryCloak(PLAYERp pp, short); -void StopInventoryEnvironSuit(PLAYERp pp, short); -void StopInventoryNightVision(PLAYERp pp, short); +void StopInventoryRepairKit(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); extern PANEL_STATE ps_PanelEnvironSuit[]; @@ -90,14 +90,14 @@ void PanelInvTestSuicide(PANEL_SPRITE* psp) } } -void KillPanelInv(PLAYERp pp, short InventoryNum) +void KillPanelInv(PLAYER* pp, short InventoryNum) { ASSERT(InventoryNum < MAX_INVENTORY); pp->InventoryTics[InventoryNum] = 0; } -void KillAllPanelInv(PLAYERp pp) +void KillAllPanelInv(PLAYER* pp) { for (int i = 0; i < MAX_INVENTORY; i++) { @@ -111,7 +111,7 @@ void KillAllPanelInv(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -void AutoPickInventory(PLAYERp pp) +void AutoPickInventory(PLAYER* pp) { int i; @@ -137,7 +137,7 @@ void AutoPickInventory(PLAYERp pp) } } -void UseInventoryMedkit(PLAYERp pp) +void UseInventoryMedkit(PLAYER* pp) { short diff; short inv = INVENTORY_MEDKIT; @@ -184,7 +184,7 @@ void UseInventoryMedkit(PLAYERp pp) // CHEMICAL WARFARE CANISTERS // ////////////////////////////////////////////////////////////////////// -void UseInventoryChemBomb(PLAYERp pp) +void UseInventoryChemBomb(PLAYER* pp) { short inv = INVENTORY_CHEMBOMB; @@ -207,7 +207,7 @@ void UseInventoryChemBomb(PLAYERp pp) // FLASH BOMBS // ////////////////////////////////////////////////////////////////////// -void UseInventoryFlashBomb(PLAYERp pp) +void UseInventoryFlashBomb(PLAYER* pp) { short inv = INVENTORY_FLASHBOMB; @@ -230,7 +230,7 @@ void UseInventoryFlashBomb(PLAYERp pp) // CALTROPS // ////////////////////////////////////////////////////////////////////// -void UseInventoryCaltrops(PLAYERp pp) +void UseInventoryCaltrops(PLAYER* pp) { short inv = INVENTORY_CALTROPS; @@ -254,7 +254,7 @@ void UseInventoryCaltrops(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -void UseInventoryRepairKit(PLAYERp pp) +void UseInventoryRepairKit(PLAYER* pp) { short inv = INVENTORY_REPAIR_KIT; @@ -282,7 +282,7 @@ void UseInventoryRepairKit(PLAYERp pp) // ////////////////////////////////////////////////////////////////////// -void UseInventoryCloak(PLAYERp pp) +void UseInventoryCloak(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -307,7 +307,7 @@ void UseInventoryCloak(PLAYERp pp) PlayerSound(DIGI_IAMSHADOW, v3df_follow|v3df_dontpan,pp); } -void StopInventoryCloak(PLAYERp pp, short InventoryNum) +void StopInventoryCloak(PLAYER* pp, short InventoryNum) { DSWActor* plActor = pp->actor; @@ -335,7 +335,7 @@ void StopInventoryCloak(PLAYERp pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// -void DoPlayerNightVisionPalette(PLAYERp pp) +void DoPlayerNightVisionPalette(PLAYER* pp) { if (pp != Player + screenpeek) return; @@ -358,7 +358,7 @@ void DoPlayerNightVisionPalette(PLAYERp pp) } } -void UseInventoryNightVision(PLAYERp pp) +void UseInventoryNightVision(PLAYER* pp) { if (pp->InventoryActive[pp->InventoryNum]) { @@ -375,7 +375,7 @@ void UseInventoryNightVision(PLAYERp pp) PlaySound(DIGI_NIGHTON, pp, v3df_dontpan|v3df_follow); } -void StopInventoryNightVision(PLAYERp pp, short InventoryNum) +void StopInventoryNightVision(PLAYER* pp, short InventoryNum) { pp->InventoryActive[InventoryNum] = false; @@ -402,7 +402,7 @@ void StopInventoryNightVision(PLAYERp pp, short InventoryNum) // ////////////////////////////////////////////////////////////////////// -void InventoryKeys(PLAYERp pp) +void InventoryKeys(PLAYER* pp) { // scroll SPELLs left if (pp->input.actions & SB_INVPREV) @@ -489,7 +489,7 @@ void InventoryKeys(PLAYERp pp) } } -void InventoryTimer(PLAYERp pp) +void InventoryTimer(PLAYER* pp) { // called every time through loop short inv = 0; @@ -567,7 +567,7 @@ void InventoryTimer(PLAYERp pp) } } -void InventoryUse(PLAYERp pp) +void InventoryUse(PLAYER* pp) { INVENTORY_DATA* id = &InventoryData[pp->InventoryNum]; @@ -575,7 +575,7 @@ void InventoryUse(PLAYERp pp) (*id->Init)(pp); } -void InventoryStop(PLAYERp pp, short InventoryNum) +void InventoryStop(PLAYER* pp, short InventoryNum) { INVENTORY_DATA* id = &InventoryData[InventoryNum]; @@ -589,7 +589,7 @@ void InventoryStop(PLAYERp pp, short InventoryNum) // ///////////////////////////////////////////////////////////////// -void PlayerUpdateInventory(PLAYERp pp, short InventoryNum) +void PlayerUpdateInventory(PLAYER* pp, short InventoryNum) { pp->InventoryNum = InventoryNum; diff --git a/source/games/sw/src/inv.h b/source/games/sw/src/inv.h index 1e5bc7dd9..5a4cdc0cf 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)(PLAYERp); - void (*Stop)(PLAYERp, short); + void (*Init)(PLAYER*); + void (*Stop)(PLAYER*, short); short DecPerSec; short MaxInv; int Scale; @@ -56,7 +56,7 @@ enum EInvFlags INVF_COUNT = 4 }; -void PlayerUpdateInventory(PLAYERp pp, short InventoryNum); -void InventoryKeys(PLAYERp pp); -void UseInventoryRepairKit(PLAYERp pp); -void InventoryTimer(PLAYERp pp); +void PlayerUpdateInventory(PLAYER* pp, short InventoryNum); +void InventoryKeys(PLAYER* pp); +void UseInventoryRepairKit(PLAYER* pp); +void InventoryTimer(PLAYER* pp); diff --git a/source/games/sw/src/jsector.cpp b/source/games/sw/src/jsector.cpp index 32126321a..62f6568e5 100644 --- a/source/games/sw/src/jsector.cpp +++ b/source/games/sw/src/jsector.cpp @@ -431,7 +431,7 @@ void JS_ProcessEchoSpot() { int j,dist; - PLAYERp pp = Player+screenpeek; + PLAYER* pp = Player+screenpeek; int16_t reverb; bool reverb_set = false; @@ -475,7 +475,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(PLAYERp pp, int tx, int ty, int tz, double smoothratio) +void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio) { int j, cnt; int dist; @@ -634,7 +634,7 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio) { if (dist < MAXCAMDIST) { - PLAYERp cp = Player + camplayerview; + PLAYER* cp = Player + camplayerview; if (TEST_BOOL11(camactor) && numplayers > 1) { @@ -654,11 +654,11 @@ void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, 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 PLAYERp cam_pp; +static PLAYER* cam_pp; static int cam_tx, cam_ty, cam_tz; static int oldstat; -void JS_CameraParms(PLAYERp pp, int tx, int ty, int tz) +void JS_CameraParms(PLAYER* pp, int tx, int ty, int tz) { cam_pp = pp; cam_tx = tx; diff --git a/source/games/sw/src/jsector.h b/source/games/sw/src/jsector.h index 3e66b1447..ef73923a8 100644 --- a/source/games/sw/src/jsector.h +++ b/source/games/sw/src/jsector.h @@ -64,9 +64,9 @@ extern bool mirrorinview; extern short NormalVisibility; void JAnalyzeSprites(tspritetype* tspr); -void JS_DrawCameras(PLAYERp pp, int tx, int ty, int tz, double smoothratio); -void JS_CameraParms(PLAYERp pp, int tx, int ty, int tz); -void JS_DrawMirrors(PLAYERp pp,int tx,int ty,int tz,fixed_t tpq16ang,fixed_t tpq16horiz); +void JS_DrawCameras(PLAYER* pp, int tx, int ty, int tz, double smoothratio); +void JS_CameraParms(PLAYER* pp, int tx, int ty, int tz); +void JS_DrawMirrors(PLAYER* pp,int tx,int ty,int tz,fixed_t tpq16ang,fixed_t tpq16horiz); 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 ca16368c8..6181c2440 100644 --- a/source/games/sw/src/jweapon.cpp +++ b/source/games/sw/src/jweapon.cpp @@ -1234,7 +1234,7 @@ int DoRadiationCloud(DSWActor* actor) // Inventory Chemical Bombs // ////////////////////////////////////////////// -int PlayerInitChemBomb(PLAYERp pp) +int PlayerInitChemBomb(PLAYER* pp) { DSWActor* plActor = pp->actor; int nx, ny, nz; @@ -1409,7 +1409,7 @@ int InitChemBomb(DSWActor* actor) // ////////////////////////////////////////////// -int PlayerInitFlashBomb(PLAYERp pp) +int PlayerInitFlashBomb(PLAYER* pp) { unsigned int stat; int dist, tx, ty, tmin; @@ -1479,7 +1479,7 @@ int InitFlashBomb(DSWActor* actor) unsigned int stat; int dist, tx, ty, tmin; short damage; - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; PlaySound(DIGI_GASPOP, actor, v3df_dontpan | v3df_doppler); @@ -1608,7 +1608,7 @@ void SpawnFlashBombOnActor(DSWActor* actor) // ////////////////////////////////////////////// -int PlayerInitCaltrops(PLAYERp pp) +int PlayerInitCaltrops(PLAYER* pp) { DSWActor* plActor = pp->actor; int nx, ny, nz; diff --git a/source/games/sw/src/mclip.cpp b/source/games/sw/src/mclip.cpp index 242fb2793..93656d1c1 100644 --- a/source/games/sw/src/mclip.cpp +++ b/source/games/sw/src/mclip.cpp @@ -37,7 +37,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms BEGIN_SW_NS -Collision MultiClipMove(PLAYERp pp, int z, int floor_dist) +Collision MultiClipMove(PLAYER* pp, int z, int floor_dist) { int i; vec3_t opos[MAX_CLIPBOX], pos[MAX_CLIPBOX]; @@ -117,7 +117,7 @@ Collision MultiClipMove(PLAYERp pp, int z, int floor_dist) return min_ret; } -short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist) +short MultiClipTurn(PLAYER* pp, short new_ang, int z, int floor_dist) { int i; SECTOR_OBJECT* sop = pp->sop; @@ -186,7 +186,7 @@ int testquadinsect(int *point_num, vec2_t const * q, sectortype* sect) //Ken gives the tank clippin' a try... -int RectClipMove(PLAYERp pp, int *qx, int *qy) +int RectClipMove(PLAYER* pp, int *qx, int *qy) { int i; vec2_t xy[4]; @@ -265,7 +265,7 @@ int testpointinquad(int x, int y, int *qx, int *qy) return cnt>>31; } -short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy) +short RectClipTurn(PLAYER* pp, short new_ang, int *qx, int *qy, int *ox, int *oy) { int i; vec2_t xy[4]; diff --git a/source/games/sw/src/mclip.h b/source/games/sw/src/mclip.h index 8274e5ade..60fd099b5 100644 --- a/source/games/sw/src/mclip.h +++ b/source/games/sw/src/mclip.h @@ -27,10 +27,10 @@ BEGIN_SW_NS #define RECT_CLIP 1 -Collision MultiClipMove(PLAYERp pp, int z, int floor_dist); -short MultiClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist); -int RectClipMove(PLAYERp pp, int *qx, int *qy); +Collision MultiClipMove(PLAYER* pp, int z, int floor_dist); +short MultiClipTurn(PLAYER* pp, short new_ang, int z, int floor_dist); +int RectClipMove(PLAYER* pp, int *qx, int *qy); int testpointinquad(int x, int y, int *qx, int *qy); -//short RectClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist, int *qx, int *qy); -short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy); +//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); END_SW_NS diff --git a/source/games/sw/src/menus.cpp b/source/games/sw/src/menus.cpp index fcb46e0fe..21ef62205 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(PLAYERp pp, short damage, uint8_t startcolor) +void SetFadeAmt(PLAYER* 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(PLAYERp pp, short damage, uint8_t startcolor) ////////////////////////////////////////// // Do the screen reddness based on damage ////////////////////////////////////////// -void DoPaletteFlash(PLAYERp pp) +void DoPaletteFlash(PLAYER* pp) { const int MAXFADETICS = 5; diff --git a/source/games/sw/src/misc.h b/source/games/sw/src/misc.h index bb344a42d..5b9b3f024 100644 --- a/source/games/sw/src/misc.h +++ b/source/games/sw/src/misc.h @@ -24,7 +24,7 @@ DSWActor* WarpPlane(int32_t* x, int32_t* y, int32_t* z, sectortype** sect); void ProcessVisOn(void); -void VisViewChange(PLAYERp pp, int* vis); +void VisViewChange(PLAYER* pp, int* vis); void SpawnVis(DSWActor* Parent, sectortype* sect, int x, int y, int z, int amt); enum TriggerType { TRIGGER_TYPE_REMOTE_SO }; @@ -48,10 +48,10 @@ void MoveSectorObjects(SECTOR_OBJECT* sop, short locktics); #define TEXT_INFO_YOFF (10) inline constexpr int TEXT_INFO_LINE(int line) { return (TEXT_INFO_Y + ((line)*TEXT_INFO_YOFF)); } -void PutStringInfo(PLAYERp pp, const char* string); +void PutStringInfo(PLAYER* pp, const char* string); -void DoSlidorMatch(PLAYERp pp, short match, bool); +void DoSlidorMatch(PLAYER* pp, short match, bool); bool TestSlidorMatchActive(short match); void InterpSectorSprites(sectortype* sect, bool state); @@ -70,21 +70,21 @@ int DoActorSectorDamage(DSWActor* actor); int DoScaleSprite(DSWActor* actor); int DoActorStopFall(DSWActor* actor); -void InitPlayerSprite(PLAYERp pp); +void InitPlayerSprite(PLAYER* pp); void InitAllPlayerSprites(void); void PlayerPanelSetup(void); -void PlayerDeathReset(PLAYERp pp); -void SpawnPlayerUnderSprite(PLAYERp pp); +void PlayerDeathReset(PLAYER* pp); +void SpawnPlayerUnderSprite(PLAYER* pp); void DoQuakeMatch(short match); void ProcessQuakeOn(void); void ProcessQuakeSpot(void); -void QuakeViewChange(PLAYERp pp, int* z_diff, int* x_diff, int* y_diff, short* ang_diff); -void DoQuake(PLAYERp pp); -bool SetQuake(PLAYERp pp, short tics, short amt); +void QuakeViewChange(PLAYER* pp, int* z_diff, int* x_diff, int* y_diff, short* ang_diff); +void DoQuake(PLAYER* pp); +bool SetQuake(PLAYER* pp, short tics, short amt); int SetExpQuake(DSWActor*); int SetGunQuake(DSWActor*); -int SetPlayerQuake(PLAYERp mpp); +int SetPlayerQuake(PLAYER* 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 3948877b3..31c04d7a7 100644 --- a/source/games/sw/src/network.cpp +++ b/source/games/sw/src/network.cpp @@ -62,7 +62,7 @@ double smoothratio; void InitNetPlayerOptions(void) { // short pnum; - PLAYERp pp = Player + myconnectindex; + PLAYER* 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 b12436e12..08df66605 100644 --- a/source/games/sw/src/network.h +++ b/source/games/sw/src/network.h @@ -33,13 +33,13 @@ enum }; extern bool PredictionOn; extern PLAYER PredictPlayer; -extern PLAYERp ppp; +extern PLAYER* ppp; extern short predictangpos[]; extern int predictmovefifoplc; extern bool Prediction; -void InitPrediction(PLAYERp pp); -void DoPrediction(PLAYERp ppp); +void InitPrediction(PLAYER* pp); +void DoPrediction(PLAYER* ppp); void CorrectPrediction(int actualfifoplc); diff --git a/source/games/sw/src/ninja.cpp b/source/games/sw/src/ninja.cpp index 861a0414c..8b2adaa64 100644 --- a/source/games/sw/src/ninja.cpp +++ b/source/games/sw/src/ninja.cpp @@ -2139,7 +2139,7 @@ void InitAllPlayerSprites(void) } -void PlayerLevelReset(PLAYERp pp) +void PlayerLevelReset(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -2178,7 +2178,7 @@ void PlayerLevelReset(PLAYERp pp) DamageData[actor->user.WeaponNum].Init(pp); } -void PlayerDeathReset(PLAYERp pp) +void PlayerDeathReset(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -2258,7 +2258,7 @@ void PlayerPanelSetup(void) } } -void PlayerGameReset(PLAYERp pp) +void PlayerGameReset(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -2317,7 +2317,7 @@ void PlayerGameReset(PLAYERp pp) extern ACTOR_ACTION_SET PlayerNinjaActionSet; -void InitPlayerSprite(PLAYERp pp) +void InitPlayerSprite(PLAYER* pp) { int pnum = int(pp - Player); extern bool NewGame; @@ -2386,7 +2386,7 @@ void InitPlayerSprite(PLAYERp pp) pp->DeathType = 0; } -void SpawnPlayerUnderSprite(PLAYERp pp) +void SpawnPlayerUnderSprite(PLAYER* pp) { DSWActor* plActor = pp->actor; diff --git a/source/games/sw/src/osdcmds.cpp b/source/games/sw/src/osdcmds.cpp index 8f9843eb2..e05838b13 100644 --- a/source/games/sw/src/osdcmds.cpp +++ b/source/games/sw/src/osdcmds.cpp @@ -129,7 +129,7 @@ void GameInterface::SwitchCoopView() } else { - PLAYERp tp = Player + screenpeek; + PLAYER* tp = Player + screenpeek; DoPlayerDivePalette(tp); DoPlayerNightVisionPalette(tp); } diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 505a03f4e..33edee768 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(PLAYERp pp); +int InitSwordAttack(PLAYER* pp); PANEL_SPRITE* InitWeaponUziSecondaryReload(PANEL_SPRITE*); PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE*); -int InitShotgun(PLAYERp pp); -int InitRail(PLAYERp pp); -int InitMicro(PLAYERp pp); -int InitRocket(PLAYERp pp); -int InitNuke(PLAYERp pp); -int InitGrenade(PLAYERp pp); -int InitMine(PLAYERp pp); -int InitFistAttack(PLAYERp pp); +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); struct PANEL_SHRAP { @@ -67,7 +67,7 @@ struct PANEL_SHRAP void PanelInvTestSuicide(PANEL_SPRITE* psp); -void InsertPanelSprite(PLAYERp pp, PANEL_SPRITE* psp); +void InsertPanelSprite(PLAYER* 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(PLAYERp); -int ChangeWeapon(PLAYERp); +int InitStar(PLAYER*); +int ChangeWeapon(PLAYER*); ANIMATOR InitFire; @@ -107,7 +107,7 @@ void pNullAnimator(PANEL_SPRITE*) return; } -PANEL_SPRITE* pFindMatchingSprite(PLAYERp pp, int x, int y, short pri) +PANEL_SPRITE* pFindMatchingSprite(PLAYER* pp, int x, int y, short pri) { PANEL_SPRITE* next; @@ -127,7 +127,7 @@ PANEL_SPRITE* pFindMatchingSprite(PLAYERp pp, int x, int y, short pri) return nullptr; } -PANEL_SPRITE* pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pri) +PANEL_SPRITE* pFindMatchingSpriteID(PLAYER* pp, short id, int x, int y, short pri) { PANEL_SPRITE* next; @@ -147,7 +147,7 @@ PANEL_SPRITE* pFindMatchingSpriteID(PLAYERp pp, short id, int x, int y, short pr return nullptr; } -bool pKillScreenSpiteIDs(PLAYERp pp, short id) +bool pKillScreenSpiteIDs(PLAYER* pp, short id) { PANEL_SPRITE* next; bool found = false; @@ -182,7 +182,7 @@ void pToggleCrosshair(void) } // Player has a chance of yelling out during combat, when firing a weapon. -void DoPlayerChooseYell(PLAYERp pp) +void DoPlayerChooseYell(PLAYER* pp) { int choose_snd = 0; @@ -214,7 +214,7 @@ void ArmorCalc(int damage_amt, int *armor_damage, int *player_damage) } -void PlayerUpdateHealth(PLAYERp pp, short value) +void PlayerUpdateHealth(PLAYER* pp, short value) { DSWActor* plActor = pp->actor; short x,y; @@ -318,7 +318,7 @@ void PlayerUpdateHealth(PLAYERp pp, short value) plActor->user.Health = pp->MaxHealth; } -void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) +void PlayerUpdateAmmo(PLAYER* pp, short UpdateWeaponNum, short value) { short x,y; short WeaponNum; @@ -356,7 +356,7 @@ void PlayerUpdateAmmo(PLAYERp pp, short UpdateWeaponNum, short value) } } -void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum) +void PlayerUpdateWeapon(PLAYER* pp, short WeaponNum) { DSWActor* plActor = pp->actor; @@ -367,7 +367,7 @@ void PlayerUpdateWeapon(PLAYERp pp, short WeaponNum) plActor->user.WeaponNum = int8_t(WeaponNum); } -void PlayerUpdateKills(PLAYERp pp, short value) +void PlayerUpdateKills(PLAYER* pp, short value) { if (Prediction) return; @@ -379,7 +379,7 @@ void PlayerUpdateKills(PLAYERp pp, short value) if (gNet.MultiGameType == MULTI_GAME_COMMBAT && gNet.TeamPlay) { short pnum; - PLAYERp opp; + PLAYER* opp; TRAVERSE_CONNECT(pnum) { @@ -404,7 +404,7 @@ void PlayerUpdateKills(PLAYERp pp, short value) pp->Kills = -99; } -void PlayerUpdateArmor(PLAYERp pp, short value) +void PlayerUpdateArmor(PLAYER* pp, short value) { if (Prediction) return; @@ -421,7 +421,7 @@ void PlayerUpdateArmor(PLAYERp pp, short value) } -int WeaponOperate(PLAYERp pp) +int WeaponOperate(PLAYER* pp) { short weapon; DSWActor* plActor = pp->actor; @@ -639,7 +639,7 @@ int WeaponOperate(PLAYERp pp) return 0; } -bool WeaponOK(PLAYERp pp) +bool WeaponOK(PLAYER* pp) { short min_ammo, WeaponNum, FindWeaponNum; static const uint8_t wpn_order[] = {2,3,4,5,6,7,8,9,1,0}; @@ -887,7 +887,7 @@ void SpecialUziRetractFunc(PANEL_SPRITE* psp) } } -void RetractCurWpn(PLAYERp pp) +void RetractCurWpn(PLAYER* pp) { // Retract old weapon if (pp->CurWpn) @@ -924,7 +924,7 @@ void RetractCurWpn(PLAYERp pp) } } -void InitWeaponSword(PLAYERp pp) +void InitWeaponSword(PLAYER* pp) { PANEL_SPRITE* psp; short rnd_num; @@ -1318,7 +1318,7 @@ void pStarRestTest(PANEL_SPRITE* psp) pSetState(psp, psp->RestState); } -void InitWeaponStar(PLAYERp pp) +void InitWeaponStar(PLAYER* pp) { PANEL_SPRITE* psp = nullptr; @@ -1851,7 +1851,7 @@ void pUziReloadRetract(PANEL_SPRITE* nclip) void pUziDoneReload(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; if (psp->flags & (PANF_PRIMARY) && pp->WpnUziType == 3) @@ -1930,7 +1930,7 @@ void pUziClip(PANEL_SPRITE* oclip) // Uzi Basic Stuff // -void InitWeaponUzi(PLAYERp pp) +void InitWeaponUzi(PLAYER* pp) { PANEL_SPRITE* psp = nullptr; @@ -2013,7 +2013,7 @@ void InitWeaponUzi(PLAYERp pp) PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE* uzi_orig) { PANEL_SPRITE* New; - PLAYERp pp = uzi_orig->PlayerP; + PLAYER* pp = uzi_orig->PlayerP; // There is already a second uzi, or it's retracting @@ -2048,7 +2048,7 @@ PANEL_SPRITE* InitWeaponUzi2(PANEL_SPRITE* uzi_orig) PANEL_SPRITE* InitWeaponUziSecondaryReload(PANEL_SPRITE* uzi_orig) { PANEL_SPRITE* New; - PLAYERp pp = uzi_orig->PlayerP; + PLAYER* pp = uzi_orig->PlayerP; New = pSpawnSprite(pp, ps_PresentUzi, PRI_MID, 160 - UZI_XOFF, UZI_YOFF); New->pos.Y += tileHeight(New->picndx); @@ -2260,7 +2260,7 @@ void pUziAction(PANEL_SPRITE* psp) void pUziFire(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; if (!WeaponOK(psp->PlayerP)) return; @@ -2381,7 +2381,7 @@ PANEL_STATE ps_Uzi2Shell[] = void SpawnUziShell(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; if (psp->State && (psp->State->flags & psf_Xflip)) { @@ -2450,7 +2450,7 @@ PANEL_STATE ps_ShotgunShell[] = void SpawnShotgunShell(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; SpawnShell(pp->actor,-4); } @@ -2591,7 +2591,7 @@ PANEL_STATE ps_RetractShotgun[] = #define SHOTGUN_YOFF 200 #define SHOTGUN_XOFF (160+42) -void InitWeaponShotgun(PLAYERp pp) +void InitWeaponShotgun(PLAYER* pp) { PANEL_SPRITE* psp = nullptr; @@ -3061,7 +3061,7 @@ PANEL_STATE ps_RetractRail[] = //#define RAIL_XOFF (160+60) #define RAIL_XOFF (160+6) -void InitWeaponRail(PLAYERp pp) +void InitWeaponRail(PLAYER* pp) { PANEL_SPRITE* psp = nullptr; @@ -3484,7 +3484,7 @@ void pHotHeadOverlays(PANEL_SPRITE* psp, short mode) #define HOTHEAD_XOFF (200 + HOTHEAD_BOB_X_AMT + 6) #define HOTHEAD_YOFF 200 -void InitWeaponHothead(PLAYERp pp) +void InitWeaponHothead(PLAYER* pp) { PANEL_SPRITE* psp = nullptr; @@ -3734,7 +3734,7 @@ PANEL_STATE ps_OnFire[] = #define ON_FIRE_Y_TOP 190 #define ON_FIRE_Y_BOT 230 -void SpawnOnFire(PLAYERp pp) +void SpawnOnFire(PLAYER* pp) { PANEL_SPRITE* fire; short x = 50; @@ -3894,7 +3894,7 @@ void pMicroSetRecoil(PANEL_SPRITE* psp) psp->ang = NORM_ANGLE(-256); } -void InitWeaponMicro(PLAYERp pp) +void InitWeaponMicro(PLAYER* pp) { PANEL_SPRITE* psp; @@ -3990,7 +3990,7 @@ void pMicroRecoilUp(PANEL_SPRITE* psp) void pMicroPresent(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; if (psp->PlayerP->Flags & (PF_WEAPON_RETRACT)) return; @@ -4140,7 +4140,7 @@ PANEL_STATE ps_MicroNukeFlash[] = void pMicroRest(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; bool force = !!(psp->flags & PANF_UNHIDE_SHOOT); if (pWeaponHideKeys(psp, ps_MicroHide)) @@ -4252,7 +4252,7 @@ void pMicroRetract(PANEL_SPRITE* psp) void pNukeAction(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; #if 0 // Code commented out as it's causing interpolation issues when initialising a nuke. psp->backupy(); @@ -4273,7 +4273,7 @@ void pNukeAction(PANEL_SPRITE* psp) void pMicroStandBy(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; pMicroOverlays(psp); PlaySound(DIGI_NUKESTDBY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); @@ -4281,14 +4281,14 @@ void pMicroStandBy(PANEL_SPRITE* psp) void pMicroCount(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; PlaySound(DIGI_NUKECDOWN, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); } void pMicroReady(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; PlaySound(DIGI_NUKEREADY, pp, v3df_follow|v3df_dontpan, CHAN_WEAPON); pp->NukeInitialized = true; @@ -4360,7 +4360,7 @@ PANEL_STATE ps_RetractHeart[] = #define HEART_YOFF 212 -void InitWeaponHeart(PLAYERp pp) +void InitWeaponHeart(PLAYER* pp) { PANEL_SPRITE* psp; @@ -4517,13 +4517,13 @@ void pHeartActionBlood(PANEL_SPRITE* psp) SpawnHeartBlood(psp); } -void InitHeartAttack(PLAYERp pp); +void InitHeartAttack(PLAYER* pp); void pHeartAttack(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; // CTW MODIFICATION - //int InitHeartAttack(PLAYERp pp); + //int InitHeartAttack(PLAYER* pp); // CTW MODIFICATION END PlaySound(DIGI_HEARTFIRE, pp, v3df_follow|v3df_dontpan); @@ -4583,7 +4583,7 @@ PANEL_STATE ps_HeartBloodSmall[] = void SpawnHeartBlood(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; PANEL_SPRITE* blood; PANEL_SHRAP* hsp; @@ -4622,7 +4622,7 @@ void SpawnHeartBlood(PANEL_SPRITE* psp) void SpawnSmallHeartBlood(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; PANEL_SPRITE* blood; PANEL_SHRAP* hsp; @@ -4818,7 +4818,7 @@ void pGrenadePresentSetup(PANEL_SPRITE* psp) psp->vel = 680; } -void InitWeaponGrenade(PLAYERp pp) +void InitWeaponGrenade(PLAYER* pp) { PANEL_SPRITE* psp; @@ -5077,7 +5077,7 @@ PANEL_STATE ps_RetractMine[] = //#define MINE_XOFF (160+20) #define MINE_XOFF (160+50) -void InitWeaponMine(PLAYERp pp) +void InitWeaponMine(PLAYER* pp) { PANEL_SPRITE* psp; @@ -5125,7 +5125,7 @@ void InitWeaponMine(PLAYERp pp) void pMineUpSound(PANEL_SPRITE* psp) { - PLAYERp pp = psp->PlayerP; + PLAYER* pp = psp->PlayerP; PlaySound(DIGI_MINE_UP, pp, v3df_follow); } @@ -5348,7 +5348,7 @@ PANEL_STATE ps_ChopsRetract[] = #define CHOPS_YOFF 200 #define CHOPS_XOFF (160+20) -void InitChops(PLAYERp pp) +void InitChops(PLAYER* pp) { PANEL_SPRITE* psp; @@ -5455,7 +5455,7 @@ void pChopsWait(PANEL_SPRITE* psp) } } -void ChopsSetRetract(PLAYERp pp) +void ChopsSetRetract(PLAYER* pp) { if (pp == nullptr || pp->Chops == nullptr) return; @@ -5709,7 +5709,7 @@ PANEL_STATE ps_RetractFist[] = #define FIST_VEL 3000 #define FIST_POWER_VEL 3000 -void InitWeaponFist(PLAYERp pp) +void InitWeaponFist(PLAYER* pp) { PANEL_SPRITE* psp; short rnd_num; @@ -6106,7 +6106,7 @@ void pFistBlock(PANEL_SPRITE* psp) -void pWeaponForceRest(PLAYERp pp) +void pWeaponForceRest(PLAYER* pp) { pSetState(pp->CurWpn, pp->CurWpn->RestState); } @@ -6193,7 +6193,7 @@ bool pWeaponHideKeys(PANEL_SPRITE* psp, PANEL_STATE* state) } -void InsertPanelSprite(PLAYERp pp, PANEL_SPRITE* psp) +void InsertPanelSprite(PLAYER* pp, PANEL_SPRITE* psp) { PANEL_SPRITE* cur,* nxt; @@ -6235,7 +6235,7 @@ void InsertPanelSprite(PLAYERp pp, PANEL_SPRITE* psp) } -PANEL_SPRITE* pSpawnSprite(PLAYERp pp, PANEL_STATE* state, uint8_t priority, double x, double y) +PANEL_SPRITE* pSpawnSprite(PLAYER* pp, PANEL_STATE* state, uint8_t priority, double x, double y) { unsigned i; PANEL_SPRITE* psp; @@ -6291,7 +6291,7 @@ void pKillSprite(PANEL_SPRITE* psp) FreeMem(psp); } -void pClearSpriteList(PLAYERp pp) +void pClearSpriteList(PLAYER* pp) { PANEL_SPRITE* psp = nullptr, * next_psp = nullptr; auto l = &pp->PanelSpriteList; @@ -6364,7 +6364,7 @@ void pWeaponBob(PANEL_SPRITE* psp, short condition) ////////////////////////////////////////////////////////////////////////////////////////// bool DrawBeforeView = false; -void pDisplaySprites(PLAYERp pp, double smoothratio) +void pDisplaySprites(PLAYER* pp, double smoothratio) { DSWActor* plActor = pp->actor; PANEL_SPRITE* next=nullptr; @@ -6652,7 +6652,7 @@ void pDisplaySprites(PLAYERp pp, double smoothratio) } } -void pSpriteControl(PLAYERp pp) +void pSpriteControl(PLAYER* pp) { PANEL_SPRITE* next=nullptr; diff --git a/source/games/sw/src/panel.h b/source/games/sw/src/panel.h index 68d731247..d3b850cf7 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; - PLAYERp PlayerP; + PLAYER* PlayerP; DVector2 pos, opos, bobpos; PANEL_SPRITE_OVERLAY over[8]; @@ -190,16 +190,16 @@ enum }; -PANEL_SPRITE* pSpawnSprite(PLAYERp pp, PANEL_STATE* state, uint8_t priority, double x, double y); +PANEL_SPRITE* pSpawnSprite(PLAYER* pp, PANEL_STATE* state, uint8_t priority, double x, double y); void pSetSuicide(PANEL_SPRITE* psp); -bool pKillScreenSpiteIDs(PLAYERp pp, short id); +bool pKillScreenSpiteIDs(PLAYER* pp, short id); void PreUpdatePanel(double smoothratio); void UpdatePanel(double smoothratio); -void PlayerUpdateArmor(PLAYERp pp,short value); +void PlayerUpdateArmor(PLAYER* pp,short value); void pToggleCrosshair(void); void pKillSprite(PANEL_SPRITE* psp); -void InitChops(PLAYERp pp); -void ChopsSetRetract(PLAYERp pp); +void InitChops(PLAYER* pp); +void ChopsSetRetract(PLAYER* pp); END_SW_NS diff --git a/source/games/sw/src/player.cpp b/source/games/sw/src/player.cpp index 07a41f3af..6e9474dd4 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(PLAYERp pp); -int WeaponOperate(PLAYERp pp); +void pSpriteControl(PLAYER* pp); +int WeaponOperate(PLAYER* pp); SECTOR_OBJECT* PlayerOnObject(sectortype* sect_match); -void PlayerRemoteReset(PLAYERp pp, sectortype* sect); -void KillAllPanelInv(PLAYERp pp); -void DoPlayerDeathDrown(PLAYERp pp); -void pWeaponForceRest(PLAYERp pp); +void PlayerRemoteReset(PLAYER* pp, sectortype* sect); +void KillAllPanelInv(PLAYER* pp); +void DoPlayerDeathDrown(PLAYER* pp); +void pWeaponForceRest(PLAYER* pp); #define SO_DRIVE_SOUND 2 #define SO_IDLE_SOUND 1 @@ -130,54 +130,54 @@ PLAYER Player[MAX_SW_PLAYERS_REG + 1]; short NormalVisibility; DSWActor* FindNearSprite(DSWActor*, short stat); -bool PlayerOnLadder(PLAYERp pp); -void DoPlayerSlide(PLAYERp pp); -void DoPlayerBeginSwim(PLAYERp pp); -void DoPlayerSwim(PLAYERp pp); -void DoPlayerWade(PLAYERp pp); -void DoPlayerBeginWade(PLAYERp pp); -void DoPlayerBeginCrawl(PLAYERp pp); -void DoPlayerCrawl(PLAYERp pp); -void DoPlayerRun(PLAYERp pp); -void DoPlayerBeginRun(PLAYERp pp); -void DoPlayerFall(PLAYERp pp); -void DoPlayerBeginFall(PLAYERp pp); -void DoPlayerJump(PLAYERp pp); -void DoPlayerBeginJump(PLAYERp pp); -void DoPlayerForceJump(PLAYERp pp); -void DoPlayerBeginFly(PLAYERp pp); -void DoPlayerFly(PLAYERp pp); -void DoPlayerBeginClimb(PLAYERp pp); -void DoPlayerClimb(PLAYERp pp); -void DoPlayerBeginDie(PLAYERp pp); -void DoPlayerDie(PLAYERp pp); -// void DoPlayerBeginOperateBoat(PLAYERp pp); -void DoPlayerBeginOperateVehicle(PLAYERp pp); -void DoPlayerBeginOperate(PLAYERp pp); -// void DoPlayerOperateBoat(PLAYERp pp); -void DoPlayerOperateVehicle(PLAYERp pp); -void DoPlayerOperateTurret(PLAYERp pp); -void DoPlayerBeginDive(PLAYERp pp); -void DoPlayerDive(PLAYERp pp); -void DoPlayerTeleportPause(PLAYERp pp); +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); +void DoPlayerDie(PLAYER* pp); +// void DoPlayerBeginOperateBoat(PLAYER* pp); +void DoPlayerBeginOperateVehicle(PLAYER* pp); +void DoPlayerBeginOperate(PLAYER* 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); bool PlayerFlyKey(void); void OperateSectorObject(SECTOR_OBJECT* sop, short newang, int newx, int newy); -void CheckFootPrints(PLAYERp pp); -bool DoPlayerTestCrawl(PLAYERp pp); -void DoPlayerDeathFlip(PLAYERp pp); -void DoPlayerDeathCrumble(PLAYERp pp); -void DoPlayerDeathExplode(PLAYERp pp); -void DoPlayerDeathFall(PLAYERp pp); +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 PlayerCheckValidMove(PLAYERp pp); -void PlayerWarpUpdatePos(PLAYERp pp); -void DoPlayerBeginDiveNoWarp(PLAYERp pp); -int PlayerCanDiveNoWarp(PLAYERp pp); -void DoPlayerCurrent(PLAYERp pp); +void PlayerCheckValidMove(PLAYER* pp); +void PlayerWarpUpdatePos(PLAYER* pp); +void DoPlayerBeginDiveNoWarp(PLAYER* pp); +int PlayerCanDiveNoWarp(PLAYER* pp); +void DoPlayerCurrent(PLAYER* pp); int GetOverlapSector2(int x, int y, sectortype** over, sectortype** under); -void PlayerToRemote(PLAYERp pp); -void PlayerRemoteInit(PLAYERp pp); -void PlayerSpawnPosition(PLAYERp pp); +void PlayerToRemote(PLAYER* pp); +void PlayerRemoteInit(PLAYER* pp); +void PlayerSpawnPosition(PLAYER* pp); extern short target_ang; @@ -1054,7 +1054,7 @@ STATEp sg_PlayerNinjaFly[] = ///////////////////////////////////////////////////////////////////////////// -void DoPlayerSpriteThrow(PLAYERp pp) +void DoPlayerSpriteThrow(PLAYER* pp) { if (!(pp->Flags & (PF_DIVING|PF_FLYING|PF_CRAWLING))) { @@ -1070,7 +1070,7 @@ void DoPlayerSpriteThrow(PLAYERp pp) int DoPlayerSpriteReset(DSWActor* actor) { - PLAYERp pp; + PLAYER* pp; if (!actor->user.PlayerP) return 0; @@ -1241,7 +1241,7 @@ DSWActor* DoPickTarget(DSWActor* actor, uint32_t max_delta_ang, int skip_targets return TargetSort[0].actor; } -void DoPlayerResetMovement(PLAYERp pp) +void DoPlayerResetMovement(PLAYER* pp) { pp->vect.X = pp->ovect.X = 0; pp->vect.Y = pp->ovect.Y = 0; @@ -1251,7 +1251,7 @@ void DoPlayerResetMovement(PLAYERp pp) pp->Flags &= ~(PF_PLAYER_MOVED); } -void DoPlayerTeleportPause(PLAYERp pp) +void DoPlayerTeleportPause(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -1268,7 +1268,7 @@ void DoPlayerTeleportPause(PLAYERp pp) } } -void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* pos, int ang) +void DoPlayerTeleportToSprite(PLAYER* pp, vec3_t* pos, int ang) { pp->angle.ang = pp->angle.oang = buildang(ang); pp->pos.X = pp->opos.X = pp->oldpos.X = pos->X; @@ -1283,7 +1283,7 @@ void DoPlayerTeleportToSprite(PLAYERp pp, vec3_t* pos, int ang) pp->Flags2 |= (PF2_TELEPORTED); } -void DoPlayerTeleportToOffset(PLAYERp pp) +void DoPlayerTeleportToOffset(PLAYER* pp) { pp->opos.X = pp->oldpos.X = pp->pos.X; pp->opos.Y = pp->oldpos.Y = pp->pos.Y; @@ -1335,7 +1335,7 @@ void DoSpawnTeleporterEffectPlace(DSWActor* actor) effectActor->spr.cstat |= (CSTAT_SPRITE_ALIGNMENT_WALL); } -void DoPlayerWarpTeleporter(PLAYERp pp) +void DoPlayerWarpTeleporter(PLAYER* pp) { auto ppActor = pp->actor; short pnum; @@ -1381,7 +1381,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp) { if (pnum != pp - Player) { - PLAYERp npp = &Player[pnum]; + PLAYER* npp = &Player[pnum]; // if someone already standing there if (npp->cursector == pp->cursector) @@ -1399,7 +1399,7 @@ void DoPlayerWarpTeleporter(PLAYERp pp) ppActor->backuppos(); } -void DoPlayerSetWadeDepth(PLAYERp pp) +void DoPlayerSetWadeDepth(PLAYER* pp) { sectortype* sectp; @@ -1419,7 +1419,7 @@ void DoPlayerSetWadeDepth(PLAYERp pp) } -void DoPlayerHeight(PLAYERp pp) +void DoPlayerHeight(PLAYER* pp) { int diff; @@ -1428,7 +1428,7 @@ void DoPlayerHeight(PLAYERp pp) pp->pos.Z = pp->pos.Z - ((diff >> 2) + (diff >> 3)); } -void DoPlayerJumpHeight(PLAYERp pp) +void DoPlayerJumpHeight(PLAYER* pp) { if (pp->lo_sectp && (pp->lo_sectp->extra & SECTFX_DYNAMIC_AREA)) { @@ -1440,7 +1440,7 @@ void DoPlayerJumpHeight(PLAYERp pp) } } -void DoPlayerCrawlHeight(PLAYERp pp) +void DoPlayerCrawlHeight(PLAYER* pp) { int diff; @@ -1448,7 +1448,7 @@ void DoPlayerCrawlHeight(PLAYERp pp) pp->pos.Z = pp->pos.Z - ((diff >> 2) + (diff >> 3)); } -void UpdatePlayerSpriteAngle(PLAYERp pp) +void UpdatePlayerSpriteAngle(PLAYER* pp) { DSWActor* plActor = pp->actor; plActor->backupang(); @@ -1463,13 +1463,13 @@ void UpdatePlayerSpriteAngle(PLAYERp pp) } } -void DoPlayerTurn(PLAYERp pp, float const avel, double const scaleAdjust) +void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust) { pp->angle.applyinput(avel, &pp->input.actions, scaleAdjust); UpdatePlayerSpriteAngle(pp); } -void DoPlayerTurnVehicle(PLAYERp pp, float avel, int z, int floor_dist) +void DoPlayerTurnVehicle(PLAYER* pp, float avel, int z, int floor_dist) { SECTOR_OBJECT* sop = pp->sop; @@ -1496,7 +1496,7 @@ void DoPlayerTurnVehicle(PLAYERp pp, float avel, int z, int floor_dist) } } -void DoPlayerTurnVehicleRect(PLAYERp pp, int *x, int *y, int *ox, int *oy) +void DoPlayerTurnVehicleRect(PLAYER* pp, int *x, int *y, int *ox, int *oy) { float avel; SECTOR_OBJECT* sop = pp->sop; @@ -1524,7 +1524,7 @@ void DoPlayerTurnVehicleRect(PLAYERp pp, int *x, int *y, int *ox, int *oy) } } -void DoPlayerTurnTurret(PLAYERp pp, float avel) +void DoPlayerTurnTurret(PLAYER* pp, float avel) { binangle new_ang, diff; SECTOR_OBJECT* sop = pp->sop; @@ -1565,7 +1565,7 @@ void DoPlayerTurnTurret(PLAYERp pp, float avel) OperateSectorObject(pp->sop, pp->angle.ang.asbuild(), pp->sop->xmid, pp->sop->ymid); } -void SlipSlope(PLAYERp pp) +void SlipSlope(PLAYER* pp) { short ang; @@ -1585,14 +1585,14 @@ void SlipSlope(PLAYERp pp) pp->vect.Y += MulScale(bsin(ang), pp->cursector->floorheinum, sectu->speed); } -void DoPlayerHorizon(PLAYERp pp, float const horz, double const scaleAdjust) +void DoPlayerHorizon(PLAYER* pp, float const horz, double const scaleAdjust) { bool const canslopetilt = !(pp->Flags & (PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)) && pp->cursector && (pp->cursector->floorstat & CSTAT_SECTOR_SLOPE); pp->horizon.calcviewpitch(pp->pos.vec2, pp->angle.ang, pp->input.actions & SB_AIMMODE, canslopetilt, pp->cursector, scaleAdjust, (pp->Flags & PF_CLIMBING)); pp->horizon.applyinput(horz, &pp->input.actions, scaleAdjust); } -void DoPlayerBob(PLAYERp pp) +void DoPlayerBob(PLAYER* pp) { int dist; int amt; @@ -1630,7 +1630,7 @@ void DoPlayerBob(PLAYERp pp) pp->bob_z = MulScale(Z(amt), bsin(pp->bcnt), 14); } -void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt) +void DoPlayerBeginRecoil(PLAYER* pp, short pix_amt) { pp->Flags |= (PF_RECOIL); @@ -1640,7 +1640,7 @@ void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt) pp->recoil_ohorizoff = pp->recoil_horizoff = 0; } -void DoPlayerRecoil(PLAYERp pp) +void DoPlayerRecoil(PLAYER* pp) { // controls how fast you move through the sin table pp->recoil_ndx += pp->recoil_speed; @@ -1660,7 +1660,7 @@ void DoPlayerRecoil(PLAYERp pp) // for wading -void DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob_speed) +void DoPlayerSpriteBob(PLAYER* pp, short player_height, short bob_amt, short bob_speed) { pp->bob_ndx = (pp->bob_ndx + (synctics << bob_speed)) & 2047; @@ -1670,7 +1670,7 @@ void DoPlayerSpriteBob(PLAYERp pp, short player_height, short bob_amt, short bob pp->actor->spr.pos.Z = (pp->pos.Z + player_height) + pp->bob_amt; } -void UpdatePlayerUnderSprite(PLAYERp pp) +void UpdatePlayerUnderSprite(PLAYER* pp) { DSWActor* act_over = pp->actor; @@ -1731,7 +1731,7 @@ void UpdatePlayerUnderSprite(PLAYERp pp) } -void UpdatePlayerSprite(PLAYERp pp) +void UpdatePlayerSprite(PLAYER* pp) { DSWActor* actor = pp->actor; if (!actor) return; @@ -1823,7 +1823,7 @@ void UpdatePlayerSprite(PLAYERp pp) actor->spr.ang = pp->angle.ang.asbuild(); } -void DoPlayerZrange(PLAYERp pp) +void DoPlayerZrange(PLAYER* pp) { Collision ceilhit, florhit; @@ -1878,7 +1878,7 @@ void DoPlayerZrange(PLAYERp pp) } } -void DoPlayerSlide(PLAYERp pp) +void DoPlayerSlide(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -1928,7 +1928,7 @@ void DoPlayerSlide(PLAYERp pp) } } -void PlayerCheckValidMove(PLAYERp pp) +void PlayerCheckValidMove(PLAYER* pp) { if (!pp->insector()) { @@ -1947,7 +1947,7 @@ void PlayerCheckValidMove(PLAYERp pp) } } -void PlayerSectorBound(PLAYERp pp, int amt) +void PlayerSectorBound(PLAYER* pp, int amt) { if (!pp->insector()) return; @@ -1973,7 +1973,7 @@ void PlayerSectorBound(PLAYERp pp, int amt) } -void DoPlayerMove(PLAYERp pp) +void DoPlayerMove(PLAYER* pp) { DSWActor* actor = pp->actor; int friction; @@ -1985,7 +1985,7 @@ void DoPlayerMove(PLAYERp 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(PLAYERp pp); + void SlipSlope(PLAYER* pp); SlipSlope(pp); @@ -2151,7 +2151,7 @@ void DoPlayerMove(PLAYERp pp) } } -void DoPlayerSectorUpdatePreMove(PLAYERp pp) +void DoPlayerSectorUpdatePreMove(PLAYER* pp) { auto sect = pp->cursector; @@ -2182,7 +2182,7 @@ void DoPlayerSectorUpdatePreMove(PLAYERp pp) pp->setcursector(sect); } -void DoPlayerSectorUpdatePostMove(PLAYERp pp) +void DoPlayerSectorUpdatePostMove(PLAYER* pp) { auto sect = pp->cursector; int fz,cz; @@ -2242,7 +2242,7 @@ void StopSOsound(sectortype* sect) } -void DoTankTreads(PLAYERp pp) +void DoTankTreads(PLAYER* pp) { int i; int vel; @@ -2337,7 +2337,7 @@ void DoTankTreads(PLAYERp pp) } -void SetupDriveCrush(PLAYERp pp, int *x, int *y) +void SetupDriveCrush(PLAYER* pp, int *x, int *y) { int radius = pp->sop_control->clipdist; @@ -2354,7 +2354,7 @@ void SetupDriveCrush(PLAYERp pp, int *x, int *y) y[3] = pp->pos.Y + radius; } -void DriveCrush(PLAYERp pp, int *x, int *y) +void DriveCrush(PLAYER* pp, int *x, int *y) { int testpointinquad(int x, int y, int *qx, int *qy); @@ -2497,7 +2497,7 @@ void DriveCrush(PLAYERp pp, int *x, int *y) } } -void DoPlayerMoveVehicle(PLAYERp pp) +void DoPlayerMoveVehicle(PLAYER* pp) { int z; int floor_dist; @@ -2710,7 +2710,7 @@ void DoPlayerMoveVehicle(PLAYERp pp) DoTankTreads(pp); } -void DoPlayerMoveTurret(PLAYERp pp) +void DoPlayerMoveTurret(PLAYER* pp) { if (!Prediction) { @@ -2744,7 +2744,7 @@ void DoPlayerMoveTurret(PLAYERp pp) } } -void DoPlayerBeginJump(PLAYERp pp) +void DoPlayerBeginJump(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -2774,7 +2774,7 @@ void DoPlayerBeginJump(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Jump); } -void DoPlayerBeginForceJump(PLAYERp pp) +void DoPlayerBeginForceJump(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -2795,7 +2795,7 @@ void DoPlayerBeginForceJump(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Jump); } -void DoPlayerJump(PLAYERp pp) +void DoPlayerJump(PLAYER* pp) { short i; @@ -2880,7 +2880,7 @@ void DoPlayerJump(PLAYERp pp) } -void DoPlayerForceJump(PLAYERp pp) +void DoPlayerForceJump(PLAYER* pp) { short i; @@ -2919,7 +2919,7 @@ void DoPlayerForceJump(PLAYERp pp) DoPlayerMove(pp); } -void DoPlayerBeginFall(PLAYERp pp) +void DoPlayerBeginFall(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -2939,7 +2939,7 @@ void DoPlayerBeginFall(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Fall); } -void StackedWaterSplash(PLAYERp pp) +void StackedWaterSplash(PLAYER* pp) { if (FAF_ConnectArea(pp->cursector)) { @@ -2954,7 +2954,7 @@ void StackedWaterSplash(PLAYERp pp) } } -void DoPlayerFall(PLAYERp pp) +void DoPlayerFall(PLAYER* pp) { short i; int recoil_amt; @@ -3108,7 +3108,7 @@ void DoPlayerFall(PLAYERp pp) DoPlayerMove(pp); } -void DoPlayerBeginClimb(PLAYERp pp) +void DoPlayerBeginClimb(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -3128,7 +3128,7 @@ void DoPlayerBeginClimb(PLAYERp pp) } -void DoPlayerClimb(PLAYERp pp) +void DoPlayerClimb(PLAYER* pp) { DSWActor* plActor = pp->actor; int climb_amt; @@ -3354,7 +3354,7 @@ void DoPlayerClimb(PLAYERp pp) } -int DoPlayerWadeSuperJump(PLAYERp pp) +int DoPlayerWadeSuperJump(PLAYER* pp) { HitInfo hit{}; unsigned i; @@ -3399,7 +3399,7 @@ bool PlayerFlyKey(void) return true; } -void DoPlayerBeginCrawl(PLAYERp pp) +void DoPlayerBeginCrawl(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -3416,7 +3416,7 @@ void DoPlayerBeginCrawl(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Crawl); } -bool PlayerFallTest(PLAYERp pp, int player_height) +bool PlayerFallTest(PLAYER* pp, int player_height) { // If the floor is far below you, fall hard instead of adjusting height if (labs(pp->pos.Z - pp->loz) > player_height + PLAYER_FALL_HEIGHT) @@ -3440,7 +3440,7 @@ bool PlayerFallTest(PLAYERp pp, int player_height) const int PLAYER_STANDING_ROOM = Z(68); -void DoPlayerCrawl(PLAYERp pp) +void DoPlayerCrawl(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -3511,7 +3511,7 @@ void DoPlayerCrawl(PLAYERp pp) DoPlayerCrawlHeight(pp); } -void DoPlayerBeginFly(PLAYERp pp) +void DoPlayerBeginFly(PLAYER* pp) { pp->Flags &= ~(PF_FALLING | PF_JUMPING | PF_CRAWLING); pp->Flags |= (PF_FLYING); @@ -3538,7 +3538,7 @@ int GetSinNdx(int range, int bob_amt) return bob_amt * amt; } -void PlayerWarpUpdatePos(PLAYERp pp) +void PlayerWarpUpdatePos(PLAYER* pp) { if (Prediction) return; @@ -3550,7 +3550,7 @@ void PlayerWarpUpdatePos(PLAYERp pp) UpdatePlayerSprite(pp); } -bool PlayerCeilingHit(PLAYERp pp, int zlimit) +bool PlayerCeilingHit(PLAYER* pp, int zlimit) { if (pp->pos.Z < zlimit) { @@ -3560,7 +3560,7 @@ bool PlayerCeilingHit(PLAYERp pp, int zlimit) return false; } -bool PlayerFloorHit(PLAYERp pp, int zlimit) +bool PlayerFloorHit(PLAYER* pp, int zlimit) { if (pp->pos.Z > zlimit) { @@ -3570,7 +3570,7 @@ bool PlayerFloorHit(PLAYERp pp, int zlimit) return false; } -void DoPlayerFly(PLAYERp pp) +void DoPlayerFly(PLAYER* pp) { if (SectorIsUnderwaterArea(pp->cursector)) { @@ -3651,7 +3651,7 @@ DSWActor* FindNearSprite(DSWActor* actor, short stat) return near_fp; } -bool PlayerOnLadder(PLAYERp pp) +bool PlayerOnLadder(PLAYER* pp) { int nx, ny; unsigned i; @@ -3735,7 +3735,7 @@ bool PlayerOnLadder(PLAYERp pp) return true; } -bool DoPlayerTestCrawl(PLAYERp pp) +bool DoPlayerTestCrawl(PLAYER* pp) { if (labs(pp->loz - pp->hiz) < PLAYER_STANDING_ROOM) return true; @@ -3743,7 +3743,7 @@ bool DoPlayerTestCrawl(PLAYERp pp) return false; } -int PlayerInDiveArea(PLAYERp pp) +int PlayerInDiveArea(PLAYER* pp) { sectortype* sectp; @@ -3767,7 +3767,7 @@ int PlayerInDiveArea(PLAYERp pp) return false; } -int PlayerCanDive(PLAYERp pp) +int PlayerCanDive(PLAYER* pp) { if (Prediction) return false; @@ -3793,7 +3793,7 @@ int PlayerCanDive(PLAYERp pp) return false; } -int PlayerCanDiveNoWarp(PLAYERp pp) +int PlayerCanDiveNoWarp(PLAYER* pp) { if (Prediction) return false; @@ -3986,7 +3986,7 @@ int GetOverlapSector2(int x, int y, sectortype** over, sectortype** under) } -void DoPlayerWarpToUnderwater(PLAYERp pp) +void DoPlayerWarpToUnderwater(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4057,7 +4057,7 @@ void DoPlayerWarpToUnderwater(PLAYERp pp) return; } -void DoPlayerWarpToSurface(PLAYERp pp) +void DoPlayerWarpToSurface(PLAYER* pp) { DSWActor* plActor = pp->actor; auto sectu = pp->cursector; @@ -4131,7 +4131,7 @@ void DoPlayerWarpToSurface(PLAYERp pp) } -void DoPlayerDivePalette(PLAYERp pp) +void DoPlayerDivePalette(PLAYER* pp) { if (pp != Player + screenpeek) return; @@ -4151,7 +4151,7 @@ void DoPlayerDivePalette(PLAYERp pp) } -void DoPlayerBeginDive(PLAYERp pp) +void DoPlayerBeginDive(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4198,7 +4198,7 @@ void DoPlayerBeginDive(PLAYERp pp) DoPlayerDive(pp); } -void DoPlayerBeginDiveNoWarp(PLAYERp pp) +void DoPlayerBeginDiveNoWarp(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4244,7 +4244,7 @@ void DoPlayerBeginDiveNoWarp(PLAYERp pp) DoPlayerDive(pp); } -void DoPlayerStopDiveNoWarp(PLAYERp pp) +void DoPlayerStopDiveNoWarp(PLAYER* pp) { if (Prediction) return; @@ -4269,7 +4269,7 @@ void DoPlayerStopDiveNoWarp(PLAYERp pp) DoPlayerZrange(pp); } -void DoPlayerStopDive(PLAYERp pp) +void DoPlayerStopDive(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -4296,7 +4296,7 @@ void DoPlayerStopDive(PLAYERp pp) } } -void DoPlayerDiveMeter(PLAYERp pp) +void DoPlayerDiveMeter(PLAYER* pp) { short color=0,metertics,meterunit; int y; @@ -4341,7 +4341,7 @@ void DoPlayerDiveMeter(PLAYERp pp) DTA_CenterOffsetRel, 2, DTA_TranslationIndex, TRANSLATION(Translation_Remap, color), TAG_DONE); } -void DoPlayerDive(PLAYERp pp) +void DoPlayerDive(PLAYER* pp) { DSWActor* plActor = pp->actor; auto sectu = pp->cursector; @@ -4519,7 +4519,7 @@ void DoPlayerDive(PLAYERp pp) } } -int DoPlayerTestPlaxDeath(PLAYERp pp) +int DoPlayerTestPlaxDeath(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4534,7 +4534,7 @@ int DoPlayerTestPlaxDeath(PLAYERp pp) return false; } -void DoPlayerCurrent(PLAYERp pp) +void DoPlayerCurrent(PLAYER* pp) { int xvect, yvect; auto sectu = pp->cursector; @@ -4582,7 +4582,7 @@ void DoPlayerCurrent(PLAYERp pp) } } -void DoPlayerFireOutWater(PLAYERp pp) +void DoPlayerFireOutWater(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4598,7 +4598,7 @@ void DoPlayerFireOutWater(PLAYERp pp) } } -void DoPlayerFireOutDeath(PLAYERp pp) +void DoPlayerFireOutDeath(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4612,7 +4612,7 @@ void DoPlayerFireOutDeath(PLAYERp pp) plActor->user.Flags2 |= SPR2_FLAMEDIE; } -void DoPlayerBeginWade(PLAYERp pp) +void DoPlayerBeginWade(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4644,7 +4644,7 @@ void DoPlayerBeginWade(PLAYERp pp) } -void DoPlayerWade(PLAYERp pp) +void DoPlayerWade(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4783,7 +4783,7 @@ void DoPlayerWade(PLAYERp pp) } -void DoPlayerBeginOperateVehicle(PLAYERp pp) +void DoPlayerBeginOperateVehicle(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4802,7 +4802,7 @@ void DoPlayerBeginOperateVehicle(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Stand); } -void DoPlayerBeginOperateTurret(PLAYERp pp) +void DoPlayerBeginOperateTurret(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -4840,7 +4840,7 @@ void FindMainSector(SECTOR_OBJECT* sop) } } -void DoPlayerOperateMatch(PLAYERp pp, bool starting) +void DoPlayerOperateMatch(PLAYER* pp, bool starting) { if (!pp->sop) return; @@ -4865,7 +4865,7 @@ void DoPlayerOperateMatch(PLAYERp pp, bool starting) } } -void DoPlayerBeginOperate(PLAYERp pp) +void DoPlayerBeginOperate(PLAYER* pp) { SECTOR_OBJECT* sop; int cz, fz; @@ -4964,7 +4964,7 @@ void DoPlayerBeginOperate(PLAYERp pp) } -void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECT* sop) +void DoPlayerBeginRemoteOperate(PLAYER* pp, SECTOR_OBJECT* sop) { int cz, fz; int i; @@ -5043,7 +5043,7 @@ void DoPlayerBeginRemoteOperate(PLAYERp pp, SECTOR_OBJECT* sop) PlayerRemoteReset(pp, save_sect); } -void PlayerToRemote(PLAYERp pp) +void PlayerToRemote(PLAYER* pp) { pp->remote.cursectp = pp->cursector; pp->remote.lastcursectp = pp->lastcursector; @@ -5060,7 +5060,7 @@ void PlayerToRemote(PLAYERp pp) pp->remote.slide_vect.Y = pp->slide_vect.Y; } -void RemoteToPlayer(PLAYERp pp) +void RemoteToPlayer(PLAYER* pp) { pp->setcursector(pp->remote.cursectp); pp->lastcursector = pp->remote.lastcursectp; @@ -5077,7 +5077,7 @@ void RemoteToPlayer(PLAYERp pp) pp->slide_vect.Y = pp->remote.slide_vect.Y; } -void PlayerRemoteReset(PLAYERp pp, sectortype* sect) +void PlayerRemoteReset(PLAYER* pp, sectortype* sect) { pp->setcursector(sect); pp->lastcursector = pp->cursector; @@ -5092,7 +5092,7 @@ void PlayerRemoteReset(PLAYERp pp, sectortype* sect) UpdatePlayerSprite(pp); } -void PlayerRemoteInit(PLAYERp pp) +void PlayerRemoteInit(PLAYER* pp) { pp->remote.vect.X = 0; pp->remote.vect.Y = 0; @@ -5102,7 +5102,7 @@ void PlayerRemoteInit(PLAYERp pp) pp->remote.slide_vect.Y = 0; } -void DoPlayerStopOperate(PLAYERp pp) +void DoPlayerStopOperate(PLAYER* pp) { pp->Flags &= ~(PF_WEAPON_DOWN); DoPlayerResetMovement(pp); @@ -5130,7 +5130,7 @@ void DoPlayerStopOperate(PLAYERp pp) DoPlayerBeginRun(pp); } -void DoPlayerOperateTurret(PLAYERp pp) +void DoPlayerOperateTurret(PLAYER* pp) { if (pp->input.actions & SB_OPEN) { @@ -5168,7 +5168,7 @@ void DoPlayerOperateTurret(PLAYERp pp) -void DoPlayerOperateVehicle(PLAYERp pp) +void DoPlayerOperateVehicle(PLAYER* pp) { if (pp->input.actions & SB_OPEN) { @@ -5204,7 +5204,7 @@ void DoPlayerOperateVehicle(PLAYERp pp) } } -void DoPlayerDeathJump(PLAYERp pp) +void DoPlayerDeathJump(PLAYER* pp) { short i; @@ -5245,7 +5245,7 @@ void DoPlayerDeathJump(PLAYERp pp) } } -void DoPlayerDeathFall(PLAYERp pp) +void DoPlayerDeathFall(PLAYER* pp) { short i; int loz; @@ -5298,7 +5298,7 @@ const char *SuicideNote[MAX_SUICIDE] = "did everyone a favor and offed himself." }; -char *KilledPlayerMessage(PLAYERp pp, PLAYERp killer) +char *KilledPlayerMessage(PLAYER* pp, PLAYER* killer) { const int MAX_KILL_NOTES = 16; short rnd = StdRandomRange(MAX_KILL_NOTES); @@ -5365,7 +5365,7 @@ char *KilledPlayerMessage(PLAYERp pp, PLAYERp killer) return nullptr; }; -void DoPlayerDeathMessage(PLAYERp pp, PLAYERp killer) +void DoPlayerDeathMessage(PLAYER* pp, PLAYER* killer) { int pnum; bool SEND_OK = false; @@ -5405,7 +5405,7 @@ enum PLAYER_DEATH_HORIZ_FALL_VALUE = -50 }; -void DoPlayerBeginDie(PLAYERp pp) +void DoPlayerBeginDie(PLAYER* pp) { extern bool ReloadPrompt; short bak; @@ -5413,7 +5413,7 @@ void DoPlayerBeginDie(PLAYERp pp) DSWActor* plActor = pp->actor; - static void (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (PLAYERp) = + static void (*PlayerDeathFunc[MAX_PLAYER_DEATHS]) (PLAYER*) = { DoPlayerDeathFlip, DoPlayerDeathCrumble, @@ -5613,7 +5613,7 @@ void DoPlayerBeginDie(PLAYERp pp) pp->Flags &= ~(PF_HEAD_CONTROL); } -void DoPlayerDeathHoriz(PLAYERp pp, short target, short speed) +void DoPlayerDeathHoriz(PLAYER* pp, short target, short speed) { if ((pp->horizon.horiz.asbuild() - target) > 1) { @@ -5626,7 +5626,7 @@ void DoPlayerDeathHoriz(PLAYERp pp, short target, short speed) } } -int DoPlayerDeathTilt(PLAYERp pp, short target, short speed) +int DoPlayerDeathTilt(PLAYER* pp, short target, short speed) { if (pp->tilt > target) { @@ -5646,7 +5646,7 @@ int DoPlayerDeathTilt(PLAYERp pp, short target, short speed) } -void DoPlayerDeathZrange(PLAYERp pp) +void DoPlayerDeathZrange(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -5659,7 +5659,7 @@ void DoPlayerDeathZrange(PLAYERp pp) pp->lo_sectp = plActor->user.lo_sectp; } -void DoPlayerDeathHurl(PLAYERp pp) +void DoPlayerDeathHurl(PLAYER* pp) { if (numplayers > 1) { @@ -5687,7 +5687,7 @@ void DoPlayerDeathHurl(PLAYERp pp) } -void DoPlayerDeathFollowKiller(PLAYERp pp) +void DoPlayerDeathFollowKiller(PLAYER* pp) { // if it didn't make it to this angle because of a low ceiling or something // continue on to it @@ -5718,7 +5718,7 @@ void DoPlayerDeathFollowKiller(PLAYERp pp) } } -void DoPlayerDeathCheckKeys(PLAYERp pp) +void DoPlayerDeathCheckKeys(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -5799,7 +5799,7 @@ void DoPlayerDeathCheckKeys(PLAYERp pp) } } -void DoPlayerHeadDebris(PLAYERp pp) +void DoPlayerHeadDebris(PLAYER* pp) { sectortype* sectp = pp->cursector; @@ -5813,7 +5813,7 @@ void DoPlayerHeadDebris(PLAYERp pp) } } -void DoPlayerDeathCheckKick(PLAYERp pp) +void DoPlayerDeathCheckKick(PLAYER* pp) { DSWActor* plActor = pp->actor; unsigned stat; @@ -5867,7 +5867,7 @@ void DoPlayerDeathCheckKick(PLAYERp pp) } -void DoPlayerDeathMoveHead(PLAYERp pp) +void DoPlayerDeathMoveHead(PLAYER* pp) { DSWActor* plActor = pp->actor; int dax,day; @@ -5931,7 +5931,7 @@ void DoPlayerDeathMoveHead(PLAYERp pp) } } -void DoPlayerDeathFlip(PLAYERp pp) +void DoPlayerDeathFlip(PLAYER* pp) { if (Prediction) return; @@ -5966,7 +5966,7 @@ void DoPlayerDeathFlip(PLAYERp pp) -void DoPlayerDeathDrown(PLAYERp pp) +void DoPlayerDeathDrown(PLAYER* pp) { DSWActor* actor = pp->actor; @@ -6005,7 +6005,7 @@ void DoPlayerDeathDrown(PLAYERp pp) } -void DoPlayerDeathBounce(PLAYERp pp) +void DoPlayerDeathBounce(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -6034,7 +6034,7 @@ void DoPlayerDeathBounce(PLAYERp pp) -void DoPlayerDeathCrumble(PLAYERp pp) +void DoPlayerDeathCrumble(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -6086,7 +6086,7 @@ void DoPlayerDeathCrumble(PLAYERp pp) DoPlayerHeadDebris(pp); } -void DoPlayerDeathExplode(PLAYERp pp) +void DoPlayerDeathExplode(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -6139,7 +6139,7 @@ void DoPlayerDeathExplode(PLAYERp pp) DoPlayerHeadDebris(pp); } -void DoPlayerBeginRun(PLAYERp pp) +void DoPlayerBeginRun(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -6173,7 +6173,7 @@ void DoPlayerBeginRun(PLAYERp pp) NewStateGroup(pp->actor, plActor->user.ActorActionSet->Stand); } -void DoPlayerRun(PLAYERp pp) +void DoPlayerRun(PLAYER* pp) { DSWActor* plActor = pp->actor; @@ -6365,7 +6365,7 @@ void MoveSkipSavePos(void) { int i; short pnum; - PLAYERp pp; + PLAYER* pp; MoveSkip8 = (MoveSkip8 + 1) & 7; MoveSkip4 = (MoveSkip4 + 1) & 3; @@ -6427,12 +6427,12 @@ void MoveSkipSavePos(void) } -void PlayerTimers(PLAYERp pp) +void PlayerTimers(PLAYER* pp) { InventoryTimer(pp); } -void ChopsCheck(PLAYERp pp) +void ChopsCheck(PLAYER* pp) { if (!M_Active() && !(pp->Flags & PF_DEAD) && !pp->sop_riding && numplayers <= 1) { @@ -6478,7 +6478,7 @@ void ChopsCheck(PLAYERp pp) } } -void PlayerGlobal(PLAYERp pp) +void PlayerGlobal(PLAYER* pp) { // This is the place for things that effect the player no matter what hes // doing @@ -6533,7 +6533,7 @@ void PlayerGlobal(PLAYERp pp) void MultiPlayLimits(void) { short pnum; - PLAYERp pp; + PLAYER* pp; bool Done = false; if (gNet.MultiGameType != MULTI_GAME_COMMBAT) @@ -6577,7 +6577,7 @@ void domovethings(void) { short i, pnum; - PLAYERp pp; + PLAYER* pp; extern int FinishTimer; @@ -6619,7 +6619,7 @@ void domovethings(void) { extern short screenpeek; extern bool PlayerTrackingMode; - extern PLAYERp GlobPlayerP; + extern PLAYER* GlobPlayerP; pp = Player + pnum; GlobPlayerP = pp; @@ -6697,8 +6697,8 @@ void domovethings(void) void InitAllPlayers(void) { - PLAYERp pp; - PLAYERp pfirst = Player; + PLAYER* pp; + PLAYER* pfirst = Player; int i; extern bool NewGame; //int fz,cz; @@ -6755,9 +6755,9 @@ void InitAllPlayers(void) } } -int SearchSpawnPosition(PLAYERp pp) +int SearchSpawnPosition(PLAYER* pp) { - PLAYERp opp; // other player + PLAYER* opp; // other player short pos_num; short pnum; bool blocked; @@ -6795,7 +6795,7 @@ int SearchSpawnPosition(PLAYERp pp) bool SpawnPositionUsed[MAX_SW_PLAYERS_REG+1]; -void PlayerSpawnPosition(PLAYERp pp) +void PlayerSpawnPosition(PLAYER* pp) { short pnum = short(pp - Player); short pos_num = pnum; @@ -6873,7 +6873,7 @@ void PlayerSpawnPosition(PLAYERp pp) void InitMultiPlayerInfo(void) { - PLAYERp pp; + PLAYER* pp; short pnum; unsigned stat; int tag; @@ -6968,7 +6968,7 @@ int DoFootPrints(DSWActor* actor) return 0; } -void CheckFootPrints(PLAYERp pp) +void CheckFootPrints(PLAYER* pp) { if (pp->NumFootPrints <= 0 || FootMode != WATER_FOOT) { diff --git a/source/games/sw/src/player.h b/source/games/sw/src/player.h index 1991414a2..40d917b20 100644 --- a/source/games/sw/src/player.h +++ b/source/games/sw/src/player.h @@ -125,16 +125,16 @@ void DoPlayer(void); void domovethings(void); void InitAllPlayers(void); void InitMultiPlayerInfo(void); -void MoveScrollMode2D(PLAYERp pp, ControlInfo* const hidInput); -void DoPlayerDivePalette(PLAYERp pp); -void DoPlayerNightVisionPalette(PLAYERp pp); -void DoPlayerStopDiveNoWarp(PLAYERp pp); -void DoPlayerResetMovement(PLAYERp pp); -void DoPlayerZrange(PLAYERp pp); -void DoPlayerSpriteThrow(PLAYERp pp); -int DoPlayerWadeSuperJump(PLAYERp pp); -void DoPlayerWarpTeleporter(PLAYERp pp); -void UpdatePlayerSprite(PLAYERp pp); +void MoveScrollMode2D(PLAYER* pp, ControlInfo* const hidInput); +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 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 122bcbbfd..9f161ca99 100644 --- a/source/games/sw/src/predict.cpp +++ b/source/games/sw/src/predict.cpp @@ -40,7 +40,7 @@ bool PredictionOn = true; bool Prediction = false; PLAYER PredictPlayer; //USER PredictUser; -PLAYERp ppp = &PredictPlayer; +PLAYER* ppp = &PredictPlayer; struct PREDICT { @@ -53,11 +53,11 @@ struct PREDICT PREDICT Predict[/*MOVEFIFOSIZ*/256]; int predictmovefifoplc; -void DoPlayerSectorUpdatePreMove(PLAYERp); -void DoPlayerSectorUpdatePostMove(PLAYERp); +void DoPlayerSectorUpdatePreMove(PLAYER*); +void DoPlayerSectorUpdatePostMove(PLAYER*); -void InitPrediction(PLAYERp pp) +void InitPrediction(PLAYER* pp) { if (!PredictionOn) return; @@ -67,7 +67,7 @@ void InitPrediction(PLAYERp pp) //PredictUser = *pp->actor->user; } -void DoPrediction(PLAYERp ppp) +void DoPrediction(PLAYER* ppp) { #if 0 spritetype spr; diff --git a/source/games/sw/src/quake.cpp b/source/games/sw/src/quake.cpp index 85cb7be77..086833a61 100644 --- a/source/games/sw/src/quake.cpp +++ b/source/games/sw/src/quake.cpp @@ -149,7 +149,7 @@ void ProcessQuakeSpot(void) } } -void QuakeViewChange(PLAYERp pp, int *z_diff, int *x_diff, int *y_diff, short *ang_diff) +void QuakeViewChange(PLAYER* pp, int *z_diff, int *x_diff, int *y_diff, short *ang_diff) { int i; DSWActor* save_act = nullptr; @@ -240,7 +240,7 @@ void SpawnQuake(sectortype* sect, int x, int y, int z, PlaySound(DIGI_ERUPTION, actorNew, v3df_follow|v3df_dontpan); } -bool SetQuake(PLAYERp pp, short tics, short amt) +bool SetQuake(PLAYER* pp, short tics, short amt) { SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, tics, amt, 30000); return false; @@ -258,7 +258,7 @@ int SetGunQuake(DSWActor* actor) return 0; } -int SetPlayerQuake(PLAYERp pp) +int SetPlayerQuake(PLAYER* pp) { SpawnQuake(pp->cursector, pp->pos.X, pp->pos.Y, pp->pos.Z, 40, 8, 40000); return 0; diff --git a/source/games/sw/src/rotator.cpp b/source/games/sw/src/rotator.cpp index c9114cb14..4727a8e56 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(PLAYERp pp, short match, bool); +void DoRotatorMatch(PLAYER* pp, short match, bool); bool TestRotatorMatchActive(short match); -void DoMatchEverything(PLAYERp pp, short match, short state); +void DoMatchEverything(PLAYER* pp, short match, short state); void DoRotatorSetInterp(DSWActor*); void DoRotatorStopInterp(DSWActor*); @@ -120,7 +120,7 @@ void SetRotatorInactive(DSWActor* actor) } // called for operation from the space bar -void DoRotatorOperate(PLAYERp pp, sectortype* sect) +void DoRotatorOperate(PLAYER* pp, sectortype* sect) { short match = sect->hitag; @@ -133,7 +133,7 @@ void DoRotatorOperate(PLAYERp pp, sectortype* sect) // called from switches and triggers // returns first vator found -void DoRotatorMatch(PLAYERp pp, short match, bool manual) +void DoRotatorMatch(PLAYER* 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 c14dbd055..6ea6a4575 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -416,7 +416,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, REMOTE_CONTROL& w, // //--------------------------------------------------------------------------- -FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERp& w, PLAYERp* def) +FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER*& w, PLAYER** def) { int ndx = w ? int(w - Player) : -1; arc(keyname, ndx); diff --git a/source/games/sw/src/sbar.cpp b/source/games/sw/src/sbar.cpp index d8670fbe2..3a9d2c9ae 100644 --- a/source/games/sw/src/sbar.cpp +++ b/source/games/sw/src/sbar.cpp @@ -91,7 +91,7 @@ void UpdateStatusBar() ::UpdateStatusBar(&info); - PLAYERp pp = &Player[screenpeek]; + PLAYER* 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 bba8ee4aa..75d9e2c9b 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -59,7 +59,7 @@ enum }; ANIMATOR DoGrating; -void DoPlayerBeginForceJump(PLAYERp); +void DoPlayerBeginForceJump(PLAYER*); sectortype* FindNextSectorByTag(sectortype* sect, int tag); short LevelSecrets; @@ -67,19 +67,19 @@ bool TestVatorMatchActive(short match); bool TestSpikeMatchActive(short match); bool TestRotatorMatchActive(short match); bool TestSlidorMatchActive(short match); -int PlayerCheckDeath(PLAYERp, DSWActor*); -void DoVatorOperate(PLAYERp, sectortype*); -void DoVatorMatch(PLAYERp pp, short match); -void DoRotatorOperate(PLAYERp, sectortype*); -void DoRotatorMatch(PLAYERp pp, short match, bool); -void DoSlidorOperate(PLAYERp, sectortype*); -void DoSlidorMatch(PLAYERp pp, short match, bool); +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); void KillMatchingCrackSprites(short match); int DoTrapReset(short match); int DoTrapMatch(short match); -PLAYERp GlobPlayerP; +PLAYER* GlobPlayerP; ANIM Anim[MAXANIM]; short AnimCnt = 0; @@ -603,7 +603,7 @@ void SectorMidPoint(sectortype* sectp, int *xmid, int *ymid, int *zmid) } -void DoSpringBoard(PLAYERp pp) +void DoSpringBoard(PLAYER* pp) { pp->jump_speed = -pp->cursector->hitag; @@ -684,7 +684,7 @@ short DoSpawnActorTrigger(short match) int OperateSector(sectortype* sect, short player_is_operating) { - PLAYERp pp = GlobPlayerP; + PLAYER* pp = GlobPlayerP; // Don't let actors operate locked or secret doors if (!player_is_operating) @@ -1022,7 +1022,7 @@ void DoSoundSpotMatch(short match, short sound_num, short sound_type) if (TEST_BOOL7(actor)) { - PLAYERp pp = GlobPlayerP; + PLAYER* pp = GlobPlayerP; if (pp) { @@ -1291,9 +1291,9 @@ void DoChangorMatch(short match) } } -void DoMatchEverything(PLAYERp pp, short match, short state) +void DoMatchEverything(PLAYER* pp, short match, short state) { - PLAYERp bak; + PLAYER* bak; bak = GlobPlayerP; GlobPlayerP = pp; @@ -1367,7 +1367,7 @@ bool ComboSwitchTest(short combo_type, short match) // NOTE: switches are always wall sprites int OperateSprite(DSWActor* actor, short player_is_operating) { - PLAYERp pp = nullptr; + PLAYER* pp = nullptr; short state; short key_num=0; extern STATE s_Pachinko1Operate[]; @@ -1753,7 +1753,7 @@ int DoTrapMatch(short match) } -void OperateTripTrigger(PLAYERp pp) +void OperateTripTrigger(PLAYER* pp) { if (Prediction) return; @@ -1884,7 +1884,7 @@ void OperateTripTrigger(PLAYERp pp) } } -void OperateContinuousTrigger(PLAYERp pp) +void OperateContinuousTrigger(PLAYER* pp) { if (Prediction) return; @@ -1904,7 +1904,7 @@ void OperateContinuousTrigger(PLAYERp pp) } -short PlayerTakeSectorDamage(PLAYERp pp) +short PlayerTakeSectorDamage(PLAYER* pp) { auto sectu = pp->cursector; DSWActor* actor = pp->actor; @@ -1923,7 +1923,7 @@ short PlayerTakeSectorDamage(PLAYERp pp) // Needed in order to see if Player should grunt if he can't find a wall to operate on // If player is too far away, don't grunt enum { PLAYER_SOUNDEVENT_TAG = 900 }; -bool NearThings(PLAYERp pp) +bool NearThings(PLAYER* pp) { HitInfo near; @@ -2009,7 +2009,7 @@ bool NearThings(PLAYERp pp) short nti_cnt; -void NearTagList(NEAR_TAG_INFO* ntip, PLAYERp pp, int z, int dist, int type, int count) +void NearTagList(NEAR_TAG_INFO* ntip, PLAYER* pp, int z, int dist, int type, int count) { short save_lotag, save_hitag; HitInfo near; @@ -2111,7 +2111,7 @@ void NearTagList(NEAR_TAG_INFO* ntip, PLAYERp pp, int z, int dist, int type, int } } -void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYERp pp, int z, int dist, int type, int count) +void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYER* pp, int z, int dist, int type, int count) { memset(ntip, -1, size); nti_cnt = 0; @@ -2119,7 +2119,7 @@ void BuildNearTagList(NEAR_TAG_INFO* ntip, int size, PLAYERp pp, int z, int dist } -int DoPlayerGrabStar(PLAYERp pp) +int DoPlayerGrabStar(PLAYER* pp) { int i; @@ -2155,7 +2155,7 @@ int DoPlayerGrabStar(PLAYERp pp) -void PlayerOperateEnv(PLAYERp pp) +void PlayerOperateEnv(PLAYER* pp) { bool found; @@ -2635,7 +2635,7 @@ void DoSector(void) int sync_flag; short pnum; int min_dist,dist,a,b,c; - PLAYERp pp; + PLAYER* 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 87cf15420..2045eb361 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(PLAYERp pp); -int TeleportToSector(PLAYERp pp, int newsector); +void PlayerOperateEnv(PLAYER* pp); +int TeleportToSector(PLAYER* pp, int newsector); int OperateSector(sectortype* sect,short player_is_operating); int OperateSprite(DSWActor*, short player_is_operating); -void OperateTripTrigger(PLAYERp pp); +void OperateTripTrigger(PLAYER* pp); enum SO_SCALE_TYPE { @@ -67,7 +67,7 @@ extern short nti_cnt; void DoSpawnSpotsForKill(short match); void DoSpawnSpotsForDamage(short match); -void DoMatchEverything(PLAYERp pp, short match, short state); +void DoMatchEverything(PLAYER* 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 5d635aac3..46fab0e55 100644 --- a/source/games/sw/src/slidor.cpp +++ b/source/games/sw/src/slidor.cpp @@ -116,7 +116,7 @@ void SetSlidorInactive(DSWActor* actor) } // called for operation from the space bar -void DoSlidorOperate(PLAYERp pp, sectortype* sect) +void DoSlidorOperate(PLAYER* pp, sectortype* sect) { short match; @@ -132,7 +132,7 @@ void DoSlidorOperate(PLAYERp pp, sectortype* sect) // called from switches and triggers // returns first vator found -void DoSlidorMatch(PLAYERp pp, short match, bool manual) +void DoSlidorMatch(PLAYER* pp, short match, bool manual) { SWStatIterator it(STAT_SLIDOR); while (auto actor = it.Next()) @@ -514,7 +514,7 @@ int DoSlidor(DSWActor* actor) if (!found) { short pnum; - PLAYERp pp; + PLAYER* 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 ec562e4a4..aaeee0823 100644 --- a/source/games/sw/src/sounds.cpp +++ b/source/games/sw/src/sounds.cpp @@ -379,7 +379,7 @@ static void UpdateAmbients() if (sdist < 255 && amb->vocIndex == DIGI_WHIPME) { - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; if (!FAFcansee(spot->spr.pos.X, spot->spr.pos.Y, spot->spr.pos.Z, spot->sector(), pp->pos.X, pp->pos.Y, pp->pos.Z, pp->cursector)) { sdist = 255; @@ -435,7 +435,7 @@ public: int SoundSourceIndex(FSoundChan* chan) override { - if (chan->SourceType == SOURCE_Player) return int(PLAYERp(chan->Source) - Player); + if (chan->SourceType == SOURCE_Player) return int((PLAYER*)(chan->Source) - Player); return 0; } @@ -518,7 +518,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], { if (pos != nullptr) { - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; FVector3 campos = GetSoundPos(&pp->pos); vec3_t *vpos = nullptr; @@ -532,7 +532,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], } else if (type == SOURCE_Actor || type == SOURCE_Player) { - vpos = type == SOURCE_Actor ? &((DSWActor*)source)->spr.pos : &((PLAYERp)source)->pos; + vpos = type == SOURCE_Actor ? &((DSWActor*)source)->spr.pos : &((PLAYER*)source)->pos; FVector3 npos = GetSoundPos(vpos); *pos = npos; @@ -591,7 +591,7 @@ void SWSoundEngine::CalcPosVel(int type, const void* source, const float pt[3], void GameInterface::UpdateSounds(void) { - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; SoundListener listener; binangle tang; @@ -627,7 +627,7 @@ void GameInterface::UpdateSounds(void) // //========================================================================== -int _PlaySound(int num, DSWActor* actor, PLAYERp pp, vec3_t* pos, Voc3D_Flags flags, int channel, EChanFlags cflags) +int _PlaySound(int num, DSWActor* actor, PLAYER* pp, vec3_t* pos, Voc3D_Flags flags, int channel, EChanFlags cflags) { if (Prediction || !SoundEnabled() || !soundEngine->isValidSoundId(num)) return -1; @@ -783,7 +783,7 @@ void PlaySpriteSound(DSWActor* actor, int attrib_ndx, Voc3D_Flags flags) // //========================================================================== -int _PlayerSound(int num, PLAYERp pp) +int _PlayerSound(int num, PLAYER* pp) { int handle; VOCstruct* vp; @@ -827,7 +827,7 @@ int _PlayerSound(int num, PLAYERp pp) return 0; } -void StopPlayerSound(PLAYERp pp, int which) +void StopPlayerSound(PLAYER* pp, int which) { soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE, which); } diff --git a/source/games/sw/src/spike.cpp b/source/games/sw/src/spike.cpp index 25efcea67..055e4936d 100644 --- a/source/games/sw/src/spike.cpp +++ b/source/games/sw/src/spike.cpp @@ -353,7 +353,7 @@ int DoSpike(DSWActor* actor) if (!found) { short pnum; - PLAYERp pp; + PLAYER* 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 256088453..1eb2da73c 100644 --- a/source/games/sw/src/sprite.cpp +++ b/source/games/sw/src/sprite.cpp @@ -89,8 +89,8 @@ ANIMATOR DoSpike, DoSpikeAuto; ANIMATOR DoLavaErupt; int DoSlidorInstantClose(DSWActor*); -void InitWeaponRocket(PLAYERp); -void InitWeaponUzi(PLAYERp); +void InitWeaponRocket(PLAYER*); +void InitWeaponUzi(PLAYER*); int MoveSkip4, MoveSkip2, MoveSkip8; int MinEnemySkill; @@ -626,7 +626,7 @@ void KillActor(DSWActor* actor) if (actor->hasU()) { - PLAYERp pp; + PLAYER* pp; int pnum; // doing a MissileSetPos - don't allow killing @@ -1461,7 +1461,7 @@ void PreMapCombineFloors(void) TRAVERSE_CONNECT(pnum) { - PLAYERp pp = &Player[pnum]; + PLAYER* pp = &Player[pnum]; auto dasect = pp->cursector; search.Rewind(); while (auto itsect = search.GetNext()) @@ -4929,7 +4929,7 @@ int DoSpawnItemTeleporterEffect(DSWActor* actor) return 0; } -void ChoosePlayerGetSound(PLAYERp pp) +void ChoosePlayerGetSound(PLAYER* pp) { int choose_snd=0; @@ -4940,7 +4940,7 @@ void ChoosePlayerGetSound(PLAYERp pp) PlayerSound(PlayerGetItemVocs[choose_snd], v3df_follow|v3df_dontpan,pp); } -bool CanGetWeapon(PLAYERp pp, DSWActor* actor, int WPN) +bool CanGetWeapon(PLAYER* pp, DSWActor* actor, int WPN) { switch (gNet.MultiGameType) { @@ -4994,7 +4994,7 @@ enum }; int DoGet(DSWActor* actor) { - PLAYERp pp; + PLAYER* pp; short pnum, key_num; int dist, a,b,c; bool can_see; @@ -5887,7 +5887,7 @@ void ProcessActiveVars(DSWActor* actor) actor->user.wait_active_check += ACTORMOVETICS; } -void AdjustActiveRange(PLAYERp pp, DSWActor* actor, int dist) +void AdjustActiveRange(PLAYER* pp, DSWActor* actor, int dist) { DSWActor* plActor = pp->actor; int look_height; @@ -6029,7 +6029,7 @@ void SpriteControl(void) { int32_t stat; short pnum, CloseToPlayer; - PLAYERp pp; + PLAYER* pp; int tx, ty, tmin, dist; short StateTics; diff --git a/source/games/sw/src/sumo.cpp b/source/games/sw/src/sumo.cpp index 1c833fe62..5c64bf31b 100644 --- a/source/games/sw/src/sumo.cpp +++ b/source/games/sw/src/sumo.cpp @@ -721,7 +721,7 @@ int DoSumoDeathMelt(DSWActor* actor) void BossHealthMeter(void) { - PLAYERp pp = Player + myconnectindex; + PLAYER* 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 72ff115a5..233a35c8a 100644 --- a/source/games/sw/src/text.cpp +++ b/source/games/sw/src/text.cpp @@ -45,7 +45,7 @@ BEGIN_SW_NS // //--------------------------------------------------------------------------- -void PutStringInfo(PLAYERp pp, const char *string) +void PutStringInfo(PLAYER* 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 559e37920..bc5b01c2b 100644 --- a/source/games/sw/src/track.cpp +++ b/source/games/sw/src/track.cpp @@ -724,7 +724,7 @@ void SectorObjectSetupBounds(SECTOR_OBJECT* sop) #if 0 // look for players on sector object - PLAYERp pp; + PLAYER* pp; short pnum; TRAVERSE_CONNECT(pnum) { @@ -1507,9 +1507,9 @@ void PlaceActorsOnTracks(void) } -void MovePlayer(PLAYERp pp, SECTOR_OBJECT* sop, int nx, int ny) +void MovePlayer(PLAYER* pp, SECTOR_OBJECT* sop, int nx, int ny) { - void DoPlayerZrange(PLAYERp pp); + void DoPlayerZrange(PLAYER* pp); // make sure your standing on the so if (pp->Flags & (PF_JUMPING | PF_FALLING | PF_FLYING)) @@ -1586,7 +1586,7 @@ void MovePoints(SECTOR_OBJECT* sop, short delta_ang, int nx, int ny) int j; vec2_t rxy; int pnum; - PLAYERp pp; + PLAYER* pp; sectortype* *sectp; int i, rot_ang; bool PlayerMove = true; @@ -3415,7 +3415,7 @@ present time. int ActorFollowTrack(DSWActor* actor, short locktics) { - PLAYERp pp; + PLAYER* pp; TRACK_POINT* tpoint; short pnum; diff --git a/source/games/sw/src/vator.cpp b/source/games/sw/src/vator.cpp index 76a01dcd9..2353505ec 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(PLAYERp pp, short match); +void DoVatorMatch(PLAYER* 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(PLAYERp pp, sectortype* sect) +void DoVatorOperate(PLAYER* pp, sectortype* sect) { short match; @@ -180,7 +180,7 @@ void DoVatorOperate(PLAYERp pp, sectortype* sect) // called from switches and triggers // returns first vator found -void DoVatorMatch(PLAYERp pp, short match) +void DoVatorMatch(PLAYER* pp, short match) { SWStatIterator it(STAT_VATOR); while (auto actor = it.Next()) @@ -472,7 +472,7 @@ int DoVator(DSWActor* actor) if (!found) { short pnum; - PLAYERp pp; + PLAYER* 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 d22c4ef94..c689c9f1e 100644 --- a/source/games/sw/src/vis.cpp +++ b/source/games/sw/src/vis.cpp @@ -80,7 +80,7 @@ void ProcessVisOn(void) } } -void VisViewChange(PLAYERp pp, int *vis) +void VisViewChange(PLAYER* pp, int *vis) { short BrightestVis = NormalVisibility; int x,y,z; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index c6782bbb2..ea0620805 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, int xchange, int ychange, int ceildist, int flordist, uint32_t cliptype, int numtics); -void DoPlayerBeginDie(PLAYERp); +void DoPlayerBeginDie(PLAYER*); void VehicleSetSmoke(SECTOR_OBJECT* sop, ANIMATORp animator); ANIMATOR DoBettyBeginDeath; ANIMATOR DoSkullBeginDeath; @@ -122,7 +122,7 @@ void SpawnMicroExp(DSWActor*); void SpawnExpZadjust(DSWActor* actor, DSWActor* expActor, int upper_zsize, int lower_zsize); int BulletHitSprite(DSWActor* actor, DSWActor* hitActor, int hit_x, int hit_y, int hit_z, short ID); int SpawnSplashXY(int hit_x,int hit_y,int hit_z,sectortype*); -DSWActor* SpawnBoatSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); +DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); short StatDamageList[STAT_DAMAGE_LIST_SIZE] = { @@ -2752,7 +2752,7 @@ int SpawnShrapX(DSWActor* actor) int DoLavaErupt(DSWActor* actor) { short i,pnum; - PLAYERp pp; + PLAYER* pp; bool found = false; if (TEST_BOOL1(actor)) @@ -3554,7 +3554,7 @@ AutoShrap: p = StdShrap; if (parentActor->user.PlayerP) { - PLAYERp pp = parentActor->user.PlayerP; + PLAYER* pp = parentActor->user.PlayerP; if (pp->DeathType == PLAYER_DEATH_CRUMBLE) p = PlayerGoreFall; @@ -4792,7 +4792,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) { - PLAYERp pp = weapActor->user.PlayerP; + PLAYER* pp = weapActor->user.PlayerP; if (pp && !(pp->Flags & PF_DIVING)) // JBF: added null test pp->Bloody = true; PlaySound(DIGI_TOILETGIRLSCREAM, actor, v3df_none); @@ -4817,7 +4817,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) case NINJA_RUN_R0: //sword if (weapActor->user.PlayerP) { - PLAYERp pp = weapActor->user.PlayerP; + PLAYER* pp = weapActor->user.PlayerP; if (weapActor->user.WeaponNum == WPN_FIST && StdRandomRange(1000)>500 && pp == Player+myconnectindex) { @@ -4916,7 +4916,7 @@ int ActorChooseDeath(DSWActor* actor, DSWActor* weapActor) // Random chance of taunting the AI's here if (RandomRange(1000) > 400) { - PLAYERp pp; + PLAYER* pp; auto own = GetOwner(weapActor); if (own && own->hasU()) @@ -5228,7 +5228,7 @@ int ActorDamageSlide(DSWActor* actor, int damage, int ang) } } -int PlayerDamageSlide(PLAYERp pp, int damage, short ang) +int PlayerDamageSlide(PLAYER* pp, int damage, short ang) { int slide_vel; @@ -5312,7 +5312,7 @@ int GetDamage(DSWActor* actor, DSWActor* weapActor, int DamageNdx) } -int PlayerCheckDeath(PLAYERp pp, DSWActor* weapActor) +int PlayerCheckDeath(PLAYER* pp, DSWActor* weapActor) { DSWActor* actor = pp->actor; @@ -5374,7 +5374,7 @@ int PlayerCheckDeath(PLAYERp pp, DSWActor* weapActor) return false; } -bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor) +bool PlayerTakeDamage(PLAYER* pp, DSWActor* weapActor) { if (weapActor == nullptr) return true; @@ -5543,7 +5543,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor) } else { - PLAYERp pp = Player + screenpeek; + PLAYER* pp = Player + screenpeek; ActorHealth(actor, damage); if (actor->user.Health <= 0) @@ -6804,7 +6804,7 @@ int DoDamage(DSWActor* actor, DSWActor* weapActor) { if (PlayerTakeDamage(actor->user.PlayerP, weapActor)) { - PLAYERp pp = actor->user.PlayerP; + PLAYER* pp = actor->user.PlayerP; PlayerSound(DIGI_GASHURT, v3df_dontpan|v3df_follow|v3df_doppler,pp); PlayerUpdateHealth(actor->user.PlayerP, damage-1000); @@ -8825,7 +8825,7 @@ int DoMine(DSWActor* actor) // check to see if sprite is player or enemy if ((hitActor->spr.extra & SPRX_PLAYER_OR_ENEMY)) { - PLAYERp pp; + PLAYER* pp; // attach weapon to sprite SetAttach(hitActor, actor); @@ -10051,7 +10051,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang) void SpawnNuclearExp(DSWActor* actor) { short ang=0; - PLAYERp pp = nullptr; + PLAYER* pp = nullptr; short rnd_rng; ASSERT(actor->hasU()); @@ -11153,7 +11153,7 @@ int DoRing(DSWActor* actor) { auto own = GetOwner(actor); if (!own) return 0; // this would crash. - PLAYERp pp = own->user.PlayerP;; + PLAYER* pp = own->user.PlayerP;; int cz,fz; if (actor->user.Flags & (SPR_UNDERWATER)) @@ -11232,7 +11232,7 @@ int DoRing(DSWActor* actor) -void InitSpellRing(PLAYERp pp) +void InitSpellRing(PLAYER* pp) { short ang, ang_diff, ang_start, missiles; short max_missiles = 16; @@ -11578,7 +11578,7 @@ int InitSerpRing(DSWActor* actor) return 0; } -void InitSpellNapalm(PLAYERp pp) +void InitSpellNapalm(PLAYER* pp) { DSWActor* plActor = pp->actor; unsigned i; @@ -11732,7 +11732,7 @@ int InitEnemyNapalm(DSWActor* actor) return 0; } -int InitSpellMirv(PLAYERp pp) +int InitSpellMirv(PLAYER* pp) { PlaySound(DIGI_MIRVFIRE, pp, v3df_none); @@ -11811,7 +11811,7 @@ int InitEnemyMirv(DSWActor* actor) } -int InitSwordAttack(PLAYERp pp) +int InitSwordAttack(PLAYER* pp) { DSWActor* plActor = pp->actor; unsigned stat; @@ -11983,7 +11983,7 @@ int InitSwordAttack(PLAYERp pp) return 0; } -int InitFistAttack(PLAYERp pp) +int InitFistAttack(PLAYER* pp) { DSWActor* plActor = pp->actor; unsigned stat; @@ -12603,7 +12603,7 @@ void WeaponHitscanShootFeet(DSWActor* actor, DSWActor* hitActor, int *zvect) } } -int InitStar(PLAYERp pp) +int InitStar(PLAYER* pp) { DSWActor* plActor = pp->actor; int nx, ny, nz; @@ -12710,7 +12710,7 @@ int InitStar(PLAYERp pp) return 0; } -void InitHeartAttack(PLAYERp pp) +void InitHeartAttack(PLAYER* pp) { DSWActor* plActor = pp->actor; short i = 0; @@ -12760,7 +12760,7 @@ void InitHeartAttack(PLAYERp pp) actorNew->user.WaitTics = 0; } -int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang, int xvect, int yvect, int zvect) +int ContinueHitscan(PLAYER* pp, sectortype* sect, int x, int y, int z, short ang, int xvect, int yvect, int zvect) { HitInfo hit{}; DSWActor* actor = pp->actor; @@ -12840,7 +12840,7 @@ int ContinueHitscan(PLAYERp pp, sectortype* sect, int x, int y, int z, short ang return 0; } -int InitShotgun(PLAYERp pp) +int InitShotgun(PLAYER* pp) { DSWActor* actor = pp->actor; short daang,ndaang, i; @@ -13008,7 +13008,7 @@ int InitShotgun(PLAYERp pp) return 0; } -int InitLaser(PLAYERp pp) +int InitLaser(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -13103,7 +13103,7 @@ int InitLaser(PLAYERp pp) -int InitRail(PLAYERp pp) +int InitRail(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -13264,7 +13264,7 @@ int InitZillaRail(DSWActor* actor) return 0; } -int InitRocket(PLAYERp pp) +int InitRocket(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -13374,7 +13374,7 @@ int InitRocket(PLAYERp pp) return 0; } -int InitBunnyRocket(PLAYERp pp) +int InitBunnyRocket(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -13480,7 +13480,7 @@ int InitBunnyRocket(PLAYERp pp) return 0; } -int InitNuke(PLAYERp pp) +int InitNuke(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -13649,7 +13649,7 @@ int InitEnemyNuke(DSWActor* actor) return 0; } -int InitMicro(PLAYERp pp) +int InitMicro(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz, dist; @@ -14314,7 +14314,7 @@ int InitEnemyRail(DSWActor* actor) // if co-op don't hurt teammate if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE && actor->user.ID == ZOMBIE_RUN_R0) { - PLAYERp pp; + PLAYER* pp; // Check all players TRAVERSE_CONNECT(pnum) @@ -14866,7 +14866,7 @@ int DoDefaultStat(DSWActor* actor) } -int InitTracerUzi(PLAYERp pp) +int InitTracerUzi(PLAYER* pp) { if (!pp->insector()) return 0; @@ -15163,7 +15163,7 @@ bool HitscanSpriteAdjust(DSWActor* actor, walltype* hit_wall) return true; } -int InitUzi(PLAYERp pp) +int InitUzi(PLAYER* pp) { DSWActor* actor = pp->actor; short daang; @@ -15178,7 +15178,7 @@ int InitUzi(PLAYERp pp) bool FireSnd = false; const int UZIFIRE_WAIT = 20; - void InitUziShell(PLAYERp); + void InitUziShell(PLAYER*); PlayerUpdateAmmo(pp, actor->user.WeaponNum, -1); @@ -15369,7 +15369,7 @@ int InitUzi(PLAYERp pp) } -int InitTankShell(DSWActor* actor, PLAYERp pp) +int InitTankShell(DSWActor* actor, PLAYER* pp) { if (!SW_SHAREWARE) PlaySound(DIGI_CANNON, pp, v3df_dontpan|v3df_doppler); @@ -15410,7 +15410,7 @@ int InitTankShell(DSWActor* actor, PLAYERp pp) return 0; } -int InitTurretMicro(DSWActor* actor, PLAYERp pp) +int InitTurretMicro(DSWActor* actor, PLAYER* pp) { DSWActor* plActor = pp->actor; int nx, ny, nz, dist; @@ -15509,7 +15509,7 @@ int InitTurretMicro(DSWActor* actor, PLAYERp pp) } -int InitTurretRocket(DSWActor* actor, PLAYERp pp) +int InitTurretRocket(DSWActor* actor, PLAYER* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15546,7 +15546,7 @@ int InitTurretRocket(DSWActor* actor, PLAYERp pp) return 0; } -int InitTurretFireball(DSWActor* actor, PLAYERp pp) +int InitTurretFireball(DSWActor* actor, PLAYER* pp) { if (SW_SHAREWARE) return false; // JBF: verify @@ -15584,7 +15584,7 @@ int InitTurretFireball(DSWActor* actor, PLAYERp pp) return 0; } -int InitTurretRail(DSWActor* actor, PLAYERp pp) +int InitTurretRail(DSWActor* actor, PLAYER* pp) { int nx, ny, nz; @@ -15633,7 +15633,7 @@ int InitTurretRail(DSWActor* actor, PLAYERp pp) return 0; } -int InitTurretLaser(DSWActor* actor, PLAYERp pp) +int InitTurretLaser(DSWActor* actor, PLAYER* pp) { int nx, ny, nz; @@ -15680,7 +15680,7 @@ int InitTurretLaser(DSWActor* actor, PLAYERp pp) return 0; } -int InitSobjMachineGun(DSWActor* actor, PLAYERp pp) +int InitSobjMachineGun(DSWActor* actor, PLAYER* pp) { short daang; HitInfo hit{}; @@ -15783,7 +15783,7 @@ int InitSobjMachineGun(DSWActor* actor, PLAYERp pp) return 0; } -int InitSobjGun(PLAYERp pp) +int InitSobjGun(PLAYER* pp) { short i; bool first = false; @@ -15889,7 +15889,7 @@ int InitSobjGun(PLAYERp pp) return 0; } -DSWActor* SpawnBoatSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) +DSWActor* SpawnBoatSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) { auto actorNew = SpawnActor(STAT_MISSILE, UZI_SMOKE, s_UziSmoke, hit_sect, hit_x, hit_y, hit_z, hit_ang, 0); actorNew->spr.shade = -40; @@ -15925,7 +15925,7 @@ DSWActor* SpawnBoatSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, return actorNew; } -int SpawnSwordSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) +int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) { DSWActor* actor = pp->actor; @@ -15993,7 +15993,7 @@ DSWActor* SpawnTurretSparks(sectortype* hit_sect, walltype* hit_wall, int hit_x, return actorNew; } -DSWActor* SpawnShotgunSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) +DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang) { auto actorNew = SpawnActor(STAT_MISSILE, UZI_SPARK, s_UziSpark, hit_sect, hit_x, hit_y, hit_z, hit_ang, 0); @@ -16193,7 +16193,7 @@ int InitEnemyUzi(DSWActor* actor) HitInfo hit{}; int daz; int zh; - void InitUziShell(PLAYERp); + void InitUziShell(PLAYER*); static short alternate; @@ -16339,7 +16339,7 @@ int InitEnemyUzi(DSWActor* actor) } -int InitGrenade(PLAYERp pp) +int InitGrenade(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -16490,7 +16490,7 @@ int InitSpriteGrenade(DSWActor* actor) return 0; } -int InitMine(PLAYERp pp) +int InitMine(PLAYER* pp) { DSWActor* actor = pp->actor; int nx, ny, nz; @@ -16618,7 +16618,7 @@ int HelpMissileLateral(DSWActor* actor, int dist) } -int InitFireball(PLAYERp pp) +int InitFireball(PLAYER* pp) { DSWActor* actor = pp->actor; int nx = 0, ny = 0, nz; @@ -17805,7 +17805,7 @@ int DoFloorBlood(DSWActor* actor) int dist, near_dist = FEET_IN_BLOOD_DIST, a,b,c; short pnum; - PLAYERp pp; + PLAYER* pp; short xsiz,ysiz; diff --git a/source/games/sw/src/weapon.h b/source/games/sw/src/weapon.h index fd1e48eb8..98ec104a2 100644 --- a/source/games/sw/src/weapon.h +++ b/source/games/sw/src/weapon.h @@ -37,7 +37,7 @@ inline int AngToSprite(DSWActor* actor, DSWActor* other) return (getangle(actor->spr.pos.X - other->spr.pos.X, actor->spr.pos.Y - other->spr.pos.Y)); } -inline int AngToPlayer(PLAYERp player, DSWActor* other) +inline int AngToPlayer(PLAYER* player, DSWActor* other) { return (getangle(player->pos.X - other->spr.pos.X, player->pos.Y - other->spr.pos.Y)); } @@ -80,14 +80,14 @@ extern int LoWangsQueueHead; extern TObjPtr LoWangsQueue[MAX_LOWANGS_QUEUE]; void ChangeState(DSWActor* actor, STATEp statep); -void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt); +void DoPlayerBeginRecoil(PLAYER* pp, short pix_amt); SECTOR_OBJECT* DetectSectorObject(sectortype*); SECTOR_OBJECT* DetectSectorObjectByWall(walltype*); void ScaleSpriteVector(DSWActor* actor, int scale); void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z); DSWActor* QueueWallBlood(DSWActor* hit, short ang); bool SlopeBounce(DSWActor*, bool *hit_wall); -int SpawnSwordSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); +int SpawnSwordSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); DSWActor* SpawnBubble(DSWActor*); void SpawnFireballExp(DSWActor*); void SpawnFireballFlames(DSWActor* actor, DSWActor* enemyActor); @@ -99,7 +99,7 @@ int ShrapKillSprite(DSWActor*); bool MissileSetPos(DSWActor*,ANIMATORp DoWeapon,int dist); int ActorPain(DSWActor*); int SpawnBreakFlames(DSWActor*); -bool PlayerTakeDamage(PLAYERp pp, DSWActor* weapActor); +bool PlayerTakeDamage(PLAYER* pp, DSWActor* weapActor); const char *DeathString(DSWActor*); // @@ -170,7 +170,7 @@ extern short target_ang; bool SpriteOverlap(short, short); -DSWActor* SpawnShotgunSparks(PLAYERp pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); +DSWActor* SpawnShotgunSparks(PLAYER* pp, sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z, short hit_ang); int DoActorBeginSlide(DSWActor* actor, int ang, int vel, int dec); int GetOverlapSector(int x, int y, sectortype** over, sectortype** under); @@ -190,12 +190,12 @@ void WallBounce(DSWActor*, short ang); #define CALTROPS 2218 #define PHOSPHORUS 1397 -int PlayerInitChemBomb(PLAYERp pp); +int PlayerInitChemBomb(PLAYER* pp); int InitChemBomb(DSWActor*); -int PlayerInitCaltrops(PLAYERp pp); +int PlayerInitCaltrops(PLAYER* pp); int InitBloodSpray(DSWActor* actor, bool dogib, short velocity); int SpawnBunnyExp(DSWActor* actor); -int InitBunnyRocket(PLAYERp pp); +int InitBunnyRocket(PLAYER* pp); int GetDamage(DSWActor*, DSWActor*, int DamageNdx); int DoFlamesDamageTest(DSWActor*); @@ -219,12 +219,12 @@ int SetSuicide(DSWActor*); void UpdateSinglePlayKills(DSWActor* actor); int InitPlasmaFountain(DSWActor* wActor, DSWActor* sActor); int InitCoolgDrip(DSWActor*); -int InitFireball(PLAYERp pp); -void InitSpellRing(PLAYERp pp); -void InitSpellNapalm(PLAYERp pp); +int InitFireball(PLAYER* pp); +void InitSpellRing(PLAYER* pp); +void InitSpellNapalm(PLAYER* pp); int DoStaticFlamesDamage(DSWActor*); -int InitUzi(PLAYERp pp); -int InitSobjGun(PLAYERp pp); +int InitUzi(PLAYER* pp); +int InitSobjGun(PLAYER* pp); void InitFireballTrap(DSWActor* actor); void InitBoltTrap(DSWActor* actor); void InitSpearTrap(DSWActor*); @@ -237,9 +237,9 @@ void SpriteQueueDelete(DSWActor* actor); int HelpMissileLateral(DSWActor*, int dist); void AddSpriteToSectorObject(DSWActor*,SECTOR_OBJECT* sop); void QueueReset(void); -int PlayerCheckDeath(PLAYERp pp,DSWActor*); +int PlayerCheckDeath(PLAYER* pp,DSWActor*); bool SpriteWarpToUnderwater(DSWActor* actor); -int PlayerDamageSlide(PLAYERp pp,int damage,short ang); +int PlayerDamageSlide(PLAYER* pp,int damage,short 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 5bd34aa09..845fcd1da 100644 --- a/source/games/sw/src/zombie.cpp +++ b/source/games/sw/src/zombie.cpp @@ -769,7 +769,7 @@ int SetupZombie(DSWActor* actor) return 0; } -void SpawnZombie(PLAYERp pp, DSWActor* weaponActor) +void SpawnZombie(PLAYER* pp, DSWActor* weaponActor) { auto ownerActor = GetOwner(weaponActor);