removed the unused int parameter from state callbacks.

This makes handling a lot easier because all state related functions have the same signature
This commit is contained in:
Christoph Oelckers 2023-10-04 23:00:17 +02:00
parent 40ca77c6b5
commit d3867cba5f
26 changed files with 140 additions and 131 deletions

View file

@ -5711,7 +5711,7 @@ void actFireVector(DBloodActor* shooter, double offset, double zoffset, DVector3
//
//---------------------------------------------------------------------------
void FireballSeqCallback(int, DBloodActor* actor)
void FireballSeqCallback(DBloodActor* actor)
{
auto pFX = gFX.fxSpawnActor(FX_11, actor->sector(), actor->spr.pos);
if (pFX)
@ -5720,7 +5720,7 @@ void FireballSeqCallback(int, DBloodActor* actor)
}
}
void NapalmSeqCallback(int, DBloodActor* actor)
void NapalmSeqCallback(DBloodActor* actor)
{
auto pFX = gFX.fxSpawnActor(FX_12, actor->sector(), actor->spr.pos);
if (pFX)
@ -5729,7 +5729,7 @@ void NapalmSeqCallback(int, DBloodActor* actor)
}
}
void Fx32Callback(int, DBloodActor* actor)
void Fx32Callback(DBloodActor* actor)
{
auto pFX = gFX.fxSpawnActor(FX_32, actor->sector(), actor->spr.pos);
if (pFX)
@ -5738,7 +5738,7 @@ void Fx32Callback(int, DBloodActor* actor)
}
}
void Fx33Callback(int, DBloodActor* actor)
void Fx33Callback(DBloodActor* actor)
{
auto pFX = gFX.fxSpawnActor(FX_33, actor->sector(), actor->spr.pos);
if (pFX)
@ -5753,7 +5753,7 @@ void Fx33Callback(int, DBloodActor* actor)
//
//---------------------------------------------------------------------------
void TreeToGibCallback(int, DBloodActor* actor)
void TreeToGibCallback(DBloodActor* actor)
{
actor->ChangeType(kThingObjectExplode);
actor->xspr.state = 1;
@ -5765,7 +5765,7 @@ void TreeToGibCallback(int, DBloodActor* actor)
actor->spr.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
void DudeToGibCallback1(int, DBloodActor* actor)
void DudeToGibCallback1(DBloodActor* actor)
{
actor->ChangeType(kThingBloodChunks);
actor->xspr.data1 = 8;
@ -5780,7 +5780,7 @@ void DudeToGibCallback1(int, DBloodActor* actor)
actor->xspr.state = 1;
}
void DudeToGibCallback2(int, DBloodActor* actor)
void DudeToGibCallback2(DBloodActor* actor)
{
actor->ChangeType(kThingBloodChunks);
actor->xspr.data1 = 3;

View file

@ -153,12 +153,6 @@ void actAddGameLight(int lightRadius, int spriteNum, int zOffset, int lightRange
void actDoLight(int spriteNum);
#endif
void FireballSeqCallback(int, int);
void sub_38938(int, int);
void NapalmSeqCallback(int, int);
void sub_3888C(int, int);
void TreeToGibCallback(int, int);
bool IsUnderwaterSector(sectortype* pSector);
void actInit(TArray<DBloodActor*>& actors);
void actWallBounceVector(DBloodActor* actor, walltype* pWall, double factor);
@ -195,4 +189,19 @@ void actBuildMissile(DBloodActor* spawned, DBloodActor* actor);
extern const int16_t DudeDifficulty[];
bool IsUnderwaterSector(sectortype* pSector);
// route state callbacks through the scripting interface.
// this needs to work with incomplete data, so avoid the asserting macros.
#define DEF_ANIMATOR(func) \
int func(DBloodActor*); \
DEFINE_ACTION_FUNCTION_NATIVE(DBloodActor, func, func) \
{ \
auto self = (DBloodActor *)(param[0].a); \
func(self); \
return 0; \
}
#define AF(func) DBloodActor_##func##_VMPtr
END_BLD_NS

View file

@ -61,7 +61,7 @@ AISTATE batDodgeDown = { kAiStateMove, 6, -1, 120, NULL, batMoveDodgeDown, 0, &b
AISTATE batDodgeDownRight = { kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
AISTATE batDodgeDownLeft = { kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
void batBiteSeqCallback(int, DBloodActor* actor)
void batBiteSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto pTarget = actor->GetTarget();

View file

@ -62,7 +62,7 @@ AISTATE beast138FB4 = { kAiStateOther, 9, -1, 120, NULL, sub_62AE0, beastThinkSw
AISTATE beast138FD0 = { kAiStateOther, 9, -1, 0, NULL, sub_62D7C, beastThinkSwimChase, &beastSwimChase };
AISTATE beast138FEC = { kAiStateOther, 9, -1, 120, NULL, aiMoveTurn, NULL, &beastSwimChase };
void SlashSeqCallback(int, DBloodActor* actor)
void SlashSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -80,7 +80,7 @@ void SlashSeqCallback(int, DBloodActor* actor)
sfxPlay3DSound(actor, 9012 + Random(2), -1, 0);
}
void StompSeqCallback(int, DBloodActor* actor)
void StompSeqCallback(DBloodActor* actor)
{
auto pos = actor->spr.pos;
const int nDist = 400;

View file

@ -61,7 +61,7 @@ AISTATE eelDodgeDown = { kAiStateMove, 0, -1, 120, NULL, eelMoveDodgeDown, NULL,
AISTATE eelDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
void eelBiteSeqCallback(int, DBloodActor* actor)
void eelBiteSeqCallback(DBloodActor* actor)
{
/*
* workaround for

View file

@ -70,7 +70,7 @@ AISTATE genDudeBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burn
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &genDudeBurnSearch };
AISTATE genDudeBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &genDudeBurnChase };
void BurnSeqCallback(int, DBloodActor*)
void BurnSeqCallback(DBloodActor*)
{
}

View file

@ -57,7 +57,7 @@ AISTATE tinycaleb139660 = { kAiStateOther, 8, -1, 120, NULL, sub_65F44, calebThi
AISTATE tinycaleb13967C = { kAiStateOther, 8, -1, 0, NULL, sub_661E0, calebThinkSwimChase, &tinycalebSwimChase };
AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, &tinycalebSwimChase };
void SeqAttackCallback(int, DBloodActor* actor)
void SeqAttackCallback(DBloodActor* actor)
{
DVector3 vect(actor->spr.Angles.Yaw.ToVector(), actor->dudeSlope);
vect.X += Random2F(1500, 4);

View file

@ -58,7 +58,7 @@ AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &c
static constexpr double Cerberus_XYOff = 350. / 16;
static constexpr double Cerberus_ZOff = 100. / 256;
void cerberusBiteSeqCallback(int, DBloodActor* actor)
void cerberusBiteSeqCallback(DBloodActor* actor)
{
if (!(actor->IsDudeActor())) {
Printf(PRINT_HIGH, "actor->IsDudeActor()");
@ -75,7 +75,7 @@ void cerberusBiteSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, vec, kVectorCerberusHack);
}
void cerberusBurnSeqCallback(int, DBloodActor* actor)
void cerberusBurnSeqCallback(DBloodActor* actor)
{
DUDEINFO* pDudeInfo = getDudeInfo(actor);
double height = pDudeInfo->eyeHeight * actor->spr.scale.Y * 0.25;
@ -136,7 +136,7 @@ void cerberusBurnSeqCallback(int, DBloodActor* actor)
}
}
void cerberusBurnSeqCallback2(int, DBloodActor* actor)
void cerberusBurnSeqCallback2(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
DUDEINFO* pDudeInfo = getDudeInfo(actor);

View file

@ -73,7 +73,7 @@ AISTATE cultistTSwimFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn
AISTATE cultistTsSwimFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsSwimFire };
AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistSwimDodge };
void TommySeqCallback(int, DBloodActor* actor)
void TommySeqCallback(DBloodActor* actor)
{
DVector3 vect(actor->spr.Angles.Yaw.ToVector(), actor->dudeSlope);
vect.X += Random3F((5 - gGameOptions.nDifficulty) * 1000, 14);
@ -83,7 +83,7 @@ void TommySeqCallback(int, DBloodActor* actor)
sfxPlay3DSound(actor, 4001, -1, 0);
}
void TeslaSeqCallback(int, DBloodActor* actor)
void TeslaSeqCallback(DBloodActor* actor)
{
if (Chance(gCultTeslaFireChance[gGameOptions.nDifficulty]))
{
@ -96,7 +96,7 @@ void TeslaSeqCallback(int, DBloodActor* actor)
}
}
void ShotSeqCallback(int, DBloodActor* actor)
void ShotSeqCallback(DBloodActor* actor)
{
DVector3 vect(actor->spr.Angles.Yaw.ToVector(), actor->dudeSlope);
vect.X += Random3F((5 - gGameOptions.nDifficulty) * 1000, 14);
@ -115,7 +115,7 @@ void ShotSeqCallback(int, DBloodActor* actor)
sfxPlay3DSound(actor, 1002, -1, 0);
}
void cultThrowSeqCallback(int, DBloodActor* actor)
void cultThrowSeqCallback(DBloodActor* actor)
{
int nMissile = kThingArmedTNTStick;
if (gGameOptions.nDifficulty > 2)
@ -137,7 +137,7 @@ void cultThrowSeqCallback(int, DBloodActor* actor)
evPostActor(pMissile, 120 * (1 + Random(2)), kCmdOn, actor);
}
void cultThrowSeqCallback2(int, DBloodActor* actor)
void cultThrowSeqCallback2(DBloodActor* actor)
{
int nMissile = kThingArmedTNTStick;
if (gGameOptions.nDifficulty > 2)
@ -147,7 +147,7 @@ void cultThrowSeqCallback2(int, DBloodActor* actor)
evPostActor(pMissile, 120 * (2 + Random(2)), kCmdOn, actor);
}
void cultThrowSeqCallback3(int, DBloodActor* actor)
void cultThrowSeqCallback3(DBloodActor* actor)
{
int nMissile = kThingArmedTNTStick;
if (gGameOptions.nDifficulty > 2)

View file

@ -75,7 +75,7 @@ static void playStatueBreakSnd(DBloodActor* actor) {
aiPlay3DSound(actor, 313, AI_SFX_PRIORITY_1, -1);
}
void SlashFSeqCallback(int, DBloodActor* actor)
void SlashFSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -94,12 +94,12 @@ void SlashFSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, vec + DVector2(r1, r2), kVectorGargSlash);
}
void ThrowFSeqCallback(int, DBloodActor* actor)
void ThrowFSeqCallback(DBloodActor* actor)
{
actFireThing(actor, 0., 0., actor->dudeSlope * 0.25 - 0.11444, kThingBone, 0xeeeee / 65536.);
}
void BlastSSeqCallback(int, DBloodActor* actor)
void BlastSSeqCallback(DBloodActor* actor)
{
wrand(); // ???
if (!actor->ValidateTarget(__FUNCTION__)) return;
@ -168,7 +168,7 @@ void BlastSSeqCallback(int, DBloodActor* actor)
}
void ThrowSSeqCallback(int, DBloodActor* actor)
void ThrowSSeqCallback(DBloodActor* actor)
{
actFireThing(actor, 0., 0., actor->dudeSlope * 0.25 - 0.11444, kThingBone, Chance(0x6000) ? 19.2 : 17.066666);
}

View file

@ -60,7 +60,7 @@ AISTATE ghostDodgeDown = { kAiStateMove, 0, -1, 120, NULL, ghostMoveDodgeDown, N
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
void ghostSlashSeqCallback(int, DBloodActor* actor)
void ghostSlashSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -80,13 +80,13 @@ void ghostSlashSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, dv + DVector2(-r2, r1), kVectorGhost);
}
void ghostThrowSeqCallback(int, DBloodActor* actor)
void ghostThrowSeqCallback(DBloodActor* actor)
{
actFireThing(actor, 0., 0., actor->dudeSlope * 0.25 - 0.11444, kThingBone, 14.93333);
}
// This functions seems to be identical with BlastSSeqCallback except for the spawn calls at the end.
void ghostBlastSeqCallback(int, DBloodActor* actor)
void ghostBlastSeqCallback(DBloodActor* actor)
{
wrand(); // ???
if (!actor->ValidateTarget(__FUNCTION__)) return;

View file

@ -57,7 +57,7 @@ AISTATE gillBeast13A138 = { kAiStateOther, 10, -1, 120, NULL, sub_6CD74, gillThi
AISTATE gillBeast13A154 = { kAiStateOther, 10, -1, 0, NULL, sub_6D03C, gillThinkSwimChase, &gillBeastSwimChase };
AISTATE gillBeast13A170 = { kAiStateOther, 10, -1, 120, NULL, NULL, aiMoveTurn, &gillBeastSwimChase };
void GillBiteSeqCallback(int, DBloodActor* actor)
void GillBiteSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();

View file

@ -41,7 +41,7 @@ AISTATE handRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &handSearch }
AISTATE handGoto = { kAiStateMove, 6, -1, 1800, NULL, aiMoveForward, handThinkGoto, &handIdle };
AISTATE handJump = { kAiStateChase, 7, nJumpClient, 120, NULL, NULL, NULL, &handChase };
void HandJumpSeqCallback(int, DBloodActor* actor)
void HandJumpSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();

View file

@ -42,7 +42,7 @@ AISTATE houndGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, houndThinkG
AISTATE houndBite = { kAiStateChase, 6, nHoundBiteClient, 60, NULL, NULL, NULL, &houndChase };
AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL, &houndChase };
void houndBiteSeqCallback(int, DBloodActor* actor)
void houndBiteSeqCallback(DBloodActor* actor)
{
if (!(actor->IsDudeActor())) {
Printf(PRINT_HIGH, "actor->IsDudeActor()");
@ -56,7 +56,7 @@ void houndBiteSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, vec, kVectorHoundBite);
}
void houndBurnSeqCallback(int, DBloodActor* actor)
void houndBurnSeqCallback(DBloodActor* actor)
{
actFireMissile(actor, 0, 0, DVector3(actor->spr.Angles.Yaw.ToVector(), 0), kMissileFlameHound);
}

View file

@ -50,17 +50,17 @@ AISTATE tentacleStartChase = { kAiStateOther, 6, nTentacleStartSearchClient, 120
AISTATE tentacleRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tentacleChase };
AISTATE tentacleChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveTurn, aiPodChase, NULL };
void sub_6FF08(int, DBloodActor* actor)
void podPlaySound1(DBloodActor* actor)
{
sfxPlay3DSound(actor, 2503, -1, 0);
}
void sub_6FF54(int, DBloodActor* actor)
void podPlaySound2(DBloodActor* actor)
{
sfxPlay3DSound(actor, 2500, -1, 0);
}
void podAttack(int, DBloodActor* actor)
void podAttack(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -101,7 +101,7 @@ void podAttack(int, DBloodActor* actor)
fxSpawnPodStuff(actor, 240);
}
void sub_70284(int, DBloodActor* actor)
void podExplode(DBloodActor* actor)
{
sfxPlay3DSound(actor, 2502, -1, 0);
int nDist, nBurn;

View file

@ -41,7 +41,7 @@ AISTATE ratRecoil = { kAiStateRecoil, 7, -1, 0, NULL, NULL, NULL, &ratDodge };
AISTATE ratGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, ratThinkGoto, &ratIdle };
AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ratChase };
void ratBiteSeqCallback(int, DBloodActor* actor)
void ratBiteSeqCallback(DBloodActor* actor)
{
assert(actor->IsDudeActor());
if (!actor->ValidateTarget(__FUNCTION__)) return;

View file

@ -57,7 +57,7 @@ static void spidBlindEffect(DBloodActor* actor, int nBlind, int max)
}
}
void SpidBiteSeqCallback(int, DBloodActor* actor)
void SpidBiteSeqCallback(DBloodActor* actor)
{
DVector3 vec(actor->spr.Angles.Yaw.ToVector(), 0);
@ -105,7 +105,7 @@ void SpidBiteSeqCallback(int, DBloodActor* actor)
}
}
void SpidJumpSeqCallback(int, DBloodActor* actor)
void SpidJumpSeqCallback(DBloodActor* actor)
{
DVector3 vec(actor->spr.Angles.Yaw.ToVector(), 0);
@ -129,7 +129,7 @@ void SpidJumpSeqCallback(int, DBloodActor* actor)
}
}
void SpidBirthSeqCallback(int, DBloodActor* actor)
void SpidBirthSeqCallback(DBloodActor* actor)
{
assert(actor->IsDudeActor());
DUDEINFO* pDudeInfo = getDudeInfo(actor);

View file

@ -47,7 +47,7 @@ AISTATE tcherno13AA28 = { kAiStateChase, 8, -1, 60, NULL, aiMoveTurn, NULL, &tch
static constexpr double Tchernnobog_XYOff = 350. / 16;
void sub_71A90(int, DBloodActor* actor)
void tchernobogFire(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -58,7 +58,7 @@ void sub_71A90(int, DBloodActor* actor)
aiNewState(actor, &tcherno13A9D4);
}
void tchernobogBurnSeqCallback(int, DBloodActor* actor)
void tchernobogBurnSeqCallback(DBloodActor* actor)
{
DUDEINFO* pDudeInfo = getDudeInfo(actor);
double height = actor->spr.scale.Y * pDudeInfo->eyeHeight * 0.25;
@ -115,7 +115,7 @@ void tchernobogBurnSeqCallback(int, DBloodActor* actor)
actFireMissile(actor, Tchernnobog_XYOff, 0., Aim, kMissileFireballTchernobog);
}
void tchernobogBurnSeqCallback2(int, DBloodActor* actor)
void tchernobogBurnSeqCallback2(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;

View file

@ -113,7 +113,7 @@ const GENDUDESND gCustomDudeSnd[] = {
static void forcePunch(DBloodActor* actor)
{
if (actor->genDudeExtra.forcePunch && seqGetStatus(actor) == -1)
punchCallback(0, actor);
punchCallback(actor);
}
//---------------------------------------------------------------------------
@ -181,7 +181,7 @@ void genDudeUpdate(DBloodActor* actor)
//
//---------------------------------------------------------------------------
void punchCallback(int, DBloodActor* actor)
void punchCallback(DBloodActor* actor)
{
auto const target = actor->GetTarget();
if (target != nullptr)
@ -206,7 +206,7 @@ void punchCallback(int, DBloodActor* actor)
//
//---------------------------------------------------------------------------
void genDudeAttack1(int, DBloodActor* actor)
void genDudeAttack1(DBloodActor* actor)
{
if (actor->GetTarget() == nullptr) return;
@ -278,12 +278,12 @@ void genDudeAttack1(int, DBloodActor* actor)
//
//---------------------------------------------------------------------------
void ThrowCallback1(int, DBloodActor* actor)
void ThrowCallback1(DBloodActor* actor)
{
ThrowThing(actor, true);
}
void ThrowCallback2(int, DBloodActor* actor)
void ThrowCallback2(DBloodActor* actor)
{
ThrowThing(actor, false);
}

View file

@ -58,7 +58,7 @@ AISTATE zombie2Search = { kAiStateSearch, 8, -1, 1800, NULL, NULL, myThinkSearch
AISTATE zombieSIdle = { kAiStateIdle, 10, -1, 0, NULL, NULL, aiThinkTarget, NULL };
AISTATE zombie13AC2C = { kAiStateOther, 11, nStandClient, 0, entryEZombie, NULL, NULL, &zombieAPonder };
void HackSeqCallback(int, DBloodActor* actor)
void HackSeqCallback(DBloodActor* actor)
{
auto target = actor->GetTarget();
if (!target) return;
@ -75,7 +75,7 @@ void HackSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, dv, kVectorAxe);
}
void StandSeqCallback(int, DBloodActor* actor)
void StandSeqCallback(DBloodActor* actor)
{
sfxPlay3DSound(actor, 1102, -1, 0);
}

View file

@ -45,7 +45,7 @@ AISTATE zombieFSearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, zomb
AISTATE zombieFRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &zombieFChase };
AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zombieFChase };
void zombfHackSeqCallback(int, DBloodActor* actor)
void zombfHackSeqCallback(DBloodActor* actor)
{
if (actor->GetType() != kDudeZombieButcher)
return;
@ -58,7 +58,7 @@ void zombfHackSeqCallback(int, DBloodActor* actor)
actFireVector(actor, 0, 0, DVector3(actor->spr.Angles.Yaw.ToVector() * 64, height - height2), kVectorCleaver);
}
void PukeSeqCallback(int, DBloodActor* actor)
void PukeSeqCallback(DBloodActor* actor)
{
if (!actor->ValidateTarget(__FUNCTION__)) return;
auto target = actor->GetTarget();
@ -75,7 +75,7 @@ void PukeSeqCallback(int, DBloodActor* actor)
actFireMissile(actor, 0, -z, DVector3(dv, 0), kMissilePukeGreen);
}
void ThrowSeqCallback(int, DBloodActor* actor)
void ThrowSeqCallback(DBloodActor* actor)
{
actFireMissile(actor, 0, 0, DVector3(actor->spr.Angles.Yaw.ToVector(), 0), kMissileButcherKnife);
}

View file

@ -5680,7 +5680,7 @@ bool modernTypeOperateSprite(DBloodActor* actor, EVENT& event)
// let's allow only specific commands here to avoid this.
if (actor->spr.inittype < kDudeBase || actor->spr.inittype >= kDudeMax) return false;
else if (event.cmd != kCmdToggle && event.cmd != kCmdOff && event.cmd != kCmdSpriteImpact) return true;
DudeToGibCallback1(0, actor); // set proper gib type just in case DATAs was changed from the outside.
DudeToGibCallback1(actor); // set proper gib type just in case DATAs was changed from the outside.
return false;
case kModernCondition:

View file

@ -2301,7 +2301,7 @@ void playerLandingSound(DBloodPlayer* pPlayer)
//
//---------------------------------------------------------------------------
void PlayerSurvive(int, DBloodActor* actor)
void PlayerSurvive(DBloodActor* actor)
{
char buffer[80];
actHealDude(actor, 1, 2);
@ -2329,7 +2329,7 @@ void PlayerSurvive(int, DBloodActor* actor)
//
//---------------------------------------------------------------------------
void PlayerKneelsOver(int, DBloodActor* actor)
void PlayerKneelsOver(DBloodActor* actor)
{
for (int p = connecthead; p >= 0; p = connectpoint2[p])
{

View file

@ -36,7 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
static void (*seqClientCallback[])(int, DBloodActor*) = {
static void (*seqClientCallback[])(DBloodActor*) = {
FireballSeqCallback,
Fx33Callback,
NapalmSeqCallback,
@ -71,16 +71,16 @@ static void (*seqClientCallback[])(int, DBloodActor*) = {
houndBiteSeqCallback,
houndBurnSeqCallback,
podAttack,
sub_70284,
sub_6FF08,
sub_6FF54,
podExplode,
podPlaySound1,
podPlaySound2,
ratBiteSeqCallback,
SpidBiteSeqCallback,
SpidJumpSeqCallback,
SpidBirthSeqCallback,
tchernobogBurnSeqCallback,
tchernobogBurnSeqCallback2,
sub_71A90,
tchernobogFire,
genDudeAttack1,
punchCallback,
ThrowCallback1,
@ -402,7 +402,7 @@ void SEQINST::Update()
if (pSequence->frames[frameIndex].trigger && callback != -1)
{
assert(type == SS_SPRITE);
if (target.isActor()) seqClientCallback[callback](type, target.actor());
if (target.isActor()) seqClientCallback[callback](target.actor());
}
}

View file

@ -3,64 +3,64 @@
BEGIN_BLD_NS
class DBloodActor;
void FireballSeqCallback(int, DBloodActor*);
void Fx33Callback(int, DBloodActor*);
void NapalmSeqCallback(int, DBloodActor*);
void Fx32Callback(int, DBloodActor*);
void TreeToGibCallback(int, DBloodActor*);
void DudeToGibCallback1(int, DBloodActor*);
void DudeToGibCallback2(int, DBloodActor*);
void batBiteSeqCallback(int, DBloodActor*);
void SlashSeqCallback(int, DBloodActor*);
void StompSeqCallback(int, DBloodActor*);
void eelBiteSeqCallback(int, DBloodActor*);
void BurnSeqCallback(int, DBloodActor*);
void SeqAttackCallback(int, DBloodActor*);
void cerberusBiteSeqCallback(int, DBloodActor*);
void cerberusBurnSeqCallback(int, DBloodActor*);
void cerberusBurnSeqCallback2(int, DBloodActor*);
void TommySeqCallback(int, DBloodActor*);
void TeslaSeqCallback(int, DBloodActor*);
void ShotSeqCallback(int, DBloodActor*);
void cultThrowSeqCallback(int, DBloodActor*);
void cultThrowSeqCallback2(int, DBloodActor*);
void cultThrowSeqCallback3(int, DBloodActor*);
void SlashFSeqCallback(int, DBloodActor*);
void ThrowFSeqCallback(int, DBloodActor*);
void BlastSSeqCallback(int, DBloodActor*);
void ThrowSSeqCallback(int, DBloodActor*);
void ghostSlashSeqCallback(int, DBloodActor*);
void ghostThrowSeqCallback(int, DBloodActor*);
void ghostBlastSeqCallback(int, DBloodActor*);
void GillBiteSeqCallback(int, DBloodActor*);
void HandJumpSeqCallback(int, DBloodActor*);
void houndBiteSeqCallback(int, DBloodActor*);
void houndBurnSeqCallback(int, DBloodActor*);
void sub_6FF08(int, DBloodActor*);
void sub_6FF54(int, DBloodActor*);
void podAttack(int, DBloodActor*);
void sub_70284(int, DBloodActor*);
void ratBiteSeqCallback(int, DBloodActor*);
void SpidBiteSeqCallback(int, DBloodActor*);
void SpidJumpSeqCallback(int, DBloodActor*);
void SpidBirthSeqCallback(int, DBloodActor*);
void sub_71A90(int, DBloodActor*);
void tchernobogBurnSeqCallback(int, DBloodActor*);
void tchernobogBurnSeqCallback2(int, DBloodActor*);
void genDudeAttack1(int, DBloodActor*);
void punchCallback(int, DBloodActor*);
void ThrowCallback1(int, DBloodActor*);
void ThrowCallback2(int, DBloodActor*);
void HackSeqCallback(int, DBloodActor*);
void StandSeqCallback(int, DBloodActor*);
void zombfHackSeqCallback(int, DBloodActor*);
void PukeSeqCallback(int, DBloodActor*);
void ThrowSeqCallback(int, DBloodActor*);
void PlayerSurvive(int, DBloodActor*);
void PlayerKneelsOver(int, DBloodActor*);
void FireballTrapSeqCallback(int, DBloodActor*);
void MGunFireSeqCallback(int, DBloodActor*);
void MGunOpenSeqCallback(int, DBloodActor*);
void FireballSeqCallback(DBloodActor*);
void Fx33Callback(DBloodActor*);
void NapalmSeqCallback(DBloodActor*);
void Fx32Callback(DBloodActor*);
void TreeToGibCallback(DBloodActor*);
void DudeToGibCallback1(DBloodActor*);
void DudeToGibCallback2(DBloodActor*);
void batBiteSeqCallback(DBloodActor*);
void SlashSeqCallback(DBloodActor*);
void StompSeqCallback(DBloodActor*);
void eelBiteSeqCallback(DBloodActor*);
void BurnSeqCallback(DBloodActor*);
void SeqAttackCallback(DBloodActor*);
void cerberusBiteSeqCallback(DBloodActor*);
void cerberusBurnSeqCallback(DBloodActor*);
void cerberusBurnSeqCallback2(DBloodActor*);
void TommySeqCallback(DBloodActor*);
void TeslaSeqCallback(DBloodActor*);
void ShotSeqCallback(DBloodActor*);
void cultThrowSeqCallback(DBloodActor*);
void cultThrowSeqCallback2(DBloodActor*);
void cultThrowSeqCallback3(DBloodActor*);
void SlashFSeqCallback(DBloodActor*);
void ThrowFSeqCallback(DBloodActor*);
void BlastSSeqCallback(DBloodActor*);
void ThrowSSeqCallback(DBloodActor*);
void ghostSlashSeqCallback(DBloodActor*);
void ghostThrowSeqCallback(DBloodActor*);
void ghostBlastSeqCallback(DBloodActor*);
void GillBiteSeqCallback(DBloodActor*);
void HandJumpSeqCallback(DBloodActor*);
void houndBiteSeqCallback(DBloodActor*);
void houndBurnSeqCallback(DBloodActor*);
void podPlaySound1(DBloodActor*);
void podPlaySound2(DBloodActor*);
void podAttack(DBloodActor*);
void podExplode(DBloodActor*);
void ratBiteSeqCallback(DBloodActor*);
void SpidBiteSeqCallback(DBloodActor*);
void SpidJumpSeqCallback(DBloodActor*);
void SpidBirthSeqCallback(DBloodActor*);
void tchernobogFire(DBloodActor*);
void tchernobogBurnSeqCallback(DBloodActor*);
void tchernobogBurnSeqCallback2(DBloodActor*);
void genDudeAttack1(DBloodActor*);
void punchCallback(DBloodActor*);
void ThrowCallback1(DBloodActor*);
void ThrowCallback2(DBloodActor*);
void HackSeqCallback(DBloodActor*);
void StandSeqCallback(DBloodActor*);
void zombfHackSeqCallback(DBloodActor*);
void PukeSeqCallback(DBloodActor*);
void ThrowSeqCallback(DBloodActor*);
void PlayerSurvive(DBloodActor*);
void PlayerKneelsOver(DBloodActor*);
void FireballTrapSeqCallback(DBloodActor*);
void MGunFireSeqCallback(DBloodActor*);
void MGunOpenSeqCallback(DBloodActor*);
enum
{

View file

@ -2482,7 +2482,7 @@ void ActivateGenerator(DBloodActor* actor)
case kGenMissileFireball:
switch (actor->xspr.data2) {
case 0:
FireballTrapSeqCallback(3, actor);
FireballTrapSeqCallback(actor);
break;
case 1:
seqSpawn(35, actor, nFireballTrapClient);
@ -2510,7 +2510,7 @@ void ActivateGenerator(DBloodActor* actor)
//
//---------------------------------------------------------------------------
void FireballTrapSeqCallback(int, DBloodActor* actor)
void FireballTrapSeqCallback(DBloodActor* actor)
{
if (actor->spr.cstat & CSTAT_SPRITE_ALIGNMENT_FLOOR)
actFireMissile(actor, 0, 0, DVector3(0, 0, (actor->spr.cstat & CSTAT_SPRITE_YFLIP) ? 1 : -1), kMissileFireball);
@ -2525,7 +2525,7 @@ void FireballTrapSeqCallback(int, DBloodActor* actor)
//
//---------------------------------------------------------------------------
void MGunFireSeqCallback(int, DBloodActor* actor)
void MGunFireSeqCallback(DBloodActor* actor)
{
if (actor->xspr.data2 > 0 || actor->xspr.data1 == 0)
{
@ -2545,7 +2545,7 @@ void MGunFireSeqCallback(int, DBloodActor* actor)
}
}
void MGunOpenSeqCallback(int, DBloodActor* actor)
void MGunOpenSeqCallback(DBloodActor* actor)
{
seqSpawn(39, actor, nMGunFireClient);
}