This commit is contained in:
Charles 2001-06-01 21:00:15 +00:00
parent bfb4185468
commit 4c44d9a75a
9 changed files with 95 additions and 4 deletions

View File

@ -152,7 +152,8 @@ hazard_src := hazard \
hrwheel \ hrwheel \
hpswitch \ hpswitch \
hrckshrd \ hrckshrd \
hinert hinert \
hfemit
fx_src := fx \ fx_src := fx \
fxbaseanim \ fxbaseanim \

View File

@ -339,6 +339,7 @@ void CFX::init()
OtPos=OTPOS__ACTOR_POS; OtPos=OTPOS__ACTOR_POS;
RelativeToMap=true; RelativeToMap=true;
Life=-1; // Set to immortal Life=-1; // Set to immortal
IsVisible=true;
} }
/*****************************************************************************/ /*****************************************************************************/

View File

@ -78,12 +78,14 @@ virtual void getFXRenderPos(DVECTOR &Pos);
virtual bool getFXParentPos(DVECTOR &Pos); virtual bool getFXParentPos(DVECTOR &Pos);
virtual void killFX() {setToShutdown();} virtual void killFX() {setToShutdown();}
virtual void toggleVisible() {IsVisible = !IsVisible;}
protected: protected:
s32 OtPos; s32 OtPos;
s16 Life; s16 Life;
bool RelativeToMap; bool RelativeToMap;
bool IsVisible;
}; };
/*****************************************************************************/ /*****************************************************************************/

View File

@ -96,7 +96,7 @@ void CFXBaseAnim::render()
DVECTOR RenderPos; DVECTOR RenderPos;
getFXRenderPos(RenderPos); getFXRenderPos(RenderPos);
if (!canRender()) return; if (!canRender() || !IsVisible) return;
SpriteBank *SprBank=CGameScene::getSpriteBank(); SpriteBank *SprBank=CGameScene::getSpriteBank();

View File

@ -115,6 +115,10 @@
#include "hazard\hinert.h" #include "hazard\hinert.h"
#endif #endif
#ifndef __HAZARD_HFEMIT_H__
#include "hazard\hfemit.h"
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -141,6 +145,7 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE
NPC_PRESSURE_SWITCH_HAZARD, NPC_PRESSURE_SWITCH_HAZARD,
NPC_ROCKSHARD_HAZARD, NPC_ROCKSHARD_HAZARD,
NPC_INERT_HAZARD, NPC_INERT_HAZARD,
NPC_FLAME_EMITTER_HAZARD,
}; };
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -279,6 +284,12 @@ CNpcHazard *hazard;
break; break;
} }
case NPC_FLAME_EMITTER_HAZARD:
{
hazard = new ("flame emitter hazard") CNpcFlameEmitterHazard;
break;
}
default: default:
{ {
hazard = NULL; hazard = NULL;

View File

@ -60,6 +60,7 @@ public:
NPC_PRESSURE_SWITCH_HAZARD, NPC_PRESSURE_SWITCH_HAZARD,
NPC_ROCKSHARD_HAZARD, NPC_ROCKSHARD_HAZARD,
NPC_INERT_HAZARD, NPC_INERT_HAZARD,
NPC_FLAME_EMITTER_HAZARD,
NPC_HAZARD_TYPE_MAX, NPC_HAZARD_TYPE_MAX,
}; };
@ -69,7 +70,7 @@ public:
}; };
virtual void init(); virtual void init();
void setGraphic( sThingHazard *ThisHazard ); virtual void setGraphic( sThingHazard *ThisHazard );
void shutdown(); void shutdown();
void think(int _frames); void think(int _frames);
virtual void render(); virtual void render();

View File

@ -166,4 +166,5 @@ RisingWeightWheel=17
PressureSwitch=18 PressureSwitch=18
SingleSpike=19 SingleSpike=19
CheckPoint=20 CheckPoint=20
WaterBucket=20 WaterBucket=20
FlameEmitter=21

View File

@ -259,3 +259,13 @@ Collision=0
Health=0 Health=0
AttackStrength=0 AttackStrength=0
Respawn=1 Respawn=1
[FlameEmitter]
Gfx=..\..\graphics\hazards\fireball\fireball.gin
WayPoints=0
Speed=0
TurnRate=0
Collision=0
Health=0
AttackStrength=0
Respawn=0

View File

@ -881,6 +881,14 @@ SOURCE=..\..\..\source\hazard\hfan.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\..\source\hazard\hfemit.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hfemit.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hfirebal.cpp SOURCE=..\..\..\source\hazard\hfirebal.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -2053,12 +2061,68 @@ SOURCE=..\..\..\source\fx\fx.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\..\source\fx\fxbaseanim.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbaseanim.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbaseemitter.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbaseemitter.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbasetrail.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbasetrail.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbubble.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxbubble.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxfallingtile.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxfallingtile.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxjfish.cpp SOURCE=..\..\..\source\fx\fxjfish.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\..\source\fx\fxjfish.h SOURCE=..\..\..\source\fx\fxjfish.h
# End Source File # End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxnrgbar.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxnrgbar.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxsteam.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\fx\fxsteam.h
# End Source File
# End Group # End Group
# Begin Group "jellfish" # Begin Group "jellfish"