This commit is contained in:
parent
d04702d6a5
commit
d3c0e5904a
8 changed files with 87 additions and 25 deletions
|
@ -123,7 +123,8 @@ platform_src := platform \
|
||||||
pjellfsh \
|
pjellfsh \
|
||||||
pclam \
|
pclam \
|
||||||
pfishhk3 \
|
pfishhk3 \
|
||||||
prbridge
|
prbridge \
|
||||||
|
pbaloon
|
||||||
|
|
||||||
hazard_src := hazard \
|
hazard_src := hazard \
|
||||||
hfalling \
|
hfalling \
|
||||||
|
|
|
@ -383,6 +383,18 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
NPC_PLATFORM_TIMER_NONE,
|
NPC_PLATFORM_TIMER_NONE,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // NPC_BALLOON_BRIDGE_PLATFORM
|
||||||
|
3,
|
||||||
|
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,
|
||||||
|
@ -438,6 +450,7 @@ CNpcPlatform::NPC_PLATFORM_UNIT_TYPE CNpcPlatform::mapEditConvertTable[NPC_PLATF
|
||||||
NPC_JELLYFISH_PLATFORM,
|
NPC_JELLYFISH_PLATFORM,
|
||||||
NPC_FISH_HOOK_3_PLATFORM,
|
NPC_FISH_HOOK_3_PLATFORM,
|
||||||
NPC_RISING_BRIDGE_PLATFORM,
|
NPC_RISING_BRIDGE_PLATFORM,
|
||||||
|
NPC_BALLOON_BRIDGE_PLATFORM,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
NPC_CLAM_PLATFORM,
|
NPC_CLAM_PLATFORM,
|
||||||
};
|
};
|
||||||
|
|
|
@ -151,6 +151,10 @@
|
||||||
#include "platform\prbridge.h"
|
#include "platform\prbridge.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PLATFORM_PBALOON_H__
|
||||||
|
#include "platform\pbaloon.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "fx\fx.h"
|
#include "fx\fx.h"
|
||||||
#include "fx\fxjfish.h"
|
#include "fx\fxjfish.h"
|
||||||
|
|
||||||
|
@ -354,6 +358,12 @@ CNpcPlatform *CNpcPlatform::Create(sThingPlatform *ThisPlatform)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case NPC_BALLOON_BRIDGE_PLATFORM:
|
||||||
|
{
|
||||||
|
platform = new ("balloon bridge platform") CNpcBalloonBridgePlatform;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
ASSERT( 0 );
|
ASSERT( 0 );
|
||||||
|
@ -991,6 +1001,13 @@ void CNpcPlatform::render()
|
||||||
|
|
||||||
int CNpcPlatform::checkCollisionAgainst(CThing *_thisThing, int _frames)
|
int CNpcPlatform::checkCollisionAgainst(CThing *_thisThing, int _frames)
|
||||||
{
|
{
|
||||||
|
switch(_thisThing->getThingType())
|
||||||
|
{
|
||||||
|
case TYPE_PLAYERPROJECTILE:
|
||||||
|
return( false );
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
int collided = false;
|
int collided = false;
|
||||||
|
|
||||||
if ( m_detectCollision && m_isActive && !isSetToShutdown() )
|
if ( m_detectCollision && m_isActive && !isSetToShutdown() )
|
||||||
|
@ -1018,6 +1035,8 @@ int CNpcPlatform::checkCollisionAgainst(CThing *_thisThing, int _frames)
|
||||||
}
|
}
|
||||||
|
|
||||||
return( collided );
|
return( collided );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -82,6 +82,7 @@ public:
|
||||||
NPC_JELLYFISH_PLATFORM,
|
NPC_JELLYFISH_PLATFORM,
|
||||||
NPC_FISH_HOOK_3_PLATFORM,
|
NPC_FISH_HOOK_3_PLATFORM,
|
||||||
NPC_RISING_BRIDGE_PLATFORM,
|
NPC_RISING_BRIDGE_PLATFORM,
|
||||||
|
NPC_BALLOON_BRIDGE_PLATFORM,
|
||||||
NPC_PLAYER_BUBBLE_PLATFORM,
|
NPC_PLAYER_BUBBLE_PLATFORM,
|
||||||
NPC_CLAM_PLATFORM,
|
NPC_CLAM_PLATFORM,
|
||||||
NPC_PLATFORM_TYPE_MAX,
|
NPC_PLATFORM_TYPE_MAX,
|
||||||
|
@ -91,7 +92,7 @@ public:
|
||||||
void init( DVECTOR initPos );
|
void init( DVECTOR initPos );
|
||||||
void init( DVECTOR initPos, s32 initLifetime );
|
void init( DVECTOR initPos, s32 initLifetime );
|
||||||
virtual void postInit();
|
virtual void postInit();
|
||||||
void shutdown();
|
virtual void shutdown();
|
||||||
virtual void think(int _frames);
|
virtual void think(int _frames);
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual u8 canDrop() {return true;}
|
virtual u8 canDrop() {return true;}
|
||||||
|
|
|
@ -441,6 +441,22 @@ DVECTOR const &CamPos=CLevel::getCameraPos();
|
||||||
|
|
||||||
thing1 = thing1->m_nextCollisionThing;
|
thing1 = thing1->m_nextCollisionThing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Platform -> Player projectile collision
|
||||||
|
thing1=s_CollisionLists[CThing::TYPE_PLATFORM];
|
||||||
|
while(thing1)
|
||||||
|
{
|
||||||
|
thing2=s_CollisionLists[CThing::TYPE_PLAYERPROJECTILE];
|
||||||
|
while(thing2)
|
||||||
|
{
|
||||||
|
if(thing1->checkCollisionAgainst(thing2, _frames))
|
||||||
|
{
|
||||||
|
thing1->collidedWith(thing2);
|
||||||
|
}
|
||||||
|
thing2=thing2->m_nextCollisionThing;
|
||||||
|
}
|
||||||
|
thing1=thing1->m_nextCollisionThing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Shut emm down, sh sh shut em down, we shutem down
|
// Shut emm down, sh sh shut em down, we shutem down
|
||||||
for(i=0;i<CThing::MAX_TYPE;i++)
|
for(i=0;i<CThing::MAX_TYPE;i++)
|
||||||
|
|
|
@ -111,6 +111,7 @@ RockGeyser=7
|
||||||
Retracting=6
|
Retracting=6
|
||||||
RollingOildrumPlatform=24
|
RollingOildrumPlatform=24
|
||||||
RisingBridge=27
|
RisingBridge=27
|
||||||
|
BalloonBridge=28
|
||||||
|
|
||||||
################################################
|
################################################
|
||||||
# Triggers
|
# Triggers
|
||||||
|
|
|
@ -108,3 +108,6 @@ Gfx=..\..\Graphics\platforms\rolling_oildrum\roll_oil.gin
|
||||||
|
|
||||||
[RisingBridge]
|
[RisingBridge]
|
||||||
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin
|
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin
|
||||||
|
|
||||||
|
[BalloonBridge]
|
||||||
|
Gfx=..\..\Graphics\platforms\seesaw\seesaw_wooden.gin
|
||||||
|
|
|
@ -1217,6 +1217,14 @@ SOURCE=..\..\..\source\pickups\pspatula.h
|
||||||
# PROP Default_Filter ""
|
# PROP Default_Filter ""
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pbaloon.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\platform\pbaloon.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\platform\pbgeyser.cpp
|
SOURCE=..\..\..\source\platform\pbgeyser.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue