diff --git a/source/games/exhumed/src/aistuff.h b/source/games/exhumed/src/aistuff.h index d8795e910..afed797a7 100644 --- a/source/games/exhumed/src/aistuff.h +++ b/source/games/exhumed/src/aistuff.h @@ -83,7 +83,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int val1, int nAngl void IgniteSprite(DExhumedActor* nSprite); void FuncBullet(int, int, int, int); -void BackUpBullet(int *x, int *y, short nAngle); +void BackUpBullet(int *x, int *y, int nAngle); // fish @@ -171,7 +171,7 @@ void DoRegenerates(); // lavadude -void BuildLava(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle, int nChannel); +void BuildLava(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel); DExhumedActor* BuildLavaLimb(DExhumedActor* nSprite, int edx, int ebx); void FuncLavaLimb(int, int, int, int); void FuncLava(int, int, int, int); @@ -194,7 +194,7 @@ extern short bTorch; // lion -void BuildLion(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle); +void BuildLion(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle); void FuncLion(int, int, int, int); // move @@ -340,7 +340,7 @@ void FuncRat(int a, int, int b, int nRun); // rex -void BuildRex(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle, int nChannel); +void BuildRex(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel); void FuncRex(int, int, int, int); // roach @@ -707,12 +707,12 @@ void runlist_ExecObjects(); // scorp -void BuildScorp(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle, int nChannel); +void BuildScorp(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel); void FuncScorp(int, int, int, int); // set -void BuildSet(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle, int nChannel); +void BuildSet(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel); void FuncSoul(int, int, int, int); void FuncSet(int, int, int, int); @@ -772,7 +772,7 @@ std::pair BuildSwPressWall(short nChannel, short nLink, int nWall); // wasp -DExhumedActor* BuildWasp(DExhumedActor* nSprite, int x, int y, int z, int nSector, short nAngle, bool bEggWasp); +DExhumedActor* BuildWasp(DExhumedActor* nSprite, int x, int y, int z, int nSector, int nAngle, bool bEggWasp); void FuncWasp(int eax, int, int edx, int nRun); diff --git a/source/games/exhumed/src/bullet.cpp b/source/games/exhumed/src/bullet.cpp index ecb6e0b49..fe88fb36d 100644 --- a/source/games/exhumed/src/bullet.cpp +++ b/source/games/exhumed/src/bullet.cpp @@ -228,7 +228,7 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo if (nStat == kStatAnubisDrum) { - short nAngle = (pSprite->ang + 256) - RandomSize(9); + int nAngle = (pSprite->ang + 256) - RandomSize(9); pHitSprite->xvel = bcos(nAngle, 1); pHitSprite->yvel = bsin(nAngle, 1); @@ -291,7 +291,7 @@ void BulletHitsSprite(Bullet *pBullet, DExhumedActor* pBulletActor, DExhumedActo } -void BackUpBullet(int *x, int *y, short nAngle) +void BackUpBullet(int *x, int *y, int nAngle) { *x -= bcos(nAngle, -11); *y -= bsin(nAngle, -11); diff --git a/source/games/exhumed/src/grenade.cpp b/source/games/exhumed/src/grenade.cpp index adde5ebad..f2885898c 100644 --- a/source/games/exhumed/src/grenade.cpp +++ b/source/games/exhumed/src/grenade.cpp @@ -37,7 +37,7 @@ void DestroyGrenade(DExhumedActor* pActor) DeleteActor(pActor); } -void BounceGrenade(DExhumedActor* pActor, short nAngle) +void BounceGrenade(DExhumedActor* pActor, int nAngle) { pActor->nTurn >>= 1; @@ -57,7 +57,7 @@ void ThrowGrenade(short nPlayer, int, int, int ecx, int push1) auto pPlayerActor = PlayerList[nPlayer].Actor(); auto pPlayerSprite = &pPlayerActor->s(); - short nAngle = pPlayerSprite->ang; + int nAngle = pPlayerSprite->ang; ChangeActorSect(pActor, PlayerList[nPlayer].nPlayerViewSect); @@ -180,7 +180,7 @@ void ExplodeGrenade(DExhumedActor* pActor) { auto pPlayerActor = PlayerList[nPlayer].Actor(); auto pPlayerSprite = &pPlayerActor->s(); - short nAngle = pPlayerSprite->ang; + int nAngle = pPlayerSprite->ang; pGrenadeSprite->z = pPlayerSprite->z; pGrenadeSprite->x = bcos(nAngle, -5) + pPlayerSprite->x; diff --git a/source/games/exhumed/src/gun.cpp b/source/games/exhumed/src/gun.cpp index 44ce82271..6339cfc2f 100644 --- a/source/games/exhumed/src/gun.cpp +++ b/source/games/exhumed/src/gun.cpp @@ -668,7 +668,7 @@ loc_flag: } short nAmmoType = WeaponInfo[nWeapon].nAmmoType; - short nAngle = pPlayerSprite->ang; + int nAngle = pPlayerSprite->ang; int theX = pPlayerSprite->x; int theY = pPlayerSprite->y; int theZ = pPlayerSprite->z; diff --git a/source/games/exhumed/src/lavadude.cpp b/source/games/exhumed/src/lavadude.cpp index 27c5a9dbd..c22001ab1 100644 --- a/source/games/exhumed/src/lavadude.cpp +++ b/source/games/exhumed/src/lavadude.cpp @@ -104,7 +104,7 @@ void AILavaDudeLimb::Draw(RunListEvent* ev) } -void BuildLava(DExhumedActor* pActor, int x, int y, int, int nSector, short nAngle, int nChannel) +void BuildLava(DExhumedActor* pActor, int x, int y, int, int nSector, int nAngle, int nChannel) { spritetype* pSprite; if (pActor == nullptr) diff --git a/source/games/exhumed/src/lighting.cpp b/source/games/exhumed/src/lighting.cpp index af9cf2ea7..c5391dc50 100644 --- a/source/games/exhumed/src/lighting.cpp +++ b/source/games/exhumed/src/lighting.cpp @@ -691,7 +691,7 @@ void AddFlow(int nIndex, int nSpeed, int b, int nAngle) StartInterpolation(nIndex, Interp_Wall_PanX); StartInterpolation(nIndex, Interp_Wall_PanY); - short nAngle; + int nAngle; if (b == 2) { nAngle = 512; diff --git a/source/games/exhumed/src/lion.cpp b/source/games/exhumed/src/lion.cpp index 91f33820d..53c70b5dc 100644 --- a/source/games/exhumed/src/lion.cpp +++ b/source/games/exhumed/src/lion.cpp @@ -41,7 +41,7 @@ static actionSeq LionSeq[] = { }; -void BuildLion(DExhumedActor* pActor, int x, int y, int z, int nSector, short nAngle) +void BuildLion(DExhumedActor* pActor, int x, int y, int z, int nSector, int nAngle) { spritetype* pSprite; if (pActor == nullptr) @@ -395,7 +395,7 @@ void AILion::Tick(RunListEvent* ev) int nCheckDist = 0x7FFFFFFF; - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; short nScanAngle = (pSprite->ang - 512) & kAngleMask; for (int i = 0; i < 5; i++) diff --git a/source/games/exhumed/src/move.cpp b/source/games/exhumed/src/move.cpp index 5177de159..d08b8bd4a 100644 --- a/source/games/exhumed/src/move.cpp +++ b/source/games/exhumed/src/move.cpp @@ -1206,7 +1206,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int nClipType = CLIPMASK0; } - short nAngle; + int nAngle; if (pActor2 == nullptr) { @@ -1498,7 +1498,7 @@ void AICreatureChunk::Tick(RunListEvent* ev) if (!nVal.type && !nVal.exbits) return; - short nAngle; + int nAngle; if (nVal.exbits & kHitAux2) { diff --git a/source/games/exhumed/src/player.cpp b/source/games/exhumed/src/player.cpp index 8fad221f5..e6a2a4137 100644 --- a/source/games/exhumed/src/player.cpp +++ b/source/games/exhumed/src/player.cpp @@ -98,7 +98,7 @@ void RestoreSavePoint(int nPlayer, int *x, int *y, int *z, short *nSector, short *nAngle = PlayerList[nPlayer].sPlayerSave.nAngle; } -void SetSavePoint(int nPlayer, int x, int y, int z, int nSector, short nAngle) +void SetSavePoint(int nPlayer, int x, int y, int z, int nSector, int nAngle) { PlayerList[nPlayer].sPlayerSave.x = x; PlayerList[nPlayer].sPlayerSave.y = y; diff --git a/source/games/exhumed/src/player.h b/source/games/exhumed/src/player.h index 81f9cb1c7..1b3702bca 100644 --- a/source/games/exhumed/src/player.h +++ b/source/games/exhumed/src/player.h @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. BEGIN_PS_NS void RestoreSavePoint(int nPlayer, int *x, int *y, int *z, short *nSector, short *nAngle); -void SetSavePoint(int nPlayer, int x, int y, int z, int nSector, short nAngle); +void SetSavePoint(int nPlayer, int x, int y, int z, int nSector, int nAngle); void InitPlayer(); void InitPlayerKeys(short nPlayer); int GrabPlayer(); @@ -53,7 +53,7 @@ struct PlayerSave int y; int z; int nSector; - short nAngle; + int16_t nAngle; }; struct Player diff --git a/source/games/exhumed/src/queen.cpp b/source/games/exhumed/src/queen.cpp index b9c654c3d..cef210893 100644 --- a/source/games/exhumed/src/queen.cpp +++ b/source/games/exhumed/src/queen.cpp @@ -270,7 +270,7 @@ void DestroyAllEggs() void SetHeadVel(DExhumedActor* pActor) { auto pSprite = &pActor->s(); - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; pSprite->xvel = bcos(nAngle, nVelShift); pSprite->yvel = bsin(nAngle, nVelShift); @@ -278,7 +278,7 @@ void SetHeadVel(DExhumedActor* pActor) Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val1, int val2) { - short nAngle; + int nAngle; spritetype* pSprite = &pActor->s(); if (pActor2 == nullptr) @@ -439,7 +439,7 @@ void BuildQueenEgg(short nQueen, int nVal) int y = pSprite->y; int nSector =pSprite->sectnum; int nFloorZ = sector[nSector].floorz; - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; auto pActor2 = insertActor(nSector, 121); auto pSprite2 = &pActor2->s(); @@ -570,7 +570,7 @@ void AIQueenEgg::Tick(RunListEvent* ev) } else { - short nAngle; + int nAngle; switch (nMov.type) { @@ -697,7 +697,7 @@ void BuildQueenHead(short nQueen) int x = pSprite->x; int y = pSprite->y; - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; int nSector =pSprite->sectnum; int z = sector[nSector].floorz; diff --git a/source/games/exhumed/src/rex.cpp b/source/games/exhumed/src/rex.cpp index 89bf800c1..96714c646 100644 --- a/source/games/exhumed/src/rex.cpp +++ b/source/games/exhumed/src/rex.cpp @@ -37,7 +37,7 @@ static actionSeq RexSeq[] = { {28, 1} }; -void BuildRex(DExhumedActor* pActor, int x, int y, int z, int nSector, short nAngle, int nChannel) +void BuildRex(DExhumedActor* pActor, int x, int y, int z, int nSector, int nAngle, int nChannel) { spritetype* pSprite; if (pActor == nullptr) @@ -213,7 +213,7 @@ void AIRex::Tick(RunListEvent* ev) { if (pTarget == nullptr) { - short nAngle = pSprite->ang; // make backup of this variable + auto nAngle = pSprite->ang; // make backup of this variable pActor->pTarget = FindPlayer(pActor, 60); pSprite->ang = nAngle; } @@ -345,7 +345,7 @@ void AIRex::Tick(RunListEvent* ev) if (pSprite2->statnum && pSprite2->statnum < 107) { - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; runlist_DamageEnemy(nMov.actor, pActor, 15); diff --git a/source/games/exhumed/src/scorp.cpp b/source/games/exhumed/src/scorp.cpp index d5b1c780d..57d7bbfa6 100644 --- a/source/games/exhumed/src/scorp.cpp +++ b/source/games/exhumed/src/scorp.cpp @@ -38,7 +38,7 @@ static actionSeq ScorpSeq[] = { {53, 1} }; -void BuildScorp(DExhumedActor* pActor, int x, int y, int z, int nSector, short nAngle, int nChannel) +void BuildScorp(DExhumedActor* pActor, int x, int y, int z, int nSector, int nAngle, int nChannel) { spritetype* pSprite; diff --git a/source/games/exhumed/src/set.cpp b/source/games/exhumed/src/set.cpp index e0a4109d4..288b36c75 100644 --- a/source/games/exhumed/src/set.cpp +++ b/source/games/exhumed/src/set.cpp @@ -39,7 +39,7 @@ static actionSeq SetSeq[] = { {74, 1} }; -void BuildSet(DExhumedActor* pActor, int x, int y, int z, int nSector, short nAngle, int nChannel) +void BuildSet(DExhumedActor* pActor, int x, int y, int z, int nSector, int nAngle, int nChannel) { spritetype* pSprite; if (pActor == nullptr) diff --git a/source/games/exhumed/src/snake.cpp b/source/games/exhumed/src/snake.cpp index 5db8244d2..4a3bddb57 100644 --- a/source/games/exhumed/src/snake.cpp +++ b/source/games/exhumed/src/snake.cpp @@ -129,7 +129,7 @@ void BuildSnake(short nPlayer, short zVal) int x = pPlayerSprite->x; int y = pPlayerSprite->y; int z = (pPlayerSprite->z + zVal) - 2560; - short nAngle = pPlayerSprite->ang; + int nAngle = pPlayerSprite->ang; short hitsect; int hitx, hity, hitz; @@ -272,7 +272,7 @@ DExhumedActor* FindSnakeEnemy(short nSnake) auto pActor = SnakeList[nSnake].pSprites[0]; // CHECKME auto pSprite = &pActor->s(); - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; int nSector =pSprite->sectnum; int esi = 2048; @@ -370,7 +370,7 @@ void AISnake::Tick(RunListEvent* ev) } else { - short nAngle = pSprite->ang; + int nAngle = pSprite->ang; int var_30 = -bcos(nAngle, 6); int var_34 = -bsin(nAngle, 6); diff --git a/source/games/exhumed/src/wasp.cpp b/source/games/exhumed/src/wasp.cpp index 7b62a0c33..f16fa806c 100644 --- a/source/games/exhumed/src/wasp.cpp +++ b/source/games/exhumed/src/wasp.cpp @@ -40,7 +40,7 @@ void SetWaspVel(spritetype* pSprite) pSprite->yvel = bsin(pSprite->ang); } -DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, int nSector, short nAngle, bool bEggWasp) +DExhumedActor* BuildWasp(DExhumedActor* pActor, int x, int y, int z, int nSector, int nAngle, bool bEggWasp) { spritetype* pSprite; if (pActor == nullptr)