2004-06-08 05:22:33 +00:00
|
|
|
/* ScreenGameplay - The music plays, the notes scroll, and the Player is pressing buttons. */
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2004-06-08 05:22:33 +00:00
|
|
|
#ifndef SCREEN_GAMEPLAY_H
|
|
|
|
|
#define SCREEN_GAMEPLAY_H
|
2002-05-20 08:59:37 +00:00
|
|
|
|
|
|
|
|
#include "Screen.h"
|
|
|
|
|
#include "Sprite.h"
|
2003-04-13 01:09:19 +00:00
|
|
|
#include "Transition.h"
|
2002-05-20 08:59:37 +00:00
|
|
|
#include "BitmapText.h"
|
|
|
|
|
#include "Player.h"
|
|
|
|
|
#include "RandomSample.h"
|
2002-12-29 00:20:57 +00:00
|
|
|
#include "RageSound.h"
|
2002-05-20 08:59:37 +00:00
|
|
|
#include "Background.h"
|
2004-01-07 00:13:32 +00:00
|
|
|
#include "Foreground.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"
|
2004-05-31 06:04:30 +00:00
|
|
|
#include "DifficultyMeter.h"
|
2002-10-29 01:26:10 +00:00
|
|
|
#include "BPMDisplay.h"
|
2003-07-08 19:56:56 +00:00
|
|
|
class Inventory;
|
2003-08-20 09:19:46 +00:00
|
|
|
#include "BeginnerHelper.h"
|
2003-03-19 19:58:22 +00:00
|
|
|
#include "LyricDisplay.h"
|
2003-08-20 09:19:46 +00:00
|
|
|
#include "Character.h"
|
2003-10-25 22:00:58 +00:00
|
|
|
#include "Attack.h"
|
2004-03-17 06:01:17 +00:00
|
|
|
#include "ActiveAttackList.h"
|
2004-08-13 08:24:11 +00:00
|
|
|
#include "NetworkSyncManager.h"
|
2004-10-24 10:45:30 +00:00
|
|
|
#include "AutoKeysounds.h"
|
2005-03-10 02:45:40 +00:00
|
|
|
#include "ThemeMetric.h"
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-03-08 08:03:22 +00:00
|
|
|
class LyricsLoader;
|
2002-05-20 08:59:37 +00:00
|
|
|
class ScreenGameplay : public Screen
|
|
|
|
|
{
|
|
|
|
|
public:
|
2005-01-03 23:20:11 +00:00
|
|
|
ScreenGameplay( CString sName );
|
2005-01-03 22:44:19 +00:00
|
|
|
virtual void Init();
|
2002-05-20 08:59:37 +00:00
|
|
|
virtual ~ScreenGameplay();
|
2003-01-19 04:44:22 +00:00
|
|
|
|
2002-05-20 08:59:37 +00:00
|
|
|
virtual void Update( float fDeltaTime );
|
|
|
|
|
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
|
|
|
|
|
virtual void HandleScreenMessage( const ScreenMessage SM );
|
|
|
|
|
|
2004-12-11 10:23:06 +00:00
|
|
|
virtual bool UsesBackground() const { return false; }
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-01-10 02:22:07 +00:00
|
|
|
protected:
|
2005-03-12 00:04:27 +00:00
|
|
|
ThemeMetric<CString> PLAYER_TYPE;
|
|
|
|
|
ThemeMetric<CString> GIVE_UP_TEXT;
|
|
|
|
|
ThemeMetric<CString> GIVE_UP_ABORTED_TEXT;
|
2005-03-10 02:45:40 +00:00
|
|
|
ThemeMetric<bool> START_GIVES_UP;
|
|
|
|
|
ThemeMetric<bool> BACK_GIVES_UP;
|
|
|
|
|
ThemeMetric<bool> GIVING_UP_FAILS;
|
|
|
|
|
|
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();
|
2004-07-23 04:45:48 +00:00
|
|
|
void SetupSong( PlayerNumber p, int iSongIndex );
|
2003-01-25 07:40:47 +00:00
|
|
|
void LoadNextSong();
|
2004-02-14 00:39:24 +00:00
|
|
|
void LoadCourseSongNumber( int SongNumber );
|
2003-01-25 08:32:57 +00:00
|
|
|
float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic);
|
2005-03-11 02:52:40 +00:00
|
|
|
void PauseGame( bool bPause );
|
2003-08-23 18:33:49 +00:00
|
|
|
void ShowSavePrompt( ScreenMessage SM_SendWhenDone );
|
2004-02-16 05:29:33 +00:00
|
|
|
void PlayAnnouncer( CString type, float fSeconds );
|
2004-12-03 23:30:50 +00:00
|
|
|
void UpdateLights();
|
2005-03-10 02:45:40 +00:00
|
|
|
void BackOutFromGameplay();
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2004-01-12 09:36:01 +00:00
|
|
|
void PlayTicks();
|
2004-05-21 00:58:48 +00:00
|
|
|
void UpdateSongPosition( float fDeltaTime );
|
2003-03-19 17:43:11 +00:00
|
|
|
void UpdateLyrics( float fDeltaTime );
|
2003-12-15 06:24:59 +00:00
|
|
|
void SongFinished();
|
2004-02-21 21:00:49 +00:00
|
|
|
void StageFinished( bool bBackedOut );
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2005-01-03 23:29:40 +00:00
|
|
|
virtual void InitSongQueues();
|
|
|
|
|
|
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
|
2003-02-14 21:42:44 +00:00
|
|
|
} m_DancingState;
|
2005-03-11 02:52:40 +00:00
|
|
|
bool m_bPaused;
|
2003-03-26 23:08:05 +00:00
|
|
|
vector<Song*> m_apSongsQueue; // size may be >1 if playing a course
|
2004-05-24 03:41:39 +00:00
|
|
|
vector<Steps*> m_vpStepsQueue[NUM_PLAYERS]; // size may be >1 if playing a course
|
2003-10-25 22:00:58 +00:00
|
|
|
vector<AttackArray> m_asModifiersQueue[NUM_PLAYERS];// size may be >1 if playing a course
|
2003-02-14 21:42:44 +00:00
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
bool m_bChangedOffsetOrBPM;
|
2004-02-16 05:29:33 +00:00
|
|
|
float m_fTimeSinceLastDancingComment; // this counter is only running while STATE_DANCING
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-03-19 19:58:22 +00:00
|
|
|
LyricDisplay m_LyricDisplay;
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2005-03-11 02:12:21 +00:00
|
|
|
Background m_SongBackground;
|
2005-03-11 02:52:40 +00:00
|
|
|
Foreground m_SongForeground;
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-04-13 01:09:19 +00:00
|
|
|
Transition m_NextSongIn; // shows between songs in a course
|
|
|
|
|
Transition m_NextSongOut; // shows between songs in a course
|
2004-03-06 10:07:17 +00:00
|
|
|
Transition m_SongFinished; // shows after each song, course or not
|
2002-08-01 03:15:27 +00:00
|
|
|
|
2003-10-08 23:32:08 +00:00
|
|
|
Sprite m_sprStaticBackground;
|
2003-01-11 08:55:21 +00:00
|
|
|
Sprite m_sprLifeFrame;
|
|
|
|
|
LifeMeter* m_pLifeMeter[NUM_PLAYERS];
|
2003-06-30 18:08:27 +00:00
|
|
|
CombinedLifeMeter* m_pCombinedLifeMeter;
|
2003-03-10 00:16:49 +00:00
|
|
|
Sprite m_sprStage;
|
2003-12-18 23:19:02 +00:00
|
|
|
Sprite m_sprCourseSongNumber;
|
2004-02-15 00:48:24 +00:00
|
|
|
AutoActor m_sprStageFrame;
|
2003-01-11 08:55:21 +00:00
|
|
|
BitmapText m_textCourseSongNumber[NUM_PLAYERS];
|
2004-01-23 06:20:28 +00:00
|
|
|
BitmapText m_textStepsDescription[NUM_PLAYERS];
|
2002-06-14 22:25:22 +00:00
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
BPMDisplay m_BPMDisplay;
|
2004-12-18 08:15:19 +00:00
|
|
|
float m_fLastBPS;
|
2002-08-13 23:26:46 +00:00
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
Sprite m_sprScoreFrame;
|
2003-11-26 06:40:03 +00:00
|
|
|
ScoreDisplay* m_pPrimaryScoreDisplay[NUM_PLAYERS];
|
|
|
|
|
ScoreDisplay* m_pSecondaryScoreDisplay[NUM_PLAYERS];
|
2003-06-30 18:08:27 +00:00
|
|
|
ScoreKeeper* m_pPrimaryScoreKeeper[NUM_PLAYERS];
|
|
|
|
|
ScoreKeeper* m_pSecondaryScoreKeeper[NUM_PLAYERS];
|
2003-01-11 08:55:21 +00:00
|
|
|
BitmapText m_textPlayerOptions[NUM_PLAYERS];
|
|
|
|
|
BitmapText m_textSongOptions;
|
2004-03-17 06:01:17 +00:00
|
|
|
ActiveAttackList m_ActiveAttackList[NUM_PLAYERS];
|
2004-08-13 08:24:11 +00:00
|
|
|
BitmapText m_Scoreboard[NUM_NSSB_CATEGORIES]; // for NSMAN, so we can have a scoreboard
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2004-08-13 08:40:53 +00:00
|
|
|
bool m_ShowScoreboard;
|
|
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
BitmapText m_textDebug;
|
|
|
|
|
|
2003-09-06 03:25:45 +00:00
|
|
|
RageTimer m_GiveUpTimer;
|
|
|
|
|
void AbortGiveUp();
|
|
|
|
|
|
2003-03-12 01:26:44 +00:00
|
|
|
BitmapText m_textAutoPlay; // for AutoPlay, AutoAdjust
|
|
|
|
|
void UpdateAutoPlayText();
|
2002-11-07 19:42:39 +00:00
|
|
|
|
2003-01-11 08:55:21 +00:00
|
|
|
BitmapText m_MaxCombo;
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-04-13 01:09:19 +00:00
|
|
|
Transition m_Ready;
|
|
|
|
|
Transition m_Go;
|
|
|
|
|
Transition m_Cleared;
|
|
|
|
|
Transition m_Failed;
|
|
|
|
|
Transition m_Extra;
|
|
|
|
|
Transition m_Toasty; // easter egg
|
2003-04-14 22:12:54 +00:00
|
|
|
Transition m_Win[NUM_PLAYERS];
|
2003-04-21 02:41:10 +00:00
|
|
|
Transition m_Draw;
|
2003-04-13 01:09:19 +00:00
|
|
|
Transition m_In;
|
|
|
|
|
Transition m_Back;
|
2005-02-26 09:16:34 +00:00
|
|
|
AutoActor m_Overlay;
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-03-30 18:12:57 +00:00
|
|
|
BitmapText m_textSurviveTime; // used in extra stage
|
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
|
|
|
|
2004-10-24 10:45:30 +00:00
|
|
|
AutoKeysounds m_AutoKeysounds;
|
|
|
|
|
|
2003-04-07 05:14:27 +00:00
|
|
|
// used in PLAY_MODE_BATTLE
|
2003-07-08 19:56:56 +00:00
|
|
|
Inventory* m_pInventory[NUM_PLAYERS];
|
2003-04-07 05:14:27 +00:00
|
|
|
|
2002-10-06 16:56:58 +00:00
|
|
|
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
|
2004-05-31 06:04:30 +00:00
|
|
|
DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
|
2002-05-27 08:23:27 +00:00
|
|
|
|
2002-08-01 21:55:40 +00:00
|
|
|
Sprite m_sprOniGameOver[NUM_PLAYERS];
|
2002-09-04 03:49:08 +00:00
|
|
|
void ShowOniGameOver( PlayerNumber pn );
|
2002-08-01 21:55:40 +00:00
|
|
|
|
2003-11-20 06:50:05 +00:00
|
|
|
RageSound m_soundBattleTrickLevel1;
|
|
|
|
|
RageSound m_soundBattleTrickLevel2;
|
|
|
|
|
RageSound m_soundBattleTrickLevel3;
|
2002-05-20 08:59:37 +00:00
|
|
|
|
2003-04-13 00:44:50 +00:00
|
|
|
bool m_bZeroDeltaOnNextUpdate;
|
2002-08-26 05:53:48 +00:00
|
|
|
|
2003-01-02 08:13:34 +00:00
|
|
|
RageSound m_soundAssistTick;
|
2004-10-25 03:47:22 +00:00
|
|
|
RageSound *m_pSoundMusic;
|
2003-08-20 09:19:46 +00:00
|
|
|
|
|
|
|
|
BeginnerHelper m_BeginnerHelper;
|
2004-03-30 07:44:29 +00:00
|
|
|
|
2004-04-20 02:35:30 +00:00
|
|
|
NoteData m_CabinetLightsNoteData;
|
2002-05-20 08:59:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2003-02-14 22:25:14 +00:00
|
|
|
#endif
|
2004-06-08 05:22:33 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* (c) 2001-2004 Chris Danford, Glenn Maynard
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
* distribute, and/or sell copies of the Software, and to permit persons to
|
|
|
|
|
* whom the Software is furnished to do so, provided that the above
|
|
|
|
|
* copyright notice(s) and this permission notice appear in all copies of
|
|
|
|
|
* the Software and that both the above copyright notice(s) and this
|
|
|
|
|
* permission notice appear in supporting documentation.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
|
|
|
|
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
|
|
|
|
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
|
|
|
|
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
|
|
|
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|