Files
itgmania212121/stepmania/src/Background.h
T

70 lines
1.6 KiB
C++
Raw Normal View History

#ifndef BACKGROUND_H
#define BACKGROUND_H
/*
-----------------------------------------------------------------------------
2002-06-24 22:20:51 +00:00
Class: Background
2002-06-24 22:20:51 +00:00
Desc: Background behind notes while playing.
2002-05-19 01:59:48 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-06-24 22:20:51 +00:00
Ben Nordstrom
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Sprite.h"
2002-07-11 19:02:26 +00:00
#include "Quad.h"
#include "ActorFrame.h"
2002-09-29 05:06:18 +00:00
#include "BGAnimation.h"
2003-03-17 03:43:45 +00:00
#include "song.h"
2003-06-27 08:06:22 +00:00
class DancingCharacters;
2002-07-11 19:02:26 +00:00
class Background : public ActorFrame
{
public:
Background();
2002-07-11 19:02:26 +00:00
~Background();
virtual void LoadFromAniDir( CString sAniDir );
2002-08-22 09:31:32 +00:00
virtual void LoadFromSong( Song *pSong );
virtual void Unload();
virtual void Update( float fDeltaTime );
2002-05-19 01:59:48 +00:00
virtual void DrawPrimitives();
2002-07-11 19:02:26 +00:00
void FadeIn();
void FadeOut();
2002-01-20 23:29:03 +00:00
2002-07-11 19:02:26 +00:00
virtual void TurnDangerOn() { m_bInDanger = true; };
virtual void TurnDangerOff() { m_bInDanger = false; };
2002-07-11 19:02:26 +00:00
virtual bool IsInDanger() { return m_bInDanger; };
protected:
bool IsDangerVisible();
2003-09-23 19:26:36 +00:00
void UpdateCurBGChange();
2003-06-27 08:06:22 +00:00
DancingCharacters* m_pDancingCharacters;
2002-09-29 05:06:18 +00:00
BGAnimation m_BGADanger;
2002-07-11 19:02:26 +00:00
BGAnimation* CreateSongBGA(const Song *pSong, CString sBGName) const;
BGAnimation* CreateRandomBGA() const;
map<CString,BGAnimation*> m_BGAnimations;
vector<BackgroundChange> m_aBGChanges;
int m_iCurBGChangeIndex;
2003-04-13 00:44:50 +00:00
BGAnimation* m_pCurrentBGA;
BGAnimation* m_pFadingBGA;
float m_fSecsLeftInFade;
2002-07-11 19:02:26 +00:00
Quad m_quadBGBrightness;
Quad m_quadBorder[4]; // l, t, r, b - cover up the edge of animations that might hang outside of the background rectangle
2002-07-11 19:02:26 +00:00
bool m_bInDanger;
};
#endif