diff --git a/makefile.gaz b/makefile.gaz index ff6074768..63a83a857 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -152,7 +152,8 @@ hazard_src := hazard \ hrwheel \ hpswitch \ hrckshrd \ - hinert + hinert \ + hfemit fx_src := fx \ fxbaseanim \ diff --git a/source/fx/fx.cpp b/source/fx/fx.cpp index 06e2ffc8a..f132c19b6 100644 --- a/source/fx/fx.cpp +++ b/source/fx/fx.cpp @@ -339,6 +339,7 @@ void CFX::init() OtPos=OTPOS__ACTOR_POS; RelativeToMap=true; Life=-1; // Set to immortal + IsVisible=true; } /*****************************************************************************/ diff --git a/source/fx/fx.h b/source/fx/fx.h index 8890aaad0..2e3f07a14 100644 --- a/source/fx/fx.h +++ b/source/fx/fx.h @@ -78,12 +78,14 @@ virtual void getFXRenderPos(DVECTOR &Pos); virtual bool getFXParentPos(DVECTOR &Pos); virtual void killFX() {setToShutdown();} +virtual void toggleVisible() {IsVisible = !IsVisible;} protected: s32 OtPos; s16 Life; bool RelativeToMap; + bool IsVisible; }; /*****************************************************************************/ diff --git a/source/fx/fxbaseanim.cpp b/source/fx/fxbaseanim.cpp index 7addf7c22..63a1613ee 100644 --- a/source/fx/fxbaseanim.cpp +++ b/source/fx/fxbaseanim.cpp @@ -96,7 +96,7 @@ void CFXBaseAnim::render() DVECTOR RenderPos; getFXRenderPos(RenderPos); - if (!canRender()) return; + if (!canRender() || !IsVisible) return; SpriteBank *SprBank=CGameScene::getSpriteBank(); diff --git a/source/hazard/hazard.cpp b/source/hazard/hazard.cpp index 5ba327e1c..5601ab119 100644 --- a/source/hazard/hazard.cpp +++ b/source/hazard/hazard.cpp @@ -115,6 +115,10 @@ #include "hazard\hinert.h" #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_ROCKSHARD_HAZARD, NPC_INERT_HAZARD, + NPC_FLAME_EMITTER_HAZARD, }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -279,6 +284,12 @@ CNpcHazard *hazard; break; } + case NPC_FLAME_EMITTER_HAZARD: + { + hazard = new ("flame emitter hazard") CNpcFlameEmitterHazard; + break; + } + default: { hazard = NULL; diff --git a/source/hazard/hazard.h b/source/hazard/hazard.h index 832794efc..b0adb7329 100644 --- a/source/hazard/hazard.h +++ b/source/hazard/hazard.h @@ -60,6 +60,7 @@ public: NPC_PRESSURE_SWITCH_HAZARD, NPC_ROCKSHARD_HAZARD, NPC_INERT_HAZARD, + NPC_FLAME_EMITTER_HAZARD, NPC_HAZARD_TYPE_MAX, }; @@ -69,7 +70,7 @@ public: }; virtual void init(); - void setGraphic( sThingHazard *ThisHazard ); + virtual void setGraphic( sThingHazard *ThisHazard ); void shutdown(); void think(int _frames); virtual void render(); diff --git a/tools/Data/bin/MkLevel.ini b/tools/Data/bin/MkLevel.ini index 246aa453e..269fbe3d5 100644 --- a/tools/Data/bin/MkLevel.ini +++ b/tools/Data/bin/MkLevel.ini @@ -166,4 +166,5 @@ RisingWeightWheel=17 PressureSwitch=18 SingleSpike=19 CheckPoint=20 -WaterBucket=20 \ No newline at end of file +WaterBucket=20 +FlameEmitter=21 \ No newline at end of file diff --git a/tools/MapEdit/Hazard.ini b/tools/MapEdit/Hazard.ini index 0a8cece81..f6ff91aa2 100644 --- a/tools/MapEdit/Hazard.ini +++ b/tools/MapEdit/Hazard.ini @@ -259,3 +259,13 @@ Collision=0 Health=0 AttackStrength=0 Respawn=1 + +[FlameEmitter] +Gfx=..\..\graphics\hazards\fireball\fireball.gin +WayPoints=0 +Speed=0 +TurnRate=0 +Collision=0 +Health=0 +AttackStrength=0 +Respawn=0 diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index dda102e77..e1228d7a8 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -881,6 +881,14 @@ SOURCE=..\..\..\source\hazard\hfan.h # End 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 # End Source File # Begin Source File @@ -2053,12 +2061,68 @@ SOURCE=..\..\..\source\fx\fx.h # End 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 # End Source File # Begin Source File SOURCE=..\..\..\source\fx\fxjfish.h # 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 # Begin Group "jellfish"