This commit is contained in:
Charles 2001-06-08 13:35:08 +00:00
parent 7e521cc0bf
commit 01fca54fb1
9 changed files with 91 additions and 5 deletions

View File

@ -324,7 +324,10 @@ triggers_src := trigger \
twdripemit \
tadripemit \
todripemit \
tldripemit
tldripemit \
tsdownemit \
tsleftemit \
tsrightemit
utils_src := utils \
sincos \

View File

@ -30,6 +30,7 @@ void CFXSteam::init(DVECTOR const &_Pos)
ShadeDec=DefShadeDec;
DieOut=false;
SetSize(DefSize);
IsHorizontal=false;
}
/*****************************************************************************/
@ -47,6 +48,13 @@ void CFXSteam::SetSize(int Size)
BaseVel.vy=-Size;
}
/*****************************************************************************/
void CFXSteam::SetVel(DVECTOR const &Velocity)
{
BaseVel.vx=Velocity.vx;
BaseVel.vy=Velocity.vy;
}
/*****************************************************************************/
void CFXSteam::killFX()
{
@ -70,7 +78,14 @@ void CFXSteam::think(int _frames)
if (!DieOut)
{ // Replace Head
DVECTOR Vel=BaseVel;
Vel.vx+=getRndRange(3)-1;
if ( IsHorizontal )
{
Vel.vy+=getRndRange(3)-1;
}
else
{
Vel.vx+=getRndRange(3)-1;
}
sList &Head=moveHead();
Head.Ofs=Vel;

View File

@ -6,6 +6,7 @@
#define __FX_FX_STEAM_HEADER__
#include "fx/fx.h"
#include "fx/fxbasetrail.h"
/*****************************************************************************/
class CFXSteam : public CFXBaseTrail
@ -17,12 +18,15 @@ virtual void think(int _frames);
virtual void killFX();
void SetSize(int Size);
void SetVel(DVECTOR const &Velocity);
void SetHorizontal(bool newHorizontal) {IsHorizontal=newHorizontal;}
protected:
DVECTOR BaseVel;
s16 ScaleInc;
s16 ShadeDec;
bool DieOut;
bool IsHorizontal;
};

View File

@ -119,6 +119,18 @@
#include "triggers\tlbemit.h"
#endif
#ifndef __TRIGGERS_TSDOWNEMIT_H__
#include "triggers\tsdownemit.h"
#endif
#ifndef __TRIGGERS_TSLEFTEMIT_H__
#include "triggers\tsleftemit.h"
#endif
#ifndef __TRIGGERS_TSRIGHTEMIT_H__
#include "triggers\tsrightemit.h"
#endif
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
@ -227,6 +239,21 @@ CTrigger *trigger;
trigger=(CSteamEmitterTrigger*)new("SteamEmitterTrigger") CSteamEmitterTrigger();
break;
// Down steam emitter
case TRIGGER_STEAM_DOWN_EMITTER:
trigger=(CSteamDownEmitterTrigger*)new("SteamDownEmitterTrigger") CSteamDownEmitterTrigger();
break;
// Left steam emitter
case TRIGGER_STEAM_LEFT_EMITTER:
trigger=(CSteamLeftEmitterTrigger*)new("SteamLeftEmitterTrigger") CSteamLeftEmitterTrigger();
break;
// Right steam emitter
case TRIGGER_STEAM_RIGHT_EMITTER:
trigger=(CSteamRightEmitterTrigger*)new("SteamRightEmitterTrigger") CSteamRightEmitterTrigger();
break;
// Water drip emitter
case TRIGGER_WATER_DRIP_EMITTER:
trigger=(CWaterDripEmitterTrigger*)new("WaterDripEmitterTrigger") CWaterDripEmitterTrigger();

View File

@ -48,6 +48,9 @@ enum TRIGGER_TYPE
TRIGGER_ACID_BUBBLE_EMITTER,
TRIGGER_OIL_BUBBLE_EMITTER,
TRIGGER_LAVA_BUBBLE_EMITTER,
TRIGGER_STEAM_DOWN_EMITTER,
TRIGGER_STEAM_LEFT_EMITTER,
TRIGGER_STEAM_RIGHT_EMITTER,
// Code based triggers
TRIGGER_PLATFORM,

View File

@ -19,6 +19,8 @@
#include "game\game.h"
#endif
#include "fx\fxsteam.h"
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -27,7 +29,6 @@ void CSteamEmitterTrigger::setPositionAndSize(int _x,int _y,int _w,int _h)
CTrigger::setPositionAndSize( _x, _y, _w, _h );
m_effect = CFX::Create( CFX::FX_TYPE_STEAM, Pos );
//CFXBaseAnim *m_animEffect = (CFXBaseAnim *) m_effect;
//m_animEffect->SetScaleX( ( _w * ONE ) >> 5 );
//m_animEffect->SetScaleY( ( _h * ONE ) >> 5 );
CFXSteam *steam = (CFXSteam *) m_effect;
steam->SetSize( ( _h >> 4 ) * ONE );
}

View File

@ -153,6 +153,9 @@ LavaDripEmitter=21
AcidBubbleEmitter=22
OilBubbleEmitter=23
LavaBubbleEmitter=24
SteamDownEmitter=25
SteamLeftEmitter=26
SteamRightEmitter=27
################################################
# FX

View File

@ -39,6 +39,12 @@ HasBox=1
[SteamEmitter]
[SteamDownEmitter]
[SteamLeftEmitter]
[SteamRightEmitter]
[StreamGeyser]
[GaryStop]

View File

@ -2253,6 +2253,14 @@ SOURCE=..\..\..\source\triggers\trigger.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsdownemit.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsdownemit.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsemit.cpp
# End Source File
# Begin Source File
@ -2261,6 +2269,22 @@ SOURCE=..\..\..\source\triggers\tsemit.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsleftemit.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsleftemit.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsrightemit.cpp
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsrightemit.h
# End Source File
# Begin Source File
SOURCE=..\..\..\source\triggers\tsswitch.cpp
# End Source File
# Begin Source File