This commit is contained in:
Charles 2001-01-22 16:02:38 +00:00
parent 1d72f15761
commit 31bdeca063
5 changed files with 66 additions and 2 deletions

View File

@ -60,8 +60,11 @@ enemy_src := 2denemy \
ngpirate \
nshrkman \
ngeneric \
nanemone \
enemy
projectl_src := projectl
fileio_src := fileio \
$($(FILE_SYSTEM)_FILESYS_SRC)

View File

@ -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;
}

View File

@ -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;

View File

@ -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();

View File

@ -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"