- Exhumed: Convert sequence system to FTextureIDs.

This commit is contained in:
Mitchell Richters 2023-04-17 10:38:34 +10:00
parent 3604fd9bfa
commit 4a37453765
26 changed files with 68 additions and 90 deletions

View file

@ -222,7 +222,7 @@ DExhumedActor* GrabBodyGunSprite();
void FuncCreatureChunk(int a, int, int nRun);
DExhumedActor* FindPlayer(DExhumedActor* nSprite, int nDistance, bool dontengage = false);
DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial = false);
DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, FTextureID nPic, bool bSpecial = false);
double PlotCourseToSprite(DExhumedActor* nSprite1, DExhumedActor* nSprite2);
void CheckSectorFloor(sectortype* pSector, double z, DVector2& xy);
void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& vel);

View file

@ -132,7 +132,7 @@ void AIAnubis::Tick(RunListEvent* ev)
seqFrame.playSound(ap);
ap->spr.picnum = seqFrame.getFirstPicnum();
ap->spr.setspritetexture(seqFrame.getFirstTexID());
ap->nFrame++;
if (ap->nFrame >= anubisSeq.frames.Size())

View file

@ -658,13 +658,13 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, double fZOffset, DA
{
pBullet->field_12 = 0;
pBullet->seqFile = pBulletInfo->initSeq;
pBulletActor->spr.picnum = getSequence(pBullet->seqFile).getFirstPicnum();
pBulletActor->spr.setspritetexture(getSequence(pBullet->seqFile).getFirstTexID());
}
else if (pBulletInfo->seqFile != NAME_None)
{
pBullet->field_12 = 1;
pBullet->seqFile = pBulletInfo->seqFile;
pBulletActor->spr.picnum = getSequence(pBullet->seqFile).getFirstPicnum();
pBulletActor->spr.setspritetexture(getSequence(pBullet->seqFile).getFirstTexID());
}
else
{

View file

@ -116,9 +116,8 @@ void MySetView(int x1, int y1, int x2, int y2);
char sHollyStr[40];
int nFontFirstChar;
int nBackgroundPic;
int nShadowPic;
FTextureID nBackgroundPic;
FTextureID nShadowPic;
int nCreaturesKilled = 0, nCreaturesTotal = 0;

View file

@ -99,9 +99,8 @@ extern int nNetTime;
extern int nTotalPlayers;
extern int nFontFirstChar;
extern int nBackgroundPic;
extern int nShadowPic;
extern FTextureID nBackgroundPic;
extern FTextureID nShadowPic;
extern int nCreaturesTotal, nCreaturesKilled;

View file

@ -64,7 +64,7 @@ void BuildFishLimb(DExhumedActor* pActor, int anim)
pChunkActor->spr.yoffset = 0;
pChunkActor->vel.Z = ((-(RandomByte() + 512)) * 2) / 256.;
//getSequence(pChunkActor->nSeqFile, pChunkActor->nCount).getFirstPicnum();
//getSequence(pChunkActor->nSeqFile, pChunkActor->nCount).getFirstTexID();
pChunkActor->spr.picnum = anim;
pChunkActor->spr.lotag = runlist_HeadRun() + 1;
@ -90,7 +90,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
const auto& fishSeq = getSequence(pActor->nSeqFile, pActor->nCount);
pActor->spr.picnum = fishSeq.frames[pActor->nFrame].getFirstPicnum();
pActor->spr.setspritetexture(fishSeq.frames[pActor->nFrame].getFirstTexID());
Gravity(pActor);
@ -176,7 +176,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->nSeqFile = "fish";
pActor->spr.picnum = getSequence(pActor->nSeqFile, FishSeq[0].nSeqId).getFirstPicnum();
pActor->spr.setspritetexture(getSequence(pActor->nSeqFile, FishSeq[0].nSeqId).getFirstTexID());
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;
@ -361,7 +361,7 @@ void AIFish::Tick(RunListEvent* ev)
const auto& fishSeq = getSequence(pActor->nSeqFile, FishSeq[nAction].nSeqId);
const auto& seqFrame = fishSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);

View file

@ -262,7 +262,7 @@ void AIGrenade::Tick(RunListEvent* ev)
const auto& seqFrame = grenadeSeq.frames[pActor->nHealth >> 8];
seqFrame.playSound(pActor);
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
pActor->nIndex2--;
if (!pActor->nIndex2)

View file

@ -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 = getSequence(pActor->nSeqFile, LavadudeSeq[3].nSeqId).getFirstPicnum();
pActor->spr.setspritetexture(getSequence(pActor->nSeqFile, LavadudeSeq[3].nSeqId).getFirstTexID());
pActor->vel.X = 0;
pActor->vel.Y = 0;
pActor->vel.Z = 0;
@ -218,7 +218,7 @@ void AILavaDude::Tick(RunListEvent* ev)
const auto& lavadudeSeq = getSequence(pActor->nSeqFile, LavadudeSeq[nAction].nSeqId);
const auto& seqFrame = lavadudeSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
int var_1C = 0;

View file

@ -203,7 +203,7 @@ void AILion::Tick(RunListEvent* ev)
const auto& lionSeq = getSequence(pActor->nSeqFile, LionSeq[nAction].nSeqId);
const auto& seqFrame = lionSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);

View file

@ -1159,7 +1159,7 @@ DExhumedActor* GrabChunkSprite()
//
//---------------------------------------------------------------------------
DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial)
DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, FTextureID nPic, bool bSpecial)
{
auto pActor = GrabChunkSprite();
@ -1188,7 +1188,7 @@ DExhumedActor* BuildCreatureChunk(DExhumedActor* pSrc, int nPic, bool bSpecial)
pActor->spr.scale = DVector2(1, 1);
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->spr.picnum = nPic;
pActor->spr.setspritetexture(nPic);
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->clipdist = 10;

View file

@ -144,7 +144,7 @@ void AIMummy::Tick(RunListEvent* ev)
const auto& mummySeq = getSequence(pActor->nSeqFile, MummySeq[nAction].nSeqId);
const auto& seqFrame = mummySeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);

View file

@ -1962,7 +1962,7 @@ void AIObject::Tick(RunListEvent* ev)
if (++pActor->nFrame >= nSeqFrames.Size())
pActor->nFrame = 0;
pActor->spr.picnum = nSeqFrames[pActor->nFrame].getFirstPicnum();
pActor->spr.setspritetexture(nSeqFrames[pActor->nFrame].getFirstTexID());
}
if (pActor->nHealth >= 0) {
@ -2007,7 +2007,7 @@ void AIObject::Tick(RunListEvent* ev)
if (nStat == kStatExplodeTrigger)
{
for (int i = 4; i < 8; i++) {
BuildCreatureChunk(pActor, getSequence("firepot", (i >> 2) + 1).getFirstPicnum(), true);
BuildCreatureChunk(pActor, getSequence("firepot", (i >> 2) + 1).getFirstTexID(), 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, getSequence("firepot", (i >> 1) + 3).getFirstPicnum(), true);
BuildCreatureChunk(pActor, getSequence("firepot", (i >> 1) + 3).getFirstTexID(), true);
}
}

View file

@ -218,7 +218,7 @@ void RestartPlayer(int nPlayer)
pPlayerActor->nSeqFile = "joe";
pPlayerActor->nAction = 0;
pPlayerActor->nFrame = 0;
pPlayerActor->spr.picnum = getSequence(pPlayerActor->nSeqFile, 18).getFirstPicnum();
pPlayerActor->spr.setspritetexture(getSequence(pPlayerActor->nSeqFile, 18).getFirstTexID());
pPlayerActor->spr.hitag = 0;
pPlayerActor->spr.extra = -1;
pPlayerActor->spr.lotag = runlist_HeadRun() + 1;
@ -640,7 +640,7 @@ void AIPlayer::Damage(RunListEvent* ev)
{
for (int i = 122; i <= 131; i++)
{
BuildCreatureChunk(pPlayerActor, getSequence("joe", i).getFirstPicnum());
BuildCreatureChunk(pPlayerActor, getSequence("joe", i).getFirstTexID());
}
StartDeathSeq(nPlayer, 1);
@ -1883,7 +1883,7 @@ static bool doPlayerDeathRestart(Player* const pPlayer)
if (pPlayer->pActor->nAction != 20)
{
const auto pPlayerActor = pPlayer->pActor;
pPlayerActor->spr.picnum = getSequence("joe", 120).getFirstPicnum();
pPlayerActor->spr.setspritetexture(getSequence("joe", 120).getFirstTexID());
pPlayerActor->spr.cstat = 0;
pPlayerActor->spr.pos.Z = pPlayerActor->sector()->floorz;
}
@ -2009,7 +2009,7 @@ void AIPlayer::Tick(RunListEvent* ev)
const auto pPlayer = &PlayerList[nPlayer];
const auto pPlayerActor = pPlayer->pActor;
pPlayerActor->spr.picnum = getSequence(pPlayerActor->nSeqFile, PlayerSeq[nHeightTemplate[pPlayerActor->nAction]].nSeqId).getFirstPicnum();
pPlayerActor->spr.setspritetexture(getSequence(pPlayerActor->nSeqFile, PlayerSeq[nHeightTemplate[pPlayerActor->nAction]].nSeqId).getFirstTexID());
pPlayer->pDoppleSprite->spr.picnum = pPlayerActor->spr.picnum;
doPlayerCounters(pPlayer);

View file

@ -252,7 +252,7 @@ void BlowChunks(DExhumedActor* pActor)
{
for (int i = 0; i < 4; i++)
{
BuildCreatureChunk(pActor, getSequence("spider", i + 41).getFirstPicnum());
BuildCreatureChunk(pActor, getSequence("spider", i + 41).getFirstTexID());
}
}
@ -275,7 +275,7 @@ void DestroyEgg(int nEgg)
{
for (int i = 0; i < 4; i++)
{
BuildCreatureChunk(pActor, getSequence("queenegg", (i % 2) + 24).getFirstPicnum());
BuildCreatureChunk(pActor, getSequence("queenegg", (i % 2) + 24).getFirstTexID());
}
}
@ -546,7 +546,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
const auto& eggSeq = getSequence(pActor->nSeqFile, EggSeq[nAction].nSeqId);
const auto& seqFrame = eggSeq.frames[pEgg->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
if (nAction != 4)
{
@ -807,7 +807,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
seqFrame.playSound(pActor);
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
QueenHead.nFrame++;
if (QueenHead.nFrame >= queenSeq.frames.Size())
@ -1238,7 +1238,7 @@ void AIQueen::Tick(RunListEvent* ev)
const auto& queenSeq = getSequence(pActor->nSeqFile, QueenSeq[nAction].nSeqId);
const auto& seqFrame = queenSeq.frames[QueenList[nQueen].nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);
@ -1435,7 +1435,7 @@ void AIQueen::Tick(RunListEvent* ev)
if (QueenList[nQueen].nIndex <= 0)
{
pActor->spr.cstat = 0;
const auto queenPicnum = getSequence("queen", 57).getFirstPicnum();
const auto queenPicnum = getSequence("queen", 57).getFirstTexID();
for (int i = 0; i < 20; i++)
{

View file

@ -219,7 +219,7 @@ void AIRa::Tick(RunListEvent* ev)
bool bVal = false;
Ra[nPlayer].pTarget = PlayerList[nPlayer].pTarget;
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
if (Ra[nPlayer].nAction)
{

View file

@ -25,9 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_PS_NS
int nMinChunk;
int nPlayerPic;
int nMaxChunk;
FTextureID nPlayerPic;
static actionSeq RatSeq[] = {
{0, 1},
@ -47,9 +45,7 @@ void SerializeRat(FSerializer& arc)
{
if (arc.BeginObject("rat"))
{
arc("minchunk", nMinChunk)
("maxchunk", nMaxChunk)
("playerpic", nPlayerPic)
arc("playerpic", nPlayerPic)
.EndObject();
}
}
@ -62,21 +58,7 @@ void SerializeRat(FSerializer& arc)
void InitRats()
{
nMinChunk = 9999;
nMaxChunk = -1;
for (int i = 122; i <= 131; i++)
{
int nPic = getSequence("joe", i).getFirstPicnum();
if (nPic < nMinChunk)
nMinChunk = nPic;
if (nPic > nMaxChunk)
nMaxChunk = nPic;
}
nPlayerPic = getSequence("joe", 120).getFirstPicnum();
nPlayerPic = getSequence("joe", 120).getFirstTexID();
}
void SetRatVel(DExhumedActor* pActor)
@ -167,7 +149,7 @@ DExhumedActor* FindFood(DExhumedActor* pActor)
DExhumedActor* pActor2 = nBodySprite[RandomSize(7) % nBodyTotal];
if (pActor2 != nullptr)
{
if (nPlayerPic == pActor2->spr.picnum)
if (legacyTileNum(nPlayerPic) == pActor2->spr.picnum)
{
if (cansee(pActor->spr.pos, pSector, pActor2->spr.pos, pActor2->sector())) {
return pActor2;
@ -249,7 +231,7 @@ void AIRat::Tick(RunListEvent* ev)
const auto& ratSeq = getSequence(pActor->nSeqFile, RatSeq[nAction].nSeqId);
const auto& seqFrame = ratSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);

View file

@ -195,7 +195,7 @@ void AIRex::Tick(RunListEvent* ev)
const auto& rexSeq = getSequence(pActor->nSeqFile, RexSeq[nAction].nSeqId);
const auto& seqFrame = rexSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
int ecx = 2;

View file

@ -215,7 +215,7 @@ void AIRoach::Tick(RunListEvent* ev)
const auto& roachSeq = getSequence(pActor->nSeqFile, RoachSeq[nAction].nSeqId);
const auto& seqFrame = roachSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);
pActor->nFrame++;

View file

@ -210,7 +210,7 @@ void AIScorp::Tick(RunListEvent* ev)
const auto& scorpSeq = getSequence(pActor->nSeqFile, ScorpSeq[nAction].nSeqId);
const auto& seqFrame = scorpSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);
pActor->nFrame++;

View file

@ -290,8 +290,7 @@ int addSeq(const char *seqName)
gSeqFrame.chunks.Push({
(int16_t)(nSeqFrameChunkPosX[nChunk] - CenterX),
(int16_t)(nSeqFrameChunkPosY[nChunk] - CenterY),
nSeqFrameChunkPicnum[nChunk],
tileGetTexture(nSeqFrameChunkPicnum[nChunk])->GetID(),
tileGetTextureID(nSeqFrameChunkPicnum[nChunk]),
nSeqFrameChunkFlags[nChunk],
});
}
@ -317,18 +316,18 @@ void seq_LoadSequences()
}
}
nShadowPic = getSequence("shadow").getFirstPicnum();
nShadowWidth = tileWidth(nShadowPic);
nShadowPic = getSequence("shadow").getFirstTexID();
nShadowWidth = (int16_t)TexMan.GetGameTexture(nShadowPic)->GetDisplayWidth();
nFlameHeight = tileHeight(getSequence("firepoof").getFirstPicnum());
nFlameHeight = (int16_t)TexMan.GetGameTexture(getSequence("firepoof").getFirstTexID())->GetDisplayHeight();
nBackgroundPic = getSequence("backgrnd").getFirstPicnum();
nBackgroundPic = getSequence("backgrnd").getFirstTexID();
nPilotLightCount = getSequence("flamer", 3).frames.Size();
nPilotLightFrame = 0;
const auto& fontSeq = getSequence("font2");
nFontFirstChar = fontSeq.getFirstPicnum();
const int nFontFirstChar = legacyTileNum(fontSeq.getFirstTexID());
for (unsigned i = 0; i < fontSeq.frames.Size(); i++)
{
@ -358,7 +357,7 @@ void seq_DrawPilotLightSeq(double xOffset, double yOffset)
const double x = frameChunk.xpos + (160 + xOffset);
const double y = frameChunk.ypos + (100 + yOffset);
hud_drawsprite(x, y, 65536, PlayerList[nLocalPlayer].pActor->spr.Angles.Yaw.Normalized180().Degrees() * 2., frameChunk.picnum, 0, 0, 1);
hud_drawsprite(x, y, 65536, PlayerList[nLocalPlayer].pActor->spr.Angles.Yaw.Normalized180().Degrees() * 2., legacyTileNum(frameChunk.tex), 0, 0, 1);
}
}
}
@ -397,7 +396,7 @@ void seq_DrawGunSequence(const Seq& weapSeq, int16_t frameIndex, double xOffs, d
alpha = 0.3;
}
hud_drawsprite(x + xOffs, y + yOffs, 65536, angle.Degrees(), frameChunk.picnum, nShade, nPal, stat, alpha);
hud_drawsprite(x + xOffs, y + yOffs, 65536, angle.Degrees(), legacyTileNum(frameChunk.tex), nShade, nPal, stat, alpha);
}
}
@ -441,7 +440,7 @@ void seq_PlotArrowSequence(const int nSprite, const FName seqFile, const int16_t
}
pTSprite->yoffset = -frameChunk.ypos;
pTSprite->picnum = frameChunk.picnum;
pTSprite->setspritetexture(frameChunk.tex);
}
//---------------------------------------------------------------------------
@ -497,7 +496,7 @@ void seq_PlotSequence(const int nSprite, const FName seqFile, const int16_t seqI
}
tsp->yoffset = -seqFrameChunk.ypos;
tsp->picnum = seqFrameChunk.picnum;
tsp->setspritetexture(seqFrameChunk.tex);
}
if (!(pTSprite->cstat & CSTAT_SPRITE_BLOCK_ALL) || (pTSprite->ownerActor->spr.statnum == 100 && nNetPlayerCount))
@ -515,10 +514,10 @@ void seq_PlotSequence(const int nSprite, const FName seqFile, const int16_t seqI
}
else
{
pTSprite->picnum = nShadowPic;
pTSprite->setspritetexture(nShadowPic);
const auto nPict = drawFrame.getFirstPicnum();
const auto nScale = max(((tileWidth(nPict) << 5) / nShadowWidth) - int16_t((nFloorZ - pTSprite->pos.Z) * 2.), 1) * REPEAT_SCALE;
const auto nTexWidth = (int)TexMan.GetGameTexture(drawFrame.getFirstTexID())->GetDisplayWidth();
const auto nScale = max(((nTexWidth << 5) / nShadowWidth) - int16_t((nFloorZ - pTSprite->pos.Z) * 2.), 1) * REPEAT_SCALE;
pTSprite->cstat = CSTAT_SPRITE_ALIGNMENT_FLOOR | CSTAT_SPRITE_TRANSLUCENT;
pTSprite->pos.Z = pSector->floorz;

View file

@ -31,8 +31,7 @@ struct SeqFrameChunk
{
int16_t xpos;
int16_t ypos;
int16_t picnum;
FTextureID tex; // FIXME (native wants picnum, statusbar wants texid)
FTextureID tex;
int16_t flags;
};
@ -42,9 +41,9 @@ struct SeqFrame
int16_t flags;
TArray<SeqFrameChunk> chunks;
const int getFirstPicnum() const
const FTextureID getFirstTexID() const
{
return chunks[0].picnum;
return chunks[0].tex;
}
const void playSound(DExhumedActor* const pActor) const
@ -68,9 +67,9 @@ struct Seq
int16_t flags;
TArray<SeqFrame> frames;
const int getFirstPicnum() const
const FTextureID getFirstTexID() const
{
return frames[0].getFirstPicnum();
return frames[0].getFirstTexID();
}
};

