This commit is contained in:
parent
fed2acdd38
commit
3898864301
8 changed files with 37 additions and 29 deletions
|
@ -13,7 +13,6 @@
|
|||
|
||||
#include "FX\FXGeyser.h"
|
||||
|
||||
int MaxHeight=128;
|
||||
int GeyserSpeed=4;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -34,7 +33,7 @@ void CFXGeyser::think(int Frames)
|
|||
{
|
||||
currentFrame=FRM__GUSH000;
|
||||
}
|
||||
TargetHeight=MaxHeight;
|
||||
// TargetHeight=MaxHeight;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -16,6 +16,8 @@ virtual void init(DVECTOR const &Pos);
|
|||
virtual void think(int Frames);
|
||||
virtual void render();
|
||||
|
||||
void setHeight(int H) {TargetHeight=H;}
|
||||
|
||||
protected:
|
||||
s16 TargetHeight,Height;
|
||||
u16 currentFrame;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*=========================================================================
|
||||
|
||||
twdripemit.cpp
|
||||
toilgeysor
|
||||
|
||||
Author: CRB
|
||||
Author: Dave - based on the original story by CB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
@ -11,26 +11,27 @@
|
|||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||
#include "triggers\twdripemit.h"
|
||||
#ifndef __TRIGGERS_TOILGEYSER_H__
|
||||
#include "triggers\toilgeyser.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAME_H__
|
||||
#include "game\game.h"
|
||||
#endif
|
||||
|
||||
#include "fx/fxgeyser.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CWaterDripEmitterTrigger::think(int _frames)
|
||||
void COilGeyserTrigger::think(int _frames)
|
||||
{
|
||||
CTrigger::think( _frames );
|
||||
|
||||
if ( m_timer <= 0 )
|
||||
{
|
||||
CFX::Create( CFX::FX_TYPE_DROP_WATER, Pos );
|
||||
|
||||
m_timer = GameState::getOneSecondInFrames() >> 2;
|
||||
m_FX->setHeight(m_Height);
|
||||
m_timer = GameState::getOneSecondInFrames() *5;
|
||||
m_Height^=128;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -40,9 +41,11 @@ void CWaterDripEmitterTrigger::think(int _frames)
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CWaterDripEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||
void COilGeyserTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
|
||||
{
|
||||
CTrigger::setPositionAndSize( _x, _y, _w, _h );
|
||||
|
||||
m_FX=(CFXGeyser*)CFX::Create( CFX::FX_TYPE_GEYSER_OIL, Pos );
|
||||
m_FX->setHeight(0);
|
||||
m_timer = 0;
|
||||
m_Height=128;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*=========================================================================
|
||||
|
||||
twdripemit.h
|
||||
toilgeysor
|
||||
|
||||
Author: CRB
|
||||
Author: Dave - based on the original story by CB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
@ -11,8 +11,8 @@
|
|||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __TRIGGERS_TWDRIPEMIT_H__
|
||||
#define __TRIGGERS_TWDRIPEMIT_H__
|
||||
#ifndef __TRIGGERS_TOILGEYSER_H__
|
||||
#define __TRIGGERS_TOILGEYSER_H__
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Includes
|
||||
|
@ -38,26 +38,18 @@
|
|||
/*----------------------------------------------------------------------
|
||||
Structure defintions
|
||||
-------------------- */
|
||||
|
||||
class CWaterDripEmitterTrigger : public CTrigger
|
||||
class CFXGeyser;
|
||||
class COilGeyserTrigger: public CTrigger
|
||||
{
|
||||
public:
|
||||
virtual void think(int _frames);
|
||||
virtual void setPositionAndSize(int _x,int _y,int _w,int _h);
|
||||
protected:
|
||||
s32 m_timer;
|
||||
CFXGeyser *m_FX;
|
||||
int m_Height;
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Globals
|
||||
------- */
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Functions
|
||||
--------- */
|
||||
|
||||
/*---------------------------------------------------------------------- */
|
||||
|
||||
#endif
|
||||
|
||||
/*===========================================================================
|
||||
|
|
|
@ -147,6 +147,10 @@
|
|||
#include "triggers\twindright.h"
|
||||
#endif
|
||||
|
||||
#ifndef __TRIGGERS_TOILGEYSER_H__
|
||||
#include "triggers\toilgeyser.h"
|
||||
#endif
|
||||
|
||||
#ifndef __GAME_GAME_H__
|
||||
#include "game\game.h"
|
||||
#endif
|
||||
|
@ -326,6 +330,10 @@ CTrigger *trigger;
|
|||
case TRIGGER_WIND_RIGHT:
|
||||
trigger = (CWindRightTrigger*)new("WindRightTrigger") CWindRightTrigger();
|
||||
break;
|
||||
// Oil Geyser
|
||||
case TRIGGER_OIL_GEYSER:
|
||||
trigger = (COilGeyserTrigger*)new("OilGeyserTrigger") COilGeyserTrigger();
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger=NULL;
|
||||
|
|
|
@ -55,6 +55,7 @@ enum TRIGGER_TYPE
|
|||
TRIGGER_WIND_DOWN,
|
||||
TRIGGER_WIND_LEFT,
|
||||
TRIGGER_WIND_RIGHT,
|
||||
TRIGGER_OIL_GEYSER,
|
||||
|
||||
// Code based triggers
|
||||
TRIGGER_PLATFORM,
|
||||
|
|
|
@ -161,6 +161,7 @@ WindUp=28
|
|||
WindDown=29
|
||||
WindLeft=30
|
||||
WindRight=31
|
||||
OilGeyser=32
|
||||
|
||||
################################################
|
||||
# FX
|
||||
|
|
|
@ -70,3 +70,5 @@ HasBox=1
|
|||
[WindLeft]
|
||||
|
||||
[WindRight]
|
||||
|
||||
[OilGeyser]
|
Loading…
Add table
Add a link
Reference in a new issue