OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::Particle Class Reference

Public Member Functions

 Particle (float xOffset, float yOffset, float density, Uint8 color, Uint8 opacity)
 Create a particle. More...
 
 ~Particle ()
 Destroy a particle. More...
 
bool animate ()
 Animate a particle. More...
 
int getSize () const
 Get the size value.
 
Uint8 getColor () const
 Get the color.
 
Uint8 getOpacity () const
 Get the opacity.
 
float getX () const
 Get the horizontal shift.
 
float getY () const
 Get the vertical shift.
 

Constructor & Destructor Documentation

◆ Particle()

OpenXcom::Particle::Particle ( float  xOffset,
float  yOffset,
float  density,
Uint8  color,
Uint8  opacity 
)

Create a particle.

Creates a particle.

Parameters
xOffsetthe horizontal offset for this particle (relative to the tile in screen space)
yOffsetthe vertical offset for this particle (relative to the tile in screen space)
densitythe density of the particle dictates the speed at which it moves upwards, and is inversely proportionate to its size.
colorthe color set to use from the transparency LUTs
opacityanother reference for the LUT, this one is divided by 5 for the actual offset to use.

◆ ~Particle()

OpenXcom::Particle::~Particle ( )

Destroy a particle.

Cleans up a particle.

Member Function Documentation

◆ animate()

bool OpenXcom::Particle::animate ( )

Animate a particle.

Animates the particle.

Returns
if we are done animating this particle yet.

The documentation for this class was generated from the following files: