diff --git a/data/DataCache.scr b/data/DataCache.scr index 6381bcecc..0e6b312d4 100644 --- a/data/DataCache.scr +++ b/data/DataCache.scr @@ -165,6 +165,7 @@ actors/SQUIDWARD.SBK actors/GARY.SBK actors/SANDY.SBK actors/PATRICK.SBK +actors/MERMAIDMAN.SBK actors/ANENOME.SBK actors/BABYOCTOPUS.SBK diff --git a/makefile.gfx b/makefile.gfx index f3c18f983..37d4b12f4 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -108,8 +108,7 @@ ACTOR_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/actor ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR) ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net -ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick -# MermaidMan +ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \ Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Lrgjellyfish \ diff --git a/source/friend/fdata.cpp b/source/friend/fdata.cpp index 8ab966a1f..a77d64086 100644 --- a/source/friend/fdata.cpp +++ b/source/friend/fdata.cpp @@ -35,11 +35,19 @@ #include #endif +#ifndef __ANIM_BARNACLEBOY_HEADER__ +#include +#endif + +#ifndef __ANIM_MERMAIDMAN_HEADER__ +#include +#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 diff --git a/source/platform/pfgen.cpp b/source/platform/pfgen.cpp index 5a14ef501..8bb2fa9cf 100644 --- a/source/platform/pfgen.cpp +++ b/source/platform/pfgen.cpp @@ -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(); + } } diff --git a/source/platform/platform.cpp b/source/platform/platform.cpp index 53569fbb2..560c179e0 100644 --- a/source/platform/platform.cpp +++ b/source/platform/platform.cpp @@ -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] ); diff --git a/source/platform/platform.h b/source/platform/platform.h index 67cf70c8d..546c715b5 100644 --- a/source/platform/platform.h +++ b/source/platform/platform.h @@ -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 diff --git a/tools/MapEdit/actor.ini b/tools/MapEdit/actor.ini index 883bf9e01..46bb2c20b 100644 --- a/tools/MapEdit/actor.ini +++ b/tools/MapEdit/actor.ini @@ -48,14 +48,14 @@ Collision=0 Health=0 AttackStrength=0 -#[MermaidMan] -#Gfx=..\..\graphics\characters\ -#WayPoints=0 -#Speed=0 -#TurnRate=0 -#Collision=0 -#Health=0 -#AttackStrength=0 +[MermaidMan] +Gfx=..\..\graphics\characters\MermaidMan\render\psx\MermaidMan_idleBreathe0000.bmp +WayPoints=0 +Speed=0 +TurnRate=0 +Collision=0 +Health=0 +AttackStrength=0 [Patrick] Gfx=..\..\graphics\characters\patrick\render\psx\patrick_idlebreathe0000.bmp