This commit is contained in:
Charles 2001-05-05 13:54:34 +00:00
parent d81378013f
commit a74745a7b2
25 changed files with 103 additions and 13 deletions

View file

@ -112,7 +112,8 @@ platform_src := platform \
praft \ praft \
plantern \ plantern \
pbgeyser \ pbgeyser \
pleaf pleaf \
pbwheel
hazard_src := hazard \ hazard_src := hazard \
hfalling \ hfalling \
@ -125,7 +126,8 @@ hazard_src := hazard \
hmower \ hmower \
hmasher \ hmasher \
hfan \ hfan \
hspikes hspikes \
hbwheel
fx_src := fx \ fx_src := fx \
fxjfish fxjfish

View file

@ -71,6 +71,10 @@
#include "hazard\hspikes.h" #include "hazard\hspikes.h"
#endif #endif
#ifndef __HAZARD_HBWHEEL_H__
#include "hazard\hbwheel.h"
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -86,6 +90,7 @@ CNpcHazard::NPC_HAZARD_UNIT_TYPE CNpcHazard::mapEditConvertTable[NPC_HAZARD_TYPE
NPC_MASHER_HAZARD, NPC_MASHER_HAZARD,
NPC_FAN_HAZARD, NPC_FAN_HAZARD,
NPC_SPIKES_HAZARD, NPC_SPIKES_HAZARD,
NPC_BIG_WHEEL_HAZARD,
}; };
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -158,6 +163,12 @@ CNpcHazard *CNpcHazard::Create(sThingHazard *ThisHazard)
break; break;
} }
case NPC_BIG_WHEEL_HAZARD:
{
hazard = new ("big wheel") CNpcBigWheelHazard;
break;
}
default: default:
{ {
hazard = NULL; hazard = NULL;
@ -257,6 +268,10 @@ void CNpcHazard::setGraphic( sThingHazard *ThisHazard )
{ {
m_modelGfx = new ("ModelGfx") CModelGfx; m_modelGfx = new ("ModelGfx") CModelGfx;
m_modelGfx->SetModel( ThisHazard->Gfx ); m_modelGfx->SetModel( ThisHazard->Gfx );
sBBox boundingBox = m_modelGfx->GetBBox();
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
} }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -46,6 +46,7 @@ public:
NPC_MASHER_HAZARD, NPC_MASHER_HAZARD,
NPC_FAN_HAZARD, NPC_FAN_HAZARD,
NPC_SPIKES_HAZARD, NPC_SPIKES_HAZARD,
NPC_BIG_WHEEL_HAZARD,
NPC_HAZARD_TYPE_MAX, NPC_HAZARD_TYPE_MAX,
}; };

View file

@ -37,7 +37,7 @@ void CNpcBigWheelHazard::init()
void CNpcBigWheelHazard::processMovement( int _frames ) void CNpcBigWheelHazard::processMovement( int _frames )
{ {
m_rotation += 10 * _frames; m_rotation += 5 * _frames;
m_rotation &= 4095; m_rotation &= 4095;
} }

View file

@ -30,6 +30,8 @@
void CNpcBouncePlatform::postInit() void CNpcBouncePlatform::postInit()
{ {
CNpcPlatform::postInit();
m_vertScale = 0; m_vertScale = 0;
m_vertVelocity = 0; m_vertVelocity = 0;
} }

View file

@ -36,6 +36,8 @@
void CNpcBranchPlatform::postInit() void CNpcBranchPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_angularVelocity = 0; m_angularVelocity = 0;
m_platformWidth <<= 1; m_platformWidth <<= 1;
} }

View file

@ -23,6 +23,8 @@
void CNpcCartPlatform::postInit() void CNpcCartPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
m_carSpeed = m_data[m_type].speed << 8; m_carSpeed = m_data[m_type].speed << 8;

View file

@ -19,6 +19,8 @@
void CNpcCircularPlatform::postInit() void CNpcCircularPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_extension = 100; m_extension = 100;
} }

View file

@ -27,6 +27,8 @@
void CNpcFallingPlatform::postInit() void CNpcFallingPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
m_isActive = false; m_isActive = false;

View file

@ -27,6 +27,8 @@
void CNpcFallingNoRespawnPlatform::postInit() void CNpcFallingNoRespawnPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
} }

View file

@ -28,6 +28,8 @@
void CNpcFishHookPlatform::postInit() void CNpcFishHookPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_isMoving = false; m_isMoving = false;
m_isShuttingDown = false; m_isShuttingDown = false;
} }

View file

@ -19,6 +19,8 @@
void CNpcGeyserPlatform::postInit() void CNpcGeyserPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
m_isFiring = false; m_isFiring = false;

View file

@ -23,6 +23,8 @@
void CNpcLanternPlatform::postInit() void CNpcLanternPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_extension = 0; m_extension = 0;
m_heading = 1024; m_heading = 1024;
} }

View file

