This commit is contained in:
Charles 2001-05-03 19:01:59 +00:00
parent 62347a748a
commit bfbd5700f7
7 changed files with 95 additions and 4 deletions

View File

@ -105,7 +105,9 @@ platform_src := platform \
ppendulm \
pseesaw \
pbounce \
pdual
pdual \
pfgen \
pfallnor
hazard_src := hazard \
hfalling \

View File

@ -260,6 +260,34 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
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
ACTORS_CLAM_SBK,
ANIM_CLAM_SIDESNAP,
@ -294,5 +322,7 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
NPC_CRATE_PLATFORM,
NPC_BOUNCE_PLATFORM,
NPC_DUAL_PLATFORM,
NPC_OILDRUM_GENERATOR,
NPC_CRATE_GENERATOR,
NPC_PLAYER_BUBBLE_PLATFORM,
};

View File

@ -107,6 +107,10 @@
#include "platform\pplayer.h"
#endif
#ifndef __PLATFORM_PFGEN_H__
#include "platform\pfgen.h"
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -227,6 +231,24 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
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:
{
ASSERT( 0 );
@ -287,14 +309,16 @@ void CNpcPlatform::setWaypoints( sThingPlatform *ThisPlatform )
void CNpcPlatform::setGraphic( sThingPlatform *ThisPlatform )
{
m_graphicNum = ThisPlatform->Gfx;
m_modelGfx = new ("ModelGfx") CModelGfx;
m_modelGfx->SetModel( ThisPlatform->Gfx );
m_modelGfx->SetModel( m_graphicNum );
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void CNpcPlatform::setGraphic( u8 graphicNum )
{
m_graphicNum = graphicNum;
m_modelGfx = new ("ModelGfx") CModelGfx;
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 )
{
return( mapEditConvertTable[newType] );

View File

@ -69,6 +69,8 @@ public:
NPC_CRATE_PLATFORM,
NPC_BOUNCE_PLATFORM,
NPC_DUAL_PLATFORM,
NPC_OILDRUM_GENERATOR,
NPC_CRATE_GENERATOR,
NPC_PLAYER_BUBBLE_PLATFORM,
NPC_PLATFORM_TYPE_MAX,
};
@ -78,9 +80,9 @@ public:
void init( DVECTOR initPos, s32 initLifetime );
virtual void postInit();
void shutdown();
void think(int _frames);
virtual void think(int _frames);
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 setTypeFromMapEdit( u16 newType );
#ifdef REMOVETHIS
@ -202,6 +204,8 @@ protected:
u8 m_platformWidth;
int m_graphicNum;
virtual void collidedWith(CThing *_thisThing);
static NPC_PLATFORM_UNIT_TYPE mapEditConvertTable[NPC_PLATFORM_TYPE_MAX];

View File

@ -92,7 +92,9 @@ Seesaw=12
GhostTrain=9
Barrel=2
OilDrum=13
OilDrumGenerator=17
Crate=14
CrateGenerator=18
Loveboat=9
BouncyRing=15
BouncyTyre=15

View File

@ -44,6 +44,9 @@ Gfx=..\..\Graphics\platforms\Barrel\Barrel.gin
[Crate]
Gfx=..\..\Graphics\platforms\Crate\Crate.gin
[CrateGenerator]
Gfx=..\..\Graphics\platforms\Crate\Crate.gin
[ghosttrain]
Gfx=..\..\Graphics\platforms\ghosttrain\ghosttrain.gin
@ -53,6 +56,9 @@ Gfx=..\..\Graphics\platforms\Loveboat\loveboat.gin
[Oildrum]
Gfx=..\..\Graphics\platforms\Oildrum\Oildrum.gin
[OildrumGenerator]
Gfx=..\..\Graphics\platforms\Oildrum\Oildrum.gin
[seesaw]
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin

View File

@ -1153,6 +1153,22 @@ SOURCE=..\..\..\source\platform\pfalling.h
# End 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
# End Source File
# Begin Source File