SBSPSS/source/enemy/npc.h

581 lines
13 KiB
C
Raw Normal View History

2001-01-16 22:56:29 +01:00
/*=========================================================================
npc.h
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
2001-01-16 20:35:34 +01:00
2001-01-18 20:18:39 +01:00
#ifndef __ENEMY_NPC_H__
#define __ENEMY_NPC_H__
2001-01-16 20:35:34 +01:00
//#include <dstructs.h>
2001-02-27 17:59:50 +01:00
#ifndef __THING_THING_H__
#include "thing/thing.h"
#endif
2001-04-01 22:22:49 +02:00
//#include "Gfx/Skel.h"
2001-01-16 20:35:34 +01:00
2001-01-18 20:18:39 +01:00
#ifndef __ENEMY_NPCPATH_H__
#include "enemy\npcpath.h"
#endif
2001-01-16 20:35:34 +01:00
2001-02-07 17:42:13 +01:00
#ifndef __PLAYER_PLAYER_H__
#include "player\player.h"
#endif
2001-02-27 22:25:22 +01:00
#ifndef __GFX_SPRBANK_H__
#include "gfx\sprbank.h"
#endif
2001-01-16 20:35:34 +01:00
/*****************************************************************************/
2001-02-27 22:25:22 +01:00
class CNpcFriend : public CNpcThing
{
public:
enum NPC_FRIEND_UNIT_TYPE
{
NPC_FRIEND_SANDY_CHEEKS = 0,
NPC_FRIEND_GARY = 1,
NPC_FRIEND_UNIT_TYPE_MAX,
};
void init();
void shutdown();
void think(int _frames);
2001-03-01 20:08:18 +01:00
void render();
2001-02-27 22:25:22 +01:00
void processEvent( GAME_EVENT evt, CThing *sourceThing );
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
2001-04-02 17:52:09 +02:00
void setType( NPC_FRIEND_UNIT_TYPE newType ) {m_type = newType;}
private:
class CLayerCollision *m_layerCollision;
2001-02-27 22:25:22 +01:00
protected:
enum NPC_FRIEND_MOVEMENT_FUNC
{
NPC_FRIEND_MOVEMENT_STATIC = 0,
NPC_FRIEND_MOVEMENT_GARY = 1,
};
typedef struct NPC_FRIEND_DATA_TYPE
{
//NPC_FRIEND_INIT_FUNC initFunc;
//NPC_FRIEND_SENSOR_FUNC sensorFunc;
NPC_FRIEND_MOVEMENT_FUNC movementFunc;
//NPC_FRIEND_MOVEMENT_MODIFIER_FUNC movementModifierFunc;
//NPC_FRIEND_CLOSE_FUNC closeFunc;
//NPC_FRIEND_TIMER_FUNC timerFunc;
bool canTalk;
u8 speed;
u16 turnSpeed;
bool detectCollision;
DAMAGE_TYPE damageToUserType;
}
NPC_FRIEND_DATA;
// gary functions
void processGaryMovement( int _frames );
// data
static NPC_FRIEND_DATA m_data[NPC_FRIEND_UNIT_TYPE_MAX];
//class SpriteBank *m_spriteBank;
enum
{
EXTEND_RIGHT = true,
EXTEND_LEFT = false,
};
// internal variables
NPC_FRIEND_UNIT_TYPE m_type;
s32 m_extension;
int m_frame;
int m_animNo;
2001-04-01 22:22:49 +02:00
CActorGfx *m_actorGfx;
2001-03-22 20:10:19 +01:00
DVECTOR m_drawOffset;
2001-04-04 18:51:04 +02:00
bool m_reversed;
2001-02-27 22:25:22 +01:00
};
class CNpcEnemy : public CEnemyThing
2001-01-16 20:35:34 +01:00
{
public:
enum NPC_UNIT_TYPE
{
2001-02-27 22:25:22 +01:00
NPC_FALLING_ITEM = 0,
NPC_FISH_HOOK = 1,
2001-01-29 22:18:11 +01:00
NPC_DUST_DEVIL,
2001-01-29 22:46:54 +01:00
NPC_PENDULUM,
2001-01-30 21:30:52 +01:00
NPC_FIREBALL,
2001-01-31 17:31:18 +01:00
NPC_SAW_BLADE,
2001-01-29 17:55:11 +01:00
NPC_SMALL_JELLYFISH_1,
2001-01-19 16:07:53 +01:00
NPC_SMALL_JELLYFISH_2,
2001-01-18 22:19:43 +01:00
NPC_ANEMONE_1,
2001-01-22 17:02:38 +01:00
NPC_ANEMONE_2,
2001-02-08 16:34:18 +01:00
NPC_ANEMONE_3,
2001-02-12 16:37:31 +01:00
NPC_SKELETAL_FISH,
2001-03-01 17:48:45 +01:00
NPC_CLAM_JUMP,
NPC_CLAM_STATIC,
2001-01-19 16:07:53 +01:00
NPC_SQUID_DART,
NPC_FISH_FOLK,
NPC_PRICKLY_BUG,
2001-03-26 18:44:45 +02:00
NPC_SEA_SNAKE,
2001-01-19 22:46:30 +01:00
NPC_PUFFA_FISH,
NPC_ANGLER_FISH,
NPC_HERMIT_CRAB,
NPC_MINE,
NPC_BOOGER_MONSTER,
NPC_SPIDER_CRAB,
NPC_EYEBALL,
NPC_BABY_OCTOPUS,
NPC_ZOMBIE_FISH_FOLK,
NPC_NINJA_STARFISH,
NPC_GHOST,
NPC_GHOST_PIRATE,
NPC_FLAMING_SKULL,
NPC_SHARK_MAN,
2001-01-22 15:23:11 +01:00
NPC_OIL_BLOB,
2001-01-23 18:03:27 +01:00
NPC_SKULL_STOMPER,
2001-01-25 16:45:15 +01:00
NPC_MOTHER_JELLYFISH,
2001-01-25 18:20:08 +01:00
NPC_SUB_SHARK,
2001-03-26 18:44:45 +02:00
NPC_PARASITIC_WORM,
2001-01-25 16:45:15 +01:00
NPC_FLYING_DUTCHMAN,
2001-01-25 20:57:29 +01:00
NPC_IRON_DOGFISH,
2001-03-26 18:44:45 +02:00
NPC_PARASITIC_WORM_SEGMENT,
2001-04-02 21:21:46 +02:00
NPC_BALL_BLOB,
2001-01-16 20:35:34 +01:00
NPC_UNIT_TYPE_MAX,
};
2001-01-22 23:24:53 +01:00
void init();
2001-04-04 00:01:52 +02:00
void postInit();
2001-01-22 23:24:53 +01:00
void shutdown();
void think(int _frames);
2001-03-01 20:08:18 +01:00
void render();
2001-01-22 23:24:53 +01:00
void processEvent( GAME_EVENT evt, CThing *sourceThing );
2001-02-12 18:37:55 +01:00
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
2001-03-26 18:44:45 +02:00
void setType( NPC_UNIT_TYPE newType ) {m_type = newType;}
2001-04-02 21:21:46 +02:00
void setTypeFromMapEdit( u16 newType );
2001-03-26 18:44:45 +02:00
void setHeading( s32 newHeading ) {m_heading = newHeading;}
2001-04-02 21:21:46 +02:00
void addWaypoint( s32 xPos, s32 yPos );
void setPathType( u8 newType ) {m_npcPath.setPathType( newType );}
void setStartPos( s32 xPos, s32 yPos );
2001-04-05 16:23:51 +02:00
void hasBeenAttacked();
2001-01-22 23:24:53 +01:00
2001-04-03 22:03:16 +02:00
static void CacheActor(int Type);
2001-01-22 23:24:53 +01:00
2001-04-02 17:52:09 +02:00
private:
class CLayerCollision *m_layerCollision;
2001-01-22 23:24:53 +01:00
protected:
// NPC data structure definitions //
2001-01-16 20:35:34 +01:00
enum NPC_INIT_FUNC
{
NPC_INIT_DEFAULT = 0,
NPC_INIT_SNAKE = 1,
NPC_INIT_ACID,
2001-01-22 20:48:57 +01:00
NPC_INIT_GHOST_PIRATE,
2001-01-23 18:03:27 +01:00
NPC_INIT_SKULL_STOMPER,
2001-01-25 16:45:15 +01:00
NPC_INIT_MOTHER_JELLYFISH,
2001-01-25 18:20:08 +01:00
NPC_INIT_SUB_SHARK,
2001-01-25 16:45:15 +01:00
NPC_INIT_FLYING_DUTCHMAN,
2001-01-25 20:57:29 +01:00
NPC_INIT_IRON_DOGFISH,
2001-01-29 21:00:30 +01:00
NPC_INIT_FALLING_ITEM,
2001-01-29 17:55:11 +01:00
NPC_INIT_FISH_HOOK,
2001-01-29 22:46:54 +01:00
NPC_INIT_PENDULUM,
2001-01-30 21:30:52 +01:00
NPC_INIT_FIREBALL,
2001-01-31 17:26:40 +01:00
NPC_INIT_RETURNING_HAZARD,
2001-02-05 15:55:11 +01:00
NPC_INIT_FISH_FOLK,
2001-02-06 20:29:35 +01:00
NPC_INIT_FLAMING_SKULL,
2001-02-23 22:35:11 +01:00
NPC_INIT_CIRCULAR_PLATFORM,
2001-03-26 18:44:45 +02:00
NPC_INIT_PARASITIC_WORM,
NPC_INIT_PARASITIC_WORM_SEGMENT,
2001-04-02 17:52:09 +02:00
NPC_INIT_HERMIT_CRAB,
2001-04-04 00:01:52 +02:00
NPC_INIT_EYEBALL,
2001-04-04 17:53:44 +02:00
NPC_INIT_BALL_BLOB,
NPC_INIT_ANEMONE_2,
2001-01-16 20:35:34 +01:00
};
enum NPC_CONTROL_FUNC
{
2001-01-29 17:55:11 +01:00
NPC_CONTROL_NONE,
2001-01-16 20:35:34 +01:00
NPC_CONTROL_MOVEMENT,
NPC_CONTROL_SHOT,
NPC_CONTROL_CLOSE,
NPC_CONTROL_COLLISION,
};
enum NPC_SENSOR_FUNC
{
NPC_SENSOR_NONE = 0,
2001-01-18 22:19:43 +01:00
NPC_SENSOR_JELLYFISH_USER_CLOSE = 1,
NPC_SENSOR_CLAM_USER_CLOSE,
2001-01-19 22:46:30 +01:00
NPC_SENSOR_SPIDER_CRAB_USER_CLOSE,
NPC_SENSOR_NINJA_STARFISH_USER_CLOSE,
NPC_SENSOR_GHOST_PIRATE_USER_CLOSE,
2001-02-12 16:37:31 +01:00
NPC_SENSOR_GENERIC_USER_VISIBLE,
2001-01-22 15:23:11 +01:00
NPC_SENSOR_OIL_BLOB_USER_CLOSE,
2001-01-22 17:02:38 +01:00
NPC_SENSOR_ANEMONE_USER_CLOSE,
2001-01-22 23:24:53 +01:00
NPC_SENSOR_EYEBALL_USER_CLOSE,
2001-01-23 18:03:27 +01:00
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
2001-01-23 20:58:19 +01:00
NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE,
2001-01-25 20:57:29 +01:00
NPC_SENSOR_IRON_DOGFISH_USER_CLOSE,
2001-01-29 21:00:30 +01:00
NPC_SENSOR_FALLING_ITEM_USER_CLOSE,
2001-01-29 17:55:11 +01:00
NPC_SENSOR_FISH_HOOK_USER_CLOSE,
2001-02-06 20:29:35 +01:00
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
2001-04-02 17:52:09 +02:00
NPC_SENSOR_HERMIT_CRAB_USER_CLOSE,
2001-04-03 17:14:53 +02:00
NPC_SENSOR_OCTOPUS_USER_CLOSE,
2001-04-05 17:54:40 +02:00
NPC_SENSOR_PUFFA_FISH_USER_CLOSE,
2001-01-16 20:35:34 +01:00
};
2001-01-18 20:18:39 +01:00
enum NPC_CLOSE_FUNC
{
2001-01-18 22:19:43 +01:00
NPC_CLOSE_NONE = 0,
NPC_CLOSE_JELLYFISH_EVADE = 1,
2001-03-01 17:48:45 +01:00
NPC_CLOSE_CLAM_JUMP_ATTACK,
NPC_CLOSE_CLAM_SNAP_ATTACK,
2001-01-19 22:46:30 +01:00
NPC_CLOSE_SPIDER_CRAB_ATTACK,
NPC_CLOSE_GHOST_PIRATE_ATTACK,
NPC_CLOSE_SHARK_MAN_ATTACK,
2001-01-22 15:23:11 +01:00
NPC_CLOSE_GENERIC_USER_SEEK,
2001-01-22 18:44:58 +01:00
NPC_CLOSE_ANEMONE_1_ATTACK,
2001-01-22 17:02:38 +01:00
NPC_CLOSE_ANEMONE_2_ATTACK,
2001-02-08 16:34:18 +01:00
NPC_CLOSE_ANEMONE_3_ATTACK,
2001-01-22 23:24:53 +01:00
NPC_CLOSE_EYEBALL_ATTACK,
2001-01-23 18:03:27 +01:00
NPC_CLOSE_SKULL_STOMPER_ATTACK,
2001-01-23 20:58:19 +01:00
NPC_CLOSE_BOOGER_MONSTER_ATTACK,
2001-01-25 16:45:15 +01:00
NPC_CLOSE_MOTHER_JELLYFISH_ATTACK,
2001-01-25 18:20:08 +01:00
NPC_CLOSE_SUB_SHARK_ATTACK,
2001-01-25 16:45:15 +01:00
NPC_CLOSE_FLYING_DUTCHMAN_ATTACK,
2001-01-25 20:57:29 +01:00
NPC_CLOSE_IRON_DOGFISH_ATTACK,
2001-01-29 21:00:30 +01:00
NPC_CLOSE_FALLING_ITEM_FALL,
2001-01-29 17:55:11 +01:00
NPC_CLOSE_FISH_HOOK_RISE,
2001-02-06 20:29:35 +01:00
NPC_CLOSE_FLAMING_SKULL_ATTACK,
2001-02-12 16:37:31 +01:00
NPC_CLOSE_SKELETAL_FISH_ATTACK,
2001-04-02 17:52:09 +02:00
NPC_CLOSE_HERMIT_CRAB_ATTACK,
2001-04-03 17:14:53 +02:00
NPC_CLOSE_OCTOPUS_ATTACK,
2001-04-05 17:54:40 +02:00
NPC_CLOSE_PUFFA_FISH_INFLATE,
2001-01-18 20:18:39 +01:00
};
2001-01-16 20:35:34 +01:00
enum NPC_MOVEMENT_FUNC
{
NPC_MOVEMENT_STATIC = 0,
NPC_MOVEMENT_FIXED_PATH = 1,
2001-02-22 16:39:38 +01:00
NPC_MOVEMENT_FIXED_PATH_WALK,
2001-01-25 16:45:15 +01:00
NPC_MOVEMENT_MOTHER_JELLYFISH,
2001-01-25 18:20:08 +01:00
NPC_MOVEMENT_SUB_SHARK,
2001-01-25 16:45:15 +01:00
NPC_MOVEMENT_FLYING_DUTCHMAN,
2001-01-25 20:57:29 +01:00
NPC_MOVEMENT_IRON_DOGFISH,
2001-01-29 22:46:54 +01:00
NPC_MOVEMENT_PENDULUM,
2001-01-30 21:30:52 +01:00
NPC_MOVEMENT_FIREBALL,
2001-01-31 17:26:40 +01:00
NPC_MOVEMENT_RETURNING_HAZARD,
2001-02-06 22:25:25 +01:00
NPC_MOVEMENT_CLAM_RETRACT,
2001-03-26 18:44:45 +02:00
NPC_MOVEMENT_PARASITIC_WORM,
2001-04-02 17:52:09 +02:00
NPC_MOVEMENT_STATIC_CYCLE_ANIM,
2001-04-02 22:35:43 +02:00
NPC_MOVEMENT_SHARK_MAN,
2001-04-03 20:32:24 +02:00
NPC_MOVEMENT_BALL_BLOB,
2001-01-16 20:35:34 +01:00
};
enum NPC_MOVEMENT_MODIFIER_FUNC
{
NPC_MOVEMENT_MODIFIER_NONE = 0,
NPC_MOVEMENT_MODIFIER_BOB = 1,
2001-01-18 20:18:39 +01:00
NPC_MOVEMENT_MODIFIER_JELLYFISH,
2001-02-05 15:55:11 +01:00
NPC_MOVEMENT_MODIFIER_FISH_FOLK,
2001-02-06 17:14:16 +01:00
NPC_MOVEMENT_MODIFIER_OCTOPUS,
2001-01-18 20:18:39 +01:00
};
enum NPC_TIMER_FUNC
{
NPC_TIMER_NONE = 0,
NPC_TIMER_EVADE_DONE = 1,
2001-01-18 22:19:43 +01:00
NPC_TIMER_ATTACK_DONE,
};
2001-01-25 16:45:15 +01:00
enum NPC_MOTHER_JELLYFISH_STATE
{
2001-03-12 20:14:38 +01:00
MOTHER_JELLYFISH_RETURN_TO_START_1 = 0,
MOTHER_JELLYFISH_CYCLE_1 = 1,
MOTHER_JELLYFISH_ATTACK_PLAYER_SPAWN_1,
MOTHER_JELLYFISH_RETURN_TO_START_2,
MOTHER_JELLYFISH_CYCLE_2,
MOTHER_JELLYFISH_ATTACK_PLAYER_SPAWN_2,
MOTHER_JELLYFISH_RETURN_TO_START_3,
MOTHER_JELLYFISH_CYCLE_3,
MOTHER_JELLYFISH_ATTACK_PLAYER_SHOCK,
2001-01-25 16:45:15 +01:00
};
2001-01-25 20:57:29 +01:00
enum NPC_SUB_SHARK_STATE
{
2001-03-13 18:01:35 +01:00
SUB_SHARK_MINE_1 = 0,
SUB_SHARK_MINE_2 = 1,
SUB_SHARK_CYCLE,
SUB_SHARK_SWALLOW,
2001-01-25 20:57:29 +01:00
};
2001-01-25 16:45:15 +01:00
enum NPC_FLYING_DUTCHMAN_STATE
{
FLYING_DUTCHMAN_ATTACK_PLAYER_1 = 0,
FLYING_DUTCHMAN_ATTACK_PLAYER_2 = 1,
FLYING_DUTCHMAN_ATTACK_PLAYER_3,
};
2001-01-25 20:57:29 +01:00
enum NPC_IRON_DOGFISH_STATE
2001-01-25 18:20:08 +01:00
{
2001-01-25 20:57:29 +01:00
IRON_DOGFISH_THUMP_1 = 0,
IRON_DOGFISH_LASER_EYE_1 = 1,
IRON_DOGFISH_THUMP_2,
IRON_DOGFISH_ROLL,
IRON_DOGFISH_LASER_EYE_2,
2001-01-25 18:20:08 +01:00
};
2001-02-06 20:29:35 +01:00
enum NPC_FLAMING_SKULL_STATE
{
FLAMING_SKULL_ATTACK = 0,
FLAMING_SKULL_RETURN = 1,
};
2001-04-02 17:52:09 +02:00
enum NPC_HERMIT_CRAB_STATE
{
HERMIT_CRAB_NO_ATTACK = 0,
HERMIT_CRAB_PUNCH_ATTACK = 1,
2001-04-05 17:54:40 +02:00
HERMIT_CRAB_ROLL_ATTACK,
};
enum NPC_PUFFA_FISH_STATE
{
PUFFA_FISH_NO_INFLATE = 0,
PUFFA_FISH_TURN = 1,
PUFFA_FISH_INFLATE,
2001-04-02 17:52:09 +02:00
};
2001-01-18 22:19:43 +01:00
enum
{
NPC_JELLYFISH_RESISTANCE = 64,
2001-01-23 20:58:19 +01:00
NPC_BOOGER_MONSTER_MAX_EXTENSION = 20,
2001-03-13 18:01:35 +01:00
NPC_SUB_SHARK_HIGH_SPEED = 6,
2001-03-26 18:44:45 +02:00
NPC_PARASITIC_WORM_SPACING = 6,
2001-01-19 22:46:30 +01:00
EXTEND_UP = true,
EXTEND_DOWN = false,
EXTEND_RIGHT = true,
EXTEND_LEFT = false,
2001-02-23 22:35:11 +01:00
EXTEND_CLOCKWISE = true,
EXTEND_ANTICLOCKWISE = false,
2001-04-02 21:21:46 +02:00
NPC_ENEMY_MAPEDIT_OFFSET = 10,
2001-01-16 20:35:34 +01:00
};
typedef struct NPC_DATA_TYPE
{
2001-02-28 22:05:39 +01:00
FileEquate skelType;
2001-03-05 21:16:35 +01:00
// FileEquate animData;
2001-02-28 22:05:39 +01:00
u16 initAnim;
2001-01-16 20:35:34 +01:00
NPC_INIT_FUNC initFunc;
NPC_SENSOR_FUNC sensorFunc;
NPC_MOVEMENT_FUNC movementFunc;
NPC_MOVEMENT_MODIFIER_FUNC movementModifierFunc;
2001-01-18 20:18:39 +01:00
NPC_CLOSE_FUNC closeFunc;
NPC_TIMER_FUNC timerFunc;
2001-01-16 21:55:44 +01:00
bool canTalk;
2001-01-19 16:07:53 +01:00
u8 speed;
u16 turnSpeed;
2001-02-09 20:44:36 +01:00
bool detectCollision;
2001-02-07 17:42:13 +01:00
DAMAGE_TYPE damageToUserType;
2001-03-05 22:29:44 +01:00
u16 initHealth;
2001-04-02 17:52:09 +02:00
u16 moveAnim;
2001-01-16 20:35:34 +01:00
}
NPC_DATA;
2001-04-02 21:21:46 +02:00
static NPC_UNIT_TYPE mapEditConvertTable[NPC_UNIT_TYPE_MAX];
2001-01-18 22:19:43 +01:00
// functions
2001-01-16 20:35:34 +01:00
bool processSensor();
2001-01-18 22:19:43 +01:00
void processMovement( int _frames );
void processMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
2001-01-16 20:35:34 +01:00
void processShot();
2001-01-18 22:19:43 +01:00
void processClose( int _frames );
2001-01-16 20:35:34 +01:00
void processCollision();
2001-01-18 22:19:43 +01:00
void processTimer( int _frames );
2001-02-12 18:52:04 +01:00
bool isCollisionWithGround();
2001-01-18 22:19:43 +01:00
2001-01-25 16:45:15 +01:00
void processGenericGotoTarget( int _frames, s32 xDist, s32 yDist, s32 speed );
2001-02-06 20:29:35 +01:00
void processGenericGetUserDist( int _frames, s32 *distX, s32 *distY );
2001-02-22 22:00:56 +01:00
void processGenericFixedPathMove( int _frames, s32 *moveX, s32 *moveY, s32 *moveVel, s32 *moveDist );
void processGenericFixedPathWalk( int _frames, s32 *moveX, s32 *moveY );
bool processGroundCollisionReverse( s32 *moveX, s32 *moveY );
2001-01-22 15:23:11 +01:00
2001-01-18 22:19:43 +01:00
// small jellyfish functions
void processSmallJellyfishSensor();
void processSmallJellyfishMovementModifier( int _frames, s32 distX, s32 distY, s32 dist, s16 headingChange );
void processCloseSmallJellyfishEvade( int _frames );
2001-02-06 17:14:16 +01:00
// baby octopus functions
void processBabyOctopusMovementModifier( int _frames, s32 dist, s16 headingChange );
2001-04-03 17:14:53 +02:00
void processCloseOctopusAttack( int _frames );
2001-02-06 17:14:16 +01:00
2001-02-05 15:55:11 +01:00
// fish folk functions
void processFishFolkMovementModifier( int _frames, s32 distX, s32 distY );
2001-04-03 20:32:24 +02:00
// ball blob functions
void processBallBlobMovement( int _frames, s32 *moveX, s32 *moveY );
2001-01-18 22:19:43 +01:00
// clam functions
2001-03-01 17:48:45 +01:00
void processCloseClamJumpAttack( int _frames );
void processCloseClamSnapAttack( int _frames );
2001-01-18 22:19:43 +01:00
2001-01-19 22:46:30 +01:00
// spider crab functions
void processCloseSpiderCrabAttack( int _frames );
2001-04-02 17:52:09 +02:00
// hermit crab functions
void processCloseHermitCrabAttack( int _frames );
2001-01-19 22:46:30 +01:00
// ghost pirate functions
void processCloseGhostPirateAttack( int _frames );
2001-04-05 17:54:40 +02:00
// puffa fish functions
void processClosePuffaFishInflate( int _frames );
2001-01-19 22:46:30 +01:00
// shark man functions
2001-04-02 22:35:43 +02:00
void processSharkManMovement( int _frames, s32 *moveX, s32 *moveY );
2001-01-19 22:46:30 +01:00
void processCloseSharkManAttack( int _frames );
2001-01-22 17:02:38 +01:00
// anemone functions
2001-01-22 18:44:58 +01:00
void processCloseAnemone1Attack( int _frames );
2001-01-22 17:02:38 +01:00
void processCloseAnemone2Attack( int _frames );
2001-02-08 16:34:18 +01:00
void processCloseAnemone3Attack( int _frames );
2001-01-22 17:02:38 +01:00
2001-02-12 16:37:31 +01:00
// skeletal fish functions
void processCloseSkeletalFishAttack( int _frames );
2001-01-22 23:24:53 +01:00
// eyeball functions
void processCloseEyeballAttack( int _frames );
2001-02-06 20:29:35 +01:00
// flaming skull functions
void processCloseFlamingSkullAttack( int _frames );
2001-01-23 18:03:27 +01:00
// skull stomper functions
void processCloseSkullStomperAttack( int _frames );
2001-01-23 20:58:19 +01:00
// booger monster functions
void processCloseBoogerMonsterAttack( int _frames );
2001-01-25 16:45:15 +01:00
// mother jellyfish functions
void processMotherJellyfishMovement( int _frames );
void processCloseMotherJellyfishAttack( int _frames );
2001-01-25 20:57:29 +01:00
// sub shark functions
void processSubSharkMovement( int _frames );
void processCloseSubSharkAttack( int _frames );
2001-03-26 18:44:45 +02:00
// parasitic worm functions
void processParasiticWormMovement( int _frames );
2001-01-25 16:45:15 +01:00
// flying dutchman functions
void processFlyingDutchmanMovement( int _frames );
void processCloseFlyingDutchmanAttack( int _frames );
2001-01-25 20:57:29 +01:00
// iron dogfish functions
2001-01-25 18:20:08 +01:00
2001-01-25 20:57:29 +01:00
void processIronDogfishMovement( int _frames );
void processStandardIronDogfishAttack( int _frames );
void processCloseIronDogfishAttack( int _frames );
2001-01-25 18:20:08 +01:00
2001-01-29 17:55:11 +01:00
// hazard functions
2001-01-29 21:00:30 +01:00
void processCloseFallingItemFall( int _frames );
2001-01-29 17:55:11 +01:00
void processCloseFishHookRise( int _frames );
2001-01-29 22:46:54 +01:00
void processPendulumMovement( int _frames );
2001-01-30 21:30:52 +01:00
void processFireballMovement( int _frames );
2001-01-31 17:26:40 +01:00
void processReturningHazardMovement( int _frames );
2001-01-29 17:55:11 +01:00
2001-01-18 22:19:43 +01:00
// data
2001-01-16 20:35:34 +01:00
static NPC_DATA m_data[NPC_UNIT_TYPE_MAX];
2001-01-18 20:18:39 +01:00
2001-02-07 17:42:13 +01:00
static s32 playerXDist;
static s32 playerYDist;
static s32 playerXDistSqr;
static s32 playerYDistSqr;
2001-01-18 20:18:39 +01:00
// internal variables
NPC_UNIT_TYPE m_type;
NPC_CONTROL_FUNC m_controlFunc;
2001-02-07 18:40:56 +01:00
NPC_CONTROL_FUNC m_oldControlFunc;
2001-01-18 20:18:39 +01:00
NPC_TIMER_FUNC m_timerFunc;
NPC_SENSOR_FUNC m_sensorFunc;
CNpcPath m_npcPath;
s32 m_heading;
2001-01-22 20:14:00 +01:00
s32 m_fireHeading;
2001-01-18 20:18:39 +01:00
s32 m_velocity;
bool m_evadeClockwise;
2001-01-22 23:24:53 +01:00
s32 m_movementTimer;
2001-01-18 20:18:39 +01:00
s32 m_timerTimer;
2001-01-18 22:19:43 +01:00
s32 m_extension;
2001-01-19 22:46:30 +01:00
bool m_extendDir;
2001-02-23 22:35:11 +01:00
s16 m_rotation;
2001-01-25 16:45:15 +01:00
DVECTOR m_base;
u8 m_state;
2001-01-25 18:20:08 +01:00
u8 m_salvoCount;
2001-02-28 22:05:39 +01:00
bool m_animPlaying;
bool m_reversed;
2001-03-05 22:29:44 +01:00
s32 m_health;
2001-02-27 22:25:22 +01:00
2001-04-05 17:54:40 +02:00
s32 m_frame;
2001-02-27 22:25:22 +01:00
int m_animNo;
2001-04-01 22:22:49 +02:00
CActorGfx *m_actorGfx;
2001-03-22 20:10:19 +01:00
DVECTOR m_drawOffset;
2001-03-05 22:11:51 +01:00
virtual void collidedWith(CThing *_thisThing);
2001-03-26 18:44:45 +02:00
// position history stuff
class CNpcPositionHistory
{
public:
DVECTOR pos;
CNpcPositionHistory *next;
};
CNpcPositionHistory *m_positionHistory;
2001-01-16 20:35:34 +01:00
};
/*****************************************************************************/
#endif