View file

@ -116,7 +116,7 @@ void BuildSoul(DExhumedActor* pSet)
pActor->spr.xoffset = 0;
pActor->spr.yoffset = 0;
pActor->nSeqFile = "set";
pActor->spr.picnum = getSequence(pActor->nSeqFile, 75).getFirstPicnum();
pActor->spr.setspritetexture(getSequence(pActor->nSeqFile, 75).getFirstTexID());
pActor->spr.Angles.Yaw = RandomAngle();
pActor->vel.X = 0;
pActor->vel.Y = 0;
@ -274,7 +274,7 @@ void AISet::Tick(RunListEvent* ev)
const auto& setSeq = getSequence(pActor->nSeqFile, SetSeq[nAction].nSeqId);
const auto& seqFrame = setSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);
if (nAction == 3)
@ -609,7 +609,7 @@ void AISet::Tick(RunListEvent* ev)
if (seqFrame.flags & 0x80)
{
pActor->spr.pos.Z -= GetActorHeight(pActor);
BuildCreatureChunk(pActor, getSequence("set", 76).getFirstPicnum());
BuildCreatureChunk(pActor, getSequence("set", 76).getFirstTexID());
pActor->spr.pos.Z += GetActorHeight(pActor);
}

View file

@ -163,7 +163,7 @@ void BuildSnake(int nPlayer, double zVal)
auto pPlayerActor = PlayerList[nPlayer].pActor;
auto pViewSect = PlayerList[nPlayer].pPlayerViewSect;
int nPic = getSequence("snakbody", 0).getFirstPicnum();
auto nPic = getSequence("snakbody", 0).getFirstTexID();
auto pos = pPlayerActor->spr.pos.plusZ(zVal - 10);
@ -207,7 +207,7 @@ void BuildSnake(int nPlayer, double zVal)
pActor->pTarget = pPlayerActor;
//pActor->spr.intowner = nPlayerSprite;
pActor->spr.picnum = nPic;
pActor->spr.setspritetexture(nPic);
if (i == 0)
{

View file

@ -122,7 +122,7 @@ void AISpider::Tick(RunListEvent* ev)
const auto& spiderSeq = getSequence(spp->nSeqFile, SpiderSeq[nAction].nSeqId);
const auto& seqFrame = spiderSeq.frames[spp->nFrame];
spp->spr.picnum = spp->nFrame < 9 ? seqFrame.getFirstPicnum() : -1;
spp->spr.setspritetexture(spp->nFrame < 9 ? seqFrame.getFirstTexID() : FNullTextureID());
seqFrame.playSound(spp);
@ -421,7 +421,7 @@ void AISpider::Damage(RunListEvent* ev)
for (int i = 0; i < 7; i++)
{
BuildCreatureChunk(spp, getSequence("spider", i + 41).getFirstPicnum());
BuildCreatureChunk(spp, getSequence("spider", i + 41).getFirstTexID());
}
}
}

View file

@ -47,7 +47,7 @@ BEGIN_PS_NS
void UpdateFrame()
{
auto tex = tileGetTexture(nBackgroundPic);
auto tex = TexMan.GetGameTexture(nBackgroundPic);
twod->AddFlatFill(0, 0, twod->GetWidth(), viewport3d.Top() - 3, tex);
twod->AddFlatFill(0, viewport3d.Bottom() + 3, twod->GetWidth(), twod->GetHeight(), tex);

View file

@ -218,7 +218,7 @@ void AIWasp::Tick(RunListEvent* ev)
const auto& waspSeq = getSequence(pActor->nSeqFile, WaspSeq[nAction].nSeqId);
const auto& seqFrame = waspSeq.frames[pActor->nFrame];
pActor->spr.picnum = seqFrame.getFirstPicnum();
pActor->spr.setspritetexture(seqFrame.getFirstTexID());
seqFrame.playSound(pActor);