mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
- actCheckExplosion, removed array access from SEQ callbacks in actor.cpp and renamed the two which still had assembly names.
This commit is contained in:
parent
663ecc79d1
commit
6a1ffca34f
3 changed files with 53 additions and 55 deletions
|
@ -3952,8 +3952,8 @@ static void actImpactMissile(DBloodActor* missileActor, int hitCode)
|
||||||
case 4:
|
case 4:
|
||||||
if (pWallHit)
|
if (pWallHit)
|
||||||
{
|
{
|
||||||
spritetype* pFX = gFX.fxSpawn(FX_52, pMissile->sectnum, pMissile->x, pMissile->y, pMissile->z, 0);
|
auto pFX = gFX.fxSpawnActor(FX_52, pMissile->sectnum, pMissile->x, pMissile->y, pMissile->z, 0);
|
||||||
if (pFX) pFX->ang = (GetWallAngle(pWallHit) + 512) & 2047;
|
if (pFX) pFX->s().ang = (GetWallAngle(pWallHit) + 512) & 2047;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5248,16 +5248,17 @@ void MoveDude(DBloodActor* actor)
|
||||||
switch (tileGetSurfType(floorHit))
|
switch (tileGetSurfType(floorHit))
|
||||||
{
|
{
|
||||||
case kSurfWater:
|
case kSurfWater:
|
||||||
gFX.fxSpawn(FX_9, pSprite->sectnum, pSprite->x, pSprite->y, floorZ, 0);
|
gFX.fxSpawnActor(FX_9, pSprite->sectnum, pSprite->x, pSprite->y, floorZ, 0);
|
||||||
break;
|
break;
|
||||||
case kSurfLava:
|
case kSurfLava:
|
||||||
{
|
{
|
||||||
spritetype* pFX = gFX.fxSpawn(FX_10, pSprite->sectnum, pSprite->x, pSprite->y, floorZ, 0);
|
auto pFX = gFX.fxSpawnActor(FX_10, pSprite->sectnum, pSprite->x, pSprite->y, floorZ, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
|
auto pFXs = &pFX->s();
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
{
|
{
|
||||||
auto pFX2 = gFX.fxSpawnActor(FX_14, pFX->sectnum, pFX->x, pFX->y, pFX->z, 0);
|
auto pFX2 = gFX.fxSpawnActor(FX_14, pFXs->sectnum, pFXs->x, pFXs->y, pFXs->z, 0);
|
||||||
if (pFX2)
|
if (pFX2)
|
||||||
{
|
{
|
||||||
pFX2->xvel() = Random2(0x6aaaa);
|
pFX2->xvel() = Random2(0x6aaaa);
|
||||||
|
@ -6062,18 +6063,14 @@ static void actCheckExplosion()
|
||||||
for (int i = 0; i < gImpactSpritesCount; i++)
|
for (int i = 0; i < gImpactSpritesCount; i++)
|
||||||
{
|
{
|
||||||
if (gImpactSpritesList[i] == -1) continue;
|
if (gImpactSpritesList[i] == -1) continue;
|
||||||
|
|
||||||
auto impactactor = &bloodActors[gImpactSpritesList[i]];
|
auto impactactor = &bloodActors[gImpactSpritesList[i]];
|
||||||
auto impactsprite = &impactactor->s();
|
if (!impactactor->hasX() || impactactor->s().sectnum < 0 || (impactactor->s().flags & kHitagFree) != 0) continue;
|
||||||
if (impactsprite->sectnum < 0 || (impactsprite->flags & kHitagFree) != 0)
|
|
||||||
|
if (/*pXImpact->state == pXImpact->restState ||*/ !TestBitString(sectormap, impactactor->s().sectnum) || !CheckProximity(&impactactor->s(), x, y, z, nSector, radius))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (impactsprite->extra <= 0)
|
trTriggerSprite(impactactor, kCmdSpriteImpact);
|
||||||
continue;
|
|
||||||
XSPRITE* pXImpact = &impactactor->x();
|
|
||||||
if (/*pXImpact->state == pXImpact->restState ||*/ !TestBitString(sectormap, impactsprite->sectnum) || !CheckProximity(impactsprite, x, y, z, nSector, radius))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
trTriggerSprite(impactsprite->index, pXImpact, kCmdSpriteImpact);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7184,66 +7181,65 @@ void actFireVector(DBloodActor* shooter, int a2, int a3, int a4, int a5, int a6,
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void FireballSeqCallback(int, DBloodActor* actor)
|
void FireballSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE* pXSprite = &actor->x();
|
auto pSprite = &actor->s();
|
||||||
int nSprite = pXSprite->reference;
|
auto pFX = gFX.fxSpawnActor(FX_11, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
spritetype *pSprite = &actor->s();
|
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_11, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
pFX->xvel() = actor->xvel();
|
||||||
xvel[nFX] = actor->xvel();
|
pFX->yvel() = actor->yvel();
|
||||||
yvel[nFX] = actor->yvel();
|
pFX->zvel() = actor->zvel();
|
||||||
zvel[nFX] = actor->zvel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void NapalmSeqCallback(int, DBloodActor* actor)
|
void NapalmSeqCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE* pXSprite = &actor->x();
|
auto pSprite = &actor->s();
|
||||||
spritetype *pSprite = &actor->s();
|
auto pFX = gFX.fxSpawnActor(FX_12, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_12, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
pFX->xvel() = actor->xvel();
|
||||||
xvel[nFX] = actor->xvel();
|
pFX->yvel() = actor->yvel();
|
||||||
yvel[nFX] = actor->yvel();
|
pFX->zvel() = actor->zvel();
|
||||||
zvel[nFX] = actor->zvel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_3888C(int, DBloodActor* actor)
|
void Fx32Callback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
spritetype* pSprite = &actor->s();
|
auto pSprite = &actor->s();
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_32, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
auto pFX = gFX.fxSpawnActor(FX_32, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
pFX->xvel() = actor->xvel();
|
||||||
xvel[nFX] = actor->xvel();
|
pFX->yvel() = actor->yvel();
|
||||||
yvel[nFX] = actor->yvel();
|
pFX->zvel() = actor->zvel();
|
||||||
zvel[nFX] = actor->zvel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sub_38938(int, DBloodActor* actor)
|
void Fx33Callback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
spritetype *pSprite = &actor->s();
|
auto pSprite = &actor->s();
|
||||||
spritetype *pFX = gFX.fxSpawn(FX_33, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
auto pFX = gFX.fxSpawnActor(FX_33, pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 0);
|
||||||
if (pFX)
|
if (pFX)
|
||||||
{
|
{
|
||||||
int nFX = pFX->index;
|
pFX->xvel() = actor->xvel();
|
||||||
xvel[nFX] = actor->xvel();
|
pFX->yvel() = actor->yvel();
|
||||||
yvel[nFX] = actor->yvel();
|
pFX->zvel() = actor->zvel();
|
||||||
zvel[nFX] = actor->zvel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void TreeToGibCallback(int, DBloodActor* actor)
|
void TreeToGibCallback(int, DBloodActor* actor)
|
||||||
{
|
{
|
||||||
XSPRITE* pXSprite = &actor->x();
|
XSPRITE* pXSprite = &actor->x();
|
||||||
spritetype *pSprite = &actor->s();
|
spritetype* pSprite = &actor->s();
|
||||||
pSprite->type = kThingObjectExplode;
|
pSprite->type = kThingObjectExplode;
|
||||||
pXSprite->state = 1;
|
pXSprite->state = 1;
|
||||||
pXSprite->data1 = 15;
|
pXSprite->data1 = 15;
|
||||||
|
@ -7348,22 +7344,24 @@ void MakeSplash(DBloodActor* actor)
|
||||||
pSprite->flags &= ~2;
|
pSprite->flags &= ~2;
|
||||||
int nXSprite = pSprite->extra;
|
int nXSprite = pSprite->extra;
|
||||||
pSprite->z -= 4 << 8;
|
pSprite->z -= 4 << 8;
|
||||||
int nSurface = tileGetSurfType(gSpriteHit[nXSprite].florhit);
|
int nSurface = tileGetSurfType(actor->hit().florhit);
|
||||||
switch (pSprite->type) {
|
switch (pSprite->type)
|
||||||
|
{
|
||||||
case kThingDripWater:
|
case kThingDripWater:
|
||||||
switch (nSurface) {
|
switch (nSurface)
|
||||||
|
{
|
||||||
case kSurfWater:
|
case kSurfWater:
|
||||||
seqSpawn(6, 3, nXSprite, -1);
|
seqSpawn(6, actor, -1);
|
||||||
sfxPlay3DSound(pSprite, 356, -1, 0);
|
sfxPlay3DSound(pSprite, 356, -1, 0);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
seqSpawn(7, 3, nXSprite, -1);
|
seqSpawn(7, actor, -1);
|
||||||
sfxPlay3DSound(pSprite, 354, -1, 0);
|
sfxPlay3DSound(pSprite, 354, -1, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kThingDripBlood:
|
case kThingDripBlood:
|
||||||
seqSpawn(8, 3, nXSprite, -1);
|
seqSpawn(8, actor, -1);
|
||||||
sfxPlay3DSound(pSprite, 354, -1, 0);
|
sfxPlay3DSound(pSprite, 354, -1, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,9 +36,9 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
static void (*seqClientCallback[])(int, DBloodActor*) = {
|
static void (*seqClientCallback[])(int, DBloodActor*) = {
|
||||||
FireballSeqCallback,
|
FireballSeqCallback,
|
||||||
sub_38938,
|
Fx33Callback,
|
||||||
NapalmSeqCallback,
|
NapalmSeqCallback,
|
||||||
sub_3888C,
|
Fx32Callback,
|
||||||
TreeToGibCallback,
|
TreeToGibCallback,
|
||||||
DudeToGibCallback1,
|
DudeToGibCallback1,
|
||||||
DudeToGibCallback2,
|
DudeToGibCallback2,
|
||||||
|
|
|
@ -4,9 +4,9 @@ BEGIN_BLD_NS
|
||||||
|
|
||||||
class DBloodActor;
|
class DBloodActor;
|
||||||
void FireballSeqCallback(int, DBloodActor*);
|
void FireballSeqCallback(int, DBloodActor*);
|
||||||
void sub_38938(int, DBloodActor*);
|
void Fx33Callback(int, DBloodActor*);
|
||||||
void NapalmSeqCallback(int, DBloodActor*);
|
void NapalmSeqCallback(int, DBloodActor*);
|
||||||
void sub_3888C(int, DBloodActor*);
|
void Fx32Callback(int, DBloodActor*);
|
||||||
void TreeToGibCallback(int, DBloodActor*);
|
void TreeToGibCallback(int, DBloodActor*);
|
||||||
void DudeToGibCallback1(int, DBloodActor*);
|
void DudeToGibCallback1(int, DBloodActor*);
|
||||||
void DudeToGibCallback2(int, DBloodActor*);
|
void DudeToGibCallback2(int, DBloodActor*);
|
||||||
|
|
Loading…
Reference in a new issue