This commit is contained in:
parent
7939188800
commit
000d0922df
8 changed files with 98 additions and 3 deletions
|
@ -132,7 +132,8 @@ platform_src := platform \
|
||||||
pcbubble \
|
pcbubble \
|
||||||
pdrop \
|
pdrop \
|
||||||
psswitch \
|
psswitch \
|
||||||
plift
|
plift \
|
||||||
|
plurve
|
||||||
|
|
||||||
hazard_src := hazard \
|
hazard_src := hazard \
|
||||||
hfalling \
|
hfalling \
|
||||||
|
|
|
@ -19,6 +19,15 @@
|
||||||
#include "utils\utils.h"
|
#include "utils\utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __VID_HEADER_
|
||||||
|
#include "system\vid.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GAME_GAME_H__
|
||||||
|
#include "game\game.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcPendulumHazard::init()
|
void CNpcPendulumHazard::init()
|
||||||
|
@ -108,3 +117,54 @@ void CNpcPendulumHazard::processMovement( int _frames )
|
||||||
Pos.vx = m_base.vx + ( ( m_length * rcos( m_heading + m_extension ) ) >> 12 );
|
Pos.vx = m_base.vx + ( ( m_length * rcos( m_heading + m_extension ) ) >> 12 );
|
||||||
Pos.vy = m_base.vy + ( ( m_length * rsin( m_heading + m_extension ) ) >> 12 );
|
Pos.vy = m_base.vy + ( ( m_length * rsin( m_heading + m_extension ) ) >> 12 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcPendulumHazard::render()
|
||||||
|
{
|
||||||
|
int x1,y1,x2,y2;
|
||||||
|
int minX, maxX, minY, maxY;
|
||||||
|
|
||||||
|
DVECTOR offset = CLevel::getCameraPos();
|
||||||
|
|
||||||
|
CHazardThing::render();
|
||||||
|
|
||||||
|
if (canRender())
|
||||||
|
{
|
||||||
|
DVECTOR &renderPos=getRenderPos();
|
||||||
|
|
||||||
|
m_modelGfx->Render(renderPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
x1 = Pos.vx - offset.vx;
|
||||||
|
x2 = m_base.vx - offset.vx;
|
||||||
|
|
||||||
|
y1 = Pos.vy - offset.vy;
|
||||||
|
y2 = m_base.vy - offset.vy;
|
||||||
|
|
||||||
|
minX = x1;
|
||||||
|
maxX = x2;
|
||||||
|
|
||||||
|
if ( minX > maxX )
|
||||||
|
{
|
||||||
|
minX = x2;
|
||||||
|
maxX = x1;
|
||||||
|
}
|
||||||
|
|
||||||
|
minY = y1;
|
||||||
|
maxY = y2;
|
||||||
|
|
||||||
|
if ( minY > maxY )
|
||||||
|
{
|
||||||
|
minY = y2;
|
||||||
|
maxY = y1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( maxX >= 0 && minX <= VidGetScrW() )
|
||||||
|
{
|
||||||
|
if ( maxY >= 0 && minY <= VidGetScrH() )
|
||||||
|
{
|
||||||
|
DrawLine( x1, y1, x2, y2, 0, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -22,12 +22,14 @@ class CNpcPendulumHazard : public CNpcHazard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void init();
|
void init();
|
||||||
|
virtual void render();
|
||||||
protected:
|
protected:
|
||||||
virtual void setWaypoints( sThingHazard *ThisHazard );
|
virtual void setWaypoints( sThingHazard *ThisHazard );
|
||||||
void processMovement( int _frames );
|
void processMovement( int _frames );
|
||||||
|
|
||||||
s32 m_length;
|
s32 m_length;
|
||||||
s32 m_maxExtension;
|
s32 m_maxExtension;
|
||||||
|
s16 m_rotation;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -502,6 +502,18 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
0,
|
0,
|
||||||
NPC_PLATFORM_TIMER_NONE,
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // NPC_LOVE_BOAT_PLATFORM
|
||||||
|
3,
|
||||||
|
128,
|
||||||
|
true,
|
||||||
|
DAMAGE__NONE,
|
||||||
|
0,
|
||||||
|
4,
|
||||||
|
NPC_PLATFORM_INFINITE_LIFE,
|
||||||
|
2,
|
||||||
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATFORM_TYPE_MAX] =
|
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATFORM_TYPE_MAX] =
|
||||||
|
@ -541,6 +553,7 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
||||||
NPC_DROP_PLATFORM,
|
NPC_DROP_PLATFORM,
|
||||||
NPC_STEAM_SWITCH_PLATFORM,
|
NPC_STEAM_SWITCH_PLATFORM,
|
||||||
NPC_LIFT_PLATFORM,
|
NPC_LIFT_PLATFORM,
|
||||||
|
NPC_LOVE_BOAT_PLATFORM,
|
||||||
NPC_CONVEYOR_PLATFORM,
|
NPC_CONVEYOR_PLATFORM,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
NPC_CLAM_PLATFORM,
|
NPC_CLAM_PLATFORM,
|
||||||
|
|
|
@ -183,6 +183,10 @@
|
||||||
#include "platform\plift.h"
|
#include "platform\plift.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PLATFORM_PLURVE_H__
|
||||||
|
#include "platform\plurve.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#include "fx\fx.h"
|
||||||
#include "fx\fxjfish.h"
|
#include "fx\fxjfish.h"
|
||||||
|
|
||||||
|
@ -421,6 +425,12 @@ CNpcPlatform *CNpcPlatform::Create(int Type)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_LOVE_BOAT_PLATFORM:
|
||||||
|
{
|
||||||
|
platform = new ("love boat platform") CNpcLoveBoatPlatform;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
ASSERT( 0 );
|
ASSERT( 0 );
|
||||||
|
|
|
@ -92,6 +92,7 @@ public:
|
||||||
NPC_DROP_PLATFORM,
|
NPC_DROP_PLATFORM,
|
||||||
NPC_STEAM_SWITCH_PLATFORM,
|
NPC_STEAM_SWITCH_PLATFORM,
|
||||||
NPC_LIFT_PLATFORM,
|
NPC_LIFT_PLATFORM,
|
||||||
|
NPC_LOVE_BOAT_PLATFORM,
|
||||||
NPC_PLATFORM_TYPE_MAX,
|
NPC_PLATFORM_TYPE_MAX,
|
||||||
};
|
};
|
||||||
enum
|
enum
|
||||||
|
|
|
@ -96,7 +96,7 @@ OilDrum=13
|
||||||
OilDrumGenerator=17
|
OilDrumGenerator=17
|
||||||
Crate=14
|
Crate=14
|
||||||
CrateGenerator=18
|
CrateGenerator=18
|
||||||
Loveboat=19
|
Loveboat=35
|
||||||
BouncyRing=15
|
BouncyRing=15
|
||||||
BouncyTyre=15
|
BouncyTyre=15
|
||||||
DualPlatform=16
|
DualPlatform=16
|
||||||
|
|
|
@ -1581,6 +1581,14 @@ SOURCE=..\..\..\source\platform\plinear.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\plurve.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\plurve.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\platform\ppendulm.cpp
|
SOURCE=..\..\..\source\platform\ppendulm.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Reference in a new issue