diff --git a/makefile.gaz b/makefile.gaz index 6d98aecee..1372bb8a5 100644 --- a/makefile.gaz +++ b/makefile.gaz @@ -161,7 +161,9 @@ hazard_src := hazard \ hrckshrd \ hinert \ hcswitch \ - hbrock + hbrock \ + hlog \ + hsrdfish fx_src := fx \ fxbaseanim \ diff --git a/source/hazard/hazard.cpp b/source/hazard/hazard.cpp index f8f429afa..b44db8893 100644 --- a/source/hazard/hazard.cpp +++ b/source/hazard/hazard.cpp @@ -123,6 +123,14 @@ #include "hazard\hbrock.h" #endif +#ifndef __HAZARD_HSRDFISH_H__ +#include "hazard\hsrdfish.h" +#endif + +#ifndef __HAZARD_HLOG_H__ +#include "hazard\hlog.h" +#endif + //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -151,6 +159,8 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE NPC_INERT_HAZARD, NPC_CONVEYOR_SWITCH_HAZARD, NPC_BOUNCING_ROCK_HAZARD, + NPC_SWORDFISH_HAZARD, + NPC_LOG_HAZARD, }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -301,6 +311,18 @@ CNpcHazard *hazard; break; } + case NPC_SWORDFISH_HAZARD: + { + hazard = new ("swordfish hazard") CNpcSwordfishHazard; + break; + } + + case NPC_LOG_HAZARD: + { + hazard = new ("log hazard") CNpcLogHazard; + break; + } + default: { hazard = NULL; diff --git a/source/hazard/hazard.h b/source/hazard/hazard.h index f874f1f1b..2b322f1ff 100644 --- a/source/hazard/hazard.h +++ b/source/hazard/hazard.h @@ -62,6 +62,8 @@ public: NPC_INERT_HAZARD, NPC_CONVEYOR_SWITCH_HAZARD, NPC_BOUNCING_ROCK_HAZARD, + NPC_SWORDFISH_HAZARD, + NPC_LOG_HAZARD, NPC_HAZARD_TYPE_MAX, }; diff --git a/source/hazard/hfirebal.cpp b/source/hazard/hfirebal.cpp index 6b18cf0bf..93359b5d7 100644 --- a/source/hazard/hfirebal.cpp +++ b/source/hazard/hfirebal.cpp @@ -68,6 +68,16 @@ void CNpcFireballHazard::setWaypoints( sThingHazard *ThisHazard ) m_width = maxX - minX; m_npcPath.getPathYExtents( &minY, &maxY ); m_height = maxY - minY; + + if ( ThisHazard->PointCount > 1 ) + { + newXPos = (u16) *PntList; + + if ( ( ( newXPos << 4 ) + 8 ) < startPos.vx ) + { + m_width = -m_width; + } + } } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/tools/Data/bin/MkLevel.ini b/tools/Data/bin/MkLevel.ini index f040d18ac..abfd2bd97 100644 --- a/tools/Data/bin/MkLevel.ini +++ b/tools/Data/bin/MkLevel.ini @@ -193,4 +193,6 @@ SingleSpike=19 CheckPoint=20 WaterBucket=20 ConveyorSwitch=21 -ExitMarker=20 \ No newline at end of file +ExitMarker=20 +Swordfish=23 +Log=24 \ No newline at end of file diff --git a/tools/MapEdit/Hazard.ini b/tools/MapEdit/Hazard.ini index 6588aac74..87eeb9aea 100644 --- a/tools/MapEdit/Hazard.ini +++ b/tools/MapEdit/Hazard.ini @@ -279,3 +279,23 @@ Collision=0 Health=0 AttackStrength=0 Respawn=1 + +[Swordfish] +Gfx=..\..\graphics\hazards\swordfish\swordfish.gin +WayPoints=2 +Speed=0 +TurnRate=0 +Collision=0 +Health=0 +AttackStrength=0 +Respawn=1 + +[Log] +Gfx=..\..\graphics\hazards\log\log.gin +WayPoints=2 +Speed=0 +TurnRate=0 +Collision=0 +Health=0 +AttackStrength=0 +Respawn=1 diff --git a/users/paul/spongebob project/spongebob project.dsp b/users/paul/spongebob project/spongebob project.dsp index 1e83e78d4..e82601af5 100644 --- a/users/paul/spongebob project/spongebob project.dsp +++ b/users/paul/spongebob project/spongebob project.dsp @@ -1017,6 +1017,14 @@ SOURCE=..\..\..\source\hazard\hinert.h # End Source File # Begin Source File +SOURCE=..\..\..\source\hazard\hlog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\hazard\hlog.h +# End Source File +# Begin Source File + SOURCE=..\..\..\source\hazard\hmasher.cpp # End Source File # Begin Source File @@ -1097,6 +1105,14 @@ SOURCE=..\..\..\source\hazard\hspikes.h # End Source File # Begin Source File +SOURCE=..\..\..\source\hazard\hsrdfish.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\..\source\hazard\hsrdfish.h +# End Source File +# Begin Source File + SOURCE=..\..\..\source\hazard\hstatic.h # End Source File # End Group