- exhumed: made all nAngle variables full ints

This commit is contained in:
Christoph Oelckers 2021-11-16 18:41:34 +01:00
parent 28eca1a023
commit d63b6cda37
16 changed files with 36 additions and 36 deletions

View file

@ -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<int, int> 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);

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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)

View file

@ -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;

View file

@ -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++)

View file

@ -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)
{

View file

@ -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;

View file

@ -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

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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)

View file

@ -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);

View file

@ -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)