SBSPSS/source/triggers/tsemit.cpp

39 lines
895 B
C++
Raw Normal View History

2001-06-05 22:20:07 +02:00
/*=========================================================================
tsemit.cpp
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2001 Climax Development Ltd
===========================================================================*/
#ifndef __TRIGGERS_TSEMIT_H__
#include "triggers\tsemit.h"
#endif
#ifndef __GAME_GAME_H__
#include "game\game.h"
#endif
2001-06-08 15:35:08 +02:00
#include "fx\fxsteam.h"
2001-06-05 22:20:07 +02:00
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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 );
2001-06-08 15:35:08 +02:00
CFXSteam *steam = (CFXSteam *) m_effect;
2001-06-08 18:51:31 +02:00
steam->SetSize( ( _w >> 4 ) * ONE );
DVECTOR velocity;
velocity.vx = 0;
velocity.vy = -_h >> 4;
steam->SetVel( velocity );
2001-06-05 22:20:07 +02:00
}