This commit is contained in:
Charles 2001-05-03 19:44:00 +00:00
parent 75f76ab80e
commit c7b23de032
7 changed files with 40 additions and 44 deletions

View file

@ -35,11 +35,19 @@
#include <ACTOR_PATRICK_Anim.h>
#endif
#ifndef __ANIM_BARNACLEBOY_HEADER__
#include <ACTOR_BARNACLEBOY_Anim.h>
#endif
#ifndef __ANIM_MERMAIDMAN_HEADER__
#include <ACTOR_MERMAIDMAN_Anim.h>
#endif
CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
{
{ // NPC_FRIEND_BARNACLE_BOY
ACTORS_CLAM_SBK,
ACTORS_BARNACLEBOY_SBK,
3,
128,
false,
@ -66,12 +74,12 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
},
{ // NPC_FRIEND_MERMAID_MAN
ACTORS_CLAM_SBK,
ACTORS_MERMAIDMAN_SBK,
3,
128,
false,
DAMAGE__HIT_ENEMY,
0,
ANIM_MERMAIDMAN_IDLEBREATHE,
},
{ // NPC_FRIEND_PATRICK

View file

@ -43,18 +43,17 @@ void CNpcFallingPlatformGenerator::render()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcPlatform *newPlatform;
void CNpcFallingPlatformGenerator::think( int _frames )
{
/*m_timer -= _frames;
m_timer -= _frames;
if ( m_timer < 0 )
{
m_timer = GameState::getOneSecondInFrames() + ( getRnd() * ( m_data[m_type].initTimer - 1 ) * GameState::getOneSecondInFrames() );
m_timer = GameState::getOneSecondInFrames() + ( getRnd() % ( ( m_data[m_type].initTimer - 1 ) * GameState::getOneSecondInFrames() ) );
// generate new falling platform
CNpcPlatform *newPlatform;
newPlatform = NULL;
switch( m_targetType )
@ -78,28 +77,28 @@ void CNpcFallingPlatformGenerator::think( int _frames )
newPlatform->setType( m_targetType );
newPlatform->setGraphic( m_graphicNum );
//CNpcWaypoint *sourceWaypoint = m_npcPath.getWaypointList();
CNpcWaypoint *sourceWaypoint = m_npcPath.getWaypointList();
//if ( sourceWaypoint )
if ( sourceWaypoint )
{
DVECTOR startPos;
//startPos.vx = sourceWaypoint->pos.vx;
//startPos.vy = sourceWaypoint->pos.vy;
startPos.vx = 100;
startPos.vy = 100;
startPos.vx = sourceWaypoint->pos.vx;
startPos.vy = sourceWaypoint->pos.vy;
//startPos.vx = 100;
//startPos.vy = 100;
newPlatform->init( startPos );
ASSERT(m_layerCollision);
//while( sourceWaypoint )
//{
//newPlatform->addWaypoint( sourceWaypoint->pos.vx >> 4, sourceWaypoint->pos.vy >> 4 );
//sourceWaypoint = sourceWaypoint->nextWaypoint;
//}
while( sourceWaypoint )
{
newPlatform->addWaypoint( sourceWaypoint->pos.vx >> 4, sourceWaypoint->pos.vy >> 4 );
sourceWaypoint = sourceWaypoint->nextWaypoint;
}
}
newPlatform->setLayerCollision( m_layerCollision );
//platform->setTiltable( false );
//platform->postInit();
}*/
newPlatform->setTiltable( false );
newPlatform->postInit();
}
}

View file

@ -113,10 +113,6 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class CLayerCollision *CNpcPlatform::m_layerCollision;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
@ -1125,13 +1121,6 @@ void CNpcPlatform::setTypeFromMapEdit( u16 newType )
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::setLayerCollision( class CLayerCollision *_layer )
{
m_layerCollision=_layer;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::getTypeFromMapEdit( u16 newType )
{
return( mapEditConvertTable[newType] );

View file

@ -82,9 +82,9 @@ public:
void shutdown();
virtual void think(int _frames);
virtual void render();
void setLayerCollision( class CLayerCollision *_layer );
void setType( NPC_PLATFORM_UNIT_TYPE newType ) {m_type = newType;}
void setTypeFromMapEdit( u16 newType );
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
#ifdef REMOVETHIS
// virtual int checkCollisionAgainst(CThing *_thisThing, int _frames);
virtual s32 getNewYPos( CThing *_thisThing );
@ -169,7 +169,7 @@ protected:
static s32 playerXDistSqr;
static s32 playerYDistSqr;
static class CLayerCollision *m_layerCollision;
class CLayerCollision *m_layerCollision;
// internal variables