mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-31 21:21:16 +00:00
- all of Exhumed except BuildAnim
This commit is contained in:
parent
62427f8260
commit
43b8f92f91
6 changed files with 30 additions and 33 deletions
|
@ -92,8 +92,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, const DVector
|
|||
}
|
||||
|
||||
pActor->clipdist = 2.5;
|
||||
pActor->spr.xrepeat = nRepeat;
|
||||
pActor->spr.yrepeat = nRepeat;
|
||||
pActor->spr.SetScale(nRepeat * REPEAT_SCALE, nRepeat * REPEAT_SCALE);
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->spr.angle = nullAngle;
|
||||
pActor->spr.xoffset = 0;
|
||||
|
@ -269,7 +268,7 @@ void BuildExplosion(DExhumedActor* pActor)
|
|||
edx = 34;
|
||||
}
|
||||
|
||||
BuildAnim(nullptr, edx, 0, pActor->spr.pos, pActor->sector(), pActor->spr.xrepeat, 4);
|
||||
BuildAnim(nullptr, edx, 0, pActor->spr.pos, pActor->sector(), pActor->spr.ScaleX() * INV_REPEAT_SCALE, 4);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -284,7 +283,8 @@ void BuildSplash(DExhumedActor* pActor, sectortype* pSector)
|
|||
|
||||
if (pActor->spr.statnum != 200)
|
||||
{
|
||||
nRepeat = pActor->spr.xrepeat + (RandomWord() % pActor->spr.xrepeat);
|
||||
int rep = int(pActor->spr.ScaleX() * INV_REPEAT_SCALE);
|
||||
nRepeat = rep + (RandomWord() % rep);
|
||||
nSound = kSound0;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -183,7 +183,7 @@ void IgniteSprite(DExhumedActor* pActor)
|
|||
{
|
||||
pAnimActor->pTarget = pActor;
|
||||
ChangeActorStat(pAnimActor, kStatIgnited);
|
||||
pAnimActor->spr.yrepeat = (uint8_t)max(1, (tileHeight(pAnimActor->spr.picnum) * 32) / nFlameHeight);
|
||||
pAnimActor->spr.SetScaleY(max(1, (tileHeight(pAnimActor->spr.picnum) * 32) / nFlameHeight) * REPEAT_SCALE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -636,8 +636,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, double fZOffset, DA
|
|||
nRepeat = 30;
|
||||
}
|
||||
|
||||
pBulletActor->spr.xrepeat = (uint8_t)nRepeat;
|
||||
pBulletActor->spr.yrepeat = (uint8_t)nRepeat;
|
||||
pBulletActor->spr.SetScale(nRepeat * REPEAT_SCALE, nRepeat * REPEAT_SCALE);
|
||||
pBulletActor->spr.xoffset = 0;
|
||||
pBulletActor->spr.yoffset = 0;
|
||||
pBulletActor->spr.angle = nAngle;
|
||||
|
@ -808,7 +807,7 @@ void AIBullet::Tick(RunListEvent* ev)
|
|||
|
||||
if (nFlag & 0x80)
|
||||
{
|
||||
BuildAnim(nullptr, 45, 0, pActor->spr.pos, pActor->sector(), pActor->spr.xrepeat, 0);
|
||||
BuildAnim(nullptr, 45, 0, pActor->spr.pos, pActor->sector(), pActor->spr.ScaleX() * REPEAT_SCALE, 0);
|
||||
}
|
||||
|
||||
BulletList[nBullet].nFrame++;
|
||||
|
|
|
@ -148,9 +148,9 @@ void BuildItemAnim(DExhumedActor* pActor)
|
|||
else
|
||||
{
|
||||
pActor->spr.intowner = -1;
|
||||
pActor->spr.yrepeat = (uint8_t)nItemAnimInfo[nItem].repeat;
|
||||
pActor->spr.xrepeat = (uint8_t)nItemAnimInfo[nItem].repeat;
|
||||
}
|
||||
double s = nItemAnimInfo[nItem].repeat * REPEAT_SCALE;
|
||||
pActor->spr.SetScale(s, s);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -440,7 +440,7 @@ void StartRegenerate(DExhumedActor* pActor)
|
|||
if (pos >= Regenerates.Size())
|
||||
{
|
||||
// ?? CHECKME
|
||||
pActor->spr.xint = pActor->spr.xrepeat;
|
||||
pActor->spr.xint = pActor->spr.ScaleX() * INV_REPEAT_SCALE;
|
||||
pActor->spr.inittype = pActor->spr.shade;
|
||||
pActor->spr.yint = pActor->spr.pal;
|
||||
}
|
||||
|
@ -474,6 +474,7 @@ void DoRegenerates()
|
|||
for(unsigned i = 0; i < Regenerates.Size(); i++)
|
||||
{
|
||||
DExhumedActor* pActor = GC::ReadBarrier(Regenerates[i]);
|
||||
double s = pActor->spr.xint * REPEAT_SCALE;
|
||||
if (pActor->spr.extra > 0)
|
||||
{
|
||||
pActor->spr.extra--;
|
||||
|
@ -489,7 +490,7 @@ void DoRegenerates()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (pActor->spr.xrepeat < pActor->spr.xint)
|
||||
if (pActor->spr.ScaleX() < s)
|
||||
{
|
||||
pActor->spr.AddScaleX(0.03125);
|
||||
pActor->spr.AddScaleY(0.03125);
|
||||
|
@ -497,8 +498,7 @@ void DoRegenerates()
|
|||
}
|
||||
}
|
||||
|
||||
pActor->spr.yrepeat = (uint8_t)pActor->spr.xint;
|
||||
pActor->spr.xrepeat = (uint8_t)pActor->spr.xint;
|
||||
pActor->spr.SetScale(s, s);
|
||||
pActor->spr.pal = (uint8_t)pActor->spr.yint;
|
||||
pActor->spr.yint = 0;
|
||||
pActor->spr.xint = 0;
|
||||
|
|
|
@ -1009,8 +1009,8 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
auto pSector =pActor->sector();
|
||||
auto nAngle = RandomAngle();
|
||||
|
||||
pActor->spr.xrepeat = 127 - QueenHead.nIndex2;
|
||||
pActor->spr.yrepeat = 127 - QueenHead.nIndex2;
|
||||
double s = (127 - QueenHead.nIndex2) * REPEAT_SCALE;
|
||||
pActor->spr.SetScale(s, s);
|
||||
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
|
||||
|
|
|
@ -55,8 +55,7 @@ int word_964E8 = 0;
|
|||
int word_964EA = 0;
|
||||
int word_964EC = 10;
|
||||
|
||||
int nSpiritRepeatX;
|
||||
int nSpiritRepeatY;
|
||||
DVector2 nSpiritScale;
|
||||
TObjPtr<DExhumedActor*> pSpiritSprite;
|
||||
int nPixelsToShow;
|
||||
int nTalkTime = 0;
|
||||
|
@ -67,8 +66,7 @@ void InitSpiritHead()
|
|||
nPixels = 0;
|
||||
auto pSpiritSpr = pSpiritSprite;
|
||||
|
||||
nSpiritRepeatX = pSpiritSpr->spr.xrepeat;
|
||||
nSpiritRepeatY = pSpiritSpr->spr.yrepeat;
|
||||
nSpiritScale = pSpiritSpr->spr.Scale();
|
||||
|
||||
tileLoad(kTileRamsesNormal); // Ramses Normal Head
|
||||
|
||||
|
@ -383,18 +381,18 @@ void DoSpiritHead()
|
|||
|
||||
if (nHeadStage == 1)
|
||||
{
|
||||
if (pSpiritSpr->spr.xrepeat > nSpiritRepeatX)
|
||||
if (pSpiritSpr->spr.ScaleX() > nSpiritScale.X)
|
||||
{
|
||||
pSpiritSpr->spr.xrepeat -= 2;
|
||||
if (pSpiritSpr->spr.xrepeat < nSpiritRepeatX)
|
||||
pSpiritSpr->spr.xrepeat = (uint8_t)nSpiritRepeatX;
|
||||
}
|
||||
if (pSpiritSpr->spr.yrepeat > nSpiritRepeatY)
|
||||
{
|
||||
pSpiritSpr->spr.yrepeat -= 2;
|
||||
if (pSpiritSpr->spr.yrepeat < nSpiritRepeatY)
|
||||
pSpiritSpr->spr.yrepeat = (uint8_t)nSpiritRepeatY;
|
||||
pSpiritSpr->spr.AddScaleX(-0.03125);
|
||||
if (pSpiritSpr->spr.ScaleX() < nSpiritScale.X)
|
||||
pSpiritSpr->spr.SetScaleX(nSpiritScale.X);
|
||||
}
|
||||
if (pSpiritSpr->spr.ScaleY() > nSpiritScale.Y)
|
||||
{
|
||||
pSpiritSpr->spr.AddScaleY(-0.03125);
|
||||
if (pSpiritSpr->spr.ScaleY() < nSpiritScale.Y)
|
||||
pSpiritSpr->spr.SetScaleY(nSpiritScale.Y);
|
||||
}
|
||||
|
||||
int nCount = 0;
|
||||
for (int i = 0; i < nPixels; i++)
|
||||
|
|
|
@ -221,8 +221,8 @@ void BuildSnake(int nPlayer, double zVal)
|
|||
else
|
||||
{
|
||||
pActor->spr.pos = sprt->spr.pos;
|
||||
pActor->spr.xrepeat = 40 - 3 * i;
|
||||
pActor->spr.yrepeat = 40 - 3 * i;
|
||||
double s = 0.625 + 0.046875 * i;
|
||||
pActor->spr.SetScale(s, s);
|
||||
}
|
||||
|
||||
pActor->clipdist = 2.5;
|
||||
|
|
Loading…
Reference in a new issue