This commit is contained in:
parent
b93a5cb4cb
commit
9153260b12
12 changed files with 400 additions and 77 deletions
|
@ -75,7 +75,8 @@ enemy_src := npc \
|
||||||
nsklfish \
|
nsklfish \
|
||||||
ngary \
|
ngary \
|
||||||
nplatfrm \
|
nplatfrm \
|
||||||
nworm
|
nworm \
|
||||||
|
nhcrab
|
||||||
|
|
||||||
projectl_src := projectl
|
projectl_src := projectl
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,14 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_ANENOMELVL1_HEADER__
|
||||||
|
#include <ACTOR_ANENOMELVL1_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SPIKEYANENOME_HEADER__
|
||||||
|
#include <ACTOR_SPIKEYANENOME_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseAnemone1Attack( int _frames )
|
void CNpcEnemy::processCloseAnemone1Attack( int _frames )
|
||||||
{
|
{
|
||||||
|
@ -108,14 +116,27 @@ void CNpcEnemy::processCloseAnemone1Attack( int _frames )
|
||||||
{
|
{
|
||||||
// can fire
|
// can fire
|
||||||
|
|
||||||
if ( m_timerTimer <= 0 )
|
if ( m_timerTimer <= 0 && !m_animPlaying )
|
||||||
{
|
{
|
||||||
CProjectile *projectile;
|
if ( m_animNo != ANIM_ANENOMELVL1_FIRE )
|
||||||
projectile = new( "test projectile" ) CProjectile;
|
{
|
||||||
projectile->init( Pos, m_heading );
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_ANENOMELVL1_FIRE;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CProjectile *projectile;
|
||||||
|
projectile = new( "test projectile" ) CProjectile;
|
||||||
|
projectile->init( Pos, m_heading );
|
||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
m_timerTimer = GameState::getOneSecondInFrames();
|
m_timerTimer = GameState::getOneSecondInFrames();
|
||||||
|
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_ANENOMELVL1_BEND;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -127,19 +148,28 @@ void CNpcEnemy::processCloseAnemone2Attack( int _frames )
|
||||||
CProjectile *projectile;
|
CProjectile *projectile;
|
||||||
s16 heading;
|
s16 heading;
|
||||||
|
|
||||||
for ( fireLoop = 0 ; fireLoop < 5 ; fireLoop++ )
|
if ( m_animNo != ANIM_SPIKEYANENOME_BODY )
|
||||||
{
|
{
|
||||||
heading = m_heading - 1024 + ( fireLoop * 512 );
|
m_animPlaying = true;
|
||||||
heading %= 4096;
|
m_animNo = ANIM_SPIKEYANENOME_BODY;
|
||||||
|
m_frame = 0;
|
||||||
projectile = new( "test projectile" ) CProjectile;
|
|
||||||
projectile->init( Pos, heading );
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for ( fireLoop = 0 ; fireLoop < 5 ; fireLoop++ )
|
||||||
|
{
|
||||||
|
heading = m_heading - 1024 + ( fireLoop * 512 );
|
||||||
|
heading %= 4096;
|
||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
projectile = new( "test projectile" ) CProjectile;
|
||||||
m_timerFunc = NPC_TIMER_ATTACK_DONE;
|
projectile->init( Pos, heading );
|
||||||
m_timerTimer = GameState::getOneSecondInFrames();
|
}
|
||||||
m_sensorFunc = NPC_SENSOR_NONE;
|
|
||||||
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
|
m_timerFunc = NPC_TIMER_ATTACK_DONE;
|
||||||
|
m_timerTimer = GameState::getOneSecondInFrames();
|
||||||
|
m_sensorFunc = NPC_SENSOR_NONE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNpcEnemy::processCloseAnemone3Attack( int _frames )
|
void CNpcEnemy::processCloseAnemone3Attack( int _frames )
|
||||||
|
|
|
@ -27,10 +27,21 @@
|
||||||
#include "projectl\projectl.h"
|
#include "projectl\projectl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_IRONDOGFISH_HEADER__
|
||||||
|
#include <ACTOR_IRONDOGFISH_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void CNpcEnemy::processIronDogfishMovement( int _frames )
|
void CNpcEnemy::processIronDogfishMovement( int _frames )
|
||||||
{
|
{
|
||||||
if ( m_movementTimer > 0 )
|
if ( m_movementTimer > 0 )
|
||||||
{
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_IRONDOGFISH_WALK;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
m_movementTimer -= _frames;
|
m_movementTimer -= _frames;
|
||||||
|
|
||||||
if ( m_extendDir == EXTEND_RIGHT )
|
if ( m_extendDir == EXTEND_RIGHT )
|
||||||
|
@ -86,14 +97,30 @@ void CNpcEnemy::processStandardIronDogfishAttack( int _frames )
|
||||||
{
|
{
|
||||||
if ( playerXDistSqr > 100 )
|
if ( playerXDistSqr > 100 )
|
||||||
{
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_IRONDOGFISH_WALK;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
processGenericGotoTarget( _frames, playerXDist, 0, m_data[m_type].speed );
|
processGenericGotoTarget( _frames, playerXDist, 0, m_data[m_type].speed );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// thump player
|
// thump player
|
||||||
|
|
||||||
m_state++;
|
if ( m_animNo != ANIM_IRONDOGFISH_PUNCH )
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_IRONDOGFISH_PUNCH;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
else if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_state++;
|
||||||
|
m_movementTimer = GameState::getOneSecondInFrames() * 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -128,6 +155,13 @@ void CNpcEnemy::processStandardIronDogfishAttack( int _frames )
|
||||||
|
|
||||||
if ( playerXDistSqr > 100 )
|
if ( playerXDistSqr > 100 )
|
||||||
{
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_IRONDOGFISH_WALK;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
processGenericGotoTarget( _frames, playerXDist, 0, 6 );
|
processGenericGotoTarget( _frames, playerXDist, 0, 6 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -56,10 +56,6 @@
|
||||||
// Friend NPCs
|
// Friend NPCs
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class CLayerCollision *CNpcFriend::m_layerCollision;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
void CNpcFriend::init()
|
void CNpcFriend::init()
|
||||||
{
|
{
|
||||||
CNpcThing::init();
|
CNpcThing::init();
|
||||||
|
@ -70,11 +66,12 @@ void CNpcFriend::init()
|
||||||
m_extension = EXTEND_RIGHT;
|
m_extension = EXTEND_RIGHT;
|
||||||
|
|
||||||
// temporary
|
// temporary
|
||||||
|
m_actorGfx=CActorPool::GetActor(ACTORS_CLAM_SBK);
|
||||||
|
|
||||||
|
//m_animPlaying = true;
|
||||||
m_animNo = 0;
|
m_animNo = 0;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
m_type = NPC_FRIEND_GARY;
|
|
||||||
|
|
||||||
DVECTOR ofs = getCollisionSize();
|
DVECTOR ofs = getCollisionSize();
|
||||||
|
|
||||||
m_drawOffset.vx = 0;
|
m_drawOffset.vx = 0;
|
||||||
|
@ -196,7 +193,6 @@ s32 CNpcEnemy::playerXDist;
|
||||||
s32 CNpcEnemy::playerYDist;
|
s32 CNpcEnemy::playerYDist;
|
||||||
s32 CNpcEnemy::playerXDistSqr;
|
s32 CNpcEnemy::playerXDistSqr;
|
||||||
s32 CNpcEnemy::playerYDistSqr;
|
s32 CNpcEnemy::playerYDistSqr;
|
||||||
class CLayerCollision *CNpcEnemy::m_layerCollision;
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -223,7 +219,9 @@ void CNpcEnemy::init()
|
||||||
|
|
||||||
m_extendDir = EXTEND_RIGHT;
|
m_extendDir = EXTEND_RIGHT;
|
||||||
|
|
||||||
Pos.vx = 400;
|
//Pos.vx = 400;
|
||||||
|
//Pos.vy = 400;
|
||||||
|
Pos.vx = 100;
|
||||||
Pos.vy = 100;
|
Pos.vy = 100;
|
||||||
|
|
||||||
m_base = Pos;
|
m_base = Pos;
|
||||||
|
@ -233,8 +231,6 @@ void CNpcEnemy::init()
|
||||||
|
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
|
|
||||||
m_layerCollision = NULL;
|
|
||||||
|
|
||||||
m_npcPath.initPath();
|
m_npcPath.initPath();
|
||||||
|
|
||||||
DVECTOR ofs = getCollisionSize();
|
DVECTOR ofs = getCollisionSize();
|
||||||
|
@ -281,6 +277,29 @@ void CNpcEnemy::init()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_INIT_HERMIT_CRAB:
|
||||||
|
{
|
||||||
|
DVECTOR newPos;
|
||||||
|
|
||||||
|
newPos.vx = 100;
|
||||||
|
//newPos.vy = 10;
|
||||||
|
newPos.vy = 100;
|
||||||
|
|
||||||
|
m_npcPath.addWaypoint( newPos );
|
||||||
|
|
||||||
|
newPos.vx = 500;
|
||||||
|
//newPos.vy = 10;
|
||||||
|
newPos.vy = 100;
|
||||||
|
|
||||||
|
m_npcPath.addWaypoint( newPos );
|
||||||
|
|
||||||
|
m_npcPath.setPathType( PONG_PATH );
|
||||||
|
|
||||||
|
m_state = HERMIT_CRAB_NO_ATTACK;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NPC_INIT_GHOST_PIRATE:
|
case NPC_INIT_GHOST_PIRATE:
|
||||||
m_heading = m_fireHeading = 3072;
|
m_heading = m_fireHeading = 3072;
|
||||||
|
|
||||||
|
@ -551,7 +570,7 @@ void CNpcEnemy::think(int _frames)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_frame = frameCount;
|
m_frame = frameCount - 1;
|
||||||
m_animPlaying = false;
|
m_animPlaying = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -876,6 +895,20 @@ bool CNpcEnemy::processSensor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_SENSOR_HERMIT_CRAB_USER_CLOSE:
|
||||||
|
{
|
||||||
|
if ( playerXDistSqr + playerYDistSqr < 400 )
|
||||||
|
{
|
||||||
|
m_controlFunc = NPC_CONTROL_CLOSE;
|
||||||
|
|
||||||
|
return( true );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return( false );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE:
|
case NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE:
|
||||||
{
|
{
|
||||||
if ( playerXDistSqr + playerYDistSqr < 400 )
|
if ( playerXDistSqr + playerYDistSqr < 400 )
|
||||||
|
@ -963,10 +996,29 @@ void CNpcEnemy::processMovement(int _frames)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_MOVEMENT_STATIC_CYCLE_ANIM:
|
||||||
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = m_data[m_type].initAnim;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case NPC_MOVEMENT_FIXED_PATH:
|
case NPC_MOVEMENT_FIXED_PATH:
|
||||||
{
|
{
|
||||||
processGenericFixedPathMove( _frames, &moveX, &moveY, &moveVel, &moveDist );
|
processGenericFixedPathMove( _frames, &moveX, &moveY, &moveVel, &moveDist );
|
||||||
|
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = m_data[m_type].moveAnim;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,6 +1026,13 @@ void CNpcEnemy::processMovement(int _frames)
|
||||||
{
|
{
|
||||||
processGenericFixedPathWalk( _frames, &moveX, &moveY );
|
processGenericFixedPathWalk( _frames, &moveX, &moveY );
|
||||||
|
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = m_data[m_type].moveAnim;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1202,6 +1261,11 @@ void CNpcEnemy::processClose(int _frames)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case NPC_CLOSE_HERMIT_CRAB_ATTACK:
|
||||||
|
processCloseHermitCrabAttack( _frames );
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1261,8 +1325,13 @@ void CNpcEnemy::render()
|
||||||
DVECTOR renderPos;
|
DVECTOR renderPos;
|
||||||
DVECTOR offset = CLevel::getCameraPos();
|
DVECTOR offset = CLevel::getCameraPos();
|
||||||
|
|
||||||
renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) ) * 20;
|
//renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) );// * 20;
|
||||||
renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) ) * 20;
|
//renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) );// * 20;
|
||||||
|
|
||||||
|
int W=m_actorGfx->getFrameWidth(m_animNo,m_frame);
|
||||||
|
int H=m_actorGfx->getFrameHeight(m_animNo,m_frame);
|
||||||
|
renderPos.vx = Pos.vx - offset.vx /*+ ( scrnWidth >> 1 )*/ - ( W >> 1 );
|
||||||
|
renderPos.vy = Pos.vy - offset.vy /*+ ( scrnHeight >> 1 )*/ - ( H >> 1 );
|
||||||
|
|
||||||
if ( m_reversed )
|
if ( m_reversed )
|
||||||
{
|
{
|
||||||
|
@ -1272,8 +1341,9 @@ void CNpcEnemy::render()
|
||||||
{
|
{
|
||||||
//!! m_actorGfx.setZAng( m_heading );
|
//!! m_actorGfx.setZAng( m_heading );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_actorGfx->Render(renderPos,m_frame,m_animNo,m_reversed);
|
m_actorGfx->Render(renderPos,m_animNo,m_frame,m_reversed);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -54,6 +54,10 @@ public:
|
||||||
void render();
|
void render();
|
||||||
void processEvent( GAME_EVENT evt, CThing *sourceThing );
|
void processEvent( GAME_EVENT evt, CThing *sourceThing );
|
||||||
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
|
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
|
||||||
|
void setType( NPC_FRIEND_UNIT_TYPE newType ) {m_type = newType;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CLayerCollision *m_layerCollision;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
enum NPC_FRIEND_MOVEMENT_FUNC
|
enum NPC_FRIEND_MOVEMENT_FUNC
|
||||||
|
@ -86,7 +90,6 @@ protected:
|
||||||
|
|
||||||
static NPC_FRIEND_DATA m_data[NPC_FRIEND_UNIT_TYPE_MAX];
|
static NPC_FRIEND_DATA m_data[NPC_FRIEND_UNIT_TYPE_MAX];
|
||||||
|
|
||||||
static class CLayerCollision *m_layerCollision;
|
|
||||||
//class SpriteBank *m_spriteBank;
|
//class SpriteBank *m_spriteBank;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -164,6 +167,9 @@ public:
|
||||||
void setHeading( s32 newHeading ) {m_heading = newHeading;}
|
void setHeading( s32 newHeading ) {m_heading = newHeading;}
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
class CLayerCollision *m_layerCollision;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// NPC data structure definitions //
|
// NPC data structure definitions //
|
||||||
|
|
||||||
|
@ -188,6 +194,7 @@ protected:
|
||||||
NPC_INIT_CIRCULAR_PLATFORM,
|
NPC_INIT_CIRCULAR_PLATFORM,
|
||||||
NPC_INIT_PARASITIC_WORM,
|
NPC_INIT_PARASITIC_WORM,
|
||||||
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
||||||
|
NPC_INIT_HERMIT_CRAB,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPC_CONTROL_FUNC
|
enum NPC_CONTROL_FUNC
|
||||||
|
@ -217,6 +224,7 @@ protected:
|
||||||
NPC_SENSOR_FALLING_ITEM_USER_CLOSE,
|
NPC_SENSOR_FALLING_ITEM_USER_CLOSE,
|
||||||
NPC_SENSOR_FISH_HOOK_USER_CLOSE,
|
NPC_SENSOR_FISH_HOOK_USER_CLOSE,
|
||||||
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
||||||
|
NPC_SENSOR_HERMIT_CRAB_USER_CLOSE,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPC_CLOSE_FUNC
|
enum NPC_CLOSE_FUNC
|
||||||
|
@ -243,6 +251,7 @@ protected:
|
||||||
NPC_CLOSE_FISH_HOOK_RISE,
|
NPC_CLOSE_FISH_HOOK_RISE,
|
||||||
NPC_CLOSE_FLAMING_SKULL_ATTACK,
|
NPC_CLOSE_FLAMING_SKULL_ATTACK,
|
||||||
NPC_CLOSE_SKELETAL_FISH_ATTACK,
|
NPC_CLOSE_SKELETAL_FISH_ATTACK,
|
||||||
|
NPC_CLOSE_HERMIT_CRAB_ATTACK,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPC_MOVEMENT_FUNC
|
enum NPC_MOVEMENT_FUNC
|
||||||
|
@ -259,6 +268,7 @@ protected:
|
||||||
NPC_MOVEMENT_RETURNING_HAZARD,
|
NPC_MOVEMENT_RETURNING_HAZARD,
|
||||||
NPC_MOVEMENT_CLAM_RETRACT,
|
NPC_MOVEMENT_CLAM_RETRACT,
|
||||||
NPC_MOVEMENT_PARASITIC_WORM,
|
NPC_MOVEMENT_PARASITIC_WORM,
|
||||||
|
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NPC_MOVEMENT_MODIFIER_FUNC
|
enum NPC_MOVEMENT_MODIFIER_FUNC
|
||||||
|
@ -320,6 +330,13 @@ protected:
|
||||||
FLAMING_SKULL_RETURN = 1,
|
FLAMING_SKULL_RETURN = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum NPC_HERMIT_CRAB_STATE
|
||||||
|
{
|
||||||
|
HERMIT_CRAB_NO_ATTACK = 0,
|
||||||
|
HERMIT_CRAB_PUNCH_ATTACK = 1,
|
||||||
|
HERMIT_CRAB_ROLL_ATTACK = 2,
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
NPC_JELLYFISH_RESISTANCE = 64,
|
NPC_JELLYFISH_RESISTANCE = 64,
|
||||||
|
@ -352,6 +369,7 @@ protected:
|
||||||
bool detectCollision;
|
bool detectCollision;
|
||||||
DAMAGE_TYPE damageToUserType;
|
DAMAGE_TYPE damageToUserType;
|
||||||
u16 initHealth;
|
u16 initHealth;
|
||||||
|
u16 moveAnim;
|
||||||
}
|
}
|
||||||
NPC_DATA;
|
NPC_DATA;
|
||||||
|
|
||||||
|
@ -395,6 +413,10 @@ protected:
|
||||||
|
|
||||||
void processCloseSpiderCrabAttack( int _frames );
|
void processCloseSpiderCrabAttack( int _frames );
|
||||||
|
|
||||||
|
// hermit crab functions
|
||||||
|
|
||||||
|
void processCloseHermitCrabAttack( int _frames );
|
||||||
|
|
||||||
// ghost pirate functions
|
// ghost pirate functions
|
||||||
|
|
||||||
void processCloseGhostPirateAttack( int _frames );
|
void processCloseGhostPirateAttack( int _frames );
|
||||||
|
@ -472,8 +494,6 @@ protected:
|
||||||
static s32 playerXDistSqr;
|
static s32 playerXDistSqr;
|
||||||
static s32 playerYDistSqr;
|
static s32 playerYDistSqr;
|
||||||
|
|
||||||
static class CLayerCollision *m_layerCollision;
|
|
||||||
|
|
||||||
// internal variables
|
// internal variables
|
||||||
|
|
||||||
NPC_UNIT_TYPE m_type;
|
NPC_UNIT_TYPE m_type;
|
||||||
|
@ -515,6 +535,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
CNpcPositionHistory *m_positionHistory;
|
CNpcPositionHistory *m_positionHistory;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,78 @@
|
||||||
#include <ACTOR_CLAM_ANIM.h>
|
#include <ACTOR_CLAM_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_ANENOMELVL1_HEADER__
|
||||||
|
#include <ACTOR_ANENOMELVL1_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_BABYOCTOPUS_HEADER__
|
||||||
|
#include <ACTOR_BABYOCTOPUS_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_CATERPILLAR_HEADER__
|
||||||
|
#include <ACTOR_CATERPILLAR_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_DUSTDEVIL_HEADER__
|
||||||
|
#include <ACTOR_DUSTDEVIL_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_EYEBALL_HEADER__
|
||||||
|
#include <ACTOR_EYEBALL_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_FLAMINGSKULL_HEADER__
|
||||||
|
#include <ACTOR_FLAMINGSKULL_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_FLYINGDUTCHMAN_HEADER__
|
||||||
|
#include <ACTOR_FLYINGDUTCHMAN_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_GHOST_HEADER__
|
||||||
|
#include <ACTOR_GHOST_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_HERMITCRAB_HEADER__
|
||||||
|
#include <ACTOR_HERMITCRAB_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_IRONDOGFISH_HEADER__
|
||||||
|
#include <ACTOR_IRONDOGFISH_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_JELLYFISH1_HEADER__
|
||||||
|
#include <ACTOR_JELLYFISH1_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_PUFFAFISH_HEADER__
|
||||||
|
#include <ACTOR_PUFFAFISH_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SHARKMAN_HEADER__
|
||||||
|
#include <ACTOR_SHARKMAN_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SKELETALFISH_HEADER__
|
||||||
|
#include <ACTOR_SKELETALFISH_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SPIDERCRAB_HEADER__
|
||||||
|
#include <ACTOR_SPIDERCRAB_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SQUIDDART_HEADER__
|
||||||
|
#include <ACTOR_SQUIDDART_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_STOMPER_HEADER__
|
||||||
|
#include <ACTOR_STOMPER_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SPIKEYANENOME_HEADER__
|
||||||
|
#include <ACTOR_SPIKEYANENOME_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
//#ifndef __ANIM_SHARKSUB_HEADER__
|
//#ifndef __ANIM_SHARKSUB_HEADER__
|
||||||
//#include <ACTOR_SHARKSUB_ANIM.h>
|
//#include <ACTOR_SHARKSUB_ANIM.h>
|
||||||
//#endif
|
//#endif
|
||||||
|
@ -120,6 +192,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SQUASH_ENEMY,
|
DAMAGE__SQUASH_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_HOOK
|
{ // NPC_FISH_HOOK
|
||||||
|
@ -137,11 +210,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_DUST_DEVIL
|
{ // NPC_DUST_DEVIL
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_DUSTDEVIL_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_DUSTDEVIL_TWIST,
|
||||||
NPC_INIT_RETURNING_HAZARD,
|
NPC_INIT_RETURNING_HAZARD,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_RETURNING_HAZARD,
|
NPC_MOVEMENT_RETURNING_HAZARD,
|
||||||
|
@ -154,6 +228,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
0,
|
0,
|
||||||
|
ANIM_DUSTDEVIL_TWIST,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PENDULUM
|
{ // NPC_PENDULUM
|
||||||
|
@ -171,6 +246,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FIREBALL
|
{ // NPC_FIREBALL
|
||||||
|
@ -188,6 +264,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__BURN_ENEMY,
|
DAMAGE__BURN_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SAW_BLADE
|
{ // NPC_SAW_BLADE
|
||||||
|
@ -205,11 +282,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_1
|
{ // NPC_SMALL_JELLYFISH_1
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_JELLYFISH1_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_JELLYFISH1_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -222,6 +300,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SHOCK_ENEMY,
|
DAMAGE__SHOCK_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
ANIM_JELLYFISH1_SWIM,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_2
|
{ // NPC_SMALL_JELLYFISH_2
|
||||||
|
@ -239,14 +318,15 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SHOCK_ENEMY,
|
DAMAGE__SHOCK_ENEMY,
|
||||||
32,
|
32,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_1
|
{ // NPC_ANEMONE_1
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_ANENOMELVL1_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_ANENOMELVL1_BEND,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
NPC_CLOSE_ANEMONE_1_ATTACK,
|
NPC_CLOSE_ANEMONE_1_ATTACK,
|
||||||
NPC_TIMER_NONE,
|
NPC_TIMER_NONE,
|
||||||
|
@ -256,11 +336,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
16,
|
16,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_2
|
{ // NPC_ANEMONE_2
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_SPIKEYANENOME_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_SPIKEYANENOME_BODY,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -273,6 +354,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
32,
|
32,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_3
|
{ // NPC_ANEMONE_3
|
||||||
|
@ -290,11 +372,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
48,
|
48,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKELETAL_FISH
|
{ // NPC_SKELETAL_FISH
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_SKELETALFISH_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_SKELETALFISH_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -307,6 +390,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__BITE_ENEMY,
|
DAMAGE__BITE_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_SKELETALFISH_SWIM,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CLAM_JUMP
|
{ // NPC_CLAM_JUMP
|
||||||
|
@ -324,6 +408,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CLAM_STATIC
|
{ // NPC_CLAM_STATIC
|
||||||
|
@ -341,11 +426,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SQUID_DART
|
{ // NPC_SQUID_DART
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_SQUIDDART_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_SQUIDDART_SWIM,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -358,6 +444,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
ANIM_SQUIDDART_SWIM,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_FOLK
|
{ // NPC_FISH_FOLK
|
||||||
|
@ -375,11 +462,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PRICKLY_BUG
|
{ // NPC_PRICKLY_BUG
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_CATERPILLAR_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_CATERPILLAR_CRAWL,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -392,6 +480,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__POISON_ENEMY,
|
DAMAGE__POISON_ENEMY,
|
||||||
48,
|
48,
|
||||||
|
ANIM_CATERPILLAR_CRAWL,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SEA_SNAKE
|
{ // NPC_SEA_SNAKE
|
||||||
|
@ -409,11 +498,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SHOCK_ENEMY,
|
DAMAGE__SHOCK_ENEMY,
|
||||||
56,
|
56,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PUFFA_FISH
|
{ // NPC_PUFFA_FISH
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_PUFFAFISH_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_PUFFAFISH_PUFFUPIDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -426,6 +516,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
64,
|
64,
|
||||||
|
ANIM_PUFFAFISH_SWIM,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANGLER_FISH
|
{ // NPC_ANGLER_FISH
|
||||||
|
@ -443,16 +534,17 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__NONE,
|
DAMAGE__NONE,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_HERMIT_CRAB
|
{ // NPC_HERMIT_CRAB
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_HERMITCRAB_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_HERMITCRAB_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_HERMIT_CRAB,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_HERMIT_CRAB_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
NPC_CLOSE_NONE,
|
NPC_CLOSE_HERMIT_CRAB_ATTACK,
|
||||||
NPC_TIMER_NONE,
|
NPC_TIMER_NONE,
|
||||||
false,
|
false,
|
||||||
2,
|
2,
|
||||||
|
@ -460,6 +552,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_HERMITCRAB_SCUTTLE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MINE
|
{ // NPC_MINE
|
||||||
|
@ -477,6 +570,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BOOGER_MONSTER
|
{ // NPC_BOOGER_MONSTER
|
||||||
|
@ -494,11 +588,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__BITE_ENEMY,
|
DAMAGE__BITE_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SPIDER_CRAB
|
{ // NPC_SPIDER_CRAB
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_SPIDERCRAB_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_SPIDERCRAB_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_SPIDER_CRAB_USER_CLOSE,
|
NPC_SENSOR_SPIDER_CRAB_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -511,11 +606,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__PINCH_ENEMY,
|
DAMAGE__PINCH_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_SPIDERCRAB_RUN,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_EYEBALL
|
{ // NPC_EYEBALL
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_EYEBALL_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_EYEBALL_STALK,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_EYEBALL_USER_CLOSE,
|
NPC_SENSOR_EYEBALL_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -528,11 +624,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
32,
|
32,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BABY_OCTOPUS
|
{ // NPC_BABY_OCTOPUS
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_BABYOCTOPUS_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_BABYOCTOPUS_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -545,6 +642,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_BABYOCTOPUS_SWIM,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ZOMBIE_FISH_FOLK
|
{ // NPC_ZOMBIE_FISH_FOLK
|
||||||
|
@ -562,6 +660,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_NINJA_STARFISH
|
{ // NPC_NINJA_STARFISH
|
||||||
|
@ -579,11 +678,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST
|
{ // NPC_GHOST
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_GHOST_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_GHOST_IDLE,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -596,6 +696,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_GHOST_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST_PIRATE
|
{ // NPC_GHOST_PIRATE
|
||||||
|
@ -613,14 +714,15 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
160,
|
160,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLAMING_SKULL
|
{ // NPC_FLAMING_SKULL
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_FLAMINGSKULL_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_FLAMINGSKULL_MOVE,
|
||||||
NPC_INIT_FLAMING_SKULL,
|
NPC_INIT_FLAMING_SKULL,
|
||||||
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
|
||||||
NPC_MOVEMENT_MODIFIER_NONE,
|
NPC_MOVEMENT_MODIFIER_NONE,
|
||||||
NPC_CLOSE_FLAMING_SKULL_ATTACK,
|
NPC_CLOSE_FLAMING_SKULL_ATTACK,
|
||||||
NPC_TIMER_NONE,
|
NPC_TIMER_NONE,
|
||||||
|
@ -630,11 +732,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__BURN_ENEMY,
|
DAMAGE__BURN_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
ANIM_FLAMINGSKULL_MOVE,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHARK_MAN
|
{ // NPC_SHARK_MAN
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_SHARKMAN_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_SHARKMAN_IDLE1_,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -647,6 +750,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__BITE_ENEMY,
|
DAMAGE__BITE_ENEMY,
|
||||||
16,
|
16,
|
||||||
|
ANIM_SHARKMAN_RUN,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_OIL_BLOB
|
{ // NPC_OIL_BLOB
|
||||||
|
@ -664,11 +768,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKULL_STOMPER
|
{ // NPC_SKULL_STOMPER
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_STOMPER_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_STOMPER_CRUSH,
|
||||||
NPC_INIT_SKULL_STOMPER,
|
NPC_INIT_SKULL_STOMPER,
|
||||||
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
|
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -681,6 +786,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SQUASH_ENEMY,
|
DAMAGE__SQUASH_ENEMY,
|
||||||
0,
|
0,
|
||||||
|
ANIM_STOMPER_CRUSH,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MOTHER_JELLYFISH
|
{ // NPC_MOTHER_JELLYFISH
|
||||||
|
@ -698,6 +804,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__SHOCK_ENEMY,
|
DAMAGE__SHOCK_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SUB_SHARK
|
{ // NPC_SUB_SHARK
|
||||||
|
@ -715,6 +822,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PARASITIC_WORM
|
{ // NPC_PARASITIC_WORM
|
||||||
|
@ -732,11 +840,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLYING_DUTCHMAN
|
{ // NPC_FLYING_DUTCHMAN
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_FLYINGDUTCHMAN_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_FLYINGDUTCHMAN_FLY,
|
||||||
NPC_INIT_FLYING_DUTCHMAN,
|
NPC_INIT_FLYING_DUTCHMAN,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FLYING_DUTCHMAN,
|
NPC_MOVEMENT_FLYING_DUTCHMAN,
|
||||||
|
@ -749,11 +858,12 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
ANIM_FLYINGDUTCHMAN_FLY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_IRON_DOGFISH
|
{ // NPC_IRON_DOGFISH
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_IRONDOGFISH_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_IRONDOGFISH_IDLE,
|
||||||
NPC_INIT_IRON_DOGFISH,
|
NPC_INIT_IRON_DOGFISH,
|
||||||
NPC_SENSOR_IRON_DOGFISH_USER_CLOSE,
|
NPC_SENSOR_IRON_DOGFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_IRON_DOGFISH,
|
NPC_MOVEMENT_IRON_DOGFISH,
|
||||||
|
@ -766,6 +876,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
ANIM_IRONDOGFISH_WALK,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PARASITIC_WORM_SEGMENT
|
{ // NPC_PARASITIC_WORM_SEGMENT
|
||||||
|
@ -783,5 +894,6 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
DAMAGE__HIT_ENEMY,
|
DAMAGE__HIT_ENEMY,
|
||||||
256,
|
256,
|
||||||
|
0,
|
||||||
},
|
},
|
||||||
};
|
};
|
|
@ -23,12 +23,23 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SPIDERCRAB_HEADER__
|
||||||
|
#include <ACTOR_SPIDERCRAB_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseSpiderCrabAttack( int _frames )
|
void CNpcEnemy::processCloseSpiderCrabAttack( int _frames )
|
||||||
{
|
{
|
||||||
s32 velocity;
|
s32 velocity;
|
||||||
DVECTOR newPos = Pos;
|
DVECTOR newPos = Pos;
|
||||||
|
|
||||||
|
if ( m_animNo != ANIM_SPIDERCRAB_JUMP )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_SPIDERCRAB_JUMP;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
velocity = m_velocity * _frames;
|
velocity = m_velocity * _frames;
|
||||||
|
|
||||||
if ( m_extendDir == EXTEND_RIGHT )
|
if ( m_extendDir == EXTEND_RIGHT )
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SHARKMAN_HEADER__
|
||||||
|
#include <ACTOR_SHARKMAN_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseSharkManAttack( int _frames )
|
void CNpcEnemy::processCloseSharkManAttack( int _frames )
|
||||||
{
|
{
|
||||||
|
@ -36,6 +40,13 @@ void CNpcEnemy::processCloseSharkManAttack( int _frames )
|
||||||
|
|
||||||
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
||||||
|
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_SHARKMAN_RUN;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
decDir = m_heading - headingToPlayer;
|
decDir = m_heading - headingToPlayer;
|
||||||
|
|
||||||
if ( decDir < 0 )
|
if ( decDir < 0 )
|
||||||
|
|
|
@ -125,6 +125,13 @@ void CNpcEnemy::processCloseSmallJellyfishEvade( int _frames )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = m_data[m_type].moveAnim;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
||||||
|
|
||||||
if ( m_evadeClockwise )
|
if ( m_evadeClockwise )
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_SKELETALFISH_HEADER__
|
||||||
|
#include <ACTOR_SKELETALFISH_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseSkeletalFishAttack( int _frames )
|
void CNpcEnemy::processCloseSkeletalFishAttack( int _frames )
|
||||||
{
|
{
|
||||||
|
@ -31,6 +35,13 @@ void CNpcEnemy::processCloseSkeletalFishAttack( int _frames )
|
||||||
|
|
||||||
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
s16 headingToPlayer = ratan2( playerYDist, playerXDist );
|
||||||
|
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_SKELETALFISH_SWIM;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
decDir = m_heading - headingToPlayer;
|
decDir = m_heading - headingToPlayer;
|
||||||
|
|
||||||
if ( decDir < 0 )
|
if ( decDir < 0 )
|
||||||
|
|
|
@ -23,12 +23,23 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_STOMPER_HEADER__
|
||||||
|
#include <ACTOR_STOMPER_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void CNpcEnemy::processCloseSkullStomperAttack( int _frames )
|
void CNpcEnemy::processCloseSkullStomperAttack( int _frames )
|
||||||
{
|
{
|
||||||
s8 groundHeight;
|
s8 groundHeight;
|
||||||
s8 yMovement;
|
s8 yMovement;
|
||||||
|
|
||||||
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_animNo = ANIM_STOMPER_CRUSH;
|
||||||
|
m_frame = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if ( m_timerTimer > 0 )
|
if ( m_timerTimer > 0 )
|
||||||
{
|
{
|
||||||
// wait
|
// wait
|
||||||
|
|
|
@ -157,6 +157,10 @@ SOURCE=..\..\..\source\enemy\nhazard.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\enemy\nhcrab.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\enemy\nmjfish.cpp
|
SOURCE=..\..\..\source\enemy\nmjfish.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue