diff --git a/makefile.gaz b/makefile.gaz index 0ae266892..2f7e9abb3 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -119,7 +119,8 @@ platform_src := platform \ pleaf \ pbwheel \ psbarrel \ - pjellfsh + pjellfsh \ + pclam hazard_src := hazard \ hfalling \ diff --git a/source/enemy/nclam.cpp b/source/enemy/nclam.cpp index 285cda59c..7fb0b8e7d 100644 --- a/source/enemy/nclam.cpp +++ b/source/enemy/nclam.cpp @@ -19,6 +19,14 @@ #include "enemy\nclam.h" #endif +#ifndef __PLATFORM_PCLAM_H__ +#include "platform\pclam.h" +#endif + +#ifndef __PLATFORM_PLATFORM_H__ +#include "platform\platform.h" +#endif + #ifndef __GAME_GAME_H__ #include "game\game.h" #endif @@ -186,6 +194,16 @@ void CNpcStaticClamEnemy::processShot( int _frames ) { m_isStunned = true; + // create platform in same place + + CNpcClamPlatform *platform = new ("clam platform") CNpcClamPlatform; + + platform->setType( CNpcClamPlatform::NPC_CLAM_PLATFORM ); + platform->setGraphic( (u8) 0 ); + platform->init( Pos ); + platform->setTiltable( false ); + platform->setBBox(); + break; } } @@ -202,7 +220,7 @@ void CNpcStaticClamEnemy::collidedWith( CThing *_thisThing ) } } -int CNpcStaticClamEnemy::checkCollisionAgainst( CThing *_thisThing, int _frames ) +/*int CNpcStaticClamEnemy::checkCollisionAgainst( CThing *_thisThing, int _frames ) { DVECTOR pos,thisThingPos; int radius; @@ -253,4 +271,4 @@ int CNpcStaticClamEnemy::checkCollisionAgainst( CThing *_thisThing, int _frames } return collided; -} \ No newline at end of file +}*/ \ No newline at end of file diff --git a/source/enemy/nclam.h b/source/enemy/nclam.h index e3c53227e..3fb477117 100644 --- a/source/enemy/nclam.h +++ b/source/enemy/nclam.h @@ -34,7 +34,7 @@ class CNpcStaticClamEnemy : public CNpcClamEnemy { public: virtual void postInit(); - virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); + //virtual int checkCollisionAgainst(CThing *_thisThing, int _frames); protected: virtual void collidedWith(CThing *_thisThing); virtual void processShot( int _frames ); diff --git a/source/platform/platdata.cpp b/source/platform/platdata.cpp index 7b360653b..f32eeed08 100644 --- a/source/platform/platdata.cpp +++ b/source/platform/platdata.cpp @@ -370,6 +370,18 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] = 0, NPC_PLATFORM_TIMER_NONE, }, + + { // NPC_CLAM_PLATFORM + 3, + 128, + true, + DAMAGE__NONE, + 0, + 4, + NPC_PLATFORM_INFINITE_LIFE, + 0, + NPC_PLATFORM_TIMER_NONE, + }, }; CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATFORM_TYPE_MAX] = @@ -401,4 +413,5 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF NPC_STEERABLE_BARREL_PLATFORM, NPC_JELLYFISH_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM, + NPC_CLAM_PLATFORM, }; diff --git a/source/platform/platform.h b/source/platform/platform.h index ca8737750..5944c9757 100644 --- a/source/platform/platform.h +++ b/source/platform/platform.h @@ -81,6 +81,7 @@ public: NPC_STEERABLE_BARREL_PLATFORM, NPC_JELLYFISH_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM, + NPC_CLAM_PLATFORM, NPC_PLATFORM_TYPE_MAX, }; diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index 4154c021a..549c91967 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -1249,6 +1249,14 @@ SOURCE=..\..\..\source\platform\pcirculr.h # End Source File # Begin Source File +SOURCE=..\..\..\source\platform\pclam.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\platform\pclam.h +# End Source File +# Begin Source File + SOURCE=..\..\..\source\platform\pdual.cpp # End Source File # Begin Source File