This commit is contained in:
parent
62347a748a
commit
bfbd5700f7
7 changed files with 95 additions and 4 deletions
|
@ -105,7 +105,9 @@ platform_src := platform \
|
||||||
ppendulm \
|
ppendulm \
|
||||||
pseesaw \
|
pseesaw \
|
||||||
pbounce \
|
pbounce \
|
||||||
pdual
|
pdual \
|
||||||
|
pfgen \
|
||||||
|
pfallnor
|
||||||
|
|
||||||
hazard_src := hazard \
|
hazard_src := hazard \
|
||||||
hfalling \
|
hfalling \
|
||||||
|
|
|
@ -260,6 +260,34 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
NPC_PLATFORM_TIMER_NONE,
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // NPC_OILDRUM_GENERATOR
|
||||||
|
ACTORS_CLAM_SBK,
|
||||||
|
ANIM_CLAM_SIDESNAP,
|
||||||
|
2,
|
||||||
|
128,
|
||||||
|
true,
|
||||||
|
DAMAGE__NONE,
|
||||||
|
0,
|
||||||
|
4,
|
||||||
|
NPC_PLATFORM_INFINITE_LIFE,
|
||||||
|
4,
|
||||||
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
|
},
|
||||||
|
|
||||||
|
{ // NPC_CRATE_GENERATOR
|
||||||
|
ACTORS_CLAM_SBK,
|
||||||
|
ANIM_CLAM_SIDESNAP,
|
||||||
|
3,
|
||||||
|
128,
|
||||||
|
true,
|
||||||
|
DAMAGE__NONE,
|
||||||
|
0,
|
||||||
|
4,
|
||||||
|
NPC_PLATFORM_INFINITE_LIFE,
|
||||||
|
4,
|
||||||
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
|
},
|
||||||
|
|
||||||
{ // NPC_PLAYER_BUBBLE_PLATFORM
|
{ // NPC_PLAYER_BUBBLE_PLATFORM
|
||||||
ACTORS_CLAM_SBK,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_SIDESNAP,
|
ANIM_CLAM_SIDESNAP,
|
||||||
|
@ -294,5 +322,7 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
||||||
NPC_CRATE_PLATFORM,
|
NPC_CRATE_PLATFORM,
|
||||||
NPC_BOUNCE_PLATFORM,
|
NPC_BOUNCE_PLATFORM,
|
||||||
NPC_DUAL_PLATFORM,
|
NPC_DUAL_PLATFORM,
|
||||||
|
NPC_OILDRUM_GENERATOR,
|
||||||
|
NPC_CRATE_GENERATOR,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
};
|
};
|
||||||
|
|
|
@ -107,6 +107,10 @@
|
||||||
#include "platform\pplayer.h"
|
#include "platform\pplayer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PLATFORM_PFGEN_H__
|
||||||
|
#include "platform\pfgen.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -227,6 +231,24 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_OILDRUM_GENERATOR:
|
||||||
|
{
|
||||||
|
CNpcFallingPlatformGenerator *generator;
|
||||||
|
generator = new ("oildrum generator") CNpcFallingPlatformGenerator;
|
||||||
|
generator->setTargetType( NPC_OILDRUM_PLATFORM );
|
||||||
|
platform = generator;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case NPC_CRATE_GENERATOR:
|
||||||
|
{
|
||||||
|
CNpcFallingPlatformGenerator *generator;
|
||||||
|
generator = new ("crate generator") CNpcFallingPlatformGenerator;
|
||||||
|
generator->setTargetType( NPC_CRATE_PLATFORM );
|
||||||
|
platform = generator;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
ASSERT( 0 );
|
ASSERT( 0 );
|
||||||
|
@ -287,14 +309,16 @@ void CNpcPlatform::setWaypoints( sThingPlatform *ThisPlatform )
|
||||||
|
|
||||||
void CNpcPlatform::setGraphic( sThingPlatform *ThisPlatform )
|
void CNpcPlatform::setGraphic( sThingPlatform *ThisPlatform )
|
||||||
{
|
{
|
||||||
|
m_graphicNum = ThisPlatform->Gfx;
|
||||||
m_modelGfx = new ("ModelGfx") CModelGfx;
|
m_modelGfx = new ("ModelGfx") CModelGfx;
|
||||||
m_modelGfx->SetModel( ThisPlatform->Gfx );
|
m_modelGfx->SetModel( m_graphicNum );
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void CNpcPlatform::setGraphic( u8 graphicNum )
|
void CNpcPlatform::setGraphic( u8 graphicNum )
|
||||||
{
|
{
|
||||||
|
m_graphicNum = graphicNum;
|
||||||
m_modelGfx = new ("ModelGfx") CModelGfx;
|
m_modelGfx = new ("ModelGfx") CModelGfx;
|
||||||
m_modelGfx->SetModel( graphicNum );
|
m_modelGfx->SetModel( graphicNum );
|
||||||
}
|
}
|
||||||
|
@ -1101,6 +1125,13 @@ void CNpcPlatform::setTypeFromMapEdit( u16 newType )
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void CNpcPlatform::setLayerCollision( class CLayerCollision *_layer )
|
||||||
|
{
|
||||||
|
m_layerCollision=_layer;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::getTypeFromMapEdit( u16 newType )
|
CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::getTypeFromMapEdit( u16 newType )
|
||||||
{
|
{
|
||||||
return( mapEditConvertTable[newType] );
|
return( mapEditConvertTable[newType] );
|
||||||
|
|
|
@ -69,6 +69,8 @@ public:
|
||||||
NPC_CRATE_PLATFORM,
|
NPC_CRATE_PLATFORM,
|
||||||
NPC_BOUNCE_PLATFORM,
|
NPC_BOUNCE_PLATFORM,
|
||||||
NPC_DUAL_PLATFORM,
|
NPC_DUAL_PLATFORM,
|
||||||
|
NPC_OILDRUM_GENERATOR,
|
||||||
|
NPC_CRATE_GENERATOR,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
NPC_PLATFORM_TYPE_MAX,
|
NPC_PLATFORM_TYPE_MAX,
|
||||||
};
|
};
|
||||||
|
@ -78,9 +80,9 @@ public:
|
||||||
void init( DVECTOR initPos, s32 initLifetime );
|
void init( DVECTOR initPos, s32 initLifetime );
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void think(int _frames);
|
virtual void think(int _frames);
|
||||||
virtual void render();
|
virtual void render();
|
||||||
void setLayerCollision( class CLayerCollision *_layer ) {m_layerCollision=_layer;}
|
void setLayerCollision( class CLayerCollision *_layer );
|
||||||
void setType( NPC_PLATFORM_UNIT_TYPE newType ) {m_type = newType;}
|
void setType( NPC_PLATFORM_UNIT_TYPE newType ) {m_type = newType;}
|
||||||
void setTypeFromMapEdit( u16 newType );
|
void setTypeFromMapEdit( u16 newType );
|
||||||
#ifdef REMOVETHIS
|
#ifdef REMOVETHIS
|
||||||
|
@ -202,6 +204,8 @@ protected:
|
||||||
|
|
||||||
u8 m_platformWidth;
|
u8 m_platformWidth;
|
||||||
|
|
||||||
|
int m_graphicNum;
|
||||||
|
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
||||||
static NPC_PLATFORM_UNIT_TYPE mapEditConvertTable[NPC_PLATFORM_TYPE_MAX];
|
static NPC_PLATFORM_UNIT_TYPE mapEditConvertTable[NPC_PLATFORM_TYPE_MAX];
|
||||||
|
|
|
@ -92,7 +92,9 @@ Seesaw=12
|
||||||
GhostTrain=9
|
GhostTrain=9
|
||||||
Barrel=2
|
Barrel=2
|
||||||
OilDrum=13
|
OilDrum=13
|
||||||
|
OilDrumGenerator=17
|
||||||
Crate=14
|
Crate=14
|
||||||
|
CrateGenerator=18
|
||||||
Loveboat=9
|
Loveboat=9
|
||||||
BouncyRing=15
|
BouncyRing=15
|
||||||
BouncyTyre=15
|
BouncyTyre=15
|
||||||
|
|
|
@ -44,6 +44,9 @@ Gfx=..\..\Graphics\platforms\Barrel\Barrel.gin
|
||||||
[Crate]
|
[Crate]
|
||||||
Gfx=..\..\Graphics\platforms\Crate\Crate.gin
|
Gfx=..\..\Graphics\platforms\Crate\Crate.gin
|
||||||
|
|
||||||
|
[CrateGenerator]
|
||||||
|
Gfx=..\..\Graphics\platforms\Crate\Crate.gin
|
||||||
|
|
||||||
[ghosttrain]
|
[ghosttrain]
|
||||||
Gfx=..\..\Graphics\platforms\ghosttrain\ghosttrain.gin
|
Gfx=..\..\Graphics\platforms\ghosttrain\ghosttrain.gin
|
||||||
|
|
||||||
|
@ -53,6 +56,9 @@ Gfx=..\..\Graphics\platforms\Loveboat\loveboat.gin
|
||||||
[Oildrum]
|
[Oildrum]
|
||||||
Gfx=..\..\Graphics\platforms\Oildrum\Oildrum.gin
|
Gfx=..\..\Graphics\platforms\Oildrum\Oildrum.gin
|
||||||
|
|
||||||
|
[OildrumGenerator]
|
||||||
|
Gfx=..\..\Graphics\platforms\Oildrum\Oildrum.gin
|
||||||
|
|
||||||
[seesaw]
|
[seesaw]
|
||||||
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin
|
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin
|
||||||
|
|
||||||
|
|
|
@ -1153,6 +1153,22 @@ SOURCE=..\..\..\source\platform\pfalling.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pfallnor.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pfallnor.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pfgen.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pfgen.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\platform\pfishhk.cpp
|
SOURCE=..\..\..\source\platform\pfishhk.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue