Files
itgmania212121/stepmania/src/Background.h
T

66 lines
1.5 KiB
C++
Raw Normal View History

2002-06-24 22:20:51 +00:00
#pragma once
/*
-----------------------------------------------------------------------------
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"
#include "ActorFrame.h"
#include "Song.h"
2002-06-24 22:20:51 +00:00
#include "BackgroundAnimation.h"
class Background : public ActorFrame
{
public:
Background();
2002-02-11 04:46:31 +00:00
virtual bool LoadFromSong( Song *pSong, bool bDisableVisualizations = false );
virtual void Update( float fDeltaTime );
2002-05-19 01:59:48 +00:00
virtual void DrawPrimitives();
2002-06-30 23:19:33 +00:00
void SetSongBeat( const float fSongBeat, const bool bFreeze ) { m_fSongBeat = fSongBeat; m_bFreeze = bFreeze; };
2002-06-24 22:20:51 +00:00
2002-01-20 23:29:03 +00:00
virtual void SetDiffuseColor( D3DXCOLOR c )
{
2002-06-24 22:20:51 +00:00
m_sprSongBackground.SetDiffuseColor( c );
2002-01-20 23:29:03 +00:00
m_sprVisualizationOverlay.SetDiffuseColor( c );
2002-06-23 11:43:53 +00:00
m_sprSongBackground.SetDiffuseColor( c );
2002-01-20 23:29:03 +00:00
m_sprDanger.SetDiffuseColor( c );
m_sprDangerBackground.SetDiffuseColor( c );
};
virtual void TurnDangerOn() { m_bShowDanger = true; };
virtual void TurnDangerOff() { m_bShowDanger = false; };
virtual bool IsDangerOn() { return m_bShowDanger; };
protected:
2002-06-24 22:20:51 +00:00
bool DangerVisible();
CArray<BackgroundAnimation*,BackgroundAnimation*> m_BackgroundAnimations;
BackgroundAnimation* m_pCurBackgroundAnimation;
Sprite m_sprVisualizationOverlay;
2002-06-23 11:43:53 +00:00
Sprite m_sprSongBackground;
Sprite m_sprDanger;
Sprite m_sprDangerBackground;
bool m_bShowDanger;
2002-06-24 22:20:51 +00:00
float m_fSongBeat;
2002-06-30 23:19:33 +00:00
bool m_bFreeze;
};