Files
itgmania212121/stepmania/src/ScreenGameplay.h
T

162 lines
4.5 KiB
C++
Raw Normal View History

2002-05-20 08:59:37 +00:00
/*
-----------------------------------------------------------------------------
Class: ScreenGameplay
Desc: The music plays, the notes scroll, and the Player is pressing buttons.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "Sprite.h"
#include "TransitionFade.h"
2003-01-02 07:54:28 +00:00
#include "TransitionStarWipe.h"
#include "TransitionFadeWipe.h"
#include "TransitionOniFade.h"
2002-05-20 08:59:37 +00:00
#include "BitmapText.h"
#include "Player.h"
#include "RandomSample.h"
#include "FocusingSprite.h"
2003-01-02 07:54:28 +00:00
#include "RageSoundManager.h"
2002-12-29 00:20:57 +00:00
#include "RageSound.h"
2002-05-20 08:59:37 +00:00
#include "MotionBlurSprite.h"
#include "Background.h"
2002-07-23 01:41:40 +00:00
#include "LifeMeter.h"
#include "ScoreDisplay.h"
2002-10-06 16:56:58 +00:00
#include "DifficultyIcon.h"
#include "BPMDisplay.h"
2002-05-20 08:59:37 +00:00
2002-07-11 19:02:26 +00:00
// messages sent by Combo
const ScreenMessage SM_BeginToasty = ScreenMessage(SM_User+104);
2002-07-11 19:02:26 +00:00
const ScreenMessage SM_100Combo = ScreenMessage(SM_User+200);
const ScreenMessage SM_200Combo = ScreenMessage(SM_User+201);
const ScreenMessage SM_300Combo = ScreenMessage(SM_User+202);
const ScreenMessage SM_400Combo = ScreenMessage(SM_User+203);
const ScreenMessage SM_500Combo = ScreenMessage(SM_User+204);
const ScreenMessage SM_600Combo = ScreenMessage(SM_User+205);
const ScreenMessage SM_700Combo = ScreenMessage(SM_User+206);
const ScreenMessage SM_800Combo = ScreenMessage(SM_User+207);
const ScreenMessage SM_900Combo = ScreenMessage(SM_User+208);
const ScreenMessage SM_1000Combo = ScreenMessage(SM_User+209);
const ScreenMessage SM_ComboStopped = ScreenMessage(SM_User+210);
2002-05-20 08:59:37 +00:00
class ScreenGameplay : public Screen
{
public:
ScreenGameplay();
virtual ~ScreenGameplay();
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
private:
2002-06-14 22:25:22 +00:00
void TweenOnScreen();
void TweenOffScreen();
2002-07-23 01:41:40 +00:00
2002-07-28 20:28:37 +00:00
bool IsLastSong();
void LoadNextSong( bool bFirstLoad );
2002-05-20 08:59:37 +00:00
2002-07-27 19:29:51 +00:00
bool OneIsHot();
bool AllAreInDanger();
bool AllAreFailing();
bool AllFailedEarlier();
2002-10-12 00:32:47 +00:00
bool PlayTicks() const;
2002-05-20 08:59:37 +00:00
2002-07-27 19:29:51 +00:00
enum DancingState {
STATE_INTRO = 0, // not allowed to press Back
STATE_DANCING,
STATE_OUTRO, // not allowed to press Back
NUM_DANCING_STATES
};
2002-06-14 22:25:22 +00:00
DancingState m_DancingState;
2002-07-27 19:29:51 +00:00
bool m_bChangedOffsetOrBPM;
2002-05-20 08:59:37 +00:00
2002-06-14 22:25:22 +00:00
float m_fTimeLeftBeforeDancingComment; // this counter is only running while STATE_DANCING
2002-05-20 08:59:37 +00:00
2002-06-14 22:25:22 +00:00
Background m_Background;
2002-05-20 08:59:37 +00:00
2002-08-01 03:15:27 +00:00
TransitionOniFade m_OniFade; // shows between songs in a course
Sprite m_sprLifeFrame;
2002-07-23 01:41:40 +00:00
LifeMeter* m_pLifeMeter[NUM_PLAYERS];
2002-06-14 22:25:22 +00:00
BitmapText m_textStageNumber;
2002-08-01 03:15:27 +00:00
BitmapText m_textCourseSongNumber[NUM_PLAYERS];
2002-06-14 22:25:22 +00:00
Sprite m_sprMiddleFrame;
BPMDisplay m_BPMDisplay;
Sprite m_sprScoreFrame;
2002-07-23 01:41:40 +00:00
ScoreDisplay* m_pScoreDisplay[NUM_PLAYERS];
2002-06-14 22:25:22 +00:00
BitmapText m_textPlayerOptions[NUM_PLAYERS];
BitmapText m_textSongOptions;
2002-05-20 08:59:37 +00:00
2002-06-24 22:04:31 +00:00
BitmapText m_textDebug;
BitmapText m_textAutoPlay; // shows whether AutoPlay is on.
BitmapText m_MaxCombo;
2002-05-20 08:59:37 +00:00
2002-07-27 19:29:51 +00:00
TransitionFadeWipe m_Fade;
2002-05-20 08:59:37 +00:00
TransitionStarWipe m_StarWipe;
FocusingSprite m_sprReady;
FocusingSprite m_sprHereWeGo;
MotionBlurSprite m_sprCleared;
2002-05-20 08:59:37 +00:00
MotionBlurSprite m_sprFailed;
MotionBlurSprite m_sprTryExtraStage;
2002-05-20 08:59:37 +00:00
2002-08-01 13:42:56 +00:00
BitmapText m_textSurviveTime; // only shown in extra stage
BitmapText m_StageName;
2002-08-01 13:42:56 +00:00
2002-06-14 22:25:22 +00:00
Player m_Player[NUM_PLAYERS];
2002-05-20 08:59:37 +00:00
2002-10-06 16:56:58 +00:00
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
2002-05-27 08:23:27 +00:00
2002-08-01 21:55:40 +00:00
Sprite m_sprOniGameOver[NUM_PLAYERS];
void ShowOniGameOver( PlayerNumber pn );
2002-08-01 21:55:40 +00:00
Sprite m_sprToasty; // easter egg
Sprite m_sprDemonstrationOverlay;
Sprite m_sprDemonstrationBlink;
2002-08-02 09:31:06 +00:00
2002-05-20 08:59:37 +00:00
RandomSample m_soundFail;
2002-08-01 21:55:40 +00:00
RandomSample m_soundOniDie;
RandomSample m_soundTryExtraStage;
2002-05-20 08:59:37 +00:00
RandomSample m_announcerReady;
RandomSample m_announcerHereWeGo;
2002-06-24 22:04:31 +00:00
RandomSample m_announcerDanger;
RandomSample m_announcerGood;
RandomSample m_announcerHot;
RandomSample m_announcerOni;
2002-07-11 19:02:26 +00:00
RandomSample m_announcer100Combo;
RandomSample m_announcer200Combo;
RandomSample m_announcer300Combo;
RandomSample m_announcer400Combo;
RandomSample m_announcer500Combo;
RandomSample m_announcer600Combo;
RandomSample m_announcer700Combo;
RandomSample m_announcer800Combo;
RandomSample m_announcer900Combo;
RandomSample m_announcer1000Combo;
RandomSample m_announcerComboStopped;
2002-05-20 08:59:37 +00:00
2002-08-15 16:45:49 +00:00
int m_iRowLastCrossed;
RageSoundSample m_soundAssistTick;
2002-05-20 08:59:37 +00:00
RageSoundSample m_soundToasty;
2002-12-27 23:16:16 +00:00
RageSound m_soundMusic;
2002-05-20 08:59:37 +00:00
};