Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ScreenGameplay.h

Go to the documentation of this file.
00001 /* ScreenGameplay - The music plays, the notes scroll, and the Player is pressing buttons. */ 00002 00003 #ifndef SCREEN_GAMEPLAY_H 00004 #define SCREEN_GAMEPLAY_H 00005 00006 #include "Screen.h" 00007 #include "Sprite.h" 00008 #include "Transition.h" 00009 #include "BitmapText.h" 00010 #include "Player.h" 00011 #include "RandomSample.h" 00012 #include "RageSound.h" 00013 #include "Background.h" 00014 #include "Foreground.h" 00015 #include "LifeMeter.h" 00016 #include "ScoreDisplay.h" 00017 #include "DifficultyIcon.h" 00018 #include "DifficultyMeter.h" 00019 #include "BPMDisplay.h" 00020 class Inventory; 00021 #include "BeginnerHelper.h" 00022 #include "LyricDisplay.h" 00023 #include "Character.h" 00024 #include "Attack.h" 00025 #include "MeterDisplay.h" 00026 #include "ActiveAttackList.h" 00027 #include "NetworkSyncManager.h" 00028 #include "AutoKeysounds.h" 00029 00030 class LyricsLoader; 00031 class ScreenGameplay : public Screen 00032 { 00033 public: 00034 ScreenGameplay( CString sName ); 00035 virtual void Init(); 00036 virtual ~ScreenGameplay(); 00037 00038 virtual void Update( float fDeltaTime ); 00039 virtual void DrawPrimitives(); 00040 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00041 virtual void HandleScreenMessage( const ScreenMessage SM ); 00042 00043 virtual bool UsesBackground() const { return false; } 00044 00045 protected: 00046 void TweenOnScreen(); 00047 void TweenOffScreen(); 00048 00049 bool IsLastSong(); 00050 void SetupSong( PlayerNumber p, int iSongIndex ); 00051 void LoadNextSong(); 00052 void LoadCourseSongNumber( int SongNumber ); 00053 float StartPlayingSong(float MinTimeToNotes, float MinTimeToMusic); 00054 void ShowSavePrompt( ScreenMessage SM_SendWhenDone ); 00055 void PlayAnnouncer( CString type, float fSeconds ); 00056 void UpdateLights(); 00057 00058 void PlayTicks(); 00059 void UpdateSongPosition( float fDeltaTime ); 00060 void UpdateLyrics( float fDeltaTime ); 00061 void SongFinished(); 00062 void StageFinished( bool bBackedOut ); 00063 00064 virtual void InitSongQueues(); 00065 00066 enum DancingState { 00067 STATE_INTRO = 0, // not allowed to press Back 00068 STATE_DANCING, 00069 STATE_OUTRO, // not allowed to press Back 00070 NUM_DANCING_STATES 00071 } m_DancingState; 00072 vector<Song*> m_apSongsQueue; // size may be >1 if playing a course 00073 vector<Steps*> m_vpStepsQueue[NUM_PLAYERS]; // size may be >1 if playing a course 00074 vector<AttackArray> m_asModifiersQueue[NUM_PLAYERS];// size may be >1 if playing a course 00075 00076 bool m_bChangedOffsetOrBPM; 00077 float m_fTimeSinceLastDancingComment; // this counter is only running while STATE_DANCING 00078 00079 LyricDisplay m_LyricDisplay; 00080 00081 Background m_Background; 00082 Foreground m_Foreground; 00083 00084 Transition m_NextSongIn; // shows between songs in a course 00085 Transition m_NextSongOut; // shows between songs in a course 00086 Transition m_SongFinished; // shows after each song, course or not 00087 00088 Sprite m_sprStaticBackground; 00089 Sprite m_sprLifeFrame; 00090 LifeMeter* m_pLifeMeter[NUM_PLAYERS]; 00091 CombinedLifeMeter* m_pCombinedLifeMeter; 00092 Sprite m_sprStage; 00093 Sprite m_sprCourseSongNumber; 00094 AutoActor m_sprStageFrame; 00095 BitmapText m_textCourseSongNumber[NUM_PLAYERS]; 00096 BitmapText m_textPlayerName[NUM_PLAYERS]; 00097 BitmapText m_textStepsDescription[NUM_PLAYERS]; 00098 00099 BPMDisplay m_BPMDisplay; 00100 float m_fLastBPS; 00101 00102 Sprite m_sprScoreFrame; 00103 ScoreDisplay* m_pPrimaryScoreDisplay[NUM_PLAYERS]; 00104 ScoreDisplay* m_pSecondaryScoreDisplay[NUM_PLAYERS]; 00105 ScoreKeeper* m_pPrimaryScoreKeeper[NUM_PLAYERS]; 00106 ScoreKeeper* m_pSecondaryScoreKeeper[NUM_PLAYERS]; 00107 BitmapText m_textPlayerOptions[NUM_PLAYERS]; 00108 BitmapText m_textSongOptions; 00109 ActiveAttackList m_ActiveAttackList[NUM_PLAYERS]; 00110 BitmapText m_Scoreboard[NUM_NSSB_CATEGORIES]; // for NSMAN, so we can have a scoreboard 00111 00112 bool m_ShowScoreboard; 00113 00114 BitmapText m_textDebug; 00115 00116 RageTimer m_GiveUpTimer; 00117 void AbortGiveUp(); 00118 00119 BitmapText m_textAutoPlay; // for AutoPlay, AutoAdjust 00120 void UpdateAutoPlayText(); 00121 00122 BitmapText m_MaxCombo; 00123 00124 Transition m_Ready; 00125 Transition m_Go; 00126 Transition m_Cleared; 00127 Transition m_Failed; 00128 Transition m_Extra; 00129 Transition m_Toasty; // easter egg 00130 Transition m_Win[NUM_PLAYERS]; 00131 Transition m_Draw; 00132 Transition m_In; 00133 Transition m_Back; 00134 BGAnimation m_Overlay; 00135 00136 BitmapText m_textSurviveTime; // used in extra stage 00137 BitmapText m_textSongTitle; 00138 MeterDisplay m_meterSongPosition; 00139 00140 Player m_Player[NUM_PLAYERS]; 00141 00142 AutoKeysounds m_AutoKeysounds; 00143 00144 // used in PLAY_MODE_BATTLE 00145 Inventory* m_pInventory[NUM_PLAYERS]; 00146 00147 DifficultyIcon m_DifficultyIcon[NUM_PLAYERS]; 00148 DifficultyMeter m_DifficultyMeter[NUM_PLAYERS]; 00149 00150 Sprite m_sprOniGameOver[NUM_PLAYERS]; 00151 void ShowOniGameOver( PlayerNumber pn ); 00152 00153 RageSound m_soundBattleTrickLevel1; 00154 RageSound m_soundBattleTrickLevel2; 00155 RageSound m_soundBattleTrickLevel3; 00156 00157 bool m_bZeroDeltaOnNextUpdate; 00158 00159 RageSound m_soundAssistTick; 00160 RageSound *m_pSoundMusic; 00161 00162 BeginnerHelper m_BeginnerHelper; 00163 00164 NoteData m_CabinetLightsNoteData; 00165 }; 00166 00167 00168 #endif 00169 00170 /* 00171 * (c) 2001-2004 Chris Danford, Glenn Maynard 00172 * All rights reserved. 00173 * 00174 * Permission is hereby granted, free of charge, to any person obtaining a 00175 * copy of this software and associated documentation files (the 00176 * "Software"), to deal in the Software without restriction, including 00177 * without limitation the rights to use, copy, modify, merge, publish, 00178 * distribute, and/or sell copies of the Software, and to permit persons to 00179 * whom the Software is furnished to do so, provided that the above 00180 * copyright notice(s) and this permission notice appear in all copies of 00181 * the Software and that both the above copyright notice(s) and this 00182 * permission notice appear in supporting documentation. 00183 * 00184 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00185 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00186 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00187 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00188 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00189 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00190 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00191 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00192 * PERFORMANCE OF THIS SOFTWARE. 00193 */

Generated on Thu Jan 27 20:57:31 2005 for StepMania by doxygen 1.3.7