This commit is contained in:
Charles 2001-03-08 20:12:47 +00:00
parent 11410feeb4
commit 7ad4ef60f4
11 changed files with 344 additions and 70 deletions

View file

@ -295,16 +295,6 @@ void CNpcEnemy::processGenericFixedPathWalk( int _frames, s32 *moveX, s32 *moveY
}
}
void CNpcEnemy::processGenericCircularPath( int _frames )
{
m_rotation += m_data[m_type].speed;
m_rotation %= 4096;
Pos.vx = m_base.vx + ( ( m_extension * rcos( m_rotation ) ) >> 12 );
Pos.vy = m_base.vy + ( ( m_extension * rsin( m_rotation ) ) >> 12 );
}
bool CNpcEnemy::isCollisionWithGround()
{
ASSERT(m_layerCollision);

View file

@ -209,7 +209,7 @@ void CNpcEnemy::init()
{
CEnemyThing::init();
m_type = NPC_LINEAR_PLATFORM;
m_type = NPC_CLAM_STATIC;
// sActorHdr *Hdr = m_skel.Load( m_data[m_type].skelType );
// m_skel.Init( Hdr );
@ -891,13 +891,6 @@ void CNpcEnemy::processMovement(int _frames)
break;
}
case NPC_MOVEMENT_FIXED_CIRCULAR:
{
processGenericCircularPath( _frames );
break;
}
case NPC_MOVEMENT_MOTHER_JELLYFISH:
{
processMotherJellyfishMovement( _frames );

View file

@ -116,8 +116,6 @@ public:
NPC_PENDULUM,
NPC_FIREBALL,
NPC_SAW_BLADE,
NPC_LINEAR_PLATFORM,
NPC_CIRCULAR_PLATFORM,
NPC_SMALL_JELLYFISH_1,
NPC_SMALL_JELLYFISH_2,
NPC_ANEMONE_1,
@ -246,7 +244,6 @@ protected:
NPC_MOVEMENT_STATIC = 0,
NPC_MOVEMENT_FIXED_PATH = 1,
NPC_MOVEMENT_FIXED_PATH_WALK,
NPC_MOVEMENT_FIXED_CIRCULAR,
NPC_MOVEMENT_MOTHER_JELLYFISH,
NPC_MOVEMENT_SUB_SHARK,
NPC_MOVEMENT_FLYING_DUTCHMAN,
@ -357,7 +354,6 @@ protected:
void processGenericGetUserDist( int _frames, s32 *distX, s32 *distY );
void processGenericFixedPathMove( int _frames, s32 *moveX, s32 *moveY, s32 *moveVel, s32 *moveDist );
void processGenericFixedPathWalk( int _frames, s32 *moveX, s32 *moveY );
void processGenericCircularPath( int _frames );
bool processGroundCollisionReverse( s32 *moveX, s32 *moveY );
// small jellyfish functions

View file

@ -15,6 +15,10 @@
#include "enemy\npc.h"
#endif
#ifndef __ENEMY_NPLATFRM_H__
#include "enemy\nplatfrm.h"
#endif
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
@ -59,6 +63,32 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
},
};
CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
{
{ // NPC_LINEAR_PLATFORM
ACTORS_CLAM_A3D,
ANIM_CLAM_CLAMSHUT,
NPC_PLATFORM_MOVEMENT_FIXED_PATH,
3,
//512,
2048,
true,
DAMAGE__NONE,
0,
},
{ // NPC_CIRCULAR_PLATFORM
ACTORS_CLAM_A3D,
ANIM_CLAM_CLAMSHUT,
NPC_PLATFORM_MOVEMENT_FIXED_CIRCULAR,
3,
128,
false,
DAMAGE__NONE,
0,
},
};
CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
{
{ // NPC_FALLING_ITEM
@ -163,41 +193,6 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
0,
},
{ // NPC_LINEAR_PLATFORM
ACTORS_CLAM_A3D,
ANIM_CLAM_CLAMSHUT,
NPC_INIT_DEFAULT,
NPC_SENSOR_NONE,
NPC_MOVEMENT_FIXED_PATH,
NPC_MOVEMENT_MODIFIER_NONE,
NPC_CLOSE_NONE,
NPC_TIMER_NONE,
false,
3,
//512,
2048,
true,
DAMAGE__NONE,
0,
},
{ // NPC_CIRCULAR_PLATFORM
ACTORS_CLAM_A3D,
ANIM_CLAM_CLAMSHUT,
NPC_INIT_CIRCULAR_PLATFORM,
NPC_SENSOR_NONE,
NPC_MOVEMENT_FIXED_CIRCULAR,
NPC_MOVEMENT_MODIFIER_NONE,
NPC_CLOSE_NONE,
NPC_TIMER_NONE,
false,
3,
128,
false,
DAMAGE__NONE,
0,
},
{ // NPC_SMALL_JELLYFISH_1
ACTORS_CLAM_A3D,
ANIM_CLAM_CLAMSHUT,