mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-20 08:00:56 +00:00
- renamed movesprite functions as preparation
This commit is contained in:
parent
c41af213b4
commit
98eb4a169d
12 changed files with 29 additions and 29 deletions
|
@ -344,7 +344,7 @@ int MoveBullet(int nBullet)
|
|||
}
|
||||
}
|
||||
|
||||
coll = movesprite(pActor, pBullet->vect, pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1);
|
||||
coll = movesprite__(pActor, pBullet->vect, pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1);
|
||||
|
||||
MOVEEND:
|
||||
if (coll.type || coll.exbits)
|
||||
|
|
|
@ -33,14 +33,14 @@ enum
|
|||
};
|
||||
|
||||
|
||||
Collision movesprite(DExhumedActor* spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
||||
Collision movesprite(DExhumedActor* spritenum, const DVector3& pos, int ceildist, int flordist, unsigned int clipmask)
|
||||
Collision movesprite_(DExhumedActor* spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
|
||||
Collision movesprite__(DExhumedActor* spritenum, const DVector3& pos, int ceildist, int flordist, unsigned int clipmask)
|
||||
{
|
||||
return movesprite(spritenum, int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask);
|
||||
return movesprite_(spritenum, int(pos.X * worldtoint), int(pos.Y * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask);
|
||||
}
|
||||
Collision movesprite(DExhumedActor* spritenum, const DVector3& pos, double xyfactor, int ceildist, int flordist, unsigned int clipmask)
|
||||
Collision movesprite___(DExhumedActor* spritenum, const DVector3& pos, double xyfactor, int ceildist, int flordist, unsigned int clipmask)
|
||||
{
|
||||
return movesprite(spritenum, int(pos.X * xyfactor * worldtoint), int(pos.Y * xyfactor * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask);
|
||||
return movesprite_(spritenum, int(pos.X * xyfactor * worldtoint), int(pos.Y * xyfactor * worldtoint), int(pos.Z * zworldtoint), ceildist, flordist, clipmask);
|
||||
}
|
||||
|
||||
void precache();
|
||||
|
|
|
@ -119,7 +119,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto coll = movesprite(pActor, pActor->vel, 256., 2560, -2560, CLIPMASK1);
|
||||
auto coll = movesprite___(pActor, pActor->vel, 256., 2560, -2560, CLIPMASK1);
|
||||
if (coll.type != kHitNone)
|
||||
{
|
||||
pActor->vel.X = 0;
|
||||
|
@ -413,7 +413,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
auto pSector =pActor->sector();
|
||||
|
||||
// loc_2EF54
|
||||
Collision coll = movesprite(pActor, pActor->vel * 4, 2048., 0, 0, CLIPMASK0);
|
||||
Collision coll = movesprite___(pActor, pActor->vel * 4, 2048., 0, 0, CLIPMASK0);
|
||||
|
||||
if (!(pActor->sector()->Flag & kSectUnderwater))
|
||||
{
|
||||
|
|
|
@ -75,7 +75,7 @@ void ThrowGrenade(int nPlayer, int, int, int ecx, int push1)
|
|||
|
||||
|
||||
DVector2 vec = nAngle.ToVector() * pPlayerActor->fClipdist() *2; // == << 14 + 3 + 2 - 18
|
||||
auto nMov = movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), ecx, 0, 0, CLIPMASK1);
|
||||
auto nMov = movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), ecx, 0, 0, CLIPMASK1);
|
||||
if (nMov.type == kHitWall)
|
||||
{
|
||||
nAngle = GetWallNormal(nMov.hitWall);
|
||||
|
@ -279,7 +279,7 @@ void AIGrenade::Tick(RunListEvent* ev)
|
|||
int zVel = pActor->int_zvel();
|
||||
|
||||
Gravity(pActor);
|
||||
auto nMov = movesprite(pActor, int(pActor->vec.X * worldtoint), int(pActor->vec.Y * worldtoint), pActor->int_zvel(), pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1);
|
||||
auto nMov = movesprite_(pActor, int(pActor->vec.X * worldtoint), int(pActor->vec.Y * worldtoint), pActor->int_zvel(), pActor->native_clipdist() >> 1, pActor->native_clipdist() >> 1, CLIPMASK1);
|
||||
|
||||
if (!nMov.type && !nMov.exbits)
|
||||
return;
|
||||
|
|
|
@ -73,7 +73,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->spr.shade += 3;
|
||||
|
||||
auto coll = movesprite(pActor, pActor->vel, 4096., 2560, -2560, CLIPMASK1);
|
||||
auto coll = movesprite___(pActor, pActor->vel, 4096., 2560, -2560, CLIPMASK1);
|
||||
|
||||
if (coll.type || pActor->spr.shade > 100)
|
||||
{
|
||||
|
@ -279,7 +279,7 @@ void AILavaDude::Tick(RunListEvent* ev)
|
|||
auto pos = pActor->spr.pos;
|
||||
auto pSector =pActor->sector();
|
||||
|
||||
auto coll = movesprite(pActor, DVector3(pActor->vel.XY(), 0), 256., 0, 0, CLIPMASK0);
|
||||
auto coll = movesprite___(pActor, DVector3(pActor->vel.XY(), 0), 256., 0, 0, CLIPMASK0);
|
||||
|
||||
if (pSector != pActor->sector())
|
||||
{
|
||||
|
|
|
@ -393,7 +393,7 @@ DExhumedActor* insertActor(sectortype* s, int st)
|
|||
}
|
||||
|
||||
|
||||
Collision movesprite(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask)
|
||||
Collision movesprite_(DExhumedActor* pActor, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask)
|
||||
{
|
||||
DVector2 vect(FixedToFloat<18>(dx), FixedToFloat<18>(dy));
|
||||
|
||||
|
@ -511,7 +511,7 @@ void Gravity(DExhumedActor* pActor)
|
|||
|
||||
Collision MoveCreature(DExhumedActor* pActor)
|
||||
{
|
||||
return movesprite(pActor, pActor->vel, 256., 15360, -5120, CLIPMASK0);
|
||||
return movesprite___(pActor, pActor->vel, 256., 15360, -5120, CLIPMASK0);
|
||||
}
|
||||
|
||||
Collision MoveCreatureWithCaution(DExhumedActor* pActor)
|
||||
|
@ -823,7 +823,7 @@ void MoveSector(sectortype* pSector, DAngle nAngle, DVector2& nVel)
|
|||
{
|
||||
// Unlike the above, this one *did* scale vect
|
||||
vect2 = nAngle.ToVector() * pActor->fClipdist() * 0.25 + vect;
|
||||
movesprite(pActor, FloatToFixed<18>(vect2.X), FloatToFixed<18>(vect2.Y), 0, 0, 0, CLIPMASK0);
|
||||
movesprite_(pActor, FloatToFixed<18>(vect2.X), FloatToFixed<18>(vect2.Y), 0, 0, 0, CLIPMASK0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -945,7 +945,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int threshol
|
|||
auto veclen = vec.Length();
|
||||
double zz = g_sindeg(pActor->vel.Z * 45) * veclen;
|
||||
|
||||
return movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(zbob) * 512, 0, 0, nClipType);
|
||||
return movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(zbob) * 512, 0, 0, nClipType);
|
||||
}
|
||||
|
||||
DAngle GetWallNormal(walltype* pWall)
|
||||
|
@ -1120,7 +1120,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
auto pSector = pActor->sector();
|
||||
pActor->spr.pal = pSector->ceilingpal;
|
||||
|
||||
auto nVal = movesprite(pActor, pActor->vel, 1024., 2560, -2560, CLIPMASK1);
|
||||
auto nVal = movesprite___(pActor, pActor->vel, 1024., 2560, -2560, CLIPMASK1);
|
||||
|
||||
if (pActor->spr.pos.Z >= pSector->floorz)
|
||||
{
|
||||
|
|
|
@ -1037,7 +1037,7 @@ void AISlide::Tick(RunListEvent* ev)
|
|||
double nSeekB = LongSeek(&y, SlideData[nSlide].pos[4].Y, 1.25, 1.25);
|
||||
|
||||
dragpoint(SlideData[nSlide].pWall1, x, y);
|
||||
movesprite(SlideData[nSlide].pActor, FloatToFixed<18>(nSeekA), FloatToFixed<18>(nSeekB), 0, 0, 0, CLIPMASK1);
|
||||
movesprite_(SlideData[nSlide].pActor, FloatToFixed<18>(nSeekA), FloatToFixed<18>(nSeekB), 0, 0, 0, CLIPMASK1);
|
||||
|
||||
if (nSeekA == 0 && nSeekB == 0)
|
||||
{
|
||||
|
@ -1372,7 +1372,7 @@ void AISpark::Tick(RunListEvent* ev)
|
|||
|
||||
pActor->vel.Z += 0.5;
|
||||
|
||||
auto nMov = movesprite(pActor, pActor->vel, 4096, 2560, -2560, CLIPMASK1);
|
||||
auto nMov = movesprite___(pActor, pActor->vel, 4096, 2560, -2560, CLIPMASK1);
|
||||
if (!nMov.type && !nMov.exbits) {
|
||||
return;
|
||||
}
|
||||
|
@ -1823,7 +1823,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
FUNCOBJECT_GOTO:
|
||||
if (nStat != kStatExplodeTarget)
|
||||
{
|
||||
auto nMov = movesprite(pActor, pActor->vel, 64., 0, 0, CLIPMASK0);
|
||||
auto nMov = movesprite___(pActor, pActor->vel, 64., 0, 0, CLIPMASK0);
|
||||
|
||||
if (pActor->spr.statnum == kStatExplodeTrigger) {
|
||||
pActor->spr.pal = 1;
|
||||
|
|
|
@ -768,7 +768,7 @@ bool CheckMovingBlocks(int nPlayer, Collision& nMove, DVector3& spr_pos, sectort
|
|||
ChangeActorSect(pPlayerActor, spr_sect);
|
||||
}
|
||||
|
||||
movesprite(pPlayerActor, FloatToFixed<18>(vel.X), FloatToFixed<18>(vel.Y), z, 5120, -5120, CLIPMASK0);
|
||||
movesprite_(pPlayerActor, FloatToFixed<18>(vel.X), FloatToFixed<18>(vel.Y), z, 5120, -5120, CLIPMASK0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -929,7 +929,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
nMove = movesprite(pPlayerActor, x, y, z, 5120, -5120, CLIPMASK0);
|
||||
nMove = movesprite_(pPlayerActor, x, y, z, 5120, -5120, CLIPMASK0);
|
||||
|
||||
auto pPlayerSect = pPlayerActor->sector();
|
||||
|
||||
|
@ -1096,7 +1096,7 @@ sectdone:
|
|||
double fz = pViewSect->floorz - 20;
|
||||
pPlayerActor->spr.pos = DVector3(spr_pos.XY(), fz);
|
||||
|
||||
auto coll = movesprite(pPlayerActor, x, y, 0, 5120, 0, CLIPMASK0);
|
||||
auto coll = movesprite_(pPlayerActor, x, y, 0, 5120, 0, CLIPMASK0);
|
||||
if (coll.type == kHitWall)
|
||||
{
|
||||
ChangeActorSect(pPlayerActor, pPlayerActor->sector());
|
||||
|
|
|
@ -332,7 +332,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int thr
|
|||
|
||||
double zz = pActor->pitch.Sin() * veclen;
|
||||
|
||||
return movesprite(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(bobangle) * 512, 0, 0, CLIPMASK1);
|
||||
return movesprite_(pActor, FloatToFixed<18>(vec.X), FloatToFixed<18>(vec.Y), zz * 4096 + BobVal(bobangle) * 512, 0, 0, CLIPMASK1);
|
||||
}
|
||||
|
||||
int DestroyTailPart()
|
||||
|
@ -933,7 +933,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
auto dv = nAngle.ToVector() * 64;
|
||||
int dz = (RandomSize(5) - RandomSize(5)) << 7;
|
||||
|
||||
movesprite(pActor, FloatToFixed<18>(dv.X), FloatToFixed<18>(dv.Y), dz, 0, 0, CLIPMASK1);
|
||||
movesprite_(pActor, FloatToFixed<18>(dv.X), FloatToFixed<18>(dv.Y), dz, 0, 0, CLIPMASK1);
|
||||
|
||||
BlowChunks(pActor);
|
||||
BuildExplosion(pActor);
|
||||
|
|
|
@ -140,7 +140,7 @@ void AISoul::Tick(RunListEvent* ev)
|
|||
double nVel = DAngle::fromBuild(pActor->spr.extra).Cos();
|
||||
|
||||
auto vect = pActor->spr.angle.ToVector() * nVel * 8;
|
||||
auto coll = movesprite(pActor, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), pActor->int_zvel(), 5120, 0, CLIPMASK0);
|
||||
auto coll = movesprite_(pActor, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y), pActor->int_zvel(), 5120, 0, CLIPMASK0);
|
||||
if (coll.exbits & 0x10000)
|
||||
{
|
||||
DExhumedActor* pSet = pActor->pTarget;
|
||||
|
|
|
@ -305,7 +305,7 @@ void AISnake::Tick(RunListEvent* ev)
|
|||
{
|
||||
SEARCH_ENEMY:
|
||||
auto vec = pActor->spr.angle.ToVector() * 37.5;
|
||||
nMov = movesprite(pActor,
|
||||
nMov = movesprite_(pActor,
|
||||
FixedToFloat<18>(vec.X),
|
||||
FixedToFloat<18>(vec.Y),
|
||||
bsin(SnakeList[nSnake].nAngle, -5),
|
||||
|
@ -368,7 +368,7 @@ void AISnake::Tick(RunListEvent* ev)
|
|||
DVector2 vect;
|
||||
vect.X = cosang + cosang * i + eax * normalang.Cos();
|
||||
vect.Y = cosang + sinang * i + eax * normalang.Sin();
|
||||
movesprite(pActor2, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y),
|
||||
movesprite_(pActor2, FloatToFixed<18>(vect.X), FloatToFixed<18>(vect.Y),
|
||||
int(- zVal * (i - 1) * zworldtoint), 0, 0, CLIPMASK1);
|
||||
|
||||
snakeang += DAngle22_5;
|
||||
|
|
|
@ -273,7 +273,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
spp->vel.Y = 0;
|
||||
}
|
||||
|
||||
auto nMov = movesprite(spp, spp->vel, 1 << nVel, 1280, -1280, CLIPMASK0);
|
||||
auto nMov = movesprite___(spp, spp->vel, 1 << nVel, 1280, -1280, CLIPMASK0);
|
||||
|
||||
if (nMov.type == kHitNone && nMov.exbits == 0)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue