Files
itgmania212121/stepmania/src/BGAnimationLayer.h
T

134 lines
2.9 KiB
C++
Raw Normal View History

#ifndef BGANIMATIONLAYER_H
#define BGANIMATIONLAYER_H
2002-09-29 05:06:18 +00:00
/*
-----------------------------------------------------------------------------
Class: BGAnimation
Desc: Particles that play in the background of ScreenGameplay
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Ben Nordstrom
Chris Danford
-----------------------------------------------------------------------------
*/
2003-03-05 02:52:40 +00:00
#include "RageTypes.h"
2002-09-29 05:06:18 +00:00
#include "Sprite.h"
2003-03-05 02:52:40 +00:00
#include "GameConstantsAndTypes.h"
2002-09-29 05:06:18 +00:00
2003-03-05 02:52:40 +00:00
#define MAX_TILES_WIDE (SCREEN_WIDTH/32+2)
#define MAX_TILES_HIGH (SCREEN_HEIGHT/32+2)
#define MAX_SPRITES 16
// (MAX_TILES_WIDE*MAX_TILES_HIGH)
2002-09-29 05:06:18 +00:00
class BGAnimationLayer
{
public:
BGAnimationLayer();
~BGAnimationLayer();
2003-03-05 02:52:40 +00:00
void Init();
void Unload();
2002-09-29 05:06:18 +00:00
void LoadFromStaticGraphic( CString sPath );
void LoadFromAniLayerFile( CString sPath );
void LoadFromMovie( CString sMoviePath );
2002-09-29 05:06:18 +00:00
void LoadFromVisualization( CString sMoviePath );
void LoadFromIni( CString sDir, CString sLayer );
2002-09-29 05:06:18 +00:00
2003-06-30 05:34:03 +00:00
void Update( float fDeltaTime );
void Draw();
2002-09-29 05:06:18 +00:00
2003-06-30 05:34:03 +00:00
void SetDiffuse( RageColor c );
2003-03-17 01:34:12 +00:00
float GetMaxTweenTimeLeft() const;
void GainingFocus( float fRate, bool bRewindMovie, bool bLoop );
2002-09-29 05:06:18 +00:00
void LosingFocus();
2003-07-10 03:37:13 +00:00
void PlayOffCommand();
2002-09-29 05:06:18 +00:00
protected:
vector<Actor*> m_pActors;
2003-03-05 02:52:40 +00:00
RageVector3 m_vParticleVelocity[MAX_SPRITES];
2002-09-29 05:06:18 +00:00
enum Effect {
EFFECT_CENTER,
EFFECT_STRETCH_STILL,
EFFECT_STRETCH_SCROLL_LEFT,
EFFECT_STRETCH_SCROLL_RIGHT,
EFFECT_STRETCH_SCROLL_UP,
EFFECT_STRETCH_SCROLL_DOWN,
EFFECT_STRETCH_WATER,
EFFECT_STRETCH_BUBBLE,
EFFECT_STRETCH_TWIST,
EFFECT_STRETCH_SPIN,
EFFECT_PARTICLES_SPIRAL_OUT,
EFFECT_PARTICLES_SPIRAL_IN,
EFFECT_PARTICLES_FLOAT_UP,
EFFECT_PARTICLES_FLOAT_DOWN,
EFFECT_PARTICLES_FLOAT_LEFT,
EFFECT_PARTICLES_FLOAT_RIGHT,
EFFECT_PARTICLES_BOUNCE,
EFFECT_TILE_STILL,
EFFECT_TILE_SCROLL_LEFT,
EFFECT_TILE_SCROLL_RIGHT,
EFFECT_TILE_SCROLL_UP,
EFFECT_TILE_SCROLL_DOWN,
EFFECT_TILE_FLIP_X,
EFFECT_TILE_FLIP_Y,
EFFECT_TILE_PULSE,
2003-03-05 02:52:40 +00:00
NUM_EFFECTS, // leave this at the end
EFFECT_INVALID
2002-09-29 05:06:18 +00:00
};
2003-03-05 02:52:40 +00:00
enum Type
{
TYPE_SPRITE,
TYPE_STRETCH,
TYPE_PARTICLES,
TYPE_TILES,
NUM_TYPES,
TYPE_INVALID
} m_Type;
2002-09-29 05:06:18 +00:00
2003-01-12 00:57:53 +00:00
2003-03-05 02:52:40 +00:00
//
// loaded prefs
//
// common stuff
2003-07-10 03:37:13 +00:00
CString m_sOnCommand;
CString m_sOffCommand;
float m_fUpdateRate; // get by GainingFocus
float m_fFOV; // -1 = no change
2003-07-07 20:24:51 +00:00
bool m_bLighting;
2003-03-05 02:52:40 +00:00
// stretch stuff
float m_fStretchTexCoordVelocityX;
float m_fStretchTexCoordVelocityY;
// particle and tile stuff
float m_fZoomMin, m_fZoomMax;
float m_fVelocityXMin, m_fVelocityXMax;
float m_fVelocityYMin, m_fVelocityYMax;
float m_fVelocityZMin, m_fVelocityZMax;
float m_fOverrideSpeed; // 0 means don't override speed
// particles stuff
int m_iNumParticles;
bool m_bParticlesBounce;
// tiles stuff
int m_iNumTilesWide;
int m_iNumTilesHigh;
float m_fTilesStartX;
float m_fTilesStartY;
float m_fTilesSpacingX;
float m_fTilesSpacingY;
float m_fTileVelocityX;
float m_fTileVelocityY;
2002-09-29 05:06:18 +00:00
};
#endif