diff --git a/makefile.gaz b/makefile.gaz index fbec74edf..4736a0d91 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -60,8 +60,11 @@ enemy_src := 2denemy \ ngpirate \ nshrkman \ ngeneric \ + nanemone \ enemy +projectl_src := projectl + fileio_src := fileio \ $($(FILE_SYSTEM)_FILESYS_SRC) diff --git a/source/enemy/npc.cpp b/source/enemy/npc.cpp index 0cab61c0b..4b042e7b3 100644 --- a/source/enemy/npc.cpp +++ b/source/enemy/npc.cpp @@ -116,6 +116,18 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] = 128, }, + { // NPC_ANEMONE_2 + NPC_INIT_DEFAULT, + NPC_SENSOR_ANEMONE_USER_CLOSE, + NPC_MOVEMENT_STATIC, + NPC_MOVEMENT_MODIFIER_NONE, + NPC_CLOSE_ANEMONE_2_ATTACK, + NPC_TIMER_NONE, + false, + 0, + 128, + }, + { // NPC_CLAM NPC_INIT_DEFAULT, NPC_SENSOR_CLAM_USER_CLOSE, @@ -371,9 +383,9 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] = void CNpc::init() { - m_type = NPC_OIL_BLOB; + m_type = NPC_ANEMONE_2; - m_heading = 3072; + m_heading = m_baseHeading = 3072; m_movementTimer = 0; m_timerTimer = 0; m_velocity = 0; @@ -686,6 +698,20 @@ bool CNpc::processSensor() } } + case NPC_SENSOR_ANEMONE_USER_CLOSE: + { + if ( xDistSqr + yDistSqr < 10000 ) + { + m_controlFunc = NPC_CONTROL_CLOSE; + + return( true ); + } + else + { + return( false ); + } + } + default: return( false ); } @@ -871,6 +897,9 @@ void CNpc::processClose(int _frames) break; + case NPC_CLOSE_ANEMONE_2_ATTACK: + processCloseAnemone2Attack( _frames ); + default: break; } diff --git a/source/enemy/npc.h b/source/enemy/npc.h index c501d8c48..139365cdd 100644 --- a/source/enemy/npc.h +++ b/source/enemy/npc.h @@ -45,6 +45,7 @@ protected: NPC_SMALL_JELLYFISH_2, NPC_LARGE_JELLYFISH, NPC_ANEMONE_1, + NPC_ANEMONE_2, NPC_CLAM, NPC_SQUID_DART, NPC_FISH_FOLK, @@ -94,6 +95,7 @@ protected: NPC_SENSOR_GHOST_PIRATE_USER_CLOSE, NPC_SENSOR_SHARK_MAN_USER_VISIBLE, NPC_SENSOR_OIL_BLOB_USER_CLOSE, + NPC_SENSOR_ANEMONE_USER_CLOSE, }; enum NPC_CLOSE_FUNC @@ -105,6 +107,7 @@ protected: NPC_CLOSE_GHOST_PIRATE_ATTACK, NPC_CLOSE_SHARK_MAN_ATTACK, NPC_CLOSE_GENERIC_USER_SEEK, + NPC_CLOSE_ANEMONE_2_ATTACK, }; enum NPC_MOVEMENT_FUNC @@ -187,6 +190,10 @@ protected: void processCloseSharkManAttack( int _frames ); + // anemone functions + + void processCloseAnemone2Attack( int _frames ); + // data static NPC_DATA m_data[NPC_UNIT_TYPE_MAX]; @@ -199,6 +206,7 @@ protected: NPC_SENSOR_FUNC m_sensorFunc; CNpcPath m_npcPath; s32 m_heading; + s32 m_baseHeading; s32 m_movementTimer; s32 m_velocity; bool m_evadeClockwise; diff --git a/source/game/game.cpp b/source/game/game.cpp index 7bfbc1cae..13743b40c 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -22,6 +22,10 @@ #include "enemy\2denemy.h" #endif +#ifndef __PROJECTL_PROJECTL_H__ +#include "projectl\projectl.h" +#endif + #ifndef __GFX_FADER_H__ #include "gfx\fader.h" #endif @@ -67,6 +71,10 @@ void CGameScene::init() enemy=new ("test enemy") C2dEnemy; enemy->init(); + CProjectile *testProjectile; + testProjectile = new( "test projectile" ) CProjectile; + testProjectile->init(); + m_player=new ("player") CPlayer(); m_player->init(); diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index e90c093bb..84e3b67f1 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -125,6 +125,10 @@ SOURCE=..\..\..\source\enemy\enemy.h # End Source File # Begin Source File +SOURCE=..\..\..\source\enemy\nanemone.cpp +# End Source File +# Begin Source File + SOURCE=..\..\..\source\enemy\nclam.cpp # End Source File # Begin Source File @@ -820,6 +824,18 @@ SOURCE=..\..\..\source\utils\utils.cpp SOURCE=..\..\..\source\utils\utils.h # End Source File # End Group +# Begin Group "projectl" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\..\source\projectl\projectl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\projectl\projectl.h +# End Source File +# End Group # End Group # Begin Group "makefiles"