This commit is contained in:
Charles 2001-05-03 14:51:14 +00:00
parent ad01d5c18c
commit d292ec9299
7 changed files with 83 additions and 21 deletions

View File

@ -113,7 +113,8 @@ hazard_src := hazard \
hfirebal \
hsaw \
hbarrel \
hboat
hboat \
hcsaw
projectl_src := projectl \
prnpc

View File

@ -43,6 +43,18 @@
#include "hazard\hboat.h"
#endif
#ifndef __HAZARD_HBARREL_H__
#include "hazard\hbarrel.h"
#endif
#ifndef __HAZARD_HSTATIC_H__
#include "hazard\hstatic.h"
#endif
#ifndef __HAZARD_HCSAW_H__
#include "hazard\hcsaw.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE_MAX] =
@ -50,6 +62,9 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE
NPC_FALLING_HAZARD,
NPC_PENDULUM_HAZARD,
NPC_BOAT_HAZARD,
NPC_BARREL_HAZARD,
NPC_STATIC_HAZARD,
NPC_CIRCULAR_SAW_HAZARD,
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -80,6 +95,24 @@ CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard)
break;
}
case NPC_BARREL_HAZARD:
{
hazard = new ("barrel hazard") CNpcBarrelHazard;
break;
}
case NPC_STATIC_HAZARD:
{
hazard = new ("static hazard") CNpcStaticHazard;
break;
}
case NPC_CIRCULAR_SAW_HAZARD:
{
hazard = new ("circular saw hazard") CNpcCircularSawHazard;
break;
}
default:
{
hazard = NULL;

View File

@ -39,6 +39,9 @@ public:
NPC_FALLING_HAZARD = 0,
NPC_PENDULUM_HAZARD = 1,
NPC_BOAT_HAZARD,
NPC_BARREL_HAZARD,
NPC_STATIC_HAZARD,
NPC_CIRCULAR_SAW_HAZARD,
NPC_HAZARD_TYPE_MAX,
};
@ -47,7 +50,7 @@ public:
void setGraphic( sThingHazard *ThisHazard );
void shutdown();
void think(int _frames);
void render();
virtual void render();
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
virtual void setWaypoints( sThingHazard *ThisHazard );
void addWaypoint( s32 xPos, s32 yPos );

View File

@ -25,22 +25,6 @@ void CNpcBarrelHazard::init()
{
CNpcHazard::init();
DVECTOR newPos;
Pos.vx = 100;
Pos.vy = 100;
m_base = Pos;
newPos.vx = 600;
newPos.vy = 100;
m_npcPath.addWaypoint( newPos );
newPos.vx = 50;
newPos.vy = 100;
m_npcPath.addWaypoint( newPos );
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
}

View File

@ -119,5 +119,8 @@ HeartPendulum=1
Tugboat=2
Acorn=0
PumpkinPendulum=1
RollingRock=3
CircularSaw=5
Pylons=4

View File

@ -60,6 +60,32 @@ Health=0
AttackStrength=0
Respawn=2
#circular saw
#Pylons
#Rolling Rock
[RollingRock]
Gfx=..\..\graphics\hazards\RollingRock\RollingRock.gin
WayPoints=16
Speed=0
TurnRate=0
Collision=0
Health=0
AttackStrength=0
Respawn=2
[CircularSaw]
Gfx=..\..\graphics\hazards\CircularSaw\CircularSaw.gin
WayPoints=0
Speed=0
TurnRate=0
Collision=0
Health=0
AttackStrength=0
Respawn=2
[Pylons]
Gfx=..\..\graphics\hazards\Pylons\Pylons.gin
WayPoints=0
Speed=0
TurnRate=0
Collision=0
Health=0
AttackStrength=0
Respawn=2

View File

@ -785,6 +785,14 @@ SOURCE=..\..\..\source\hazard\hboat.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hcsaw.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hcsaw.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hfalling.cpp
# End Source File
# Begin Source File
@ -815,6 +823,10 @@ SOURCE=..\..\..\source\hazard\hsaw.cpp
SOURCE=..\..\..\source\hazard\hsaw.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hstatic.h
# End Source File
# End Group
# Begin Group "level"