added native script exports for all functions referenced b AISTATEs.

This commit is contained in:
Christoph Oelckers 2023-10-04 23:46:00 +02:00
parent d3867cba5f
commit 93dde24ae1
4 changed files with 370 additions and 2 deletions

View file

@ -194,7 +194,7 @@ bool IsUnderwaterSector(sectortype* pSector);
// route state callbacks through the scripting interface. // route state callbacks through the scripting interface.
// this needs to work with incomplete data, so avoid the asserting macros. // this needs to work with incomplete data, so avoid the asserting macros.
#define DEF_ANIMATOR(func) \ #define DEF_ANIMATOR(func) \
int func(DBloodActor*); \ void func(DBloodActor*); \
DEFINE_ACTION_FUNCTION_NATIVE(DBloodActor, func, func) \ DEFINE_ACTION_FUNCTION_NATIVE(DBloodActor, func, func) \
{ \ { \
auto self = (DBloodActor *)(param[0].a); \ auto self = (DBloodActor *)(param[0].a); \

View file

@ -139,6 +139,6 @@ int playerDamageSprite(DBloodActor* nSource, DBloodPlayer* pPlayer, DAMAGE_TYPE
int UseAmmo(DBloodPlayer* pPlayer, int nAmmoType, int nDec); int UseAmmo(DBloodPlayer* pPlayer, int nAmmoType, int nDec);
void voodooTarget(DBloodPlayer* pPlayer); void voodooTarget(DBloodPlayer* pPlayer);
void playerLandingSound(DBloodPlayer* pPlayer); void playerLandingSound(DBloodPlayer* pPlayer);
void PlayerSurvive(int, DBloodActor*); void PlayerSurvive(DBloodActor*);
END_BLD_NS END_BLD_NS

View file

@ -25,6 +25,190 @@ See the GNU General Public License for more details.
BEGIN_BLD_NS BEGIN_BLD_NS
DEF_ANIMATOR(aiGenDudeMoveForward)
DEF_ANIMATOR(aiMoveDodge)
DEF_ANIMATOR(aiMoveForward)
DEF_ANIMATOR(aiMoveTurn)
DEF_ANIMATOR(aiPodChase)
DEF_ANIMATOR(aiPodMove)
DEF_ANIMATOR(aiPodSearch)
DEF_ANIMATOR(aiThinkTarget)
DEF_ANIMATOR(batMoveDodgeDown)
DEF_ANIMATOR(batMoveDodgeUp)
DEF_ANIMATOR(batMoveFly)
DEF_ANIMATOR(batMoveForward)
DEF_ANIMATOR(batMoveSwoop)
DEF_ANIMATOR(batMoveToCeil)
DEF_ANIMATOR(batThinkChase)
DEF_ANIMATOR(batThinkGoto)
DEF_ANIMATOR(batThinkPonder)
DEF_ANIMATOR(batThinkSearch)
DEF_ANIMATOR(batThinkTarget)
DEF_ANIMATOR(beastMoveForward)
DEF_ANIMATOR(beastThinkChase)
DEF_ANIMATOR(beastThinkGoto)
DEF_ANIMATOR(beastThinkSearch)
DEF_ANIMATOR(beastThinkSwimChase)
DEF_ANIMATOR(beastThinkSwimGoto)
DEF_ANIMATOR(burnThinkChase)
DEF_ANIMATOR(burnThinkGoto)
DEF_ANIMATOR(burnThinkSearch)
DEF_ANIMATOR(calebThinkChase)
DEF_ANIMATOR(calebThinkGoto)
DEF_ANIMATOR(calebThinkSearch)
DEF_ANIMATOR(calebThinkSwimChase)
DEF_ANIMATOR(calebThinkSwimGoto)
DEF_ANIMATOR(cerberusThinkChase)
DEF_ANIMATOR(cerberusThinkGoto)
DEF_ANIMATOR(cerberusThinkSearch)
DEF_ANIMATOR(cerberusThinkTarget)
DEF_ANIMATOR(cultThinkChase)
DEF_ANIMATOR(cultThinkGoto)
DEF_ANIMATOR(cultThinkSearch)
DEF_ANIMATOR(eelMoveAscend)
DEF_ANIMATOR(eelMoveDodgeDown)
DEF_ANIMATOR(eelMoveDodgeUp)
DEF_ANIMATOR(eelMoveForward)
DEF_ANIMATOR(eelMoveSwoop)
DEF_ANIMATOR(eelMoveToCeil)
DEF_ANIMATOR(eelThinkChase)
DEF_ANIMATOR(eelThinkGoto)
DEF_ANIMATOR(eelThinkPonder)
DEF_ANIMATOR(eelThinkSearch)
DEF_ANIMATOR(eelThinkTarget)
DEF_ANIMATOR(entryAIdle)
DEF_ANIMATOR(entryEStand)
DEF_ANIMATOR(entryEZombie)
DEF_ANIMATOR(entryFStatue)
DEF_ANIMATOR(entrySStatue)
DEF_ANIMATOR(forcePunch)
DEF_ANIMATOR(gargMoveDodgeDown)
DEF_ANIMATOR(gargMoveDodgeUp)
DEF_ANIMATOR(gargMoveFly)
DEF_ANIMATOR(gargMoveForward)
DEF_ANIMATOR(gargMoveSlow)
DEF_ANIMATOR(gargMoveSwoop)
DEF_ANIMATOR(gargThinkChase)
DEF_ANIMATOR(gargThinkGoto)
DEF_ANIMATOR(gargThinkSearch)
DEF_ANIMATOR(gargThinkTarget)
DEF_ANIMATOR(ghostMoveDodgeDown)
DEF_ANIMATOR(ghostMoveDodgeUp)
DEF_ANIMATOR(ghostMoveFly)
DEF_ANIMATOR(ghostMoveForward)
DEF_ANIMATOR(ghostMoveSlow)
DEF_ANIMATOR(ghostMoveSwoop)
DEF_ANIMATOR(ghostThinkChase)
DEF_ANIMATOR(ghostThinkGoto)
DEF_ANIMATOR(ghostThinkSearch)
DEF_ANIMATOR(ghostThinkTarget)
DEF_ANIMATOR(gillThinkChase)
DEF_ANIMATOR(gillThinkGoto)
DEF_ANIMATOR(gillThinkSearch)
DEF_ANIMATOR(gillThinkSwimChase)
DEF_ANIMATOR(gillThinkSwimGoto)
DEF_ANIMATOR(handThinkChase)
DEF_ANIMATOR(handThinkGoto)
DEF_ANIMATOR(handThinkSearch)
DEF_ANIMATOR(houndThinkChase)
DEF_ANIMATOR(houndThinkGoto)
DEF_ANIMATOR(houndThinkSearch)
DEF_ANIMATOR(innocThinkChase)
DEF_ANIMATOR(innocThinkGoto)
DEF_ANIMATOR(innocThinkSearch)
DEF_ANIMATOR(MorphToBeast)
DEF_ANIMATOR(myThinkSearch)
DEF_ANIMATOR(myThinkTarget)
DEF_ANIMATOR(playStatueBreakSnd)
DEF_ANIMATOR(ratThinkChase)
DEF_ANIMATOR(ratThinkGoto)
DEF_ANIMATOR(ratThinkSearch)
DEF_ANIMATOR(spidThinkChase)
DEF_ANIMATOR(spidThinkGoto)
DEF_ANIMATOR(spidThinkSearch)
DEF_ANIMATOR(sub_628A0)
DEF_ANIMATOR(sub_62AE0)
DEF_ANIMATOR(sub_62D7C)
DEF_ANIMATOR(sub_65D04)
DEF_ANIMATOR(sub_65F44)
DEF_ANIMATOR(sub_661E0)
DEF_ANIMATOR(sub_6CB00)
DEF_ANIMATOR(sub_6CD74)
DEF_ANIMATOR(sub_6D03C)
DEF_ANIMATOR(sub_72580)
DEF_ANIMATOR(sub_725A4)
DEF_ANIMATOR(sub_72850)
DEF_ANIMATOR(tchernobogThinkChase)
DEF_ANIMATOR(unicultThinkChase)
DEF_ANIMATOR(unicultThinkGoto)
DEF_ANIMATOR(unicultThinkSearch)
DEF_ANIMATOR(zombaThinkChase)
DEF_ANIMATOR(zombaThinkGoto)
DEF_ANIMATOR(zombaThinkPonder)
DEF_ANIMATOR(zombaThinkSearch)
DEF_ANIMATOR(zombfThinkChase)
DEF_ANIMATOR(zombfThinkGoto)
DEF_ANIMATOR(zombfThinkSearch)
DEF_ANIMATOR(FireballSeqCallback)
DEF_ANIMATOR(Fx33Callback)
DEF_ANIMATOR(NapalmSeqCallback)
DEF_ANIMATOR(Fx32Callback)
DEF_ANIMATOR(TreeToGibCallback)
DEF_ANIMATOR(DudeToGibCallback1)
DEF_ANIMATOR(DudeToGibCallback2)
DEF_ANIMATOR(batBiteSeqCallback)
DEF_ANIMATOR(SlashSeqCallback)
DEF_ANIMATOR(StompSeqCallback)
DEF_ANIMATOR(eelBiteSeqCallback)
DEF_ANIMATOR(BurnSeqCallback)
DEF_ANIMATOR(SeqAttackCallback)
DEF_ANIMATOR(cerberusBiteSeqCallback)
DEF_ANIMATOR(cerberusBurnSeqCallback)
DEF_ANIMATOR(cerberusBurnSeqCallback2)
DEF_ANIMATOR(TommySeqCallback)
DEF_ANIMATOR(TeslaSeqCallback)
DEF_ANIMATOR(ShotSeqCallback)
DEF_ANIMATOR(cultThrowSeqCallback)
DEF_ANIMATOR(cultThrowSeqCallback2)
DEF_ANIMATOR(cultThrowSeqCallback3)
DEF_ANIMATOR(SlashFSeqCallback)
DEF_ANIMATOR(ThrowFSeqCallback)
DEF_ANIMATOR(BlastSSeqCallback)
DEF_ANIMATOR(ThrowSSeqCallback)
DEF_ANIMATOR(ghostSlashSeqCallback)
DEF_ANIMATOR(ghostThrowSeqCallback)
DEF_ANIMATOR(ghostBlastSeqCallback)
DEF_ANIMATOR(GillBiteSeqCallback)
DEF_ANIMATOR(HandJumpSeqCallback)
DEF_ANIMATOR(houndBiteSeqCallback)
DEF_ANIMATOR(houndBurnSeqCallback)
DEF_ANIMATOR(podPlaySound1)
DEF_ANIMATOR(podPlaySound2)
DEF_ANIMATOR(podAttack)
DEF_ANIMATOR(podExplode)
DEF_ANIMATOR(ratBiteSeqCallback)
DEF_ANIMATOR(SpidBiteSeqCallback)
DEF_ANIMATOR(SpidJumpSeqCallback)
DEF_ANIMATOR(SpidBirthSeqCallback)
DEF_ANIMATOR(tchernobogFire)
DEF_ANIMATOR(tchernobogBurnSeqCallback)
DEF_ANIMATOR(tchernobogBurnSeqCallback2)
DEF_ANIMATOR(genDudeAttack1)
DEF_ANIMATOR(punchCallback)
DEF_ANIMATOR(ThrowCallback1)
DEF_ANIMATOR(ThrowCallback2)
DEF_ANIMATOR(HackSeqCallback)
DEF_ANIMATOR(StandSeqCallback)
DEF_ANIMATOR(zombfHackSeqCallback)
DEF_ANIMATOR(PukeSeqCallback)
DEF_ANIMATOR(ThrowSeqCallback)
DEF_ANIMATOR(PlayerSurvive)
DEF_ANIMATOR(PlayerKneelsOver)
DEF_ANIMATOR(FireballTrapSeqCallback)
DEF_ANIMATOR(MGunFireSeqCallback)
DEF_ANIMATOR(MGunOpenSeqCallback)
DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nGameType) DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nGameType)
DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nDifficulty) DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nDifficulty)
DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nMonsterSettings) DEFINE_FIELD_X(GAMEOPTIONS, GAMEOPTIONS, nMonsterSettings)

View file

@ -148,6 +148,190 @@ class BloodActor : CoreActor native
kCallbackCondition = 25, kCallbackCondition = 25,
} }
native void aiGenDudeMoveForward();
native void aiMoveDodge();
native void aiMoveForward();
native void aiMoveTurn();
native void aiPodChase();
native void aiPodMove();
native void aiPodSearch();
native void aiThinkTarget();
native void batMoveDodgeDown();
native void batMoveDodgeUp();
native void batMoveFly();
native void batMoveForward();
native void batMoveSwoop();
native void batMoveToCeil();
native void batThinkChase();
native void batThinkGoto();
native void batThinkPonder();
native void batThinkSearch();
native void batThinkTarget();
native void beastMoveForward();
native void beastThinkChase();
native void beastThinkGoto();
native void beastThinkSearch();
native void beastThinkSwimChase();
native void beastThinkSwimGoto();
native void burnThinkChase();
native void burnThinkGoto();
native void burnThinkSearch();
native void calebThinkChase();
native void calebThinkGoto();
native void calebThinkSearch();
native void calebThinkSwimChase();
native void calebThinkSwimGoto();
native void cerberusThinkChase();
native void cerberusThinkGoto();
native void cerberusThinkSearch();
native void cerberusThinkTarget();
native void cultThinkChase();
native void cultThinkGoto();
native void cultThinkSearch();
native void eelMoveAscend();
native void eelMoveDodgeDown();
native void eelMoveDodgeUp();
native void eelMoveForward();
native void eelMoveSwoop();
native void eelMoveToCeil();
native void eelThinkChase();
native void eelThinkGoto();
native void eelThinkPonder();
native void eelThinkSearch();
native void eelThinkTarget();
native void entryAIdle();
native void entryEStand();
native void entryEZombie();
native void entryFStatue();
native void entrySStatue();
native void forcePunch();
native void gargMoveDodgeDown();
native void gargMoveDodgeUp();
native void gargMoveFly();
native void gargMoveForward();
native void gargMoveSlow();
native void gargMoveSwoop();
native void gargThinkChase();
native void gargThinkGoto();
native void gargThinkSearch();
native void gargThinkTarget();
native void ghostMoveDodgeDown();
native void ghostMoveDodgeUp();
native void ghostMoveFly();
native void ghostMoveForward();
native void ghostMoveSlow();
native void ghostMoveSwoop();
native void ghostThinkChase();
native void ghostThinkGoto();
native void ghostThinkSearch();
native void ghostThinkTarget();
native void gillThinkChase();
native void gillThinkGoto();
native void gillThinkSearch();
native void gillThinkSwimChase();
native void gillThinkSwimGoto();
native void handThinkChase();
native void handThinkGoto();
native void handThinkSearch();
native void houndThinkChase();
native void houndThinkGoto();
native void houndThinkSearch();
native void innocThinkChase();
native void innocThinkGoto();
native void innocThinkSearch();
native void MorphToBeast();
native void myThinkSearch();
native void myThinkTarget();
native void playStatueBreakSnd();
native void ratThinkChase();
native void ratThinkGoto();
native void ratThinkSearch();
native void spidThinkChase();
native void spidThinkGoto();
native void spidThinkSearch();
native void sub_628A0();
native void sub_62AE0();
native void sub_62D7C();
native void sub_65D04();
native void sub_65F44();
native void sub_661E0();
native void sub_6CB00();
native void sub_6CD74();
native void sub_6D03C();
native void sub_72580();
native void sub_725A4();
native void sub_72850();
native void tchernobogThinkChase();
native void unicultThinkChase();
native void unicultThinkGoto();
native void unicultThinkSearch();
native void zombaThinkChase();
native void zombaThinkGoto();
native void zombaThinkPonder();
native void zombaThinkSearch();
native void zombfThinkChase();
native void zombfThinkGoto();
native void zombfThinkSearch();
native void FireballSeqCallback();
native void Fx33Callback();
native void NapalmSeqCallback();
native void Fx32Callback();
native void TreeToGibCallback();
native void DudeToGibCallback1();
native void DudeToGibCallback2();
native void batBiteSeqCallback();
native void SlashSeqCallback();
native void StompSeqCallback();
native void eelBiteSeqCallback();
native void BurnSeqCallback();
native void SeqAttackCallback();
native void cerberusBiteSeqCallback();
native void cerberusBurnSeqCallback();
native void cerberusBurnSeqCallback2();
native void TommySeqCallback();
native void TeslaSeqCallback();
native void ShotSeqCallback();
native void cultThrowSeqCallback();
native void cultThrowSeqCallback2();
native void cultThrowSeqCallback3();
native void SlashFSeqCallback();
native void ThrowFSeqCallback();
native void BlastSSeqCallback();
native void ThrowSSeqCallback();
native void ghostSlashSeqCallback();
native void ghostThrowSeqCallback();
native void ghostBlastSeqCallback();
native void GillBiteSeqCallback();
native void HandJumpSeqCallback();
native void houndBiteSeqCallback();
native void houndBurnSeqCallback();
native void podPlaySound1();
native void podPlaySound2();
native void podAttack();
native void podExplode();
native void ratBiteSeqCallback();
native void SpidBiteSeqCallback();
native void SpidJumpSeqCallback();
native void SpidBirthSeqCallback();
native void tchernobogFire();
native void tchernobogBurnSeqCallback();
native void tchernobogBurnSeqCallback2();
native void genDudeAttack1();
native void punchCallback();
native void ThrowCallback1();
native void ThrowCallback2();
native void HackSeqCallback();
native void StandSeqCallback();
native void zombfHackSeqCallback();
native void PukeSeqCallback();
native void ThrowSeqCallback();
native void PlayerSurvive();
native void PlayerKneelsOver();
native void FireballTrapSeqCallback();
native void MGunFireSeqCallback();
native void MGunOpenSeqCallback();
native double dudeSlope; native double dudeSlope;
native readonly bool hasx; native readonly bool hasx;
native bool explosionhackflag; // this originally hijacked the target field which is not safe when working with pointers. native bool explosionhackflag; // this originally hijacked the target field which is not safe when working with pointers.