@ -322,6 +322,18 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
NPC_PLATFORM_TIMER_NONE, NPC_PLATFORM_TIMER_NONE,
}, },
{ // NPC_BIG_WHEEL_PLATFORM
5,
128,
true,
DAMAGE__NONE,
0,
4,
NPC_PLATFORM_INFINITE_LIFE,
0,
NPC_PLATFORM_TIMER_NONE,
},
{ // NPC_PLAYER_BUBBLE_PLATFORM { // NPC_PLAYER_BUBBLE_PLATFORM
3, 3,
128, 128,
@ -360,5 +372,6 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
NPC_VERTICAL_OILDRUM_GENERATOR, NPC_VERTICAL_OILDRUM_GENERATOR,
NPC_LANTERN_PLATFORM, NPC_LANTERN_PLATFORM,
NPC_BUBBLE_GEYSER_GENERATOR, NPC_BUBBLE_GEYSER_GENERATOR,
NPC_BIG_WHEEL_PLATFORM,
NPC_PLAYER_BUBBLE_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM,
}; };

View file

@ -127,6 +127,10 @@
#include "platform\pleaf.h" #include "platform\pleaf.h"
#endif #endif
#ifndef __PLATFORM_PBWHEEL_H__
#include "platform\pbwheel.h"
#endif
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -296,6 +300,12 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
break; break;
} }
case NPC_BIG_WHEEL_PLATFORM:
{
platform = new ("big wheel platform") CNpcBigWheelPlatform;
break;
}
default: default:
{ {
ASSERT( 0 ); ASSERT( 0 );

View file

@ -77,6 +77,7 @@ public:
NPC_LANTERN_PLATFORM, NPC_LANTERN_PLATFORM,
NPC_BUBBLE_GEYSER_GENERATOR, NPC_BUBBLE_GEYSER_GENERATOR,
NPC_LEAF_PLATFORM, NPC_LEAF_PLATFORM,
NPC_BIG_WHEEL_PLATFORM,
NPC_PLAYER_BUBBLE_PLATFORM, NPC_PLAYER_BUBBLE_PLATFORM,
NPC_PLATFORM_TYPE_MAX, NPC_PLATFORM_TYPE_MAX,
}; };

View file

@ -27,6 +27,8 @@
void CNpcLeafPlatform::postInit() void CNpcLeafPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
m_isActive = false; m_isActive = false;

View file

@ -19,6 +19,8 @@
void CNpcLinearPlatform::postInit() void CNpcLinearPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::PONG_PATH ); m_npcPath.setPathType( CNpcPath::PONG_PATH );
} }

View file

@ -23,6 +23,8 @@
void CNpcPendulumPlatform::postInit() void CNpcPendulumPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_extendDir = EXTEND_LEFT; m_extendDir = EXTEND_LEFT;
m_extension = 0; m_extension = 0;
m_heading = 1024; m_heading = 1024;

View file

@ -28,6 +28,8 @@
void CNpcRaftPlatform::postInit() void CNpcRaftPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH ); m_npcPath.setPathType( CNpcPath::SINGLE_USE_PATH );
m_isActivated = false; m_isActivated = false;

View file

@ -23,6 +23,8 @@
void CNpcRetractingPlatform::postInit() void CNpcRetractingPlatform::postInit()
{ {
CNpcPlatform::postInit();
m_timer = NPC_PLATFORM_TIMER_RETRACT; m_timer = NPC_PLATFORM_TIMER_RETRACT;
} }

View file

@ -104,6 +104,7 @@ Raft=19
VertOilDrumGenerator=20 VertOilDrumGenerator=20
SwingingLantern=21 SwingingLantern=21
BubbleGeyserGenerator=22 BubbleGeyserGenerator=22
BigWheelPlatform=23
################################################ ################################################
# Triggers # Triggers
@ -134,6 +135,6 @@ SpinningBlades=6
Masher=7 Masher=7
Fan=8 Fan=8
Spikes=9 Spikes=9
#Wheel=10 Wheel=10

View file

@ -130,12 +130,12 @@ Health=0
AttackStrength=0 AttackStrength=0
Respawn=2 Respawn=2
#[Wheel] [Wheel]
#Gfx=..\..\graphics\hazards\wheel\wheel.gin Gfx=..\..\graphics\hazards\wheel\wheel.gin
#WayPoints=0 WayPoints=0
#Speed=0 Speed=0
#TurnRate=0 TurnRate=0
#Collision=0 Collision=0
#Health=0 Health=0
#AttackStrength=0 AttackStrength=0
#Respawn=2 Respawn=2

View file

@ -87,3 +87,6 @@ Gfx=..\..\Graphics\platforms\wooden\wooden.gin
[BubbleGeyserGenerator] [BubbleGeyserGenerator]
Gfx=..\..\Graphics\platforms\Bubble\bubble.gin Gfx=..\..\Graphics\platforms\Bubble\bubble.gin
[BigWheelPlatform]
Gfx=..\..\Graphics\platforms\carriage\carriage.gin

View file

@ -793,6 +793,14 @@ SOURCE=..\..\..\source\hazard\hboat.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\..\source\hazard\hbwheel.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hbwheel.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\hazard\hcsaw.cpp SOURCE=..\..\..\source\hazard\hcsaw.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@ -1165,6 +1173,14 @@ SOURCE=..\..\..\source\platform\pbubble.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\..\..\source\platform\pbwheel.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\platform\pbwheel.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\platform\pcart.cpp SOURCE=..\..\..\source\platform\pcart.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File