From 6c0696dd26ff18740337b15a48314c66cd00c144 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 28 May 2023 23:21:17 +0200 Subject: [PATCH] - SW: migrated PSP animators to VM functions. --- source/games/sw/src/game.h | 128 +++++ source/games/sw/src/panel.cpp | 870 +++++++++++++++++----------------- source/games/sw/src/panel.h | 3 +- 3 files changed, 565 insertions(+), 436 deletions(-) diff --git a/source/games/sw/src/game.h b/source/games/sw/src/game.h index dfda74ec65..eee3c708d7 100644 --- a/source/games/sw/src/game.h +++ b/source/games/sw/src/game.h @@ -347,6 +347,15 @@ typedef void (*soANIMATORp) (SECTOR_OBJECT*); } #define AF(func) DSWActor_##func##_VMPtr +#define DEF_PSPANIMATOR(func) \ + void func(DPanelSprite*); \ + DEFINE_ACTION_FUNCTION_NATIVE(DSWActor, func, func) \ + { \ + auto self = (DPanelSprite *)(param[0].a); \ + func(self); \ + return 0; \ + } + #define x(a) SPR_##a, enum spriteindex_t { @@ -2493,6 +2502,125 @@ DEF_ANIMATOR(DoRailStart) DEF_ANIMATOR(DoGenerateSewerDebris) +DEF_PSPANIMATOR(pSwordPresent) +DEF_PSPANIMATOR(pSwordRest) +DEF_PSPANIMATOR(pSwordHide) +DEF_PSPANIMATOR(pSwordSlide) +DEF_PSPANIMATOR(pSwordAttack) +DEF_PSPANIMATOR(pSwordSlideDown) +DEF_PSPANIMATOR(pSwordSlideR) +DEF_PSPANIMATOR(pSwordSlideDownR) +DEF_PSPANIMATOR(pSwordRetract) +DEF_PSPANIMATOR(pStarPresent) +DEF_PSPANIMATOR(pStarHide) +DEF_PSPANIMATOR(pStarRest) +DEF_PSPANIMATOR(pStarThrow) +DEF_PSPANIMATOR(pStarRestTest) +DEF_PSPANIMATOR(pStarRetract) +DEF_PSPANIMATOR(pUziRest) +DEF_PSPANIMATOR(pUziAction) +DEF_PSPANIMATOR(pUziFire) +DEF_PSPANIMATOR(pSetVisNorm) +DEF_PSPANIMATOR(pUziHide) +DEF_PSPANIMATOR(pUziPresent) +DEF_PSPANIMATOR(pUziPresentReload) +DEF_PSPANIMATOR(pUziRetract) +DEF_PSPANIMATOR(pSuicide) +DEF_PSPANIMATOR(pUziEjectDown) +DEF_PSPANIMATOR(pUziEjectUp) +DEF_PSPANIMATOR(pSpawnUziClip) +DEF_PSPANIMATOR(pUziClip) +DEF_PSPANIMATOR(pUziReload) +DEF_PSPANIMATOR(pUziReloadRetract) +DEF_PSPANIMATOR(pUziDoneReload) +DEF_PSPANIMATOR(pUziShell) +DEF_PSPANIMATOR(pShotgunShell) +DEF_PSPANIMATOR(pShotgunPresent) +DEF_PSPANIMATOR(pShotgunRest) +DEF_PSPANIMATOR(pShotgunHide) +DEF_PSPANIMATOR(pShotgunRecoilDown) +DEF_PSPANIMATOR(pShotgunRecoilUp) +DEF_PSPANIMATOR(pShotgunRestTest) +DEF_PSPANIMATOR(pShotgunAction) +DEF_PSPANIMATOR(pShotgunFire) +DEF_PSPANIMATOR(SpawnShotgunShell) +DEF_PSPANIMATOR(pShotgunReloadDown) +DEF_PSPANIMATOR(pShotgunReloadUp) +DEF_PSPANIMATOR(pShotgunRetract) +DEF_PSPANIMATOR(pRailPresent) +DEF_PSPANIMATOR(pRailRest) +DEF_PSPANIMATOR(pRailHide) +DEF_PSPANIMATOR(pRailRecoilDown) +DEF_PSPANIMATOR(pRailRecoilUp) +DEF_PSPANIMATOR(pRailAction) +DEF_PSPANIMATOR(pRailFire) +DEF_PSPANIMATOR(pRailOkTest) +DEF_PSPANIMATOR(pRailRestTest) +DEF_PSPANIMATOR(pRailRetract) +DEF_PSPANIMATOR(pHotheadPresent) +DEF_PSPANIMATOR(pHotheadHide) +DEF_PSPANIMATOR(pHotheadRetract) +DEF_PSPANIMATOR(pHotheadRest) +DEF_PSPANIMATOR(pHotheadAction) +DEF_PSPANIMATOR(pHotheadAttack) +DEF_PSPANIMATOR(pHotheadRestTest) +DEF_PSPANIMATOR(pOnFire) +DEF_PSPANIMATOR(pMicroPresent) +DEF_PSPANIMATOR(pMicroRest) +DEF_PSPANIMATOR(pMicroHide) +DEF_PSPANIMATOR(pNukeAction) +DEF_PSPANIMATOR(pMicroStandBy) +DEF_PSPANIMATOR(pMicroCount) +DEF_PSPANIMATOR(pMicroReady) +DEF_PSPANIMATOR(pMicroRecoilDown) +DEF_PSPANIMATOR(pMicroRecoilUp) +DEF_PSPANIMATOR(pMicroFire) +DEF_PSPANIMATOR(pMicroRetract) +DEF_PSPANIMATOR(pHeartPresent) +DEF_PSPANIMATOR(pHeartRest) +DEF_PSPANIMATOR(SpawnSmallHeartBlood) +DEF_PSPANIMATOR(pHeartHide) +DEF_PSPANIMATOR(pHeartActionBlood) +DEF_PSPANIMATOR(pHeartAttack) +DEF_PSPANIMATOR(pHeartAction) +DEF_PSPANIMATOR(pHeartRetract) +DEF_PSPANIMATOR(pGrenadePresent) +DEF_PSPANIMATOR(pGrenadeRest) +DEF_PSPANIMATOR(pGrenadeHide) +DEF_PSPANIMATOR(pGrenadeAction) +DEF_PSPANIMATOR(pGrenadeFire) +DEF_PSPANIMATOR(pGrenadeRecoilDown) +DEF_PSPANIMATOR(pGrenadeRecoilUp) +DEF_PSPANIMATOR(pGrenadeRetract) +DEF_PSPANIMATOR(pMinePresent) +DEF_PSPANIMATOR(pMineRest) +DEF_PSPANIMATOR(pMineUpSound) +DEF_PSPANIMATOR(pMineHide) +DEF_PSPANIMATOR(pMineThrow) +DEF_PSPANIMATOR(pMineLower) +DEF_PSPANIMATOR(pMineRaise) +DEF_PSPANIMATOR(pMineAction) +DEF_PSPANIMATOR(pMineRetract) +DEF_PSPANIMATOR(pChopsUp) +DEF_PSPANIMATOR(pChopsClick) +DEF_PSPANIMATOR(pChopsDown) +DEF_PSPANIMATOR(pChopsDownSlow) +DEF_PSPANIMATOR(pChopsShake) +DEF_PSPANIMATOR(pChopsWait) +DEF_PSPANIMATOR(pChopsRetract) +DEF_PSPANIMATOR(pFistPresent) +DEF_PSPANIMATOR(pFistRest) +DEF_PSPANIMATOR(pFistHide) +DEF_PSPANIMATOR(pFistAttack) +DEF_PSPANIMATOR(pFistSlideDown) +DEF_PSPANIMATOR(pFistSlideR) +DEF_PSPANIMATOR(pFistSlideDownR) +DEF_PSPANIMATOR(pFistBlock) +DEF_PSPANIMATOR(pFistRetract) +DEF_PSPANIMATOR(pMicroAction) +DEF_PSPANIMATOR(pHeartBlood) +DEF_PSPANIMATOR(PanelInvTestSuicide) + END_SW_NS #endif diff --git a/source/games/sw/src/panel.cpp b/source/games/sw/src/panel.cpp index 60a15fb8c9..cfaef29b43 100644 --- a/source/games/sw/src/panel.cpp +++ b/source/games/sw/src/panel.cpp @@ -91,7 +91,6 @@ uint8_t UziRecoilYadj = 0; extern short screenpeek; -pANIMATOR pNullAnimator; int InitStar(DSWPlayer*); int ChangeWeapon(DSWPlayer*); @@ -100,11 +99,6 @@ int NullAnimator(DSWActor*) return 0; } -void pNullAnimator(DPanelSprite*) -{ - return; -} - inline int pspheight(DPanelSprite* psp) { auto tex = tileGetTexture(psp->picndx); @@ -913,17 +907,17 @@ extern PANEL_STATE ps_ReloadSword[]; PANEL_STATE ps_PresentSword[] = { - {ID_SwordPresent0, Sword_BEAT_RATE, pSwordPresent, &ps_PresentSword[0], 0,0,0} + {ID_SwordPresent0, Sword_BEAT_RATE, &AF(pSwordPresent), &ps_PresentSword[0], 0,0,0} }; PANEL_STATE ps_SwordRest[] = { - {ID_SwordPresent0, Sword_BEAT_RATE, pSwordRest, &ps_SwordRest[0], 0,0,0} + {ID_SwordPresent0, Sword_BEAT_RATE, &AF(pSwordRest), &ps_SwordRest[0], 0,0,0} }; PANEL_STATE ps_SwordHide[] = { - {ID_SwordPresent0, Sword_BEAT_RATE, pSwordHide, &ps_SwordHide[0], 0,0,0} + {ID_SwordPresent0, Sword_BEAT_RATE, &AF(pSwordHide), &ps_SwordHide[0], 0,0,0} }; #define SWORD_PAUSE_TICS 10 @@ -933,24 +927,24 @@ PANEL_STATE ps_SwordHide[] = PANEL_STATE ps_SwordSwing[] = { - {ID_SwordSwing0, SWORD_PAUSE_TICS, pNullAnimator, &ps_SwordSwing[1], 0,0,0}, - {ID_SwordSwing1, SWORD_SLIDE_TICS, /* start slide */ pSwordSlide, &ps_SwordSwing[2], 0,0,0}, - {ID_SwordSwing1, 0, /* damage */ pSwordAttack, &ps_SwordSwing[3], psf_QuickCall, 0,0}, - {ID_SwordSwing2, SWORD_MID_SLIDE_TICS, /* mid slide */ pSwordSlideDown, &ps_SwordSwing[4], 0,0,0}, + {ID_SwordSwing0, SWORD_PAUSE_TICS, nullptr, &ps_SwordSwing[1], 0,0,0}, + {ID_SwordSwing1, SWORD_SLIDE_TICS, /* start slide */ &AF(pSwordSlide), &ps_SwordSwing[2], 0,0,0}, + {ID_SwordSwing1, 0, /* damage */ &AF(pSwordAttack), &ps_SwordSwing[3], psf_QuickCall, 0,0}, + {ID_SwordSwing2, SWORD_MID_SLIDE_TICS, /* mid slide */ &AF(pSwordSlideDown), &ps_SwordSwing[4], 0,0,0}, - {ID_SwordSwing2, 99, /* end slide */ pSwordSlideDown, &ps_SwordSwing[4], 0,0,0}, + {ID_SwordSwing2, 99, /* end slide */ &AF(pSwordSlideDown), &ps_SwordSwing[4], 0,0,0}, - {ID_SwordSwingR1, SWORD_SLIDE_TICS, /* start slide */ pSwordSlideR, &ps_SwordSwing[6], psf_Xflip, 0,0}, - {ID_SwordSwingR2, 0, /* damage */ pSwordAttack, &ps_SwordSwing[7], psf_QuickCall|psf_Xflip, 0,0}, - {ID_SwordSwingR2, SWORD_MID_SLIDE_TICS, /* mid slide */ pSwordSlideDownR, &ps_SwordSwing[8], psf_Xflip, 0,0}, + {ID_SwordSwingR1, SWORD_SLIDE_TICS, /* start slide */ &AF(pSwordSlideR), &ps_SwordSwing[6], psf_Xflip, 0,0}, + {ID_SwordSwingR2, 0, /* damage */ &AF(pSwordAttack), &ps_SwordSwing[7], psf_QuickCall|psf_Xflip, 0,0}, + {ID_SwordSwingR2, SWORD_MID_SLIDE_TICS, /* mid slide */ &AF(pSwordSlideDownR), &ps_SwordSwing[8], psf_Xflip, 0,0}, - {ID_SwordSwingR2, 99, /* end slide */ pSwordSlideDownR, &ps_SwordSwing[8], psf_Xflip, 0,0}, - {ID_SwordSwingR2, 2, /* end slide */ pNullAnimator, &ps_SwordSwing[1], psf_Xflip, 0,0}, + {ID_SwordSwingR2, 99, /* end slide */ &AF(pSwordSlideDownR), &ps_SwordSwing[8], psf_Xflip, 0,0}, + {ID_SwordSwingR2, 2, /* end slide */ nullptr, &ps_SwordSwing[1], psf_Xflip, 0,0}, }; PANEL_STATE ps_RetractSword[] = { - {ID_SwordPresent0, Sword_BEAT_RATE, pSwordRetract, &ps_RetractSword[0], 0,0,0} + {ID_SwordPresent0, Sword_BEAT_RATE, &AF(pSwordRetract), &ps_RetractSword[0], 0,0,0} }; #define SWORD_SWAY_AMT 12 @@ -1401,48 +1395,48 @@ extern PANEL_STATE ps_StarThrow[]; PANEL_STATE ps_PresentStar[] = { - {ID_StarPresent0, PRESENT_STAR_RATE, pStarPresent, &ps_PresentStar[0], 0,0,0} + {ID_StarPresent0, PRESENT_STAR_RATE, &AF(pStarPresent), &ps_PresentStar[0], 0,0,0} }; PANEL_STATE ps_StarHide[] = { - {ID_StarPresent0, PRESENT_STAR_RATE, pStarHide, &ps_StarHide[0], 0,0,0} + {ID_StarPresent0, PRESENT_STAR_RATE, &AF(pStarHide), &ps_StarHide[0], 0,0,0} }; #define Star_RATE 2 // was 5 PANEL_STATE ps_StarRest[] = { - {ID_StarPresent0, Star_RATE, pStarRest, &ps_StarRest[0], 0,0,0}, + {ID_StarPresent0, Star_RATE, &AF(pStarRest), &ps_StarRest[0], 0,0,0}, }; PANEL_STATE ps_ThrowStar[] = { - {ID_StarDown0, Star_RATE+3, pNullAnimator, &ps_ThrowStar[1], 0,0,0}, - {ID_StarDown1, Star_RATE+3, pNullAnimator, &ps_ThrowStar[2], 0,0,0}, - {ID_StarDown1, Star_RATE*2, pNullAnimator, &ps_ThrowStar[3], psf_Invisible, 0,0}, - {ID_StarDown1, Star_RATE, pNullAnimator, &ps_ThrowStar[4], 0,0,0}, - {ID_StarDown0, Star_RATE, pNullAnimator, &ps_ThrowStar[5], 0,0,0}, - {ID_ThrowStar0, 1, pNullAnimator, &ps_ThrowStar[6], 0,0,0}, - {ID_ThrowStar0, Star_RATE, pStarThrow, &ps_ThrowStar[7], psf_QuickCall, 0,0}, - {ID_ThrowStar0, Star_RATE, pNullAnimator, &ps_ThrowStar[8], 0,0,0}, - {ID_ThrowStar1, Star_RATE, pNullAnimator, &ps_ThrowStar[9], 0,0,0}, - {ID_ThrowStar2, Star_RATE*2, pNullAnimator, &ps_ThrowStar[10], 0,0,0}, - {ID_ThrowStar3, Star_RATE*2, pNullAnimator, &ps_ThrowStar[11], 0,0,0}, - {ID_ThrowStar4, Star_RATE*2, pNullAnimator, &ps_ThrowStar[12], 0,0,0}, + {ID_StarDown0, Star_RATE+3, nullptr, &ps_ThrowStar[1], 0,0,0}, + {ID_StarDown1, Star_RATE+3, nullptr, &ps_ThrowStar[2], 0,0,0}, + {ID_StarDown1, Star_RATE*2, nullptr, &ps_ThrowStar[3], psf_Invisible, 0,0}, + {ID_StarDown1, Star_RATE, nullptr, &ps_ThrowStar[4], 0,0,0}, + {ID_StarDown0, Star_RATE, nullptr, &ps_ThrowStar[5], 0,0,0}, + {ID_ThrowStar0, 1, nullptr, &ps_ThrowStar[6], 0,0,0}, + {ID_ThrowStar0, Star_RATE, &AF(pStarThrow), &ps_ThrowStar[7], psf_QuickCall, 0,0}, + {ID_ThrowStar0, Star_RATE, nullptr, &ps_ThrowStar[8], 0,0,0}, + {ID_ThrowStar1, Star_RATE, nullptr, &ps_ThrowStar[9], 0,0,0}, + {ID_ThrowStar2, Star_RATE*2, nullptr, &ps_ThrowStar[10], 0,0,0}, + {ID_ThrowStar3, Star_RATE*2, nullptr, &ps_ThrowStar[11], 0,0,0}, + {ID_ThrowStar4, Star_RATE*2, nullptr, &ps_ThrowStar[12], 0,0,0}, // start up - {ID_StarDown1, Star_RATE+3, pNullAnimator, &ps_ThrowStar[13], 0,0,0}, - {ID_StarDown0, Star_RATE+3, pNullAnimator, &ps_ThrowStar[14], 0,0,0}, - {ID_StarPresent0, Star_RATE+3, pNullAnimator, &ps_ThrowStar[15], 0,0,0}, + {ID_StarDown1, Star_RATE+3, nullptr, &ps_ThrowStar[13], 0,0,0}, + {ID_StarDown0, Star_RATE+3, nullptr, &ps_ThrowStar[14], 0,0,0}, + {ID_StarPresent0, Star_RATE+3, nullptr, &ps_ThrowStar[15], 0,0,0}, // maybe to directly to rest state - {ID_StarDown0, 3, pStarRestTest, &ps_ThrowStar[16], psf_QuickCall, 0,0}, + {ID_StarDown0, 3, &AF(pStarRestTest), &ps_ThrowStar[16], psf_QuickCall, 0,0}, // if holding the fire key we get to here - {ID_ThrowStar4, 3, pNullAnimator, &ps_ThrowStar[5], 0,0,0}, + {ID_ThrowStar4, 3, nullptr, &ps_ThrowStar[5], 0,0,0}, }; PANEL_STATE ps_RetractStar[] = { - {ID_StarPresent0, PRESENT_STAR_RATE, pStarRetract, &ps_RetractStar[0], 0,0,0} + {ID_StarPresent0, PRESENT_STAR_RATE, &AF(pStarRetract), &ps_RetractStar[0], 0,0,0} }; // @@ -1730,23 +1724,23 @@ pANIMATOR pSetVisNorm; // Right Uzi PANEL_STATE ps_FireUzi[] = { - {ID_UziPresent0, 3, pUziRest, &ps_FireUzi[0], 0,0,0}, - {ID_UziFire0, 1, pUziAction, &ps_FireUzi[2], psf_ShadeHalf, 0,0}, + {ID_UziPresent0, 3, &AF(pUziRest), &ps_FireUzi[0], 0,0,0}, + {ID_UziFire0, 1, &AF(pUziAction), &ps_FireUzi[2], psf_ShadeHalf, 0,0}, - {ID_UziFire1, 0, pUziFire, &ps_FireUzi[3], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_UziFire1, 4, pUziAction, &ps_FireUzi[4], psf_ShadeNone, 0,0}, - {ID_UziFire1, 0, pSetVisNorm, &ps_FireUzi[5], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_UziFire1, 4, pUziAction, &ps_FireUzi[6], psf_ShadeNone, 0,0}, - {ID_UziFire1, 0, pUziFire, &ps_FireUzi[7], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_UziFire1, 4, pUziAction, &ps_FireUzi[8], psf_ShadeNone, 0,0}, - {ID_UziFire1, 0, pSetVisNorm, &ps_FireUzi[9], psf_ShadeNone, 0,0}, + {ID_UziFire1, 0, &AF(pUziFire), &ps_FireUzi[3], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_UziFire1, 4, &AF(pUziAction), &ps_FireUzi[4], psf_ShadeNone, 0,0}, + {ID_UziFire1, 0, &AF(pSetVisNorm), &ps_FireUzi[5], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_UziFire1, 4, &AF(pUziAction), &ps_FireUzi[6], psf_ShadeNone, 0,0}, + {ID_UziFire1, 0, &AF(pUziFire), &ps_FireUzi[7], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_UziFire1, 4, &AF(pUziAction), &ps_FireUzi[8], psf_ShadeNone, 0,0}, + {ID_UziFire1, 0, &AF(pSetVisNorm), &ps_FireUzi[9], psf_ShadeNone, 0,0}, - {ID_UziFire0, 4, pUziAction, &ps_FireUzi[10], psf_ShadeHalf, 0,0}, - {ID_UziFire0, 0, pUziFire, &ps_FireUzi[11], psf_QuickCall, 0,0}, - {ID_UziFire0, 4, pUziAction, &ps_FireUzi[12], psf_ShadeHalf, 0,0}, - {ID_UziFire0, 4, pUziAction, &ps_FireUzi[13], psf_ShadeHalf, 0,0}, + {ID_UziFire0, 4, &AF(pUziAction), &ps_FireUzi[10], psf_ShadeHalf, 0,0}, + {ID_UziFire0, 0, &AF(pUziFire), &ps_FireUzi[11], psf_QuickCall, 0,0}, + {ID_UziFire0, 4, &AF(pUziAction), &ps_FireUzi[12], psf_ShadeHalf, 0,0}, + {ID_UziFire0, 4, &AF(pUziAction), &ps_FireUzi[13], psf_ShadeHalf, 0,0}, - {ID_UziFire1, 5, pUziRest, &ps_FireUzi[0], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_UziFire1, 5, &AF(pUziRest), &ps_FireUzi[0], psf_ShadeNone|psf_QuickCall, 0,0}, }; #define PRESENT_UZI_RATE 6 @@ -1754,101 +1748,101 @@ PANEL_STATE ps_FireUzi[] = PANEL_STATE ps_UziNull[] = { - {ID_UziPresent0, PRESENT_UZI_RATE, pNullAnimator, &ps_UziNull[0], 0,0,0} + {ID_UziPresent0, PRESENT_UZI_RATE, nullptr, &ps_UziNull[0], 0,0,0} }; PANEL_STATE ps_UziHide[] = { - {ID_UziPresent0, PRESENT_UZI_RATE, pUziHide, &ps_UziHide[0], 0,0,0} + {ID_UziPresent0, PRESENT_UZI_RATE, &AF(pUziHide), &ps_UziHide[0], 0,0,0} }; PANEL_STATE ps_PresentUzi[] = { - {ID_UziPresent0, PRESENT_UZI_RATE, pUziPresent, &ps_PresentUzi[0], 0,0,0}, + {ID_UziPresent0, PRESENT_UZI_RATE, &AF(pUziPresent), &ps_PresentUzi[0], 0,0,0}, }; // present of secondary uzi for reload needs to be faster PANEL_STATE ps_PresentUziReload[] = { - {ID_UziPresent0, RELOAD_UZI_RATE, pUziPresentReload, &ps_PresentUziReload[0], 0,0,0}, + {ID_UziPresent0, RELOAD_UZI_RATE, &AF(pUziPresentReload), &ps_PresentUziReload[0], 0,0,0}, }; PANEL_STATE ps_RetractUzi[] = { - {ID_UziPresent0, PRESENT_UZI_RATE, pUziRetract, &ps_RetractUzi[0], 0,0,0}, + {ID_UziPresent0, PRESENT_UZI_RATE, &AF(pUziRetract), &ps_RetractUzi[0], 0,0,0}, }; // Left Uzi PANEL_STATE ps_FireUzi2[] = { - {ID_Uzi2Present0, 3, pUziRest, &ps_FireUzi2[0], psf_Xflip, 0,0}, - {ID_Uzi2Fire0, 1, pUziAction, &ps_FireUzi2[2], psf_ShadeHalf|psf_Xflip, 0,0}, + {ID_Uzi2Present0, 3, &AF(pUziRest), &ps_FireUzi2[0], psf_Xflip, 0,0}, + {ID_Uzi2Fire0, 1, &AF(pUziAction), &ps_FireUzi2[2], psf_ShadeHalf|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 0, pUziFire, &ps_FireUzi2[3], psf_ShadeNone|psf_QuickCall|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 4, pUziAction, &ps_FireUzi2[4], psf_ShadeNone|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 4, pUziAction, &ps_FireUzi2[5], psf_ShadeNone|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 0, pUziFire, &ps_FireUzi2[6], psf_ShadeNone|psf_QuickCall|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 4, pUziAction, &ps_FireUzi2[7], psf_ShadeNone|psf_Xflip, 0,0}, + {ID_Uzi2Fire1, 0, &AF(pUziFire), &ps_FireUzi2[3], psf_ShadeNone|psf_QuickCall|psf_Xflip, 0,0}, + {ID_Uzi2Fire1, 4, &AF(pUziAction), &ps_FireUzi2[4], psf_ShadeNone|psf_Xflip, 0,0}, + {ID_Uzi2Fire1, 4, &AF(pUziAction), &ps_FireUzi2[5], psf_ShadeNone|psf_Xflip, 0,0}, + {ID_Uzi2Fire1, 0, &AF(pUziFire), &ps_FireUzi2[6], psf_ShadeNone|psf_QuickCall|psf_Xflip, 0,0}, + {ID_Uzi2Fire1, 4, &AF(pUziAction), &ps_FireUzi2[7], psf_ShadeNone|psf_Xflip, 0,0}, - {ID_Uzi2Fire0, 4, pUziAction, &ps_FireUzi2[8], psf_ShadeHalf|psf_Xflip, 0,0}, - {ID_Uzi2Fire0, 0, pUziFire, &ps_FireUzi2[9], psf_ShadeHalf|psf_QuickCall|psf_Xflip, 0,0}, - {ID_Uzi2Fire0, 4, pUziAction, &ps_FireUzi2[10], psf_ShadeHalf|psf_Xflip, 0,0}, - {ID_Uzi2Fire0, 4, pUziAction, &ps_FireUzi2[11], psf_ShadeHalf|psf_Xflip, 0,0}, + {ID_Uzi2Fire0, 4, &AF(pUziAction), &ps_FireUzi2[8], psf_ShadeHalf|psf_Xflip, 0,0}, + {ID_Uzi2Fire0, 0, &AF(pUziFire), &ps_FireUzi2[9], psf_ShadeHalf|psf_QuickCall|psf_Xflip, 0,0}, + {ID_Uzi2Fire0, 4, &AF(pUziAction), &ps_FireUzi2[10], psf_ShadeHalf|psf_Xflip, 0,0}, + {ID_Uzi2Fire0, 4, &AF(pUziAction), &ps_FireUzi2[11], psf_ShadeHalf|psf_Xflip, 0,0}, - {ID_Uzi2Fire1, 5, pUziRest, &ps_FireUzi2[0], psf_QuickCall, 0,0}, + {ID_Uzi2Fire1, 5, &AF(pUziRest), &ps_FireUzi2[0], psf_QuickCall, 0,0}, }; PANEL_STATE ps_PresentUzi2[] = { - {ID_Uzi2Present0, PRESENT_UZI_RATE, pUziPresent, &ps_PresentUzi2[0], psf_Xflip, 0,0}, + {ID_Uzi2Present0, PRESENT_UZI_RATE, &AF(pUziPresent), &ps_PresentUzi2[0], psf_Xflip, 0,0}, }; PANEL_STATE ps_Uzi2Hide[] = { - {ID_Uzi2Present0, PRESENT_UZI_RATE, pUziHide, &ps_Uzi2Hide[0], psf_Xflip, 0,0}, + {ID_Uzi2Present0, PRESENT_UZI_RATE, &AF(pUziHide), &ps_Uzi2Hide[0], psf_Xflip, 0,0}, }; PANEL_STATE ps_RetractUzi2[] = { - {ID_Uzi2Present0, PRESENT_UZI_RATE, pUziRetract, &ps_RetractUzi2[0], psf_Xflip, 0,0}, + {ID_Uzi2Present0, PRESENT_UZI_RATE, &AF(pUziRetract), &ps_RetractUzi2[0], psf_Xflip, 0,0}, }; PANEL_STATE ps_Uzi2Suicide[] = { - {ID_Uzi2Present0, PRESENT_UZI_RATE, pSuicide, &ps_Uzi2Suicide[0], psf_Xflip, 0,0} + {ID_Uzi2Present0, PRESENT_UZI_RATE, &AF(pSuicide), &ps_Uzi2Suicide[0], psf_Xflip, 0,0} }; PANEL_STATE ps_Uzi2Null[] = { - {ID_Uzi2Present0, PRESENT_UZI_RATE, pNullAnimator, &ps_Uzi2Null[0], psf_Xflip, 0,0} + {ID_Uzi2Present0, PRESENT_UZI_RATE, nullptr, &ps_Uzi2Null[0], psf_Xflip, 0,0} }; PANEL_STATE ps_UziEject[] = { - {ID_UziPresent0, 1, pNullAnimator, &ps_UziEject[1], 0,0,0}, - {ID_UziPresent0, RELOAD_UZI_RATE, pUziEjectDown, &ps_UziEject[1], 0,0,0}, - {ID_UziEject0, RELOAD_UZI_RATE, pUziEjectUp, &ps_UziEject[2], 0,0,0}, - {ID_UziEject0, 1, pNullAnimator, &ps_UziEject[4], 0,0,0}, - {ID_UziEject0, RELOAD_UZI_RATE, pSpawnUziClip, &ps_UziEject[5], psf_QuickCall, 0,0}, - {ID_UziEject0, RELOAD_UZI_RATE, pNullAnimator, &ps_UziEject[5], 0,0,0}, + {ID_UziPresent0, 1, nullptr, &ps_UziEject[1], 0,0,0}, + {ID_UziPresent0, RELOAD_UZI_RATE, &AF(pUziEjectDown), &ps_UziEject[1], 0,0,0}, + {ID_UziEject0, RELOAD_UZI_RATE, &AF(pUziEjectUp), &ps_UziEject[2], 0,0,0}, + {ID_UziEject0, 1, nullptr, &ps_UziEject[4], 0,0,0}, + {ID_UziEject0, RELOAD_UZI_RATE, &AF(pSpawnUziClip), &ps_UziEject[5], psf_QuickCall, 0,0}, + {ID_UziEject0, RELOAD_UZI_RATE, nullptr, &ps_UziEject[5], 0,0,0}, }; PANEL_STATE ps_UziClip[] = { - {ID_UziClip0, RELOAD_UZI_RATE, pUziClip, &ps_UziClip[0], 0,0,0} + {ID_UziClip0, RELOAD_UZI_RATE, &AF(pUziClip), &ps_UziClip[0], 0,0,0} }; PANEL_STATE ps_UziReload[] = { - {ID_UziReload0, RELOAD_UZI_RATE, pUziReload, &ps_UziReload[0], 0,0,0}, - {ID_UziReload0, RELOAD_UZI_RATE, pUziReloadRetract, &ps_UziReload[1], 0,0,0} + {ID_UziReload0, RELOAD_UZI_RATE, &AF(pUziReload), &ps_UziReload[0], 0,0,0}, + {ID_UziReload0, RELOAD_UZI_RATE, &AF(pUziReloadRetract), &ps_UziReload[1], 0,0,0} }; PANEL_STATE ps_UziDoneReload[] = { - {ID_UziEject0, RELOAD_UZI_RATE, pUziDoneReload, &ps_UziDoneReload[0], 0,0,0} + {ID_UziEject0, RELOAD_UZI_RATE, &AF(pUziDoneReload), &ps_UziDoneReload[0], 0,0,0} }; //--------------------------------------------------------------------------- @@ -2672,22 +2666,22 @@ void pUziShell(DPanelSprite*); PANEL_STATE ps_UziShell[] = { - {ID_UziShell0, UZI_SHELL_RATE, pUziShell, &ps_UziShell[1], 0,0,0}, - {ID_UziShell1, UZI_SHELL_RATE, pUziShell, &ps_UziShell[2], 0,0,0}, - {ID_UziShell2, UZI_SHELL_RATE, pUziShell, &ps_UziShell[3], 0,0,0}, - {ID_UziShell3, UZI_SHELL_RATE, pUziShell, &ps_UziShell[4], 0,0,0}, - {ID_UziShell4, UZI_SHELL_RATE, pUziShell, &ps_UziShell[5], 0,0,0}, - {ID_UziShell5, UZI_SHELL_RATE, pUziShell, &ps_UziShell[0], 0,0,0}, + {ID_UziShell0, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[1], 0,0,0}, + {ID_UziShell1, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[2], 0,0,0}, + {ID_UziShell2, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[3], 0,0,0}, + {ID_UziShell3, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[4], 0,0,0}, + {ID_UziShell4, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[5], 0,0,0}, + {ID_UziShell5, UZI_SHELL_RATE, &AF(pUziShell), &ps_UziShell[0], 0,0,0}, }; PANEL_STATE ps_Uzi2Shell[] = { - {ID_Uzi2Shell0, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[1], psf_Xflip, 0,0}, - {ID_Uzi2Shell1, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[2], psf_Xflip, 0,0}, - {ID_Uzi2Shell2, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[3], psf_Xflip, 0,0}, - {ID_Uzi2Shell3, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[4], psf_Xflip, 0,0}, - {ID_Uzi2Shell4, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[5], psf_Xflip, 0,0}, - {ID_Uzi2Shell5, UZI_SHELL_RATE, pUziShell, &ps_Uzi2Shell[0], psf_Xflip, 0,0}, + {ID_Uzi2Shell0, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[1], psf_Xflip, 0,0}, + {ID_Uzi2Shell1, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[2], psf_Xflip, 0,0}, + {ID_Uzi2Shell2, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[3], psf_Xflip, 0,0}, + {ID_Uzi2Shell3, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[4], psf_Xflip, 0,0}, + {ID_Uzi2Shell4, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[5], psf_Xflip, 0,0}, + {ID_Uzi2Shell5, UZI_SHELL_RATE, &AF(pUziShell), &ps_Uzi2Shell[0], psf_Xflip, 0,0}, }; //--------------------------------------------------------------------------- @@ -2761,14 +2755,14 @@ void pShotgunShell(DPanelSprite*); PANEL_STATE ps_ShotgunShell[] = { - {ID_ShotgunShell0, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[1], 0,0,0}, - {ID_ShotgunShell1, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[2], 0,0,0}, - {ID_ShotgunShell2, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[3], 0,0,0}, - {ID_ShotgunShell3, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[4], 0,0,0}, - {ID_ShotgunShell4, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[5], 0,0,0}, - {ID_ShotgunShell5, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[6], 0,0,0}, - {ID_ShotgunShell6, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[7], 0,0,0}, - {ID_ShotgunShell6, SHOTGUN_SHELL_RATE, pShotgunShell, &ps_ShotgunShell[0], 0,0,0}, + {ID_ShotgunShell0, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[1], 0,0,0}, + {ID_ShotgunShell1, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[2], 0,0,0}, + {ID_ShotgunShell2, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[3], 0,0,0}, + {ID_ShotgunShell3, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[4], 0,0,0}, + {ID_ShotgunShell4, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[5], 0,0,0}, + {ID_ShotgunShell5, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[6], 0,0,0}, + {ID_ShotgunShell6, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[7], 0,0,0}, + {ID_ShotgunShell6, SHOTGUN_SHELL_RATE, &AF(pShotgunShell), &ps_ShotgunShell[0], 0,0,0}, }; void SpawnShotgunShell(DPanelSprite* psp) @@ -2828,87 +2822,87 @@ extern PANEL_STATE ps_ShotgunReload[]; PANEL_STATE ps_PresentShotgun[] = { - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunPresent, &ps_PresentShotgun[0], 0,0,0} + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunPresent), &ps_PresentShotgun[0], 0,0,0} }; PANEL_STATE ps_ShotgunRest[] = { - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunRest, &ps_ShotgunRest[0], 0,0,0} + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunRest), &ps_ShotgunRest[0], 0,0,0} }; PANEL_STATE ps_ShotgunHide[] = { - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunHide, &ps_ShotgunHide[0], 0,0,0} + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunHide), &ps_ShotgunHide[0], 0,0,0} }; PANEL_STATE ps_ShotgunRecoil[] = { // recoil - {ID_ShotgunReload0, Shotgun_ACTION_RATE, pShotgunRecoilDown, &ps_ShotgunRecoil[0], 0,0,0}, - {ID_ShotgunReload0, Shotgun_ACTION_RATE, pShotgunRecoilUp, &ps_ShotgunRecoil[1], 0,0,0}, + {ID_ShotgunReload0, Shotgun_ACTION_RATE, &AF(pShotgunRecoilDown), &ps_ShotgunRecoil[0], 0,0,0}, + {ID_ShotgunReload0, Shotgun_ACTION_RATE, &AF(pShotgunRecoilUp), &ps_ShotgunRecoil[1], 0,0,0}, // reload - {ID_ShotgunReload0, Shotgun_ACTION_RATE*5, pNullAnimator, &ps_ShotgunRecoil[3], 0,0,0}, - {ID_ShotgunReload1, Shotgun_ACTION_RATE, pNullAnimator, &ps_ShotgunRecoil[4], 0,0,0}, - {ID_ShotgunReload2, Shotgun_ACTION_RATE*5, pNullAnimator, &ps_ShotgunRecoil[5], 0,0,0}, - {ID_ShotgunPresent0,Shotgun_ACTION_RATE, pShotgunRestTest, &ps_ShotgunRecoil[6], 0,0,0}, - {ID_ShotgunPresent0,Shotgun_ACTION_RATE/2, pShotgunAction, &ps_ShotgunRecoil[7], 0,0,0}, - {ID_ShotgunPresent0,Shotgun_ACTION_RATE/2, pShotgunAction, &ps_ShotgunRecoil[8], 0,0,0}, + {ID_ShotgunReload0, Shotgun_ACTION_RATE*5, nullptr, &ps_ShotgunRecoil[3], 0,0,0}, + {ID_ShotgunReload1, Shotgun_ACTION_RATE, nullptr, &ps_ShotgunRecoil[4], 0,0,0}, + {ID_ShotgunReload2, Shotgun_ACTION_RATE*5, nullptr, &ps_ShotgunRecoil[5], 0,0,0}, + {ID_ShotgunPresent0,Shotgun_ACTION_RATE, &AF(pShotgunRestTest), &ps_ShotgunRecoil[6], 0,0,0}, + {ID_ShotgunPresent0,Shotgun_ACTION_RATE/2, &AF(pShotgunAction), &ps_ShotgunRecoil[7], 0,0,0}, + {ID_ShotgunPresent0,Shotgun_ACTION_RATE/2, &AF(pShotgunAction), &ps_ShotgunRecoil[8], 0,0,0}, // ready to fire again - {ID_ShotgunPresent0, 3, pNullAnimator, &ps_ShotgunRest[0], 0,0,0} + {ID_ShotgunPresent0, 3, nullptr, &ps_ShotgunRest[0], 0,0,0} }; PANEL_STATE ps_ShotgunRecoilAuto[] = { // recoil - {ID_ShotgunReload0, 1, pShotgunRecoilDown, &ps_ShotgunRecoilAuto[0], 0,0,0}, - {ID_ShotgunReload0, 1, pShotgunRecoilUp, &ps_ShotgunRecoilAuto[1], 0,0,0}, + {ID_ShotgunReload0, 1, &AF(pShotgunRecoilDown), &ps_ShotgunRecoilAuto[0], 0,0,0}, + {ID_ShotgunReload0, 1, &AF(pShotgunRecoilUp), &ps_ShotgunRecoilAuto[1], 0,0,0}, // Reload - {ID_ShotgunReload0, 1, pNullAnimator, &ps_ShotgunRecoilAuto[3], 0,0,0}, - {ID_ShotgunReload0, 1, pNullAnimator, &ps_ShotgunRecoilAuto[4], 0,0,0}, - {ID_ShotgunReload0, 1, pNullAnimator, &ps_ShotgunRecoilAuto[5], 0,0,0}, + {ID_ShotgunReload0, 1, nullptr, &ps_ShotgunRecoilAuto[3], 0,0,0}, + {ID_ShotgunReload0, 1, nullptr, &ps_ShotgunRecoilAuto[4], 0,0,0}, + {ID_ShotgunReload0, 1, nullptr, &ps_ShotgunRecoilAuto[5], 0,0,0}, - {ID_ShotgunPresent0,1, pShotgunRestTest, &ps_ShotgunRecoilAuto[6], 0,0,0}, - {ID_ShotgunPresent0,1, pShotgunAction, &ps_ShotgunRecoilAuto[7], 0,0,0}, - {ID_ShotgunPresent0,1, pShotgunRest, &ps_ShotgunRest[0],psf_QuickCall, 0,0}, + {ID_ShotgunPresent0,1, &AF(pShotgunRestTest), &ps_ShotgunRecoilAuto[6], 0,0,0}, + {ID_ShotgunPresent0,1, &AF(pShotgunAction), &ps_ShotgunRecoilAuto[7], 0,0,0}, + {ID_ShotgunPresent0,1, &AF(pShotgunRest), &ps_ShotgunRest[0],psf_QuickCall, 0,0}, }; PANEL_STATE ps_ShotgunFire[] = { - {ID_ShotgunFire0, Shotgun_ACTION_RATE, pShotgunAction, &ps_ShotgunFire[1], psf_ShadeHalf, 0,0}, - {ID_ShotgunFire1, Shotgun_ACTION_RATE, pShotgunFire, &ps_ShotgunFire[2], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_ShotgunFire1, Shotgun_ACTION_RATE, pShotgunAction, &ps_ShotgunFire[3], psf_ShadeNone, 0,0}, - {ID_ShotgunReload0, 0, SpawnShotgunShell, &ps_ShotgunFire[4], psf_QuickCall, 0,0}, - {ID_ShotgunReload0, Shotgun_ACTION_RATE, pShotgunAction, &ps_ShotgunRecoil[0], 0,0,0} + {ID_ShotgunFire0, Shotgun_ACTION_RATE, &AF(pShotgunAction), &ps_ShotgunFire[1], psf_ShadeHalf, 0,0}, + {ID_ShotgunFire1, Shotgun_ACTION_RATE, &AF(pShotgunFire), &ps_ShotgunFire[2], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_ShotgunFire1, Shotgun_ACTION_RATE, &AF(pShotgunAction), &ps_ShotgunFire[3], psf_ShadeNone, 0,0}, + {ID_ShotgunReload0, 0, &AF(SpawnShotgunShell), &ps_ShotgunFire[4], psf_QuickCall, 0,0}, + {ID_ShotgunReload0, Shotgun_ACTION_RATE, &AF(pShotgunAction), &ps_ShotgunRecoil[0], 0,0,0} }; #if 1 PANEL_STATE ps_ShotgunAutoFire[] = { - {ID_ShotgunFire1, 2, pShotgunAction, &ps_ShotgunAutoFire[1], psf_ShadeHalf, 0,0}, - {ID_ShotgunFire1, 2, pShotgunFire, &ps_ShotgunAutoFire[2], psf_ShadeNone, 0,0}, - {ID_ShotgunFire1, 2, pShotgunAction, &ps_ShotgunAutoFire[3], psf_ShadeNone, 0,0}, - {ID_ShotgunReload0, 0, SpawnShotgunShell, &ps_ShotgunAutoFire[4], psf_QuickCall, 0,0}, - {ID_ShotgunReload0, 1, pShotgunAction, &ps_ShotgunRecoilAuto[0], 0,0,0} + {ID_ShotgunFire1, 2, &AF(pShotgunAction), &ps_ShotgunAutoFire[1], psf_ShadeHalf, 0,0}, + {ID_ShotgunFire1, 2, &AF(pShotgunFire), &ps_ShotgunAutoFire[2], psf_ShadeNone, 0,0}, + {ID_ShotgunFire1, 2, &AF(pShotgunAction), &ps_ShotgunAutoFire[3], psf_ShadeNone, 0,0}, + {ID_ShotgunReload0, 0, &AF(SpawnShotgunShell), &ps_ShotgunAutoFire[4], psf_QuickCall, 0,0}, + {ID_ShotgunReload0, 1, &AF(pShotgunAction), &ps_ShotgunRecoilAuto[0], 0,0,0} }; #endif #if 1 PANEL_STATE ps_ShotgunReload[] = { - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunReloadDown, &ps_ShotgunReload[0], 0,0,0}, - {ID_ShotgunPresent0, 30, pNullAnimator, &ps_ShotgunReload[2], 0,0,0}, + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunReloadDown), &ps_ShotgunReload[0], 0,0,0}, + {ID_ShotgunPresent0, 30, nullptr, &ps_ShotgunReload[2], 0,0,0}, // make reload sound here - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pNullAnimator, &ps_ShotgunReload[3], psf_QuickCall, 0,0}, - {ID_ShotgunPresent0, 30, pNullAnimator, &ps_ShotgunReload[4], 0,0,0}, - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunReloadUp, &ps_ShotgunReload[4], 0,0,0}, - {ID_ShotgunPresent0, 3, pNullAnimator, &ps_ShotgunRest[0], 0,0,0} + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, nullptr, &ps_ShotgunReload[3], psf_QuickCall, 0,0}, + {ID_ShotgunPresent0, 30, nullptr, &ps_ShotgunReload[4], 0,0,0}, + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunReloadUp), &ps_ShotgunReload[4], 0,0,0}, + {ID_ShotgunPresent0, 3, nullptr, &ps_ShotgunRest[0], 0,0,0} }; #endif PANEL_STATE ps_RetractShotgun[] = { - {ID_ShotgunPresent0, Shotgun_BEAT_RATE, pShotgunRetract, &ps_RetractShotgun[0], 0,0,0} + {ID_ShotgunPresent0, Shotgun_BEAT_RATE, &AF(pShotgunRetract), &ps_RetractShotgun[0], 0,0,0} }; #define SHOTGUN_YOFF 200 @@ -3371,91 +3365,91 @@ bool pRailReloadTest(DPanelSprite* psp); PANEL_STATE ps_PresentRail[] = { - {ID_RailPresent0, Rail_BEAT_RATE, pRailPresent, &ps_PresentRail[0], psf_ShadeNone, 0,0} + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailPresent), &ps_PresentRail[0], psf_ShadeNone, 0,0} }; PANEL_STATE ps_RailRest[] = { - {ID_RailRest0, Rail_BEAT_RATE, pRailRest, &ps_RailRest[1], psf_ShadeNone, 0,0}, - {ID_RailRest1, Rail_BEAT_RATE, pRailRest, &ps_RailRest[2], psf_ShadeNone, 0,0}, - {ID_RailRest2, Rail_BEAT_RATE, pRailRest, &ps_RailRest[3], psf_ShadeNone, 0,0}, - {ID_RailRest3, Rail_BEAT_RATE, pRailRest, &ps_RailRest[4], psf_ShadeNone, 0,0}, - {ID_RailRest4, Rail_BEAT_RATE, pRailRest, &ps_RailRest[0], psf_ShadeNone, 0,0}, + {ID_RailRest0, Rail_BEAT_RATE, &AF(pRailRest), &ps_RailRest[1], psf_ShadeNone, 0,0}, + {ID_RailRest1, Rail_BEAT_RATE, &AF(pRailRest), &ps_RailRest[2], psf_ShadeNone, 0,0}, + {ID_RailRest2, Rail_BEAT_RATE, &AF(pRailRest), &ps_RailRest[3], psf_ShadeNone, 0,0}, + {ID_RailRest3, Rail_BEAT_RATE, &AF(pRailRest), &ps_RailRest[4], psf_ShadeNone, 0,0}, + {ID_RailRest4, Rail_BEAT_RATE, &AF(pRailRest), &ps_RailRest[0], psf_ShadeNone, 0,0}, }; PANEL_STATE ps_RailHide[] = { - {ID_RailPresent0, Rail_BEAT_RATE, pRailHide, &ps_RailHide[0], psf_ShadeNone, 0,0} + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailHide), &ps_RailHide[0], psf_ShadeNone, 0,0} }; PANEL_STATE ps_RailRecoil[] = { // recoil - {ID_RailPresent0, Rail_BEAT_RATE, pRailRecoilDown, &ps_RailRecoil[0], 0,0,0}, - {ID_RailPresent0, Rail_BEAT_RATE, pRailRecoilUp, &ps_RailRecoil[1], 0,0,0}, + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailRecoilDown), &ps_RailRecoil[0], 0,0,0}, + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailRecoilUp), &ps_RailRecoil[1], 0,0,0}, // ready to fire again - {ID_RailPresent0, 3, pNullAnimator, &ps_RailRest[0], 0,0,0} + {ID_RailPresent0, 3, nullptr, &ps_RailRest[0], 0,0,0} }; PANEL_STATE ps_RailFire[] = { - {ID_RailCharge0, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[1], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[2], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[3], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[4], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[1], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[2], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[3], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[4], psf_ShadeNone, 0,0}, - {ID_RailFire0, Rail_ACTION_RATE, pRailAction, &ps_RailFire[5], psf_ShadeNone, 0,0}, - {ID_RailFire1, Rail_ACTION_RATE, pRailAction, &ps_RailFire[6], psf_ShadeNone, 0,0}, - {ID_RailFire1, Rail_ACTION_RATE, pRailAction, &ps_RailFire[7], psf_ShadeNone, 0,0}, - {ID_RailFire1, 0, pRailFire, &ps_RailFire[8], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_RailFire0, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFire[5], psf_ShadeNone, 0,0}, + {ID_RailFire1, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFire[6], psf_ShadeNone, 0,0}, + {ID_RailFire1, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFire[7], psf_ShadeNone, 0,0}, + {ID_RailFire1, 0, &AF(pRailFire), &ps_RailFire[8], psf_ShadeNone|psf_QuickCall, 0,0}, // recoil - {ID_RailPresent0, Rail_BEAT_RATE, pRailRecoilDown, &ps_RailFire[8], psf_ShadeNone, 0,0}, - {ID_RailPresent0, Rail_BEAT_RATE, pRailRecoilUp, &ps_RailFire[9], psf_ShadeNone, 0,0}, + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailRecoilDown), &ps_RailFire[8], psf_ShadeNone, 0,0}, + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailRecoilUp), &ps_RailFire[9], psf_ShadeNone, 0,0}, // !JIM! I added these to introduce firing delay, that looks like a charge down. - {ID_RailCharge0, Rail_CHARGE_RATE, pRailOkTest, &ps_RailFire[11], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[12], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE, pRailOkTest, &ps_RailFire[13], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFire[14], psf_ShadeNone, 0,0}, - {ID_RailCharge0, Rail_CHARGE_RATE+1, pRailAction, &ps_RailFire[15], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+1, pRailAction, &ps_RailFire[16], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE+1, pRailAction, &ps_RailFire[17], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+2, pRailAction, &ps_RailFire[18], psf_ShadeNone, 0,0}, - {ID_RailCharge0, Rail_CHARGE_RATE+2, pRailAction, &ps_RailFire[19], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+2, pRailAction, &ps_RailFire[20], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE+3, pRailAction, &ps_RailFire[21], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+3, pRailAction, &ps_RailFire[22], psf_ShadeNone, 0,0}, - {ID_RailCharge0, Rail_CHARGE_RATE+4, pRailAction, &ps_RailFire[23], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+4, pRailAction, &ps_RailFire[24], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE+4, pRailAction, &ps_RailFire[25], psf_ShadeNone, 0,0}, - {ID_RailCharge0, Rail_CHARGE_RATE+5, pRailAction, &ps_RailFire[26], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE+5, pRailAction, &ps_RailFire[27], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE+5, pRailAction, &ps_RailFire[28], psf_ShadeNone, 0,0}, - - {ID_RailCharge0, Rail_ACTION_RATE, pRailRestTest, &ps_RailFire[29], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_ACTION_RATE, pRailRest, &ps_RailRest[0], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE, &AF(pRailOkTest), &ps_RailFire[11], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[12], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE, &AF(pRailOkTest), &ps_RailFire[13], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFire[14], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE+1, &AF(pRailAction), &ps_RailFire[15], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+1, &AF(pRailAction), &ps_RailFire[16], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE+1, &AF(pRailAction), &ps_RailFire[17], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+2, &AF(pRailAction), &ps_RailFire[18], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE+2, &AF(pRailAction), &ps_RailFire[19], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+2, &AF(pRailAction), &ps_RailFire[20], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE+3, &AF(pRailAction), &ps_RailFire[21], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+3, &AF(pRailAction), &ps_RailFire[22], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE+4, &AF(pRailAction), &ps_RailFire[23], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+4, &AF(pRailAction), &ps_RailFire[24], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE+4, &AF(pRailAction), &ps_RailFire[25], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE+5, &AF(pRailAction), &ps_RailFire[26], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE+5, &AF(pRailAction), &ps_RailFire[27], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE+5, &AF(pRailAction), &ps_RailFire[28], psf_ShadeNone, 0,0}, + + {ID_RailCharge0, Rail_ACTION_RATE, &AF(pRailRestTest), &ps_RailFire[29], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_ACTION_RATE, &AF(pRailRest), &ps_RailRest[0], psf_ShadeNone, 0,0}, }; PANEL_STATE ps_RailFireEMP[] = { - {ID_RailCharge0, Rail_CHARGE_RATE, pRailAction, &ps_RailFireEMP[1], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFireEMP[2], psf_ShadeNone, 0,0}, - {ID_RailCharge2, Rail_CHARGE_RATE, pRailAction, &ps_RailFireEMP[3], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_CHARGE_RATE, pRailAction, &ps_RailFireEMP[4], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFireEMP[1], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFireEMP[2], psf_ShadeNone, 0,0}, + {ID_RailCharge2, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFireEMP[3], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_CHARGE_RATE, &AF(pRailAction), &ps_RailFireEMP[4], psf_ShadeNone, 0,0}, - {ID_RailFire0, Rail_ACTION_RATE, pRailAction, &ps_RailFireEMP[5], psf_ShadeNone, 0,0}, - {ID_RailFire1, Rail_ACTION_RATE, pRailAction, &ps_RailFireEMP[6], psf_ShadeNone, 0,0}, - {ID_RailFire1, Rail_ACTION_RATE, pRailAction, &ps_RailFireEMP[7], psf_ShadeNone, 0,0}, - {ID_RailFire1, 0, pRailFire, &ps_RailFireEMP[8], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_RailFire0, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFireEMP[5], psf_ShadeNone, 0,0}, + {ID_RailFire1, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFireEMP[6], psf_ShadeNone, 0,0}, + {ID_RailFire1, Rail_ACTION_RATE, &AF(pRailAction), &ps_RailFireEMP[7], psf_ShadeNone, 0,0}, + {ID_RailFire1, 0, &AF(pRailFire), &ps_RailFireEMP[8], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_RailCharge0, Rail_ACTION_RATE, pRailRestTest, &ps_RailFireEMP[9], psf_ShadeNone, 0,0}, - {ID_RailCharge1, Rail_ACTION_RATE, pRailRest, &ps_RailRest[0], psf_ShadeNone, 0,0}, + {ID_RailCharge0, Rail_ACTION_RATE, &AF(pRailRestTest), &ps_RailFireEMP[9], psf_ShadeNone, 0,0}, + {ID_RailCharge1, Rail_ACTION_RATE, &AF(pRailRest), &ps_RailRest[0], psf_ShadeNone, 0,0}, }; PANEL_STATE ps_RetractRail[] = { - {ID_RailPresent0, Rail_BEAT_RATE, pRailRetract, &ps_RetractRail[0], psf_ShadeNone, 0,0} + {ID_RailPresent0, Rail_BEAT_RATE, &AF(pRailRetract), &ps_RetractRail[0], psf_ShadeNone, 0,0} }; #define RAIL_YOFF 200 @@ -3806,108 +3800,108 @@ extern PANEL_STATE ps_HotheadTurn[]; PANEL_STATE ps_PresentHothead[] = { - {ID_HotheadPresent0, Hothead_BEAT_RATE, pHotheadPresent, &ps_PresentHothead[0], 0,0,0} + {ID_HotheadPresent0, Hothead_BEAT_RATE, &AF(pHotheadPresent), &ps_PresentHothead[0], 0,0,0} }; PANEL_STATE ps_HotheadHide[] = { - {ID_HotheadRest0, Hothead_BEAT_RATE, pHotheadHide, &ps_HotheadHide[0], 0,0,0} + {ID_HotheadRest0, Hothead_BEAT_RATE, &AF(pHotheadHide), &ps_HotheadHide[0], 0,0,0} }; PANEL_STATE ps_RetractHothead[] = { - {ID_HotheadPresent0, Hothead_BEAT_RATE, pHotheadRetract, &ps_RetractHothead[0], 0,0,0} + {ID_HotheadPresent0, Hothead_BEAT_RATE, &AF(pHotheadRetract), &ps_RetractHothead[0], 0,0,0} }; PANEL_STATE ps_HotheadRest[] = { - {ID_HotheadRest0, Hothead_BEAT_RATE, pHotheadRest, &ps_HotheadRest[0], 0,0,0} + {ID_HotheadRest0, Hothead_BEAT_RATE, &AF(pHotheadRest), &ps_HotheadRest[0], 0,0,0} }; PANEL_STATE ps_HotheadRestRing[] = { - {ID_HotheadRest0, Hothead_BEAT_RATE, pHotheadRest, &ps_HotheadRest[0], 0,0,0} + {ID_HotheadRest0, Hothead_BEAT_RATE, &AF(pHotheadRest), &ps_HotheadRest[0], 0,0,0} }; PANEL_STATE ps_HotheadRestNapalm[] = { - {ID_HotheadRest0, Hothead_BEAT_RATE, pHotheadRest, &ps_HotheadRest[0], 0,0,0} + {ID_HotheadRest0, Hothead_BEAT_RATE, &AF(pHotheadRest), &ps_HotheadRest[0], 0,0,0} }; // Turns - attacks PANEL_STATE ps_HotheadAttack[] = { - {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, pHotheadAction, &ps_HotheadAttack[1], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 3, pHotheadAction, &ps_HotheadAttack[2], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadAttack, &ps_HotheadAttack[3], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 3, pHotheadAction, &ps_HotheadAttack[4], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadRestTest, &ps_HotheadAttack[4], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 0, pHotheadAction, &ps_HotheadAttack[0], psf_ShadeHalf, 0,0} + {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, &AF(pHotheadAction), &ps_HotheadAttack[1], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 3, &AF(pHotheadAction), &ps_HotheadAttack[2], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadAttack), &ps_HotheadAttack[3], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 3, &AF(pHotheadAction), &ps_HotheadAttack[4], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadRestTest), &ps_HotheadAttack[4], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadAction), &ps_HotheadAttack[0], psf_ShadeHalf, 0,0} }; PANEL_STATE ps_HotheadRing[] = { - {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, pHotheadAction, &ps_HotheadRing[1], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 10, pHotheadAction, &ps_HotheadRing[2], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadAttack, &ps_HotheadRing[3], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 40, pHotheadAction, &ps_HotheadRing[4], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadRestTest, &ps_HotheadRing[4], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 3, pHotheadAction, &ps_HotheadRing[0], psf_ShadeHalf, 0,0} + {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, &AF(pHotheadAction), &ps_HotheadRing[1], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 10, &AF(pHotheadAction), &ps_HotheadRing[2], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadAttack), &ps_HotheadRing[3], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 40, &AF(pHotheadAction), &ps_HotheadRing[4], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadRestTest), &ps_HotheadRing[4], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 3, &AF(pHotheadAction), &ps_HotheadRing[0], psf_ShadeHalf, 0,0} }; PANEL_STATE ps_HotheadNapalm[] = { - {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, pHotheadAction, &ps_HotheadNapalm[1], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 3, pHotheadAction, &ps_HotheadNapalm[2], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadAttack, &ps_HotheadNapalm[3], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 50, pHotheadAction, &ps_HotheadNapalm[4], psf_ShadeHalf, 0,0}, - {ID_HotheadAttack0, 0, pHotheadRestTest, &ps_HotheadNapalm[4], psf_QuickCall, 0,0}, - {ID_HotheadAttack0, 3, pHotheadAction, &ps_HotheadNapalm[0], psf_ShadeHalf, 0,0} + {ID_HotheadAttack0, Hothead_ACTION_RATE_PRE, &AF(pHotheadAction), &ps_HotheadNapalm[1], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 3, &AF(pHotheadAction), &ps_HotheadNapalm[2], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadAttack), &ps_HotheadNapalm[3], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 50, &AF(pHotheadAction), &ps_HotheadNapalm[4], psf_ShadeHalf, 0,0}, + {ID_HotheadAttack0, 0, &AF(pHotheadRestTest), &ps_HotheadNapalm[4], psf_QuickCall, 0,0}, + {ID_HotheadAttack0, 3, &AF(pHotheadAction), &ps_HotheadNapalm[0], psf_ShadeHalf, 0,0} }; // Turns - can do three different turns PANEL_STATE ps_HotheadTurn[] = { - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[1], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[2], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[3], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[4], 0,0,0}, - {ID_HotheadChomp0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[5], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[6], 0,0,0}, - {ID_HotheadChomp0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[7], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[8], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[9], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[10], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurn[11], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadRest[0], 0,0,0} + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[1], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[2], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[3], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[4], 0,0,0}, + {ID_HotheadChomp0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[5], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[6], 0,0,0}, + {ID_HotheadChomp0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[7], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[8], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[9], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[10], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurn[11], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadRest[0], 0,0,0} }; PANEL_STATE ps_HotheadTurnRing[] = { - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[1], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[2], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[3], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[4], 0,0,0}, - {ID_HotheadChomp0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[5], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[6], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[7], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[8], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnRing[9], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadRestRing[0], 0,0,0} + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[1], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[2], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[3], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[4], 0,0,0}, + {ID_HotheadChomp0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[5], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[6], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[7], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[8], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnRing[9], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadRestRing[0], 0,0,0} }; PANEL_STATE ps_HotheadTurnNapalm[] = { - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[1], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[2], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[3], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[4], 0,0,0}, - {ID_HotheadTurn3, Hothead_BEAT_RATE*2, pNullAnimator, &ps_HotheadTurnNapalm[5], 0,0,0}, - {ID_HotheadTurn2, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[6], 0,0,0}, - {ID_HotheadTurn1, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[7], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadTurnNapalm[8], 0,0,0}, - {ID_HotheadTurn0, Hothead_BEAT_RATE, pNullAnimator, &ps_HotheadRestNapalm[0], 0,0,0} + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[1], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[2], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[3], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[4], 0,0,0}, + {ID_HotheadTurn3, Hothead_BEAT_RATE*2, nullptr, &ps_HotheadTurnNapalm[5], 0,0,0}, + {ID_HotheadTurn2, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[6], 0,0,0}, + {ID_HotheadTurn1, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[7], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadTurnNapalm[8], 0,0,0}, + {ID_HotheadTurn0, Hothead_BEAT_RATE, nullptr, &ps_HotheadRestNapalm[0], 0,0,0} }; @@ -4248,19 +4242,19 @@ void pOnFire(DPanelSprite*); PANEL_STATE ps_OnFire[] = { - {ID_OnFire0, ON_FIRE_RATE, pOnFire, &ps_OnFire[1], 0,0,0}, - {ID_OnFire1, ON_FIRE_RATE, pOnFire, &ps_OnFire[2], 0,0,0}, - {ID_OnFire2, ON_FIRE_RATE, pOnFire, &ps_OnFire[3], 0,0,0}, - {ID_OnFire3, ON_FIRE_RATE, pOnFire, &ps_OnFire[4], 0,0,0}, - {ID_OnFire4, ON_FIRE_RATE, pOnFire, &ps_OnFire[5], 0,0,0}, - {ID_OnFire5, ON_FIRE_RATE, pOnFire, &ps_OnFire[6], 0,0,0}, - {ID_OnFire6, ON_FIRE_RATE, pOnFire, &ps_OnFire[7], 0,0,0}, - {ID_OnFire7, ON_FIRE_RATE, pOnFire, &ps_OnFire[8], 0,0,0}, - {ID_OnFire8, ON_FIRE_RATE, pOnFire, &ps_OnFire[9], 0,0,0}, - {ID_OnFire9, ON_FIRE_RATE, pOnFire, &ps_OnFire[10], 0,0,0}, - {ID_OnFire10, ON_FIRE_RATE, pOnFire, &ps_OnFire[11], 0,0,0}, - {ID_OnFire11, ON_FIRE_RATE, pOnFire, &ps_OnFire[12], 0,0,0}, - {ID_OnFire12, ON_FIRE_RATE, pOnFire, &ps_OnFire[0], 0,0,0}, + {ID_OnFire0, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[1], 0,0,0}, + {ID_OnFire1, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[2], 0,0,0}, + {ID_OnFire2, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[3], 0,0,0}, + {ID_OnFire3, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[4], 0,0,0}, + {ID_OnFire4, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[5], 0,0,0}, + {ID_OnFire5, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[6], 0,0,0}, + {ID_OnFire6, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[7], 0,0,0}, + {ID_OnFire7, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[8], 0,0,0}, + {ID_OnFire8, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[9], 0,0,0}, + {ID_OnFire9, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[10], 0,0,0}, + {ID_OnFire10, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[11], 0,0,0}, + {ID_OnFire11, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[12], 0,0,0}, + {ID_OnFire12, ON_FIRE_RATE, &AF(pOnFire), &ps_OnFire[0], 0,0,0}, }; #define ON_FIRE_Y_TOP 190 @@ -4354,57 +4348,57 @@ extern PANEL_STATE ps_MicroReload[]; PANEL_STATE ps_PresentMicro[] = { - {ID_MicroPresent0, Micro_REST_RATE, pMicroPresent, &ps_PresentMicro[0], 0,0,0} + {ID_MicroPresent0, Micro_REST_RATE, &AF(pMicroPresent), &ps_PresentMicro[0], 0,0,0} }; PANEL_STATE ps_MicroRest[] = { - {ID_MicroPresent0, Micro_REST_RATE, pMicroRest, &ps_MicroRest[0], 0,0,0} + {ID_MicroPresent0, Micro_REST_RATE, &AF(pMicroRest), &ps_MicroRest[0], 0,0,0} }; PANEL_STATE ps_MicroHide[] = { - {ID_MicroPresent0, Micro_REST_RATE, pMicroHide, &ps_MicroHide[0], 0,0,0} + {ID_MicroPresent0, Micro_REST_RATE, &AF(pMicroHide), &ps_MicroHide[0], 0,0,0} }; PANEL_STATE ps_InitNuke[] = { - {ID_MicroPresent0, Micro_ACTION_RATE,pNukeAction, &ps_InitNuke[1], 0,0,0}, - {ID_MicroPresent0, 0, pMicroStandBy, &ps_InitNuke[2], psf_QuickCall, 0,0}, - {ID_MicroPresent0, 120*2, pNukeAction, &ps_InitNuke[3], 0,0,0}, - {ID_MicroPresent0, 0, pMicroCount, &ps_InitNuke[4], psf_QuickCall, 0,0}, - {ID_MicroPresent0, 120*3, pNukeAction, &ps_InitNuke[5], 0,0,0}, - {ID_MicroPresent0, 0, pMicroReady, &ps_InitNuke[6], psf_QuickCall, 0,0}, - {ID_MicroPresent0, 120*2, pNukeAction, &ps_InitNuke[7], 0,0,0}, - {ID_MicroPresent0, 3, pNukeAction, &ps_MicroRest[0], 0,0,0} + {ID_MicroPresent0, Micro_ACTION_RATE,&AF(pNukeAction), &ps_InitNuke[1], 0,0,0}, + {ID_MicroPresent0, 0, &AF(pMicroStandBy), &ps_InitNuke[2], psf_QuickCall, 0,0}, + {ID_MicroPresent0, 120*2, &AF(pNukeAction), &ps_InitNuke[3], 0,0,0}, + {ID_MicroPresent0, 0, &AF(pMicroCount), &ps_InitNuke[4], psf_QuickCall, 0,0}, + {ID_MicroPresent0, 120*3, &AF(pNukeAction), &ps_InitNuke[5], 0,0,0}, + {ID_MicroPresent0, 0, &AF(pMicroReady), &ps_InitNuke[6], psf_QuickCall, 0,0}, + {ID_MicroPresent0, 120*2, &AF(pNukeAction), &ps_InitNuke[7], 0,0,0}, + {ID_MicroPresent0, 3, &AF(pNukeAction), &ps_MicroRest[0], 0,0,0} }; PANEL_STATE ps_MicroRecoil[] = { // recoil - {ID_MicroPresent0, Micro_ACTION_RATE, pMicroRecoilDown, &ps_MicroRecoil[0], 0,0,0}, - {ID_MicroPresent0, Micro_ACTION_RATE, pMicroRecoilUp, &ps_MicroRecoil[1], 0,0,0}, + {ID_MicroPresent0, Micro_ACTION_RATE, &AF(pMicroRecoilDown), &ps_MicroRecoil[0], 0,0,0}, + {ID_MicroPresent0, Micro_ACTION_RATE, &AF(pMicroRecoilUp), &ps_MicroRecoil[1], 0,0,0}, // Firing delay. - {ID_MicroPresent0, 30, pNullAnimator, &ps_MicroRecoil[3], 0,0,0}, + {ID_MicroPresent0, 30, nullptr, &ps_MicroRecoil[3], 0,0,0}, // ready to fire again - {ID_MicroPresent0, 3, pNullAnimator, &ps_MicroRest[0], 0,0,0} + {ID_MicroPresent0, 3, nullptr, &ps_MicroRest[0], 0,0,0} }; PANEL_STATE ps_MicroFire[] = { - {ID_MicroFire0, Micro_ACTION_RATE, pMicroAction, &ps_MicroFire[1], psf_ShadeNone, 0,0}, - {ID_MicroFire1, Micro_ACTION_RATE, pMicroAction, &ps_MicroFire[2], psf_ShadeNone, 0,0}, - {ID_MicroFire2, Micro_ACTION_RATE, pMicroAction, &ps_MicroFire[3], psf_ShadeHalf, 0,0}, - {ID_MicroFire3, Micro_ACTION_RATE, pMicroAction, &ps_MicroFire[4], psf_ShadeHalf, 0,0}, - {ID_MicroPresent0, 0, pMicroFire, &ps_MicroFire[5], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_MicroFire0, Micro_ACTION_RATE, &AF(pMicroAction), &ps_MicroFire[1], psf_ShadeNone, 0,0}, + {ID_MicroFire1, Micro_ACTION_RATE, &AF(pMicroAction), &ps_MicroFire[2], psf_ShadeNone, 0,0}, + {ID_MicroFire2, Micro_ACTION_RATE, &AF(pMicroAction), &ps_MicroFire[3], psf_ShadeHalf, 0,0}, + {ID_MicroFire3, Micro_ACTION_RATE, &AF(pMicroAction), &ps_MicroFire[4], psf_ShadeHalf, 0,0}, + {ID_MicroPresent0, 0, &AF(pMicroFire), &ps_MicroFire[5], psf_ShadeNone|psf_QuickCall, 0,0}, // !JIM! After firing delay so rockets can't fire so fast! // Putting a BIG blast radius for rockets, this is better than small and fast for this weap. - {ID_MicroPresent0, 120, pMicroAction, &ps_MicroFire[6], 0,0,0}, + {ID_MicroPresent0, 120, &AF(pMicroAction), &ps_MicroFire[6], 0,0,0}, - {ID_MicroPresent0, 3, pMicroAction, &ps_MicroRecoil[0], 0,0,0} + {ID_MicroPresent0, 3, &AF(pMicroAction), &ps_MicroRecoil[0], 0,0,0} }; #define Micro_SINGLE_RATE 8 @@ -4412,21 +4406,21 @@ PANEL_STATE ps_MicroFire[] = PANEL_STATE ps_MicroSingleFire[] = { - {ID_MicroSingleFire0, Micro_SINGLE_RATE, pMicroAction, &ps_MicroSingleFire[1], psf_ShadeHalf, 0,0}, - {ID_MicroSingleFire1, Micro_SINGLE_RATE, pMicroAction, &ps_MicroSingleFire[2], psf_ShadeNone, 0,0}, - {ID_MicroSingleFire1, 0, pMicroFire, &ps_MicroSingleFire[3], psf_ShadeNone|psf_QuickCall, 0,0}, - {ID_MicroSingleFire2, Micro_DISSIPATE_RATE, pMicroAction, &ps_MicroSingleFire[4], psf_ShadeNone, 0,0}, - {ID_MicroSingleFire3, Micro_DISSIPATE_RATE, pMicroAction, &ps_MicroSingleFire[5], psf_ShadeHalf, 0,0}, + {ID_MicroSingleFire0, Micro_SINGLE_RATE, &AF(pMicroAction), &ps_MicroSingleFire[1], psf_ShadeHalf, 0,0}, + {ID_MicroSingleFire1, Micro_SINGLE_RATE, &AF(pMicroAction), &ps_MicroSingleFire[2], psf_ShadeNone, 0,0}, + {ID_MicroSingleFire1, 0, &AF(pMicroFire), &ps_MicroSingleFire[3], psf_ShadeNone|psf_QuickCall, 0,0}, + {ID_MicroSingleFire2, Micro_DISSIPATE_RATE, &AF(pMicroAction), &ps_MicroSingleFire[4], psf_ShadeNone, 0,0}, + {ID_MicroSingleFire3, Micro_DISSIPATE_RATE, &AF(pMicroAction), &ps_MicroSingleFire[5], psf_ShadeHalf, 0,0}, // !JIM! Put in firing delay. - //{ID_MicroPresent0, 60, pMicroAction, &ps_MicroSingleFire[6]}, + //{ID_MicroPresent0, 60, &AF(pMicroAction), &ps_MicroSingleFire[6]}, - {ID_MicroPresent0, 3, pMicroAction, &ps_MicroRecoil[0], 0,0,0} + {ID_MicroPresent0, 3, &AF(pMicroAction), &ps_MicroRecoil[0], 0,0,0} }; PANEL_STATE ps_RetractMicro[] = { - {ID_MicroPresent0, Micro_REST_RATE, pMicroRetract, &ps_RetractMicro[0], 0,0,0} + {ID_MicroPresent0, Micro_REST_RATE, &AF(pMicroRetract), &ps_RetractMicro[0], 0,0,0} }; //--------------------------------------------------------------------------- @@ -4949,44 +4943,44 @@ extern PANEL_STATE ps_ReloadHeart[]; PANEL_STATE ps_PresentHeart[] = { - {ID_HeartPresent0, Heart_BEAT_RATE, pHeartPresent, &ps_PresentHeart[1], 0,0,0}, - {ID_HeartPresent1, Heart_BEAT_RATE, pHeartPresent, &ps_PresentHeart[0], 0,0,0} + {ID_HeartPresent0, Heart_BEAT_RATE, &AF(pHeartPresent), &ps_PresentHeart[1], 0,0,0}, + {ID_HeartPresent1, Heart_BEAT_RATE, &AF(pHeartPresent), &ps_PresentHeart[0], 0,0,0} }; PANEL_STATE ps_HeartRest[] = { - {ID_HeartPresent0, Heart_BEAT_RATE, pHeartRest, &ps_HeartRest[1], 0,0,0}, - {ID_HeartPresent1, Heart_BEAT_RATE, pHeartRest, &ps_HeartRest[2], 0,0,0}, - {ID_HeartPresent1, Heart_BEAT_RATE, SpawnSmallHeartBlood, &ps_HeartRest[3], psf_QuickCall, 0,0}, - {ID_HeartPresent1, 0, pHeartRest, &ps_HeartRest[0], 0,0,0}, + {ID_HeartPresent0, Heart_BEAT_RATE, &AF(pHeartRest), &ps_HeartRest[1], 0,0,0}, + {ID_HeartPresent1, Heart_BEAT_RATE, &AF(pHeartRest), &ps_HeartRest[2], 0,0,0}, + {ID_HeartPresent1, Heart_BEAT_RATE, &AF(SpawnSmallHeartBlood), &ps_HeartRest[3], psf_QuickCall, 0,0}, + {ID_HeartPresent1, 0, &AF(pHeartRest), &ps_HeartRest[0], 0,0,0}, }; PANEL_STATE ps_HeartHide[] = { - {ID_HeartPresent0, Heart_BEAT_RATE, pHeartHide, &ps_HeartHide[1], 0,0,0}, - {ID_HeartPresent1, Heart_BEAT_RATE, pHeartHide, &ps_HeartHide[0], 0,0,0} + {ID_HeartPresent0, Heart_BEAT_RATE, &AF(pHeartHide), &ps_HeartHide[1], 0,0,0}, + {ID_HeartPresent1, Heart_BEAT_RATE, &AF(pHeartHide), &ps_HeartHide[0], 0,0,0} }; PANEL_STATE ps_HeartAttack[] = { // squeeze - {ID_HeartAttack0, Heart_ACTION_RATE, pHeartActionBlood, &ps_HeartAttack[1], psf_ShadeHalf, 0,0}, - {ID_HeartAttack1, Heart_ACTION_RATE, pHeartActionBlood, &ps_HeartAttack[2], psf_ShadeNone, 0,0}, - {ID_HeartAttack1, Heart_ACTION_RATE, pHeartActionBlood, &ps_HeartAttack[3], psf_ShadeNone, 0,0}, + {ID_HeartAttack0, Heart_ACTION_RATE, &AF(pHeartActionBlood), &ps_HeartAttack[1], psf_ShadeHalf, 0,0}, + {ID_HeartAttack1, Heart_ACTION_RATE, &AF(pHeartActionBlood), &ps_HeartAttack[2], psf_ShadeNone, 0,0}, + {ID_HeartAttack1, Heart_ACTION_RATE, &AF(pHeartActionBlood), &ps_HeartAttack[3], psf_ShadeNone, 0,0}, // attack - {ID_HeartAttack1, Heart_ACTION_RATE, pHeartAttack, &ps_HeartAttack[4], psf_QuickCall, 0,0}, + {ID_HeartAttack1, Heart_ACTION_RATE, &AF(pHeartAttack) , &ps_HeartAttack[4], psf_QuickCall, 0,0}, // unsqueeze - {ID_HeartAttack1, Heart_ACTION_RATE, pHeartAction, &ps_HeartAttack[5], psf_ShadeNone, 0,0}, - {ID_HeartAttack1, Heart_ACTION_RATE, pHeartAction, &ps_HeartAttack[6], psf_ShadeNone, 0,0}, - {ID_HeartAttack0, Heart_ACTION_RATE, pHeartAction, &ps_HeartAttack[7], psf_ShadeHalf, 0,0}, + {ID_HeartAttack1, Heart_ACTION_RATE, &AF(pHeartAction), &ps_HeartAttack[5], psf_ShadeNone, 0,0}, + {ID_HeartAttack1, Heart_ACTION_RATE, &AF(pHeartAction), &ps_HeartAttack[6], psf_ShadeNone, 0,0}, + {ID_HeartAttack0, Heart_ACTION_RATE, &AF(pHeartAction), &ps_HeartAttack[7], psf_ShadeHalf, 0,0}, - {ID_HeartAttack0, Heart_ACTION_RATE, pHeartAction, &ps_HeartRest[0], psf_ShadeHalf, 0,0}, + {ID_HeartAttack0, Heart_ACTION_RATE, &AF(pHeartAction), &ps_HeartRest[0], psf_ShadeHalf, 0,0}, }; PANEL_STATE ps_RetractHeart[] = { - {ID_HeartPresent0, Heart_BEAT_RATE, pHeartRetract, &ps_RetractHeart[1], 0,0,0}, - {ID_HeartPresent1, Heart_BEAT_RATE, pHeartRetract, &ps_RetractHeart[0], 0,0,0} + {ID_HeartPresent0, Heart_BEAT_RATE, &AF(pHeartRetract), &ps_RetractHeart[1], 0,0,0}, + {ID_HeartPresent1, Heart_BEAT_RATE, &AF(pHeartRetract), &ps_RetractHeart[0], 0,0,0} }; #define HEART_YOFF 212 @@ -5240,26 +5234,26 @@ void pHeartBlood(DPanelSprite*); PANEL_STATE ps_HeartBlood[] = { - {ID_HeartBlood0, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[1], 0,0,0}, - {ID_HeartBlood1, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[2], 0,0,0}, - {ID_HeartBlood2, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[3], 0,0,0}, - {ID_HeartBlood3, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[4], 0,0,0}, - {ID_HeartBlood4, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[5], 0,0,0}, - {ID_HeartBlood5, HEART_BLOOD_RATE, pHeartBlood, &ps_HeartBlood[6], 0,0,0}, - {ID_HeartBlood5, HEART_BLOOD_RATE, pSuicide, &ps_HeartBlood[6], 0,0,0}, + {ID_HeartBlood0, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[1], 0,0,0}, + {ID_HeartBlood1, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[2], 0,0,0}, + {ID_HeartBlood2, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[3], 0,0,0}, + {ID_HeartBlood3, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[4], 0,0,0}, + {ID_HeartBlood4, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[5], 0,0,0}, + {ID_HeartBlood5, HEART_BLOOD_RATE, &AF(pHeartBlood), &ps_HeartBlood[6], 0,0,0}, + {ID_HeartBlood5, HEART_BLOOD_RATE, &AF(pSuicide), &ps_HeartBlood[6], 0,0,0}, }; #define HEART_BLOOD_SMALL_RATE 7 PANEL_STATE ps_HeartBloodSmall[] = { - {ID_HeartBlood0, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[1], 0,0,0}, - {ID_HeartBlood1, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[2], 0,0,0}, - {ID_HeartBlood2, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[3], 0,0,0}, - {ID_HeartBlood3, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[4], 0,0,0}, - {ID_HeartBlood4, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[5], 0,0,0}, - {ID_HeartBlood5, HEART_BLOOD_SMALL_RATE, pHeartBlood, &ps_HeartBlood[6], 0,0,0}, - {ID_HeartBlood5, HEART_BLOOD_SMALL_RATE, pSuicide, &ps_HeartBlood[6], 0,0,0}, + {ID_HeartBlood0, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[1], 0,0,0}, + {ID_HeartBlood1, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[2], 0,0,0}, + {ID_HeartBlood2, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[3], 0,0,0}, + {ID_HeartBlood3, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[4], 0,0,0}, + {ID_HeartBlood4, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[5], 0,0,0}, + {ID_HeartBlood5, HEART_BLOOD_SMALL_RATE, &AF(pHeartBlood), &ps_HeartBlood[6], 0,0,0}, + {ID_HeartBlood5, HEART_BLOOD_SMALL_RATE, &AF(pSuicide), &ps_HeartBlood[6], 0,0,0}, }; //--------------------------------------------------------------------------- @@ -5482,44 +5476,44 @@ extern PANEL_STATE ps_GrenadeRecoil[]; PANEL_STATE ps_PresentGrenade[] = { - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadePresent, &ps_PresentGrenade[0], 0,0,0} + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadePresent), &ps_PresentGrenade[0], 0,0,0} }; PANEL_STATE ps_GrenadeRest[] = { - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadeRest, &ps_GrenadeRest[0], 0,0,0} + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadeRest), &ps_GrenadeRest[0], 0,0,0} }; PANEL_STATE ps_GrenadeHide[] = { - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadeHide, &ps_GrenadeHide[0], 0,0,0} + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadeHide), &ps_GrenadeHide[0], 0,0,0} }; PANEL_STATE ps_GrenadeFire[] = { - {ID_GrenadeFire0, Grenade_ACTION_RATE, pGrenadeAction, &ps_GrenadeFire[1], psf_ShadeHalf, 0,0}, - {ID_GrenadeFire1, Grenade_ACTION_RATE, pGrenadeAction, &ps_GrenadeFire[2], psf_ShadeNone, 0,0}, - {ID_GrenadeFire2, Grenade_ACTION_RATE, pGrenadeAction, &ps_GrenadeFire[3], psf_ShadeNone, 0,0}, + {ID_GrenadeFire0, Grenade_ACTION_RATE, &AF(pGrenadeAction), &ps_GrenadeFire[1], psf_ShadeHalf, 0,0}, + {ID_GrenadeFire1, Grenade_ACTION_RATE, &AF(pGrenadeAction), &ps_GrenadeFire[2], psf_ShadeNone, 0,0}, + {ID_GrenadeFire2, Grenade_ACTION_RATE, &AF(pGrenadeAction), &ps_GrenadeFire[3], psf_ShadeNone, 0,0}, - {ID_GrenadePresent0, 0, pGrenadeFire, &ps_GrenadeFire[4], psf_QuickCall, 0,0}, - {ID_GrenadePresent0, 3, pGrenadeAction, &ps_GrenadeRecoil[0], 0,0,0} + {ID_GrenadePresent0, 0, &AF(pGrenadeFire), &ps_GrenadeFire[4], psf_QuickCall, 0,0}, + {ID_GrenadePresent0, 3, &AF(pGrenadeAction), &ps_GrenadeRecoil[0], 0,0,0} }; PANEL_STATE ps_GrenadeRecoil[] = { // recoil - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadeRecoilDown, &ps_GrenadeRecoil[0], 0,0,0}, - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadeRecoilUp, &ps_GrenadeRecoil[1], 0,0,0}, + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadeRecoilDown), &ps_GrenadeRecoil[0], 0,0,0}, + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadeRecoilUp), &ps_GrenadeRecoil[1], 0,0,0}, // reload - {ID_GrenadeReload0, Grenade_REST_RATE/2, pNullAnimator, &ps_GrenadeRecoil[3], 0,0,0}, - {ID_GrenadeReload1, Grenade_REST_RATE/2, pNullAnimator, &ps_GrenadeRecoil[4], 0,0,0}, + {ID_GrenadeReload0, Grenade_REST_RATE/2, nullptr, &ps_GrenadeRecoil[3], 0,0,0}, + {ID_GrenadeReload1, Grenade_REST_RATE/2, nullptr, &ps_GrenadeRecoil[4], 0,0,0}, // ready to fire again - {ID_GrenadePresent0, 3, pNullAnimator, &ps_GrenadeRest[0], 0,0,0} + {ID_GrenadePresent0, 3, nullptr, &ps_GrenadeRest[0], 0,0,0} }; PANEL_STATE ps_RetractGrenade[] = { - {ID_GrenadePresent0, Grenade_REST_RATE, pGrenadeRetract, &ps_RetractGrenade[0], 0,0,0} + {ID_GrenadePresent0, Grenade_REST_RATE, &AF(pGrenadeRetract), &ps_RetractGrenade[0], 0,0,0} }; //--------------------------------------------------------------------------- @@ -5816,35 +5810,35 @@ void pMineUpSound(DPanelSprite* psp); PANEL_STATE ps_PresentMine[] = { - {ID_MinePresent0, Mine_REST_RATE, pMinePresent, &ps_PresentMine[0], 0,0,0} + {ID_MinePresent0, Mine_REST_RATE, &AF(pMinePresent), &ps_PresentMine[0], 0,0,0} }; PANEL_STATE ps_MineRest[] = { - {ID_MinePresent0, 36, pMineRest, &ps_MineRest[1], 0,0,0}, - {ID_MinePresent0, 0, pMineUpSound, &ps_MineRest[2], psf_QuickCall, 0,0}, - {ID_MinePresent1, Mine_REST_RATE, pMineRest, &ps_MineRest[2], 0,0,0}, + {ID_MinePresent0, 36, &AF(pMineRest), &ps_MineRest[1], 0,0,0}, + {ID_MinePresent0, 0, &AF(pMineUpSound), &ps_MineRest[2], psf_QuickCall, 0,0}, + {ID_MinePresent1, Mine_REST_RATE, &AF(pMineRest), &ps_MineRest[2], 0,0,0}, }; PANEL_STATE ps_MineHide[] = { - {ID_MinePresent0, Mine_REST_RATE, pMineHide, &ps_MineHide[0], 0,0,0} + {ID_MinePresent0, Mine_REST_RATE, &AF(pMineHide), &ps_MineHide[0], 0,0,0} }; PANEL_STATE ps_MineThrow[] = { - {ID_MineThrow0, 3, pNullAnimator, &ps_MineThrow[1], 0,0,0}, - {ID_MineThrow0, Mine_ACTION_RATE, pMineThrow, &ps_MineThrow[2],psf_QuickCall, 0,0}, - {ID_MineThrow0, Mine_ACTION_RATE, pMineLower, &ps_MineThrow[2], 0,0,0}, - {ID_MineThrow0, Mine_ACTION_RATE*5, pNullAnimator, &ps_MineThrow[4], 0,0,0}, - {ID_MinePresent0, Mine_ACTION_RATE, pMineRaise, &ps_MineThrow[4], 0,0,0}, - {ID_MinePresent0, Mine_ACTION_RATE, pNullAnimator, &ps_MineThrow[6], 0,0,0}, - {ID_MinePresent0, 3, pMineAction, &ps_MineRest[0], 0,0,0} + {ID_MineThrow0, 3, nullptr, &ps_MineThrow[1], 0,0,0}, + {ID_MineThrow0, Mine_ACTION_RATE, &AF(pMineThrow), &ps_MineThrow[2],psf_QuickCall, 0,0}, + {ID_MineThrow0, Mine_ACTION_RATE, &AF(pMineLower), &ps_MineThrow[2], 0,0,0}, + {ID_MineThrow0, Mine_ACTION_RATE*5, nullptr, &ps_MineThrow[4], 0,0,0}, + {ID_MinePresent0, Mine_ACTION_RATE, &AF(pMineRaise), &ps_MineThrow[4], 0,0,0}, + {ID_MinePresent0, Mine_ACTION_RATE, nullptr, &ps_MineThrow[6], 0,0,0}, + {ID_MinePresent0, 3, &AF(pMineAction), &ps_MineRest[0], 0,0,0} }; PANEL_STATE ps_RetractMine[] = { - {ID_MinePresent0, Mine_REST_RATE, pMineRetract, &ps_RetractMine[0], 0,0,0} + {ID_MinePresent0, Mine_REST_RATE, &AF(pMineRetract), &ps_RetractMine[0], 0,0,0} }; //--------------------------------------------------------------------------- @@ -6115,70 +6109,70 @@ void pChopsRetract(DPanelSprite* psp); PANEL_STATE ps_ChopsAttack1[] = { - {ID_ChopsRest, Chops_REST_RATE*3, pNullAnimator, &ps_ChopsAttack1[1], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE, pChopsUp, &ps_ChopsAttack1[1], 0,0,0}, - {ID_ChopsOpen, Chops_REST_RATE/3, pNullAnimator, &ps_ChopsAttack1[3], 0,0,0}, - {ID_ChopsClose, 0, pChopsClick, &ps_ChopsAttack1[4], psf_QuickCall, 0,0}, - {ID_ChopsClose, Chops_REST_RATE/3, pNullAnimator, &ps_ChopsAttack1[5], 0,0,0}, - {ID_ChopsClose, Chops_REST_RATE, pChopsDown, &ps_ChopsAttack1[5], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE*3, nullptr, &ps_ChopsAttack1[1], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, &AF(pChopsUp), &ps_ChopsAttack1[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE/3, nullptr, &ps_ChopsAttack1[3], 0,0,0}, + {ID_ChopsClose, 0, &AF(pChopsClick), &ps_ChopsAttack1[4], psf_QuickCall, 0,0}, + {ID_ChopsClose, Chops_REST_RATE/3, nullptr, &ps_ChopsAttack1[5], 0,0,0}, + {ID_ChopsClose, Chops_REST_RATE, &AF(pChopsDown), &ps_ChopsAttack1[5], 0,0,0}, }; PANEL_STATE ps_ChopsAttack2[] = { - {ID_ChopsOpen, Chops_REST_RATE*3, pNullAnimator, &ps_ChopsAttack2[1], 0,0,0}, - {ID_ChopsOpen, Chops_REST_RATE, pChopsUp, &ps_ChopsAttack2[1], 0,0,0}, - {ID_ChopsOpen, 0, pChopsClick, &ps_ChopsAttack2[3], psf_QuickCall, 0,0}, - {ID_ChopsOpen, 8, pNullAnimator, &ps_ChopsAttack2[4], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE, pNullAnimator, &ps_ChopsAttack2[5], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE, pChopsDown, &ps_ChopsAttack2[5], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE*3, nullptr, &ps_ChopsAttack2[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE, &AF(pChopsUp), &ps_ChopsAttack2[1], 0,0,0}, + {ID_ChopsOpen, 0, &AF(pChopsClick), &ps_ChopsAttack2[3], psf_QuickCall, 0,0}, + {ID_ChopsOpen, 8, nullptr, &ps_ChopsAttack2[4], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, nullptr, &ps_ChopsAttack2[5], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, &AF(pChopsDown), &ps_ChopsAttack2[5], 0,0,0}, }; PANEL_STATE ps_ChopsAttack3[] = { - {ID_ChopsOpen, Chops_REST_RATE*3, pNullAnimator, &ps_ChopsAttack3[1], 0,0,0}, - {ID_ChopsOpen, Chops_REST_RATE, pChopsUp, &ps_ChopsAttack3[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE*3, nullptr, &ps_ChopsAttack3[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE, &AF(pChopsUp), &ps_ChopsAttack3[1], 0,0,0}, - {ID_ChopsRest, 0, pNullAnimator, &ps_ChopsAttack3[3], 0,0,0}, - {ID_ChopsRest, 0, pChopsClick, &ps_ChopsAttack3[4], psf_QuickCall, 0,0}, + {ID_ChopsRest, 0, nullptr, &ps_ChopsAttack3[3], 0,0,0}, + {ID_ChopsRest, 0, &AF(pChopsClick), &ps_ChopsAttack3[4], psf_QuickCall, 0,0}, - {ID_ChopsRest, Chops_REST_RATE, pNullAnimator, &ps_ChopsAttack3[5], 0,0,0}, - {ID_ChopsRest, 24, pNullAnimator, &ps_ChopsAttack3[6], 0,0,0}, - {ID_ChopsOpen, 16, pNullAnimator, &ps_ChopsAttack3[7], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, nullptr, &ps_ChopsAttack3[5], 0,0,0}, + {ID_ChopsRest, 24, nullptr, &ps_ChopsAttack3[6], 0,0,0}, + {ID_ChopsOpen, 16, nullptr, &ps_ChopsAttack3[7], 0,0,0}, - {ID_ChopsRest, 0, pChopsClick, &ps_ChopsAttack3[8], psf_QuickCall, 0,0}, - {ID_ChopsRest, 16, pNullAnimator, &ps_ChopsAttack3[9], 0,0,0}, - {ID_ChopsOpen, 16, pNullAnimator, &ps_ChopsAttack3[10], 0,0,0}, + {ID_ChopsRest, 0, &AF(pChopsClick), &ps_ChopsAttack3[8], psf_QuickCall, 0,0}, + {ID_ChopsRest, 16, nullptr, &ps_ChopsAttack3[9], 0,0,0}, + {ID_ChopsOpen, 16, nullptr, &ps_ChopsAttack3[10], 0,0,0}, - {ID_ChopsOpen, 8, pChopsDownSlow, &ps_ChopsAttack3[11], 0,0,0}, - {ID_ChopsRest, 10, pChopsDownSlow, &ps_ChopsAttack3[12], 0,0,0}, - {ID_ChopsRest, 0, pChopsClick, &ps_ChopsAttack3[13], psf_QuickCall, 0,0}, - {ID_ChopsRest, 10, pChopsDownSlow, &ps_ChopsAttack3[14], 0,0,0}, - {ID_ChopsOpen, 10, pChopsDownSlow, &ps_ChopsAttack3[11], 0,0,0}, + {ID_ChopsOpen, 8, &AF(pChopsDownSlow), &ps_ChopsAttack3[11], 0,0,0}, + {ID_ChopsRest, 10, &AF(pChopsDownSlow), &ps_ChopsAttack3[12], 0,0,0}, + {ID_ChopsRest, 0, &AF(pChopsClick), &ps_ChopsAttack3[13], psf_QuickCall, 0,0}, + {ID_ChopsRest, 10, &AF(pChopsDownSlow), &ps_ChopsAttack3[14], 0,0,0}, + {ID_ChopsOpen, 10, &AF(pChopsDownSlow), &ps_ChopsAttack3[11], 0,0,0}, }; PANEL_STATE ps_ChopsAttack4[] = { - {ID_ChopsOpen, Chops_REST_RATE*3, pNullAnimator, &ps_ChopsAttack4[1], 0,0,0}, - {ID_ChopsOpen, Chops_REST_RATE, pChopsUp, &ps_ChopsAttack4[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE*3, nullptr, &ps_ChopsAttack4[1], 0,0,0}, + {ID_ChopsOpen, Chops_REST_RATE, &AF(pChopsUp), &ps_ChopsAttack4[1], 0,0,0}, - {ID_ChopsOpen, 0, pChopsClick, &ps_ChopsAttack4[3], psf_QuickCall, 0,0}, - {ID_ChopsOpen, 8, pNullAnimator, &ps_ChopsAttack4[4], 0,0,0}, + {ID_ChopsOpen, 0, &AF(pChopsClick), &ps_ChopsAttack4[3], psf_QuickCall, 0,0}, + {ID_ChopsOpen, 8, nullptr, &ps_ChopsAttack4[4], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE, pNullAnimator, &ps_ChopsAttack4[5], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE*4, pChopsShake, &ps_ChopsAttack4[6], 0,0,0}, - {ID_ChopsRest, Chops_REST_RATE, pChopsDown, &ps_ChopsAttack4[6], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, nullptr, &ps_ChopsAttack4[5], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE*4, &AF(pChopsShake), &ps_ChopsAttack4[6], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, &AF(pChopsDown), &ps_ChopsAttack4[6], 0,0,0}, }; PANEL_STATE* psp_ChopsAttack[] = {ps_ChopsAttack1, ps_ChopsAttack2, ps_ChopsAttack3, ps_ChopsAttack4}; PANEL_STATE ps_ChopsWait[] = { - {ID_ChopsRest, Chops_REST_RATE, pChopsWait, &ps_ChopsWait[0], 0,0,0}, + {ID_ChopsRest, Chops_REST_RATE, &AF(pChopsWait), &ps_ChopsWait[0], 0,0,0}, }; PANEL_STATE ps_ChopsRetract[] = { - {ID_ChopsRest, Chops_REST_RATE, pChopsRetract, &ps_ChopsRetract[0], 0,0,0} + {ID_ChopsRest, Chops_REST_RATE, &AF(pChopsRetract), &ps_ChopsRetract[0], 0,0,0} }; #define CHOPS_YOFF 200 @@ -6494,32 +6488,32 @@ extern PANEL_STATE ps_ReloadFist[]; PANEL_STATE ps_PresentFist[] = { - {ID_FistPresent0, Fist_BEAT_RATE, pFistPresent, &ps_PresentFist[0], 0,0,0} + {ID_FistPresent0, Fist_BEAT_RATE, &AF(pFistPresent), &ps_PresentFist[0], 0,0,0} }; PANEL_STATE ps_FistRest[] = { - {ID_FistPresent0, Fist_BEAT_RATE, pFistRest, &ps_FistRest[0], 0,0,0} + {ID_FistPresent0, Fist_BEAT_RATE, &AF(pFistRest), &ps_FistRest[0], 0,0,0} }; PANEL_STATE ps_FistHide[] = { - {ID_FistPresent0, Fist_BEAT_RATE, pFistHide, &ps_FistHide[0], 0,0,0} + {ID_FistPresent0, Fist_BEAT_RATE, &AF(pFistHide), &ps_FistHide[0], 0,0,0} }; PANEL_STATE ps_PresentFist2[] = { - {ID_Fist2Present0, Fist_BEAT_RATE, pFistPresent, &ps_PresentFist2[0], 0,0,0} + {ID_Fist2Present0, Fist_BEAT_RATE, &AF(pFistPresent), &ps_PresentFist2[0], 0,0,0} }; PANEL_STATE ps_Fist2Rest[] = { - {ID_Fist2Present0, Fist_BEAT_RATE, pFistRest, &ps_Fist2Rest[0], 0,0,0} + {ID_Fist2Present0, Fist_BEAT_RATE, &AF(pFistRest), &ps_Fist2Rest[0], 0,0,0} }; PANEL_STATE ps_Fist2Hide[] = { - {ID_Fist2Present0, Fist_BEAT_RATE, pFistHide, &ps_Fist2Hide[0], 0,0,0} + {ID_Fist2Present0, Fist_BEAT_RATE, &AF(pFistHide), &ps_Fist2Hide[0], 0,0,0} }; @@ -6529,46 +6523,46 @@ PANEL_STATE ps_Fist2Hide[] = PANEL_STATE ps_FistSwing[] = { - {ID_FistSwing0, FIST_PAUSE_TICS, pNullAnimator, &ps_FistSwing[1], 0,0,0}, - {ID_FistSwing1, FIST_SLIDE_TICS, /* start slide */ pNullAnimator, &ps_FistSwing[2], 0,0,0}, - {ID_FistSwing2, 0, /* damage */ pFistAttack, &ps_FistSwing[3], psf_QuickCall, 0,0}, - {ID_FistSwing2, FIST_MID_SLIDE_TICS, /* mid slide */ pFistSlideDown, &ps_FistSwing[4], 0,0,0}, + {ID_FistSwing0, FIST_PAUSE_TICS, nullptr, &ps_FistSwing[1], 0,0,0}, + {ID_FistSwing1, FIST_SLIDE_TICS, /* start slide */ nullptr, &ps_FistSwing[2], 0,0,0}, + {ID_FistSwing2, 0, /* damage */ &AF(pFistAttack), &ps_FistSwing[3], psf_QuickCall, 0,0}, + {ID_FistSwing2, FIST_MID_SLIDE_TICS, /* mid slide */ &AF(pFistSlideDown), &ps_FistSwing[4], 0,0,0}, - {ID_FistSwing2, 2, /* end slide */ pFistSlideDown, &ps_FistSwing[4], 0,0,0}, + {ID_FistSwing2, 2, /* end slide */ &AF(pFistSlideDown), &ps_FistSwing[4], 0,0,0}, - {ID_FistSwing1, FIST_SLIDE_TICS, /* start slide */ pFistSlideR, &ps_FistSwing[6], psf_Xflip, 0,0}, - {ID_FistSwing2, 0, /* damage */ pFistAttack, &ps_FistSwing[7], psf_QuickCall|psf_Xflip, 0,0}, - {ID_FistSwing2, FIST_MID_SLIDE_TICS, /* mid slide */ pFistSlideDownR, &ps_FistSwing[8], psf_Xflip, 0,0}, + {ID_FistSwing1, FIST_SLIDE_TICS, /* start slide */ &AF(pFistSlideR), &ps_FistSwing[6], psf_Xflip, 0,0}, + {ID_FistSwing2, 0, /* damage */ &AF(pFistAttack), &ps_FistSwing[7], psf_QuickCall|psf_Xflip, 0,0}, + {ID_FistSwing2, FIST_MID_SLIDE_TICS, /* mid slide */ &AF(pFistSlideDownR), &ps_FistSwing[8], psf_Xflip, 0,0}, - {ID_FistSwing2, 2, /* end slide */ pFistSlideDownR, &ps_FistSwing[8], psf_Xflip, 0,0}, - {ID_FistSwing2, 2, /* end slide */ pNullAnimator, &ps_FistSwing[1], psf_Xflip, 0,0}, + {ID_FistSwing2, 2, /* end slide */ &AF(pFistSlideDownR), &ps_FistSwing[8], psf_Xflip, 0,0}, + {ID_FistSwing2, 2, /* end slide */ nullptr, &ps_FistSwing[1], psf_Xflip, 0,0}, }; PANEL_STATE ps_Fist2Swing[] = { - {4058, FIST_PAUSE_TICS, pNullAnimator, &ps_Fist2Swing[1], 0,0,0}, - {4058, FIST_SLIDE_TICS, /* start slide */ pNullAnimator, &ps_Fist2Swing[2], 0,0,0}, - {4058, 0, /* damage */ pFistBlock, &ps_Fist2Swing[0], psf_QuickCall, 0,0}, - {4058, FIST_MID_SLIDE_TICS+5, /* mid slide */ pFistSlideDown, &ps_Fist2Swing[4], 0,0,0}, + {4058, FIST_PAUSE_TICS, nullptr, &ps_Fist2Swing[1], 0,0,0}, + {4058, FIST_SLIDE_TICS, /* start slide */ nullptr, &ps_Fist2Swing[2], 0,0,0}, + {4058, 0, /* damage */ &AF(pFistBlock), &ps_Fist2Swing[0], psf_QuickCall, 0,0}, + {4058, FIST_MID_SLIDE_TICS+5, /* mid slide */ &AF(pFistSlideDown), &ps_Fist2Swing[4], 0,0,0}, - {4058, 2, /* end slide */ pFistSlideDown, &ps_Fist2Swing[4], 0,0,0}, + {4058, 2, /* end slide */ &AF(pFistSlideDown), &ps_Fist2Swing[4], 0,0,0}, }; PANEL_STATE ps_Fist3Swing[] = { - {ID_Fist3Swing0, FIST_PAUSE_TICS+25, pNullAnimator, &ps_Fist3Swing[1], 0,0,0}, - {ID_Fist3Swing1, 0, /* damage */ pFistAttack, &ps_Fist3Swing[2], psf_QuickCall, 0,0}, - {ID_Fist3Swing2, FIST_PAUSE_TICS+10, pNullAnimator, &ps_Fist3Swing[3], 0,0,0}, - {ID_Fist3Swing2, FIST_MID_SLIDE_TICS+3, /* mid slide */ pFistSlideDown, &ps_Fist3Swing[4], 0,0,0}, + {ID_Fist3Swing0, FIST_PAUSE_TICS+25, nullptr, &ps_Fist3Swing[1], 0,0,0}, + {ID_Fist3Swing1, 0, /* damage */ &AF(pFistAttack), &ps_Fist3Swing[2], psf_QuickCall, 0,0}, + {ID_Fist3Swing2, FIST_PAUSE_TICS+10, nullptr, &ps_Fist3Swing[3], 0,0,0}, + {ID_Fist3Swing2, FIST_MID_SLIDE_TICS+3, /* mid slide */ &AF(pFistSlideDown), &ps_Fist3Swing[4], 0,0,0}, - {ID_Fist3Swing2, 8, /* end slide */ pFistSlideDown, &ps_Fist3Swing[4], 0,0,0}, + {ID_Fist3Swing2, 8, /* end slide */ &AF(pFistSlideDown), &ps_Fist3Swing[4], 0,0,0}, - {ID_Fist3Swing1, FIST_SLIDE_TICS+20, /* start slide */ pFistSlideR, &ps_Fist3Swing[6], psf_Xflip, 0,0}, - {ID_Fist3Swing2, 0, /* damage */ pFistAttack, &ps_Fist3Swing[7], psf_QuickCall|psf_Xflip, 0,0}, - {ID_Fist3Swing2, FIST_MID_SLIDE_TICS+3, /* mid slide */ pFistSlideDownR, &ps_Fist3Swing[8], psf_Xflip, 0,0}, + {ID_Fist3Swing1, FIST_SLIDE_TICS+20, /* start slide */ &AF(pFistSlideR), &ps_Fist3Swing[6], psf_Xflip, 0,0}, + {ID_Fist3Swing2, 0, /* damage */ &AF(pFistAttack), &ps_Fist3Swing[7], psf_QuickCall|psf_Xflip, 0,0}, + {ID_Fist3Swing2, FIST_MID_SLIDE_TICS+3, /* mid slide */ &AF(pFistSlideDownR), &ps_Fist3Swing[8], psf_Xflip, 0,0}, - {ID_Fist3Swing2, 8, /* end slide */ pFistSlideDownR, &ps_Fist3Swing[8], psf_Xflip, 0,0}, - {ID_Fist3Swing2, 8, /* end slide */ pNullAnimator, &ps_Fist3Swing[1], psf_Xflip, 0,0}, + {ID_Fist3Swing2, 8, /* end slide */ &AF(pFistSlideDownR), &ps_Fist3Swing[8], psf_Xflip, 0,0}, + {ID_Fist3Swing2, 8, /* end slide */ nullptr, &ps_Fist3Swing[1], psf_Xflip, 0,0}, }; #define KICK_PAUSE_TICS 40 @@ -6577,24 +6571,24 @@ PANEL_STATE ps_Fist3Swing[] = PANEL_STATE ps_Kick[] = { - {ID_Kick0, KICK_PAUSE_TICS, pNullAnimator, &ps_Kick[1], 0,0,0}, - {ID_Kick1, 0, /* damage */ pFistAttack, &ps_Kick[2], psf_QuickCall, 0,0}, - {ID_Kick1, KICK_SLIDE_TICS, /* start slide */ pNullAnimator, &ps_Kick[3], 0,0,0}, - {ID_Kick1, KICK_MID_SLIDE_TICS, /* mid slide */ pFistSlideDown, &ps_Kick[4], 0,0,0}, + {ID_Kick0, KICK_PAUSE_TICS, nullptr, &ps_Kick[1], 0,0,0}, + {ID_Kick1, 0, /* damage */ &AF(pFistAttack), &ps_Kick[2], psf_QuickCall, 0,0}, + {ID_Kick1, KICK_SLIDE_TICS, /* start slide */ nullptr, &ps_Kick[3], 0,0,0}, + {ID_Kick1, KICK_MID_SLIDE_TICS, /* mid slide */ &AF(pFistSlideDown), &ps_Kick[4], 0,0,0}, - {ID_Kick1, 30, /* end slide */ pFistSlideDown, &ps_Kick[4], 0,0,0}, + {ID_Kick1, 30, /* end slide */ &AF(pFistSlideDown), &ps_Kick[4], 0,0,0}, - {ID_Kick0, KICK_SLIDE_TICS, /* start slide */ pNullAnimator, &ps_Kick[6], psf_Xflip, 0,0}, - {ID_Kick1, 0, /* damage */ pFistAttack, &ps_Kick[7], psf_QuickCall|psf_Xflip, 0,0}, - {ID_Kick1, KICK_MID_SLIDE_TICS,/* mid slide */ pFistSlideDownR, &ps_Kick[8], psf_Xflip, 0, 0}, + {ID_Kick0, KICK_SLIDE_TICS, /* start slide */ nullptr, &ps_Kick[6], psf_Xflip, 0,0}, + {ID_Kick1, 0, /* damage */ &AF(pFistAttack), &ps_Kick[7], psf_QuickCall|psf_Xflip, 0,0}, + {ID_Kick1, KICK_MID_SLIDE_TICS,/* mid slide */ &AF(pFistSlideDownR), &ps_Kick[8], psf_Xflip, 0, 0}, - {ID_Kick1, 30, /* end slide */ pFistSlideDownR, &ps_Kick[8], psf_Xflip, 0,0}, - {ID_Kick1, 30, /* end slide */ pNullAnimator, &ps_Kick[1], psf_Xflip, 0,0}, + {ID_Kick1, 30, /* end slide */ &AF(pFistSlideDownR), &ps_Kick[8], psf_Xflip, 0,0}, + {ID_Kick1, 30, /* end slide */ nullptr, &ps_Kick[1], psf_Xflip, 0,0}, }; PANEL_STATE ps_RetractFist[] = { - {ID_FistPresent0, Fist_BEAT_RATE, pFistRetract, &ps_RetractFist[0], 0,0,0} + {ID_FistPresent0, Fist_BEAT_RATE, &AF(pFistRetract), &ps_RetractFist[0], 0,0,0} }; #define FIST_SWAY_AMT 12 @@ -7695,6 +7689,12 @@ void pSetState(DPanelSprite* psp, PANEL_STATE* panel_state) psp->picndx = panel_state ? panel_state->picndx : 0; } +void pCallAnimator(DPanelSprite* psp) +{ + VMValue v = psp; + if (psp->State->Animator) + VMCall(*psp->State->Animator, &v, 1, nullptr, 0); +} void pNextState(DPanelSprite* psp) { @@ -7703,7 +7703,7 @@ void pNextState(DPanelSprite* psp) if ((psp->State->flags & psf_QuickCall)) { - (*psp->State->Animator)(psp); + pCallAnimator(psp); psp->State = psp->State->NextState; } } @@ -7715,7 +7715,7 @@ void pStatePlusOne(DPanelSprite* psp) if ((psp->State->flags & psf_QuickCall)) { - (*psp->State->Animator)(psp); + pCallAnimator(psp); psp->State = psp->State->NextState; } } @@ -7767,7 +7767,7 @@ void pStateControl(DPanelSprite* psp) // Call the correct animator if (psp->State->Animator) - (*psp->State->Animator)(psp); + pCallAnimator(psp); } @@ -7825,7 +7825,7 @@ void PreUpdatePanel(double interpfrac) #define ID_PanelEnvironSuit 2397 PANEL_STATE ps_PanelEnvironSuit[] = { - {ID_PanelEnvironSuit, EnvironSuit_RATE, PanelInvTestSuicide, &ps_PanelEnvironSuit[0], 0,0,0} + {ID_PanelEnvironSuit, EnvironSuit_RATE, &AF(PanelInvTestSuicide), &ps_PanelEnvironSuit[0], 0,0,0} }; //--------------------------------------------------------------------------- diff --git a/source/games/sw/src/panel.h b/source/games/sw/src/panel.h index 221339e8c3..89e4c0fc4a 100644 --- a/source/games/sw/src/panel.h +++ b/source/games/sw/src/panel.h @@ -59,7 +59,8 @@ struct PANEL_STATE { short picndx; // for pip stuff in conpic.h int tics; - void (*Animator)(DPanelSprite*); // JBF: return type was long + //void (*Animator)(PANEL_SPRITE*); // JBF: return type was long + VMNativeFunction** Animator; PANEL_STATE* NextState; uint32_t flags; uint8_t xvel;