mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 15:11:04 +00:00
- Exhumed: Remove seq_GetSeqPicnum()
.
This commit is contained in:
parent
b4502626fa
commit
5c0b6858b1
11 changed files with 23 additions and 35 deletions
|
@ -64,7 +64,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
|
|||
pChunkActor->spr.yoffset = 0;
|
||||
pChunkActor->vel.Z = ((-(RandomByte() + 512)) * 2) / 256.;
|
||||
|
||||
seq_GetSeqPicnum(kSeqFish, pChunkActor->nCount, 0);
|
||||
//getSequence(pChunkActor->nSeqFile, pChunkActor->nCount)[0].getFirstPicnum();
|
||||
|
||||
pChunkActor->spr.picnum = anim;
|
||||
pChunkActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -175,7 +175,8 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.pal = pActor->sector()->ceilingpal;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqFish, FishSeq[0].nSeqId, 0);
|
||||
pActor->nSeqFile = "fish";
|
||||
pActor->spr.picnum = getSequence(pActor->nSeqFile, FishSeq[0].nSeqId)[0].getFirstPicnum();
|
||||
pActor->vel.X = 0;
|
||||
pActor->vel.Y = 0;
|
||||
pActor->vel.Z = 0;
|
||||
|
@ -195,8 +196,6 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.intowner = runlist_AddRunRec(pActor->spr.lotag - 1, pActor, 0x120000);
|
||||
pActor->nRun = runlist_AddRunRec(NewRun, pActor, 0x120000);
|
||||
|
||||
pActor->nSeqFile = "fish";
|
||||
|
||||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ void BuildLava(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->nSeqFile = "lavag";
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].nSeqId, 0);
|
||||
pActor->spr.picnum = getSequence(pActor->nSeqFile, LavadudeSeq[3].nSeqId)[0].getFirstPicnum();
|
||||
pActor->vel.X = 0;
|
||||
pActor->vel.Y = 0;
|
||||
pActor->vel.Z = 0;
|
||||
|
|
|
@ -2007,7 +2007,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
if (nStat == kStatExplodeTrigger)
|
||||
{
|
||||
for (int i = 4; i < 8; i++) {
|
||||
BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqFirePot, (i >> 2) + 1, 0), true);
|
||||
BuildCreatureChunk(pActor, getSequence("firepot", (i >> 2) + 1)[0].getFirstPicnum(), true);
|
||||
}
|
||||
|
||||
runlist_RadialDamageEnemy(pActor, 200, 20);
|
||||
|
@ -2015,7 +2015,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
else if (nStat == kStatExplodeTarget)
|
||||
{
|
||||
for (int i = 0; i < 8; i++) {
|
||||
BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqFirePot, (i >> 1) + 3, 0), true);
|
||||
BuildCreatureChunk(pActor, getSequence("firepot", (i >> 1) + 3)[0].getFirstPicnum(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,8 @@ void RestartPlayer(int nPlayer)
|
|||
pPlayerActor->spr.scale = DVector2(0.625, 0.625);
|
||||
pPlayerActor->spr.xoffset = 0;
|
||||
pPlayerActor->spr.yoffset = 0;
|
||||
pPlayerActor->spr.picnum = seq_GetSeqPicnum(kSeqJoe, 18, 0);
|
||||
pPlayerActor->nSeqFile = "joe";
|
||||
pPlayerActor->spr.picnum = getSequence(pPlayerActor->nSeqFile, 18)[0].getFirstPicnum();
|
||||
pPlayerActor->spr.hitag = 0;
|
||||
pPlayerActor->spr.extra = -1;
|
||||
pPlayerActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -228,7 +229,6 @@ void RestartPlayer(int nPlayer)
|
|||
pPlayerActor->vel.Z = 0;
|
||||
pPlayerActor->spr.Angles.Pitch = nullAngle;
|
||||
pPlayerActor->spr.intowner = runlist_AddRunRec(pPlayerActor->spr.lotag - 1, nPlayer, 0xA0000);
|
||||
pPlayerActor->nSeqFile = "joe";
|
||||
ChangeActorStat(pPlayerActor, 100);
|
||||
|
||||
if (nTotalPlayers > 1)
|
||||
|
@ -645,7 +645,7 @@ void AIPlayer::Damage(RunListEvent* ev)
|
|||
{
|
||||
for (int i = 122; i <= 131; i++)
|
||||
{
|
||||
BuildCreatureChunk(pPlayerActor, seq_GetSeqPicnum(kSeqJoe, i, 0));
|
||||
BuildCreatureChunk(pPlayerActor, getSequence("joe", i)[0].getFirstPicnum());
|
||||
}
|
||||
|
||||
StartDeathSeq(nPlayer, 1);
|
||||
|
@ -1888,7 +1888,7 @@ static bool doPlayerDeathRestart(Player* const pPlayer)
|
|||
if (pPlayer->nAction != 20)
|
||||
{
|
||||
const auto pPlayerActor = pPlayer->pActor;
|
||||
pPlayerActor->spr.picnum = seq_GetSeqPicnum(kSeqJoe, 120, 0);
|
||||
pPlayerActor->spr.picnum = getSequence("joe", 120)[0].getFirstPicnum();
|
||||
pPlayerActor->spr.cstat = 0;
|
||||
pPlayerActor->spr.pos.Z = pPlayerActor->sector()->floorz;
|
||||
}
|
||||
|
@ -2014,7 +2014,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
const auto pPlayer = &PlayerList[nPlayer];
|
||||
const auto pPlayerActor = pPlayer->pActor;
|
||||
|
||||
pPlayerActor->spr.picnum = seq_GetSeqPicnum(pPlayer->nSeq, PlayerSeq[nHeightTemplate[pPlayer->nAction]].nSeqId, pPlayer->nSeqSize);
|
||||
pPlayerActor->spr.picnum = getSequence(pPlayerActor->nSeqFile, PlayerSeq[nHeightTemplate[pPlayer->nAction]].nSeqId)[0].getFirstPicnum();
|
||||
pPlayer->pDoppleSprite->spr.picnum = pPlayerActor->spr.picnum;
|
||||
|
||||
doPlayerCounters(pPlayer);
|
||||
|
|
|
@ -252,7 +252,7 @@ void BlowChunks(DExhumedActor* pActor)
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
BuildCreatureChunk(pActor, seq_GetSeqPicnum(16, i + 41, 0));
|
||||
BuildCreatureChunk(pActor, getSequence("spider", i + 41)[0].getFirstPicnum());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ void DestroyEgg(int nEgg)
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqQueenEgg, (i % 2) + 24, 0));
|
||||
BuildCreatureChunk(pActor, getSequence("queenegg", (i % 2) + 24)[0].getFirstPicnum());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1435,16 +1435,17 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
if (QueenList[nQueen].nIndex <= 0)
|
||||
{
|
||||
pActor->spr.cstat = 0;
|
||||
const auto queenPicnum = getSequence("queen", 57)[0].getFirstPicnum();
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
auto pChunkActor = BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqQueen, 57, 0));
|
||||
auto pChunkActor = BuildCreatureChunk(pActor, queenPicnum);
|
||||
|
||||
pChunkActor->spr.picnum = kQueenChunk + (i % 3);
|
||||
pChunkActor->spr.scale = DVector2(1.5625, 1.5625);
|
||||
}
|
||||
|
||||
auto pChunkActor = BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqQueen, 57, 0));
|
||||
auto pChunkActor = BuildCreatureChunk(pActor, queenPicnum);
|
||||
|
||||
pChunkActor->spr.picnum = kTile3126;
|
||||
pChunkActor->spr.scale = DVector2(1.5625, 1.5625);
|
||||
|
|
|
@ -67,7 +67,7 @@ void InitRats()
|
|||
|
||||
for (int i = 122; i <= 131; i++)
|
||||
{
|
||||
int nPic = seq_GetSeqPicnum(kSeqJoe, i, 0);
|
||||
int nPic = getSequence("joe", i)[0].getFirstPicnum();
|
||||
|
||||
if (nPic < nMinChunk)
|
||||
nMinChunk = nPic;
|
||||
|
@ -76,7 +76,7 @@ void InitRats()
|
|||
nMaxChunk = nPic;
|
||||
}
|
||||
|
||||
nPlayerPic = seq_GetSeqPicnum(kSeqJoe, 120, 0);
|
||||
nPlayerPic = getSequence("joe", 120)[0].getFirstPicnum();
|
||||
}
|
||||
|
||||
void SetRatVel(DExhumedActor* pActor)
|
||||
|
|
|
@ -761,17 +761,6 @@ void playFrameSound(DExhumedActor* actor, const SeqFrame& seqFrame)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx)
|
||||
{
|
||||
return getSeqFrameChunkPicnum(getSeqFrameChunk(getSeqFrame(getSeqFromId(nSeq, edx))));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void seq_PlotArrowSequence(const int nSprite, const FName seqFile, const int16_t seqIndex, const int frameIndex)
|
||||
{
|
||||
tspritetype* pTSprite = mytspriteArray->get(nSprite);
|
||||
|
|
|
@ -144,8 +144,6 @@ void seq_PlotSequence(const int nSprite, const FName seqFile, const int16_t seqI
|
|||
void seq_PlotArrowSequence(const int nSprite, const FName seqFile, const int16_t seqIndex, const int frameIndex);
|
||||
void seq_DrawPilotLightSeq(double xOffset, double yOffset);
|
||||
|
||||
int seq_GetSeqPicnum(int16_t nSeq, int16_t edx, int16_t ebx);
|
||||
|
||||
int getSeqFromId(const int nSeqFileId, const int nSeq = 0);
|
||||
int getSeqFrame(const int nSeq, const int nFrame = 0);
|
||||
int getSeqFrameCount(const int nSeq);
|
||||
|
|
|
@ -115,7 +115,8 @@ void BuildSoul(DExhumedActor* pSet)
|
|||
pActor->clipdist = 1.25;
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqSet, 75, 0);
|
||||
pActor->nSeqFile = "set";
|
||||
pActor->spr.picnum = getSequence(pActor->nSeqFile, 75)[0].getFirstPicnum();
|
||||
pActor->spr.Angles.Yaw = RandomAngle();
|
||||
pActor->vel.X = 0;
|
||||
pActor->vel.Y = 0;
|
||||
|
@ -608,7 +609,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
if (seqFrame.flags & 0x80)
|
||||
{
|
||||
pActor->spr.pos.Z -= GetActorHeight(pActor);
|
||||
BuildCreatureChunk(pActor, seq_GetSeqPicnum(kSeqSet, 76, 0));
|
||||
BuildCreatureChunk(pActor, getSequence("set", 76)[0].getFirstPicnum());
|
||||
pActor->spr.pos.Z += GetActorHeight(pActor);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,7 @@ void BuildSnake(int nPlayer, double zVal)
|
|||
|
||||
auto pPlayerActor = PlayerList[nPlayer].pActor;
|
||||
auto pViewSect = PlayerList[nPlayer].pPlayerViewSect;
|
||||
int nPic = seq_GetSeqPicnum(kSeqSnakBody, 0, 0);
|
||||
int nPic = getSequence("snakbody", 0)[0].getFirstPicnum();
|
||||
|
||||
auto pos = pPlayerActor->spr.pos.plusZ(zVal - 10);
|
||||
|
||||
|
|
|
@ -421,7 +421,7 @@ void AISpider::Damage(RunListEvent* ev)
|
|||
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
BuildCreatureChunk(spp, seq_GetSeqPicnum(kSeqSpider, i + 41, 0));
|
||||
BuildCreatureChunk(spp, getSequence("spider", i + 41)[0].getFirstPicnum());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue