This commit is contained in:
parent
dfb7f688c1
commit
8a1398c99b
7 changed files with 37 additions and 20 deletions
|
@ -1,2 +1,4 @@
|
||||||
bodystatic
|
bodystatic
|
||||||
headstatic
|
headstatic
|
||||||
|
arms
|
||||||
|
tail
|
|
@ -181,7 +181,7 @@ actors/GHOST.SBK
|
||||||
actors/HERMITCRAB.SBK
|
actors/HERMITCRAB.SBK
|
||||||
actors/IRONDOGFISH.SBK
|
actors/IRONDOGFISH.SBK
|
||||||
actors/PUFFAFISH.SBK
|
actors/PUFFAFISH.SBK
|
||||||
actors/SHARKMAN.SBK
|
actors/MANRAY.SBK
|
||||||
actors/SKELETALFISH.SBK
|
actors/SKELETALFISH.SBK
|
||||||
actors/SPIDERCRAB.SBK
|
actors/SPIDERCRAB.SBK
|
||||||
actors/SPIKEYANENOME.SBK
|
actors/SPIKEYANENOME.SBK
|
||||||
|
|
|
@ -112,7 +112,7 @@ ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan
|
||||||
|
|
||||||
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \
|
ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil \
|
||||||
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \
|
Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish \
|
||||||
PuffaFish Sharkman Skeletalfish SpiderCrab SpikeyAnenome Stomper \
|
PuffaFish Manray Skeletalfish SpiderCrab SpikeyAnenome Stomper \
|
||||||
SharkSub Motherjellyfish SeaSnake GiantWorm
|
SharkSub Motherjellyfish SeaSnake GiantWorm
|
||||||
|
|
||||||
# Boogermonster Nautilus Neptune
|
# Boogermonster Nautilus Neptune
|
||||||
|
|
|
@ -71,8 +71,8 @@
|
||||||
#include <ACTOR_PUFFAFISH_ANIM.h>
|
#include <ACTOR_PUFFAFISH_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SHARKMAN_HEADER__
|
#ifndef __ANIM_MANRAY_HEADER__
|
||||||
#include <ACTOR_SHARKMAN_ANIM.h>
|
#include <ACTOR_MANRAY_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SKELETALFISH_HEADER__
|
#ifndef __ANIM_SKELETALFISH_HEADER__
|
||||||
|
@ -817,8 +817,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHARK_MAN
|
{ // NPC_SHARK_MAN
|
||||||
ACTORS_SHARKMAN_SBK,
|
ACTORS_MANRAY_SBK,
|
||||||
ANIM_SHARKMAN_IDLE1_,
|
ANIM_MANRAY_WALK,
|
||||||
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
NPC_CLOSE_NONE,
|
NPC_CLOSE_NONE,
|
||||||
|
@ -829,7 +829,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
DETECT_ALL_COLLISION,
|
DETECT_ALL_COLLISION,
|
||||||
DAMAGE__BITE_ENEMY,
|
DAMAGE__BITE_ENEMY,
|
||||||
1,
|
1,
|
||||||
ANIM_SHARKMAN_RUN,
|
ANIM_MANRAY_WALK,
|
||||||
NPC_SHOT_GENERIC,
|
NPC_SHOT_GENERIC,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -39,22 +39,26 @@
|
||||||
#include <sprites.h>
|
#include <sprites.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SHARKMAN_HEADER__
|
#ifndef __ANIM_MANRAY_HEADER__
|
||||||
#include <ACTOR_SHARKMAN_ANIM.h>
|
#include <ACTOR_MANRAY_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ANIM_SHARKMAN_IDLE2_ ANIM_SHARKMAN_IDLE1_
|
|
||||||
#define ANIM_SHARKMAN_KICK_SAND ANIM_SHARKMAN_IDLE1_
|
|
||||||
#define ANIM_SHARKMAN_PUSHUPS ANIM_SHARKMAN_IDLE1_
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcSharkManEnemy::processMovement( int _frames )
|
void CNpcSharkManEnemy::processMovement( int _frames )
|
||||||
{
|
{
|
||||||
s32 moveX = 0, moveY = 0;
|
s32 moveX = 0, moveY = 0;
|
||||||
|
|
||||||
if ( m_movementTimer > 0 )
|
if ( !m_animPlaying )
|
||||||
|
{
|
||||||
|
m_animPlaying = true;
|
||||||
|
m_frame = 0;
|
||||||
|
m_animNo = m_data[m_type].moveAnim;
|
||||||
|
}
|
||||||
|
|
||||||
|
processGenericFixedPathWalk( _frames, &moveX, &moveY );
|
||||||
|
|
||||||
|
/*if ( m_movementTimer > 0 )
|
||||||
{
|
{
|
||||||
m_movementTimer -= _frames;
|
m_movementTimer -= _frames;
|
||||||
|
|
||||||
|
@ -130,7 +134,7 @@ void CNpcSharkManEnemy::processMovement( int _frames )
|
||||||
|
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
processMovementModifier( _frames, moveX, moveY, 0, 0 );
|
processMovementModifier( _frames, moveX, moveY, 0, 0 );
|
||||||
}
|
}
|
||||||
|
@ -139,10 +143,10 @@ void CNpcSharkManEnemy::processMovement( int _frames )
|
||||||
|
|
||||||
void CNpcSharkManEnemy::processClose( int _frames )
|
void CNpcSharkManEnemy::processClose( int _frames )
|
||||||
{
|
{
|
||||||
if ( m_animNo != ANIM_SHARKMAN_RUN )
|
if ( m_animNo != ANIM_MANRAY_ATTACK )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKMAN_RUN;
|
m_animNo = ANIM_MANRAY_ATTACK;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
else if ( !m_animPlaying )
|
else if ( !m_animPlaying )
|
||||||
|
|
|
@ -134,6 +134,15 @@ void CNpcParasiticWormEnemy::postInit()
|
||||||
|
|
||||||
m_segmentArray[segCount].setScale( segScale );
|
m_segmentArray[segCount].setScale( segScale );
|
||||||
|
|
||||||
|
if ( segCount == NPC_PARASITIC_WORM_LENGTH - 1 )
|
||||||
|
{
|
||||||
|
m_segmentArray[segCount].setAnim( ANIM_GIANTWORM_TAIL );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_segmentArray[segCount].setAnim( ANIM_GIANTWORM_BODYSTATIC );
|
||||||
|
}
|
||||||
|
|
||||||
// attach snake segment
|
// attach snake segment
|
||||||
|
|
||||||
if ( segCount < NPC_PARASITIC_WORM_LENGTH - 1 )
|
if ( segCount < NPC_PARASITIC_WORM_LENGTH - 1 )
|
||||||
|
@ -517,7 +526,7 @@ void CNpcParasiticWormSegment::render()
|
||||||
|
|
||||||
if ( renderFlag )
|
if ( renderFlag )
|
||||||
{
|
{
|
||||||
SprFrame = m_actorGfx->Render(renderPos,ANIM_GIANTWORM_BODYSTATIC,0,0);
|
SprFrame = m_actorGfx->Render(renderPos,m_animNo,0,0);
|
||||||
m_actorGfx->RotateScale( SprFrame, renderPos, m_heading, 4096, m_scale );
|
m_actorGfx->RotateScale( SprFrame, renderPos, m_heading, 4096, m_scale );
|
||||||
|
|
||||||
sBBox boundingBox = m_actorGfx->GetBBox();
|
sBBox boundingBox = m_actorGfx->GetBBox();
|
||||||
|
|
|
@ -33,6 +33,7 @@ public:
|
||||||
virtual CRECT const &getCollisionArea() {return m_collisionArea;}
|
virtual CRECT const &getCollisionArea() {return m_collisionArea;}
|
||||||
DVECTOR const &getCollisionCentre() {return m_collisionCentre;}
|
DVECTOR const &getCollisionCentre() {return m_collisionCentre;}
|
||||||
int getCollisionRadius() {return m_collisionRadius;}
|
int getCollisionRadius() {return m_collisionRadius;}
|
||||||
|
void setAnim( int newAnim ) {m_animNo = newAnim;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
u16 m_scale;
|
u16 m_scale;
|
||||||
|
@ -44,6 +45,7 @@ protected:
|
||||||
DVECTOR m_collisionCentreOffset;
|
DVECTOR m_collisionCentreOffset;
|
||||||
DVECTOR m_collisionSize;
|
DVECTOR m_collisionSize;
|
||||||
int m_collisionRadius;
|
int m_collisionRadius;
|
||||||
|
int m_animNo;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CNpcParasiticWormEnemy : public CNpcEnemy
|
class CNpcParasiticWormEnemy : public CNpcEnemy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue