This commit is contained in:
parent
1953cb2f8b
commit
9565c4e575
16 changed files with 160 additions and 135 deletions
|
@ -94,8 +94,7 @@ game_src := convo \
|
||||||
game \
|
game \
|
||||||
gamebubs \
|
gamebubs \
|
||||||
gameslot \
|
gameslot \
|
||||||
pause \
|
pause
|
||||||
thing
|
|
||||||
|
|
||||||
gfx_src := prim \
|
gfx_src := prim \
|
||||||
tpage \
|
tpage \
|
||||||
|
|
|
@ -54,6 +54,8 @@ class CLayerCollision *CNpc::m_layerCollision;
|
||||||
|
|
||||||
void CNpc::init()
|
void CNpc::init()
|
||||||
{
|
{
|
||||||
|
CEnemyThing::init();
|
||||||
|
|
||||||
m_type = NPC_CIRCULAR_PLATFORM;
|
m_type = NPC_CIRCULAR_PLATFORM;
|
||||||
|
|
||||||
m_heading = m_fireHeading = 0;
|
m_heading = m_fireHeading = 0;
|
||||||
|
@ -77,6 +79,9 @@ void CNpc::init()
|
||||||
|
|
||||||
m_layerCollision = NULL;
|
m_layerCollision = NULL;
|
||||||
|
|
||||||
|
//pkg
|
||||||
|
m_npcPath.initPath();
|
||||||
|
//pkg
|
||||||
switch ( m_data[this->m_type].initFunc )
|
switch ( m_data[this->m_type].initFunc )
|
||||||
{
|
{
|
||||||
case NPC_INIT_DEFAULT:
|
case NPC_INIT_DEFAULT:
|
||||||
|
@ -277,11 +282,15 @@ void CNpc::init()
|
||||||
void CNpc::shutdown()
|
void CNpc::shutdown()
|
||||||
{
|
{
|
||||||
m_npcPath.removeAllWaypoints();
|
m_npcPath.removeAllWaypoints();
|
||||||
|
|
||||||
|
CEnemyThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CNpc::think(int _frames)
|
void CNpc::think(int _frames)
|
||||||
{
|
{
|
||||||
|
CEnemyThing::think(_frames);
|
||||||
|
|
||||||
processGenericGetUserDist( _frames, &playerXDist, &playerYDist );
|
processGenericGetUserDist( _frames, &playerXDist, &playerYDist );
|
||||||
playerXDistSqr = playerXDist * playerXDist;
|
playerXDistSqr = playerXDist * playerXDist;
|
||||||
playerYDistSqr = playerYDist * playerYDist;
|
playerYDistSqr = playerYDist * playerYDist;
|
||||||
|
@ -941,6 +950,7 @@ void CNpc::processTimer(int _frames)
|
||||||
|
|
||||||
void CNpc::render()
|
void CNpc::render()
|
||||||
{
|
{
|
||||||
|
CEnemyThing::render();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CNpc::processEvent( GAME_EVENT evt, CThing *sourceThing )
|
void CNpc::processEvent( GAME_EVENT evt, CThing *sourceThing )
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
#define __ENEMY_NPC_H__
|
#define __ENEMY_NPC_H__
|
||||||
|
|
||||||
//#include <dstructs.h>
|
//#include <dstructs.h>
|
||||||
#include "Game/Thing.h"
|
|
||||||
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Gfx/Skel.h"
|
#include "Gfx/Skel.h"
|
||||||
|
|
||||||
#ifndef __ENEMY_NPCPATH_H__
|
#ifndef __ENEMY_NPCPATH_H__
|
||||||
|
@ -28,7 +32,7 @@
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
class CNpc : public CThing
|
class CNpc : public CEnemyThing
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum NPC_UNIT_TYPE
|
enum NPC_UNIT_TYPE
|
||||||
|
|
|
@ -33,7 +33,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GARY
|
{ // NPC_GARY
|
||||||
|
@ -47,7 +47,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FALLING_ITEM
|
{ // NPC_FALLING_ITEM
|
||||||
|
@ -61,7 +61,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
8,
|
8,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_HOOK
|
{ // NPC_FISH_HOOK
|
||||||
|
@ -75,7 +75,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_DUST_DEVIL
|
{ // NPC_DUST_DEVIL
|
||||||
|
@ -89,7 +89,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PENDULUM
|
{ // NPC_PENDULUM
|
||||||
|
@ -103,7 +103,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FIREBALL
|
{ // NPC_FIREBALL
|
||||||
|
@ -117,7 +117,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
40,
|
40,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SAW_BLADE
|
{ // NPC_SAW_BLADE
|
||||||
|
@ -131,7 +131,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_LINEAR_PLATFORM
|
{ // NPC_LINEAR_PLATFORM
|
||||||
|
@ -145,7 +145,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CIRCULAR_PLATFORM
|
{ // NPC_CIRCULAR_PLATFORM
|
||||||
|
@ -159,7 +159,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_1
|
{ // NPC_SMALL_JELLYFISH_1
|
||||||
|
@ -173,7 +173,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_2
|
{ // NPC_SMALL_JELLYFISH_2
|
||||||
|
@ -187,7 +187,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_1
|
{ // NPC_ANEMONE_1
|
||||||
|
@ -201,7 +201,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_2
|
{ // NPC_ANEMONE_2
|
||||||
|
@ -215,7 +215,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_3
|
{ // NPC_ANEMONE_3
|
||||||
|
@ -229,7 +229,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKELETAL_FISH
|
{ // NPC_SKELETAL_FISH
|
||||||
|
@ -243,7 +243,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CLAM
|
{ // NPC_CLAM
|
||||||
|
@ -256,7 +256,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SQUID_DART
|
{ // NPC_SQUID_DART
|
||||||
|
@ -270,7 +270,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
5,
|
5,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_FOLK
|
{ // NPC_FISH_FOLK
|
||||||
|
@ -284,7 +284,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PRICKLY_BUG
|
{ // NPC_PRICKLY_BUG
|
||||||
|
@ -298,7 +298,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
1,
|
1,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SEA_SNAKE_1
|
{ // NPC_SEA_SNAKE_1
|
||||||
|
@ -312,7 +312,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SEA_SNAKE_2
|
{ // NPC_SEA_SNAKE_2
|
||||||
|
@ -326,7 +326,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PUFFA_FISH
|
{ // NPC_PUFFA_FISH
|
||||||
|
@ -340,7 +340,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANGLER_FISH
|
{ // NPC_ANGLER_FISH
|
||||||
|
@ -354,7 +354,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
1,
|
1,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_HERMIT_CRAB
|
{ // NPC_HERMIT_CRAB
|
||||||
|
@ -368,7 +368,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MINE
|
{ // NPC_MINE
|
||||||
|
@ -382,7 +382,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BOOGER_MONSTER
|
{ // NPC_BOOGER_MONSTER
|
||||||
|
@ -396,7 +396,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SPIDER_CRAB
|
{ // NPC_SPIDER_CRAB
|
||||||
|
@ -410,7 +410,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_EYEBALL
|
{ // NPC_EYEBALL
|
||||||
|
@ -424,7 +424,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BABY_OCTOPUS
|
{ // NPC_BABY_OCTOPUS
|
||||||
|
@ -438,7 +438,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
512,
|
512,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ZOMBIE_FISH_FOLK
|
{ // NPC_ZOMBIE_FISH_FOLK
|
||||||
|
@ -452,7 +452,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_NINJA_STARFISH
|
{ // NPC_NINJA_STARFISH
|
||||||
|
@ -466,7 +466,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
64,
|
64,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST
|
{ // NPC_GHOST
|
||||||
|
@ -480,7 +480,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
2,
|
2,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST_PIRATE
|
{ // NPC_GHOST_PIRATE
|
||||||
|
@ -494,7 +494,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLAMING_SKULL
|
{ // NPC_FLAMING_SKULL
|
||||||
|
@ -508,7 +508,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHARK_MAN
|
{ // NPC_SHARK_MAN
|
||||||
|
@ -522,7 +522,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_OIL_BLOB
|
{ // NPC_OIL_BLOB
|
||||||
|
@ -536,7 +536,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
64,
|
64,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKULL_STOMPER
|
{ // NPC_SKULL_STOMPER
|
||||||
|
@ -550,7 +550,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
5,
|
5,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MOTHER_JELLYFISH
|
{ // NPC_MOTHER_JELLYFISH
|
||||||
|
@ -564,7 +564,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SUB_SHARK
|
{ // NPC_SUB_SHARK
|
||||||
|
@ -578,7 +578,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLYING_DUTCHMAN
|
{ // NPC_FLYING_DUTCHMAN
|
||||||
|
@ -592,7 +592,7 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
256,
|
256,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_IRON_DOGFISH
|
{ // NPC_IRON_DOGFISH
|
||||||
|
@ -606,6 +606,6 @@ CNpc::NPC_DATA CNpc::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
3,
|
3,
|
||||||
2048,
|
2048,
|
||||||
false,
|
false,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__HIT_ENEMY,
|
||||||
},
|
},
|
||||||
};
|
};
|
|
@ -99,18 +99,18 @@ void CGameScene::init()
|
||||||
|
|
||||||
Level.init();
|
Level.init();
|
||||||
|
|
||||||
#ifdef __USER_charles__
|
//#ifdef __USER_charles__
|
||||||
C2dEnemy *enemy;
|
C2dEnemy *enemy;
|
||||||
enemy=new ("test enemy") C2dEnemy;
|
enemy=new ("test enemy") C2dEnemy;
|
||||||
enemy->init();
|
enemy->init();
|
||||||
enemy->setLayerCollision( Level.getCollisionLayer() );
|
enemy->setLayerCollision( Level.getCollisionLayer() );
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
#ifdef __USER_paul__
|
#ifdef __USER_paul__
|
||||||
DVECTOR pos={16*10,16*10};
|
DVECTOR pos={16*10,16*10};
|
||||||
createPickup(PICKUP__100_PERCENT_LIFE,&pos);
|
createPickup(PICKUP__BIG_HEALTH,&pos);
|
||||||
pos.vx+=32; createPickup(PICKUP__50_PERCENT_LIFE,&pos);
|
pos.vx+=32; createPickup(PICKUP__MEDIUM_HEALTH,&pos);
|
||||||
pos.vx+=32; createPickup(PICKUP__25_PERCENT_LIFE,&pos);
|
pos.vx+=32; createPickup(PICKUP__SMALL_HEALTH,&pos);
|
||||||
pos.vx+=32; createPickup(PICKUP__LIFE,&pos);
|
pos.vx+=32; createPickup(PICKUP__LIFE,&pos);
|
||||||
pos.vx+=32; createPickup(PICKUP__SPATULA,&pos);
|
pos.vx+=32; createPickup(PICKUP__SPATULA,&pos);
|
||||||
pos.vx+=32; createPickup(PICKUP__JELLY_LAUNCHER_AMMO,&pos);
|
pos.vx+=32; createPickup(PICKUP__JELLY_LAUNCHER_AMMO,&pos);
|
||||||
|
|
|
@ -12,10 +12,6 @@
|
||||||
#include "game\event.h"
|
#include "game\event.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GAME_THING_H__
|
|
||||||
#include "game\thing.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
class FontBank;
|
class FontBank;
|
||||||
|
|
||||||
|
@ -37,7 +33,7 @@ virtual int canPause();
|
||||||
|
|
||||||
static MATRIX *GetCamMtx() {return(&CamMtx);}
|
static MATRIX *GetCamMtx() {return(&CamMtx);}
|
||||||
class CPlayer *getPlayer();
|
class CPlayer *getPlayer();
|
||||||
void sendEvent( GAME_EVENT evt, CThing *sourceThing );
|
void sendEvent( GAME_EVENT evt, class CThing *sourceThing );
|
||||||
|
|
||||||
static void setReadyToExit() {s_readyToExit=true;}
|
static void setReadyToExit() {s_readyToExit=true;}
|
||||||
|
|
||||||
|
|
|
@ -116,11 +116,11 @@ void CBaseHealthPickup::renderPickup(DVECTOR *_pos)
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int C100HealthPickup::getHealthPoints()
|
int CLargeHealthPickup::getHealthPoints()
|
||||||
{
|
{
|
||||||
return 100;
|
return 5;
|
||||||
}
|
}
|
||||||
int C100HealthPickup::getFrameNumber()
|
int CLargeHealthPickup::getFrameNumber()
|
||||||
{
|
{
|
||||||
return FRM__HEALTH100;
|
return FRM__HEALTH100;
|
||||||
}
|
}
|
||||||
|
@ -131,11 +131,11 @@ int C100HealthPickup::getFrameNumber()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int C50HealthPickup::getHealthPoints()
|
int CMediumHealthPickup::getHealthPoints()
|
||||||
{
|
{
|
||||||
return 50;
|
return 3;
|
||||||
}
|
}
|
||||||
int C50HealthPickup::getFrameNumber()
|
int CMediumHealthPickup::getFrameNumber()
|
||||||
{
|
{
|
||||||
return FRM__HEALTH50;
|
return FRM__HEALTH50;
|
||||||
}
|
}
|
||||||
|
@ -146,11 +146,11 @@ int C50HealthPickup::getFrameNumber()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
int C25HealthPickup::getHealthPoints()
|
int CSmallHealthPickup::getHealthPoints()
|
||||||
{
|
{
|
||||||
return 25;
|
return 1;
|
||||||
}
|
}
|
||||||
int C25HealthPickup::getFrameNumber()
|
int CSmallHealthPickup::getFrameNumber()
|
||||||
{
|
{
|
||||||
return FRM__HEALTH25;
|
return FRM__HEALTH25;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,21 +54,21 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class C100HealthPickup : public CBaseHealthPickup
|
class CLargeHealthPickup : public CBaseHealthPickup
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual int getHealthPoints();
|
virtual int getHealthPoints();
|
||||||
virtual int getFrameNumber();
|
virtual int getFrameNumber();
|
||||||
};
|
};
|
||||||
|
|
||||||
class C50HealthPickup : public CBaseHealthPickup
|
class CMediumHealthPickup : public CBaseHealthPickup
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual int getHealthPoints();
|
virtual int getHealthPoints();
|
||||||
virtual int getFrameNumber();
|
virtual int getFrameNumber();
|
||||||
};
|
};
|
||||||
|
|
||||||
class C25HealthPickup : public CBaseHealthPickup
|
class CSmallHealthPickup : public CBaseHealthPickup
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual int getHealthPoints();
|
virtual int getHealthPoints();
|
||||||
|
|
|
@ -231,13 +231,15 @@ void CBaseRespawningPickup::init()
|
||||||
Params:
|
Params:
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
|
int respawnFlashFrames=50;
|
||||||
void CBaseRespawningPickup::think(int _frames)
|
void CBaseRespawningPickup::think(int _frames)
|
||||||
{
|
{
|
||||||
if(m_respawnTime==0)
|
if(m_respawnTime<=respawnFlashFrames)
|
||||||
{
|
{
|
||||||
CBasePickup::think(_frames);
|
CBasePickup::think(_frames);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if(m_respawnTime)
|
||||||
{
|
{
|
||||||
m_respawnTime-=_frames;
|
m_respawnTime-=_frames;
|
||||||
if(m_respawnTime<0)
|
if(m_respawnTime<0)
|
||||||
|
@ -256,7 +258,7 @@ void CBaseRespawningPickup::think(int _frames)
|
||||||
void CBaseRespawningPickup::render()
|
void CBaseRespawningPickup::render()
|
||||||
{
|
{
|
||||||
if(m_respawnTime==0||
|
if(m_respawnTime==0||
|
||||||
m_respawnTime<50&&!(m_respawnTime&3))
|
m_respawnTime<respawnFlashFrames&&!(m_respawnTime&4))
|
||||||
{
|
{
|
||||||
CBasePickup::render();
|
CBasePickup::render();
|
||||||
}
|
}
|
||||||
|
@ -288,14 +290,14 @@ CBasePickup *createPickup(const PICKUP_TYPE _type,const DVECTOR *_pos)
|
||||||
|
|
||||||
switch(_type)
|
switch(_type)
|
||||||
{
|
{
|
||||||
case PICKUP__100_PERCENT_LIFE:
|
case PICKUP__BIG_HEALTH:
|
||||||
pickup=new ("100HealthPickup") C100HealthPickup();
|
pickup=new ("LargeHealthPickup") CLargeHealthPickup();
|
||||||
break;
|
break;
|
||||||
case PICKUP__50_PERCENT_LIFE:
|
case PICKUP__MEDIUM_HEALTH:
|
||||||
pickup=new ("15HealthPickup") C50HealthPickup();
|
pickup=new ("MediumHealthPickup") CMediumHealthPickup();
|
||||||
break;
|
break;
|
||||||
case PICKUP__25_PERCENT_LIFE:
|
case PICKUP__SMALL_HEALTH:
|
||||||
pickup=new ("25HealthPickup") C25HealthPickup();
|
pickup=new ("SmallHealthPickup") CSmallHealthPickup();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PICKUP__LIFE:
|
case PICKUP__LIFE:
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
Includes
|
Includes
|
||||||
-------- */
|
-------- */
|
||||||
|
|
||||||
#ifndef __GAME_TPICKUP_H__
|
#ifndef __THING_THING_H__
|
||||||
#include "thing/tpickup.h"
|
#include "thing/thing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
PICKUP__100_PERCENT_LIFE,
|
PICKUP__BIG_HEALTH,
|
||||||
PICKUP__50_PERCENT_LIFE,
|
PICKUP__MEDIUM_HEALTH,
|
||||||
PICKUP__25_PERCENT_LIFE,
|
PICKUP__SMALL_HEALTH,
|
||||||
PICKUP__LIFE,
|
PICKUP__LIFE,
|
||||||
PICKUP__SPATULA,
|
PICKUP__SPATULA,
|
||||||
PICKUP__JELLY_LAUNCHER_AMMO,
|
PICKUP__JELLY_LAUNCHER_AMMO,
|
||||||
|
@ -95,6 +95,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int getRespawnTime()=0;
|
virtual int getRespawnTime()=0;
|
||||||
|
virtual int canCollide() {return m_respawnTime==0;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_respawnTime;
|
int m_respawnTime;
|
||||||
|
|
|
@ -171,7 +171,7 @@ int angg=900;
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CPlayer::init()
|
void CPlayer::init()
|
||||||
{
|
{
|
||||||
CThing::init();
|
CPlayerThing::init();
|
||||||
|
|
||||||
m_layerCollision=NULL;
|
m_layerCollision=NULL;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ void CPlayer::shutdown()
|
||||||
#ifdef _STATE_DEBUG_
|
#ifdef _STATE_DEBUG_
|
||||||
s_debugFont.dump();
|
s_debugFont.dump();
|
||||||
#endif
|
#endif
|
||||||
CThing::shutdown();
|
CPlayerThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -242,7 +242,7 @@ void CPlayer::think(int _frames)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
CThing::think(_frames);
|
CPlayerThing::think(_frames);
|
||||||
|
|
||||||
m_skel.setAng(angg);
|
m_skel.setAng(angg);
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ int mouth=-1,eyes=-1;
|
||||||
#endif
|
#endif
|
||||||
void CPlayer::render()
|
void CPlayer::render()
|
||||||
{
|
{
|
||||||
CThing::render();
|
CPlayerThing::render();
|
||||||
|
|
||||||
#ifdef _STATE_DEBUG_
|
#ifdef _STATE_DEBUG_
|
||||||
s_debugFont.print(40,40,posBuf);
|
s_debugFont.print(40,40,posBuf);
|
||||||
|
@ -1048,6 +1048,7 @@ void CPlayer::takeDamage(DAMAGE_TYPE _damage)
|
||||||
{
|
{
|
||||||
case DAMAGE__FALL:
|
case DAMAGE__FALL:
|
||||||
case DAMAGE__LAVA:
|
case DAMAGE__LAVA:
|
||||||
|
case DAMAGE__HIT_ENEMY:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DAMAGE__ELECTROCUTION:
|
case DAMAGE__ELECTROCUTION:
|
||||||
|
|
|
@ -18,8 +18,8 @@
|
||||||
Includes
|
Includes
|
||||||
-------- */
|
-------- */
|
||||||
|
|
||||||
#ifndef __THING_TPLAYER_H__
|
#ifndef __THING_THING_H__
|
||||||
#include "thing/tplayer.h"
|
#include "thing/thing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GFX_SKELSPNG_H__
|
#ifndef __GFX_SKELSPNG_H__
|
||||||
|
@ -105,6 +105,7 @@ typedef enum
|
||||||
DAMAGE__FALL,
|
DAMAGE__FALL,
|
||||||
DAMAGE__ELECTROCUTION,
|
DAMAGE__ELECTROCUTION,
|
||||||
DAMAGE__LAVA,
|
DAMAGE__LAVA,
|
||||||
|
DAMAGE__HIT_ENEMY,
|
||||||
}DAMAGE_TYPE;
|
}DAMAGE_TYPE;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,12 +14,15 @@
|
||||||
#ifndef __PROJECTL_PROJECTL_H__
|
#ifndef __PROJECTL_PROJECTL_H__
|
||||||
#define __PROJECTL_PROJECTL_H__
|
#define __PROJECTL_PROJECTL_H__
|
||||||
|
|
||||||
#include "Game/Thing.h"
|
#ifndef __THING_THING_H__
|
||||||
|
#include "thing/thing.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Gfx/Skel.h"
|
#include "Gfx/Skel.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
class CProjectile : public CThing
|
class CProjectile : public CEnemyProjectileThing
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum PROJECTILE_MOVEMENT_TYPE
|
enum PROJECTILE_MOVEMENT_TYPE
|
||||||
|
|
|
@ -17,10 +17,6 @@
|
||||||
|
|
||||||
#include "thing\thing.h"
|
#include "thing\thing.h"
|
||||||
|
|
||||||
#ifndef __THING_TPICKUP_H__
|
|
||||||
#include "thing\tpickup.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -118,7 +114,8 @@ void CThingManager::thinkAllThings(int _frames)
|
||||||
thing2=s_thingLists[CThing::TYPE_PLAYER];
|
thing2=s_thingLists[CThing::TYPE_PLAYER];
|
||||||
while(thing1&&thing2)
|
while(thing1&&thing2)
|
||||||
{
|
{
|
||||||
if(thing1->checkCollisionAgainst(thing2))
|
if(thing1->canCollide()&&
|
||||||
|
thing1->checkCollisionAgainst(thing2))
|
||||||
{
|
{
|
||||||
thing1->collidedWith(thing2);
|
thing1->collidedWith(thing2);
|
||||||
}
|
}
|
||||||
|
@ -180,6 +177,7 @@ void CThingManager::addToThingList(CThing *_this)
|
||||||
{
|
{
|
||||||
_this->m_nextThing=s_thingLists[_this->getThingType()];
|
_this->m_nextThing=s_thingLists[_this->getThingType()];
|
||||||
s_thingLists[_this->getThingType()]=_this;
|
s_thingLists[_this->getThingType()]=_this;
|
||||||
|
PAUL_DBGMSG("Added thing type %d",_this->getThingType());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -226,10 +224,8 @@ void CThing::init()
|
||||||
// Add to thing list
|
// Add to thing list
|
||||||
CThingManager::addToThingList(this);
|
CThingManager::addToThingList(this);
|
||||||
|
|
||||||
|
|
||||||
setCollisionSize(20,20); // Some temporary defaults.. (pkg)
|
setCollisionSize(20,20); // Some temporary defaults.. (pkg)
|
||||||
setCollisionCentreOffset(0,0);
|
setCollisionCentreOffset(0,0);
|
||||||
m_collisionCentreOffset.vx=m_collisionCentreOffset.vy=0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
|
@ -304,7 +300,6 @@ void CThing::render()
|
||||||
y2=Pos.vy+10-ofs.vy;
|
y2=Pos.vy+10-ofs.vy;
|
||||||
DrawLine(x1,y1,x2,y2,255,0,0,0);
|
DrawLine(x1,y1,x2,y2,255,0,0,0);
|
||||||
DrawLine(x2,y1,x1,y2,255,0,0,0);
|
DrawLine(x2,y1,x1,y2,255,0,0,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -420,8 +415,6 @@ void CThing::setCollisionSize(int _w,int _h)
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CThing::updateCollisionArea()
|
void CThing::updateCollisionArea()
|
||||||
{
|
{
|
||||||
DVECTOR size;
|
|
||||||
|
|
||||||
m_collisionCentre.vx=Pos.vx+m_collisionCentreOffset.vx;
|
m_collisionCentre.vx=Pos.vx+m_collisionCentreOffset.vx;
|
||||||
m_collisionCentre.vy=Pos.vy+m_collisionCentreOffset.vy;
|
m_collisionCentre.vy=Pos.vy+m_collisionCentreOffset.vy;
|
||||||
m_collisionArea.x1=m_collisionCentre.vx-(m_collisionSize.vx/2);
|
m_collisionArea.x1=m_collisionCentre.vx-(m_collisionSize.vx/2);
|
||||||
|
@ -450,29 +443,16 @@ int CThing::checkCollisionAgainst(CThing *_thisThing)
|
||||||
if(abs(pos.vx-thisThingPos.vx)<radius&&
|
if(abs(pos.vx-thisThingPos.vx)<radius&&
|
||||||
abs(pos.vy-thisThingPos.vy)<radius)
|
abs(pos.vy-thisThingPos.vy)<radius)
|
||||||
{
|
{
|
||||||
DVECTOR pos,size;
|
|
||||||
CRECT thisRect,thatRect;
|
CRECT thisRect,thatRect;
|
||||||
|
|
||||||
thisRect=getCollisionArea();
|
thisRect=getCollisionArea();
|
||||||
thatRect=_thisThing->getCollisionArea();
|
thatRect=_thisThing->getCollisionArea();
|
||||||
|
|
||||||
//static int val=0;
|
|
||||||
if(((thisRect.x1>=thatRect.x1&&thisRect.x1<=thatRect.x2)||(thisRect.x2>=thatRect.x1&&thisRect.x2<=thatRect.x2))&&
|
if(((thisRect.x1>=thatRect.x1&&thisRect.x1<=thatRect.x2)||(thisRect.x2>=thatRect.x1&&thisRect.x2<=thatRect.x2))&&
|
||||||
((thisRect.y1>=thatRect.y1&&thisRect.y1<=thatRect.y2)||(thisRect.y2>=thatRect.y1&&thisRect.y2<=thatRect.y2)))
|
((thisRect.y1>=thatRect.y1&&thisRect.y1<=thatRect.y2)||(thisRect.y2>=thatRect.y1&&thisRect.y2<=thatRect.y2)))
|
||||||
{
|
{
|
||||||
//PAUL_DBGMSG("hit %d",val++);
|
|
||||||
collided=true;
|
collided=true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
//PAUL_DBGMSG("close %d",val++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//PAUL_DBGMSG("%03d %03d ( %d%d )",
|
|
||||||
// abs(Pos.vx-thisThingPos.vx),abs(Pos.vy-thisThingPos.vy),
|
|
||||||
// abs(Pos.vx-thisThingPos.vx)<radius,abs(Pos.vy-thisThingPos.vy)<radius);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return collided;
|
return collided;
|
||||||
|
|
|
@ -67,10 +67,14 @@ class CThing
|
||||||
public:
|
public:
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TYPE_THING, // temp.. (pkg)
|
|
||||||
TYPE_PICKUP,
|
TYPE_PICKUP,
|
||||||
TYPE_PLAYER,
|
TYPE_PLAYER,
|
||||||
|
TYPE_PLAYERPROJECTILE,
|
||||||
|
TYPE_NPC,
|
||||||
TYPE_ENEMY,
|
TYPE_ENEMY,
|
||||||
|
TYPE_ENEMYPROJECTILE,
|
||||||
|
TYPE_PLATFORM,
|
||||||
|
TYPE_TRIGGER,
|
||||||
|
|
||||||
MAX_TYPE,
|
MAX_TYPE,
|
||||||
}
|
}
|
||||||
|
@ -79,7 +83,7 @@ public:
|
||||||
CThing() {;}
|
CThing() {;}
|
||||||
virtual ~CThing() {;}
|
virtual ~CThing() {;}
|
||||||
|
|
||||||
virtual TYPE getThingType() {return TYPE_THING;} //=0; (pkg)
|
virtual TYPE getThingType()=0;
|
||||||
|
|
||||||
|
|
||||||
virtual void init();
|
virtual void init();
|
||||||
|
@ -108,8 +112,6 @@ protected:
|
||||||
// Pos
|
// Pos
|
||||||
DVECTOR Pos, PosDelta;
|
DVECTOR Pos, PosDelta;
|
||||||
|
|
||||||
// Big linked list that contains all CThings ( possibly a temp measure PKG )
|
|
||||||
// static CThing *s_thingList;
|
|
||||||
public:
|
public:
|
||||||
class CThing *m_nextThing;
|
class CThing *m_nextThing;
|
||||||
|
|
||||||
|
@ -119,10 +121,10 @@ public:
|
||||||
|
|
||||||
// -- Collision --
|
// -- Collision --
|
||||||
public:
|
public:
|
||||||
DVECTOR getCollisionSize() {return m_collisionSize;}
|
virtual int canCollide() {return true;}
|
||||||
virtual int checkCollisionAgainst(CThing *_thisThing);
|
virtual int checkCollisionAgainst(CThing *_thisThing);
|
||||||
void updateCollisionArea();
|
void updateCollisionArea();
|
||||||
virtual void collidedWith(CThing *_thisThing) {;} //=0; (pkg)
|
virtual void collidedWith(CThing *_thisThing) {;}
|
||||||
protected:
|
protected:
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -145,6 +147,48 @@ private:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* These are the individual base classes for each of the seperate thing types */
|
||||||
|
class CPickupThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_PICKUP;}
|
||||||
|
};
|
||||||
|
class CPlayerThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_PLAYER;}
|
||||||
|
};
|
||||||
|
class CPlayerProjectileThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_PLAYERPROJECTILE;}
|
||||||
|
};
|
||||||
|
class CNpcThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_NPC;}
|
||||||
|
};
|
||||||
|
class CEnemyThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_ENEMY;}
|
||||||
|
};
|
||||||
|
class CEnemyProjectileThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_ENEMYPROJECTILE;}
|
||||||
|
};
|
||||||
|
class CPlatformThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_PLATFORM;}
|
||||||
|
};
|
||||||
|
class CTriggerThing : public CThing
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual TYPE getThingType() {return TYPE_TRIGGER;}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Globals
|
Globals
|
||||||
|
|
|
@ -367,14 +367,6 @@ SOURCE=..\..\..\source\game\pause.cpp
|
||||||
|
|
||||||
SOURCE=..\..\..\source\game\pause.h
|
SOURCE=..\..\..\source\game\pause.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\..\..\source\game\thing.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\..\..\source\game\thing.h
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "gfx"
|
# Begin Group "gfx"
|
||||||
|
|
||||||
|
@ -1067,14 +1059,6 @@ SOURCE=..\..\..\source\thing\thing.cpp
|
||||||
|
|
||||||
SOURCE=..\..\..\source\thing\thing.h
|
SOURCE=..\..\..\source\thing\thing.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\..\..\source\thing\tpickup.h
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=..\..\..\source\thing\tplayer.h
|
|
||||||
# End Source File
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "utils"
|
# Begin Group "utils"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue