Files
itgmania212121/stepmania/src/ScreenSelectMusic.h
T

174 lines
5.6 KiB
C++
Raw Normal View History

2004-06-08 05:22:33 +00:00
/* ScreenSelectMusic - Choose a Song and Steps. */
2002-05-20 08:59:37 +00:00
2004-06-08 05:22:33 +00:00
#ifndef SCREEN_SELECT_MUSIC_H
#define SCREEN_SELECT_MUSIC_H
2002-05-20 08:59:37 +00:00
#include "ScreenWithMenuElements.h"
2002-05-20 08:59:37 +00:00
#include "Sprite.h"
#include "BitmapText.h"
#include "GameConstantsAndTypes.h"
#include "MusicWheel.h"
#include "Banner.h"
#include "FadingBanner.h"
#include "BPMDisplay.h"
2002-05-20 08:59:37 +00:00
#include "GrooveRadar.h"
#include "DifficultyIcon.h"
2003-03-09 00:55:49 +00:00
#include "DifficultyMeter.h"
2003-06-18 07:10:03 +00:00
#include "DifficultyDisplay.h"
2003-11-17 04:29:14 +00:00
#include "DifficultyList.h"
#include "CourseContentsList.h"
2003-11-17 02:52:03 +00:00
#include "HelpDisplay.h"
2003-11-17 06:13:12 +00:00
#include "PaneDisplay.h"
#include "RageUtil_BackgroundLoader.h"
2005-02-02 04:17:38 +00:00
#include "ThemeMetric.h"
#include "ActorCommands.h"
2005-06-30 22:41:22 +00:00
#include "RageTexturePreloader.h"
2005-09-03 06:13:30 +00:00
#include "TimingData.h"
2002-05-20 08:59:37 +00:00
class ScreenSelectMusic : public ScreenWithMenuElements
2002-05-20 08:59:37 +00:00
{
public:
2006-01-15 19:49:02 +00:00
ScreenSelectMusic();
2002-05-20 08:59:37 +00:00
virtual ~ScreenSelectMusic();
virtual void Init();
2005-07-22 22:38:53 +00:00
virtual void BeginScreen();
2002-05-20 08:59:37 +00:00
virtual void Update( float fDeltaTime );
virtual void Input( const InputEventPlus &input );
2002-05-20 08:59:37 +00:00
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuStart( PlayerNumber pn );
virtual void MenuBack( PlayerNumber pn );
2002-05-20 08:59:37 +00:00
/* ScreenWithMenuElements override: never play music here; we do it ourself. */
virtual void StartPlayingMusic() { }
2005-07-12 05:52:52 +00:00
bool GetGoToOptions() const { return m_bGoToOptions; }
//
// Lua
//
virtual void PushSelf( lua_State *L );
2002-05-20 08:59:37 +00:00
protected:
2005-07-22 22:38:53 +00:00
void TweenOffScreen();
2002-08-28 22:42:40 +00:00
void TweenScoreOnAndOffAfterChangeSort();
enum DisplayMode { DISPLAY_SONGS, DISPLAY_COURSES, DISPLAY_MODES } m_DisplayMode;
void SwitchDisplayMode( DisplayMode dm );
void TweenSongPartsOnScreen( bool Initial );
2003-11-16 21:51:02 +00:00
void TweenSongPartsOffScreen( bool Final );
void TweenCoursePartsOnScreen( bool Initial );
2003-11-16 21:51:02 +00:00
void TweenCoursePartsOffScreen( bool Final );
void SkipSongPartTweens();
void SkipCoursePartTweens();
void UpdateSelectButton();
2002-08-28 22:42:40 +00:00
void ChangeDifficulty( PlayerNumber pn, int dir );
2002-05-28 20:01:22 +00:00
void AfterStepsChange( const vector<PlayerNumber> &vpns );
void AfterTrailChange( const vector<PlayerNumber> &vpns );
void SwitchToPreferredDifficulty();
2002-05-20 08:59:37 +00:00
void AfterMusicChange();
2002-08-20 21:00:56 +00:00
void SortOrderChanged();
2002-05-20 08:59:37 +00:00
void CheckBackgroundRequests( bool bForce );
2002-08-01 13:42:56 +00:00
2006-02-14 11:10:03 +00:00
vector<Steps*> m_vpSteps;
vector<Trail*> m_vpTrails;
int m_iSelection[NUM_PLAYERS];
2002-05-20 08:59:37 +00:00
2005-02-02 04:17:38 +00:00
ThemeMetric<float> BANNER_WIDTH;
ThemeMetric<float> BANNER_HEIGHT;
ThemeMetric<float> SAMPLE_MUSIC_DELAY;
ThemeMetric<bool> SHOW_RADAR;
ThemeMetric<bool> SHOW_PANES;
ThemeMetric<bool> SHOW_DIFFICULTY_LIST;
2005-03-30 07:39:41 +00:00
ThemeMetric<bool> SHOW_COURSE_CONTENTS;
2005-02-02 04:17:38 +00:00
ThemeMetric<bool> DO_ROULETTE_ON_MENU_TIMER;
ThemeMetric<bool> ALIGN_MUSIC_BEATS;
2006-01-22 01:00:06 +00:00
ThemeMetric<RString> CODES;
ThemeMetric<RString> MUSIC_WHEEL_TYPE;
ThemeMetric<bool> OPTIONS_MENU_AVAILABLE;
2005-04-26 06:41:57 +00:00
DynamicThemeMetric<bool> SELECT_MENU_AVAILABLE;
2005-04-27 04:35:55 +00:00
DynamicThemeMetric<bool> MODE_MENU_AVAILABLE;
2005-02-02 04:17:38 +00:00
2006-01-22 01:00:06 +00:00
RString m_sSectionMusicPath;
RString m_sSortMusicPath;
RString m_sRouletteMusicPath;
RString m_sRandomMusicPath;
RString m_sCourseMusicPath;
RString m_sFallbackCDTitlePath;
2005-02-02 04:17:38 +00:00
Sprite m_sprBannerMask;
2006-02-14 11:10:03 +00:00
FadingBanner m_Banner;
AutoActor m_sprBannerFrame;
BPMDisplay m_BPMDisplay;
Sprite m_sprCDTitleFront, m_sprCDTitleBack;
2002-09-03 06:33:08 +00:00
Sprite m_sprDifficultyFrame[NUM_PLAYERS];
2006-02-14 11:10:03 +00:00
DifficultyIcon m_DifficultyIcon[NUM_PLAYERS];
Sprite m_AutoGenIcon[NUM_PLAYERS];
2006-02-14 11:10:03 +00:00
GrooveRadar m_GrooveRadar;
BitmapText m_textSongOptions;
2004-05-22 22:56:58 +00:00
BitmapText m_textNumSongs;
BitmapText m_textTotalTime;
2002-09-03 06:33:08 +00:00
Sprite m_sprMeterFrame[NUM_PLAYERS];
2003-03-09 00:55:49 +00:00
DifficultyMeter m_DifficultyMeter[NUM_PLAYERS];
Sprite m_sprHighScoreFrame[NUM_PLAYERS];
BitmapText m_textHighScore[NUM_PLAYERS];
MusicWheel m_MusicWheel;
2003-11-18 21:55:29 +00:00
AutoActor m_MusicWheelUnder;
2005-03-30 17:43:34 +00:00
AutoActor m_sprLongBalloon;
AutoActor m_sprMarathonBalloon;
2004-03-13 23:11:57 +00:00
AutoActor m_sprCourseHasMods;
2006-02-14 11:10:03 +00:00
DifficultyDisplay m_DifficultyDisplay;
DifficultyList m_DifficultyList;
CourseContentsList m_CourseContents;
2003-11-17 02:52:03 +00:00
HelpDisplay m_Artist;
2003-11-17 04:12:20 +00:00
BitmapText m_MachineRank;
2003-11-17 06:13:12 +00:00
PaneDisplay m_PaneDisplay[NUM_PLAYERS];
2002-05-20 08:59:37 +00:00
bool m_bMadeChoice;
bool m_bGoToOptions;
2006-01-22 01:00:06 +00:00
RString m_sSampleMusicToPlay;
TimingData *m_pSampleMusicTimingData;
float m_fSampleStartSeconds, m_fSampleLengthSeconds;
bool m_bAllowOptionsMenu, m_bAllowOptionsMenuRepeat;
2005-04-26 06:41:57 +00:00
bool m_bSelectIsDown;
2002-05-20 08:59:37 +00:00
2004-01-10 21:35:39 +00:00
RageSound m_soundDifficultyEasier;
RageSound m_soundDifficultyHarder;
2003-01-02 08:13:34 +00:00
RageSound m_soundOptionsChange;
RageSound m_soundLocked;
2005-05-04 01:08:35 +00:00
RageSound m_soundSelectPressed;
2006-02-14 11:10:03 +00:00
BackgroundLoader m_BackgroundLoader;
RageTexturePreloader m_TexturePreload;
2002-05-20 08:59:37 +00:00
};
2004-06-08 05:22:33 +00:00
#endif
2002-05-20 08:59:37 +00:00
2004-06-08 05:22:33 +00:00
/*
* (c) 2001-2004 Chris Danford
* 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.
*/