mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- next 100 shorts reviewed.
seq.cpp/seq.h was just renamed to int16_t.
This commit is contained in:
parent
d73c7aa543
commit
83a928adde
9 changed files with 150 additions and 151 deletions
|
@ -35,15 +35,15 @@ static const int8_t ObjectSeq[] = {
|
|||
46, -1, 72, -1
|
||||
};
|
||||
|
||||
static const short ObjectStatnum[] = {
|
||||
static const int16_t ObjectStatnum[] = {
|
||||
kStatExplodeTrigger, kStatExplodeTarget, 98, kStatDestructibleSprite
|
||||
};
|
||||
|
||||
struct Trail
|
||||
{
|
||||
short field_0;
|
||||
short field_2;
|
||||
short field_4;
|
||||
int16_t nPoint;
|
||||
int16_t nVal;
|
||||
int16_t nPoint2;
|
||||
};
|
||||
|
||||
struct TrailPoint
|
||||
|
@ -59,17 +59,16 @@ struct TrailPoint
|
|||
struct Bob
|
||||
{
|
||||
int nSector;
|
||||
int z;
|
||||
uint8_t field_2;
|
||||
uint8_t field_3;
|
||||
int z;
|
||||
uint16_t sBobID;
|
||||
|
||||
};
|
||||
|
||||
struct Drip
|
||||
{
|
||||
DExhumedActor* pActor;
|
||||
short nCount;
|
||||
int16_t nCount;
|
||||
};
|
||||
|
||||
// 56 bytes
|
||||
|
@ -91,13 +90,13 @@ struct Elev
|
|||
struct MoveSect
|
||||
{
|
||||
int nSector;
|
||||
short nTrail;
|
||||
short nTrailPoint;
|
||||
short field_6;
|
||||
short field_8; // nSector?
|
||||
int nCurSector;
|
||||
int field_10;
|
||||
short field_14; // nChannel?
|
||||
short sMoveDir;
|
||||
int16_t nTrail;
|
||||
int16_t nTrailPoint;
|
||||
int16_t nFlags;
|
||||
int16_t nChannel; // nChannel?
|
||||
int16_t sMoveDir;
|
||||
|
||||
};
|
||||
|
||||
|
@ -112,10 +111,10 @@ struct wallFace
|
|||
struct slideData
|
||||
{
|
||||
DExhumedActor* pActor;
|
||||
short nChannel;
|
||||
short nStart;
|
||||
short field_4a;
|
||||
short field_8a;
|
||||
int16_t nChannel;
|
||||
int16_t nStart;
|
||||
int16_t nRunRec;
|
||||
int16_t nRunC;
|
||||
|
||||
int field_0;
|
||||
int field_4;
|
||||
|
@ -188,9 +187,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, Trail& w, Trail* d
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("at0", w.field_0)
|
||||
("at2", w.field_2)
|
||||
("at4", w.field_4)
|
||||
arc("at0", w.nPoint)
|
||||
("at2", w.nVal)
|
||||
("at4", w.nPoint2)
|
||||
.EndObject();
|
||||
}
|
||||
return arc;
|
||||
|
@ -256,10 +255,10 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, MoveSect& w, MoveS
|
|||
arc("sector", w.nSector)
|
||||
("trail", w.nTrail)
|
||||
("trailpoint", w.nTrailPoint)
|
||||
("at6", w.field_6)
|
||||
("at8", w.field_8)
|
||||
("at6", w.nFlags)
|
||||
("at8", w.nCurSector)
|
||||
("at10", w.field_10)
|
||||
("at14", w.field_14)
|
||||
("at14", w.nChannel)
|
||||
("movedir", w.sMoveDir)
|
||||
.EndObject();
|
||||
}
|
||||
|
@ -300,9 +299,9 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, slideData& w, slid
|
|||
("at3c", w.y6)
|
||||
("channel", w.nChannel)
|
||||
("at2a", w.nStart)
|
||||
("at4a", w.field_4a)
|
||||
("at4a", w.nRunRec)
|
||||
("at6a", w.pActor)
|
||||
("at8a", w.field_8a)
|
||||
("at8a", w.nRunC)
|
||||
.EndObject();
|
||||
}
|
||||
return arc;
|
||||
|
@ -976,7 +975,7 @@ int BuildSlide(int nChannel, int nStartWall, int nWall1, int ecx, int nWall2, in
|
|||
|
||||
int nSector =IdentifySector(nStartWall);
|
||||
|
||||
SlideData[nSlide].field_4a = -1;
|
||||
SlideData[nSlide].nRunRec = -1;
|
||||
SlideData[nSlide].nChannel = nChannel;
|
||||
SlideData[nSlide].nStart = -1;
|
||||
|
||||
|
@ -1065,7 +1064,7 @@ int BuildSlide(int nChannel, int nStartWall, int nWall1, int ecx, int nWall2, in
|
|||
pSprite->z = sector[nSector].floorz;
|
||||
pSprite->backuppos();
|
||||
|
||||
SlideData[nSlide].field_8a = 0;
|
||||
SlideData[nSlide].nRunC = 0;
|
||||
|
||||
return nSlide;
|
||||
}
|
||||
|
@ -1078,22 +1077,22 @@ void AISlide::ProcessChannel(RunListEvent* ev)
|
|||
|
||||
short nChannel = SlideData[nSlide].nChannel;
|
||||
|
||||
if (SlideData[nSlide].field_4a >= 0)
|
||||
if (SlideData[nSlide].nRunRec >= 0)
|
||||
{
|
||||
runlist_SubRunRec(SlideData[nSlide].field_4a);
|
||||
SlideData[nSlide].field_4a = -1;
|
||||
runlist_SubRunRec(SlideData[nSlide].nRunRec);
|
||||
SlideData[nSlide].nRunRec = -1;
|
||||
}
|
||||
|
||||
if (sRunChannels[nChannel].c && sRunChannels[nChannel].c != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
SlideData[nSlide].field_4a = runlist_AddRunRec(NewRun, &RunData[nRun]);
|
||||
SlideData[nSlide].nRunRec = runlist_AddRunRec(NewRun, &RunData[nRun]);
|
||||
|
||||
if (SlideData[nSlide].field_8a != sRunChannels[nChannel].c)
|
||||
if (SlideData[nSlide].nRunC != sRunChannels[nChannel].c)
|
||||
{
|
||||
D3PlayFX(StaticSound[kSound23], SlideData[nSlide].pActor);
|
||||
SlideData[nSlide].field_8a = sRunChannels[nChannel].c;
|
||||
SlideData[nSlide].nRunC = sRunChannels[nChannel].c;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1225,9 +1224,9 @@ void AISlide::Tick(RunListEvent* ev)
|
|||
// loc_21A51:
|
||||
if (ebp >= 2)
|
||||
{
|
||||
runlist_SubRunRec(SlideData[nSlide].field_4a);
|
||||
runlist_SubRunRec(SlideData[nSlide].nRunRec);
|
||||
|
||||
SlideData[nSlide].field_4a = -1;
|
||||
SlideData[nSlide].nRunRec = -1;
|
||||
D3PlayFX(StaticSound[nStopSound], SlideData[nSlide].pActor);
|
||||
|
||||
runlist_ReadyChannel(nChannel);
|
||||
|
@ -2295,14 +2294,14 @@ int FindTrail(int nVal)
|
|||
{
|
||||
for (unsigned i = 0; i < sTrail.Size(); i++)
|
||||
{
|
||||
if (sTrail[i].field_2 == nVal)
|
||||
if (sTrail[i].nVal == nVal)
|
||||
return i;
|
||||
}
|
||||
|
||||
auto nTrails = sTrail.Reserve(1);
|
||||
sTrail[nTrails].field_2 = nVal;
|
||||
sTrail[nTrails].field_0 = -1;
|
||||
sTrail[nTrails].field_4 = -1;
|
||||
sTrail[nTrails].nVal = nVal;
|
||||
sTrail[nTrails].nPoint = -1;
|
||||
sTrail[nTrails].nPoint2 = -1;
|
||||
return nTrails;
|
||||
}
|
||||
|
||||
|
@ -2321,12 +2320,12 @@ void ProcessTrailSprite(DExhumedActor* pActor, int nLotag, int nHitag)
|
|||
|
||||
sTrailPoint[nPoint].nTrailPointVal = var_14;
|
||||
|
||||
int field0 = sTrail[nTrail].field_0;
|
||||
int field0 = sTrail[nTrail].nPoint;
|
||||
|
||||
if (field0 == -1)
|
||||
{
|
||||
sTrail[nTrail].field_0 = nPoint;
|
||||
sTrail[nTrail].field_4 = nPoint;
|
||||
sTrail[nTrail].nPoint = nPoint;
|
||||
sTrail[nTrail].nPoint2 = nPoint;
|
||||
|
||||
sTrailPoint[nPoint].nTrailPointNext = -1;
|
||||
sTrailPoint[nPoint].nTrailPointPrev = -1;
|
||||
|
@ -2343,8 +2342,8 @@ void ProcessTrailSprite(DExhumedActor* pActor, int nLotag, int nHitag)
|
|||
sTrailPoint[field0].nTrailPointPrev = nPoint;
|
||||
sTrailPoint[nPoint].nTrailPointNext = field0;
|
||||
|
||||
if (field0 == sTrail[nTrail].field_0) {
|
||||
sTrail[nTrail].field_0 = nPoint;
|
||||
if (field0 == sTrail[nTrail].nPoint) {
|
||||
sTrail[nTrail].nPoint = nPoint;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -2359,7 +2358,7 @@ void ProcessTrailSprite(DExhumedActor* pActor, int nLotag, int nHitag)
|
|||
sTrailPoint[ecx].nTrailPointNext = nPoint;
|
||||
sTrailPoint[nPoint].nTrailPointPrev = ecx;
|
||||
sTrailPoint[nPoint].nTrailPointNext = -1;
|
||||
sTrail[nTrail].field_4 = nPoint;
|
||||
sTrail[nTrail].nPoint2 = nPoint;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2381,18 +2380,18 @@ void AddMovingSector(int nSector, int edx, int ebx, int ecx)
|
|||
pMoveSect->sMoveDir = 1;
|
||||
pMoveSect->nTrail = nTrail;
|
||||
pMoveSect->nTrailPoint = -1;
|
||||
pMoveSect->field_8 = -1;
|
||||
pMoveSect->field_6 = ecx;
|
||||
pMoveSect->nCurSector = -1;
|
||||
pMoveSect->nFlags = ecx;
|
||||
pMoveSect->field_10 = (edx / 1000) + 1;
|
||||
pMoveSect->nSector = nSector;
|
||||
|
||||
if (ecx & 8)
|
||||
{
|
||||
pMoveSect->field_14 = runlist_AllocChannel(ebx % 1000);
|
||||
pMoveSect->nChannel = runlist_AllocChannel(ebx % 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
pMoveSect->field_14 = -1;
|
||||
pMoveSect->nChannel = -1;
|
||||
}
|
||||
|
||||
sector[nSector].floorstat |= 0x40;
|
||||
|
@ -2406,7 +2405,7 @@ void DoMovingSects()
|
|||
continue;
|
||||
}
|
||||
|
||||
if (sMoveSect[i].field_14 != -1 && !sRunChannels[sMoveSect[i].field_14].c) {
|
||||
if (sMoveSect[i].nChannel != -1 && !sRunChannels[sMoveSect[i].nChannel].c) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -2417,28 +2416,28 @@ void DoMovingSects()
|
|||
|
||||
if (sMoveSect[i].nTrailPoint == -1)
|
||||
{
|
||||
if (sMoveSect[i].field_6 & 0x20)
|
||||
if (sMoveSect[i].nFlags & 0x20)
|
||||
{
|
||||
runlist_ChangeChannel(sMoveSect[i].field_14, 0);
|
||||
runlist_ChangeChannel(sMoveSect[i].nChannel, 0);
|
||||
}
|
||||
|
||||
short ax;
|
||||
|
||||
if (sMoveSect[i].field_6 & 0x10)
|
||||
if (sMoveSect[i].nFlags & 0x10)
|
||||
{
|
||||
sMoveSect[i].sMoveDir = -sMoveSect[i].sMoveDir;
|
||||
if (sMoveSect[i].sMoveDir > 0)
|
||||
{
|
||||
ax = sTrail[sMoveSect[i].nTrail].field_0;
|
||||
ax = sTrail[sMoveSect[i].nTrail].nPoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
ax = sTrail[sMoveSect[i].nTrail].field_4;
|
||||
ax = sTrail[sMoveSect[i].nTrail].nPoint2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ax = sTrail[sMoveSect[i].nTrail].field_0;
|
||||
ax = sTrail[sMoveSect[i].nTrail].nPoint;
|
||||
}
|
||||
|
||||
sMoveSect[i].nTrailPoint = ax;
|
||||
|
@ -2517,9 +2516,9 @@ void DoMovingSects()
|
|||
}
|
||||
|
||||
// loc_2393A:
|
||||
if (sMoveSect[i].field_8 != -1)
|
||||
if (sMoveSect[i].nCurSector != -1)
|
||||
{
|
||||
MoveSector(sMoveSect[i].field_8, -1, &nXVel, &nYVel);
|
||||
MoveSector(sMoveSect[i].nCurSector, -1, &nXVel, &nYVel);
|
||||
}
|
||||
|
||||
int var_2C = nXVel;
|
||||
|
@ -2529,8 +2528,8 @@ void DoMovingSects()
|
|||
|
||||
if (nXVel != var_2C || nYVel != var_30)
|
||||
{
|
||||
MoveSector(sMoveSect[i].field_8, -1, &var_2C, &var_30);
|
||||
MoveSector(sMoveSect[i].field_8, -1, &nXVel, &nYVel);
|
||||
MoveSector(sMoveSect[i].nCurSector, -1, &var_2C, &var_30);
|
||||
MoveSector(sMoveSect[i].nCurSector, -1, &nXVel, &nYVel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2542,10 +2541,10 @@ void PostProcess()
|
|||
for (unsigned i = 0; i < sMoveSect.Size(); i++)
|
||||
{
|
||||
int nTrail = sMoveSect[i].nTrail;
|
||||
sMoveSect[i].nTrailPoint = sTrail[nTrail].field_0;
|
||||
sMoveSect[i].nTrailPoint = sTrail[nTrail].nPoint;
|
||||
|
||||
if (sMoveSect[i].field_6 & 0x40) {
|
||||
runlist_ChangeChannel(sMoveSect[i].field_14, 1);
|
||||
if (sMoveSect[i].nFlags & 0x40) {
|
||||
runlist_ChangeChannel(sMoveSect[i].nChannel, 1);
|
||||
}
|
||||
|
||||
int nSector =sMoveSect[i].nSector;
|
||||
|
@ -2559,7 +2558,7 @@ void PostProcess()
|
|||
{
|
||||
if (j != i && sMoveSect[i].nTrail == sMoveSect[j].nTrail)
|
||||
{
|
||||
sMoveSect[j].field_8 = sMoveSect[i].nSector;
|
||||
sMoveSect[j].nCurSector = sMoveSect[i].nSector;
|
||||
|
||||
SnapSectors(sMoveSect[j].nSector, sMoveSect[i].nSector, 0);
|
||||
sMoveSect[i].nSector = -1;
|
||||
|
|
|
@ -87,7 +87,7 @@ short PlayerCount;
|
|||
short nNetStartSprites;
|
||||
short nCurStartSprite;
|
||||
|
||||
void RestoreSavePoint(int nPlayer, int *x, int *y, int *z, short *nSector, short *nAngle)
|
||||
void RestoreSavePoint(int nPlayer, int *x, int *y, int *z, int *nSector, int16_t *nAngle)
|
||||
{
|
||||
*x = PlayerList[nPlayer].sPlayerSave.x;
|
||||
*y = PlayerList[nPlayer].sPlayerSave.y;
|
||||
|
@ -124,7 +124,7 @@ void feebtag(int x, int y, int z, int nSector, DExhumedActor **nSprite, int nVal
|
|||
while (auto pActor = it.Next())
|
||||
{
|
||||
auto pSprite = &pActor->s();
|
||||
short nStat = pSprite->statnum;
|
||||
int nStat = pSprite->statnum;
|
||||
|
||||
if (nStat >= 900 && !(pSprite->cstat & 0x8000))
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ void InitPlayerInventory(int nPlayer)
|
|||
PlayerList[nPlayer].nPlayerColor = pixels[tileWidth(nPlayer + kTile3571) * tileHeight(nPlayer + kTile3571) / 2];
|
||||
}
|
||||
|
||||
short GetPlayerFromActor(DExhumedActor* pActor)
|
||||
int GetPlayerFromActor(DExhumedActor* pActor)
|
||||
{
|
||||
auto pSprite = &pActor->s();
|
||||
return RunData[pSprite->owner].nObjIndex;
|
||||
|
@ -438,7 +438,7 @@ void StartDeathSeq(int nPlayer, int nVal)
|
|||
auto pSprite = &pActor->s();
|
||||
PlayerList[nPlayer].nHealth = 0;
|
||||
|
||||
short nLotag = pSprite->sector()->lotag;
|
||||
int nLotag = pSprite->sector()->lotag;
|
||||
|
||||
if (nLotag > 0) {
|
||||
runlist_SignalRun(nLotag - 1, nPlayer, &ExhumedAI::EnterSector);
|
||||
|
@ -533,7 +533,7 @@ int AddAmmo(int nPlayer, int nWeapon, int nAmmoAmount)
|
|||
nAmmoAmount = 1;
|
||||
}
|
||||
|
||||
short nCurAmmo = PlayerList[nPlayer].nAmmo[nWeapon];
|
||||
int nCurAmmo = PlayerList[nPlayer].nAmmo[nWeapon];
|
||||
|
||||
if (nCurAmmo >= 300 && nAmmoAmount > 0) {
|
||||
return 0;
|
||||
|
@ -615,7 +615,7 @@ void AIPlayer::Draw(RunListEvent* ev)
|
|||
{
|
||||
int nPlayer = RunData[ev->nRun].nObjIndex;
|
||||
assert(nPlayer >= 0 && nPlayer < kMaxPlayers);
|
||||
short nAction = PlayerList[nPlayer].nAction;
|
||||
int nAction = PlayerList[nPlayer].nAction;
|
||||
|
||||
seq_PlotSequence(ev->nParam, SeqOffsets[PlayerList[nPlayer].nSeq] + PlayerSeq[nAction].a, PlayerList[nPlayer].nSeqSize, PlayerSeq[nAction].b);
|
||||
}
|
||||
|
@ -641,7 +641,7 @@ void AIPlayer::Damage(RunListEvent* ev)
|
|||
int nDamage = ev->nDamage;
|
||||
int nPlayer = RunData[ev->nRun].nObjIndex;
|
||||
auto pPlayerActor = PlayerList[nPlayer].Actor();
|
||||
short nAction = PlayerList[nPlayer].nAction;
|
||||
int nAction = PlayerList[nPlayer].nAction;
|
||||
auto pPlayerSprite = &pPlayerActor->s();
|
||||
auto pDopple = PlayerList[nPlayer].pDoppleSprite;
|
||||
|
||||
|
@ -709,7 +709,7 @@ void AIPlayer::Damage(RunListEvent* ev)
|
|||
// player has died
|
||||
if (pActor2 && pActor2->s().statnum == 100)
|
||||
{
|
||||
short nPlayer2 = GetPlayerFromActor(pActor2);
|
||||
int nPlayer2 = GetPlayerFromActor(pActor2);
|
||||
|
||||
if (nPlayer2 == nPlayer) // player caused their own death
|
||||
{
|
||||
|
@ -756,8 +756,8 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
|
||||
auto pDopple = PlayerList[nPlayer].pDoppleSprite;
|
||||
|
||||
short nAction = PlayerList[nPlayer].nAction;
|
||||
short nActionB = PlayerList[nPlayer].nAction;
|
||||
int nAction = PlayerList[nPlayer].nAction;
|
||||
int nActionB = PlayerList[nPlayer].nAction;
|
||||
|
||||
PlayerList[nPlayer].angle.backup();
|
||||
PlayerList[nPlayer].horizon.backup();
|
||||
|
@ -853,7 +853,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
// pPlayerSprite->zvel is modified within Gravity()
|
||||
short zVel = pPlayerSprite->zvel;
|
||||
int zVel = pPlayerSprite->zvel;
|
||||
|
||||
Gravity(pPlayerActor);
|
||||
|
||||
|
@ -929,7 +929,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
// int _bTouchFloor = bTouchFloor;
|
||||
short bUnderwater = pPlayerSprite->sector()->Flag & kSectUnderwater;
|
||||
int bUnderwater = pPlayerSprite->sector()->Flag & kSectUnderwater;
|
||||
|
||||
if (bUnderwater)
|
||||
{
|
||||
|
@ -984,7 +984,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
|
||||
if (nPlayer == nLocalPlayer)
|
||||
{
|
||||
short zVelB = zVel;
|
||||
int zVelB = zVel;
|
||||
|
||||
if (zVelB < 0) {
|
||||
zVelB = -zVelB;
|
||||
|
@ -1057,7 +1057,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
if (PlayerList[nPlayer].nPlayerPushSound <= -1)
|
||||
{
|
||||
PlayerList[nPlayer].nPlayerPushSound = 1;
|
||||
short nBlock = sector[PlayerList[nPlayer].nPlayerPushSect].extra;
|
||||
int nBlock = sector[PlayerList[nPlayer].nPlayerPushSect].extra;
|
||||
auto pBlockActor = sBlockInfo[nBlock].pActor;
|
||||
|
||||
D3PlayFX(StaticSound[kSound23], pBlockActor, 0x4000);
|
||||
|
|
|
@ -23,7 +23,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 RestoreSavePoint(int nPlayer, int *x, int *y, int *z, int *nSector, int16_t *nAngle);
|
||||
void SetSavePoint(int nPlayer, int x, int y, int z, int nSector, int nAngle);
|
||||
void InitPlayer();
|
||||
void InitPlayerKeys(int nPlayer);
|
||||
|
@ -127,7 +127,7 @@ extern DExhumedActor* nNetStartSprite[kMaxPlayers];
|
|||
extern short nNetStartSprites;
|
||||
extern short nCurStartSprite;
|
||||
|
||||
short GetPlayerFromActor(DExhumedActor* actor);
|
||||
int GetPlayerFromActor(DExhumedActor* actor);
|
||||
void SetPlayerMummified(int nPlayer, int bIsMummified);
|
||||
int AddAmmo(int nPlayer, int nWeapon, int nAmmoAmount);
|
||||
void ShootStaff(int nPlayer);
|
||||
|
|
|
@ -25,9 +25,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_PS_NS
|
||||
|
||||
short nMinChunk;
|
||||
short nPlayerPic;
|
||||
short nMaxChunk;
|
||||
int nMinChunk;
|
||||
int nPlayerPic;
|
||||
int nMaxChunk;
|
||||
|
||||
static actionSeq RatSeq[] = {
|
||||
{0, 1},
|
||||
|
@ -196,7 +196,7 @@ void AIRat::Draw(RunListEvent* ev)
|
|||
{
|
||||
auto pActor = ev->pObjActor;
|
||||
if (!pActor) return;
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
|
||||
seq_PlotSequence(ev->nParam, SeqOffsets[kSeqRat] + RatSeq[nAction].a, pActor->nFrame, RatSeq[nAction].b);
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
auto pActor = ev->pObjActor;
|
||||
if (!pActor) return;
|
||||
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
bool bVal = false;
|
||||
|
|
|
@ -106,7 +106,7 @@ void AIRoach::Draw(RunListEvent* ev)
|
|||
{
|
||||
auto pActor = ev->pObjActor;
|
||||
if (!pActor) return;
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
|
||||
seq_PlotSequence(ev->nParam, RoachSeq[nAction].a + SeqOffsets[kSeqRoach], pActor->nFrame, RoachSeq[nAction].b);
|
||||
return;
|
||||
|
@ -127,7 +127,7 @@ void AIRoach::Damage(RunListEvent* ev)
|
|||
if (!pActor) return;
|
||||
|
||||
auto pSprite = &pActor->s();
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
|
||||
if (ev->nDamage)
|
||||
{
|
||||
|
@ -188,7 +188,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
if (!pActor) return;
|
||||
|
||||
auto pSprite = &pActor->s();
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
bool bVal = false;
|
||||
|
||||
Gravity(pActor);
|
||||
|
|
|
@ -1610,9 +1610,9 @@ void runlist_ProcessWallTag(int nWall, int nLotag, int nHitag)
|
|||
nLastWall = nWall;
|
||||
}
|
||||
|
||||
short nWall2 = wall[nStart].point2;
|
||||
short nWall3 = wall[nWall2].point2;
|
||||
short nWall4 = wall[nWall3].point2;
|
||||
int nWall2 = wall[nStart].point2;
|
||||
int nWall3 = wall[nWall2].point2;
|
||||
int nWall4 = wall[nWall3].point2;
|
||||
|
||||
int nSlide = BuildSlide(nChannel, nStart, nLastWall, n2ndLastWall, nWall2, nWall3, nWall4);
|
||||
|
||||
|
@ -1756,12 +1756,12 @@ void runlist_DamageEnemy(DExhumedActor* pActor, DExhumedActor* pActor2, int nDam
|
|||
return;
|
||||
}
|
||||
|
||||
short nRun = pSprite->owner;
|
||||
int nRun = pSprite->owner;
|
||||
if (nRun <= -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
short nPreCreaturesKilled = nCreaturesKilled;
|
||||
int nPreCreaturesKilled = nCreaturesKilled;
|
||||
|
||||
RunListEvent ev{};
|
||||
ev.pOtherActor = pActor2;
|
||||
|
|
|
@ -101,7 +101,7 @@ void AIScorp::Draw(RunListEvent* ev)
|
|||
auto pActor = ev->pObjActor;
|
||||
if (!pActor) return;
|
||||
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
|
||||
seq_PlotSequence(ev->nParam, SeqOffsets[kSeqScorp] + ScorpSeq[nAction].a, pActor->nFrame, ScorpSeq[nAction].b);
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ void AIScorp::Tick(RunListEvent* ev)
|
|||
if (!pActor) return;
|
||||
|
||||
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
bool bVal = false;
|
||||
|
@ -418,7 +418,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
|
|||
auto pActor = ev->pObjActor;
|
||||
if (!pActor) return;
|
||||
|
||||
short nAction = pActor->nAction;
|
||||
int nAction = pActor->nAction;
|
||||
auto pSprite = &pActor->s();
|
||||
|
||||
if (mode == 0)
|
||||
|
|
|
@ -40,16 +40,16 @@ enum
|
|||
kMaxSEQChunks = 21000
|
||||
};
|
||||
|
||||
short sequences = 0;
|
||||
short frames = 0;
|
||||
short chunks = 0;
|
||||
short nPilotLightFrame;
|
||||
short nPilotLightCount;
|
||||
int16_t sequences = 0;
|
||||
int16_t frames = 0;
|
||||
int16_t chunks = 0;
|
||||
int16_t nPilotLightFrame;
|
||||
int16_t nPilotLightCount;
|
||||
|
||||
short nPilotLightBase;
|
||||
int16_t nPilotLightBase;
|
||||
|
||||
short nShadowWidth = 1;
|
||||
short nFlameHeight = 1;
|
||||
int16_t nShadowWidth = 1;
|
||||
int16_t nFlameHeight = 1;
|
||||
|
||||
int16_t SeqBase[kMaxSequences];
|
||||
int16_t SeqSize[kMaxSequences];
|
||||
|
@ -148,7 +148,7 @@ const char *SeqNames[kMaxSEQFiles] =
|
|||
"rat"
|
||||
};
|
||||
|
||||
short SeqOffsets[kMaxSEQFiles];
|
||||
int16_t SeqOffsets[kMaxSEQFiles];
|
||||
|
||||
|
||||
int seq_ReadSequence(const char *seqName)
|
||||
|
@ -167,7 +167,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
return 0;
|
||||
}
|
||||
|
||||
unsigned short tag;
|
||||
uint16_t tag;
|
||||
hFile.Read(&tag, sizeof(tag));
|
||||
if (tag < MAKE_ID('I', 'H', 0, 0) || (tag > MAKE_ID('I', 'H', 0, 0) && tag != MAKE_ID('D', 'S', 0, 0)))
|
||||
{
|
||||
|
@ -175,8 +175,8 @@ int seq_ReadSequence(const char *seqName)
|
|||
return 0;
|
||||
}
|
||||
|
||||
short centerx, centery; // TODO - are global vars?
|
||||
short nSeqs;
|
||||
int16_t centerx, centery; // TODO - are global vars?
|
||||
int16_t nSeqs;
|
||||
hFile.Read(¢erx, sizeof(centerx));
|
||||
hFile.Read(¢ery, sizeof(centery));
|
||||
hFile.Read(&nSeqs, sizeof(nSeqs));
|
||||
|
@ -202,7 +202,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
SeqBase[sequences + i] += frames;
|
||||
}
|
||||
|
||||
short vdi = frames;
|
||||
int16_t vdi = frames;
|
||||
|
||||
int16_t nFrames;
|
||||
hFile.Read(&nFrames, sizeof(nFrames));
|
||||
|
@ -263,7 +263,7 @@ int seq_ReadSequence(const char *seqName)
|
|||
|
||||
if (tag == MAKE_ID('D', 'S', 0, 0))
|
||||
{
|
||||
short var_20;
|
||||
int16_t var_20;
|
||||
hFile.Read(&var_20, sizeof(var_20));
|
||||
|
||||
for (i = 0; i < var_20; i++)
|
||||
|
@ -271,12 +271,12 @@ int seq_ReadSequence(const char *seqName)
|
|||
hFile.Read(&buffer[i * 10], 8);
|
||||
}
|
||||
|
||||
short var_24;
|
||||
int16_t var_24;
|
||||
hFile.Read(&var_24, sizeof(var_24));
|
||||
|
||||
for (i = 0; i < var_24; i++)
|
||||
{
|
||||
short var_28, var_2C;
|
||||
int16_t var_28, var_2C;
|
||||
hFile.Read(&var_28, sizeof(var_28));
|
||||
hFile.Read(&var_2C, sizeof(var_2C));
|
||||
|
||||
|
@ -345,7 +345,7 @@ void seq_LoadSequences()
|
|||
|
||||
nFontFirstChar = seq_GetFirstSeqPicnum(kSeqFont2);
|
||||
|
||||
short nSize = SeqSize[SeqOffsets[kSeqFont2]];
|
||||
int16_t nSize = SeqSize[SeqOffsets[kSeqFont2]];
|
||||
|
||||
for (i = 0; i < nSize; i++)
|
||||
{
|
||||
|
@ -354,20 +354,20 @@ void seq_LoadSequences()
|
|||
}
|
||||
}
|
||||
|
||||
short seq_GetFrameFlag(short val, short nFrame)
|
||||
int16_t seq_GetFrameFlag(int16_t val, int16_t nFrame)
|
||||
{
|
||||
return FrameFlag[SeqBase[val] + nFrame];
|
||||
}
|
||||
|
||||
void seq_DrawPilotLightSeq(double xOffset, double yOffset)
|
||||
{
|
||||
short nSect = PlayerList[nLocalPlayer].nPlayerViewSect;
|
||||
int16_t nSect = PlayerList[nLocalPlayer].nPlayerViewSect;
|
||||
|
||||
if (!(sector[nSect].Flag & kSectUnderwater))
|
||||
{
|
||||
short nFrame = nPilotLightBase + nPilotLightFrame;
|
||||
short nFrameBase = FrameBase[nFrame];
|
||||
short nFrameSize = FrameSize[nFrame];
|
||||
int16_t nFrame = nPilotLightBase + nPilotLightFrame;
|
||||
int16_t nFrameBase = FrameBase[nFrame];
|
||||
int16_t nFrameSize = FrameSize[nFrame];
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -375,7 +375,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
|
|||
if (nFrameSize < 0)
|
||||
return;
|
||||
|
||||
short nTile = ChunkPict[nFrameBase];
|
||||
int16_t nTile = ChunkPict[nFrameBase];
|
||||
double x = ChunkXpos[nFrameBase] + (160 + xOffset);
|
||||
double y = ChunkYpos[nFrameBase] + (100 + yOffset);
|
||||
|
||||
|
@ -392,7 +392,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
|
|||
|
||||
*/
|
||||
|
||||
int seq_DrawGunSequence(int nSeqOffset, short dx, double xOffs, double yOffs, int nShade, int nPal)
|
||||
int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal)
|
||||
{
|
||||
int nFrame = SeqBase[nSeqOffset] + dx;
|
||||
int nFrameBase = FrameBase[nFrame];
|
||||
|
@ -415,7 +415,7 @@ int seq_DrawGunSequence(int nSeqOffset, short dx, double xOffs, double yOffs, in
|
|||
if (ChunkFlag[nFrameBase] & 2)
|
||||
stat |= RS_YFLIPHUD;
|
||||
|
||||
short nTile = ChunkPict[nFrameBase];
|
||||
int16_t nTile = ChunkPict[nFrameBase];
|
||||
|
||||
if (frameFlag & 4)
|
||||
nShade = -100;
|
||||
|
@ -437,7 +437,7 @@ int seq_GetFrameSound(int val, int edx)
|
|||
return FrameSound[SeqBase[val] + edx];
|
||||
}
|
||||
|
||||
void seq_MoveSequence(DExhumedActor* actor, short nSeq, short bx)
|
||||
void seq_MoveSequence(DExhumedActor* actor, int16_t nSeq, int16_t bx)
|
||||
{
|
||||
assert(nSeq >= 0); // TEMP
|
||||
|
||||
|
@ -454,35 +454,35 @@ void seq_MoveSequence(DExhumedActor* actor, short nSeq, short bx)
|
|||
}
|
||||
}
|
||||
|
||||
int seq_GetSeqPicnum2(short nSeq, short nFrame)
|
||||
int seq_GetSeqPicnum2(int16_t nSeq, int16_t nFrame)
|
||||
{
|
||||
short nBase = FrameBase[SeqBase[nSeq] + nFrame];
|
||||
int16_t nBase = FrameBase[SeqBase[nSeq] + nFrame];
|
||||
return ChunkPict[nBase];
|
||||
}
|
||||
|
||||
int seq_GetSeqPicnum(short nSeq, short edx, short ebx)
|
||||
int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx)
|
||||
{
|
||||
edx += SeqOffsets[nSeq];
|
||||
ebx += SeqBase[edx];
|
||||
short c = FrameBase[ebx];
|
||||
int16_t c = FrameBase[ebx];
|
||||
|
||||
return ChunkPict[c];
|
||||
}
|
||||
|
||||
int seq_PlotArrowSequence(int nSprite, short nSeq, int nVal)
|
||||
int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal)
|
||||
{
|
||||
tspriteptr_t pTSprite = &mytsprite[nSprite];
|
||||
int nAngle = GetMyAngle(nCamerax - pTSprite->x, nCameray - pTSprite->y);
|
||||
|
||||
int nSeqOffset = ((((pTSprite->ang + 512) - nAngle) + 128) & kAngleMask) >> 8;
|
||||
|
||||
short nFrame = SeqBase[nSeqOffset + nSeq] + nVal;
|
||||
int16_t nFrame = SeqBase[nSeqOffset + nSeq] + nVal;
|
||||
|
||||
short nFrameBase = FrameBase[nFrame];
|
||||
short nFrameSize = FrameSize[nFrame];
|
||||
int16_t nFrameBase = FrameBase[nFrame];
|
||||
int16_t nFrameSize = FrameSize[nFrame];
|
||||
|
||||
uint8_t nShade = pTSprite->shade;
|
||||
short nStat = pTSprite->cstat;
|
||||
int16_t nStat = pTSprite->cstat;
|
||||
|
||||
nStat |= 0x80;
|
||||
|
||||
|
@ -517,7 +517,7 @@ int seq_PlotArrowSequence(int nSprite, short nSeq, int nVal)
|
|||
return ChunkPict[nFrameBase];
|
||||
}
|
||||
|
||||
int seq_PlotSequence(int nSprite, short edx, short nFrame, short ecx)
|
||||
int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx)
|
||||
{
|
||||
tspriteptr_t pTSprite = &mytsprite[nSprite];
|
||||
int nAngle = GetMyAngle(nCamerax - pTSprite->x, nCameray - pTSprite->y);
|
||||
|
@ -536,8 +536,8 @@ int seq_PlotSequence(int nSprite, short edx, short nFrame, short ecx)
|
|||
int eax = SeqBase[edx] + nFrame;
|
||||
int edi = SeqBase[edx + val] + nFrame;
|
||||
|
||||
short nBase = FrameBase[edi];
|
||||
short nSize = FrameSize[edi];
|
||||
int16_t nBase = FrameBase[edi];
|
||||
int16_t nSize = FrameSize[edi];
|
||||
|
||||
int8_t shade = pTSprite->shade;
|
||||
|
||||
|
@ -546,7 +546,7 @@ int seq_PlotSequence(int nSprite, short edx, short nFrame, short ecx)
|
|||
shade -= 100;
|
||||
}
|
||||
|
||||
short nPict = ChunkPict[nBase];
|
||||
int16_t nPict = ChunkPict[nBase];
|
||||
|
||||
if (ecx & 0x100)
|
||||
{
|
||||
|
@ -561,7 +561,7 @@ int seq_PlotSequence(int nSprite, short edx, short nFrame, short ecx)
|
|||
esi += edx;
|
||||
|
||||
int var_14 = edx + 1;
|
||||
short nOwner = pTSprite->owner;
|
||||
int16_t nOwner = pTSprite->owner;
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
|
@ -104,22 +104,22 @@ enum {
|
|||
|
||||
struct actionSeq
|
||||
{
|
||||
short a;
|
||||
short b;
|
||||
int16_t a;
|
||||
int16_t b;
|
||||
};
|
||||
|
||||
extern short frames;
|
||||
extern int16_t frames;
|
||||
|
||||
extern int16_t SeqBase[];
|
||||
extern int16_t SeqSize[];
|
||||
extern int16_t SeqOffsets[];
|
||||
extern int16_t FrameFlag[];
|
||||
|
||||
extern short nShadowWidth;
|
||||
extern short nFlameHeight;
|
||||
extern int16_t nShadowWidth;
|
||||
extern int16_t nFlameHeight;
|
||||
|
||||
extern short nPilotLightFrame;
|
||||
extern short nPilotLightCount;
|
||||
extern int16_t nPilotLightFrame;
|
||||
extern int16_t nPilotLightCount;
|
||||
|
||||
extern int16_t ChunkYpos[];
|
||||
extern int16_t ChunkXpos[];
|
||||
|
@ -131,16 +131,16 @@ extern int16_t FrameBase[];
|
|||
|
||||
void seq_LoadSequences();
|
||||
int seq_GetFrameSound(int val, int edx);
|
||||
void seq_MoveSequence(DExhumedActor* actor, short nSeq, short bx);
|
||||
void seq_MoveSequence(DExhumedActor* actor, int16_t nSeq, int16_t bx);
|
||||
|
||||
int seq_GetSeqPicnum2(short nSeq, short nFrame);
|
||||
int seq_GetSeqPicnum(short nSeq, short edx, short ebx);
|
||||
void seq_DrawStatusSequence(short nSequence, uint16_t edx, short ebx);
|
||||
int seq_GetSeqPicnum2(int16_t nSeq, int16_t nFrame);
|
||||
int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx);
|
||||
void seq_DrawStatusSequence(int16_t nSequence, uint16_t edx, int16_t ebx);
|
||||
|
||||
int seq_DrawGunSequence(int nSeqOffset, short dx, double xOffs, double yOffs, int nShade, int nPal);
|
||||
short seq_GetFrameFlag(short val, short nFrame);
|
||||
int seq_PlotSequence(int nSprite, short edx, short nFrame, short ecx);
|
||||
int seq_PlotArrowSequence(int nSprite, short nSeq, int nVal);
|
||||
int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs, int nShade, int nPal);
|
||||
int16_t seq_GetFrameFlag(int16_t val, int16_t nFrame);
|
||||
int seq_PlotSequence(int nSprite, int16_t edx, int16_t nFrame, int16_t ecx);
|
||||
int seq_PlotArrowSequence(int nSprite, int16_t nSeq, int nVal);
|
||||
void seq_DrawPilotLightSeq(double xOffset, double yOffset);
|
||||
|
||||
END_PS_NS
|
||||
|
|
Loading…
Reference in a new issue