mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- use distinct names for monster AI variables and functions.
I was just toying around with compiling all of these as a single unit and that uniform naming made it impossible.
This commit is contained in:
parent
2f4c78dd73
commit
c87185a337
18 changed files with 419 additions and 419 deletions
|
@ -39,41 +39,41 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void BiteSeqCallback(int, int);
|
||||
static void thinkTarget(spritetype *, XSPRITE *);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkPonder(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void MoveForward(spritetype *, XSPRITE *);
|
||||
static void MoveSwoop(spritetype *, XSPRITE *);
|
||||
static void MoveFly(spritetype *, XSPRITE *);
|
||||
static void MoveToCeil(spritetype *, XSPRITE *);
|
||||
static void batBiteSeqCallback(int, int);
|
||||
static void batThinkTarget(spritetype *, XSPRITE *);
|
||||
static void batThinkSearch(spritetype *, XSPRITE *);
|
||||
static void batThinkGoto(spritetype *, XSPRITE *);
|
||||
static void batThinkPonder(spritetype *, XSPRITE *);
|
||||
static void batMoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void batMoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void batThinkChase(spritetype *, XSPRITE *);
|
||||
static void batMoveForward(spritetype *, XSPRITE *);
|
||||
static void batMoveSwoop(spritetype *, XSPRITE *);
|
||||
static void batMoveFly(spritetype *, XSPRITE *);
|
||||
static void batMoveToCeil(spritetype *, XSPRITE *);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(BiteSeqCallback);
|
||||
static int nBatBiteClient = seqRegisterClient(batBiteSeqCallback);
|
||||
|
||||
AISTATE batIdle = {kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE batFlyIdle = {kAiStateIdle, 6, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE batChase = {kAiStateChase, 6, -1, 0, NULL, MoveForward, thinkChase, &batFlyIdle };
|
||||
AISTATE batPonder = {kAiStateOther, 6, -1, 0, NULL, NULL, thinkPonder, NULL };
|
||||
AISTATE batGoto = {kAiStateMove, 6, -1, 600, NULL, MoveForward, thinkGoto, &batFlyIdle };
|
||||
AISTATE batBite = {kAiStateChase, 7, nBiteClient, 60, NULL, NULL, NULL, &batPonder };
|
||||
AISTATE batIdle = {kAiStateIdle, 0, -1, 0, NULL, NULL, batThinkTarget, NULL };
|
||||
AISTATE batFlyIdle = {kAiStateIdle, 6, -1, 0, NULL, NULL, batThinkTarget, NULL };
|
||||
AISTATE batChase = {kAiStateChase, 6, -1, 0, NULL, batMoveForward, batThinkChase, &batFlyIdle };
|
||||
AISTATE batPonder = {kAiStateOther, 6, -1, 0, NULL, NULL, batThinkPonder, NULL };
|
||||
AISTATE batGoto = {kAiStateMove, 6, -1, 600, NULL, batMoveForward, batThinkGoto, &batFlyIdle };
|
||||
AISTATE batBite = {kAiStateChase, 7, nBatBiteClient, 60, NULL, NULL, NULL, &batPonder };
|
||||
AISTATE batRecoil = {kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &batChase };
|
||||
AISTATE batSearch = {kAiStateSearch, 6, -1, 120, NULL, MoveForward, thinkSearch, &batFlyIdle };
|
||||
AISTATE batSwoop = {kAiStateOther, 6, -1, 60, NULL, MoveSwoop, thinkChase, &batChase };
|
||||
AISTATE batFly = { kAiStateMove, 6, -1, 0, NULL, MoveFly, thinkChase, &batChase };
|
||||
AISTATE batSearch = {kAiStateSearch, 6, -1, 120, NULL, batMoveForward, batThinkSearch, &batFlyIdle };
|
||||
AISTATE batSwoop = {kAiStateOther, 6, -1, 60, NULL, batMoveSwoop, batThinkChase, &batChase };
|
||||
AISTATE batFly = { kAiStateMove, 6, -1, 0, NULL, batMoveFly, batThinkChase, &batChase };
|
||||
AISTATE batTurn = {kAiStateMove, 6, -1, 60, NULL, aiMoveTurn, NULL, &batChase };
|
||||
AISTATE batHide = {kAiStateOther, 6, -1, 0, NULL, MoveToCeil, MoveForward, NULL };
|
||||
AISTATE batDodgeUp = {kAiStateMove, 6, -1, 120, NULL, MoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeUpRight = {kAiStateMove, 6, -1, 90, NULL, MoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeUpLeft = {kAiStateMove, 6, -1, 90, NULL, MoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeDown = {kAiStateMove, 6, -1, 120, NULL, MoveDodgeDown, 0, &batChase };
|
||||
AISTATE batDodgeDownRight = {kAiStateMove, 6, -1, 90, NULL, MoveDodgeDown, 0, &batChase };
|
||||
AISTATE batDodgeDownLeft = {kAiStateMove, 6, -1, 90, NULL, MoveDodgeDown, 0, &batChase };
|
||||
AISTATE batHide = {kAiStateOther, 6, -1, 0, NULL, batMoveToCeil, batMoveForward, NULL };
|
||||
AISTATE batDodgeUp = {kAiStateMove, 6, -1, 120, NULL, batMoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeUpRight = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeUpLeft = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeUp, 0, &batChase };
|
||||
AISTATE batDodgeDown = {kAiStateMove, 6, -1, 120, NULL, batMoveDodgeDown, 0, &batChase };
|
||||
AISTATE batDodgeDownRight = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
||||
AISTATE batDodgeDownLeft = {kAiStateMove, 6, -1, 90, NULL, batMoveDodgeDown, 0, &batChase };
|
||||
|
||||
static void BiteSeqCallback(int, int nXSprite)
|
||||
static void batBiteSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
spritetype *pSprite = &sprite[pXSprite->reference];
|
||||
|
@ -89,7 +89,7 @@ static void BiteSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx, dy, height2-height, VECTOR_TYPE_6);
|
||||
}
|
||||
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batThinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -141,13 +141,13 @@ static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
thinkTarget(pSprite, pXSprite);
|
||||
batThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -158,10 +158,10 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiChooseDirection(pSprite, pXSprite, nAngle);
|
||||
if (nDist < 512 && klabs(pSprite->ang - nAngle) < pDudeInfo->periphery)
|
||||
aiNewState(pSprite, pXSprite, &batSearch);
|
||||
thinkTarget(pSprite, pXSprite);
|
||||
batThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batThinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ static void thinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batMoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -239,7 +239,7 @@ static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x52aaa;
|
||||
}
|
||||
|
||||
static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batMoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -265,7 +265,7 @@ static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x44444;
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiNewState(pSprite, pXSprite, &batHide);
|
||||
}
|
||||
|
||||
static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batMoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -357,7 +357,7 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
yvel[nSprite] = dmulscale30(t1, nSin, -t2, nCos);
|
||||
}
|
||||
|
||||
static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batMoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -388,7 +388,7 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x44444;
|
||||
}
|
||||
|
||||
static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void batMoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -419,7 +419,7 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x2d555;
|
||||
}
|
||||
|
||||
void MoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
void batMoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
|
|
|
@ -44,12 +44,12 @@ BEGIN_BLD_NS
|
|||
static void SlashSeqCallback(int, int);
|
||||
static void StompSeqCallback(int, int);
|
||||
static void MorphToBeast(spritetype *, XSPRITE *);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void thinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void thinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void MoveForward(spritetype *, XSPRITE *);
|
||||
static void beastThinkSearch(spritetype *, XSPRITE *);
|
||||
static void beastThinkGoto(spritetype *, XSPRITE *);
|
||||
static void beastThinkChase(spritetype *, XSPRITE *);
|
||||
static void beastThinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void beastThinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void beastMoveForward(spritetype *, XSPRITE *);
|
||||
static void sub_628A0(spritetype *, XSPRITE *);
|
||||
static void sub_62AE0(spritetype *, XSPRITE *);
|
||||
static void sub_62D7C(spritetype *, XSPRITE *);
|
||||
|
@ -58,25 +58,25 @@ static int nSlashClient = seqRegisterClient(SlashSeqCallback);
|
|||
static int nStompClient = seqRegisterClient(StompSeqCallback);
|
||||
|
||||
AISTATE beastIdle = {kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE beastChase = {kAiStateChase, 8, -1, 0, NULL, MoveForward, thinkChase, NULL };
|
||||
AISTATE beastChase = {kAiStateChase, 8, -1, 0, NULL, beastMoveForward, beastThinkChase, NULL };
|
||||
AISTATE beastDodge = { kAiStateMove, 8, -1, 60, NULL, aiMoveDodge, NULL, &beastChase };
|
||||
AISTATE beastGoto = { kAiStateMove, 8, -1, 600, NULL, MoveForward, thinkGoto, &beastIdle };
|
||||
AISTATE beastGoto = { kAiStateMove, 8, -1, 600, NULL, beastMoveForward, beastThinkGoto, &beastIdle };
|
||||
AISTATE beastSlash = { kAiStateChase, 6, nSlashClient, 120, NULL, NULL, NULL, &beastChase };
|
||||
AISTATE beastStomp = { kAiStateChase, 7, nStompClient, 120, NULL, NULL, NULL, &beastChase };
|
||||
AISTATE beastSearch = { kAiStateSearch, 8, -1, 120, NULL, MoveForward, thinkSearch, &beastIdle };
|
||||
AISTATE beastSearch = { kAiStateSearch, 8, -1, 120, NULL, beastMoveForward, beastThinkSearch, &beastIdle };
|
||||
AISTATE beastRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &beastDodge };
|
||||
AISTATE beastTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &beastDodge };
|
||||
AISTATE beastSwimIdle = {kAiStateIdle, 9, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE beastSwimChase = { kAiStateChase, 9, -1, 0, NULL, sub_628A0, thinkSwimChase, NULL };
|
||||
AISTATE beastSwimChase = { kAiStateChase, 9, -1, 0, NULL, sub_628A0, beastThinkSwimChase, NULL };
|
||||
AISTATE beastSwimDodge = { kAiStateMove, 9, -1, 90, NULL, aiMoveDodge, NULL, &beastSwimChase };
|
||||
AISTATE beastSwimGoto = { kAiStateMove, 9, -1, 600, NULL, MoveForward, thinkSwimGoto, &beastSwimIdle };
|
||||
AISTATE beastSwimSearch = { kAiStateSearch, 9, -1, 120, NULL, MoveForward, thinkSearch, &beastSwimIdle };
|
||||
AISTATE beastSwimSlash = { kAiStateChase, 9, nSlashClient, 0, NULL, NULL, thinkSwimChase, &beastSwimChase };
|
||||
AISTATE beastSwimGoto = { kAiStateMove, 9, -1, 600, NULL, beastMoveForward, beastThinkSwimGoto, &beastSwimIdle };
|
||||
AISTATE beastSwimSearch = { kAiStateSearch, 9, -1, 120, NULL, beastMoveForward, beastThinkSearch, &beastSwimIdle };
|
||||
AISTATE beastSwimSlash = { kAiStateChase, 9, nSlashClient, 0, NULL, NULL, beastThinkSwimChase, &beastSwimChase };
|
||||
AISTATE beastSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &beastSwimDodge };
|
||||
AISTATE beastMorphToBeast = { kAiStateOther, -1, -1, 0, MorphToBeast, NULL, NULL, &beastIdle };
|
||||
AISTATE beastMorphFromCultist = { kAiStateOther, 2576, -1, 0, NULL, NULL, NULL, &beastMorphToBeast };
|
||||
AISTATE beast138FB4 = { kAiStateOther, 9, -1, 120, NULL, sub_62AE0, thinkSwimChase, &beastSwimChase };
|
||||
AISTATE beast138FD0 = { kAiStateOther, 9, -1, 0, NULL, sub_62D7C, thinkSwimChase, &beastSwimChase };
|
||||
AISTATE beast138FB4 = { kAiStateOther, 9, -1, 120, NULL, sub_62AE0, beastThinkSwimChase, &beastSwimChase };
|
||||
AISTATE beast138FD0 = { kAiStateOther, 9, -1, 0, NULL, sub_62D7C, beastThinkSwimChase, &beastSwimChase };
|
||||
AISTATE beast138FEC = { kAiStateOther, 9, -1, 120, NULL, aiMoveTurn, NULL, &beastSwimChase };
|
||||
|
||||
static void SlashSeqCallback(int, int nXSprite)
|
||||
|
@ -196,13 +196,13 @@ static void MorphToBeast(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->type = kDudeBeast;
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -227,7 +227,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -389,7 +389,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastThinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -403,7 +403,7 @@ static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastThinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -457,7 +457,7 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void beastMoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
|
|
@ -40,41 +40,41 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void BiteSeqCallback(int, int);
|
||||
static void thinkTarget(spritetype *, XSPRITE *);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkPonder(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void MoveForward(spritetype *, XSPRITE *);
|
||||
static void MoveSwoop(spritetype *, XSPRITE *);
|
||||
static void MoveAscend(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void MoveToCeil(spritetype *, XSPRITE *);
|
||||
static void eelBiteSeqCallback(int, int);
|
||||
static void eelThinkTarget(spritetype *, XSPRITE *);
|
||||
static void eelThinkSearch(spritetype *, XSPRITE *);
|
||||
static void eelThinkGoto(spritetype *, XSPRITE *);
|
||||
static void eelThinkPonder(spritetype *, XSPRITE *);
|
||||
static void eelMoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void eelMoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void eelThinkChase(spritetype *, XSPRITE *);
|
||||
static void eelMoveForward(spritetype *, XSPRITE *);
|
||||
static void eelMoveSwoop(spritetype *, XSPRITE *);
|
||||
static void eelMoveAscend(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void eelMoveToCeil(spritetype *, XSPRITE *);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(BiteSeqCallback);
|
||||
static int nEelBiteClient = seqRegisterClient(eelBiteSeqCallback);
|
||||
|
||||
AISTATE eelIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE eelFlyIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE eelChase = { kAiStateChase, 0, -1, 0, NULL, MoveForward, thinkChase, &eelIdle };
|
||||
AISTATE eelPonder = { kAiStateOther, 0, -1, 0, NULL, NULL, thinkPonder, NULL };
|
||||
AISTATE eelGoto = { kAiStateMove, 0, -1, 600, NULL, NULL, thinkGoto, &eelIdle };
|
||||
AISTATE eelBite = { kAiStateChase, 7, nBiteClient, 60, NULL, NULL, NULL, &eelChase };
|
||||
AISTATE eelIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, eelThinkTarget, NULL };
|
||||
AISTATE eelFlyIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, eelThinkTarget, NULL };
|
||||
AISTATE eelChase = { kAiStateChase, 0, -1, 0, NULL, eelMoveForward, eelThinkChase, &eelIdle };
|
||||
AISTATE eelPonder = { kAiStateOther, 0, -1, 0, NULL, NULL, eelThinkPonder, NULL };
|
||||
AISTATE eelGoto = { kAiStateMove, 0, -1, 600, NULL, NULL, eelThinkGoto, &eelIdle };
|
||||
AISTATE eelBite = { kAiStateChase, 7, nEelBiteClient, 60, NULL, NULL, NULL, &eelChase };
|
||||
AISTATE eelRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &eelChase };
|
||||
AISTATE eelSearch = { kAiStateSearch, 0, -1, 120, NULL, MoveForward, thinkSearch, &eelIdle };
|
||||
AISTATE eelSwoop = { kAiStateOther, 0, -1, 60, NULL, MoveSwoop, thinkChase, &eelChase };
|
||||
AISTATE eelFly = { kAiStateMove, 0, -1, 0, NULL, MoveAscend, thinkChase, &eelChase };
|
||||
AISTATE eelSearch = { kAiStateSearch, 0, -1, 120, NULL, eelMoveForward, eelThinkSearch, &eelIdle };
|
||||
AISTATE eelSwoop = { kAiStateOther, 0, -1, 60, NULL, eelMoveSwoop, eelThinkChase, &eelChase };
|
||||
AISTATE eelFly = { kAiStateMove, 0, -1, 0, NULL, eelMoveAscend, eelThinkChase, &eelChase };
|
||||
AISTATE eelTurn = { kAiStateMove, 0, -1, 60, NULL, aiMoveTurn, NULL, &eelChase };
|
||||
AISTATE eelHide = { kAiStateOther, 0, -1, 0, NULL, MoveToCeil, MoveForward, NULL };
|
||||
AISTATE eelDodgeUp = { kAiStateMove, 0, -1, 120, NULL, MoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeDown = { kAiStateMove, 0, -1, 120, NULL, MoveDodgeDown, NULL, &eelChase };
|
||||
AISTATE eelDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &eelChase };
|
||||
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &eelChase };
|
||||
AISTATE eelHide = { kAiStateOther, 0, -1, 0, NULL, eelMoveToCeil, eelMoveForward, NULL };
|
||||
AISTATE eelDodgeUp = { kAiStateMove, 0, -1, 120, NULL, eelMoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeUp, NULL, &eelChase };
|
||||
AISTATE eelDodgeDown = { kAiStateMove, 0, -1, 120, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
||||
AISTATE eelDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
||||
AISTATE eelDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, eelMoveDodgeDown, NULL, &eelChase };
|
||||
|
||||
static void BiteSeqCallback(int, int nXSprite)
|
||||
static void eelBiteSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
spritetype *pSprite = &sprite[pXSprite->reference];
|
||||
|
@ -102,7 +102,7 @@ static void BiteSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx, dy, height2-height, VECTOR_TYPE_7);
|
||||
}
|
||||
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelThinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -156,13 +156,13 @@ static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
thinkTarget(pSprite, pXSprite);
|
||||
eelThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -173,10 +173,10 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiChooseDirection(pSprite, pXSprite, nAngle);
|
||||
if (nDist < 512 && klabs(pSprite->ang - nAngle) < pDudeInfo->periphery)
|
||||
aiNewState(pSprite, pXSprite, &eelSearch);
|
||||
thinkTarget(pSprite, pXSprite);
|
||||
eelThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelThinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -230,7 +230,7 @@ static void thinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelMoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -254,7 +254,7 @@ static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x8000;
|
||||
}
|
||||
|
||||
static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelMoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -280,7 +280,7 @@ static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x44444;
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -336,7 +336,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiNewState(pSprite, pXSprite, &eelSearch);
|
||||
}
|
||||
|
||||
static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelMoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -368,7 +368,7 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
yvel[nSprite] = dmulscale30(t1, nSin, -t2, nCos);
|
||||
}
|
||||
|
||||
static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelMoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -396,7 +396,7 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x22222;
|
||||
}
|
||||
|
||||
static void MoveAscend(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void eelMoveAscend(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -424,7 +424,7 @@ static void MoveAscend(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x8000;
|
||||
}
|
||||
|
||||
void MoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
void eelMoveToCeil(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int x = pSprite->x;
|
||||
int y = pSprite->y;
|
||||
|
|
|
@ -44,60 +44,60 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
BEGIN_BLD_NS
|
||||
|
||||
static void BurnSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype*, XSPRITE*);
|
||||
static void thinkGoto(spritetype*, XSPRITE*);
|
||||
static void thinkChase(spritetype*, XSPRITE*);
|
||||
static void burnThinkSearch(spritetype*, XSPRITE*);
|
||||
static void burnThinkGoto(spritetype*, XSPRITE*);
|
||||
static void burnThinkChase(spritetype*, XSPRITE*);
|
||||
|
||||
static int nBurnClient = seqRegisterClient(BurnSeqCallback);
|
||||
|
||||
AISTATE cultistBurnIdle = { kAiStateIdle, 3, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE cultistBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE cultistBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &cultistBurnSearch };
|
||||
AISTATE cultistBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, &cultistBurnSearch };
|
||||
AISTATE cultistBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE cultistBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &cultistBurnSearch };
|
||||
AISTATE cultistBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &cultistBurnSearch };
|
||||
AISTATE cultistBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &cultistBurnChase };
|
||||
|
||||
AISTATE zombieABurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE zombieABurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &zombieABurnSearch };
|
||||
AISTATE zombieABurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, NULL };
|
||||
AISTATE zombieABurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE zombieABurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieABurnSearch };
|
||||
AISTATE zombieABurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
|
||||
AISTATE zombieABurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &zombieABurnChase };
|
||||
|
||||
AISTATE zombieFBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE zombieFBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &zombieFBurnSearch };
|
||||
AISTATE zombieFBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, NULL };
|
||||
AISTATE zombieFBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE zombieFBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieFBurnSearch };
|
||||
AISTATE zombieFBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
|
||||
AISTATE zombieFBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &zombieFBurnChase };
|
||||
|
||||
AISTATE innocentBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE innocentBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &zombieFBurnSearch };
|
||||
AISTATE innocentBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, NULL };
|
||||
AISTATE innocentBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE innocentBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &zombieFBurnSearch };
|
||||
AISTATE innocentBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, NULL };
|
||||
AISTATE innocentBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &zombieFBurnChase };
|
||||
|
||||
AISTATE beastBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE beastBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &beastBurnSearch };
|
||||
AISTATE beastBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, &beastBurnSearch };
|
||||
AISTATE beastBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE beastBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &beastBurnSearch };
|
||||
AISTATE beastBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &beastBurnSearch };
|
||||
AISTATE beastBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &beastBurnChase };
|
||||
|
||||
AISTATE tinycalebBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE tinycalebBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &tinycalebBurnSearch };
|
||||
AISTATE tinycalebBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, &tinycalebBurnSearch };
|
||||
AISTATE tinycalebBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE tinycalebBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &tinycalebBurnSearch };
|
||||
AISTATE tinycalebBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &tinycalebBurnSearch };
|
||||
AISTATE tinycalebBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &tinycalebBurnChase };
|
||||
|
||||
AISTATE genDudeBurnIdle = { kAiStateIdle, 3, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE genDudeBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE genDudeBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, thinkGoto, &genDudeBurnSearch };
|
||||
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, thinkSearch, &genDudeBurnSearch };
|
||||
AISTATE genDudeBurnChase = { kAiStateChase, 3, -1, 0, NULL, aiMoveForward, burnThinkChase, NULL };
|
||||
AISTATE genDudeBurnGoto = { kAiStateMove, 3, -1, 3600, NULL, aiMoveForward, burnThinkGoto, &genDudeBurnSearch };
|
||||
AISTATE genDudeBurnSearch = { kAiStateSearch, 3, -1, 3600, NULL, aiMoveForward, burnThinkSearch, &genDudeBurnSearch };
|
||||
AISTATE genDudeBurnAttack = { kAiStateChase, 3, nBurnClient, 120, NULL, NULL, NULL, &genDudeBurnChase };
|
||||
|
||||
static void BurnSeqCallback(int, int)
|
||||
{
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void burnThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void burnThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -138,7 +138,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void burnThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -42,11 +42,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
BEGIN_BLD_NS
|
||||
|
||||
static void SeqAttackCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void thinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void thinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void calebThinkSearch(spritetype *, XSPRITE *);
|
||||
static void calebThinkGoto(spritetype *, XSPRITE *);
|
||||
static void calebThinkChase(spritetype *, XSPRITE *);
|
||||
static void calebThinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void calebThinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void sub_65D04(spritetype *, XSPRITE *);
|
||||
static void sub_65F44(spritetype *, XSPRITE *);
|
||||
static void sub_661E0(spritetype *, XSPRITE *);
|
||||
|
@ -54,22 +54,22 @@ static void sub_661E0(spritetype *, XSPRITE *);
|
|||
static int nAttackClient = seqRegisterClient(SeqAttackCallback);
|
||||
|
||||
AISTATE tinycalebIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE tinycalebChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE tinycalebChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, calebThinkChase, NULL };
|
||||
AISTATE tinycalebDodge = { kAiStateMove, 6, -1, 90, NULL, aiMoveDodge, NULL, &tinycalebChase };
|
||||
AISTATE tinycalebGoto = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, thinkGoto, &tinycalebIdle };
|
||||
AISTATE tinycalebGoto = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, calebThinkGoto, &tinycalebIdle };
|
||||
AISTATE tinycalebAttack = { kAiStateChase, 0, nAttackClient, 120, NULL, NULL, NULL, &tinycalebChase };
|
||||
AISTATE tinycalebSearch = { kAiStateSearch, 6, -1, 120, NULL, aiMoveForward, thinkSearch, &tinycalebIdle };
|
||||
AISTATE tinycalebSearch = { kAiStateSearch, 6, -1, 120, NULL, aiMoveForward, calebThinkSearch, &tinycalebIdle };
|
||||
AISTATE tinycalebRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tinycalebDodge };
|
||||
AISTATE tinycalebTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &tinycalebDodge };
|
||||
AISTATE tinycalebSwimIdle = { kAiStateIdle, 10, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE tinycalebSwimChase = { kAiStateChase, 8, -1, 0, NULL, sub_65D04, thinkSwimChase, NULL };
|
||||
AISTATE tinycalebSwimChase = { kAiStateChase, 8, -1, 0, NULL, sub_65D04, calebThinkSwimChase, NULL };
|
||||
AISTATE tinycalebSwimDodge = { kAiStateMove, 8, -1, 90, NULL, aiMoveDodge, NULL, &tinycalebSwimChase };
|
||||
AISTATE tinycalebSwimGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, thinkSwimGoto, &tinycalebSwimIdle };
|
||||
AISTATE tinycalebSwimSearch = { kAiStateSearch, 8, -1, 120, NULL, aiMoveForward, thinkSearch, &tinycalebSwimIdle };
|
||||
AISTATE tinycalebSwimGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, calebThinkSwimGoto, &tinycalebSwimIdle };
|
||||
AISTATE tinycalebSwimSearch = { kAiStateSearch, 8, -1, 120, NULL, aiMoveForward, calebThinkSearch, &tinycalebSwimIdle };
|
||||
AISTATE tinycalebSwimAttack = { kAiStateChase, 10, nAttackClient, 0, NULL, NULL, NULL, &tinycalebSwimChase };
|
||||
AISTATE tinycalebSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &tinycalebSwimDodge };
|
||||
AISTATE tinycaleb139660 = { kAiStateOther, 8, -1, 120, NULL, sub_65F44, thinkSwimChase, &tinycalebSwimChase };
|
||||
AISTATE tinycaleb13967C = { kAiStateOther, 8, -1, 0, NULL, sub_661E0, thinkSwimChase, &tinycalebSwimChase };
|
||||
AISTATE tinycaleb139660 = { kAiStateOther, 8, -1, 120, NULL, sub_65F44, calebThinkSwimChase, &tinycalebSwimChase };
|
||||
AISTATE tinycaleb13967C = { kAiStateOther, 8, -1, 0, NULL, sub_661E0, calebThinkSwimChase, &tinycalebSwimChase };
|
||||
AISTATE tinycaleb139698 = { kAiStateOther, 8, -1, 120, NULL, aiMoveTurn, NULL, &tinycalebSwimChase };
|
||||
|
||||
static void SeqAttackCallback(int, int nXSprite)
|
||||
|
@ -97,13 +97,13 @@ static void SeqAttackCallback(int, int nXSprite)
|
|||
sfxPlay3DSound(pSprite, 1002, -1, 0);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void calebThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void calebThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -128,7 +128,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void calebThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -256,7 +256,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void calebThinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -270,7 +270,7 @@ static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void calebThinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -41,39 +41,39 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void BiteSeqCallback(int, int);
|
||||
static void BurnSeqCallback(int, int);
|
||||
static void BurnSeqCallback2(int, int);
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void cerberusBiteSeqCallback(int, int);
|
||||
static void cerberusBurnSeqCallback(int, int);
|
||||
static void cerberusBurnSeqCallback2(int, int);
|
||||
static void cerberusThinkSearch(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void cerberusThinkTarget(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void cerberusThinkGoto(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void cerberusThinkChase(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(BiteSeqCallback);
|
||||
static int nBurnClient = seqRegisterClient(BurnSeqCallback);
|
||||
static int nBurnClient2 = seqRegisterClient(BurnSeqCallback2);
|
||||
static int nCerberusBiteClient = seqRegisterClient(cerberusBiteSeqCallback);
|
||||
static int nCerberusBurnClient = seqRegisterClient(cerberusBurnSeqCallback);
|
||||
static int nCerberusBurnClient2 = seqRegisterClient(cerberusBurnSeqCallback2);
|
||||
|
||||
AISTATE cerberusIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE cerberusSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, thinkSearch, &cerberusIdle };
|
||||
AISTATE cerberusChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE cerberusIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, cerberusThinkTarget, NULL };
|
||||
AISTATE cerberusSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, cerberusThinkSearch, &cerberusIdle };
|
||||
AISTATE cerberusChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, cerberusThinkChase, NULL };
|
||||
AISTATE cerberusRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cerberusSearch };
|
||||
AISTATE cerberusTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &cerberusSearch };
|
||||
AISTATE cerberusGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, thinkGoto, &cerberusIdle };
|
||||
AISTATE cerberusBite = { kAiStateChase, 6, nBiteClient, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberusBurn = { kAiStateChase, 6, nBurnClient, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberus3Burn = { kAiStateChase, 6, nBurnClient2, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberus2Idle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE cerberus2Search = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, thinkSearch, &cerberus2Idle };
|
||||
AISTATE cerberus2Chase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE cerberusGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, cerberusThinkGoto, &cerberusIdle };
|
||||
AISTATE cerberusBite = { kAiStateChase, 6, nCerberusBiteClient, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberusBurn = { kAiStateChase, 6, nCerberusBurnClient, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberus3Burn = { kAiStateChase, 6, nCerberusBurnClient2, 60, NULL, NULL, NULL, &cerberusChase };
|
||||
AISTATE cerberus2Idle = { kAiStateIdle, 0, -1, 0, NULL, NULL, cerberusThinkTarget, NULL };
|
||||
AISTATE cerberus2Search = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, cerberusThinkSearch, &cerberus2Idle };
|
||||
AISTATE cerberus2Chase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, cerberusThinkChase, NULL };
|
||||
AISTATE cerberus2Recoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cerberus2Search };
|
||||
AISTATE cerberus2Goto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, thinkGoto, &cerberus2Idle };
|
||||
AISTATE cerberus2Bite = { kAiStateChase, 6, nBiteClient, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus2Burn = { kAiStateChase, 6, nBurnClient, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus4Burn = { kAiStateChase, 6, nBurnClient2, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus2Goto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, cerberusThinkGoto, &cerberus2Idle };
|
||||
AISTATE cerberus2Bite = { kAiStateChase, 6, nCerberusBiteClient, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus2Burn = { kAiStateChase, 6, nCerberusBurnClient, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus4Burn = { kAiStateChase, 6, nCerberusBurnClient2, 60, NULL, NULL, NULL, &cerberus2Chase };
|
||||
AISTATE cerberus139890 = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
||||
AISTATE cerberus1398AC = { kAiStateOther, 7, -1, 120, NULL, aiMoveTurn, NULL, &cerberusChase };
|
||||
|
||||
static void BiteSeqCallback(int, int nXSprite)
|
||||
static void cerberusBiteSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -97,7 +97,7 @@ static void BiteSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_14);
|
||||
}
|
||||
|
||||
static void BurnSeqCallback(int, int nXSprite)
|
||||
static void cerberusBurnSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -178,7 +178,7 @@ static void BurnSeqCallback(int, int nXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void BurnSeqCallback2(int, int nXSprite)
|
||||
static void cerberusBurnSeqCallback2(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -264,13 +264,13 @@ static void BurnSeqCallback2(int, int nXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cerberusThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cerberusThinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -330,7 +330,7 @@ static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cerberusThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -357,7 +357,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cerberusThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1) {
|
||||
switch (pSprite->type) {
|
||||
|
|
|
@ -46,17 +46,17 @@ BEGIN_BLD_NS
|
|||
static void TommySeqCallback(int, int);
|
||||
static void TeslaSeqCallback(int, int);
|
||||
static void ShotSeqCallback(int, int);
|
||||
static void ThrowSeqCallback(int, int);
|
||||
static void cultThrowSeqCallback(int, int);
|
||||
static void sub_68170(int, int);
|
||||
static void sub_68230(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void cultThinkSearch(spritetype *, XSPRITE *);
|
||||
static void cultThinkGoto(spritetype *, XSPRITE *);
|
||||
static void cultThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
static int nTommyClient = seqRegisterClient(TommySeqCallback);
|
||||
static int nTeslaClient = seqRegisterClient(TeslaSeqCallback);
|
||||
static int nShotClient = seqRegisterClient(ShotSeqCallback);
|
||||
static int nThrowClient = seqRegisterClient(ThrowSeqCallback);
|
||||
static int nThrowClient = seqRegisterClient(cultThrowSeqCallback);
|
||||
static int n68170Client = seqRegisterClient(sub_68170);
|
||||
static int n68230Client = seqRegisterClient(sub_68230);
|
||||
|
||||
|
@ -64,11 +64,11 @@ AISTATE cultistIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL
|
|||
AISTATE cultistProneIdle = { kAiStateIdle, 17, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE fanaticProneIdle = { kAiStateIdle, 17, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE cultistProneIdle3 = { kAiStateIdle, 17, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE cultistChase = { kAiStateChase, 9, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE fanaticChase = { kAiStateChase, 0, -1, 0, NULL, aiMoveTurn, thinkChase, NULL };
|
||||
AISTATE cultistChase = { kAiStateChase, 9, -1, 0, NULL, aiMoveForward, cultThinkChase, NULL };
|
||||
AISTATE fanaticChase = { kAiStateChase, 0, -1, 0, NULL, aiMoveTurn, cultThinkChase, NULL };
|
||||
AISTATE cultistDodge = { kAiStateMove, 9, -1, 90, NULL, aiMoveDodge, NULL, &cultistChase };
|
||||
AISTATE cultistGoto = { kAiStateMove, 9, -1, 600, NULL, aiMoveForward, thinkGoto, &cultistIdle };
|
||||
AISTATE cultistProneChase = { kAiStateChase, 14, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE cultistGoto = { kAiStateMove, 9, -1, 600, NULL, aiMoveForward, cultThinkGoto, &cultistIdle };
|
||||
AISTATE cultistProneChase = { kAiStateChase, 14, -1, 0, NULL, aiMoveForward, cultThinkChase, NULL };
|
||||
AISTATE cultistProneDodge = { kAiStateMove, 14, -1, 90, NULL, aiMoveDodge, NULL, &cultistProneChase };
|
||||
AISTATE cultistTThrow = { kAiStateChase, 7, nThrowClient, 120, NULL, NULL, NULL, &cultistTFire };
|
||||
AISTATE cultistSThrow = { kAiStateChase, 7, nThrowClient, 120, NULL, NULL, NULL, &cultistSFire };
|
||||
|
@ -76,27 +76,27 @@ AISTATE cultistTsThrow = { kAiStateChase, 7, nThrowClient, 120, NULL, NULL, NULL
|
|||
AISTATE cultistDThrow = { kAiStateChase, 7, nThrowClient, 120, NULL, NULL, NULL, &cultistChase };
|
||||
AISTATE cultist139A78 = { kAiStateChase, 7, n68170Client, 120, NULL, NULL, NULL, &cultistChase };
|
||||
AISTATE cultist139A94 = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, NULL, &cultistIdle };
|
||||
AISTATE cultist139AB0 = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, thinkSearch, &cultist139A94 };
|
||||
AISTATE cultist139ACC = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, thinkSearch, &cultist139AB0 };
|
||||
AISTATE cultist139AE8 = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, thinkSearch, &cultist139AE8 };
|
||||
AISTATE cultistSearch = { kAiStateSearch, 9, -1, 1800, NULL, aiMoveForward, thinkSearch, &cultistIdle };
|
||||
AISTATE cultist139AB0 = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, cultThinkSearch, &cultist139A94 };
|
||||
AISTATE cultist139ACC = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, cultThinkSearch, &cultist139AB0 };
|
||||
AISTATE cultist139AE8 = { kAiStateChase, 7, n68230Client, 120, NULL, NULL, cultThinkSearch, &cultist139AE8 };
|
||||
AISTATE cultistSearch = { kAiStateSearch, 9, -1, 1800, NULL, aiMoveForward, cultThinkSearch, &cultistIdle };
|
||||
AISTATE cultistSFire = { kAiStateChase, 6, nShotClient, 60, NULL, NULL, NULL, &cultistChase };
|
||||
AISTATE cultistTFire = { kAiStateChase, 6, nTommyClient, 0, NULL, aiMoveTurn, thinkChase, &cultistTFire };
|
||||
AISTATE cultistTsFire = { kAiStateChase, 6, nTeslaClient, 0, NULL, aiMoveTurn, thinkChase, &cultistChase };
|
||||
AISTATE cultistTFire = { kAiStateChase, 6, nTommyClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTFire };
|
||||
AISTATE cultistTsFire = { kAiStateChase, 6, nTeslaClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistChase };
|
||||
AISTATE cultistSProneFire = { kAiStateChase, 8, nShotClient, 60, NULL, NULL, NULL, &cultistProneChase };
|
||||
AISTATE cultistTProneFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn, thinkChase, &cultistTProneFire };
|
||||
AISTATE cultistTProneFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTProneFire };
|
||||
AISTATE cultistTsProneFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, NULL, &cultistTsProneFire };
|
||||
AISTATE cultistRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistDodge };
|
||||
AISTATE cultistProneRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistProneDodge };
|
||||
AISTATE cultistTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &cultistDodge };
|
||||
AISTATE cultistSwimIdle = { kAiStateIdle, 13, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE cultistSwimChase = { kAiStateChase, 13, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE cultistSwimChase = { kAiStateChase, 13, -1, 0, NULL, aiMoveForward, cultThinkChase, NULL };
|
||||
AISTATE cultistSwimDodge = { kAiStateMove, 13, -1, 90, NULL, aiMoveDodge, NULL, &cultistSwimChase };
|
||||
AISTATE cultistSwimGoto = { kAiStateMove, 13, -1, 600, NULL, aiMoveForward, thinkGoto, &cultistSwimIdle };
|
||||
AISTATE cultistSwimSearch = { kAiStateSearch, 13, -1, 1800, NULL, aiMoveForward, thinkSearch, &cultistSwimIdle };
|
||||
AISTATE cultistSwimGoto = { kAiStateMove, 13, -1, 600, NULL, aiMoveForward, cultThinkGoto, &cultistSwimIdle };
|
||||
AISTATE cultistSwimSearch = { kAiStateSearch, 13, -1, 1800, NULL, aiMoveForward, cultThinkSearch, &cultistSwimIdle };
|
||||
AISTATE cultistSSwimFire = { kAiStateChase, 8, nShotClient, 60, NULL, NULL, NULL, &cultistSwimChase };
|
||||
AISTATE cultistTSwimFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn, thinkChase, &cultistTSwimFire };
|
||||
AISTATE cultistTsSwimFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, thinkChase, &cultistTsSwimFire };
|
||||
AISTATE cultistTSwimFire = { kAiStateChase, 8, nTommyClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTSwimFire };
|
||||
AISTATE cultistTsSwimFire = { kAiStateChase, 8, nTeslaClient, 0, NULL, aiMoveTurn, cultThinkChase, &cultistTsSwimFire };
|
||||
AISTATE cultistSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &cultistSwimDodge };
|
||||
|
||||
static void TommySeqCallback(int, int nXSprite)
|
||||
|
@ -156,7 +156,7 @@ static void ShotSeqCallback(int, int nXSprite)
|
|||
sfxPlay3DSound(pSprite, 1002, -1, 0);
|
||||
}
|
||||
|
||||
static void ThrowSeqCallback(int, int nXSprite)
|
||||
static void cultThrowSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -227,13 +227,13 @@ static char TargetNearExplosion(spritetype *pSprite)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cultThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
sub_5F15C(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cultThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -258,7 +258,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void cultThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -48,18 +48,18 @@ static void SlashFSeqCallback(int, int);
|
|||
static void ThrowFSeqCallback(int, int);
|
||||
static void BlastSSeqCallback(int, int);
|
||||
static void ThrowSSeqCallback(int, int);
|
||||
static void thinkTarget(spritetype *, XSPRITE *);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void gargThinkTarget(spritetype *, XSPRITE *);
|
||||
static void gargThinkSearch(spritetype *, XSPRITE *);
|
||||
static void gargThinkGoto(spritetype *, XSPRITE *);
|
||||
static void gargMoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void gargMoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void gargThinkChase(spritetype *, XSPRITE *);
|
||||
static void entryFStatue(spritetype *, XSPRITE *);
|
||||
static void entrySStatue(spritetype *, XSPRITE *);
|
||||
static void MoveForward(spritetype *, XSPRITE *);
|
||||
static void MoveSlow(spritetype *, XSPRITE *);
|
||||
static void MoveSwoop(spritetype *, XSPRITE *);
|
||||
static void MoveFly(spritetype *, XSPRITE *);
|
||||
static void gargMoveForward(spritetype *, XSPRITE *);
|
||||
static void gargMoveSlow(spritetype *, XSPRITE *);
|
||||
static void gargMoveSwoop(spritetype *, XSPRITE *);
|
||||
static void gargMoveFly(spritetype *, XSPRITE *);
|
||||
static void playStatueBreakSnd(spritetype*,XSPRITE*);
|
||||
|
||||
static int nSlashFClient = seqRegisterClient(SlashFSeqCallback);
|
||||
|
@ -67,29 +67,29 @@ static int nThrowFClient = seqRegisterClient(ThrowFSeqCallback);
|
|||
static int nThrowSClient = seqRegisterClient(ThrowSSeqCallback);
|
||||
static int nBlastSClient = seqRegisterClient(BlastSSeqCallback);
|
||||
|
||||
AISTATE gargoyleFIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE gargoyleFIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, gargThinkTarget, NULL };
|
||||
AISTATE gargoyleStatueIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, NULL, NULL };
|
||||
AISTATE gargoyleFChase = { kAiStateChase, 0, -1, 0, NULL, MoveForward, thinkChase, &gargoyleFIdle };
|
||||
AISTATE gargoyleFGoto = { kAiStateMove, 0, -1, 600, NULL, MoveForward, thinkGoto, &gargoyleFIdle };
|
||||
AISTATE gargoyleFChase = { kAiStateChase, 0, -1, 0, NULL, gargMoveForward, gargThinkChase, &gargoyleFIdle };
|
||||
AISTATE gargoyleFGoto = { kAiStateMove, 0, -1, 600, NULL, gargMoveForward, gargThinkGoto, &gargoyleFIdle };
|
||||
AISTATE gargoyleFSlash = { kAiStateChase, 6, nSlashFClient, 120, NULL, NULL, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFThrow = { kAiStateChase, 6, nThrowFClient, 120, NULL, NULL, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleSThrow = { kAiStateChase, 6, nThrowSClient, 120, NULL, MoveForward, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleSBlast = { kAiStateChase, 7, nBlastSClient, 60, NULL, MoveSlow, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleSThrow = { kAiStateChase, 6, nThrowSClient, 120, NULL, gargMoveForward, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleSBlast = { kAiStateChase, 7, nBlastSClient, 60, NULL, gargMoveSlow, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFSearch = { kAiStateSearch, 0, -1, 120, NULL, MoveForward, thinkSearch, &gargoyleFIdle };
|
||||
AISTATE gargoyleFSearch = { kAiStateSearch, 0, -1, 120, NULL, gargMoveForward, gargThinkSearch, &gargoyleFIdle };
|
||||
AISTATE gargoyleFMorph2 = { kAiStateOther, -1, -1, 0, entryFStatue, NULL, NULL, &gargoyleFIdle };
|
||||
AISTATE gargoyleFMorph = { kAiStateOther, 6, -1, 0, NULL, NULL, NULL, &gargoyleFMorph2 };
|
||||
AISTATE gargoyleSMorph2 = { kAiStateOther, -1, -1, 0, entrySStatue, NULL, NULL, &gargoyleFIdle };
|
||||
AISTATE gargoyleSMorph = { kAiStateOther, 6, -1, 0, NULL, NULL, NULL, &gargoyleSMorph2 };
|
||||
AISTATE gargoyleSwoop = { kAiStateOther, 0, -1, 120, NULL, MoveSwoop, thinkChase, &gargoyleFChase };
|
||||
AISTATE gargoyleFly = { kAiStateMove, 0, -1, 120, NULL, MoveFly, thinkChase, &gargoyleFChase };
|
||||
AISTATE gargoyleSwoop = { kAiStateOther, 0, -1, 120, NULL, gargMoveSwoop, gargThinkChase, &gargoyleFChase };
|
||||
AISTATE gargoyleFly = { kAiStateMove, 0, -1, 120, NULL, gargMoveFly, gargThinkChase, &gargoyleFChase };
|
||||
AISTATE gargoyleTurn = { kAiStateMove, 0, -1, 120, NULL, aiMoveTurn, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleDodgeUp = { kAiStateMove, 0, -1, 60, NULL, MoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleDodgeDown = { kAiStateMove, 0, -1, 120, NULL, MoveDodgeDown, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleDodgeUp = { kAiStateMove, 0, -1, 60, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, gargMoveDodgeUp, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleDodgeDown = { kAiStateMove, 0, -1, 120, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
|
||||
AISTATE gargoyleFDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, gargMoveDodgeDown, NULL, &gargoyleFChase };
|
||||
|
||||
AISTATE statueFBreakSEQ = { kAiStateOther, 5, -1, 0, entryFStatue, NULL, playStatueBreakSnd, &gargoyleFMorph2};
|
||||
AISTATE statueSBreakSEQ = { kAiStateOther, 5, -1, 0, entrySStatue, NULL, playStatueBreakSnd, &gargoyleSMorph2};
|
||||
|
@ -229,7 +229,7 @@ static void ThrowSSeqCallback(int, int nXSprite)
|
|||
actFireThing(pSprite, 0, 0, gDudeSlope[nXSprite]-7500, kThingBone, Chance(0x6000) ? 0x133333 : 0x111111);
|
||||
}
|
||||
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargThinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -286,13 +286,13 @@ static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
sub_5F15C(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -310,7 +310,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -338,7 +338,7 @@ static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x1d555;
|
||||
}
|
||||
|
||||
static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -368,7 +368,7 @@ static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x44444;
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -562,7 +562,7 @@ static void entrySStatue(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pSprite->type = kDudeGargoyleStone;
|
||||
}
|
||||
|
||||
static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -598,7 +598,7 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
yvel[nSprite] = dmulscale30(t1, nSin, -t2, nCos);
|
||||
}
|
||||
|
||||
static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -641,7 +641,7 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -683,7 +683,7 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gargMoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
|
|
@ -44,44 +44,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void SlashSeqCallback(int, int);
|
||||
static void ThrowSeqCallback(int, int);
|
||||
static void BlastSeqCallback(int, int);
|
||||
static void thinkTarget(spritetype *, XSPRITE *);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void MoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void MoveForward(spritetype *, XSPRITE *);
|
||||
static void MoveSlow(spritetype *, XSPRITE *);
|
||||
static void MoveSwoop(spritetype *, XSPRITE *);
|
||||
static void MoveFly(spritetype *, XSPRITE *);
|
||||
static void ghostSlashSeqCallback(int, int);
|
||||
static void ghostThrowSeqCallback(int, int);
|
||||
static void ghostBlastSeqCallback(int, int);
|
||||
static void ghostThinkTarget(spritetype *, XSPRITE *);
|
||||
static void ghostThinkSearch(spritetype *, XSPRITE *);
|
||||
static void ghostThinkGoto(spritetype *, XSPRITE *);
|
||||
static void ghostMoveDodgeUp(spritetype *, XSPRITE *);
|
||||
static void ghostMoveDodgeDown(spritetype *, XSPRITE *);
|
||||
static void ghostThinkChase(spritetype *, XSPRITE *);
|
||||
static void ghostMoveForward(spritetype *, XSPRITE *);
|
||||
static void ghostMoveSlow(spritetype *, XSPRITE *);
|
||||
static void ghostMoveSwoop(spritetype *, XSPRITE *);
|
||||
static void ghostMoveFly(spritetype *, XSPRITE *);
|
||||
|
||||
static int nSlashClient = seqRegisterClient(SlashSeqCallback);
|
||||
static int nThrowClient = seqRegisterClient(ThrowSeqCallback);
|
||||
static int nBlastClient = seqRegisterClient(BlastSeqCallback);
|
||||
static int nGhostSlashClient = seqRegisterClient(ghostSlashSeqCallback);
|
||||
static int nGhostThrowClient = seqRegisterClient(ghostThrowSeqCallback);
|
||||
static int nGhostBlastClient = seqRegisterClient(ghostBlastSeqCallback);
|
||||
|
||||
AISTATE ghostIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, thinkTarget, NULL };
|
||||
AISTATE ghostChase = { kAiStateChase, 0, -1, 0, NULL, MoveForward, thinkChase, &ghostIdle };
|
||||
AISTATE ghostGoto = { kAiStateMove, 0, -1, 600, NULL, MoveForward, thinkGoto, &ghostIdle };
|
||||
AISTATE ghostSlash = { kAiStateChase, 6, nSlashClient, 120, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostThrow = { kAiStateChase, 6, nThrowClient, 120, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostBlast = { kAiStateChase, 6, nBlastClient, 120, NULL, MoveSlow, NULL, &ghostChase };
|
||||
AISTATE ghostIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, ghostThinkTarget, NULL };
|
||||
AISTATE ghostChase = { kAiStateChase, 0, -1, 0, NULL, ghostMoveForward, ghostThinkChase, &ghostIdle };
|
||||
AISTATE ghostGoto = { kAiStateMove, 0, -1, 600, NULL, ghostMoveForward, ghostThinkGoto, &ghostIdle };
|
||||
AISTATE ghostSlash = { kAiStateChase, 6, nGhostSlashClient, 120, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostThrow = { kAiStateChase, 6, nGhostThrowClient, 120, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostBlast = { kAiStateChase, 6, nGhostBlastClient, 120, NULL, ghostMoveSlow, NULL, &ghostChase };
|
||||
AISTATE ghostRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &ghostChase };
|
||||
AISTATE ghostSearch = { kAiStateSearch, 0, -1, 120, NULL, MoveForward, thinkSearch, &ghostIdle };
|
||||
AISTATE ghostSwoop = { kAiStateOther, 0, -1, 120, NULL, MoveSwoop, thinkChase, &ghostChase };
|
||||
AISTATE ghostFly = { kAiStateMove, 0, -1, 0, NULL, MoveFly, thinkChase, &ghostChase };
|
||||
AISTATE ghostSearch = { kAiStateSearch, 0, -1, 120, NULL, ghostMoveForward, ghostThinkSearch, &ghostIdle };
|
||||
AISTATE ghostSwoop = { kAiStateOther, 0, -1, 120, NULL, ghostMoveSwoop, ghostThinkChase, &ghostChase };
|
||||
AISTATE ghostFly = { kAiStateMove, 0, -1, 0, NULL, ghostMoveFly, ghostThinkChase, &ghostChase };
|
||||
AISTATE ghostTurn = { kAiStateMove, 0, -1, 120, NULL, aiMoveTurn, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUp = { kAiStateMove, 0, -1, 60, NULL, MoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDown = { kAiStateMove, 0, -1, 120, NULL, MoveDodgeDown, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, MoveDodgeDown, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUp = { kAiStateMove, 0, -1, 60, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUpRight = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeUpLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeUp, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDown = { kAiStateMove, 0, -1, 120, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDownRight = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
||||
AISTATE ghostDodgeDownLeft = { kAiStateMove, 0, -1, 90, NULL, ghostMoveDodgeDown, NULL, &ghostChase };
|
||||
|
||||
static void SlashSeqCallback(int, int nXSprite)
|
||||
static void ghostSlashSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -104,14 +104,14 @@ static void SlashSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx-r2, dy+r1, dz, VECTOR_TYPE_12);
|
||||
}
|
||||
|
||||
static void ThrowSeqCallback(int, int nXSprite)
|
||||
static void ghostThrowSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
actFireThing(&sprite[nSprite], 0, 0, gDudeSlope[nXSprite]-7500, kThingBone, 0xeeeee);
|
||||
}
|
||||
|
||||
static void BlastSeqCallback(int, int nXSprite)
|
||||
static void ghostBlastSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -203,7 +203,7 @@ static void BlastSeqCallback(int, int nXSprite)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostThinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -259,13 +259,13 @@ static void thinkTarget(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -283,7 +283,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -311,7 +311,7 @@ static void MoveDodgeUp(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = -0x1d555;
|
||||
}
|
||||
|
||||
static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -341,7 +341,7 @@ static void MoveDodgeDown(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
zvel[nSprite] = 0x44444;
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -489,7 +489,7 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
yvel[nSprite] = dmulscale30(t1, nSin, -t2, nCos);
|
||||
}
|
||||
|
||||
static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -529,7 +529,7 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
@ -568,7 +568,7 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ghostMoveFly(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
int nSprite = pSprite->index;
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
|
|
@ -43,11 +43,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
BEGIN_BLD_NS
|
||||
|
||||
static void GillBiteSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void thinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void thinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void gillThinkSearch(spritetype *, XSPRITE *);
|
||||
static void gillThinkGoto(spritetype *, XSPRITE *);
|
||||
static void gillThinkChase(spritetype *, XSPRITE *);
|
||||
static void gillThinkSwimGoto(spritetype *, XSPRITE *);
|
||||
static void gillThinkSwimChase(spritetype *, XSPRITE *);
|
||||
static void sub_6CB00(spritetype *, XSPRITE *);
|
||||
static void sub_6CD74(spritetype *, XSPRITE *);
|
||||
static void sub_6D03C(spritetype *, XSPRITE *);
|
||||
|
@ -55,21 +55,21 @@ static void sub_6D03C(spritetype *, XSPRITE *);
|
|||
static int nGillBiteClient = seqRegisterClient(GillBiteSeqCallback);
|
||||
|
||||
AISTATE gillBeastIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE gillBeastChase = { kAiStateChase, 9, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE gillBeastChase = { kAiStateChase, 9, -1, 0, NULL, aiMoveForward, gillThinkChase, NULL };
|
||||
AISTATE gillBeastDodge = { kAiStateMove, 9, -1, 90, NULL, aiMoveDodge, NULL, &gillBeastChase };
|
||||
AISTATE gillBeastGoto = { kAiStateMove, 9, -1, 600, NULL, aiMoveForward, thinkGoto, &gillBeastIdle };
|
||||
AISTATE gillBeastGoto = { kAiStateMove, 9, -1, 600, NULL, aiMoveForward, gillThinkGoto, &gillBeastIdle };
|
||||
AISTATE gillBeastBite = { kAiStateChase, 6, nGillBiteClient, 120, NULL, NULL, NULL, &gillBeastChase };
|
||||
AISTATE gillBeastSearch = { kAiStateMove, 9, -1, 120, NULL, aiMoveForward, thinkSearch, &gillBeastIdle };
|
||||
AISTATE gillBeastSearch = { kAiStateMove, 9, -1, 120, NULL, aiMoveForward, gillThinkSearch, &gillBeastIdle };
|
||||
AISTATE gillBeastRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &gillBeastDodge };
|
||||
AISTATE gillBeastSwimIdle = { kAiStateIdle, 10, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE gillBeastSwimChase = { kAiStateChase, 10, -1, 0, NULL, sub_6CB00, thinkSwimChase, NULL };
|
||||
AISTATE gillBeastSwimChase = { kAiStateChase, 10, -1, 0, NULL, sub_6CB00, gillThinkSwimChase, NULL };
|
||||
AISTATE gillBeastSwimDodge = { kAiStateMove, 10, -1, 90, NULL, aiMoveDodge, NULL, &gillBeastSwimChase };
|
||||
AISTATE gillBeastSwimGoto = { kAiStateMove, 10, -1, 600, NULL, aiMoveForward, thinkSwimGoto, &gillBeastSwimIdle };
|
||||
AISTATE gillBeastSwimSearch = { kAiStateSearch, 10, -1, 120, NULL, aiMoveForward, thinkSearch, &gillBeastSwimIdle };
|
||||
AISTATE gillBeastSwimBite = { kAiStateChase, 7, nGillBiteClient, 0, NULL, NULL, thinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeastSwimGoto = { kAiStateMove, 10, -1, 600, NULL, aiMoveForward, gillThinkSwimGoto, &gillBeastSwimIdle };
|
||||
AISTATE gillBeastSwimSearch = { kAiStateSearch, 10, -1, 120, NULL, aiMoveForward, gillThinkSearch, &gillBeastSwimIdle };
|
||||
AISTATE gillBeastSwimBite = { kAiStateChase, 7, nGillBiteClient, 0, NULL, NULL, gillThinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeastSwimRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &gillBeastSwimDodge };
|
||||
AISTATE gillBeast13A138 = { kAiStateOther, 10, -1, 120, NULL, sub_6CD74, thinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeast13A154 = { kAiStateOther, 10, -1, 0, NULL, sub_6D03C, thinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeast13A138 = { kAiStateOther, 10, -1, 120, NULL, sub_6CD74, gillThinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeast13A154 = { kAiStateOther, 10, -1, 0, NULL, sub_6D03C, gillThinkSwimChase, &gillBeastSwimChase };
|
||||
AISTATE gillBeast13A170 = { kAiStateOther, 10, -1, 120, NULL, NULL, aiMoveTurn, &gillBeastSwimChase };
|
||||
|
||||
static void GillBiteSeqCallback(int, int nXSprite)
|
||||
|
@ -88,13 +88,13 @@ static void GillBiteSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx, dy, dz, VECTOR_TYPE_8);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gillThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gillThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -119,7 +119,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gillThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -243,7 +243,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gillThinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -257,7 +257,7 @@ static void thinkSwimGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void gillThinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -43,18 +43,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
BEGIN_BLD_NS
|
||||
|
||||
static void HandJumpSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void handThinkSearch(spritetype *, XSPRITE *);
|
||||
static void handThinkGoto(spritetype *, XSPRITE *);
|
||||
static void handThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
static int nJumpClient = seqRegisterClient(HandJumpSeqCallback);
|
||||
|
||||
AISTATE handIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE hand13A3B4 = { kAiStateOther, 0, -1, 0, NULL, NULL, NULL, NULL };
|
||||
AISTATE handSearch = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, thinkSearch, &handIdle };
|
||||
AISTATE handChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE handSearch = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, handThinkSearch, &handIdle };
|
||||
AISTATE handChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, handThinkChase, NULL };
|
||||
AISTATE handRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &handSearch };
|
||||
AISTATE handGoto = { kAiStateMove, 6, -1, 1800, NULL, aiMoveForward, thinkGoto, &handIdle };
|
||||
AISTATE handGoto = { kAiStateMove, 6, -1, 1800, NULL, aiMoveForward, handThinkGoto, &handIdle };
|
||||
AISTATE handJump = { kAiStateChase, 7, nJumpClient, 120, NULL, NULL, NULL, &handChase };
|
||||
|
||||
static void HandJumpSeqCallback(int, int nXSprite)
|
||||
|
@ -74,13 +74,13 @@ static void HandJumpSeqCallback(int, int nXSprite)
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void handThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void handThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -94,7 +94,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void handThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -44,25 +44,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void BiteSeqCallback(int, int);
|
||||
static void BurnSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void houndBiteSeqCallback(int, int);
|
||||
static void houndBurnSeqCallback(int, int);
|
||||
static void houndThinkSearch(spritetype *, XSPRITE *);
|
||||
static void houndThinkGoto(spritetype *, XSPRITE *);
|
||||
static void houndThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(BiteSeqCallback);
|
||||
static int nBurnClient = seqRegisterClient(BurnSeqCallback);
|
||||
static int nHoundBiteClient = seqRegisterClient(houndBiteSeqCallback);
|
||||
static int nHoundBurnClient = seqRegisterClient(houndBurnSeqCallback);
|
||||
|
||||
AISTATE houndIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE houndSearch = { kAiStateMove, 8, -1, 1800, NULL, aiMoveForward, thinkSearch, &houndIdle };
|
||||
AISTATE houndChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE houndSearch = { kAiStateMove, 8, -1, 1800, NULL, aiMoveForward, houndThinkSearch, &houndIdle };
|
||||
AISTATE houndChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, houndThinkChase, NULL };
|
||||
AISTATE houndRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &houndSearch };
|
||||
AISTATE houndTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &houndSearch };
|
||||
AISTATE houndGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, thinkGoto, &houndIdle };
|
||||
AISTATE houndBite = { kAiStateChase, 6, nBiteClient, 60, NULL, NULL, NULL, &houndChase };
|
||||
AISTATE houndBurn = { kAiStateChase, 7, nBurnClient, 60, NULL, NULL, NULL, &houndChase };
|
||||
AISTATE houndGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, houndThinkGoto, &houndIdle };
|
||||
AISTATE houndBite = { kAiStateChase, 6, nHoundBiteClient, 60, NULL, NULL, NULL, &houndChase };
|
||||
AISTATE houndBurn = { kAiStateChase, 7, nHoundBurnClient, 60, NULL, NULL, NULL, &houndChase };
|
||||
|
||||
static void BiteSeqCallback(int, int nXSprite)
|
||||
static void houndBiteSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -90,7 +90,7 @@ static void BiteSeqCallback(int, int nXSprite)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void BurnSeqCallback(int, int nXSprite)
|
||||
static void houndBurnSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -98,13 +98,13 @@ static void BurnSeqCallback(int, int nXSprite)
|
|||
actFireMissile(pSprite, 0, 0, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileFlameHound);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void houndThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void houndThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
///dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
|
@ -123,7 +123,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void houndThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -42,24 +42,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void innocThinkSearch(spritetype *, XSPRITE *);
|
||||
static void innocThinkGoto(spritetype *, XSPRITE *);
|
||||
static void innocThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
AISTATE innocentIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE innocentSearch = { kAiStateSearch, 6, -1, 1800, NULL, aiMoveForward, thinkSearch, &innocentIdle };
|
||||
AISTATE innocentChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE innocentSearch = { kAiStateSearch, 6, -1, 1800, NULL, aiMoveForward, innocThinkSearch, &innocentIdle };
|
||||
AISTATE innocentChase = { kAiStateChase, 6, -1, 0, NULL, aiMoveForward, innocThinkChase, NULL };
|
||||
AISTATE innocentRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &innocentChase };
|
||||
AISTATE innocentTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &innocentChase };
|
||||
AISTATE innocentGoto = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, thinkGoto, &innocentIdle };
|
||||
AISTATE innocentGoto = { kAiStateMove, 6, -1, 600, NULL, aiMoveForward, innocThinkGoto, &innocentIdle };
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void innocThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void innocThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -73,7 +73,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void innocThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -42,22 +42,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void BiteSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void ratBiteSeqCallback(int, int);
|
||||
static void ratThinkSearch(spritetype *, XSPRITE *);
|
||||
static void ratThinkGoto(spritetype *, XSPRITE *);
|
||||
static void ratThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(BiteSeqCallback);
|
||||
static int nRatBiteClient = seqRegisterClient(ratBiteSeqCallback);
|
||||
|
||||
AISTATE ratIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE ratSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, thinkSearch, &ratIdle };
|
||||
AISTATE ratChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE ratSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, ratThinkSearch, &ratIdle };
|
||||
AISTATE ratChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, ratThinkChase, NULL };
|
||||
AISTATE ratDodge = { kAiStateMove, 7, -1, 0, NULL, NULL, NULL, &ratChase };
|
||||
AISTATE ratRecoil = { kAiStateRecoil, 7, -1, 0, NULL, NULL, NULL, &ratDodge };
|
||||
AISTATE ratGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, thinkGoto, &ratIdle };
|
||||
AISTATE ratBite = { kAiStateChase, 6, nBiteClient, 120, NULL, NULL, NULL, &ratChase };
|
||||
AISTATE ratGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, ratThinkGoto, &ratIdle };
|
||||
AISTATE ratBite = { kAiStateChase, 6, nRatBiteClient, 120, NULL, NULL, NULL, &ratChase };
|
||||
|
||||
static void BiteSeqCallback(int, int nXSprite)
|
||||
static void ratBiteSeqCallback(int, int nXSprite)
|
||||
{
|
||||
XSPRITE *pXSprite = &xsprite[nXSprite];
|
||||
int nSprite = pXSprite->reference;
|
||||
|
@ -71,13 +71,13 @@ static void BiteSeqCallback(int, int nXSprite)
|
|||
actFireVector(pSprite, 0, 0, dx, dy, pTarget->z-pSprite->z, VECTOR_TYPE_16);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ratThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ratThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -91,7 +91,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void ratThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -46,21 +46,21 @@ BEGIN_BLD_NS
|
|||
static void SpidBiteSeqCallback(int, int);
|
||||
static void SpidJumpSeqCallback(int, int);
|
||||
static void sub_71370(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void spidThinkSearch(spritetype *, XSPRITE *);
|
||||
static void spidThinkGoto(spritetype *, XSPRITE *);
|
||||
static void spidThinkChase(spritetype *, XSPRITE *);
|
||||
|
||||
static int nBiteClient = seqRegisterClient(SpidBiteSeqCallback);
|
||||
static int nJumpClient = seqRegisterClient(SpidJumpSeqCallback);
|
||||
static int nSpidBiteClient = seqRegisterClient(SpidBiteSeqCallback);
|
||||
static int nSpidJumpClient = seqRegisterClient(SpidJumpSeqCallback);
|
||||
static int dword_279B50 = seqRegisterClient(sub_71370);
|
||||
|
||||
AISTATE spidIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE spidChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE spidChase = { kAiStateChase, 7, -1, 0, NULL, aiMoveForward, spidThinkChase, NULL };
|
||||
AISTATE spidDodge = { kAiStateMove, 7, -1, 90, NULL, aiMoveDodge, NULL, &spidChase };
|
||||
AISTATE spidGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, thinkGoto, &spidIdle };
|
||||
AISTATE spidSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, thinkSearch, &spidIdle };
|
||||
AISTATE spidBite = { kAiStateChase, 6, nBiteClient, 60, NULL, NULL, NULL, &spidChase };
|
||||
AISTATE spidJump = { kAiStateChase, 8, nJumpClient, 60, NULL, aiMoveForward, NULL, &spidChase };
|
||||
AISTATE spidGoto = { kAiStateMove, 7, -1, 600, NULL, aiMoveForward, spidThinkGoto, &spidIdle };
|
||||
AISTATE spidSearch = { kAiStateSearch, 7, -1, 1800, NULL, aiMoveForward, spidThinkSearch, &spidIdle };
|
||||
AISTATE spidBite = { kAiStateChase, 6, nSpidBiteClient, 60, NULL, NULL, NULL, &spidChase };
|
||||
AISTATE spidJump = { kAiStateChase, 8, nSpidJumpClient, 60, NULL, aiMoveForward, NULL, &spidChase };
|
||||
AISTATE spid13A92C = { kAiStateOther, 0, dword_279B50, 60, NULL, NULL, NULL, &spidIdle };
|
||||
|
||||
static char sub_70D30(XSPRITE *pXDude, int a2, int a3)
|
||||
|
@ -196,13 +196,13 @@ static void sub_71370(int, int nXSprite)
|
|||
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void spidThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void spidThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -216,7 +216,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void spidThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -59,9 +59,9 @@ static void punchCallback(int, int);
|
|||
static void ThrowCallback1(int, int);
|
||||
static void ThrowCallback2(int, int);
|
||||
static void ThrowThing(int, bool);
|
||||
static void thinkSearch(spritetype*, XSPRITE*);
|
||||
static void thinkGoto(spritetype*, XSPRITE*);
|
||||
static void thinkChase(spritetype*, XSPRITE*);
|
||||
static void unicultThinkSearch(spritetype*, XSPRITE*);
|
||||
static void unicultThinkGoto(spritetype*, XSPRITE*);
|
||||
static void unicultThinkChase(spritetype*, XSPRITE*);
|
||||
static void forcePunch(spritetype*, XSPRITE*);
|
||||
|
||||
static int nGenDudeAttack1 = seqRegisterClient(genDudeAttack1);
|
||||
|
@ -72,17 +72,17 @@ static int nGenDudeThrow2 = seqRegisterClient(ThrowCallback2);
|
|||
AISTATE genDudeIdleL = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE genDudeIdleW = { kAiStateIdle, 13, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
// ---------------------
|
||||
AISTATE genDudeSearchL = { kAiStateSearch, 9, -1, 600, NULL, aiGenDudeMoveForward, thinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchW = { kAiStateSearch, 13, -1, 600, NULL, aiGenDudeMoveForward, thinkSearch, &genDudeIdleW };
|
||||
AISTATE genDudeSearchL = { kAiStateSearch, 9, -1, 600, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchW = { kAiStateSearch, 13, -1, 600, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleW };
|
||||
// ---------------------
|
||||
AISTATE genDudeSearchShortL = { kAiStateSearch, 9, -1, 200, NULL, aiGenDudeMoveForward, thinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchShortW = { kAiStateSearch, 13, -1, 200, NULL, aiGenDudeMoveForward, thinkSearch, &genDudeIdleW };
|
||||
AISTATE genDudeSearchShortL = { kAiStateSearch, 9, -1, 200, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchShortW = { kAiStateSearch, 13, -1, 200, NULL, aiGenDudeMoveForward, unicultThinkSearch, &genDudeIdleW };
|
||||
// ---------------------
|
||||
AISTATE genDudeSearchNoWalkL = { kAiStateSearch, 0, -1, 600, NULL, aiMoveTurn, thinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchNoWalkW = { kAiStateSearch, 13, -1, 600, NULL, aiMoveTurn, thinkSearch, &genDudeIdleW };
|
||||
AISTATE genDudeSearchNoWalkL = { kAiStateSearch, 0, -1, 600, NULL, aiMoveTurn, unicultThinkSearch, &genDudeIdleL };
|
||||
AISTATE genDudeSearchNoWalkW = { kAiStateSearch, 13, -1, 600, NULL, aiMoveTurn, unicultThinkSearch, &genDudeIdleW };
|
||||
// ---------------------
|
||||
AISTATE genDudeGotoL = { kAiStateMove, 9, -1, 600, NULL, aiGenDudeMoveForward, thinkGoto, &genDudeIdleL };
|
||||
AISTATE genDudeGotoW = { kAiStateMove, 13, -1, 600, NULL, aiGenDudeMoveForward, thinkGoto, &genDudeIdleW };
|
||||
AISTATE genDudeGotoL = { kAiStateMove, 9, -1, 600, NULL, aiGenDudeMoveForward, unicultThinkGoto, &genDudeIdleL };
|
||||
AISTATE genDudeGotoW = { kAiStateMove, 13, -1, 600, NULL, aiGenDudeMoveForward, unicultThinkGoto, &genDudeIdleW };
|
||||
// ---------------------
|
||||
AISTATE genDudeDodgeL = { kAiStateMove, 9, -1, 90, NULL, aiMoveDodge, NULL, &genDudeChaseL };
|
||||
AISTATE genDudeDodgeD = { kAiStateMove, 14, -1, 90, NULL, aiMoveDodge, NULL, &genDudeChaseD };
|
||||
|
@ -96,17 +96,17 @@ AISTATE genDudeDodgeShorterL = { kAiStateMove, 9, -1, 20, NULL, aiMoveDodge, NUL
|
|||
AISTATE genDudeDodgeShorterD = { kAiStateMove, 14, -1, 20, NULL, aiMoveDodge, NULL, &genDudeChaseD };
|
||||
AISTATE genDudeDodgeShorterW = { kAiStateMove, 13, -1, 20, NULL, aiMoveDodge, NULL, &genDudeChaseW };
|
||||
// ---------------------
|
||||
AISTATE genDudeChaseL = { kAiStateChase, 9, -1, 0, NULL, aiGenDudeMoveForward, thinkChase, NULL };
|
||||
AISTATE genDudeChaseD = { kAiStateChase, 14, -1, 0, NULL, aiGenDudeMoveForward, thinkChase, NULL };
|
||||
AISTATE genDudeChaseW = { kAiStateChase, 13, -1, 0, NULL, aiGenDudeMoveForward, thinkChase, NULL };
|
||||
AISTATE genDudeChaseL = { kAiStateChase, 9, -1, 0, NULL, aiGenDudeMoveForward, unicultThinkChase, NULL };
|
||||
AISTATE genDudeChaseD = { kAiStateChase, 14, -1, 0, NULL, aiGenDudeMoveForward, unicultThinkChase, NULL };
|
||||
AISTATE genDudeChaseW = { kAiStateChase, 13, -1, 0, NULL, aiGenDudeMoveForward, unicultThinkChase, NULL };
|
||||
// ---------------------
|
||||
AISTATE genDudeChaseNoWalkL = { kAiStateChase, 0, -1, 0, NULL, aiMoveTurn, thinkChase, NULL };
|
||||
AISTATE genDudeChaseNoWalkD = { kAiStateChase, 14, -1, 0, NULL, aiMoveTurn, thinkChase, NULL };
|
||||
AISTATE genDudeChaseNoWalkW = { kAiStateChase, 13, -1, 0, NULL, aiMoveTurn, thinkChase, NULL };
|
||||
AISTATE genDudeChaseNoWalkL = { kAiStateChase, 0, -1, 0, NULL, aiMoveTurn, unicultThinkChase, NULL };
|
||||
AISTATE genDudeChaseNoWalkD = { kAiStateChase, 14, -1, 0, NULL, aiMoveTurn, unicultThinkChase, NULL };
|
||||
AISTATE genDudeChaseNoWalkW = { kAiStateChase, 13, -1, 0, NULL, aiMoveTurn, unicultThinkChase, NULL };
|
||||
// ---------------------
|
||||
AISTATE genDudeFireL = { kAiStateChase, 6, nGenDudeAttack1, 0, NULL, aiMoveTurn, thinkChase, &genDudeFireL };
|
||||
AISTATE genDudeFireD = { kAiStateChase, 8, nGenDudeAttack1, 0, NULL, aiMoveTurn, thinkChase, &genDudeFireD };
|
||||
AISTATE genDudeFireW = { kAiStateChase, 8, nGenDudeAttack1, 0, NULL, aiMoveTurn, thinkChase, &genDudeFireW };
|
||||
AISTATE genDudeFireL = { kAiStateChase, 6, nGenDudeAttack1, 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireL };
|
||||
AISTATE genDudeFireD = { kAiStateChase, 8, nGenDudeAttack1, 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireD };
|
||||
AISTATE genDudeFireW = { kAiStateChase, 8, nGenDudeAttack1, 0, NULL, aiMoveTurn, unicultThinkChase, &genDudeFireW };
|
||||
// ---------------------z
|
||||
AISTATE genDudeRecoilL = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &genDudeChaseL };
|
||||
AISTATE genDudeRecoilD = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &genDudeChaseD };
|
||||
|
@ -386,7 +386,7 @@ static void ThrowThing(int nXIndex, bool impact) {
|
|||
}
|
||||
}
|
||||
|
||||
static void thinkSearch( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||
static void unicultThinkSearch( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||
|
||||
// TO DO: if can't see the target, but in fireDist range - stop moving and look around
|
||||
|
||||
|
@ -395,7 +395,7 @@ static void thinkSearch( spritetype* pSprite, XSPRITE* pXSprite ) {
|
|||
sub_5F15C(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype* pSprite, XSPRITE* pXSprite) {
|
||||
static void unicultThinkGoto(spritetype* pSprite, XSPRITE* pXSprite) {
|
||||
|
||||
if (!(pSprite->type >= kDudeBase && pSprite->type < kDudeMax)) {
|
||||
consoleSysMsg("pSprite->type >= kDudeBase && pSprite->type < kDudeMax");
|
||||
|
@ -416,7 +416,7 @@ static void thinkGoto(spritetype* pSprite, XSPRITE* pXSprite) {
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||
static void unicultThinkChase( spritetype* pSprite, XSPRITE* pXSprite ) {
|
||||
|
||||
if (pSprite->type < kDudeBase || pSprite->type >= kDudeMax) return;
|
||||
else if (pXSprite->target < 0 || pXSprite->target >= kMaxSprites) {
|
||||
|
|
|
@ -45,10 +45,10 @@ BEGIN_BLD_NS
|
|||
|
||||
static void HackSeqCallback(int, int);
|
||||
static void StandSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *, XSPRITE *);
|
||||
static void thinkGoto(spritetype *, XSPRITE *);
|
||||
static void thinkChase(spritetype *, XSPRITE *);
|
||||
static void thinkPonder(spritetype *, XSPRITE *);
|
||||
static void zombaThinkSearch(spritetype *, XSPRITE *);
|
||||
static void zombaThinkGoto(spritetype *, XSPRITE *);
|
||||
static void zombaThinkChase(spritetype *, XSPRITE *);
|
||||
static void zombaThinkPonder(spritetype *, XSPRITE *);
|
||||
static void myThinkTarget(spritetype *, XSPRITE *);
|
||||
static void myThinkSearch(spritetype *, XSPRITE *);
|
||||
static void entryEZombie(spritetype *, XSPRITE *);
|
||||
|
@ -59,11 +59,11 @@ static int nHackClient = seqRegisterClient(HackSeqCallback);
|
|||
static int nStandClient = seqRegisterClient(StandSeqCallback);
|
||||
|
||||
AISTATE zombieAIdle = { kAiStateIdle, 0, -1, 0, entryAIdle, NULL, aiThinkTarget, NULL };
|
||||
AISTATE zombieAChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE zombieAPonder = { kAiStateOther, 0, -1, 0, NULL, aiMoveTurn, thinkPonder, NULL };
|
||||
AISTATE zombieAGoto = { kAiStateMove, 8, -1, 1800, NULL, aiMoveForward, thinkGoto, &zombieAIdle };
|
||||
AISTATE zombieAChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, zombaThinkChase, NULL };
|
||||
AISTATE zombieAPonder = { kAiStateOther, 0, -1, 0, NULL, aiMoveTurn, zombaThinkPonder, NULL };
|
||||
AISTATE zombieAGoto = { kAiStateMove, 8, -1, 1800, NULL, aiMoveForward, zombaThinkGoto, &zombieAIdle };
|
||||
AISTATE zombieAHack = { kAiStateChase, 6, nHackClient, 80, NULL, NULL, NULL, &zombieAPonder };
|
||||
AISTATE zombieASearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, thinkSearch, &zombieAIdle };
|
||||
AISTATE zombieASearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, zombaThinkSearch, &zombieAIdle };
|
||||
AISTATE zombieARecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &zombieAPonder };
|
||||
AISTATE zombieATeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zombieAPonder };
|
||||
AISTATE zombieARecoil2 = { kAiStateRecoil, 1, -1, 360, NULL, NULL, NULL, &zombieAStand };
|
||||
|
@ -103,13 +103,13 @@ static void StandSeqCallback(int, int nXSprite)
|
|||
sfxPlay3DSound(&sprite[nSprite], 1102, -1, 0);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombaThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
sub_5F15C(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombaThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -123,7 +123,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombaThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
pXSprite->target = -1;
|
||||
}
|
||||
|
||||
static void thinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombaThinkPonder(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
|
@ -42,29 +42,29 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
static void HackSeqCallback(int, int);
|
||||
static void zombfHackSeqCallback(int, int);
|
||||
static void PukeSeqCallback(int, int);
|
||||
static void ThrowSeqCallback(int, int);
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void zombfThinkSearch(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void zombfThinkGoto(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
static void zombfThinkChase(spritetype *pSprite, XSPRITE *pXSprite);
|
||||
|
||||
static int nHackClient = seqRegisterClient(HackSeqCallback);
|
||||
static int nPukeClient = seqRegisterClient(PukeSeqCallback);
|
||||
static int nThrowClient = seqRegisterClient(ThrowSeqCallback);
|
||||
static int nZombfHackClient = seqRegisterClient(zombfHackSeqCallback);
|
||||
static int nZombfPukeClient = seqRegisterClient(PukeSeqCallback);
|
||||
static int nZombfThrowClient = seqRegisterClient(ThrowSeqCallback);
|
||||
|
||||
AISTATE zombieFIdle = { kAiStateIdle, 0, -1, 0, NULL, NULL, aiThinkTarget, NULL };
|
||||
AISTATE zombieFChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, thinkChase, NULL };
|
||||
AISTATE zombieFGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, thinkGoto, &zombieFIdle };
|
||||
AISTATE zombieFDodge = { kAiStateMove, 8, -1, 0, NULL, aiMoveDodge, thinkChase, &zombieFChase };
|
||||
AISTATE zombieFHack = { kAiStateChase, 6, nHackClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFPuke = { kAiStateChase, 9, nPukeClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFThrow = { kAiStateChase, 6, nThrowClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFSearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, thinkSearch, &zombieFIdle };
|
||||
AISTATE zombieFChase = { kAiStateChase, 8, -1, 0, NULL, aiMoveForward, zombfThinkChase, NULL };
|
||||
AISTATE zombieFGoto = { kAiStateMove, 8, -1, 600, NULL, aiMoveForward, zombfThinkGoto, &zombieFIdle };
|
||||
AISTATE zombieFDodge = { kAiStateMove, 8, -1, 0, NULL, aiMoveDodge, zombfThinkChase, &zombieFChase };
|
||||
AISTATE zombieFHack = { kAiStateChase, 6, nZombfHackClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFPuke = { kAiStateChase, 9, nZombfPukeClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFThrow = { kAiStateChase, 6, nZombfThrowClient, 120, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFSearch = { kAiStateSearch, 8, -1, 1800, NULL, aiMoveForward, zombfThinkSearch, &zombieFIdle };
|
||||
AISTATE zombieFRecoil = { kAiStateRecoil, 5, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
||||
AISTATE zombieFTeslaRecoil = { kAiStateRecoil, 4, -1, 0, NULL, NULL, NULL, &zombieFChase };
|
||||
|
||||
static void HackSeqCallback(int, int nXSprite)
|
||||
static void zombfHackSeqCallback(int, int nXSprite)
|
||||
{
|
||||
if (nXSprite <= 0 || nXSprite >= kMaxXSprites)
|
||||
return;
|
||||
|
@ -110,13 +110,13 @@ static void ThrowSeqCallback(int, int nXSprite)
|
|||
actFireMissile(pSprite, 0, -getDudeInfo(pSprite->type)->eyeHeight, CosScale16(pSprite->ang), SinScale16(pSprite->ang), 0, kMissileButcherKnife);
|
||||
}
|
||||
|
||||
static void thinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombfThinkSearch(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
aiChooseDirection(pSprite, pXSprite, pXSprite->goalAng);
|
||||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombfThinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
dassert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
DUDEINFO *pDudeInfo = getDudeInfo(pSprite->type);
|
||||
|
@ -130,7 +130,7 @@ static void thinkGoto(spritetype *pSprite, XSPRITE *pXSprite)
|
|||
aiThinkTarget(pSprite, pXSprite);
|
||||
}
|
||||
|
||||
static void thinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
static void zombfThinkChase(spritetype *pSprite, XSPRITE *pXSprite)
|
||||
{
|
||||
if (pXSprite->target == -1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue