2002-06-24 22:20:51 +00:00
|
|
|
#pragma once
|
2002-01-20 09:13:43 +00:00
|
|
|
/*
|
|
|
|
|
-----------------------------------------------------------------------------
|
2002-06-24 22:20:51 +00:00
|
|
|
Class: Background
|
2002-01-20 09:13:43 +00:00
|
|
|
|
2002-06-24 22:20:51 +00:00
|
|
|
Desc: Background behind notes while playing.
|
2002-01-20 09:13:43 +00:00
|
|
|
|
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
|
2002-01-20 09:13:43 +00:00
|
|
|
-----------------------------------------------------------------------------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "Sprite.h"
|
|
|
|
|
#include "ActorFrame.h"
|
|
|
|
|
#include "Song.h"
|
2002-06-24 22:20:51 +00:00
|
|
|
#include "BackgroundAnimation.h"
|
|
|
|
|
|
2002-01-20 09:13:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class Background : public ActorFrame
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
Background();
|
2002-02-11 04:46:31 +00:00
|
|
|
virtual bool LoadFromSong( Song *pSong, bool bDisableVisualizations = false );
|
2002-01-20 09:13:43 +00:00
|
|
|
|
|
|
|
|
virtual void Update( float fDeltaTime );
|
2002-05-19 01:59:48 +00:00
|
|
|
virtual void DrawPrimitives();
|
2002-01-20 09:13:43 +00:00
|
|
|
|
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 );
|
|
|
|
|
};
|
|
|
|
|
|
2002-01-20 09:13:43 +00:00
|
|
|
virtual void TurnDangerOn() { m_bShowDanger = true; };
|
|
|
|
|
virtual void TurnDangerOff() { m_bShowDanger = false; };
|
|
|
|
|
|
2002-01-24 08:01:24 +00:00
|
|
|
virtual bool IsDangerOn() { return m_bShowDanger; };
|
|
|
|
|
|
2002-01-20 09:13:43 +00:00
|
|
|
protected:
|
2002-06-24 22:20:51 +00:00
|
|
|
bool DangerVisible();
|
|
|
|
|
|
|
|
|
|
CArray<BackgroundAnimation*,BackgroundAnimation*> m_BackgroundAnimations;
|
|
|
|
|
BackgroundAnimation* m_pCurBackgroundAnimation;
|
|
|
|
|
|
2002-01-20 09:13:43 +00:00
|
|
|
Sprite m_sprVisualizationOverlay;
|
2002-06-23 11:43:53 +00:00
|
|
|
Sprite m_sprSongBackground;
|
2002-01-20 09:13:43 +00:00
|
|
|
|
|
|
|
|
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;
|
2002-01-20 09:13:43 +00:00
|
|
|
};
|
|
|
|
|
|