diff --git a/stepmania/Themes/default/BGAnimations/ScreenEditMenu in.redir b/stepmania/Themes/default/BGAnimations/ScreenEditMenu in.redir new file mode 100644 index 0000000000..3c553c7cd9 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenEditMenu in.redir @@ -0,0 +1 @@ +_fade in with sound \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenEditMenu out.redir b/stepmania/Themes/default/BGAnimations/ScreenEditMenu out.redir new file mode 100644 index 0000000000..5ffda2b1ba --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenEditMenu out.redir @@ -0,0 +1 @@ +_fade out with sound \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenMapControllers in.redir b/stepmania/Themes/default/BGAnimations/ScreenMapControllers in.redir new file mode 100644 index 0000000000..0f6547301b --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenMapControllers in.redir @@ -0,0 +1 @@ +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenMapControllers out.redir b/stepmania/Themes/default/BGAnimations/ScreenMapControllers out.redir new file mode 100644 index 0000000000..0f6547301b --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenMapControllers out.redir @@ -0,0 +1 @@ +_options to options \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir new file mode 100644 index 0000000000..76edcea756 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions background.redir @@ -0,0 +1 @@ +_shared background \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir new file mode 100644 index 0000000000..d2902773d0 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenPlayerOptions in.redir @@ -0,0 +1 @@ +_fade in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty in.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty in.redir new file mode 100644 index 0000000000..20f5042bcb --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty in.redir @@ -0,0 +1 @@ +_menu in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty out.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty out.redir new file mode 100644 index 0000000000..dbd8790a88 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectDifficulty out.redir @@ -0,0 +1 @@ +_menu out \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectGame in.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectGame in.redir new file mode 100644 index 0000000000..d2902773d0 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectGame in.redir @@ -0,0 +1 @@ +_fade in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectGroup in.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectGroup in.redir new file mode 100644 index 0000000000..20f5042bcb --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectGroup in.redir @@ -0,0 +1 @@ +_menu in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectGroup out.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectGroup out.redir new file mode 100644 index 0000000000..dbd8790a88 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectGroup out.redir @@ -0,0 +1 @@ +_menu out \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic in.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic in.redir new file mode 100644 index 0000000000..20f5042bcb --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic in.redir @@ -0,0 +1 @@ +_menu in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectMusic out.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic out.redir new file mode 100644 index 0000000000..b8a32d0947 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectMusic out.redir @@ -0,0 +1 @@ +_fade out \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSelectStyle out.redir b/stepmania/Themes/default/BGAnimations/ScreenSelectStyle out.redir new file mode 100644 index 0000000000..dbd8790a88 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSelectStyle out.redir @@ -0,0 +1 @@ +_menu out \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir b/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir new file mode 100644 index 0000000000..d2902773d0 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSongOptions in.redir @@ -0,0 +1 @@ +_fade in \ No newline at end of file diff --git a/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir b/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir new file mode 100644 index 0000000000..b8a32d0947 --- /dev/null +++ b/stepmania/Themes/default/BGAnimations/ScreenSongOptions out.redir @@ -0,0 +1 @@ +_fade out \ No newline at end of file diff --git a/stepmania/Themes/default/Fonts/GroupList label.redir b/stepmania/Themes/default/Fonts/GroupList label.redir new file mode 100644 index 0000000000..31dcc35bf5 --- /dev/null +++ b/stepmania/Themes/default/Fonts/GroupList label.redir @@ -0,0 +1 @@ +normal diff --git a/stepmania/Themes/default/Graphics/BPMDisplay label.png b/stepmania/Themes/default/Graphics/BPMDisplay label.png new file mode 100644 index 0000000000..1d26f38876 Binary files /dev/null and b/stepmania/Themes/default/Graphics/BPMDisplay label.png differ diff --git a/stepmania/Themes/default/Graphics/Banner abc.png b/stepmania/Themes/default/Graphics/Banner abc.png new file mode 100644 index 0000000000..fdf8fe34f1 Binary files /dev/null and b/stepmania/Themes/default/Graphics/Banner abc.png differ diff --git a/stepmania/Themes/default/Graphics/Banner roulette.png b/stepmania/Themes/default/Graphics/Banner roulette.png new file mode 100644 index 0000000000..6a75bfa39c Binary files /dev/null and b/stepmania/Themes/default/Graphics/Banner roulette.png differ diff --git a/stepmania/Themes/default/Graphics/EditMenu Left 1x4.png b/stepmania/Themes/default/Graphics/EditMenu Left 1x4.png new file mode 100644 index 0000000000..493d7d6083 Binary files /dev/null and b/stepmania/Themes/default/Graphics/EditMenu Left 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/EditMenu Right 1x4.png b/stepmania/Themes/default/Graphics/EditMenu Right 1x4.png new file mode 100644 index 0000000000..0d853e1b53 Binary files /dev/null and b/stepmania/Themes/default/Graphics/EditMenu Right 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/GrooveRadar base.png b/stepmania/Themes/default/Graphics/GrooveRadar base.png new file mode 100644 index 0000000000..262ee12bea Binary files /dev/null and b/stepmania/Themes/default/Graphics/GrooveRadar base.png differ diff --git a/stepmania/Themes/default/Graphics/GrooveRadar labels 1x5.png b/stepmania/Themes/default/Graphics/GrooveRadar labels 1x5.png new file mode 100644 index 0000000000..b8a27b467a Binary files /dev/null and b/stepmania/Themes/default/Graphics/GrooveRadar labels 1x5.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBar extra frame.png b/stepmania/Themes/default/Graphics/LifeMeterBar extra frame.png new file mode 100644 index 0000000000..13e66069b4 Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBar extra frame.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBar extra normal.png b/stepmania/Themes/default/Graphics/LifeMeterBar extra normal.png new file mode 100644 index 0000000000..dfc5c7f347 Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBar extra normal.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBar frame.png b/stepmania/Themes/default/Graphics/LifeMeterBar frame.png new file mode 100644 index 0000000000..13e66069b4 Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBar frame.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBar hot.png b/stepmania/Themes/default/Graphics/LifeMeterBar hot.png new file mode 100644 index 0000000000..478b4cc3aa Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBar hot.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBar normal.png b/stepmania/Themes/default/Graphics/LifeMeterBar normal.png new file mode 100644 index 0000000000..ac8ed3801a Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBar normal.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBattery frame.png b/stepmania/Themes/default/Graphics/LifeMeterBattery frame.png new file mode 100644 index 0000000000..92525ad0d3 Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBattery frame.png differ diff --git a/stepmania/Themes/default/Graphics/LifeMeterBattery lives 1x4.png b/stepmania/Themes/default/Graphics/LifeMeterBattery lives 1x4.png new file mode 100644 index 0000000000..cf7a1ec56f Binary files /dev/null and b/stepmania/Themes/default/Graphics/LifeMeterBattery lives 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/MenuElements icon couple 2x1.png b/stepmania/Themes/default/Graphics/MenuElements icon couple 2x1.png new file mode 100644 index 0000000000..8352997180 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MenuElements icon couple 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/MenuElements icon double 2x1.png b/stepmania/Themes/default/Graphics/MenuElements icon double 2x1.png new file mode 100644 index 0000000000..ab61a548f2 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MenuElements icon double 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/MenuElements icon single 2x1.png b/stepmania/Themes/default/Graphics/MenuElements icon single 2x1.png new file mode 100644 index 0000000000..c2c44d9076 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MenuElements icon single 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/MenuElements icon solo 2x1.png b/stepmania/Themes/default/Graphics/MenuElements icon solo 2x1.png new file mode 100644 index 0000000000..f3fb83b7ea Binary files /dev/null and b/stepmania/Themes/default/Graphics/MenuElements icon solo 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/MenuElements icon versus 2x1.png b/stepmania/Themes/default/Graphics/MenuElements icon versus 2x1.png new file mode 100644 index 0000000000..8352997180 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MenuElements icon versus 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/MusicWheel highlight.png b/stepmania/Themes/default/Graphics/MusicWheel highlight.png new file mode 100644 index 0000000000..30152ecc35 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MusicWheel highlight.png differ diff --git a/stepmania/Themes/default/Graphics/MusicWheelItem section.png b/stepmania/Themes/default/Graphics/MusicWheelItem section.png new file mode 100644 index 0000000000..1e33fc23ff Binary files /dev/null and b/stepmania/Themes/default/Graphics/MusicWheelItem section.png differ diff --git a/stepmania/Themes/default/Graphics/MusicWheelItem song.png b/stepmania/Themes/default/Graphics/MusicWheelItem song.png new file mode 100644 index 0000000000..0465b71516 Binary files /dev/null and b/stepmania/Themes/default/Graphics/MusicWheelItem song.png differ diff --git a/stepmania/Themes/default/Graphics/NoteField bars 1x4.png b/stepmania/Themes/default/Graphics/NoteField bars 1x4.png new file mode 100644 index 0000000000..946e25d9d7 Binary files /dev/null and b/stepmania/Themes/default/Graphics/NoteField bars 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenEvaluation judge labels 1x8.png b/stepmania/Themes/default/Graphics/ScreenEvaluation judge labels 1x8.png new file mode 100644 index 0000000000..56f504873d Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenEvaluation judge labels 1x8.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenGameplay life frame.png b/stepmania/Themes/default/Graphics/ScreenGameplay life frame.png new file mode 100644 index 0000000000..2fae319964 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenGameplay life frame.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenGameplay oni gameover.png b/stepmania/Themes/default/Graphics/ScreenGameplay oni gameover.png new file mode 100644 index 0000000000..4ae4a0e608 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenGameplay oni gameover.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenInstructions header.redir b/stepmania/Themes/default/Graphics/ScreenInstructions header.redir new file mode 100644 index 0000000000..843d326fc0 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenInstructions header.redir @@ -0,0 +1 @@ +_shared menu header.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenLogo ds3ddx.png b/stepmania/Themes/default/Graphics/ScreenLogo ds3ddx.png new file mode 100644 index 0000000000..4d0c2eb871 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenLogo ds3ddx.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenLogo ez2.png b/stepmania/Themes/default/Graphics/ScreenLogo ez2.png new file mode 100644 index 0000000000..0343b277cf Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenLogo ez2.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenMapControllers header.redir b/stepmania/Themes/default/Graphics/ScreenMapControllers header.redir new file mode 100644 index 0000000000..843d326fc0 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenMapControllers header.redir @@ -0,0 +1 @@ +_shared menu header.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenOptions bullet.png b/stepmania/Themes/default/Graphics/ScreenOptions bullet.png new file mode 100644 index 0000000000..eaccc1275e Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenOptions bullet.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenPlayerOptions header.redir b/stepmania/Themes/default/Graphics/ScreenPlayerOptions header.redir new file mode 100644 index 0000000000..0b81245246 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenPlayerOptions header.redir @@ -0,0 +1 @@ +_shared options header.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenRanking bullets 1x5.png b/stepmania/Themes/default/Graphics/ScreenRanking bullets 1x5.png new file mode 100644 index 0000000000..a8e92045d3 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenRanking bullets 1x5.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectCourse banner frame.png b/stepmania/Themes/default/Graphics/ScreenSelectCourse banner frame.png new file mode 100644 index 0000000000..7fe49e5475 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectCourse banner frame.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectCourse explanation.png b/stepmania/Themes/default/Graphics/ScreenSelectCourse explanation.png new file mode 100644 index 0000000000..75e7f4288a Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectCourse explanation.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty cursor 2x1.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty cursor 2x1.png new file mode 100644 index 0000000000..693a45079f Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty cursor 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty explanation 1x2.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty explanation 1x2.png new file mode 100644 index 0000000000..a345eb6de7 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty explanation 1x2.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page1 1x4.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page1 1x4.png new file mode 100644 index 0000000000..a112c7f2a7 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page1 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page2 1x4.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page2 1x4.png new file mode 100644 index 0000000000..a00e814f9e Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty more page2 1x4.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty ok 2x1.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty ok 2x1.png new file mode 100644 index 0000000000..48f5a7ae27 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty ok 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectDifficulty shadow 2x1.png b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty shadow 2x1.png new file mode 100644 index 0000000000..df13dd64f5 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectDifficulty shadow 2x1.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectGame header.redir b/stepmania/Themes/default/Graphics/ScreenSelectGame header.redir new file mode 100644 index 0000000000..0b81245246 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenSelectGame header.redir @@ -0,0 +1 @@ +_shared options header.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScreenSelectGroup contents.png b/stepmania/Themes/default/Graphics/ScreenSelectGroup contents.png new file mode 100644 index 0000000000..6096c432b9 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectGroup contents.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectGroup explanation.png b/stepmania/Themes/default/Graphics/ScreenSelectGroup explanation.png new file mode 100644 index 0000000000..81c0b57435 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectGroup explanation.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectGroup frame.png b/stepmania/Themes/default/Graphics/ScreenSelectGroup frame.png new file mode 100644 index 0000000000..e14b54ed75 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectGroup frame.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectGroup header.png b/stepmania/Themes/default/Graphics/ScreenSelectGroup header.png new file mode 100644 index 0000000000..dec6c546f0 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectGroup header.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusic fallback cdtitle.png b/stepmania/Themes/default/Graphics/ScreenSelectMusic fallback cdtitle.png new file mode 100644 index 0000000000..7860be6b69 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusic fallback cdtitle.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficulty frame.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficulty frame.png new file mode 100644 index 0000000000..011e1e9f57 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficulty frame.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficultyratingicon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficultyratingicon.png new file mode 100644 index 0000000000..5cf7abe0dc Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 difficultyratingicon.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 infoframe.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 infoframe.png new file mode 100644 index 0000000000..418a2e884b Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 infoframe.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 mirroricon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 mirroricon.png new file mode 100644 index 0000000000..40538c2dc9 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 mirroricon.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 shuffleicon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 shuffleicon.png new file mode 100644 index 0000000000..4d867a73ba Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 shuffleicon.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 speedicon.png b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 speedicon.png new file mode 100644 index 0000000000..8c3fae701a Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectMusicEz2 speedicon.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectPlayer header.png b/stepmania/Themes/default/Graphics/ScreenSelectPlayer header.png new file mode 100644 index 0000000000..7523ad30fe Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectPlayer header.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectStyle explanation.png b/stepmania/Themes/default/Graphics/ScreenSelectStyle explanation.png new file mode 100644 index 0000000000..8e4db12d87 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectStyle explanation.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSelectStyle warning.png b/stepmania/Themes/default/Graphics/ScreenSelectStyle warning.png new file mode 100644 index 0000000000..8e809c8739 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScreenSelectStyle warning.png differ diff --git a/stepmania/Themes/default/Graphics/ScreenSongOptions header.redir b/stepmania/Themes/default/Graphics/ScreenSongOptions header.redir new file mode 100644 index 0000000000..0b81245246 --- /dev/null +++ b/stepmania/Themes/default/Graphics/ScreenSongOptions header.redir @@ -0,0 +1 @@ +_shared options header.png \ No newline at end of file diff --git a/stepmania/Themes/default/Graphics/ScrollBar parts 1x3.png b/stepmania/Themes/default/Graphics/ScrollBar parts 1x3.png new file mode 100644 index 0000000000..77d8842770 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScrollBar parts 1x3.png differ diff --git a/stepmania/Themes/default/Graphics/ScrollBar thumb.png b/stepmania/Themes/default/Graphics/ScrollBar thumb.png new file mode 100644 index 0000000000..e8c2b5d319 Binary files /dev/null and b/stepmania/Themes/default/Graphics/ScrollBar thumb.png differ diff --git a/stepmania/Themes/default/Graphics/WheelNotifyIcon icons 4x2.png b/stepmania/Themes/default/Graphics/WheelNotifyIcon icons 4x2.png new file mode 100644 index 0000000000..30dd047ee4 Binary files /dev/null and b/stepmania/Themes/default/Graphics/WheelNotifyIcon icons 4x2.png differ diff --git a/stepmania/Themes/default/Graphics/_shared footer.png b/stepmania/Themes/default/Graphics/_shared footer.png new file mode 100644 index 0000000000..d6c8fbbeda Binary files /dev/null and b/stepmania/Themes/default/Graphics/_shared footer.png differ diff --git a/stepmania/Themes/default/Graphics/_shared menu header.png b/stepmania/Themes/default/Graphics/_shared menu header.png new file mode 100644 index 0000000000..21026e1838 Binary files /dev/null and b/stepmania/Themes/default/Graphics/_shared menu header.png differ diff --git a/stepmania/Themes/default/Sounds/ScreenCompany music.ogg b/stepmania/Themes/default/Sounds/ScreenCompany music.ogg new file mode 100644 index 0000000000..4751f8eddf Binary files /dev/null and b/stepmania/Themes/default/Sounds/ScreenCompany music.ogg differ diff --git a/stepmania/Themes/default/Sounds/ScreenGameOver music.redir b/stepmania/Themes/default/Sounds/ScreenGameOver music.redir new file mode 100644 index 0000000000..61d5592380 --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenGameOver music.redir @@ -0,0 +1 @@ +_silent.mp3 \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenHowToPlay music.redir b/stepmania/Themes/default/Sounds/ScreenHowToPlay music.redir new file mode 100644 index 0000000000..004e830ca1 --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenHowToPlay music.redir @@ -0,0 +1 @@ +_silent.mp3 diff --git a/stepmania/Themes/default/Sounds/ScreenInstructions music.redir b/stepmania/Themes/default/Sounds/ScreenInstructions music.redir new file mode 100644 index 0000000000..2df592f32c --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenInstructions music.redir @@ -0,0 +1 @@ +_common menu music.ogg \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenIntroMovie music.redir b/stepmania/Themes/default/Sounds/ScreenIntroMovie music.redir new file mode 100644 index 0000000000..61d5592380 --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenIntroMovie music.redir @@ -0,0 +1 @@ +_silent.mp3 \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenJukeboxMenu music.redir b/stepmania/Themes/default/Sounds/ScreenJukeboxMenu music.redir new file mode 100644 index 0000000000..61d5592380 --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenJukeboxMenu music.redir @@ -0,0 +1 @@ +_silent.mp3 \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenSelectDifficulty music.redir b/stepmania/Themes/default/Sounds/ScreenSelectDifficulty music.redir new file mode 100644 index 0000000000..2df592f32c --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenSelectDifficulty music.redir @@ -0,0 +1 @@ +_common menu music.ogg \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenSelectGroup music.redir b/stepmania/Themes/default/Sounds/ScreenSelectGroup music.redir new file mode 100644 index 0000000000..2df592f32c --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenSelectGroup music.redir @@ -0,0 +1 @@ +_common menu music.ogg \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenSelectMusic locked.redir b/stepmania/Themes/default/Sounds/ScreenSelectMusic locked.redir new file mode 100644 index 0000000000..648cf1ffaf --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenSelectMusic locked.redir @@ -0,0 +1 @@ +MusicWheel locked.mp3 \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenSelectStyle music.redir b/stepmania/Themes/default/Sounds/ScreenSelectStyle music.redir new file mode 100644 index 0000000000..2df592f32c --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenSelectStyle music.redir @@ -0,0 +1 @@ +_common menu music.ogg \ No newline at end of file diff --git a/stepmania/Themes/default/Sounds/ScreenUnlock music.redir b/stepmania/Themes/default/Sounds/ScreenUnlock music.redir new file mode 100644 index 0000000000..61d5592380 --- /dev/null +++ b/stepmania/Themes/default/Sounds/ScreenUnlock music.redir @@ -0,0 +1 @@ +_silent.mp3 \ No newline at end of file diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 3b8f67ef9c..62a458d89c 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -1,15 +1,17 @@ -// Possible NextScreen names: +// Possible NextScreen names: // - ScreenCaution // - ScreenEz2SelectPlayer // - ScreenSelectMode // - ScreenInstructions // - ScreenSelectCourse -// - ScreenSelectMaxType2 -// - ScreenSelectMaxType2EX +// - ScreenSelectStyle +// - ScreenSelectStyle5th +// - ScreenSelectDifficulty +// - ScreenSelectDifficultyEX // - ScreenSelectGroup // - ScreenSelectMusic -// - ScreenSelectMaxType15th -// - ScreenSelectMaxType1 +// - ScreenSelectStyle5th +// - ScreenSelectStyle [Common] ColorP1=0.4,1.0,0.8,1 // sea green @@ -31,15 +33,14 @@ ColorSelected=0.5,1,0.5,1 ZoomNotSelected=1.0 ZoomSelected=1.3 SecondsBetweenComments=12 -SecondsBetweenJointPremiumScroll=15 SecondsBeforeAttract=30 HelpTextHome=Use &UP; &DOWN; to select, then press START -HelpTextPay=Insert coins, then press START -HelpTextFree=No charge to join in. Press START +HelpTextPay=Press START to join in. +HelpTextFree=Press START to join in. NextScreen=ScreenCaution [ScreenCaution] -NextScreen=ScreenSelectMaxType1 +NextScreen=ScreenSelectStyle [ScreenEz2SelectPlayer] JoinFrameP1X=120 @@ -57,12 +58,15 @@ SilentWait=1 BounceJoinMessage=1 FoldOnJoin=1 -[ScreenSelectMaxType1] -ChoicesType=0 // 0=styles, 1=difficulties, 2=modes, 3=games +[ScreenSelectStyle] +Choices=single,versus,couple,double,solo HelpText=Use &LEFT; &RIGHT; to select, then press START TimerSeconds=40 -NextScreen=ScreenSelectMaxType2EX -//NextScreen=ScreenSelectMaxType2 +NextScreen1=ScreenSelectDifficulty +NextScreen2=ScreenSelectDifficulty +NextScreen3=ScreenSelectDifficulty +NextScreen4=ScreenSelectDifficulty +NextScreen5=ScreenSelectDifficulty JointPremiumOnCommand=x,550;y,400;xoffset,400;bounceend,0.5;xoffset,-400 JointPremiumOffCommand=bouncebegin,0.5;xoffset,400 Icon1OnCommand=x,60;y,84;xoffset,-800;sleep,0.20;decelerate,0.4;xoffset,800 @@ -75,18 +79,22 @@ Icon4OnCommand=x,300;y,84;xoffset,-800;sleep,0.05;decelerate,0.4;xoffset,800 Icon4OffCommand=bouncebegin,0.5;zoomy,0 Icon5OnCommand=x,380;y,84;xoffset,-800;sleep,0.00;decelerate,0.4;xoffset,800 Icon5OffCommand=bouncebegin,0.5;zoomy,0 +IconGainFocusCommand=glowshift;effectperiod,0.5 +IconLoseFocusCommand=stopeffect DisabledColor=0.2,0.2,0.2,1 ExplanationOnCommand=x,480;y,170;xoffset,400;bounceend,0.5;xoffset,-400 ExplanationOffCommand=bouncebegin,0.5;xoffset,400 +WarningOnCommand=x,480;y,280;zoomy,0;decelerate,0.5;zoomy,1;y,400;diffuseshift;effectcolor1,1,1,1,1;effectcolor2,0,0,0,1 +WarningOffCommand=accelerate,0.3;zoomy,0;y,280 InfoOnCommand=x,480;y,280;zoomy,0;bounceend,0.5;zoomy,1 InfoOffCommand=bouncebegin,0.5;zoomy,0 -PreviewOnCommand=x,160;y,260;diffuse,1,1,1,0;glow,1,1,1,0;linear,0.2;glow,1,1,1,1;linear,0.0;diffuse,1,1,1,1;linear,0.2;glow,1,1,1,0 -PreviewOffCommand=linear,0.5;diffuse,1,1,1,0 +PictureOnCommand=x,160;y,260;diffuse,1,1,1,0;glow,1,1,1,0;linear,0.2;glow,1,1,1,1;linear,0.0;diffuse,1,1,1,1;linear,0.2;glow,1,1,1,0 +PictureOffCommand=linear,0.5;diffuse,1,1,1,0 -[ScreenSelectMaxType15th] +[ScreenSelectStyle5th] HelpText=Use &LEFT; &RIGHT; to select, then press START TimerSeconds=40 -NextScreen=ScreenSelectMaxType2 +NextScreen=ScreenSelectDifficulty [ScreenSelectMode] JoinFrameP1X=120 @@ -112,14 +120,17 @@ FoldOnJoin=1 [ScreenStyleSplash] NextScreen=ScreenSelectGroup -[ScreenSelectMaxType2] -ChoicesType=1 // 0=styles, 1=difficulties, 2=modes, 3=games -Choices=Beginner,Easy,Medium,Hard,Nonstop,Oni,Endless +[ScreenSelectDifficulty] +Choices=arcade-beginner,arcade-easy,arcade-medium,arcade-hard,nonstop,oni,endless HelpText=Use &LEFT; &RIGHT; to select, then press START TimerSeconds=40 -NextScreenArcade=ScreenSelectGroup -NextScreenOni=ScreenInstructions -NextScreenBattle=ScreenInstructions +NextScreen1=ScreenSelectGroup +NextScreen2=ScreenSelectGroup +NextScreen3=ScreenSelectGroup +NextScreen4=ScreenSelectGroup +NextScreen5=ScreenSelectGroup +NextScreen6=ScreenSelectGroup +NextScreen7=ScreenSelectGroup NumChoicesOnPage1=4 LockInputSeconds=0.5 SleepAfterChoiceSeconds=0.5 @@ -132,20 +143,20 @@ ExplanationPage1OnCommand=x,170;y,70;xoffset,-400;bounceend,0.5;xoffset,400; ExplanationPage1OffCommand=bouncebegin,0.5;xoffset,-400 ExplanationPage2OnCommand=x,1100;y,70 ExplanationPage2OffCommand=bouncebegin,0.5;xoffset,400 -HeaderPage1Choice1OnCommand=vertalign,bottom;x,90;y,180;xoffset,-800;sleep,0.0;decelerate,0.4;xoffset,800 -HeaderPage1Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800 -HeaderPage1Choice2OnCommand=vertalign,bottom;x,246;y,220;xoffset,-800;sleep,0.2;decelerate,0.4;xoffset,800 -HeaderPage1Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800 -HeaderPage1Choice3OnCommand=vertalign,bottom;x,394;y,180;xoffset,-800;sleep,0.4;decelerate,0.4;xoffset,800 -HeaderPage1Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800 -HeaderPage1Choice4OnCommand=vertalign,bottom;x,542;y,220;xoffset,-800;sleep,0.6;decelerate,0.4;xoffset,800 -HeaderPage1Choice4OffCommand=sleep,0.9;accelerate,0.4;xoffset,-800 -HeaderPage2Choice1OnCommand=vertalign,bottom;x,760;y,200 -HeaderPage2Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800 -HeaderPage2Choice2OnCommand=vertalign,bottom;x,960;y,200 -HeaderPage2Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800 -HeaderPage2Choice3OnCommand=vertalign,bottom;x,1160;y,200 -HeaderPage2Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800 +InfoPage1Choice1OnCommand=vertalign,bottom;x,90;y,180;xoffset,-800;sleep,0.0;decelerate,0.4;xoffset,800 +InfoPage1Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800 +InfoPage1Choice2OnCommand=vertalign,bottom;x,246;y,220;xoffset,-800;sleep,0.2;decelerate,0.4;xoffset,800 +InfoPage1Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800 +InfoPage1Choice3OnCommand=vertalign,bottom;x,394;y,180;xoffset,-800;sleep,0.4;decelerate,0.4;xoffset,800 +InfoPage1Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800 +InfoPage1Choice4OnCommand=vertalign,bottom;x,542;y,220;xoffset,-800;sleep,0.6;decelerate,0.4;xoffset,800 +InfoPage1Choice4OffCommand=sleep,0.9;accelerate,0.4;xoffset,-800 +InfoPage2Choice1OnCommand=vertalign,bottom;x,760;y,200 +InfoPage2Choice1OffCommand=sleep,0.3;accelerate,0.4;xoffset,-800 +InfoPage2Choice2OnCommand=vertalign,bottom;x,960;y,200 +InfoPage2Choice2OffCommand=sleep,0.5;accelerate,0.4;xoffset,-800 +InfoPage2Choice3OnCommand=vertalign,bottom;x,1160;y,200 +InfoPage2Choice3OffCommand=sleep,0.7;accelerate,0.4;xoffset,-800 PicturePage1Choice1OnCommand=vertalign,top;x,90;y,180;zoomy,0.0;sleep,0.4;bounceend,0.3;zoomy,1 PicturePage1Choice1OffCommand=sleep,0.0;bouncebegin,0.3;zoomy,0 PicturePage1Choice2OnCommand=vertalign,top;x,246;y,220;zoomy,0.0;sleep,0.6;bounceend,0.3;zoomy,1 @@ -177,7 +188,7 @@ OKChooseCommand=diffuse,1,1,1,1;zoom,2;linear,0.2;diffuse,1,1,1,1;zoom,1 OKOffCommand=sleep,0.2;linear,0.3;zoom,0 DisabledColor=0.2,0.2,0.2,1 -[ScreenSelectMaxType2EX] +[ScreenSelectMaxScreenSelectDifficultyEX] DifficultyP1X=216 DifficultyP1Y=180 DifficultyP2X=440 @@ -591,19 +602,16 @@ StopMusicOnNext=0 KeepAliveType=0 // 0 for MAX, 1 for 5th [MenuElements] -TopEdgeX=320 -TopEdgeY=22 -BottomEdgeX=320 -BottomEdgeY=464 -HelpX=320 -HelpY=456 -StyleIconX=440 -StyleIconY=28 -TimerX=590 -TimerY=22 - -[HoldJudgement] -DisplayTime=0.6 +HeaderOnCommand=x,320;y,22;xoffset,640;spring,0.5;xoffset,-640 +HeaderOffCommand=bouncebegin,0.5;xoffset,640; +FooterOnCommand=x,320;y,464 +FooterOffCommand= +HelpOnCommand=x,320;y,456;zoom,0.5;zoomy,0;linear,0.5;zoomy,0.5 +HelpOffCommand=linear,0.5;zoomy,0 +StyleIconOnCommand=x,460;y,22;xoffset,640;spring,0.5;xoffset,-640 +StyleIconOffCommand=bouncebegin,0.5;xoffset,640; +TimerOnCommand=x,588;y,22;xoffset,640;spring,0.5;xoffset,-640 +TimerOffCommand=bouncebegin,0.5;xoffset,640; [ScreenOptions] IconsP1X=40 @@ -622,25 +630,9 @@ ExplanationY=412 ExplanationZoom=0.5 ColorSelected=1,1,1,1 // normal ColorNotSelected=0.5,0.5,0.5,1 // grayed -HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options then press START -TimerSeconds=40 - -[ScreenPreferences] -LabelsX=140 -LabelsZoom=0.7 -LabelsHAlign=2 // 0,1,2 = left,center,right -ItemsZoom=0.5 -ItemsX=160 -ItemsStartY=88 -ItemsSpacingY=34 -ColorSelected=1,1,1,1 // normal -ColorNotSelected=0.5,0.5,0.5,1 // grayed -ColorSelectedDefault=0.2,1.0,0.2,1 // green -ColorNotSelectedDefault=0.1,0.5,0.1,1 // grayed green -HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options then press START [ScreenMapControllers] -HelpText=Use arrow keys to navigate, ENTER to assign, SPACE to clear, ESCAPE when done.::Some USB adaptors require that you chage "Ignore Joy Axes" in the Input Options screen. +HelpText=Use arrow keys to navigate, ENTER to assign, SPACE to clear, ESCAPE when done.::Some USB adaptors require that you change "Ignore Joy Axes" in the Input Options screen. [GhostArrow] ShowSeconds=0.12 @@ -697,15 +689,13 @@ RightEdge=620 BottomEdge=460 [Judgment] -WordX=0 -WordY=0 -MarvelousZoom=1.3 -PerfectZoom=1.2 -GreatZoom=1.1 -GoodZoom=1.05 -BooZoom=1.0 -TweenSeconds=0.05 -ShowSeconds=0.8 +MarvelousCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.3;linear,0.05;zoom,1;sleep,0.8;linear,0;diffuse,1,1,1,0,glowblink,effectperiod,0.05;effectcolor1,1,1,1,0;effectcolor2,1,1,1,0.5 +PerfectCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.3;linear,0.05;zoom,1;sleep,0.8;linear,0;diffuse,1,1,1,0 +GreatCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.2;linear,0.05;zoom,1;sleep,0.8;linear,0;diffuse,1,1,1,0 +GoodCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.1;linear,0.05;zoom,1;sleep,0.8;linear,0;diffuse,1,1,1,0 +BooCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.0;vibrate;effectmagnitude,4,8,8;sleep,0.8;linear,0;diffuse,1,1,1,0 +MissCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1;y,-20;linear,0.8;y,20;sleep,0.8;linear,0;diffuse,1,1,1,0 + [Combo] LabelX=6 @@ -724,10 +714,8 @@ PulseZoom=1.2 TweenSeconds=0.05 [HoldJudgment] -OKZoomX=1.25 -OKZoomY=1.25 -TweenSeconds=0.3 -ShowSeconds=0.8 +NGCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1;y,-10;linear,0.8;y,10 +OKCommand=shadowlength,4;diffuse,1,1,1,1;zoom,1.25;linear,0.3;zoomx,1;zoomy,1;sleep,0.5;linear,0;diffuse,1,1,1,0 [Player] GrayArrowsY=96 @@ -819,7 +807,8 @@ BannerWidth=564 BannerHeight=184 [ScreenInputOptions] -IgnoreJoyAxes=&oq;ON&cq; will cause StepMania to ignore all input from::joystick directional pads. This is useful for people using::the DirectPad Pro driver. +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes +IgnoreJoyAxes=&oq;ON&cq; will cause StepMania to ignore all input from::joystick directional pads. This is useful for the DirectPad Pro driver::and some brands of USB convertors. MenuButtons=The default setting allows the dance pad's panels to navigate::the menus. Changing this to &oq;dedicated only&cq; will restrict::menu navigation to only the Menu* set of buttons. Be sure to map::the Menu* set of buttons before setting this to &oq;dedicated&cq;! AutoPlay=This option is useful for those who would like to play::without using a pad. However, you will not be able to set::high scores or earn extra stages while this options is ON. BackDelayed=Turning this option ON will require that you hold the Back button::for 0.5 seconds before it will regiser. This is useful if you find::yourself accidentally pressing the Back button on your controller. @@ -827,6 +816,7 @@ OptionsNavigation=When using &oq;SM style&cq;, the Start button will take::you t WheelSpeed=Adjusts the speed of the DDR style musicwheel. [ScreenMachineOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes MenuTimer=Turn this &oq;OFF&cq; to disable the time limit in menus. ArcadeStages=The number of songs a player can play in Arcade mode.::Set this to &oq;Unlimited&cq;, and you can continue playing forever.::Also, when this option is set to &oq;Unlimited&cq;, failing will take you::back to the the Select Music or Select Course screen. JudgeDifficulty=Increase this value to cause your steps to be judged more strictly::(i.e. shink the timing window). @@ -839,6 +829,7 @@ JointPremium=When set to OFF, game styles that require both sides of the machine SongOptions=Choose whether or not to display the Song Options screen::after the Player Options screen. [ScreenGraphicOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes DisplayMode=Choose whether you would like StepMania to run full screen,::or to display in a window on your desktop. DisplayColor=Choose the color depth of the StepMania window.::This option may not take effect in windowed mode. TextureColor=Choose the color depth of textures.::32 bit texture use more memory, but look nicer. @@ -850,6 +841,7 @@ WaitForVsync=Wait for the monitor's vertical retrace before displaying::the next KeepTexturesInMemory=Set to ON hold textures in memory instead of::freeing them. This will eliminate the time needed to load::the texture next from disk next time this is needed. Do not set to ON::unless you have 128MB of memory or more. [ScreenGameplayOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes BackgroundMode=Choose what type of backgrounds you would like displayed.::&oq;Animations&cq; uses any random items in the BGAnimations folder.::&oq;Visualizations&cq; chooses a random overlay movie from the Visualization folder.::&oq;Random Movies&cq; cycles through movies in the RandomMovies folder. BackgroundBrightness=Controls how bright the background will appear.::Turn this setting down if you have a hard time seeing the notes. BGForBanner=Instead of displaying the banner image in menus, display::the song background instead. Backgrounds can look better::than banners because they are higher resolution, but they::will take longer to load and may result in some &oq;skipping&cq;. @@ -861,6 +853,7 @@ PickExtraStage=Instead of a set extra stage, this allows::the player to choose w SoloSingles=Turn this option &oq;ON&cq; to enable Solo-Style::for 4-panel single play. [ScreenAppearanceOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes Announcer=Choose from this list of installed annoucner packs.::For more information about creating announcer packs, see the README. Theme=Choose from this list of installed theme packs.::For more information about creating theme packs, see the README. NoteSkin=Choose from this list of installed note skins.::For more information about creating a note skin, see the README. @@ -873,11 +866,9 @@ Translations=Choose whether to displays song titles in their native::language ( DifficultySelect= [ScreenUnlock] -SecondsToShow=10 NextScreen=ScreenRanking [ScreenRanking] -SecondsToShow=0 // ignored in favor of SecsBetweenPages below NextScreen=ScreenWarning CategoryX=520 CategoryY=32 @@ -903,44 +894,35 @@ CoursesToShow=Courses/NaokiStandard.crs,Courses/ParanoiaBrothers.crs NotesTypesToHide=dance-couple,dance-solo [ScreenSoundOptions] -MasterVolume=Reset the internal volume of Stepmania +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes +MasterVolume= [ScreenIntroMovie] -SecondsToShow=14 NextScreen=ScreenDemonstration [ScreenMemoryCard] -SecondsToShow=5 NextScreen=ScreenWarning [ScreenWarning] -SecondsToShow=5 NextScreen=ScreenCompany [ScreenCompany] -SecondsToShow=5 NextScreen=ScreenLogo [ScreenAlbums] -SecondsToShow=10 NextScreen=ScreenLogo [ScreenLogo] -LogoX=320 -LogoY=240 -VersionX=590 -VersionY=20 -SongsX=20 -SongsY=20 -SecondsToShow=10 -NextScreen=ScreenIntroMovie +LogoOnCommand=x,320;y,240;zoomy,0;sleep,0.5;bounceend,0.5;,zoomy,1;glowshift;effectperiod,2.5;effectcolor1,1,1,1,0.1;effectcolor2,1,1,1,0.3 +VersionOnCommand=horizalign,right;x,620;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2 +SongsOnCommand=horizalign,left;x,20;y,20;diffuse,0.6,0.6,0.6,1;zoom,0.5;shadowlength,2 +NextScreen=ScreenDemonstration [ScreenDemonstration] SecondsToShow=30 NextScreen=ScreenRanking [ScreenHowToPlay] -SecondsToShow=30 NextScreen=ScreenUnlock [ScreenNameEntry] @@ -1005,6 +987,7 @@ Row3Y=180 Row4Y=230 [ScreenOptionsMenu] +HelpText=&UP; &DOWN; to change line then press START InputOptions= ConfigKey/JoyMappings= MachineOptions= @@ -1056,3 +1039,17 @@ TextHorizAlignP1=0 TextHorizAlignP2=0 TextZoom=0 SpacingY=0 + +[ScreenSelectGame] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options::START to accept changes BACK to discard changes +Game=Change the current game type with this option. + +[ScreenPlayerOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options START to accept changes +TimerSeconds=30 + +[ScreenSongOptions] +HelpText=&UP; &DOWN; to change line &LEFT; &RIGHT; to select between options START to accept changes +Game=Change the current game type with this option. +TimerSeconds=30 + diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 0fd25586a1..1c6f979490 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -266,6 +266,8 @@ void Actor::BeginTweening( float time, TweenType tt ) { ASSERT( time >= 0 ); + time = max( time, 0 ); + ASSERT( m_TweenStates.size() < 50 ); // there's no reason for the number of tweens to ever go this large // add a new TweenState to the tail, and initialize it @@ -551,8 +553,7 @@ void Actor::Fade( float fSleepSeconds, CString sFadeString, float fFadeSeconds, void Actor::Command( CString sCommandString ) { - // add a snap tween in case the user forgets to use a tween as the first command -// BeginTweening( 0.0001f, TWEEN_LINEAR ); + // OPTIMIZATION OPPORTUNITY: sCommandString could be parsed much more efficiently. CStringArray asCommands; split( sCommandString, ";", asCommands, true ); @@ -623,8 +624,13 @@ void Actor::Command( CString sCommandString ) else if( sName=="additiveblend" ) EnableAdditiveBlend( iParam(0)!=0 ); else { - LOG->Warn( "Unrecognized command name '%s' in command string '%s'.", sName.GetString(), sCommandString.GetString() ); - ASSERT(0); + CString sError = ssprintf( "Unrecognized command name '%s' in command string '%s'.", sName.GetString(), sCommandString.GetString() ); + LOG->Warn( sError ); +#if defined(WIN32) // XXX arch? + if( DISPLAY->IsWindowed() ) + MessageBox(NULL, sError, "Actor::Command", MB_OK); +#endif + } } } diff --git a/stepmania/src/BPMDisplay.cpp b/stepmania/src/BPMDisplay.cpp index 78bc542108..6df694f3a6 100644 --- a/stepmania/src/BPMDisplay.cpp +++ b/stepmania/src/BPMDisplay.cpp @@ -29,13 +29,13 @@ BPMDisplay::BPMDisplay() m_fTimeLeftInState = 0; m_bExtraStage = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2(); - m_textBPM.LoadFromNumbers( THEME->GetPathTo("Numbers","select music bpm numbers") ); + m_textBPM.LoadFromNumbers( THEME->GetPathTo("Numbers","BPMDisplay numbers") ); m_textBPM.EnableShadow( false ); m_textBPM.SetHorizAlign( Actor::align_right ); m_textBPM.SetDiffuse( NORMAL_COLOR ); m_textBPM.SetXY( 0, 0 ); - m_sprLabel.Load( THEME->GetPathTo("Graphics","select music bpm label") ); + m_sprLabel.Load( THEME->GetPathTo("Graphics","BPMDisplay label") ); m_sprLabel.EnableShadow( false ); m_sprLabel.SetDiffuse( NORMAL_COLOR ); m_sprLabel.SetHorizAlign( Actor::align_left ); diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index e9a21b3126..5550379b31 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -154,7 +154,7 @@ void Background::LoadFromSong( Song* pSong ) const float fXZoom = RECT_BACKGROUND.GetWidth() / (float)SCREEN_WIDTH; const float fYZoom = RECT_BACKGROUND.GetHeight() / (float)SCREEN_HEIGHT; - const CString sSongBackgroundPath = pSong->HasBackground() ? pSong->GetBackgroundPath() : THEME->GetPathTo("Graphics","fallback background"); + const CString sSongBackgroundPath = pSong->HasBackground() ? pSong->GetBackgroundPath() : THEME->GetPathTo("Graphics","Background fallback"); // // Load the static background that will before notes start and after notes end diff --git a/stepmania/src/Banner.cpp b/stepmania/src/Banner.cpp index 804ee2c63a..dfd573625c 100644 --- a/stepmania/src/Banner.cpp +++ b/stepmania/src/Banner.cpp @@ -76,24 +76,22 @@ void Banner::LoadFromSong( Song* pSong ) // NULL means no song m_bScrolling = false; } +void Banner::LoadAllMusic() +{ + Load( THEME->GetPathTo("Graphics","Banner all") ); + m_bScrolling = false; +} + void Banner::LoadFromGroup( CString sGroupName ) { CString sGroupBannerPath = SONGMAN->GetGroupBannerPath( sGroupName ); - - if( sGroupName == GROUP_ALL_MUSIC ) - Load( THEME->GetPathTo("Graphics","all music banner") ); - else if( sGroupBannerPath != "" ) - Load( sGroupBannerPath ); - else - LoadFallback(); - + if( sGroupBannerPath != "" ) Load( sGroupBannerPath ); + else LoadFallback(); m_bScrolling = false; } void Banner::LoadFromCourse( Course* pCourse ) // NULL means no course { - Sprite::EnableShadow( false ); - if( pCourse == NULL ) LoadFallback(); else if( pCourse->m_sBannerPath != "" ) Load( pCourse->m_sBannerPath ); else LoadFallback(); @@ -103,12 +101,12 @@ void Banner::LoadFromCourse( Course* pCourse ) // NULL means no course void Banner::LoadFallback() { - Load( THEME->GetPathTo("Graphics","fallback banner") ); + Load( THEME->GetPathTo("Graphics","Banner fallback") ); } void Banner::LoadRoulette() { - RageTextureID ID(THEME->GetPathTo("Graphics","select music roulette banner")); + RageTextureID ID(THEME->GetPathTo("Graphics","Banner roulette")); ID.iMipMaps = 0; Load( ID ); m_bScrolling = true; diff --git a/stepmania/src/Banner.h b/stepmania/src/Banner.h index 61f2da0708..40ba3344f8 100644 --- a/stepmania/src/Banner.h +++ b/stepmania/src/Banner.h @@ -27,6 +27,7 @@ public: virtual void Update( float fDeltaTime ); void LoadFromSong( Song* pSong ); // NULL means no song + void LoadAllMusic(); void LoadFromGroup( CString sGroupName ); void LoadFromCourse( Course* pCourse ); void LoadRoulette(); diff --git a/stepmania/src/BannerWithFrame.cpp b/stepmania/src/BannerWithFrame.cpp index 54eaa88a65..0aabf05a8f 100644 --- a/stepmania/src/BannerWithFrame.cpp +++ b/stepmania/src/BannerWithFrame.cpp @@ -21,7 +21,7 @@ BannerWithFrame::BannerWithFrame() { - m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","evaluation banner frame") ); + m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","BannerWithFrame frame") ); m_Banner.SetCroppedSize( m_sprBannerFrame.GetUnzoomedWidth()-6, m_sprBannerFrame.GetUnzoomedHeight()-6 ); this->AddChild( &m_Banner ); diff --git a/stepmania/src/Combo.cpp b/stepmania/src/Combo.cpp index ba5cefaf0d..40294e3320 100644 --- a/stepmania/src/Combo.cpp +++ b/stepmania/src/Combo.cpp @@ -53,7 +53,7 @@ Combo::Combo() Reset(); - m_sprCombo.Load( THEME->GetPathTo("Graphics", "gameplay combo label") ); + m_sprCombo.Load( THEME->GetPathTo("Graphics", "Combo label") ); m_sprCombo.EnableShadow( true ); m_sprCombo.StopAnimating(); m_sprCombo.SetXY( LABEL_X, LABEL_Y ); @@ -61,7 +61,7 @@ Combo::Combo() m_sprCombo.SetVertAlign( (Actor::VertAlign)(int)LABEL_VERT_ALIGN ); this->AddChild( &m_sprCombo ); - m_textComboNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay combo numbers") ); + m_textComboNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","Combo numbers") ); m_textComboNumber.EnableShadow( true ); m_textComboNumber.SetXY( NUMBER_X, NUMBER_Y ); m_textComboNumber.SetHorizAlign( (Actor::HorizAlign)(int)NUMBER_HORIZ_ALIGN ); @@ -95,7 +95,7 @@ void Combo::SetScore( TapNoteScore score, int iNumNotesInThisRow, Inventory* pIn case TNS_PERFECT: m_iCurComboOfPerfects += iNumNotesInThisRow; - if( rand() < 0.1f && m_iCurComboOfPerfects>=150 && (m_iCurComboOfPerfects%150)==0 && !GAMESTATE->m_bDemonstration ) + if( rand() < 0.1f && m_iCurComboOfPerfects>=150 && (m_iCurComboOfPerfects%150)==0 && !GAMESTATE->m_bDemonstrationOrJukebox ) SCREENMAN->SendMessageToTopScreen( SM_BeginToasty, 0 ); break; default: diff --git a/stepmania/src/CourseContentsList.h b/stepmania/src/CourseContentsList.h index 88485153e3..8401f14933 100644 --- a/stepmania/src/CourseContentsList.h +++ b/stepmania/src/CourseContentsList.h @@ -11,7 +11,7 @@ ----------------------------------------------------------------------------- */ -#include "FootMeter.h" +#include "DifficultyMeter.h" #include "BitmapText.h" #include "TextBanner.h" #include "ActorFrame.h" diff --git a/stepmania/src/CourseEntryDisplay.h b/stepmania/src/CourseEntryDisplay.h index 9dbdf66c57..abe5030b95 100644 --- a/stepmania/src/CourseEntryDisplay.h +++ b/stepmania/src/CourseEntryDisplay.h @@ -11,12 +11,12 @@ ----------------------------------------------------------------------------- */ -#include "FootMeter.h" #include "BitmapText.h" #include "TextBanner.h" #include "ActorFrame.h" #include "Sprite.h" #include "Quad.h" +#include "GameConstantsAndTypes.h" class Course; class Song; struct Notes; diff --git a/stepmania/src/FootMeter.cpp b/stepmania/src/DifficultyMeter.cpp similarity index 77% rename from stepmania/src/FootMeter.cpp rename to stepmania/src/DifficultyMeter.cpp index 4a039e1327..417081bafa 100644 --- a/stepmania/src/FootMeter.cpp +++ b/stepmania/src/DifficultyMeter.cpp @@ -1,7 +1,7 @@ #include "global.h" /* ----------------------------------------------------------------------------- - Class: FootMeter + Class: DifficultyMeter Desc: See header. @@ -10,7 +10,7 @@ ----------------------------------------------------------------------------- */ -#include "FootMeter.h" +#include "DifficultyMeter.h" #include "RageUtil.h" #include "GameConstantsAndTypes.h" #include "PrefsManager.h" @@ -23,19 +23,19 @@ const int NUM_FEET_IN_METER = 10; const int GLOW_IF_METER_GREATER_THAN = 9; -FootMeter::FootMeter() +DifficultyMeter::DifficultyMeter() { - BitmapText::LoadFromTextureAndChars( THEME->GetPathTo("Graphics","select music meter 2x1"), "10" ); + BitmapText::LoadFromTextureAndChars( THEME->GetPathTo("Graphics","DifficultyMeter bar 2x1"), "10" ); SetFromNotes( NULL ); } -void FootMeter::SetFromNotes( Notes* pNotes ) +void DifficultyMeter::SetFromNotes( Notes* pNotes ) { if( pNotes != NULL ) { SetDiffuse( RageColor(1,1,1,1) ); - SetNumFeet( pNotes->GetMeter() ); + SetMeter( pNotes->GetMeter() ); if( pNotes->GetMeter() > GLOW_IF_METER_GREATER_THAN ) this->SetEffectGlowShift(); else @@ -47,18 +47,18 @@ void FootMeter::SetFromNotes( Notes* pNotes ) { this->SetEffectNone(); SetDiffuse( RageColor(0.8f,0.8f,0.8f,1) ); - SetNumFeet( 0 ); + SetMeter( 0 ); } } -void FootMeter::SetNumFeet( int iNumFeet ) +void DifficultyMeter::SetMeter( int iMeter ) { CString sNewText; int f; for( f=0; fGetPathTo("Graphics",ssprintf("edit menu %s",(i==0?"left":"right"))) ); + m_sprArrows[i].Load( THEME->GetPathTo("Graphics",ssprintf("EditMenu %s",(i==0?"left":"right"))) ); m_sprArrows[i].SetX( ARROWS_X(i) ); this->AddChild( &m_sprArrows[i] ); } @@ -98,8 +98,8 @@ EditMenu::EditMenu() this->AddChild( &m_SourceMeter ); - m_soundChangeRow.Load( THEME->GetPathTo("sounds","edit menu row") ); - m_soundChangeValue.Load( THEME->GetPathTo("sounds","edit menu value") ); + m_soundChangeRow.Load( THEME->GetPathTo("sounds","EditMenu row") ); + m_soundChangeValue.Load( THEME->GetPathTo("sounds","EditMenu value") ); // fill in data structures diff --git a/stepmania/src/EditMenu.h b/stepmania/src/EditMenu.h index 14824cc5e3..2496edaeb0 100644 --- a/stepmania/src/EditMenu.h +++ b/stepmania/src/EditMenu.h @@ -16,7 +16,7 @@ #include "Banner.h" #include "TextBanner.h" #include "GameConstantsAndTypes.h" -#include "FootMeter.h" +#include "DifficultyMeter.h" #include "RandomSample.h" @@ -109,8 +109,8 @@ private: Banner m_GroupBanner; Banner m_SongBanner; TextBanner m_SongTextBanner; - FootMeter m_Meter; - FootMeter m_SourceMeter; + DifficultyMeter m_Meter; + DifficultyMeter m_SourceMeter; CStringArray m_sGroups; vector m_NotesTypes; diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index e1bb53c76d..08ac30c6c5 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -74,7 +74,7 @@ void GameState::Reset() m_SongSortOrder = SORT_GROUP; m_PlayMode = PLAY_MODE_INVALID; m_bEditing = false; - m_bDemonstration = false; + m_bDemonstrationOrJukebox = false; m_bJukeboxUsesModifiers = false; m_iCurrentStageIndex = 0; m_bAllow2ndExtraStage = true; @@ -181,7 +181,7 @@ bool GameState::IsExtraStage2() CString GameState::GetStageText() { - if( m_bDemonstration ) return STAGE_TEXT_DEMO; + if( m_bDemonstrationOrJukebox ) return STAGE_TEXT_DEMO; else if( IsFinalStage() ) return STAGE_TEXT_FINAL; else if( IsExtraStage() ) return STAGE_TEXT_EXTRA1; else if( IsExtraStage2() ) return STAGE_TEXT_EXTRA2; @@ -210,7 +210,7 @@ CString GameState::GetStageText() RageColor GameState::GetStageColor() { - if( m_bDemonstration ) return STAGE_COLOR_DEMO; + if( m_bDemonstrationOrJukebox ) return STAGE_COLOR_DEMO; else if( m_PlayMode==PLAY_MODE_NONSTOP ) return STAGE_COLOR_NONSTOP; else if( m_PlayMode==PLAY_MODE_ONI ) return STAGE_COLOR_ONI; else if( m_PlayMode==PLAY_MODE_ENDLESS ) return STAGE_COLOR_ENDLESS; diff --git a/stepmania/src/GameState.h b/stepmania/src/GameState.h index 652c7e0c89..cc0946cbf1 100644 --- a/stepmania/src/GameState.h +++ b/stepmania/src/GameState.h @@ -73,7 +73,7 @@ public: Difficulty m_PreferredDifficulty[NUM_PLAYERS]; SongSortOrder m_SongSortOrder; // used by MusicWheel bool m_bEditing; // NoteField does special stuff when this is true - bool m_bDemonstration; // ScreenGameplay does special stuff when this is true + bool m_bDemonstrationOrJukebox; // ScreenGameplay does special stuff when this is true bool m_bJukeboxUsesModifiers; int m_iCurrentStageIndex; // incremented on Eval screen. For a Course, this is always 0 diff --git a/stepmania/src/GradeDisplay.cpp b/stepmania/src/GradeDisplay.cpp index fb739dbc60..4d89b43643 100644 --- a/stepmania/src/GradeDisplay.cpp +++ b/stepmania/src/GradeDisplay.cpp @@ -26,7 +26,7 @@ const float GRADES_TO_SCROLL = NUM_GRADE_FRAMES*4; GradeDisplay::GradeDisplay() { - RageTextureID id( THEME->GetPathTo("Graphics",ssprintf("evaluation grades 1x%d",NUM_GRADE_FRAMES)) ); + RageTextureID id( THEME->GetPathTo("Graphics",ssprintf("GradeDisplay grades 1x%d",NUM_GRADE_FRAMES)) ); id.bStretch = true; Load( id ); StopAnimating(); diff --git a/stepmania/src/GrooveRadar.cpp b/stepmania/src/GrooveRadar.cpp index 9af84f7fde..076d74a0ca 100644 --- a/stepmania/src/GrooveRadar.cpp +++ b/stepmania/src/GrooveRadar.cpp @@ -36,7 +36,7 @@ GrooveRadar::GrooveRadar() for( int c=0; cGetPathTo("Graphics","select music radar labels 1x5") ); + m_sprRadarLabels[c].Load( THEME->GetPathTo("Graphics","GrooveRadar labels 1x5") ); m_sprRadarLabels[c].StopAnimating(); m_sprRadarLabels[c].SetState( c ); m_sprRadarLabels[c].SetXY( LABEL_OFFSET_X(c), LABEL_OFFSET_Y(c) ); @@ -84,7 +84,7 @@ void GrooveRadar::TweenOffScreen() GrooveRadar::GrooveRadarValueMap::GrooveRadarValueMap() { - m_sprRadarBase.Load( THEME->GetPathTo("Graphics","select music radar base") ); + m_sprRadarBase.Load( THEME->GetPathTo("Graphics","GrooveRadar base") ); this->AddChild( &m_sprRadarBase ); for( int p=0; pGetPathTo("Graphics","select group button") ); + m_sprButton[i].Load( THEME->GetPathTo("Graphics","GroupList button") ); m_sprButton[i].SetXY( BUTTON_X, BUTTON_START_Y + i*BUTTON_SPACING_Y ); this->AddChild( &m_sprButton[i] ); this->AddChild( &m_screenLabels[i] ); @@ -30,7 +30,7 @@ void GroupList::DoneAddingGroups() for( i=0; iGetPathTo("Fonts","select group button label") ); + m_screenLabels[i].LoadFromFont( THEME->GetPathTo("Fonts","GroupList label") ); m_screenLabels[i].SetXY( BUTTON_X, BUTTON_START_Y + i*BUTTON_SPACING_Y ); m_screenLabels[i].SetShadowLength( 2 ); diff --git a/stepmania/src/HoldJudgment.cpp b/stepmania/src/HoldJudgment.cpp index 497dc4153a..e80bae4fb4 100644 --- a/stepmania/src/HoldJudgment.cpp +++ b/stepmania/src/HoldJudgment.cpp @@ -17,73 +17,58 @@ #include "ThemeManager.h" -CachedThemeMetric OK_ZOOM_X ("HoldJudgment","OKZoomX"); -CachedThemeMetric OK_ZOOM_Y ("HoldJudgment","OKZoomY"); -CachedThemeMetric TWEEN_SECONDS ("HoldJudgment","TweenSeconds"); -CachedThemeMetric SHOW_SECONDS ("HoldJudgment","ShowSeconds"); +CachedThemeMetric OK_COMMAND ("HoldJudgment","OKCommand"); +CachedThemeMetric NG_COMMAND ("HoldJudgment","NGCommand"); HoldJudgment::HoldJudgment() { - OK_ZOOM_X.Refresh(); - OK_ZOOM_Y.Refresh(); - TWEEN_SECONDS.Refresh(); - SHOW_SECONDS.Refresh(); + OK_COMMAND.Refresh(); + NG_COMMAND.Refresh(); - m_fShowCountdown = 0; - m_sprJudgment.Load( THEME->GetPathTo("Graphics","gameplay hold Judgment 1x2") ); + m_sprJudgment.Load( THEME->GetPathTo("Graphics","HoldJudgment 1x2") ); m_sprJudgment.StopAnimating(); - m_sprJudgment.EnableShadow( true ); + Reset(); this->AddChild( &m_sprJudgment ); } void HoldJudgment::Update( float fDeltaTime ) { ActorFrame::Update( fDeltaTime ); - - m_fShowCountdown -= fDeltaTime; - if( m_fShowCountdown < 0 ) - m_fShowCountdown = 0; } void HoldJudgment::DrawPrimitives() { - if( m_fShowCountdown > 0 ) - { - ActorFrame::DrawPrimitives(); - } + ActorFrame::DrawPrimitives(); +} + +void HoldJudgment::Reset() +{ + m_sprJudgment.SetDiffuse( RageColor(1,1,1,0) ); + m_sprJudgment.SetXY( 0, 0 ); + m_sprJudgment.StopTweening(); + m_sprJudgment.SetEffectNone(); } void HoldJudgment::SetHoldJudgment( HoldNoteScore hns ) { //LOG->Trace( "Judgment::SetJudgment()" ); + Reset(); + switch( hns ) { - case HNS_NONE: m_sprJudgment.SetState( 0 ); break; - case HNS_OK: m_sprJudgment.SetState( 0 ); break; - case HNS_NG: m_sprJudgment.SetState( 1 ); break; - default: ASSERT( false ); - } - - m_fShowCountdown = SHOW_SECONDS; - - if( hns == HNS_NG ) - { - // falling down - m_sprJudgment.StopTweening(); - m_sprJudgment.SetY( -10 ); - m_sprJudgment.SetZoom( 1.0f ); - m_sprJudgment.BeginTweening( SHOW_SECONDS ); - m_sprJudgment.SetTweenY( 10 ); - } - else // hns == HNS_OK - { - // zooming out - m_sprJudgment.StopTweening(); - m_sprJudgment.SetZoomX( OK_ZOOM_X ); - m_sprJudgment.SetZoomY( OK_ZOOM_Y ); - m_sprJudgment.BeginTweening( TWEEN_SECONDS ); - m_sprJudgment.SetTweenZoom( 1.0f ); + case HNS_NONE: + ASSERT(0); + case HNS_OK: + m_sprJudgment.SetState( 0 ); + m_sprJudgment.Command( OK_COMMAND ); + break; + case HNS_NG: + m_sprJudgment.SetState( 1 ); + m_sprJudgment.Command( NG_COMMAND ); + break; + default: + ASSERT(0); } } diff --git a/stepmania/src/HoldJudgment.h b/stepmania/src/HoldJudgment.h index 6eaf6d4a7a..102f9a4cdf 100644 --- a/stepmania/src/HoldJudgment.h +++ b/stepmania/src/HoldJudgment.h @@ -22,13 +22,15 @@ class HoldJudgment : public ActorFrame { public: HoldJudgment(); - void SetHoldJudgment( HoldNoteScore hns ); + virtual void Update( float fDeltaTime ); virtual void DrawPrimitives(); + void Reset(); + void SetHoldJudgment( HoldNoteScore hns ); + protected: Sprite m_sprJudgment; - float m_fShowCountdown; }; #endif diff --git a/stepmania/src/Judgment.cpp b/stepmania/src/Judgment.cpp index 4d136a63a4..6c70e9c1ed 100644 --- a/stepmania/src/Judgment.cpp +++ b/stepmania/src/Judgment.cpp @@ -18,109 +18,81 @@ #include "ThemeManager.h" -CachedThemeMetric WORD_X ("Judgment","WordX"); -CachedThemeMetric WORD_Y ("Judgment","WordY"); -CachedThemeMetric MARVELOUS_ZOOM ("Judgment","MarvelousZoom"); -CachedThemeMetric PERFECT_ZOOM ("Judgment","PerfectZoom"); -CachedThemeMetric GREAT_ZOOM ("Judgment","GreatZoom"); -CachedThemeMetric GOOD_ZOOM ("Judgment","GoodZoom"); -CachedThemeMetric BOO_ZOOM ("Judgment","BooZoom"); -CachedThemeMetric J_TWEEN_SECONDS ("Judgment","TweenSeconds"); -CachedThemeMetric J_SHOW_SECONDS ("Judgment","ShowSeconds"); +CachedThemeMetric MARVELOUS_COMMAND ("Judgment","MarvelousCommand"); +CachedThemeMetric PERFECT_COMMAND ("Judgment","PerfectCommand"); +CachedThemeMetric GREAT_COMMAND ("Judgment","GreatCommand"); +CachedThemeMetric GOOD_COMMAND ("Judgment","GoodCommand"); +CachedThemeMetric BOO_COMMAND ("Judgment","BooCommand"); +CachedThemeMetric MISS_COMMAND ("Judgment","MissCommand"); Judgment::Judgment() { - WORD_X.Refresh(); - WORD_Y.Refresh(); - MARVELOUS_ZOOM.Refresh(); - PERFECT_ZOOM.Refresh(); - GREAT_ZOOM.Refresh(); - GOOD_ZOOM.Refresh(); - BOO_ZOOM.Refresh(); - J_TWEEN_SECONDS.Refresh(); - J_SHOW_SECONDS.Refresh(); + MARVELOUS_COMMAND.Refresh(); + PERFECT_COMMAND.Refresh(); + GREAT_COMMAND.Refresh(); + GOOD_COMMAND.Refresh(); + BOO_COMMAND.Refresh(); + MISS_COMMAND.Refresh(); - m_fShowCountdown = 0; - m_sprJudgment.Load( THEME->GetPathTo("Graphics","gameplay Judgment 1x6") ); - m_sprJudgment.SetXY( WORD_X, WORD_Y ); + m_sprJudgment.Load( THEME->GetPathTo("Graphics","Judgment 1x6") ); m_sprJudgment.StopAnimating(); - m_sprJudgment.EnableShadow( true ); + Reset(); this->AddChild( &m_sprJudgment ); } void Judgment::Update( float fDeltaTime ) { ActorFrame::Update( fDeltaTime ); - - m_fShowCountdown -= fDeltaTime; - if( m_fShowCountdown < 0 ) - m_fShowCountdown = 0; } void Judgment::DrawPrimitives() { - if( m_fShowCountdown > 0 ) - { - ActorFrame::DrawPrimitives(); - } + ActorFrame::DrawPrimitives(); } +void Judgment::Reset() +{ + m_sprJudgment.SetDiffuse( RageColor(1,1,1,0) ); + m_sprJudgment.SetXY( 0, 0 ); + m_sprJudgment.StopTweening(); + m_sprJudgment.SetEffectNone(); +} + void Judgment::SetJudgment( TapNoteScore score ) { //LOG->Trace( "Judgment::SetJudgment()" ); + Reset(); + switch( score ) { - case TNS_MARVELOUS: m_sprJudgment.SetState( 0 ); break; - case TNS_PERFECT: m_sprJudgment.SetState( 1 ); break; - case TNS_GREAT: m_sprJudgment.SetState( 2 ); break; - case TNS_GOOD: m_sprJudgment.SetState( 3 ); break; - case TNS_BOO: m_sprJudgment.SetState( 4 ); break; - case TNS_MISS: m_sprJudgment.SetState( 5 ); break; - default: ASSERT(0); + case TNS_MARVELOUS: + m_sprJudgment.SetState( 0 ); + m_sprJudgment.Command( MARVELOUS_COMMAND ); + break; + case TNS_PERFECT: + m_sprJudgment.SetState( 1 ); + m_sprJudgment.Command( PERFECT_COMMAND ); + break; + case TNS_GREAT: + m_sprJudgment.SetState( 2 ); + m_sprJudgment.Command( GREAT_COMMAND ); + break; + case TNS_GOOD: + m_sprJudgment.SetState( 3 ); + m_sprJudgment.Command( GOOD_COMMAND ); + break; + case TNS_BOO: + m_sprJudgment.SetState( 4 ); + m_sprJudgment.Command( BOO_COMMAND ); + break; + case TNS_MISS: + m_sprJudgment.SetState( 5 ); + m_sprJudgment.Command( MISS_COMMAND ); + break; + default: + ASSERT(0); } - - m_fShowCountdown = J_SHOW_SECONDS; - - m_sprJudgment.SetEffectNone(); - m_sprJudgment.StopTweening(); - - if( score == TNS_MISS ) - { - // falling down - m_sprJudgment.SetY( -20 ); - m_sprJudgment.BeginTweening( J_SHOW_SECONDS ); - m_sprJudgment.SetTweenY( 20 ); - } - else if( score == TNS_BOO ) - { - // vibrate - m_sprJudgment.SetY( 0 ); - m_sprJudgment.SetZoom( 1.0f ); - m_sprJudgment.SetEffectVibrate(); - } - else - { - // zooming out - float fZoom; - switch( score ) - { - case TNS_MARVELOUS: fZoom = MARVELOUS_ZOOM; break; - case TNS_PERFECT: fZoom = PERFECT_ZOOM; break; - case TNS_GREAT: fZoom = GREAT_ZOOM; break; - case TNS_GOOD: fZoom = GOOD_ZOOM; break; - default: ASSERT(0); fZoom = 1; break; - } - m_sprJudgment.SetY( 0 ); - m_sprJudgment.SetZoom( fZoom ); - m_sprJudgment.BeginTweening( J_TWEEN_SECONDS ); - m_sprJudgment.SetTweenZoom( 1 ); - } - - if( score == TNS_MARVELOUS ) - m_sprJudgment.SetEffectGlowBlink(0.05f, RageColor(1,1,1,0), RageColor(1,1,1,0.5f)); - else - m_sprJudgment.SetEffectNone(); } diff --git a/stepmania/src/Judgment.h b/stepmania/src/Judgment.h index 427b125ec8..02387b7d46 100644 --- a/stepmania/src/Judgment.h +++ b/stepmania/src/Judgment.h @@ -23,14 +23,15 @@ class Judgment : public ActorFrame public: Judgment(); virtual ~Judgment() { } - void SetJudgment( TapNoteScore score ); + virtual void Update( float fDeltaTime ); virtual void DrawPrimitives(); - virtual void Reset() { m_fShowCountdown = .0f; } + + void Reset(); + void SetJudgment( TapNoteScore score ); protected: Sprite m_sprJudgment; - float m_fShowCountdown; }; #endif diff --git a/stepmania/src/JukeboxMenu.h b/stepmania/src/JukeboxMenu.h index a77f1dd4aa..3268c388b4 100644 --- a/stepmania/src/JukeboxMenu.h +++ b/stepmania/src/JukeboxMenu.h @@ -15,7 +15,6 @@ #include "Banner.h" #include "TextBanner.h" #include "GameConstantsAndTypes.h" -#include "FootMeter.h" #include "RandomSample.h" #include "Style.h" diff --git a/stepmania/src/LifeMeterBar.cpp b/stepmania/src/LifeMeterBar.cpp index b359fed430..79e94aea1a 100644 --- a/stepmania/src/LifeMeterBar.cpp +++ b/stepmania/src/LifeMeterBar.cpp @@ -58,13 +58,13 @@ public: CString sGraphicPath; - sGraphicPath = ssprintf("gameplay %slifemeter stream normal", bExtra?"extra ":""); + sGraphicPath = ssprintf("LifeMeterBar %snormal", bExtra?"extra ":""); m_sprStreamNormal.Load( THEME->GetPathTo("Graphics", sGraphicPath) ); - sGraphicPath = ssprintf("gameplay %slifemeter stream hot", bExtra?"extra ":""); + sGraphicPath = ssprintf("LifeMeterBar %shot", bExtra?"extra ":""); m_sprStreamHot.Load( THEME->GetPathTo("Graphics", sGraphicPath) ); - sGraphicPath = ssprintf("gameplay %slifemeter bar", bExtra?"extra ":""); + sGraphicPath = ssprintf("LifeMeterBar %sframe", bExtra?"extra ":""); m_sprFrame.Load( THEME->GetPathTo("Graphics", sGraphicPath) ); } diff --git a/stepmania/src/LifeMeterBattery.cpp b/stepmania/src/LifeMeterBattery.cpp index d8d6907cc5..0ac5ce83e5 100644 --- a/stepmania/src/LifeMeterBattery.cpp +++ b/stepmania/src/LifeMeterBattery.cpp @@ -39,8 +39,8 @@ LifeMeterBattery::LifeMeterBattery() m_fBatteryBlinkTime = 0; - m_soundGainLife.Load( THEME->GetPathTo("Sounds","gameplay oni gain life") ); - m_soundLoseLife.Load( THEME->GetPathTo("Sounds","gameplay oni lose life") ); + m_soundGainLife.Load( THEME->GetPathTo("Sounds","LifeMeterBattery gain") ); + m_soundLoseLife.Load( THEME->GetPathTo("Sounds","LifeMeterBattery lose") ); } void LifeMeterBattery::Load( PlayerNumber pn ) @@ -49,34 +49,27 @@ void LifeMeterBattery::Load( PlayerNumber pn ) bool bPlayerEnabled = GAMESTATE->IsPlayerEnabled(pn); - m_sprFrame.Load( THEME->GetPathTo("Graphics","gameplay lifemeter oni") ); + m_sprFrame.Load( THEME->GetPathTo("Graphics","LifeMeterBattery frame") ); this->AddChild( &m_sprFrame ); - m_sprBattery.Load( THEME->GetPathTo("Graphics","gameplay lifemeter battery") ); + m_sprBattery.Load( THEME->GetPathTo("Graphics","LifeMeterBattery lives 1x4") ); m_sprBattery.StopAnimating(); if( bPlayerEnabled ) this->AddChild( &m_sprBattery ); - m_textNumLives.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery life numbers") ); + m_textNumLives.LoadFromNumbers( THEME->GetPathTo("Numbers","LifeMeterBattery life numbers") ); m_textNumLives.SetDiffuse( RageColor(1,1,1,1) ); m_textNumLives.EnableShadow( false ); if( bPlayerEnabled ) this->AddChild( &m_textNumLives ); + m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","LifeMeterBattery percent numbers") ); + m_textPercent.EnableShadow( false ); + m_textPercent.SetZoom( 0.7f ); if(PREFSMAN->m_bDancePointsForOni) - { - m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery dance point numbers") ); - m_textPercent.EnableShadow( false ); - m_textPercent.SetZoom( 0.7f ); m_textPercent.SetText( " " ); - } else - { - m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery percent numbers") ); - m_textPercent.EnableShadow( false ); - m_textPercent.SetZoom( 0.7f ); m_textPercent.SetText( "00.0%" ); - } if( bPlayerEnabled ) this->AddChild( &m_textPercent ); diff --git a/stepmania/src/MenuElements.cpp b/stepmania/src/MenuElements.cpp index b390ba5ecf..6b55507d98 100644 --- a/stepmania/src/MenuElements.cpp +++ b/stepmania/src/MenuElements.cpp @@ -24,263 +24,120 @@ #include "ThemeManager.h" -#define TOP_EDGE_X THEME->GetMetricF("MenuElements","TopEdgeX") -#define TOP_EDGE_Y THEME->GetMetricF("MenuElements","TopEdgeY") -#define BOTTOM_EDGE_X THEME->GetMetricF("MenuElements","BottomEdgeX") -#define BOTTOM_EDGE_Y THEME->GetMetricF("MenuElements","BottomEdgeY") -#define STYLE_ICON_X THEME->GetMetricF("MenuElements","StyleIconX") -#define STYLE_ICON_Y THEME->GetMetricF("MenuElements","StyleIconY") -#define TIMER_X THEME->GetMetricF("MenuElements","TimerX") -#define TIMER_Y THEME->GetMetricF("MenuElements","TimerY") -#define HELP_X THEME->GetMetricF("MenuElements","HelpX") -#define HELP_Y THEME->GetMetricF("MenuElements","HelpY") +#define HEADER_ON_COMMAND THEME->GetMetric("MenuElements","HeaderOnCommand") +#define HEADER_OFF_COMMAND THEME->GetMetric("MenuElements","HeaderOffCommand") +#define FOOTER_ON_COMMAND THEME->GetMetric("MenuElements","FooterOnCommand") +#define FOOTER_OFF_COMMAND THEME->GetMetric("MenuElements","FooterOffCommand") +#define STYLE_ICON_ON_COMMAND THEME->GetMetric("MenuElements","StyleIconOnCommand") +#define STYLE_ICON_OFF_COMMAND THEME->GetMetric("MenuElements","StyleIconOffCommand") +#define TIMER_ON_COMMAND THEME->GetMetric("MenuElements","TimerOnCommand") +#define TIMER_OFF_COMMAND THEME->GetMetric("MenuElements","TimerOffCommand") +#define HELP_ON_COMMAND THEME->GetMetric("MenuElements","HelpOnCommand") +#define HELP_OFF_COMMAND THEME->GetMetric("MenuElements","HelpOffCommand") MenuElements::MenuElements() { - this->AddChild( &m_sprTopEdge ); - this->AddChild( &m_sprStyleIcon ); - this->AddChild( &m_MenuTimer ); - this->AddChild( &m_sprBottomEdge ); - this->AddChild( &m_Background ); - this->AddChild( &m_quadBrightness ); - this->AddChild( &m_textHelp ); - - m_KeepAlive.SetOpened(); - this->AddChild( &m_KeepAlive ); - - m_Wipe.SetOpened(); - this->AddChild( &m_Wipe ); - - this->AddChild( &m_Invisible ); } void MenuElements::StealthTimer( int iActive ) { - m_MenuTimer.StealthTimer( iActive ); // go a bit deeper... get rid of the sound... - if (iActive == 0) // if we wanna hide the timer... + if (iActive == 0) // leave it on screen { - m_MenuTimer.SetXY( TIMER_X, TIMER_Y ); // set it off-screen +// m_MenuTimer.SetXY( MENU_TIMER_X, MENU_TIMER_Y ); // set it on-screen } - else if (iActive == 1) // we wanna hide the timer + else if (iActive == 1) // hide the timer { - m_MenuTimer.SetXY( 999.0f, 999.0f ); // otherwise position it off-screen + // otherwise position it off-screen + m_MenuTimer.StopTweening(); + m_MenuTimer.SetXY( 1000, 1000 ); } - // else... take no action :) } -void MenuElements::Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds ) +void MenuElements::Load( CString sClassName, bool bEnableTimer, bool bLoadStyleIcon ) { LOG->Trace( "MenuElements::MenuElements()" ); + ASSERT( this->m_SubActors.empty() ); // don't call Load twice! - if( sBackgroundPath != "" ) - m_Background.LoadFromAniDir( sBackgroundPath ); + m_sClassName = sClassName; - m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) ); - m_quadBrightness.StretchTo( RectI(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",m_sClassName+" background") ); + this->AddChild( &m_Background ); - m_sprTopEdge.Load( sTopEdgePath ); - m_sprTopEdge.SetXY( TOP_EDGE_X, TOP_EDGE_Y ); - - m_sprStyleIcon.Load( THEME->GetPathTo("Graphics",ssprintf("menu style icons %s",GAMESTATE->GetCurrentGameDef()->m_szName)) ); - m_sprStyleIcon.StopAnimating(); - m_sprStyleIcon.SetXY( STYLE_ICON_X, STYLE_ICON_Y ); - if( GAMESTATE->m_CurStyle == STYLE_INVALID || !bShowStyleIcon ) - m_sprStyleIcon.SetDiffuse( RageColor(1,1,1,0) ); - else + m_sprHeader.Load( THEME->GetPathTo("Graphics",m_sClassName+" header") ); + m_sprHeader.Command( HEADER_ON_COMMAND ); + this->AddChild( &m_sprHeader ); + + if( bLoadStyleIcon && GAMESTATE->m_CurStyle != STYLE_INVALID ) { - int iRowNum = GetStyleIndexRelativeToGame( GAMESTATE->m_CurGame, GAMESTATE->m_CurStyle ); - m_sprStyleIcon.SetState( iRowNum*2+GAMESTATE->m_MasterPlayerNumber ); + CString sIconFileName = ssprintf("MenuElements icon %s", GAMESTATE->GetCurrentStyleDef()->m_szName ); + m_sprStyleIcon.Load( THEME->GetPathTo("Graphics",sIconFileName) ); + m_sprStyleIcon.StopAnimating(); + m_sprStyleIcon.Command( STYLE_ICON_ON_COMMAND ); + this->AddChild( &m_sprStyleIcon ); } - - m_MenuTimer.SetXY( TIMER_X, TIMER_Y ); - if( !bTimerEnabled || !PREFSMAN->m_bMenuTimer || GAMESTATE->m_bEditing ) + + m_MenuTimer.Command( TIMER_ON_COMMAND ); + if( bEnableTimer && PREFSMAN->m_bMenuTimer && !GAMESTATE->m_bEditing ) + { + m_MenuTimer.SetTimer( THEME->GetMetricI(m_sClassName,"TimerSeconds") ); + } + else { m_MenuTimer.SetTimer( 99 ); m_MenuTimer.Update( 0 ); m_MenuTimer.StopTimer(); } - else - m_MenuTimer.SetTimer( iTimerSeconds ); + this->AddChild( &m_MenuTimer ); - m_sprBottomEdge.Load( THEME->GetPathTo("Graphics","menu bottom edge") ); - m_sprBottomEdge.SetXY( BOTTOM_EDGE_X, BOTTOM_EDGE_Y ); + m_sprFooter.Load( THEME->GetPathTo("Graphics",m_sClassName+" footer") ); + m_sprFooter.Command( FOOTER_ON_COMMAND ); + this->AddChild( &m_sprFooter ); - m_textHelp.SetXY( HELP_X, HELP_Y ); + m_textHelp.Command( HELP_ON_COMMAND ); CStringArray asHelpTips; - split( sHelpText, "\n", asHelpTips ); + split( THEME->GetMetric(m_sClassName,"HelpText"), "\n", asHelpTips ); m_textHelp.SetTips( asHelpTips ); - m_textHelp.SetZoom( 0.5f ); + this->AddChild( &m_textHelp ); - m_soundSwoosh.Load( THEME->GetPathTo("Sounds","menu swoosh") ); - m_soundBack.Load( THEME->GetPathTo("Sounds","menu back") ); + m_In.Load( THEME->GetPathTo("BGAnimations",m_sClassName+" in") ); + this->AddChild( &m_In ); + + m_Out.Load( THEME->GetPathTo("BGAnimations",m_sClassName+" out") ); + this->AddChild( &m_Out ); + + m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); + this->AddChild( &m_Back ); + + + m_soundBack.Load( THEME->GetPathTo("Sounds","Common back") ); + + + m_In.StartTransitioning( SM_None ); } -void MenuElements::TweenTopLayerOnScreen(float tm) -{ - if(tm == -1) - tm = MENU_ELEMENTS_TWEEN_TIME; - - vector apActorsInTopFrame; - apActorsInTopFrame.push_back( &m_sprTopEdge ); - apActorsInTopFrame.push_back( &m_sprStyleIcon ); - apActorsInTopFrame.push_back( &m_MenuTimer ); - for( unsigned i=0; iGetX(); - apActorsInTopFrame[i]->SetX( fOriginalX+SCREEN_WIDTH ); - apActorsInTopFrame[i]->BeginTweening( tm, TWEEN_SPRING ); - apActorsInTopFrame[i]->SetTweenX( fOriginalX ); - } - - float fOriginalZoom = m_textHelp.GetZoomY(); - m_textHelp.SetZoomY( 0 ); - m_textHelp.BeginTweening( tm/2 ); - m_textHelp.SetTweenZoomY( fOriginalZoom ); -} - -void MenuElements::TweenOnScreenFromMenu( ScreenMessage smSendWhenDone, bool bLeaveKeepAliveOn ) -{ - TweenTopLayerOnScreen(); - if( !bLeaveKeepAliveOn ) - m_KeepAlive.OpenWipingRight( smSendWhenDone ); - else - m_KeepAlive.SetClosed(); - m_soundSwoosh.Play(); -} - -void MenuElements::TweenTopLayerOffScreen(float tm) -{ -/* - This trick is neat, but there's a problem: fOriginalX may not be the settled - position--we might still be tweening, and if it's a bounce tween, it might be - left of center, which means fOriginalX+SCREEN_WIDTH won't actually take it - completely off-screen. fOriginalX+SCREEN_WIDTH*2 would, but that'd make the - bounce faster. SCREEN_WIDTH+SCREEN_WIDTH/2 would, but ignoring fOriginalX - will make each component tween off at a different rate ... - -glenn - vector apActorsInTopFrame; - apActorsInTopFrame.push_back( &m_sprTopEdge ); - apActorsInTopFrame.push_back( &m_sprStyleIcon ); - apActorsInTopFrame.push_back( &m_MenuTimer ); - for( unsigned i=0; iGetX(); - apActorsInTopFrame[i]->BeginTweening( MENU_ELEMENTS_TWEEN_TIME, TWEEN_BOUNCE_BEGIN ); - apActorsInTopFrame[i]->SetTweenX( fOriginalX+SCREEN_WIDTH ); - } - */ - - if(tm == -1) - tm = MENU_ELEMENTS_TWEEN_TIME; - - m_sprTopEdge.StopTweening(); - m_sprTopEdge.BeginTweening( tm, TWEEN_BOUNCE_BEGIN ); - m_sprTopEdge.SetTweenX( TOP_EDGE_X+SCREEN_WIDTH ); - - m_sprStyleIcon.StopTweening(); - m_sprStyleIcon.BeginTweening( tm, TWEEN_BOUNCE_BEGIN ); - m_sprStyleIcon.SetTweenX( STYLE_ICON_X+SCREEN_WIDTH ); - - m_MenuTimer.StopTweening(); - m_MenuTimer.BeginTweening( tm, TWEEN_BOUNCE_BEGIN ); - m_MenuTimer.SetTweenX( TIMER_X+SCREEN_WIDTH ); - - m_textHelp.StopTweening(); - m_textHelp.BeginTweening( tm/2 ); - m_textHelp.SetTweenZoomY( 0 ); -} - -void MenuElements::TweenOffScreenToMenu( ScreenMessage smSendWhenDone ) -{ - m_MenuTimer.StopTimer(); - TweenTopLayerOffScreen(); - if( !m_KeepAlive.IsClosed() ) - m_KeepAlive.CloseWipingRight( smSendWhenDone ); - else - SCREENMAN->SendMessageToTopScreen( smSendWhenDone, m_KeepAlive.GetTransitionTime() ); - m_soundSwoosh.Play(); -} - -void MenuElements::ImmedOnScreenFromMenu( bool bLeaveKeepAliveOn ) -{ - TweenTopLayerOnScreen(0); - Update(0); - - if( !bLeaveKeepAliveOn ) - m_KeepAlive.SetOpened(); - else - m_KeepAlive.SetClosed(); -} - -void MenuElements::ImmedOffScreenToMenu() -{ - m_MenuTimer.StopTimer(); - m_KeepAlive.SetClosed(); - - /* Remove the top layer immediately. */ - TweenTopLayerOffScreen(0); - - /* We need to do a null update after doing null tweens (tweens with zero time), - * or they'll show up in their default positions for a frame (since screens - * draw once before they're updated for the first time). */ - Update(0); -} - -void MenuElements::TweenBottomLayerOnScreen() -{ - float fOriginalY = m_sprBottomEdge.GetY(); - m_sprBottomEdge.SetY( fOriginalY + 100 ); - m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); - m_sprBottomEdge.SetTweenY( fOriginalY ); - - m_quadBrightness.SetDiffuse( RageColor(0,0,0,1) ); - m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); - m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,0) ); -} - -void MenuElements::TweenBottomLayerOffScreen() -{ - float fOriginalY = m_sprBottomEdge.GetY(); - m_sprBottomEdge.StopTweening(); - m_sprBottomEdge.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); - m_sprBottomEdge.SetTweenY( fOriginalY + 100 ); - - m_quadBrightness.SetDiffuse( RageColor(0,0,0,0) ); - m_quadBrightness.StopTweening(); - m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME*3/2.0f ); // sleep - m_quadBrightness.BeginTweening( MENU_ELEMENTS_TWEEN_TIME/2 ); // fade - m_quadBrightness.SetTweenDiffuse( RageColor(0,0,0,1) ); -} - -void MenuElements::TweenOnScreenFromBlack( ScreenMessage smSendWhenDone ) -{ - TweenTopLayerOnScreen(); - TweenBottomLayerOnScreen(); - //m_Wipe.OpenWipingRight( smSendWhenDone ); - m_soundSwoosh.Play(); -} - -void MenuElements::TweenOffScreenToBlack( ScreenMessage smSendWhenDone, bool bPlayBackSound ) +void MenuElements::StartTransitioning( ScreenMessage smSendWhenDone ) { + m_MenuTimer.SetTimer( 0 ); m_MenuTimer.StopTimer(); - if( !bPlayBackSound ) - { - TweenTopLayerOffScreen(); - TweenBottomLayerOffScreen(); - m_Invisible.SetTransitionTime( MENU_ELEMENTS_TWEEN_TIME*2 ); - m_Invisible.CloseWipingRight( smSendWhenDone ); - } - else - { - m_soundBack.Play(); - m_Wipe.CloseWipingLeft( smSendWhenDone ); - } + m_sprHeader.Command( HEADER_OFF_COMMAND ); + m_sprStyleIcon.Command( STYLE_ICON_OFF_COMMAND ); + m_MenuTimer.Command( TIMER_OFF_COMMAND ); + m_sprFooter.Command( FOOTER_OFF_COMMAND ); + m_textHelp.Command( HELP_OFF_COMMAND ); + + m_Out.StartTransitioning( smSendWhenDone ); +} + +void MenuElements::Back( ScreenMessage smSendWhenDone ) +{ + m_Back.StartTransitioning( smSendWhenDone ); + m_soundBack.Play(); } void MenuElements::DrawPrimitives() @@ -292,13 +149,14 @@ void MenuElements::DrawTopLayer() { BeginDraw(); - m_sprTopEdge.Draw(); + m_sprHeader.Draw(); m_sprStyleIcon.Draw(); m_MenuTimer.Draw(); - m_sprBottomEdge.Draw(); + m_sprFooter.Draw(); m_textHelp.Draw(); - m_KeepAlive.Draw(); - m_Wipe.Draw(); + m_In.Draw(); + m_Out.Draw(); + m_Back.Draw(); EndDraw(); } @@ -308,28 +166,11 @@ void MenuElements::DrawBottomLayer() BeginDraw(); m_Background.Draw(); - m_quadBrightness.Draw(); EndDraw(); } -void MenuElements::SetTimer( int iTimerSeconds ) +bool MenuElements::IsTransitioning() { - m_MenuTimer.SetTimer( iTimerSeconds ); + return m_In.IsTransitioning() || m_Out.IsTransitioning() || m_Back.IsTransitioning(); } - -void MenuElements::StartTimer() -{ - m_MenuTimer.StartTimer(); -} - -void MenuElements::StopTimer() -{ - m_MenuTimer.StopTimer(); -} - -void MenuElements::StallTimer() -{ - m_MenuTimer.StallTimer(); -} - diff --git a/stepmania/src/MenuElements.h b/stepmania/src/MenuElements.h index 309533bdf6..fb60f41d8e 100644 --- a/stepmania/src/MenuElements.h +++ b/stepmania/src/MenuElements.h @@ -19,9 +19,7 @@ #include "RandomSample.h" #include "TransitionFade.h" #include "MenuTimer.h" -#include "TransitionFadeWipe.h" -#include "TransitionKeepAlive.h" -#include "TransitionInvisible.h" +#include "TransitionBGAnimation.h" #include "TipDisplay.h" #include "BGAnimation.h" @@ -36,47 +34,33 @@ public: virtual void DrawPrimitives(); - void Load( CString sBackgroundPath, CString sTopEdgePath, CString sHelpText, bool bShowStyleIcon, bool bTimerEnabled, int iTimerSeconds ); - void SetTimer( int iTimerSeconds ); - void StartTimer(); - void StallTimer(); - void StopTimer(); + void Load( CString sClassName, bool bEnableTimer = true, bool bLoadStyleIcon = true ); void StealthTimer( int iActive ); + void DrawTopLayer(); void DrawBottomLayer(); - void TweenOnScreenFromMenu( ScreenMessage smSendWhenDone, bool bLeaveKeepAliveOn = false ); - void TweenOffScreenToMenu( ScreenMessage smSendWhenDone ); - void ImmedOnScreenFromMenu( bool bLeaveKeepAliveOn = false ); - void ImmedOffScreenToMenu(); + void StartTransitioning( ScreenMessage smSendWhenDone ); + void Back( ScreenMessage smSendWhenDone ); + bool IsTransitioning(); - void TweenOnScreenFromBlack( ScreenMessage smSendWhenDone ); - void TweenOffScreenToBlack( ScreenMessage smSendWhenDone, bool bPlayBackSound ); +public: // let owner tinker with these objects - bool IsClosing() { return m_Wipe.IsClosing() || m_KeepAlive.IsClosing() || m_Invisible.IsClosing(); }; + CString m_sClassName; -protected: - void TweenTopLayerOnScreen(float tm=-1); - void TweenTopLayerOffScreen(float tm=-1); + BGAnimation m_Background; - void TweenBottomLayerOnScreen(); - void TweenBottomLayerOffScreen(); - -public: - Sprite m_sprTopEdge; + Sprite m_sprHeader; Sprite m_sprStyleIcon; MenuTimer m_MenuTimer; - Sprite m_sprBottomEdge; - BGAnimation m_Background; - Quad m_quadBrightness; // for darkening the background + Sprite m_sprFooter; TipDisplay m_textHelp; - TransitionFadeWipe m_Wipe; // for going back - TransitionKeepAlive m_KeepAlive; // going back and forward - TransitionInvisible m_Invisible; // for going forward to Menu + TransitionBGAnimation m_In; + TransitionBGAnimation m_Out; + TransitionBGAnimation m_Back; - RageSound m_soundSwoosh; RageSound m_soundBack; }; diff --git a/stepmania/src/MenuTimer.cpp b/stepmania/src/MenuTimer.cpp index 56e665d93c..0d11187f12 100644 --- a/stepmania/src/MenuTimer.cpp +++ b/stepmania/src/MenuTimer.cpp @@ -27,8 +27,8 @@ MenuTimer::MenuTimer() m_fStallSeconds = 0; m_bTimerStopped = false; - m_textDigit1.LoadFromNumbers( THEME->GetPathTo("Numbers","menu timer numbers") ); - m_textDigit2.LoadFromNumbers( THEME->GetPathTo("Numbers","menu timer numbers") ); + m_textDigit1.LoadFromNumbers( THEME->GetPathTo("Numbers","MenuTimer numbers") ); + m_textDigit2.LoadFromNumbers( THEME->GetPathTo("Numbers","MenuTimer numbers") ); m_textDigit1.EnableShadow( false ); m_textDigit2.EnableShadow( false ); @@ -42,7 +42,7 @@ MenuTimer::MenuTimer() this->AddChild( &m_textDigit1 ); this->AddChild( &m_textDigit2 ); - m_soundBeep.Load( THEME->GetPathTo("Sounds","menu timer") ); + m_soundBeep.Load( THEME->GetPathTo("Sounds","MenuTimer tick") ); } void MenuTimer::StealthTimer( int iActive ) @@ -112,7 +112,12 @@ void MenuTimer::Update( float fDeltaTime ) float fRemainder = m_fSecondsLeft - (int)m_fSecondsLeft; float fDistFromNearestNumber = min( fRemainder, 1-fRemainder ); // this is between 0 and 0.5; - if( m_fSecondsLeft < 4.5f ) + if( m_fSecondsLeft == 0 ) + { + m_textDigit1.SetZoomX( 1 ); + m_textDigit2.SetZoomX( 1 ); + } + else if( m_fSecondsLeft < 4.5f ) { m_textDigit1.SetZoomX( min(1, fDistFromNearestNumber*8) ); m_textDigit2.SetZoomX( min(1, fDistFromNearestNumber*8) ); diff --git a/stepmania/src/MusicSortDisplay.cpp b/stepmania/src/MusicSortDisplay.cpp index 2cbf991732..c7b3723e8a 100644 --- a/stepmania/src/MusicSortDisplay.cpp +++ b/stepmania/src/MusicSortDisplay.cpp @@ -21,7 +21,7 @@ MusicSortDisplay::MusicSortDisplay() { - Load( THEME->GetPathTo("Graphics","music sort icons 1x4") ); + Load( THEME->GetPathTo("Graphics","MusicSortDisplay icons 1x4") ); StopAnimating(); } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index a135b60e20..e008cccee5 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -77,7 +77,7 @@ MusicWheel::MusicWheel() if( GAMESTATE->m_CurStyle == STYLE_INVALID ) GAMESTATE->m_CurStyle = STYLE_DANCE_SINGLE; - m_sprSelectionOverlay.Load( THEME->GetPathTo("Graphics","select music song highlight") ); + m_sprSelectionOverlay.Load( THEME->GetPathTo("Graphics","MusicWheel highlight") ); m_sprSelectionOverlay.SetXY( 0, 0 ); m_sprSelectionOverlay.SetDiffuse( RageColor(1,1,1,1) ); m_sprSelectionOverlay.SetEffectGlowShift( 1.0f, RageColor(1,1,1,0.4f), RageColor(1,1,1,1) ); @@ -88,11 +88,11 @@ MusicWheel::MusicWheel() this->AddChild( &m_ScrollBar ); /* We play a lot of this one, so precache it. */ - m_soundChangeMusic.Load( THEME->GetPathTo("Sounds","select music change"), true ); - m_soundChangeSort.Load( THEME->GetPathTo("Sounds","select music sort") ); - m_soundExpand.Load( THEME->GetPathTo("Sounds","select music expand") ); - m_soundStart.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundLocked.Load( THEME->GetPathTo("Sounds","select music locked") ); + m_soundChangeMusic.Load( THEME->GetPathTo("Sounds","MusicWheel change"), true ); + m_soundChangeSort.Load( THEME->GetPathTo("Sounds","MusicWheel sort") ); + m_soundExpand.Load( THEME->GetPathTo("Sounds","MusicWheel expand") ); + m_soundStart.Load( THEME->GetPathTo("Sounds","Common start") ); + m_soundLocked.Load( THEME->GetPathTo("Sounds","MusicWheel locked") ); // init m_mapGroupNameToBannerColor diff --git a/stepmania/src/MusicWheel.h b/stepmania/src/MusicWheel.h index f7087b4aa3..56a5f60882 100644 --- a/stepmania/src/MusicWheel.h +++ b/stepmania/src/MusicWheel.h @@ -21,7 +21,7 @@ #include "SmallGradeDisplay.h" #include "GameConstantsAndTypes.h" #include "MusicSortDisplay.h" -#include "MusicStatusDisplay.h" +#include "WheelNotifyIcon.h" #include "Screen.h" // for ScreenMessage #include "ScoreDisplayNormal.h" #include "ScrollBar.h" diff --git a/stepmania/src/MusicWheelItem.cpp b/stepmania/src/MusicWheelItem.cpp index c8daf94fb1..6b431301c6 100644 --- a/stepmania/src/MusicWheelItem.cpp +++ b/stepmania/src/MusicWheelItem.cpp @@ -48,7 +48,7 @@ WheelItemData::WheelItemData( WheelItemType wit, Song* pSong, const CString &sSe m_sSectionName = sSectionName; m_pCourse = pCourse; m_color = color; - m_Flags = MusicStatusDisplay::Flags(); + m_Flags = WheelNotifyIcon::Flags(); } @@ -57,25 +57,25 @@ WheelItemDisplay::WheelItemDisplay() data = NULL; m_fPercentGray = 0; - m_MusicStatusDisplay.SetXY( ICON_X, 0 ); + m_WheelNotifyIcon.SetXY( ICON_X, 0 ); m_TextBanner.SetHorizAlign( align_left ); m_TextBanner.SetXY( SONG_NAME_X, 0 ); - m_sprSongBar.Load( THEME->GetPathTo("Graphics","select music song bar") ); + m_sprSongBar.Load( THEME->GetPathTo("Graphics","MusicWheelItem song") ); m_sprSongBar.SetXY( 0, 0 ); - m_sprSectionBar.Load( THEME->GetPathTo("Graphics","select music section bar") ); + m_sprSectionBar.Load( THEME->GetPathTo("Graphics","MusicWheelItem section") ); m_sprSectionBar.SetXY( 0, 0 ); - m_textSectionName.LoadFromFont( THEME->GetPathTo("Fonts","musicwheel section") ); + m_textSectionName.LoadFromFont( THEME->GetPathTo("Fonts","MusicWheel section") ); m_textSectionName.EnableShadow( false ); m_textSectionName.SetVertAlign( align_middle ); m_textSectionName.SetXY( SECTION_NAME_X, 0 ); m_textSectionName.SetZoom( SECTION_ZOOM ); - m_textRoulette.LoadFromFont( THEME->GetPathTo("Fonts","musicwheel roulette") ); + m_textRoulette.LoadFromFont( THEME->GetPathTo("Fonts","MusicWheel roulette") ); m_textRoulette.EnableShadow( false ); m_textRoulette.TurnRainbowOn(); m_textRoulette.SetZoom( ROULETTE_ZOOM ); @@ -87,7 +87,7 @@ WheelItemDisplay::WheelItemDisplay() m_GradeDisplay[p].SetXY( GRADE_X(p), 0 ); } - m_textCourse.LoadFromFont( THEME->GetPathTo("Fonts","musicwheel course") ); + m_textCourse.LoadFromFont( THEME->GetPathTo("Fonts","MusicWheel course") ); m_textCourse.EnableShadow( false ); m_textCourse.SetZoom( COURSE_ZOOM ); m_textCourse.SetHorizAlign( align_left ); @@ -145,7 +145,7 @@ void WheelItemDisplay::LoadFromWheelItemData( WheelItemData* pWID ) { m_TextBanner.LoadFromSong( data->m_pSong ); m_TextBanner.SetDiffuse( data->m_color ); - m_MusicStatusDisplay.SetFlags( data->m_Flags ); + m_WheelNotifyIcon.SetFlags( data->m_Flags ); RefreshGrades(); } break; @@ -205,7 +205,7 @@ void WheelItemDisplay::Update( float fDeltaTime ) case TYPE_SONG: { m_sprSongBar.Update( fDeltaTime ); - m_MusicStatusDisplay.Update( fDeltaTime ); + m_WheelNotifyIcon.Update( fDeltaTime ); m_TextBanner.Update( fDeltaTime ); for( int p=0; pGetPathTo("Graphics","edit bars") ); + m_sprBars.Load( THEME->GetPathTo("Graphics","NoteField bars") ); m_sprBars.StopAnimating(); m_fBeginMarker = m_fEndMarker = -1; diff --git a/stepmania/src/OptionIcon.cpp b/stepmania/src/OptionIcon.cpp index 151aaaebf1..a258db0dce 100644 --- a/stepmania/src/OptionIcon.cpp +++ b/stepmania/src/OptionIcon.cpp @@ -25,11 +25,11 @@ OptionIcon::OptionIcon() { - m_spr.Load( THEME->GetPathTo("Graphics","select music option icons 3x2") ); + m_spr.Load( THEME->GetPathTo("Graphics","OptionIcon frame 3x2") ); m_spr.StopAnimating(); this->AddChild( &m_spr ); - m_text.LoadFromFont( THEME->GetPathTo("Fonts","option icons") ); + m_text.LoadFromFont( THEME->GetPathTo("Fonts","OptionIcon") ); m_text.EnableShadow( false ); m_text.SetZoom( TEXT_ZOOM ); m_text.SetXY( TEXT_OFFSET_X, TEXT_OFFSET_Y ); diff --git a/stepmania/src/OptionsCursor.cpp b/stepmania/src/OptionsCursor.cpp index a86eee5428..1b4359a104 100644 --- a/stepmania/src/OptionsCursor.cpp +++ b/stepmania/src/OptionsCursor.cpp @@ -26,7 +26,7 @@ OptionsCursor::OptionsCursor() void OptionsCursor::Load( PlayerNumber pn, bool bUnderline ) { - CString sFileName = bUnderline ? "options underline" : "options cursor"; + CString sFileName = bUnderline ? "OptionsCursor underline" : "OptionsCursor cursor"; CString sPath = THEME->GetPathTo( "Graphics", sFileName ); m_sprLeft.Load( sPath ); diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 2c0ab29f34..bb8bfa8e7a 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -207,7 +207,7 @@ void Player::Update( float fDeltaTime ) if( hn.fStartBeat < fSongBeat && fSongBeat < hn.fEndBeat ) // if the song beat is in the range of this hold { bool bIsHoldingButton = INPUTMAPPER->IsButtonDown( GameI ); - if( !GAMESTATE->m_bEditing && (PREFSMAN->m_bAutoPlay || GAMESTATE->m_bDemonstration) ) + if( !GAMESTATE->m_bEditing && (PREFSMAN->m_bAutoPlay || GAMESTATE->m_bDemonstrationOrJukebox) ) bIsHoldingButton = true; m_NoteField.m_bIsHoldingHoldNote[i] = bIsHoldingButton && bSteppedOnTapNote; // set host flag so NoteField can do intelligent drawing @@ -390,7 +390,7 @@ void Player::Step( int col ) else if( fSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO; else score = TNS_NONE; - if( !GAMESTATE->m_bEditing && (GAMESTATE->m_bDemonstration || PREFSMAN->m_bAutoPlay) ) + if( !GAMESTATE->m_bEditing && (GAMESTATE->m_bDemonstrationOrJukebox || PREFSMAN->m_bAutoPlay) ) score = TNS_MARVELOUS; if( score==TNS_MARVELOUS && !PREFSMAN->m_bMarvelousTiming ) @@ -550,7 +550,7 @@ int Player::UpdateTapNotesMissedOlderThan( float fMissIfOlderThanSeconds ) void Player::CrossedRow( int iNoteRow ) { - if( PREFSMAN->m_bAutoPlay || GAMESTATE->m_bDemonstration ) + if( PREFSMAN->m_bAutoPlay || GAMESTATE->m_bDemonstrationOrJukebox ) { // check to see if there's at the crossed row for( int t=0; tTrace( "ScoreDisplayNormal::ScoreDisplayNormal()" ); // init the text - m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); + m_text.LoadFromNumbers( THEME->GetPathTo("Numbers","ScoreDisplayNormal numbers") ); m_text.EnableShadow( false ); m_fScore = 0; diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index 1728d54b0d..4029a5e9ed 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -145,13 +145,13 @@ void Screen::ClearMessageQueue( const ScreenMessage SM ) #include "ScreenMusicScroll.h" #include "ScreenPlayerOptions.h" #include "ScreenSelectCourse.h" -#include "ScreenSelectMaxType2.h" -#include "ScreenSelectMaxType2EX.h" +#include "ScreenSelectDifficulty.h" +#include "ScreenSelectDifficultyEX.h" #include "ScreenSelectGame.h" #include "ScreenSelectGroup.h" #include "ScreenSelectMusic.h" #include "ScreenSelectStyle5th.h" -#include "ScreenSelectMaxType1.h" +#include "ScreenSelectStyle.h" #include "ScreenSongOptions.h" #include "ScreenSoundOptions.h" #include "ScreenStage.h" @@ -200,13 +200,13 @@ Screen* Screen::Create( CString sClassName ) else if( 0==stricmp(sClassName, "ScreenMusicScroll") ) ret = new ScreenMusicScroll; else if( 0==stricmp(sClassName, "ScreenPlayerOptions") ) ret = new ScreenPlayerOptions; else if( 0==stricmp(sClassName, "ScreenSelectCourse") ) ret = new ScreenSelectCourse; - else if( 0==stricmp(sClassName, "ScreenSelectMaxType2") ) ret = new ScreenSelectMaxType2; - else if( 0==stricmp(sClassName, "ScreenSelectMaxType2EX") ) ret = new ScreenSelectMaxType2EX; + else if( 0==stricmp(sClassName, "ScreenSelectDifficulty") ) ret = new ScreenSelectDifficulty; + else if( 0==stricmp(sClassName, "ScreenSelectDifficultyEX") ) ret = new ScreenSelectDifficultyEX; else if( 0==stricmp(sClassName, "ScreenSelectGame") ) ret = new ScreenSelectGame; else if( 0==stricmp(sClassName, "ScreenSelectGroup") ) ret = new ScreenSelectGroup; else if( 0==stricmp(sClassName, "ScreenSelectMusic") ) ret = new ScreenSelectMusic; else if( 0==stricmp(sClassName, "ScreenSelectStyle5th") ) ret = new ScreenSelectStyle5th; - else if( 0==stricmp(sClassName, "ScreenSelectMaxType1") ) ret = new ScreenSelectMaxType1; + else if( 0==stricmp(sClassName, "ScreenSelectStyle") ) ret = new ScreenSelectStyle; else if( 0==stricmp(sClassName, "ScreenSongOptions") ) ret = new ScreenSongOptions; else if( 0==stricmp(sClassName, "ScreenStage") ) ret = new ScreenStage; else if( 0==stricmp(sClassName, "ScreenTest") ) ret = new ScreenTest; diff --git a/stepmania/src/ScreenAlbums.h b/stepmania/src/ScreenAlbums.h index c2a46e42f8..7a788c573b 100644 --- a/stepmania/src/ScreenAlbums.h +++ b/stepmania/src/ScreenAlbums.h @@ -15,7 +15,7 @@ class ScreenAlbums : public ScreenAttract { public: - ScreenAlbums() : ScreenAttract("ScreenAlbums","albums") { }; + ScreenAlbums() : ScreenAttract("ScreenAlbums") { }; }; diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index 31b31c6d97..852e4b5b73 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -54,11 +54,7 @@ OptionRowData g_AppearanceOptionsLines[NUM_APPEARANCE_OPTIONS_LINES] = { }; ScreenAppearanceOptions::ScreenAppearanceOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","appearance options"), - THEME->GetPathTo("Graphics","appearance options page"), - THEME->GetPathTo("Graphics","appearance options top edge") - ) + ScreenOptions("ScreenAppearanceOptions",false) { LOG->Trace( "ScreenAppearanceOptions::ScreenAppearanceOptions()" ); @@ -76,10 +72,10 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() : g_AppearanceOptionsLines, NUM_APPEARANCE_OPTIONS_LINES, false ); - m_Menu.SetTimer( 99 ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.SetTimer( 99 ); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","appearance options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenAppearanceOptions music") ); } void ScreenAppearanceOptions::ImportOptions() diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index bb4bafdf60..5d2b82f322 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -26,37 +26,40 @@ #include "SDL_utils.h" #include "RageSoundManager.h" -#define SECONDS_TO_SHOW THEME->GetMetricF(m_sMetricName,"SecondsToShow") -#define NEXT_SCREEN THEME->GetMetric(m_sMetricName,"NextScreen") +#define NEXT_SCREEN THEME->GetMetric(m_sClassName,"NextScreen") -ScreenAttract::ScreenAttract( CString sMetricName, CString sElementName ) +ScreenAttract::ScreenAttract( CString sClassName ) { - LOG->Trace( "ScreenAttract::ScreenAttract(%s, %s)", sMetricName.c_str(), sElementName.c_str() ); + LOG->Trace( "ScreenAttract::ScreenAttract(%s)", sClassName.c_str() ); GAMESTATE->Reset(); - m_sMetricName = sMetricName; - m_sElementName = sElementName; + m_sClassName = sClassName; // We have to do initialization in the first update because this->GetElementName() won't // work until the object has been fully constructed. - m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",m_sElementName) ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations",m_sClassName+" background") ); this->AddChild( &m_Background ); - m_Fade.SetClosed(); - m_Fade.OpenWipingRight( SM_None ); - this->AddChild( &m_Fade ); + m_In.Load( THEME->GetPathTo("BGAnimations","ScreenAttract in") ); + m_In.StartTransitioning(); + this->AddChild( &m_In ); - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sElementName) ); + m_Out.Load( THEME->GetPathTo("BGAnimations","ScreenAttract out") ); + this->AddChild( &m_Out ); - m_soundStart.Load( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sClassName) ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds",m_sElementName + " music") ); // DO loop. -Chris + m_soundStart.Load( THEME->GetPathTo("Sounds","Common start") ); + + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds",m_sClassName + " music") ); // DO loop. -Chris GAMESTATE->m_bPlayersCanJoin = true; - this->SendScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); + + float fTimeUntilBeginFadingOut = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds(); + this->SendScreenMessage( SM_BeginFadingOut, fTimeUntilBeginFadingOut ); } @@ -70,12 +73,17 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type { LOG->Trace( "ScreenAttract::Input()" ); - if(type != IET_FIRST_PRESS) return; // don't care + AttractInput( DeviceI, type, GameI, MenuI, StyleI, m_In.IsTransitioning() || m_Out.IsTransitioning() ); +} +bool ScreenAttract::ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) +{ + if( type != IET_FIRST_PRESS ) + return false; if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) { (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - /*ResetGame(); + /* ResetGame(); This causes problems on ScreenIntroMovie, which results in the movie being restarted and/or becoming out-of-synch -- Miryokuteki */ @@ -88,27 +96,25 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type } SCREENMAN->RefreshCreditsMessages(); SCREENMAN->SystemMessage( sMessage ); - return; + return true; } + return false; +} + +void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI, bool bTransitioning ) +{ + if(type != IET_FIRST_PRESS) + return; // don't care + + ChangeCoinModeInput( DeviceI, type, GameI, MenuI, StyleI ); if( MenuI.IsValid() ) { switch( MenuI.button ) { - case MENU_BUTTON_LEFT: - case MENU_BUTTON_RIGHT: - this->SendScreenMessage( SM_BeginFadingOut, 0 ); - break; - case MENU_BUTTON_COIN: - /* Credit already taken care of.. go forth -- Miryokuteki */ - //Screen::MenuCoin( MenuI.player ); // increment coins, play sound - SOUNDMAN->StopMusic(); - SDL_Delay( 800 ); // do a little pause, like the arcade does - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); - break; case MENU_BUTTON_START: case MENU_BUTTON_BACK: - + case MENU_BUTTON_COIN: switch( PREFSMAN->m_CoinMode ) { case PrefsManager::COIN_PAY: @@ -118,7 +124,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type case PrefsManager::COIN_FREE: case PrefsManager::COIN_HOME: SOUNDMAN->StopMusic(); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common coin") ); SDL_Delay( 800 ); // do a little pause, like the arcade does SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); break; @@ -129,6 +135,20 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type } } + if( bTransitioning ) + return; + + if( MenuI.IsValid() ) + { + switch( MenuI.button ) + { + case MENU_BUTTON_LEFT: + case MENU_BUTTON_RIGHT: + SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut, 0 ); + break; + } + } + // Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); } @@ -142,8 +162,8 @@ void ScreenAttract::HandleScreenMessage( const ScreenMessage SM ) switch( SM ) { case SM_BeginFadingOut: - if( !m_Fade.IsClosing() ) - m_Fade.CloseWipingRight( SM_GoToNextScreen ); + if( !m_Out.IsTransitioning() ) + m_Out.StartTransitioning( SM_GoToNextScreen ); break; case SM_GoToNextScreen: /* XXX: Look at the def of the screen we're going to; if it has a diff --git a/stepmania/src/ScreenAttract.h b/stepmania/src/ScreenAttract.h index 0c190b7071..21cd00f346 100644 --- a/stepmania/src/ScreenAttract.h +++ b/stepmania/src/ScreenAttract.h @@ -15,7 +15,7 @@ #include "Screen.h" #include "Sprite.h" #include "BitmapText.h" -#include "TransitionFade.h" +#include "TransitionBGAnimation.h" #include "RandomSample.h" #include "BGAnimation.h" #include "RageTimer.h" @@ -25,21 +25,23 @@ class ScreenAttract : public Screen { public: - ScreenAttract( CString sMetricName, CString sElementName ); + ScreenAttract( CString sClassName ); virtual ~ScreenAttract(); virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); + static bool ChangeCoinModeInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); /* return true if CoinMode changed */ + static void AttractInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI, bool bTransitioning ); virtual void Update( float fDelta ); virtual void HandleScreenMessage( const ScreenMessage SM ); protected: - CString m_sMetricName; // used to loop up theme metrics - CString m_sElementName; // used to loop up theme elements + CString m_sClassName; // used to loop up theme metrics - BGAnimation m_Background; - TransitionFade m_Fade; - RandomSample m_soundStart; + BGAnimation m_Background; + TransitionBGAnimation m_In; + TransitionBGAnimation m_Out; + RandomSample m_soundStart; }; diff --git a/stepmania/src/ScreenCaution.cpp b/stepmania/src/ScreenCaution.cpp index 83cb2b5d28..d6c234da2b 100644 --- a/stepmania/src/ScreenCaution.cpp +++ b/stepmania/src/ScreenCaution.cpp @@ -36,22 +36,22 @@ ScreenCaution::ScreenCaution() return; } - m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","caution background") ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenCaution background") ); this->AddChild( &m_Background ); - m_In.Load( THEME->GetPathTo("BGAnimations","caution in") ); + m_In.Load( THEME->GetPathTo("BGAnimations","ScreenCaution in") ); m_In.StartTransitioning( SM_DoneOpening ); this->AddChild( &m_In ); - m_Out.Load( THEME->GetPathTo("BGAnimations","caution out") ); + m_Out.Load( THEME->GetPathTo("BGAnimations","ScreenCaution out") ); this->AddChild( &m_Out ); - m_Back.Load( THEME->GetPathTo("BGAnimations","menu back") ); + m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); this->AddChild( &m_Back ); this->SendScreenMessage( SM_StartClosing, 3 ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","caution music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenCaution music") ); } @@ -61,7 +61,7 @@ void ScreenCaution::Input( const DeviceInput& DeviceI, const InputEventType type if( MenuI.IsValid() && pn!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] ) { GAMESTATE->m_bSideIsJoined[pn] = true; - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); SCREENMAN->RefreshCreditsMessages(); return; // don't fall though } @@ -104,6 +104,6 @@ void ScreenCaution::MenuBack( PlayerNumber pn ) return; this->ClearMessageQueue(); m_Back.StartTransitioning( SM_GoToPrevScreen ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu back") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common back") ); } diff --git a/stepmania/src/ScreenCompany.h b/stepmania/src/ScreenCompany.h index 0c8d12a208..d351771ea0 100644 --- a/stepmania/src/ScreenCompany.h +++ b/stepmania/src/ScreenCompany.h @@ -15,7 +15,7 @@ class ScreenCompany : public ScreenAttract { public: - ScreenCompany() : ScreenAttract("ScreenCompany","company") { }; + ScreenCompany() : ScreenAttract("ScreenCompany") { }; }; diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index ac85d06cc0..5c8253564c 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -16,7 +16,7 @@ #include "GameState.h" #include "SongManager.h" #include "StepMania.h" -#include "SDL_utils.h" +#include "ScreenAttract.h" // for AttractInput() #define SECONDS_TO_SHOW THEME->GetMetricF("ScreenDemonstration","SecondsToShow") @@ -24,15 +24,10 @@ const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+101); // MUST be same as in ScreenGameplay -const ScreenMessage SM_BeginFadingToNextScreen = ScreenMessage(SM_User+1000); -bool SetUpSongOptions() // always return true. +bool PrepareForDemonstration() // always return true. { - // - // Set the current song to prepare for a demonstration - // - switch( GAMESTATE->m_CurGame ) { case GAME_DANCE: GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS; break; @@ -47,83 +42,10 @@ bool SetUpSongOptions() // always return true. GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; - // - // Search for a Song and Steps to play during the demo - // - for( int i=0; i<600; i++ ) // try 600 times - { - Song* pSong = SONGMAN->GetRandomSong(); - if( pSong == NULL ) // returns NULL there are no songs - return true; // we need to detect this and abort demonstration later - - if( pSong->m_apNotes.empty() ) - continue; // skip - - if( !pSong->HasMusic() ) - continue; // skip - - vector apNotes; - pSong->GetNotes( apNotes, GAMESTATE->GetCurrentStyleDef()->m_NotesType ); - - if( apNotes.empty() ) - continue; // skip - - // Found something we can use! - Notes* pNotes = apNotes[ rand()%apNotes.size() ]; - - GAMESTATE->m_pCurSong = pSong; - for( int p=0; pm_pCurNotes[p] = pNotes; - - break; // done looking - } - - ASSERT( GAMESTATE->m_pCurSong ); - - GAMESTATE->m_MasterPlayerNumber = PLAYER_1; - - // choose some cool options - int Benchmark = 0; - if(Benchmark) - { - /* Note that you also need to make sure you benchmark with the - * same notes. I use a copy of MaxU with only heavy notes included. */ - for( int p=0; pIsPlayerEnabled(p) ) - continue; - - /* Lots and lots of arrows. This might even bias to arrows a little - * too much. */ - GAMESTATE->m_PlayerOptions[p].Init(); - GAMESTATE->m_PlayerOptions[p].m_fScrollSpeed = .25f; - GAMESTATE->m_PlayerOptions[p].m_fEffects[ PlayerOptions::EFFECT_SPACE ] = 1; - GAMESTATE->m_PlayerOptions[p].m_fEffects[ PlayerOptions::EFFECT_MINI ] = 1; - } - GAMESTATE->m_SongOptions.m_LifeType = SongOptions::LIFE_BATTERY; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; - } - - for( int p=0; pIsPlayerEnabled(p) ) - continue; - - GAMESTATE->m_PlayerOptions[p].Init(); - GAMESTATE->m_PlayerOptions[p].ChooseRandomMofifiers(); - } - - GAMESTATE->m_SongOptions = SongOptions(); - - GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; - GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; - - GAMESTATE->m_bDemonstration = true; - return true; } -ScreenDemonstration::ScreenDemonstration() : ScreenGameplay(SetUpSongOptions()) // this is a hack to get some code to execute before the ScreenGameplay constructor +ScreenDemonstration::ScreenDemonstration() : ScreenJukebox( PrepareForDemonstration() ) // this is a hack to get some code to execute before the ScreenGameplay constructor { LOG->Trace( "ScreenDemonstration::ScreenDemonstration()" ); @@ -134,41 +56,29 @@ ScreenDemonstration::ScreenDemonstration() : ScreenGameplay(SetUpSongOptions()) } - m_sprDemonstrationOverlay.Load( THEME->GetPathTo("Graphics","demonstration overlay") ); - m_sprDemonstrationOverlay.SetXY( CENTER_X, CENTER_Y ); - this->AddChild( &m_sprDemonstrationOverlay ); + m_Overlay.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenDemonstration overlay") ); + this->AddChild( &m_Overlay ); - m_sprDemonstrationBlink.Load( THEME->GetPathTo("Graphics","demonstration blink") ); - m_sprDemonstrationBlink.SetXY( CENTER_X, CENTER_Y ); - m_sprDemonstrationBlink.SetEffectDiffuseBlink(); - this->AddChild( &m_sprDemonstrationBlink ); + this->MoveToTail( &m_In ); + this->MoveToTail( &m_Out ); - this->MoveToTail( &m_Fade ); - - m_Fade.OpenWipingRight(); - - ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc. + ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that drive "ready", "go", etc. GAMESTATE->m_bPastHereWeGo = true; - m_StarWipe.SetOpened(); m_DancingState = STATE_DANCING; - this->SendScreenMessage( SM_BeginFadingToNextScreen, SECONDS_TO_SHOW ); + this->SendScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); } ScreenDemonstration::~ScreenDemonstration() { - GAMESTATE->m_bDemonstration = false; + GAMESTATE->m_bDemonstrationOrJukebox = false; GAMESTATE->Reset(); } void ScreenDemonstration::Update( float fDeltaTime ) { ScreenGameplay::Update( fDeltaTime ); - - // hide status icons - for( int i=0; iTrace( "ScreenDemonstration::Input()" ); - // - // This should be the same as ScreenAttract::Input() - // - - if(type != IET_FIRST_PRESS) return; // don't care - - if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) - { - (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - /*ResetGame(); - This causes problems on ScreenIntroMovie, which results in the - movie being restarted and/or becoming out-of-synch -- Miryokuteki */ - - CString sMessage = "Coin Mode: "; - switch( PREFSMAN->m_CoinMode ) - { - case PrefsManager::COIN_HOME: sMessage += "HOME"; break; - case PrefsManager::COIN_PAY: sMessage += "PAY"; break; - case PrefsManager::COIN_FREE: sMessage += "FREE"; break; - } - SCREENMAN->RefreshCreditsMessages(); - SCREENMAN->SystemMessage( sMessage ); - return; - } - + // Stop music on Start or Coin + // TODO: Change ScreenGameplay to play sound through the global sound object + // so that this don't need to be special cased. if( MenuI.IsValid() ) { switch( MenuI.button ) { - case MENU_BUTTON_LEFT: - case MENU_BUTTON_RIGHT: - if( !m_Fade.IsOpening() && !m_Fade.IsClosing() ) - m_Fade.CloseWipingRight( SM_GoToNextScreen ); - break; case MENU_BUTTON_COIN: - Screen::MenuCoin( MenuI.player ); // increment coins, play sound m_soundMusic.Stop(); - SDL_Delay( 800 ); // do a little pause, like the arcade does - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); break; case MENU_BUTTON_START: case MENU_BUTTON_BACK: @@ -228,9 +108,6 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp case PrefsManager::COIN_FREE: case PrefsManager::COIN_HOME: m_soundMusic.Stop(); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") ); - SDL_Delay( 800 ); // do a little pause, like the arcade does - SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); break; default: ASSERT(0); @@ -239,6 +116,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp } } + ScreenAttract::AttractInput( DeviceI, type, GameI, MenuI, StyleI, m_In.IsTransitioning() || m_Out.IsTransitioning() ); } void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) @@ -246,10 +124,8 @@ void ScreenDemonstration::HandleScreenMessage( const ScreenMessage SM ) switch( SM ) { case SM_NotesEnded: - this->SendScreenMessage( SM_BeginFadingToNextScreen, 0 ); - return; - case SM_BeginFadingToNextScreen: - m_Fade.CloseWipingRight( SM_GoToNextScreen ); + case SM_BeginFadingOut: + m_Out.StartTransitioning( SM_GoToNextScreen ); return; case SM_GoToNextScreen: m_soundMusic.Stop(); diff --git a/stepmania/src/ScreenDemonstration.h b/stepmania/src/ScreenDemonstration.h index 722f076821..227544ba53 100644 --- a/stepmania/src/ScreenDemonstration.h +++ b/stepmania/src/ScreenDemonstration.h @@ -9,11 +9,10 @@ ----------------------------------------------------------------------------- */ -#include "ScreenGameplay.h" -#include "Sprite.h" +#include "ScreenJukebox.h" -class ScreenDemonstration : public ScreenGameplay +class ScreenDemonstration : public ScreenJukebox { public: ScreenDemonstration(); @@ -24,10 +23,7 @@ public: virtual void HandleScreenMessage( const ScreenMessage SM ); protected: - Sprite m_sprDemonstrationOverlay; - Sprite m_sprDemonstrationBlink; - - + BGAnimation m_Overlay; }; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index fd9b0ee51e..887ae6c270 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -224,7 +224,7 @@ ScreenEdit::ScreenEdit() GAMESTATE->m_SongOptions.m_fMusicRate = 1; NOTESKIN->SwitchNoteSkin( PLAYER_1, "note" ); // change noteskin before loading all of the edit Actors - m_BGAnimation.LoadFromAniDir( THEME->GetPathTo("BGAnimations","edit") ); + m_BGAnimation.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenEdit background") ); shiftAnchor = -1; m_SnapDisplay.SetXY( EDIT_X, EDIT_GRAY_Y ); @@ -260,7 +260,7 @@ ScreenEdit::ScreenEdit() m_Fade.SetClosed(); - m_sprHelp.Load( THEME->GetPathTo("Graphics","edit help") ); + m_sprHelp.Load( THEME->GetPathTo("Graphics","ScreenEdit help") ); m_sprHelp.SetHorizAlign( Actor::align_left ); m_sprHelp.SetXY( HELP_X, HELP_Y ); @@ -271,7 +271,7 @@ ScreenEdit::ScreenEdit() m_textHelp.SetZoom( 0.5f ); m_textHelp.SetText( HELP_TEXT ); - m_sprInfo.Load( THEME->GetPathTo("Graphics","edit info") ); + m_sprInfo.Load( THEME->GetPathTo("Graphics","ScreenEdit Info") ); m_sprInfo.SetHorizAlign( Actor::align_right ); m_sprInfo.SetXY( INFO_X, INFO_Y ); @@ -282,16 +282,15 @@ ScreenEdit::ScreenEdit() m_textInfo.SetZoom( 0.5f ); //m_textInfo.SetText(); // set this below every frame - m_soundChangeLine.Load( THEME->GetPathTo("Sounds","edit change line") ); - m_soundChangeSnap.Load( THEME->GetPathTo("Sounds","edit change snap") ); - m_soundMarker.Load( THEME->GetPathTo("Sounds","edit marker") ); - m_soundInvalid.Load( THEME->GetPathTo("Sounds","menu invalid") ); + m_soundChangeLine.Load( THEME->GetPathTo("Sounds","ScreenEdit line") ); + m_soundChangeSnap.Load( THEME->GetPathTo("Sounds","ScreenEdit snap") ); + m_soundMarker.Load( THEME->GetPathTo("Sounds","ScreenEdit marker") ); m_soundMusic.Load(m_pSong->GetMusicPath()); m_soundMusic.SetAccurateSync(true); - m_soundAssistTick.Load( THEME->GetPathTo("Sounds","gameplay assist tick") ); + m_soundAssistTick.Load( THEME->GetPathTo("Sounds","ScreenEdit assist tick") ); m_Fade.OpenWipingRight(); } diff --git a/stepmania/src/ScreenEdit.h b/stepmania/src/ScreenEdit.h index 1c46707aaa..9ee621d135 100644 --- a/stepmania/src/ScreenEdit.h +++ b/stepmania/src/ScreenEdit.h @@ -79,7 +79,6 @@ protected: RageSound m_soundChangeLine; RageSound m_soundChangeSnap; RageSound m_soundMarker; - RageSound m_soundInvalid; TransitionFade m_Fade; diff --git a/stepmania/src/ScreenEditMenu.cpp b/stepmania/src/ScreenEditMenu.cpp index 1f63df8a7f..31a82a024c 100644 --- a/stepmania/src/ScreenEditMenu.cpp +++ b/stepmania/src/ScreenEditMenu.cpp @@ -44,11 +44,7 @@ ScreenEditMenu::ScreenEditMenu() // m_Selector.AllowNewNotes(); this->AddChild( &m_Selector ); - m_Menu.Load( - THEME->GetPathTo("BGAnimations","edit menu"), - THEME->GetPathTo("Graphics","edit menu top edge"), - HELP_TEXT, false, false, 99 - ); + m_Menu.Load( "ScreenEditMenu", false ); this->AddChild( &m_Menu ); @@ -58,15 +54,7 @@ ScreenEditMenu::ScreenEditMenu() m_textExplanation.SetZoom( 0.7f ); this->AddChild( &m_textExplanation ); - m_Fade.SetOpened(); - this->AddChild( &m_Fade); - - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","edit menu music") ); - - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundCreate.Load( THEME->GetPathTo("Sounds","edit menu create") ); - - m_Menu.TweenOnScreenFromBlack( SM_None ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenEditMenu music") ); } @@ -137,7 +125,7 @@ void DeleteCurNotes() void ScreenEditMenu::MenuStart( PlayerNumber pn ) { - if( m_Fade.IsClosing() || m_Fade.IsClosed() ) + if( m_Menu.IsTransitioning() ) return; Song* pSong = m_Selector.GetSelectedSong(); @@ -169,9 +157,8 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) // Prepare prepare for ScreenEdit ASSERT( pNotes ); SOUNDMAN->StopMusic(); - m_soundSelect.PlayRandom(); - m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false ); - m_Fade.CloseWipingRight( SM_None ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); break; case EditMenu::ACTION_DELETE: ASSERT( pNotes ); @@ -190,7 +177,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) pSong->AddNotes( pNewNotes ); SCREENMAN->SystemMessage( "Notes created from copy." ); - m_soundCreate.PlayRandom(); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenEditMenu create") ); m_Selector.RefreshNotes(); pSong->Save(); } @@ -208,7 +195,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) pSong->AddNotes( pNewNotes ); SCREENMAN->SystemMessage( "Notes created from AutoGen." ); - m_soundCreate.PlayRandom(); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenEditMenu create") ); m_Selector.RefreshNotes(); pSong->Save(); } @@ -225,7 +212,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) pSong->AddNotes( pNewNotes ); SCREENMAN->SystemMessage( "Blank Notes created." ); - m_soundCreate.PlayRandom(); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenEditMenu create") ); m_Selector.RefreshNotes(); pSong->Save(); } @@ -237,9 +224,7 @@ void ScreenEditMenu::MenuStart( PlayerNumber pn ) void ScreenEditMenu::MenuBack( PlayerNumber pn ) { - m_Menu.TweenOffScreenToBlack( SM_None, true ); + m_Menu.Back( SM_GoToPrevScreen ); SOUNDMAN->StopMusic(); - - m_Fade.CloseWipingLeft( SM_GoToPrevScreen ); } diff --git a/stepmania/src/ScreenEditMenu.h b/stepmania/src/ScreenEditMenu.h index 8ff7020b1d..dccabcdc60 100644 --- a/stepmania/src/ScreenEditMenu.h +++ b/stepmania/src/ScreenEditMenu.h @@ -36,16 +36,11 @@ private: void MenuBack( PlayerNumber pn ); void MenuStart( PlayerNumber pn ); - EditMenu m_Selector; + EditMenu m_Selector; BitmapText m_textExplanation; - MenuElements m_Menu; - - TransitionFade m_Fade; - - RandomSample m_soundSelect; - RandomSample m_soundCreate; + MenuElements m_Menu; }; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index a7ff9ce598..9a376f1481 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -209,11 +209,10 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) ////////////////////////// // Init graphic elements ////////////////////////// - m_Menu.Load( - THEME->GetPathTo("BGAnimations","evaluation"), - THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenEvaluation" ); +// FIXME: +// The header needs to be different depending on the result mode. How can we do this elegantly? +// THEME->GetPathTo("Graphics",m_ResultMode==RM_ARCADE_SUMMARY?"evaluation summary top edge":"evaluation top edge"), this->AddChild( &m_Menu ); int p; @@ -555,12 +554,12 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) break; } - if( bSummary ) - m_Menu.ImmedOnScreenFromMenu(); - else - m_Menu.TweenOnScreenFromBlack( SM_None ); +// if( bSummary ) +// m_Menu.ImmedOnScreenFromMenu(); +// else +// m_Menu.TweenOnScreenFromBlack( SM_None ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","evaluation music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenEvaluation music") ); } @@ -568,7 +567,7 @@ void ScreenEvaluation::TweenOnScreen() { int i, p; - m_Menu.TweenOnScreenFromBlack( SM_None ); +// m_Menu.TweenOnScreenFromBlack( SM_None ); float fOriginalX, fOriginalY; @@ -741,7 +740,7 @@ void ScreenEvaluation::Input( const DeviceInput& DeviceI, const InputEventType t { // LOG->Trace( "ScreenEvaluation::Input()" ); - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); @@ -800,19 +799,17 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) { TweenOffScreen(); - m_Menu.StopTimer(); - if( PREFSMAN->m_bEventMode ) { switch( GAMESTATE->m_PlayMode ) { case PLAY_MODE_ARCADE: - m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic ); + m_Menu.StartTransitioning( SM_GoToSelectMusic ); break; case PLAY_MODE_NONSTOP: case PLAY_MODE_ONI: case PLAY_MODE_ENDLESS: - m_Menu.TweenOffScreenToMenu( SM_GoToSelectCourse ); + m_Menu.StartTransitioning( SM_GoToSelectCourse ); break; default: ASSERT(0); @@ -825,7 +822,7 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) case RM_ARCADE_STAGE: if( m_bTryExtraStage ) { - m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic ); + m_Menu.StartTransitioning( SM_GoToSelectMusic ); } else if( GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) { @@ -838,14 +835,14 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn ) } else { - m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic ); + m_Menu.StartTransitioning( SM_GoToSelectMusic ); } break; case RM_ARCADE_SUMMARY: - m_Menu.TweenOffScreenToBlack( SM_GoToGameFinished, false ); + m_Menu.StartTransitioning( SM_GoToGameFinished ); break; case RM_COURSE: - m_Menu.TweenOffScreenToBlack( SM_GoToGameFinished, false ); + m_Menu.StartTransitioning( SM_GoToGameFinished ); break; } } diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index b6a7ddbbe2..ce44e4cb30 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -67,22 +67,18 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() } - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select music"), - THEME->GetPathTo("Graphics","select music top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load("ScreenSelectMusic"); this->AddChild( &m_Menu ); - m_soundMusicChange.Load( THEME->GetPathTo("Sounds","select music change")); - m_soundMusicCycle.Load( THEME->GetPathTo("Sounds","select music cycle")); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); + m_soundMusicChange.Load( THEME->GetPathTo("Sounds","ScreenEz2SelectMusic change")); + m_soundMusicCycle.Load( THEME->GetPathTo("Sounds","ScreenEz2SelectMusic cycle")); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); - m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","select mode list frame")); + m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic list frame")); m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y); this->AddChild( &m_ChoiceListFrame ); - m_Guide.Load( THEME->GetPathTo("Graphics","select mode guide")); + m_Guide.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic guide")); m_Guide.SetXY( GUIDE_X, GUIDE_Y ); this->AddChild( &m_Guide ); @@ -95,7 +91,7 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() this->AddChild( &m_MusicBannerWheel ); - m_ChoiceListHighlight.Load( THEME->GetPathTo("Graphics","select mode list highlight")); + m_ChoiceListHighlight.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic list highlight")); m_ChoiceListHighlight.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y); this->AddChild( &m_ChoiceListHighlight ); @@ -111,17 +107,17 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() // m_FootMeter[p].SetShadowLength( 2 ); // this->AddChild( &m_FootMeter[p] ); - m_SpeedIcon[p].Load( THEME->GetPathTo("Graphics","select music speedicon")); + m_SpeedIcon[p].Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic speedicon")); m_SpeedIcon[p].SetXY( SPEEDICON_X(p), SPEEDICON_Y(p) ); m_SpeedIcon[p].SetDiffuse( RageColor(0,0,0,0) ); this->AddChild(&m_SpeedIcon[p] ); - m_MirrorIcon[p].Load( THEME->GetPathTo("Graphics","select music mirroricon")); + m_MirrorIcon[p].Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic mirroricon")); m_MirrorIcon[p].SetXY( MIRRORICON_X(p), MIRRORICON_Y(p) ); m_MirrorIcon[p].SetDiffuse( RageColor(0,0,0,0) ); this->AddChild(&m_MirrorIcon[p] ); - m_ShuffleIcon[p].Load( THEME->GetPathTo("Graphics","select music shuffleicon")); + m_ShuffleIcon[p].Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic shuffleicon")); m_ShuffleIcon[p].SetXY( SHUFFLEICON_X(p), SHUFFLEICON_Y(p) ); m_ShuffleIcon[p].SetDiffuse( RageColor(0,0,0,0) ); this->AddChild(&m_ShuffleIcon[p] ); @@ -131,11 +127,11 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() m_iSelection[p] = 0; } - m_InfoFrame.Load( THEME->GetPathTo("Graphics","select music infoframe") ); + m_InfoFrame.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic infoframe") ); m_InfoFrame.SetXY( INFOFRAME_X, INFOFRAME_Y ); this->AddChild( &m_InfoFrame ); - m_PumpDifficultyCircle.Load( THEME->GetPathTo("Graphics","select music pump difficulty circle")); + m_PumpDifficultyCircle.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic difficulty frame")); m_PumpDifficultyCircle.SetXY( PUMP_DIFF_X, PUMP_DIFF_Y ); this->AddChild( &m_PumpDifficultyCircle ); @@ -148,22 +144,20 @@ ScreenEz2SelectMusic::ScreenEz2SelectMusic() m_DifficultyRating.SetY(DIFFICULTYRATING_Y); this->AddChild(&m_DifficultyRating); - m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message") ); + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","ScreenEz2SelectMusic options message") ); m_sprOptionsMessage.StopAnimating(); m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); m_sprOptionsMessage.SetZoom( 1 ); m_sprOptionsMessage.SetDiffuse( RageColor(1,1,1,0) ); this->AddChild( &m_sprOptionsMessage ); - m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music options") ); + m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","ScreenEz2SelectMusic options") ); m_bGoToOptions = false; m_bMadeChoice = false; MusicChanged(); } - - m_Menu.TweenOnScreenFromMenu( SM_None ); } void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) @@ -175,13 +169,13 @@ void ScreenEz2SelectMusic::Input( const DeviceInput& DeviceI, const InputEventTy if( type == IET_RELEASE ) return; // don't care - if( m_Menu.IsClosing() ) return; // ignore + if( m_Menu.IsTransitioning() ) return; // ignore if( !GameI.IsValid() ) return; // don't care if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START ) { - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); m_bGoToOptions = true; m_sprOptionsMessage.SetState( 1 ); } @@ -296,7 +290,7 @@ void ScreenEz2SelectMusic::HandleScreenMessage( const ScreenMessage SM ) void ScreenEz2SelectMusic::MenuRight( PlayerNumber pn, const InputEventType type ) { - m_Menu.StallTimer(); + m_Menu.m_MenuTimer.StallTimer(); m_MusicBannerWheel.BannersRight(); MusicChanged(); } @@ -305,7 +299,7 @@ void ScreenEz2SelectMusic::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } @@ -323,7 +317,7 @@ void ScreenEz2SelectMusic::TweenOffScreen() void ScreenEz2SelectMusic::MenuLeft( PlayerNumber pn, const InputEventType type ) { - m_Menu.StallTimer(); + m_Menu.m_MenuTimer.StallTimer(); m_MusicBannerWheel.BannersLeft(); MusicChanged(); } @@ -360,13 +354,7 @@ void ScreenEz2SelectMusic::MenuStart( PlayerNumber pn ) m_sprOptionsMessage.SetTweenDiffuse( RageColor(1,1,1,0) ); m_sprOptionsMessage.SetTweenZoomY( 0 ); - m_Menu.TweenOffScreenToBlack( SM_None, false ); - - m_Menu.StopTimer(); - - this->SendScreenMessage( SM_GoToNextScreen, 2.5f ); - -// SCREENMAN->SetNewScreen( "ScreenStage" ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); } diff --git a/stepmania/src/ScreenEz2SelectMusic.h b/stepmania/src/ScreenEz2SelectMusic.h index 3d82ef8f0e..5c0fec53e7 100644 --- a/stepmania/src/ScreenEz2SelectMusic.h +++ b/stepmania/src/ScreenEz2SelectMusic.h @@ -19,7 +19,7 @@ #include "TipDisplay.h" #include "MusicBannerWheel.h" #include "MenuElements.h" -#include "FootMeter.h" +#include "DifficultyMeter.h" #include "DifficultyRating.h" @@ -69,7 +69,7 @@ protected: MusicBannerWheel m_MusicBannerWheel; MenuElements m_Menu; DifficultyRating m_DifficultyRating; -// FootMeter m_FootMeter[NUM_PLAYERS]; +// DifficultyMeter m_DifficultyMeter[NUM_PLAYERS]; vector m_arrayNotes[NUM_PLAYERS]; int m_iSelection[NUM_PLAYERS]; bool m_bGoToOptions; diff --git a/stepmania/src/ScreenEz2SelectPlayer.cpp b/stepmania/src/ScreenEz2SelectPlayer.cpp index 8602a34c88..8a6dd309fa 100644 --- a/stepmania/src/ScreenEz2SelectPlayer.cpp +++ b/stepmania/src/ScreenEz2SelectPlayer.cpp @@ -55,19 +55,15 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer() LOG->Trace( "ScreenEz2SelectPlayer::ScreenEz2SelectPlayer()" ); - m_Menu.Load( - THEME->GetPathTo("BGAnimations","ez2 select player"), - THEME->GetPathTo("Graphics","select player top edge"), - HELP_TEXT, false, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenEz2SelectPlayer" ); this->AddChild( &m_Menu ); - m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ez2 select player") ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenEz2SelectPlayer background") ); this->AddChild( &m_Background ); // animated background =) for( p=0; pGetPathTo("Graphics","select player join frame 1x2") ); + m_sprJoinFrame[p].Load( THEME->GetPathTo("Graphics","ScreenEz2SelectPlayer join frame 1x2") ); m_sprJoinFrame[p].StopAnimating(); m_sprJoinFrame[p].SetState( p ); m_sprJoinFrame[p].SetXY( JOIN_FRAME_X(p), JOIN_FRAME_Y(p) ); @@ -76,7 +72,7 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer() if( GAMESTATE->m_bSideIsJoined[p] ) m_sprJoinFrame[p].SetZoomY( 0 ); - m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","select player join message 2x2") ); + m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","ScreenEz2SelectPlayer join message 2x2") ); m_sprJoinMessage[p].StopAnimating(); m_sprJoinMessage[p].SetState( p ); m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) ); @@ -96,14 +92,13 @@ ScreenEz2SelectPlayer::ScreenEz2SelectPlayer() } } - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select player intro") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select player music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectPlayer music") ); TweenOnScreen(); - m_Menu.TweenOnScreenFromBlack( SM_None ); } /************************************ @@ -145,7 +140,7 @@ void ScreenEz2SelectPlayer::Input( const DeviceInput& DeviceI, const InputEventT { LOG->Trace( "ScreenEz2SelectPlayer::Input()" ); - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler @@ -166,11 +161,11 @@ void ScreenEz2SelectPlayer::HandleScreenMessage( const ScreenMessage SM ) if( GAMESTATE->GetNumSidesJoined() == 0 ) { MenuStart(PLAYER_1); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); } TweenOffScreen(); - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); break; case SM_GoToPrevScreen: SOUNDMAN->StopMusic(); @@ -193,7 +188,7 @@ void ScreenEz2SelectPlayer::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } @@ -238,14 +233,14 @@ void ScreenEz2SelectPlayer::MenuStart( PlayerNumber pn ) if( bBothSidesJoined ) { TweenOffScreen(); - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); } else { // give the other player a little time to join - m_Menu.SetTimer( 1 ); - m_Menu.StartTimer(); - m_Menu.StealthTimer( SILENT_WAIT ); // do we wanna make the timer 'quiet' ? + m_Menu.m_MenuTimer.SetTimer( 1 ); + m_Menu.m_MenuTimer.StartTimer(); + m_Menu.m_MenuTimer.StealthTimer( SILENT_WAIT ); // do we wanna make the timer 'quiet' ? } } diff --git a/stepmania/src/ScreenGameOver.cpp b/stepmania/src/ScreenGameOver.cpp index c541ffe650..e8498dbb3d 100644 --- a/stepmania/src/ScreenGameOver.cpp +++ b/stepmania/src/ScreenGameOver.cpp @@ -31,13 +31,13 @@ ScreenGameOver::ScreenGameOver() { GAMESTATE->Reset(); - m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","game over") ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenGameOver background") ); this->AddChild( &m_Background ); m_Fade.OpenWipingRight( SM_None ); this->AddChild( &m_Fade ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","game over music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenGameOver music") ); this->SendScreenMessage( SM_PlayAnnouncer, 0.5 ); this->SendScreenMessage( SM_StartFadingOut, 5 ); diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 00b3824af5..1481b45b68 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -74,38 +74,41 @@ #define STATUS_ICONS_Y THEME->GetMetricF("ScreenGameplay","StatusIconsY") #define SURVIVE_TIME_X THEME->GetMetricF("ScreenGameplay","SurviveTimeX") #define SURVIVE_TIME_Y THEME->GetMetricF("ScreenGameplay","SurviveTimeY") -#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenGameplay","SecondsBetweenComments") -#define TICK_EARLY_SECONDS THEME->GetMetricF("ScreenGameplay","TickEarlySeconds") +CachedThemeMetric SECONDS_BETWEEN_COMMENTS ("ScreenGameplay","SecondsBetweenComments"); +CachedThemeMetric G_TICK_EARLY_SECONDS ("ScreenGameplay","TickEarlySeconds"); -static float g_fTickEarlySecondsCache = 0; // reading directly out of theme metrics is slow + +const ScreenMessage SM_PlayReady = ScreenMessage(SM_User+0); +const ScreenMessage SM_PlayGo = ScreenMessage(SM_User+1); // received while STATE_DANCING -const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+101); -const ScreenMessage SM_BeginLoadingNextSong = ScreenMessage(SM_User+102); -const ScreenMessage SM_PlayToastySound = ScreenMessage(SM_User+105); +const ScreenMessage SM_NotesEnded = ScreenMessage(SM_User+10); +const ScreenMessage SM_BeginLoadingNextSong = ScreenMessage(SM_User+11); +const ScreenMessage SM_PlayToastySound = ScreenMessage(SM_User+12); // received while STATE_OUTRO -const ScreenMessage SM_ShowCleared = ScreenMessage(SM_User+111); -const ScreenMessage SM_ShowTryExtraStage = ScreenMessage(SM_User+112); -const ScreenMessage SM_SaveChangedBeforeGoingBack = ScreenMessage(SM_User+113); -const ScreenMessage SM_GoToScreenAfterBack = ScreenMessage(SM_User+114); -const ScreenMessage SM_GoToStateAfterCleared= ScreenMessage(SM_User+115); +const ScreenMessage SM_SaveChangedBeforeGoingBack = ScreenMessage(SM_User+20); +const ScreenMessage SM_GoToScreenAfterBack = ScreenMessage(SM_User+21); +const ScreenMessage SM_GoToStateAfterCleared= ScreenMessage(SM_User+22); -const ScreenMessage SM_BeginFailed = ScreenMessage(SM_User+121); -const ScreenMessage SM_ShowFailed = ScreenMessage(SM_User+122); -const ScreenMessage SM_PlayFailComment = ScreenMessage(SM_User+123); -const ScreenMessage SM_GoToScreenAfterFail = ScreenMessage(SM_User+125); +const ScreenMessage SM_BeginFailed = ScreenMessage(SM_User+30); +const ScreenMessage SM_GoToScreenAfterFail = ScreenMessage(SM_User+31); // received while STATE_INTRO -const ScreenMessage SM_StartHereWeGo = ScreenMessage(SM_User+130); -const ScreenMessage SM_StopHereWeGo = ScreenMessage(SM_User+131); +const ScreenMessage SM_StartHereWeGo = ScreenMessage(SM_User+40); +const ScreenMessage SM_StopHereWeGo = ScreenMessage(SM_User+41); ScreenGameplay::ScreenGameplay( bool bDemonstration ) { LOG->Trace( "ScreenGameplay::ScreenGameplay()" ); + + SECONDS_BETWEEN_COMMENTS.Refresh(); + G_TICK_EARLY_SECONDS.Refresh(); + + m_textLyrics.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); m_textLyrics.SetXY( 100,100 ); @@ -126,8 +129,6 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) } } - g_fTickEarlySecondsCache = TICK_EARLY_SECONDS; - GAMESTATE->m_CurStageStats = StageStats(); // clear values @@ -235,7 +236,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) /* Position it in LoadNextSong. */ this->AddChild( &m_ActiveItemList[p] ); - m_sprOniGameOver[p].Load( THEME->GetPathTo("Graphics","gameplay oni gameover") ); + m_sprOniGameOver[p].Load( THEME->GetPathTo("Graphics","ScreenGameplay oni gameover") ); m_sprOniGameOver[p].SetX( fPlayerX ); m_sprOniGameOver[p].SetY( SCREEN_TOP - m_sprOniGameOver[p].GetZoomedHeight()/2 ); m_sprOniGameOver[p].SetDiffuse( RageColor(1,1,1,0) ); // 0 alpha so we don't waste time drawing while not visible @@ -247,19 +248,16 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) this->AddChild( &m_OniFade ); - m_sprMiddleFrame.Load( THEME->GetPathTo("Graphics","Gameplay Middle Frame") ); - m_sprMiddleFrame.SetXY( MIDDLE_FRAME_X, MIDDLE_FRAME_Y ); - const bool bExtra = GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2(); // LifeFrame goes below LifeMeter CString sLifeFrameName; if( bExtra ) - sLifeFrameName = "gameplay extra life frame"; + sLifeFrameName = "ScreenGameplay extra life frame"; else if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY ) - sLifeFrameName = "gameplay oni life frame"; + sLifeFrameName = "ScreenGameplay oni life frame"; else - sLifeFrameName = "gameplay life frame"; + sLifeFrameName = "ScreenGameplay life frame"; m_sprLifeFrame.Load( THEME->GetPathTo("Graphics",sLifeFrameName) ); m_sprLifeFrame.SetXY( LIFE_FRAME_X, LIFE_FRAME_Y(bExtra) ); this->AddChild( &m_sprLifeFrame ); @@ -322,11 +320,11 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) // CString sScoreFrameName; if( bExtra ) - sScoreFrameName = "gameplay extra score frame"; + sScoreFrameName = "ScreenGameplay extra score frame"; else if( GAMESTATE->m_SongOptions.m_LifeType == SongOptions::LIFE_BATTERY ) - sScoreFrameName = "gameplay oni score frame"; + sScoreFrameName = "ScreenGameplay oni score frame"; else - sScoreFrameName = "gameplay score frame"; + sScoreFrameName = "ScreenGameplay score frame"; m_sprScoreFrame.Load( THEME->GetPathTo("Graphics",sScoreFrameName) ); m_sprScoreFrame.SetXY( SCORE_FRAME_X, SCORE_FRAME_Y(bExtra) ); this->AddChild( &m_sprScoreFrame ); @@ -337,7 +335,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) m_StageName.SetZoom( STAGENAME_ZOOM ); this->AddChild( &m_StageName ); - m_MaxCombo.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); + m_MaxCombo.LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenGameplay max combo numbers") ); m_MaxCombo.SetXY( MAXCOMBO_X, MAXCOMBO_Y ); m_MaxCombo.SetZoom( MAXCOMBO_ZOOM ); m_MaxCombo.SetText( ssprintf("%d", m_Player[GAMESTATE->m_MasterPlayerNumber].GetPlayersMaxCombo()) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */ @@ -392,7 +390,7 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) if( !GAMESTATE->IsPlayerEnabled(PlayerNumber(p)) ) continue; - m_DifficultyIcon[p].Load( THEME->GetPathTo("graphics","gameplay difficulty icons 2x5") ); + m_DifficultyIcon[p].Load( THEME->GetPathTo("graphics","ScreenGameplay difficulty icons 2x5") ); /* Position it in LoadNextSong. */ this->AddChild( &m_DifficultyIcon[p] ); } @@ -405,120 +403,129 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) //this->AddChild( &m_textLyrics ); -- THIS IS NOT DONE YET!! (Miryokuteki) - for( int s=0; sGetPathTo("Graphics",ssprintf("gameplay status icons 1x%d",NUM_STATUS_ICONS)) ); - m_sprStatusIcons[s].StopAnimating(); - m_sprStatusIcons[s].SetState(s); - this->AddChild( &m_sprStatusIcons[s] ); - } - - PositionStatusIcons(); // position them + m_textOptions.LoadFromFont( THEME->GetPathTo("Fonts","header2") ); + this->AddChild( &m_textOptions ); + UpdateOptionsText(); - - m_StarWipe.SetClosed(); - this->AddChild( &m_StarWipe ); - - m_sprReady.Load( THEME->GetPathTo("Graphics","gameplay ready") ); - m_sprReady.SetXY( CENTER_X, CENTER_Y ); - m_sprReady.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprReady ); - - m_sprHereWeGo.Load( THEME->GetPathTo("Graphics","gameplay here we go") ); - m_sprHereWeGo.SetXY( CENTER_X, CENTER_Y ); - m_sprHereWeGo.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprHereWeGo ); - - m_sprCleared.Load( THEME->GetPathTo("Graphics","gameplay cleared") ); - m_sprCleared.SetXY( CENTER_X, CENTER_Y ); - m_sprCleared.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprCleared ); - - m_sprFailed.Load( THEME->GetPathTo("Graphics","gameplay failed") ); - m_sprFailed.SetXY( CENTER_X, CENTER_Y ); - m_sprFailed.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprFailed ); - - if( GAMESTATE->IsFinalStage() ) - m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics","gameplay try extra stage1") ); - else if( GAMESTATE->IsExtraStage() ) - m_sprTryExtraStage.Load( THEME->GetPathTo("Graphics","gameplay try extra stage2") ); - m_sprTryExtraStage.SetXY( CENTER_X, CENTER_Y ); - m_sprTryExtraStage.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprTryExtraStage ); - - m_Fade.SetOpened(); - this->AddChild( &m_Fade ); - - m_textSurviveTime.LoadFromFont( THEME->GetPathTo("Fonts","survive time") ); - m_textSurviveTime.EnableShadow( false ); - m_textSurviveTime.SetXY( SURVIVE_TIME_X, SURVIVE_TIME_Y ); - m_textSurviveTime.SetText( "" ); - m_textSurviveTime.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_textSurviveTime ); - - - m_sprToasty.Load( THEME->GetPathTo("Graphics","gameplay toasty") ); - m_sprToasty.SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprToasty ); - m_BPMDisplay.SetXY( BPM_X, BPM_Y ); m_BPMDisplay.SetZoom( BPM_ZOOM ); this->AddChild( &m_BPMDisplay ); + m_Inventory.RefreshPossibleItems(); + this->AddChild( &m_Inventory ); + + + + if( !bDemonstration ) // only load if we're going to use it + { + m_Ready.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay ready") ); + this->AddChild( &m_Ready ); + + m_Go.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay go") ); + this->AddChild( &m_Go ); + + m_Cleared.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay cleared") ); + this->AddChild( &m_Cleared ); + + m_Failed.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay failed") ); + this->AddChild( &m_Failed ); + + if( GAMESTATE->IsFinalStage() ) // only load if we're going to use it + m_Extra.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay extra1") ); + if( GAMESTATE->IsExtraStage() ) // only load if we're going to use it + m_Extra.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay extra2") ); + this->AddChild( &m_Extra ); + + m_Toasty.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay toasty") ); + this->AddChild( &m_Toasty ); + + m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); + this->AddChild( &m_Back ); + + m_In.Load( THEME->GetPathTo("BGAnimations","ScreenGameplay in") ); + this->AddChild( &m_In ); + + + if( GAMESTATE->IsExtraStage() ) // only load if we're going to use it + { + m_textSurviveTime.LoadFromFont( THEME->GetPathTo("Fonts","survive time") ); + m_textSurviveTime.EnableShadow( false ); + m_textSurviveTime.SetXY( SURVIVE_TIME_X, SURVIVE_TIME_Y ); + m_textSurviveTime.SetText( "" ); + m_textSurviveTime.SetDiffuse( RageColor(1,1,1,0) ); + this->AddChild( &m_textSurviveTime ); + } + } + + /* LoadNextSong first, since that positions some elements which need to be * positioned before we TweenOnScreen. */ LoadNextSong(); TweenOnScreen(); - for( int i=0; i<30; i++ ) - this->SendScreenMessage( ScreenMessage(SM_User+i), i/2.0f ); // Send messages to we can get the introduction rolling - m_soundToasty.Load( THEME->GetPathTo("Sounds","gameplay toasty") ); - - if( !bDemonstration ) // don't load sounds if just playing demonstration + if( !bDemonstration ) // only load if we're going to use it { - m_soundFail.Load( THEME->GetPathTo("Sounds","gameplay failed") ); - m_soundTryExtraStage.Load( THEME->GetPathTo("Sounds","gameplay try extra stage") ); - m_soundOniDie.Load( THEME->GetPathTo("Sounds","gameplay oni die") ); - m_announcerReady.Load( ANNOUNCER->GetPathTo("gameplay ready") ); + m_soundFail.Load( THEME->GetPathTo("Sounds","ScreenGameplay failed") ); + m_soundTryExtraStage.Load( THEME->GetPathTo("Sounds","ScreenGameplay extra") ); + m_soundOniDie.Load( THEME->GetPathTo("Sounds","ScreenGameplay oni die") ); + m_announcerReady.Load( ANNOUNCER->GetPathTo("ScreenGameplay ready") ); if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) - m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("gameplay here we go extra") ); + m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("ScreenGameplay here we go extra") ); else if( GAMESTATE->IsFinalStage() ) - m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("gameplay here we go final") ); + m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("ScreenGameplay here we go final") ); else - m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("gameplay here we go normal") ); - m_announcerDanger.Load( ANNOUNCER->GetPathTo("gameplay comment danger") ); - m_announcerGood.Load( ANNOUNCER->GetPathTo("gameplay comment good") ); - m_announcerHot.Load( ANNOUNCER->GetPathTo("gameplay comment hot") ); - m_announcerOni.Load( ANNOUNCER->GetPathTo("gameplay comment oni") ); + m_announcerHereWeGo.Load( ANNOUNCER->GetPathTo("ScreenGameplay here we go normal") ); + m_announcerDanger.Load( ANNOUNCER->GetPathTo("ScreenGameplay comment danger") ); + m_announcerGood.Load( ANNOUNCER->GetPathTo("ScreenGameplay comment good") ); + m_announcerHot.Load( ANNOUNCER->GetPathTo("ScreenGameplay comment hot") ); + m_announcerOni.Load( ANNOUNCER->GetPathTo("ScreenGameplay comment oni") ); - m_announcer100Combo.Load( ANNOUNCER->GetPathTo("gameplay 100 combo") ); - m_announcer200Combo.Load( ANNOUNCER->GetPathTo("gameplay 200 combo") ); - m_announcer300Combo.Load( ANNOUNCER->GetPathTo("gameplay 300 combo") ); - m_announcer400Combo.Load( ANNOUNCER->GetPathTo("gameplay 400 combo") ); - m_announcer500Combo.Load( ANNOUNCER->GetPathTo("gameplay 500 combo") ); - m_announcer600Combo.Load( ANNOUNCER->GetPathTo("gameplay 600 combo") ); - m_announcer700Combo.Load( ANNOUNCER->GetPathTo("gameplay 700 combo") ); - m_announcer800Combo.Load( ANNOUNCER->GetPathTo("gameplay 800 combo") ); - m_announcer900Combo.Load( ANNOUNCER->GetPathTo("gameplay 900 combo") ); - m_announcer1000Combo.Load( ANNOUNCER->GetPathTo("gameplay 1000 combo") ); - m_announcerComboStopped.Load( ANNOUNCER->GetPathTo("gameplay combo stopped") ); + m_announcer100Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 100 combo") ); + m_announcer200Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 200 combo") ); + m_announcer300Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 300 combo") ); + m_announcer400Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 400 combo") ); + m_announcer500Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 500 combo") ); + m_announcer600Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 600 combo") ); + m_announcer700Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 700 combo") ); + m_announcer800Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 800 combo") ); + m_announcer900Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 900 combo") ); + m_announcer1000Combo.Load( ANNOUNCER->GetPathTo("ScreenGameplay 1000 combo") ); + m_announcerComboStopped.Load( ANNOUNCER->GetPathTo("ScreenGameplay combo stopped") ); + m_soundAssistTick.Load( THEME->GetPathTo("Sounds","ScreenGameplay assist tick") ); + m_soundToasty.Load( THEME->GetPathTo("Sounds","ScreenGameplay toasty") ); + } + + // + // Get the transitions rolling + // + if( bDemonstration ) + { + StartPlayingSong( 0, 0 ); // *kick* (no transitions) } else { - StartPlayingSong( 0, 0 ); + float fMinTimeToMusic = m_In.GetLengthSeconds(); // start of m_Ready + float fMinTimeToNotes = fMinTimeToMusic + m_Ready.GetLengthSeconds() + m_Go.GetLengthSeconds()+2; // end of Go + + /* + * Tell the music to start, but don't actually make any noise for + * at least 2.5 (or 1.5) seconds. (This is so we scroll on screen smoothly.) + * + * This is only a minimum: the music might be started later, to meet + * the minimum-time-to-notes value. If you're writing song data, + * and you want to make sure we get ideal timing here, make sure there's + * a bit of space at the beginning of the music with no steps. + */ + + /*float delay =*/ StartPlayingSong( fMinTimeToNotes, fMinTimeToMusic ); + + m_In.StartTransitioning( SM_PlayReady ); } - m_Inventory.RefreshPossibleItems(); - this->AddChild( &m_Inventory ); - - m_iRowLastCrossed = -1; - - m_soundAssistTick.Load( THEME->GetPathTo("Sounds","gameplay assist tick") ); } ScreenGameplay::~ScreenGameplay() @@ -729,7 +736,7 @@ bool ScreenGameplay::IsTimeToPlayTicks() const // will start coming out the speaker. Compensate for this by boosting // fPositionSeconds ahead float fPositionSeconds = GAMESTATE->m_fMusicSeconds; - fPositionSeconds += (SOUNDMAN->GetPlayLatency()+g_fTickEarlySecondsCache) * m_soundMusic.GetPlaybackRate(); + fPositionSeconds += (SOUNDMAN->GetPlayLatency()+(float)G_TICK_EARLY_SECONDS) * m_soundMusic.GetPlaybackRate(); float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds ); int iRowNow = BeatToNoteRowNotRounded( fSongBeat ); @@ -869,7 +876,7 @@ void ScreenGameplay::Update( float fDeltaTime ) } // - // Check to see if it's time to play a gameplay comment + // Check to see if it's time to play a ScreenGameplay comment // m_fTimeLeftBeforeDancingComment -= fDeltaTime; if( m_fTimeLeftBeforeDancingComment <= 0 ) @@ -936,7 +943,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ if( MenuI.IsValid() && MenuI.button == MENU_BUTTON_BACK && m_DancingState != STATE_OUTRO && - !m_Fade.IsClosing() ) + !m_Back.IsTransitioning() ) { if( PREFSMAN->m_bDelayedEscape && type==IET_FIRST_PRESS) { @@ -961,7 +968,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ (DeviceI.device!=DEVICE_KEYBOARD && type==IET_FAST_REPEAT) ) { m_DancingState = STATE_OUTRO; - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu back") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common back") ); /* Hmm. There are a bunch of subtly different ways we can * tween out: * 1. Keep rendering the song, and keep it moving. This might @@ -976,7 +983,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ m_soundMusic.StopPlaying(); this->ClearMessageQueue(); - m_Fade.CloseWipingLeft( SM_SaveChangedBeforeGoingBack ); + m_Back.StartTransitioning( SM_SaveChangedBeforeGoingBack ); return; } } @@ -992,7 +999,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ case SDLK_F6: m_bChangedOffsetOrBPM = true; GAMESTATE->m_SongOptions.m_bAutoSync = !GAMESTATE->m_SongOptions.m_bAutoSync; // toggle - PositionStatusIcons(); + UpdateOptionsText(); break; case SDLK_F7: if( GAMESTATE->m_SongOptions.m_AssistType == SongOptions::ASSIST_NONE ) @@ -1009,7 +1016,7 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ break; case SDLK_F8: PREFSMAN->m_bAutoPlay = !PREFSMAN->m_bAutoPlay; - PositionStatusIcons(); + UpdateOptionsText(); break; case SDLK_F9: case SDLK_F10: @@ -1094,35 +1101,17 @@ void ScreenGameplay::Input( const DeviceInput& DeviceI, const InputEventType typ } } -void ScreenGameplay::PositionStatusIcons() +void ScreenGameplay::UpdateOptionsText() { - bool status[NUM_STATUS_ICONS] = { - PREFSMAN->m_bAutoPlay, - GAMESTATE->m_SongOptions.m_bAutoSync - }; + CString sText; - vector vActorsToShow; + if( PREFSMAN->m_bAutoPlay ) + sText += "AutoPlay "; + if( GAMESTATE->m_SongOptions.m_bAutoSync ) + sText += "AutoSync "; - for( int i=0; iSetY( STATUS_ICONS_Y ); - if( vActorsToShow.size()-1 == 0 ) - vActorsToShow[a]->SetX( center_x ); - else - vActorsToShow[a]->SetX( SCALE(a, 0.0f, vActorsToShow.size()-1, left_most_x, right_most_x) ); - } + if( sText.length() > 0 ) + sText.resize( sText.length()-5 ); } void SaveChanges() @@ -1213,93 +1202,18 @@ void ShowSavePrompt( ScreenMessage SM_SendWhenDone ) void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { - int p; switch( SM ) { - // received while STATE_INTRO - case SM_User+0: - { - m_StarWipe.OpenWipingRight(SM_None); - - /* It may just be me, but having Here We Go start so late into the song - * ruins the rhythm of the announcer. MAX/EX starts Here We Go - * a fixed amount of time after Are You Ready. However, 1-5th - * start HWG a certain amount of time before the notes. - * We may want to metric this, but for now, leave it like MAX/EX. -Chris */ - - /* - * Don't actually reach any notes for at least 5.5 seconds. - * "Here We Go" takes about two seconds, we want a half second or so of - * a clear view, so we don't want any notes for 2.5 seconds, plus three - * seconds until we actually begin the HWG. - */ - const float MinTimeToNotes = 5.5f; - - /* - * Tell the music to start, but don't actually make any noise for - * at least 2.5 (or 1.5) seconds. (This is so we scroll on screen smoothly.) - * - * Use 1.5 seconds to (try to) start when "Ready" is fading in; - * 2.5 for when it's fading out. - * - * The last set of timings was aiming for 1. fade in "Ready", 2. fade - * out "Ready", 3. music starts, 4. fade in "HWG"; the current timing - * is 1. fade in "Ready" and start music, 2. fade out "Ready", 3. fade - * in "HWG". - * - * This is only a minimum: the music might be started later, to meet - * the minimum-time-to-notes value. If you're writing song data, - * and you want to make sure we get ideal timing here, make sure there's - * a bit of space at the beginning of the music with no steps. */ - const float MinTimeToMusic = 1.5f; - - float delay = StartPlayingSong( MinTimeToNotes, MinTimeToMusic ); - - /* Start the Here We Go sequence 2.5 seconds before notes, so we - * have time to fade in and fade out. */ - this->SendScreenMessage( SM_StartHereWeGo, 3.0f ); - // use this for HWG right as the notes are starting - // this->SendScreenMessage( SM_StartHereWeGo, delay - 3.0f ); - delay; /* hush compiler */ - } - break; - case SM_User+1: - break; - case SM_User+2: - m_sprReady.StartFocusing(); - m_announcerReady.PlayRandom(); - break; - case SM_User+3: - break; - case SM_User+4: - m_sprReady.StartBlurring(); - break; - case SM_User+5: + case SM_PlayReady: m_Background.FadeIn(); - break; - case SM_User+6: - break; - case SM_User+7: - break; - case SM_User+8: - break; - case SM_User+9: + m_announcerReady.PlayRandom(); + m_Ready.StartTransitioning( SM_PlayGo ); break; - case SM_StartHereWeGo: - /* We have 2.5 seconds until the notes start. */ - m_sprHereWeGo.StartFocusing(); + case SM_PlayGo: m_announcerHereWeGo.PlayRandom(); + m_Go.StartTransitioning( SM_None ); GAMESTATE->m_bPastHereWeGo = true; - - /* This gives the HWG about a second of screen time. */ - this->SendScreenMessage( SM_StopHereWeGo, 1.5f ); - break; - - case SM_StopHereWeGo: - /* We have one second until the notes start. */ - m_sprHereWeGo.StartBlurring(); - m_DancingState = STATE_DANCING; // STATE CHANGE! Now the user is allowed to press Back break; @@ -1341,25 +1255,29 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) } else // IsLastSong { - if( m_DancingState == STATE_OUTRO ) // gameplay already ended + if( m_DancingState == STATE_OUTRO ) // ScreenGameplay already ended return; // ignore m_DancingState = STATE_OUTRO; if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllFailedEarlier() ) { this->SendScreenMessage( SM_BeginFailed, 0 ); - return; } - - m_StarWipe.CloseWipingRight( SM_None ); - - // do they deserve an extra stage? - if( GAMESTATE->HasEarnedExtraStage() ) - this->SendScreenMessage( SM_ShowTryExtraStage, 1 ); - else + else // ! failed { - this->SendScreenMessage( SM_ShowCleared, 1 ); - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay cleared") ); + // do they deserve an extra stage? + if( GAMESTATE->HasEarnedExtraStage() ) + { + m_Extra.StartTransitioning( SM_GoToStateAfterCleared ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay extra") ); +// this->SendScreenMessage( SM_ShowTryExtraStage, 1 ); + } + else + { + m_Cleared.StartTransitioning( SM_GoToStateAfterCleared ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay cleared") ); +// this->SendScreenMessage( SM_ShowCleared, 1 ); + } } } } @@ -1377,20 +1295,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) case SM_BeginToasty: if( PREFSMAN->m_bEasterEggs ) { + m_Toasty.StartTransitioning(); m_soundToasty.Play(); - - // set off screen - m_sprToasty.StopTweening(); - m_sprToasty.SetDiffuse( RageColor(1,1,1,1) ); - m_sprToasty.SetX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 ); - m_sprToasty.SetY( SCREEN_BOTTOM-m_sprToasty.GetUnzoomedHeight()/2 ); - m_sprToasty.BeginTweening( 0.2f, Actor::TWEEN_ACCELERATE ); // slide on - m_sprToasty.SetTweenX( SCREEN_RIGHT-m_sprToasty.GetUnzoomedWidth()/2 ); - m_sprToasty.BeginTweening( 0.6f ); // sleep - m_sprToasty.BeginTweening( 0.3f, Actor::TWEEN_DECELERATE ); // slide off - m_sprToasty.SetTweenX( SCREEN_RIGHT+m_sprToasty.GetUnzoomedWidth()/2 ); - m_sprToasty.BeginTweening( 0.001f ); // fade out - m_sprToasty.SetDiffuse( RageColor(1,1,1,0) ); } break; @@ -1471,9 +1377,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_fTimeLeftBeforeDancingComment = SECONDS_BETWEEN_COMMENTS; } break; + - - // received while STATE_OUTRO +/* // received while STATE_OUTRO case SM_ShowCleared: m_sprCleared.BeginTweening(1.0f); m_sprCleared.SetTweenDiffuse( RageColor(1,1,1,1) ); @@ -1482,8 +1388,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_sprCleared.SetTweenDiffuse( RageColor(1,1,1,0) ); SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 4 ); break; - - case SM_ShowTryExtraStage: +*/ +/* case SM_ShowTryExtraStage: { m_soundTryExtraStage.PlayRandom(); @@ -1513,7 +1419,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 5 ); } break; - +*/ case SM_SaveChangedBeforeGoingBack: if( m_bChangedOffsetOrBPM ) { @@ -1522,8 +1428,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) } else this->SendScreenMessage( SM_GoToScreenAfterBack, 0 ); - break; + case SM_GoToScreenAfterBack: /* Reset options. (Should this be done in ScreenSelect*?) */ GAMESTATE->RestoreSelectedOptions(); @@ -1540,9 +1446,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) case PLAY_MODE_ENDLESS: SCREENMAN->SetNewScreen( "ScreenSelectCourse" ); break; - default: ASSERT(0); + default: + ASSERT(0); } break; + case SM_GoToStateAfterCleared: /* Reset options. (Should this be done in ScreenSelect*?) */ GAMESTATE->RestoreSelectedOptions(); @@ -1556,25 +1464,20 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) SCREENMAN->SetNewScreen( "ScreenEvaluation" ); break; - case SM_BeginFailed: m_DancingState = STATE_OUTRO; m_soundMusic.StopPlaying(); - m_StarWipe.SetTransitionTime( 1.5f ); - m_StarWipe.CloseWipingRight( SM_None ); - for( p=0; pIsPlayerEnabled(p) ) - m_Player[p].FadeToFail(); - - this->SendScreenMessage( SM_ShowFailed, 0.2f ); - break; - case SM_ShowFailed: +// m_Failed.StartTransitioning( SM_ShowFailed ); +// this->SendScreenMessage( SM_GoToScreenAfterFail, 0.2f ); +// SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.0f ); + m_Failed.StartTransitioning( SM_GoToScreenAfterFail ); m_soundFail.PlayRandom(); - // make the background invisible so we don't waste mem bandwidth drawing it + // make the background invisible so we don't waste power drawing it m_Background.BeginTweening( 1 ); m_Background.SetTweenDiffuse( RageColor(1,1,1,0) ); + /* m_sprFailed.SetZoom( 4 ); m_sprFailed.BeginBlurredTweening( 0.8f, TWEEN_DECELERATE ); m_sprFailed.SetTweenZoom( 0.5f ); // zoom out @@ -1588,7 +1491,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_sprFailed.BeginTweening( 2 ); // sleep m_sprFailed.BeginTweening( 1 ); m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0) ); - +*/ // show the survive time if extra stage if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) { @@ -1606,13 +1509,15 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_textSurviveTime.SetTweenDiffuse( RageColor(1,1,1,0) ); } - SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.0f ); - SCREENMAN->SendMessageToTopScreen( SM_GoToScreenAfterFail, 5.0f ); - break; - case SM_PlayFailComment: - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay failed") ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("ScreenGameplay failed") ); + +// SCREENMAN->SendMessageToTopScreen( SM_GoToScreenAfterFail, 5.0f ); break; +/* case SM_PlayFailComment: + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("ScreenGameplay failed") ); + break; +*/ case SM_GoToScreenAfterFail: /* Reset options. (Should this be done in ScreenSelect*?) */ GAMESTATE->RestoreSelectedOptions(); diff --git a/stepmania/src/ScreenGameplay.h b/stepmania/src/ScreenGameplay.h index c5694e8fa7..0f5205acb5 100644 --- a/stepmania/src/ScreenGameplay.h +++ b/stepmania/src/ScreenGameplay.h @@ -13,9 +13,7 @@ #include "Screen.h" #include "Sprite.h" -#include "TransitionFade.h" -#include "TransitionStarWipe.h" -#include "TransitionFadeWipe.h" +#include "TransitionBGAnimation.h" #include "TransitionOniFade.h" #include "BitmapText.h" #include "Player.h" @@ -105,7 +103,6 @@ protected: BitmapText m_textStageNumber; BitmapText m_textCourseSongNumber[NUM_PLAYERS]; - Sprite m_sprMiddleFrame; BPMDisplay m_BPMDisplay; Sprite m_sprScoreFrame; @@ -116,20 +113,19 @@ protected: BitmapText m_textDebug; BitmapText m_textLyrics; -#define NUM_STATUS_ICONS 2 - Sprite m_sprStatusIcons[NUM_STATUS_ICONS]; // shows whether these options are on. - void PositionStatusIcons(); // reposition the three above when the value of one changes + BitmapText m_textOptions; // for AutoPlay, AutoAdjust + void UpdateOptionsText(); BitmapText m_MaxCombo; - TransitionFadeWipe m_Fade; - TransitionStarWipe m_StarWipe; - - FocusingSprite m_sprReady; - FocusingSprite m_sprHereWeGo; - MotionBlurSprite m_sprCleared; - MotionBlurSprite m_sprFailed; - MotionBlurSprite m_sprTryExtraStage; + TransitionBGAnimation m_Ready; + TransitionBGAnimation m_Go; + TransitionBGAnimation m_Cleared; + TransitionBGAnimation m_Failed; + TransitionBGAnimation m_Extra; + TransitionBGAnimation m_Toasty; // easter egg + TransitionBGAnimation m_Back; + TransitionBGAnimation m_In; BitmapText m_textSurviveTime; // only shown in extra stage BitmapText m_StageName; @@ -147,8 +143,6 @@ protected: Sprite m_sprOniGameOver[NUM_PLAYERS]; void ShowOniGameOver( PlayerNumber pn ); - Sprite m_sprToasty; // easter egg - RandomSample m_soundFail; RandomSample m_soundOniDie; RandomSample m_soundTryExtraStage; diff --git a/stepmania/src/ScreenGameplayOptions.cpp b/stepmania/src/ScreenGameplayOptions.cpp index a49425a770..c807db6a9d 100644 --- a/stepmania/src/ScreenGameplayOptions.cpp +++ b/stepmania/src/ScreenGameplayOptions.cpp @@ -50,11 +50,7 @@ OptionRowData g_GameplayOptionsLines[NUM_GAMEPLAY_OPTIONS_LINES] = { }; ScreenGameplayOptions::ScreenGameplayOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","gameplay options"), - THEME->GetPathTo("Graphics","gameplay options page"), - THEME->GetPathTo("Graphics","gameplay options top edge") - ) + ScreenOptions("ScreenGameplayOptions",false) { LOG->Trace( "ScreenGameplayOptions::ScreenGameplayOptions()" ); @@ -72,9 +68,9 @@ ScreenGameplayOptions::ScreenGameplayOptions() : g_GameplayOptionsLines, NUM_GAMEPLAY_OPTIONS_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","machine options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMachineOptions music") ); } void ScreenGameplayOptions::ImportOptions() diff --git a/stepmania/src/ScreenGraphicOptions.cpp b/stepmania/src/ScreenGraphicOptions.cpp index 398a0640d9..886e387d5e 100644 --- a/stepmania/src/ScreenGraphicOptions.cpp +++ b/stepmania/src/ScreenGraphicOptions.cpp @@ -58,11 +58,7 @@ static const int TextureRes[] = { }; ScreenGraphicOptions::ScreenGraphicOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","graphic options"), - THEME->GetPathTo("Graphics","graphic options page"), - THEME->GetPathTo("Graphics","graphic options top edge") - ) + ScreenOptions("ScreenGraphicOptions",false) { LOG->Trace( "ScreenGraphicOptions::ScreenGraphicOptions()" ); @@ -80,9 +76,9 @@ ScreenGraphicOptions::ScreenGraphicOptions() : g_GraphicOptionsLines, NUM_GRAPHIC_OPTIONS_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","graphic options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenGraphicOptions music") ); } void ScreenGraphicOptions::ImportOptions() diff --git a/stepmania/src/ScreenHowToPlay.h b/stepmania/src/ScreenHowToPlay.h index 3bd5f636d3..de189dfec2 100644 --- a/stepmania/src/ScreenHowToPlay.h +++ b/stepmania/src/ScreenHowToPlay.h @@ -15,7 +15,7 @@ class ScreenHowToPlay : public ScreenAttract { public: - ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay","how to play") {}; + ScreenHowToPlay() : ScreenAttract("ScreenHowToPlay") {}; }; diff --git a/stepmania/src/ScreenInputOptions.cpp b/stepmania/src/ScreenInputOptions.cpp index 33ce40b333..f0a7e8e40d 100644 --- a/stepmania/src/ScreenInputOptions.cpp +++ b/stepmania/src/ScreenInputOptions.cpp @@ -45,11 +45,7 @@ OptionRowData g_InputOptionsLines[NUM_INPUT_OPTIONS_LINES] = { }; ScreenInputOptions::ScreenInputOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","input options"), - THEME->GetPathTo("Graphics","input options page"), - THEME->GetPathTo("Graphics","input options top edge") - ) + ScreenOptions("ScreenInputOptions",false) { LOG->Trace( "ScreenInputOptions::ScreenInputOptions()" ); @@ -67,9 +63,9 @@ ScreenInputOptions::ScreenInputOptions() : g_InputOptionsLines, NUM_INPUT_OPTIONS_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","input options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenInputOptions music") ); } void ScreenInputOptions::ImportOptions() diff --git a/stepmania/src/ScreenInstructions.cpp b/stepmania/src/ScreenInstructions.cpp index a25178e34d..a9b92fbfad 100644 --- a/stepmania/src/ScreenInstructions.cpp +++ b/stepmania/src/ScreenInstructions.cpp @@ -33,25 +33,14 @@ ScreenInstructions::ScreenInstructions() { LOG->Trace( "ScreenInstructions::ScreenInstructions()" ); - - m_Menu.Load( - THEME->GetPathTo("BGAnimations","Instructions"), - THEME->GetPathTo("Graphics","Instructions Top Edge"), - HELP_TEXT, false, true, TIMER_SECONDS - ); - this->AddChild( &m_Menu ); - - - if(!PREFSMAN->m_bInstructions) - { - this->SendScreenMessage( SM_GoToNextScreen, 0 ); - m_Menu.ImmedOffScreenToMenu(); - return; - } - // // Skip this screen unless someone chose easy or beginner // + if( !PREFSMAN->m_bInstructions ) + { + HandleScreenMessage( SM_GoToNextScreen ); + return; + } if( GAMESTATE->m_PlayMode == PLAY_MODE_ARCADE ) { Difficulty easiestDifficulty = (Difficulty)(NUM_DIFFICULTIES-1); @@ -63,37 +52,19 @@ ScreenInstructions::ScreenInstructions() } if( easiestDifficulty > DIFFICULTY_EASY ) { - // skip this screen - this->SendScreenMessage( SM_GoToNextScreen, 0 ); - m_Menu.ImmedOffScreenToMenu(); + HandleScreenMessage( SM_GoToNextScreen ); return; } } - - m_Menu.TweenOnScreenFromMenu( SM_None, true ); + m_Menu.Load("ScreenInstructions"); + this->AddChild( &m_Menu ); CString sHowToPlayPath; - switch( GAMESTATE->m_PlayMode ) - { - case PLAY_MODE_ARCADE: - sHowToPlayPath = THEME->GetPathTo("Graphics","instructions arcade"); - break; - case PLAY_MODE_NONSTOP: - sHowToPlayPath = THEME->GetPathTo("Graphics","instructions nonstop"); - break; - case PLAY_MODE_ONI: - sHowToPlayPath = THEME->GetPathTo("Graphics","instructions oni"); - break; - case PLAY_MODE_ENDLESS: - sHowToPlayPath = THEME->GetPathTo("Graphics","instructions endless"); - break; - case PLAY_MODE_BATTLE: - sHowToPlayPath = THEME->GetPathTo("Graphics","instructions battle"); - break; - default: - ASSERT(0); - } + if( GAMESTATE->m_PlayMode != PLAY_MODE_INVALID ) + sHowToPlayPath = THEME->GetPathTo("Graphics","ScreenInstructions "+PlayModeToString(GAMESTATE->m_PlayMode)) ; + else + RageException::Throw( "The PlayMode has not been set. A theme must set the PlayMode before showing ScreenInstructions." ); m_sprHowToPlay.Load( sHowToPlayPath ); m_sprHowToPlay.SetXY( CENTER_X, CENTER_Y ); @@ -104,7 +75,7 @@ ScreenInstructions::ScreenInstructions() m_sprHowToPlay.BeginTweening( 0.6f, Actor::TWEEN_ACCELERATE ); m_sprHowToPlay.SetTweenX( CENTER_X ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","instructions music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenInstructions music") ); } ScreenInstructions::~ScreenInstructions() @@ -122,13 +93,13 @@ void ScreenInstructions::Update( float fDeltaTime ) void ScreenInstructions::DrawPrimitives() { m_Menu.DrawBottomLayer(); + Screen::DrawPrimitives(); m_Menu.DrawTopLayer(); - Screen::DrawPrimitives(); // draw instructions graphic on top of all the others! } void ScreenInstructions::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) { - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; // default input handler @@ -168,12 +139,12 @@ void ScreenInstructions::HandleScreenMessage( const ScreenMessage SM ) void ScreenInstructions::MenuBack( PlayerNumber pn ) { - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenInstructions::MenuStart( PlayerNumber pn ) { - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); m_sprHowToPlay.StopTweening(); m_sprHowToPlay.BeginTweening( 0.3f, Actor::TWEEN_DECELERATE ); diff --git a/stepmania/src/ScreenIntroMovie.h b/stepmania/src/ScreenIntroMovie.h index d4dcceee25..09307978ba 100644 --- a/stepmania/src/ScreenIntroMovie.h +++ b/stepmania/src/ScreenIntroMovie.h @@ -16,7 +16,7 @@ class ScreenIntroMovie : public ScreenAttract { public: - ScreenIntroMovie() : ScreenAttract("ScreenIntroMovie","intro movie") { }; + ScreenIntroMovie() : ScreenAttract("ScreenIntroMovie") { }; void Update( float fDelta ); }; diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index d6fccfdb6d..d11c1dcce5 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -113,12 +113,12 @@ bool PrepareForJukebox() // always return true. GAMESTATE->m_SongOptions.m_LifeType = (randomf(0,1)>0.8f) ? SongOptions::LIFE_BATTERY : SongOptions::LIFE_BAR; GAMESTATE->m_SongOptions.m_FailType = SongOptions::FAIL_OFF; - GAMESTATE->m_bDemonstration = true; + GAMESTATE->m_bDemonstrationOrJukebox = true; return true; } -ScreenJukebox::ScreenJukebox() : ScreenGameplay(PrepareForJukebox()) // this is a hack to get some code to execute before the ScreenGameplay constructor +ScreenJukebox::ScreenJukebox( bool bDemonstration ) : ScreenGameplay( PrepareForJukebox() ) // this is a hack to get some code to execute before the ScreenGameplay constructor { LOG->Trace( "ScreenJukebox::ScreenJukebox()" ); @@ -128,13 +128,17 @@ ScreenJukebox::ScreenJukebox() : ScreenGameplay(PrepareForJukebox()) // this is return; } - m_Fade.OpenWipingRight(); + m_In.Load( THEME->GetPathTo("BGAnimations","ScreenDemonstration in") ); + this->AddChild( &m_In ); + m_In.StartTransitioning(); + + m_Out.Load( THEME->GetPathTo("BGAnimations","ScreenDemonstration out") ); + this->AddChild( &m_Out ); ClearMessageQueue(); // remove all of the messages set in ScreenGameplay that animate "ready", "here we go", etc. GAMESTATE->m_bPastHereWeGo = true; - m_StarWipe.SetOpened(); m_DancingState = STATE_DANCING; } @@ -147,10 +151,6 @@ ScreenJukebox::~ScreenJukebox() void ScreenJukebox::Update( float fDeltaTime ) { ScreenGameplay::Update( fDeltaTime ); - - // hide status icons - for( int i=0; iAddChild( &m_Selector ); - m_Menu.Load( - THEME->GetPathTo("BGAnimations","jukebox menu"), - THEME->GetPathTo("Graphics","jukebox menu top edge"), - HELP_TEXT, false, false, 99 - ); + m_Menu.Load( "ScreenJukeboxMenu" ); this->AddChild( &m_Menu ); @@ -56,14 +52,7 @@ ScreenJukeboxMenu::ScreenJukeboxMenu() m_textExplanation.SetZoom( 0.7f ); this->AddChild( &m_textExplanation ); - m_Fade.SetOpened(); - this->AddChild( &m_Fade); - - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","jukebox menu music") ); - - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - - m_Menu.TweenOnScreenFromBlack( SM_None ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenJukeboxMenu music") ); } @@ -121,7 +110,7 @@ void ScreenJukeboxMenu::MenuRight( PlayerNumber pn, const InputEventType type ) void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) { - if( m_Fade.IsClosing() || m_Fade.IsClosed() ) + if( m_Menu.IsTransitioning() ) return; Style style = m_Selector.GetSelectedStyle(); @@ -137,16 +126,13 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn ) SOUNDMAN->StopMusic(); - m_soundSelect.PlayRandom(); - m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false ); - m_Fade.CloseWipingRight( SM_None ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); } void ScreenJukeboxMenu::MenuBack( PlayerNumber pn ) { - m_Menu.TweenOffScreenToBlack( SM_None, true ); + m_Menu.StartTransitioning( SM_GoToPrevScreen ); SOUNDMAN->StopMusic(); - - m_Fade.CloseWipingLeft( SM_GoToPrevScreen ); } diff --git a/stepmania/src/ScreenJukeboxMenu.h b/stepmania/src/ScreenJukeboxMenu.h index 94d91f7d4a..ee534d5a32 100644 --- a/stepmania/src/ScreenJukeboxMenu.h +++ b/stepmania/src/ScreenJukeboxMenu.h @@ -36,16 +36,11 @@ private: void MenuBack( PlayerNumber pn ); void MenuStart( PlayerNumber pn ); - JukeboxMenu m_Selector; + JukeboxMenu m_Selector; BitmapText m_textExplanation; - MenuElements m_Menu; - - TransitionFade m_Fade; - - RandomSample m_soundSelect; - RandomSample m_soundCreate; + MenuElements m_Menu; }; diff --git a/stepmania/src/ScreenLogo.cpp b/stepmania/src/ScreenLogo.cpp index 897c26ee56..5f101f11e3 100644 --- a/stepmania/src/ScreenLogo.cpp +++ b/stepmania/src/ScreenLogo.cpp @@ -17,44 +17,28 @@ #include "RageLog.h" #include "SongManager.h" -#define LOGO_X THEME->GetMetricF("ScreenLogo","LogoX") -#define LOGO_Y THEME->GetMetricF("ScreenLogo","LogoY") -#define VERSION_X THEME->GetMetricF("ScreenLogo","VersionX") -#define VERSION_Y THEME->GetMetricF("ScreenLogo","VersionY") -#define SONGS_X THEME->GetMetricF("ScreenLogo","SongsX") -#define SONGS_Y THEME->GetMetricF("ScreenLogo","SongsY") +#define LOGO_ON_COMMAND THEME->GetMetric("ScreenLogo","LogoOnCommand") +#define VERSION_ON_COMMAND THEME->GetMetric("ScreenLogo","VersionOnCommand") +#define SONGS_ON_COMMAND THEME->GetMetric("ScreenLogo","SongsOnCommand") -ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo","logo") +ScreenLogo::ScreenLogo() : ScreenAttract("ScreenLogo") { - m_sprLogo.Load( THEME->GetPathTo("Graphics",ssprintf("logo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) ); - m_sprLogo.SetXY( LOGO_X, LOGO_Y ); - m_sprLogo.SetGlow( RageColor(1,1,1,1) ); - m_sprLogo.SetZoomY( 0 ); - m_sprLogo.StopTweening(); - m_sprLogo.BeginTweening( 0.5f ); // sleep - m_sprLogo.BeginTweening( 0.5f, Actor::TWEEN_BOUNCE_END ); - m_sprLogo.SetEffectGlowShift(2.5f, RageColor(1,1,1,0.1f), RageColor(1,1,1,0.3f) ); - m_sprLogo.SetTweenZoom( 1 ); + m_sprLogo.Load( THEME->GetPathTo("Graphics",ssprintf("ScreenLogo %s",GAMESTATE->GetCurrentGameDef()->m_szName)) ); + m_sprLogo.Command( LOGO_ON_COMMAND ); this->AddChild( &m_sprLogo ); m_textVersion.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); m_textVersion.SetText( "CVS" ); - m_textVersion.SetDiffuse( RageColor(0.6f,0.6f,0.6f,1) ); // light gray - m_textVersion.SetXY( VERSION_X, VERSION_Y ); - m_textVersion.SetZoom( 0.5f ); - m_textVersion.SetShadowLength( 2 ); + m_textVersion.Command( VERSION_ON_COMMAND ); this->AddChild( &m_textVersion ); m_textSongs.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); - m_textSongs.SetHorizAlign( Actor::align_left ); m_textSongs.SetText( ssprintf("%d songs in %d groups, %d courses", SONGMAN->GetNumSongs(), SONGMAN->GetNumGroups(), SONGMAN->GetNumCourses()) ); - m_textSongs.SetDiffuse( RageColor(0.6f,0.6f,0.6f,1) ); // light gray - m_textSongs.SetXY( SONGS_X, SONGS_Y ); - m_textSongs.SetZoom( 0.5f ); - m_textSongs.SetShadowLength( 2 ); + m_textSongs.Command( SONGS_ON_COMMAND ); this->AddChild( &m_textSongs ); - this->MoveToTail( &(ScreenAttract::m_Fade) ); // put it in the back so it covers up the stuff we just added + this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added + this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added } diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index b3bffc289f..1e7a0d25d5 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -52,11 +52,7 @@ OptionRowData g_MachineOptionsLines[NUM_MACHINE_OPTIONS_LINES] = { }; ScreenMachineOptions::ScreenMachineOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","machine options"), - THEME->GetPathTo("Graphics","machine options page"), - THEME->GetPathTo("Graphics","machine options top edge") - ) + ScreenOptions("ScreenMachineOptions",false) { LOG->Trace( "ScreenMachineOptions::ScreenMachineOptions()" ); @@ -74,9 +70,9 @@ ScreenMachineOptions::ScreenMachineOptions() : g_MachineOptionsLines, NUM_MACHINE_OPTIONS_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","machine options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMachineOptions music") ); } void ScreenMachineOptions::ImportOptions() diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 6ca0eae32a..a2a0e27574 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -54,8 +54,8 @@ ScreenManager::ScreenManager() m_textSystemMessage.SetHorizAlign( Actor::align_left ); m_textSystemMessage.SetVertAlign( Actor::align_top ); m_textSystemMessage.SetXY( 4.0f, 4.0f ); - m_textSystemMessage.SetZoom( 0.7f ); -// m_textSystemMessage.SetShadowLength( 2 ); + m_textSystemMessage.SetZoom( 0.8f ); + m_textSystemMessage.SetShadowLength( 2 ); m_textSystemMessage.SetDiffuse( RageColor(1,1,1,0) ); m_textSysTime.LoadFromFont( THEME->GetPathTo("Fonts","normal") ); @@ -74,7 +74,7 @@ ScreenManager::~ScreenManager() EmptyDeleteQueue(); - // delete current states + // delete current Screens for( unsigned i=0; iIsFirstUpdate() ) pScreen->Update( 0 ); @@ -143,9 +144,7 @@ void ScreenManager::Draw() for( unsigned i=0; iDraw(); - - if( m_textSystemMessage.GetDiffuse().a != 0 ) - m_textSystemMessage.Draw(); + m_textSystemMessage.Draw(); if( PREFSMAN && PREFSMAN->m_bShowStats ) { @@ -227,12 +226,23 @@ void ScreenManager::SetNewScreen( CString sClassName ) RageTimer t; + Screen* pOldTopScreen = m_ScreenStack.empty() ? NULL : m_ScreenStack.back(); + // It makes sense that ScreenManager should allocate memory for a new screen since it // deletes it later on. This also convention will reduce includes because screens won't // have to include each other's headers of other screens. Screen* pNewScreen = MakeNewScreen(sClassName); LOG->Trace( "Loaded %s in %f", sClassName.GetString(), t.GetDeltaTime()); + if( pOldTopScreen!=NULL && m_ScreenStack.back()!=pOldTopScreen ) + { + // While constructing this Screen, it's constructor called + // SetNewScreen again! That SetNewScreen Command should + // override this older one. + SAFE_DELETE( pNewScreen ); + return; + } + SetNewScreen( pNewScreen ); /* If this is a system menu, don't let the operator key touch it! @@ -242,8 +252,10 @@ void ScreenManager::SetNewScreen( CString sClassName ) sClassName == "ScreenGraphicOptions" || sClassName == "ScreenGameplayOptions" || sClassName == "ScreenMapControllers" || sClassName == "ScreenPlayerOptions" || sClassName == "ScreenAppearanceOptions" || sClassName == "ScreenEdit" || - sClassName == "ScreenEditMenu" || sClassName == "ScreenSoundOptions") GAMESTATE->m_bIsOnSystemMenu = true; - else GAMESTATE->m_bIsOnSystemMenu = false; + sClassName == "ScreenEditMenu" || sClassName == "ScreenSoundOptions") + GAMESTATE->m_bIsOnSystemMenu = true; + else + GAMESTATE->m_bIsOnSystemMenu = false; } void ScreenManager::AddNewScreenToTop( CString sClassName ) @@ -294,15 +306,15 @@ void ScreenManager::SendMessageToTopScreen( ScreenMessage SM, float fDelay ) void ScreenManager::SystemMessage( CString sMessage ) { - // Look for an open spot m_textSystemMessage.StopTweening(); m_textSystemMessage.SetText( sMessage ); m_textSystemMessage.SetDiffuse( RageColor(1,1,1,1) ); + m_textSystemMessage.SetX( -640 ); + m_textSystemMessage.BeginTweening( 0.3f ); + m_textSystemMessage.SetX( 4 ); m_textSystemMessage.BeginTweening( 5 ); - m_textSystemMessage.BeginTweening( 1 ); + m_textSystemMessage.BeginTweening( 0.3f ); m_textSystemMessage.SetTweenDiffuse( RageColor(1,1,1,0) ); - - LOG->Trace( "WARNING: Didn't find an empty system messages slot." ); } void ScreenManager::RefreshCreditsMessages() @@ -329,9 +341,9 @@ void ScreenManager::RefreshCreditsMessages() case PrefsManager::COIN_PAY: { int Coins = GAMESTATE->m_iCoins % PREFSMAN->m_iCoinsPerCredit; - CString txt = ssprintf("CREDIT(S) %d ", GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit); + CString txt = ssprintf("CREDIT(S) %d", GAMESTATE->m_iCoins / PREFSMAN->m_iCoinsPerCredit); if (Coins) - txt += ssprintf(" (%d / %d)", Coins, PREFSMAN->m_iCoinsPerCredit ); + txt += ssprintf(" %d/%d", Coins, PREFSMAN->m_iCoinsPerCredit ); m_textCreditInfo[p].SetText(txt); } break; diff --git a/stepmania/src/ScreenMapControllers.cpp b/stepmania/src/ScreenMapControllers.cpp index 8f1dc14de1..1b1bcbcd33 100644 --- a/stepmania/src/ScreenMapControllers.cpp +++ b/stepmania/src/ScreenMapControllers.cpp @@ -93,15 +93,10 @@ ScreenMapControllers::ScreenMapControllers() m_bWaitingForPress = false; - m_Menu.Load( - THEME->GetPathTo("BGAnimations","map controllers"), - THEME->GetPathTo("Graphics","map controllers top edge"), - HELP_TEXT, false, false, 99 - ); - m_Menu.TweenOnScreenFromBlack( SM_None ); + m_Menu.Load( "ScreenMapControllers", false ); // no timer this->AddChild( &m_Menu ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","map controllers music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMapControllers music") ); Refresh(); } @@ -240,7 +235,8 @@ void ScreenMapControllers::Input( const DeviceInput& DeviceI, const InputEventTy m_iCurButton++; break; case SDLK_ESCAPE: /* Quit the screen. */ - m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, true ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); break; case SDLK_RETURN: /* Change the selection. */ m_bWaitingForPress = true; diff --git a/stepmania/src/ScreenMemoryCard.h b/stepmania/src/ScreenMemoryCard.h index 549e9bfecb..eb9fc1862d 100644 --- a/stepmania/src/ScreenMemoryCard.h +++ b/stepmania/src/ScreenMemoryCard.h @@ -15,7 +15,7 @@ class ScreenMemoryCard : public ScreenAttract { public: - ScreenMemoryCard() : ScreenAttract("ScreenMemoryCard","memory card") { }; + ScreenMemoryCard() : ScreenAttract("ScreenMemoryCard") { }; }; diff --git a/stepmania/src/ScreenMiniMenu.cpp b/stepmania/src/ScreenMiniMenu.cpp index 07798e89af..6974940b35 100644 --- a/stepmania/src/ScreenMiniMenu.cpp +++ b/stepmania/src/ScreenMiniMenu.cpp @@ -212,7 +212,7 @@ void ScreenMiniMenu::MenuStart( PlayerNumber pn ) { m_Fade.OpenWipingRight( SM_GoToOK ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); s_iLastLine = m_iCurLine; COPY( s_iLastAnswers, m_iCurAnswers ); diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index b8e254bab1..3439985c65 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -191,7 +191,7 @@ ScreenMusicScroll::ScreenMusicScroll() SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("music scroll") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","music scroll music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenMusicScroll music") ); m_Fade.OpenWipingRight(); } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 694a1f77fc..bcca12f5bf 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -127,7 +127,7 @@ ScreenNameEntry::ScreenNameEntry() GAMESTATE->m_bPastHereWeGo = true; // enable the gray arrows - m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","name entry") ); + m_Background.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenNameEntry background") ); this->AddChild( &m_Background ); for( int p=0; pAddChild( &m_Fade ); // draw and update this manually too - m_soundStep.Load( THEME->GetPathTo("Sounds","name entry step") ); + m_soundStep.Load( THEME->GetPathTo("Sounds","ScreenNameEntry step") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","name entry music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenNameEntry music") ); m_fFakeBeat = 0; } diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index d0f5d78f1b..a0b88b7288 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -45,26 +45,22 @@ const ScreenMessage SM_PlaySample = ScreenMessage(SM_User-4); const ScreenMessage SM_TweenOffScreen = ScreenMessage(SM_User-7); -ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath ) +ScreenOptions::ScreenOptions( CString sClassName, bool bEnableTimer ) { LOG->Trace( "ScreenOptions::ScreenOptions()" ); - m_SoundChangeCol.Load( THEME->GetPathTo("Sounds","option change col") ); - m_SoundNextRow.Load( THEME->GetPathTo("Sounds","option next row") ); - m_SoundPrevRow.Load( THEME->GetPathTo("Sounds","option prev row") ); - m_SoundStart.Load( THEME->GetPathTo("Sounds","menu start") ); + m_SoundChangeCol.Load( THEME->GetPathTo("Sounds","ScreenOptions change") ); + m_SoundNextRow.Load( THEME->GetPathTo("Sounds","ScreenOptions next") ); + m_SoundPrevRow.Load( THEME->GetPathTo("Sounds","ScreenOptions prev") ); + m_SoundStart.Load( THEME->GetPathTo("Sounds","Common start") ); - m_Menu.Load( - sBackgroundPath, - sTopEdgePath, - HELP_TEXT, false, true, TIMER_SECONDS - ); + m_Menu.Load( sClassName, bEnableTimer, false ); // no style icon this->AddChild( &m_Menu ); // add everything to m_framePage so we can animate everything at once this->AddChild( &m_framePage ); - m_sprPage.Load( sPagePath ); + m_sprPage.Load( THEME->GetPathTo("Graphics",sClassName+" page") ); m_sprPage.SetXY( CENTER_X, CENTER_Y ); m_framePage.AddChild( &m_sprPage ); @@ -76,10 +72,6 @@ ScreenOptions::ScreenOptions( CString sBackgroundPath, CString sPagePath, CStrin m_iSelectedOption[p][l] = 0; } - m_Menu.TweenOnScreenFromBlack( SM_None ); - m_Wipe.OpenWipingRight(SM_None); - this->AddChild( &m_Wipe ); - m_framePage.SetX( SCREEN_LEFT-SCREEN_WIDTH ); m_framePage.BeginTweening( 0.3f, Actor::TWEEN_DECELERATE ); m_framePage.SetTweenX( 0 ); @@ -198,7 +190,7 @@ void ScreenOptions::InitOptionsText() Sprite &arrow = m_sprLineArrows[i]; - arrow.Load( THEME->GetPathTo("Graphics","options arrow") ); + arrow.Load( THEME->GetPathTo("Graphics","ScreenOptions bullet") ); arrow.SetXY( ARROWS_X, fY ); @@ -211,7 +203,7 @@ void ScreenOptions::InitOptionsText() option.LoadFromFont( THEME->GetPathTo("Fonts","option item") ); option.SetText( optline.szOptionsText[j] ); option.SetZoom( ITEMS_ZOOM ); - option.SetShadowLength( 2 ); + option.EnableShadow( false ); // set the XY position of each item in the line float fItemWidth = option.GetWidestLineWidthInSourcePixels() * option.GetZoomX(); @@ -415,7 +407,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) this->SendScreenMessage( SM_TweenOffScreen, 0 ); break; case SM_GoToPrevScreen: - this->ExportOptions(); +// this->ExportOptions(); // Don't save options if we're going back! this->GoToPrevState(); break; case SM_GoToNextScreen: @@ -423,10 +415,10 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) this->GoToNextState(); break; case SM_TweenOffScreen: - m_Menu.TweenOffScreenToBlack( SM_None, false ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); m_SoundStart.Play(); - m_Wipe.CloseWipingRight( SM_GoToNextScreen ); + m_Wipe.CloseWipingRight( ); m_framePage.BeginTweening( 0.3f, Actor::TWEEN_ACCELERATE ); m_framePage.SetTweenX( SCREEN_RIGHT ); @@ -453,9 +445,7 @@ void ScreenOptions::MenuBack( PlayerNumber pn ) { Screen::MenuBack( pn ); - m_Menu.TweenOffScreenToBlack( SM_None, true ); - - m_Wipe.CloseWipingLeft( SM_GoToPrevScreen ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenOptions::StartGoToNextState() diff --git a/stepmania/src/ScreenOptions.h b/stepmania/src/ScreenOptions.h index 9065efe479..f9621a9727 100644 --- a/stepmania/src/ScreenOptions.h +++ b/stepmania/src/ScreenOptions.h @@ -45,7 +45,7 @@ enum InputMode class ScreenOptions : public Screen { public: - ScreenOptions( CString sBackgroundPath, CString sPagePath, CString sTopEdgePath ); + ScreenOptions( CString sClassName, bool bEnableTimer ); void Init( InputMode im, OptionRowData OptionRowData[], int iNumOptionLines, bool bUseIcons ); virtual ~ScreenOptions(); virtual void Update( float fDeltaTime ); diff --git a/stepmania/src/ScreenOptionsMenu.cpp b/stepmania/src/ScreenOptionsMenu.cpp index 2b0ddf70af..6c72eb749e 100644 --- a/stepmania/src/ScreenOptionsMenu.cpp +++ b/stepmania/src/ScreenOptionsMenu.cpp @@ -49,11 +49,7 @@ OptionRowData g_OptionsMenuLines[NUM_OPTIONS_MENU_LINES] = { }; ScreenOptionsMenu::ScreenOptionsMenu() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","options menu"), - THEME->GetPathTo("Graphics","options menu page"), - THEME->GetPathTo("Graphics","options menu top edge") - ) + ScreenOptions("ScreenOptionsMenu",false) { LOG->Trace( "ScreenOptionsMenu::ScreenOptionsMenu()" ); @@ -71,10 +67,10 @@ ScreenOptionsMenu::ScreenOptionsMenu() : g_OptionsMenuLines, NUM_OPTIONS_MENU_LINES, false ); - m_Menu.SetTimer( 99 ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.SetTimer( 99 ); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","options menu music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenOptionsMenu music") ); } /* We depend on the SM options navigation for this screen, not arcade. */ diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index 8b4fc2b1b8..e6076063b5 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -49,11 +49,7 @@ OptionRowData g_PlayerOptionsLines[NUM_PLAYER_OPTIONS_LINES] = { ScreenPlayerOptions::ScreenPlayerOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","player options"), - THEME->GetPathTo("Graphics","player options page"), - THEME->GetPathTo("Graphics","player options top edge") - ) + ScreenOptions("ScreenPlayerOptions",true) { LOG->Trace( "ScreenPlayerOptions::ScreenPlayerOptions()" ); diff --git a/stepmania/src/ScreenPrompt.cpp b/stepmania/src/ScreenPrompt.cpp index 4121f9ec71..ed6d4139eb 100644 --- a/stepmania/src/ScreenPrompt.cpp +++ b/stepmania/src/ScreenPrompt.cpp @@ -79,7 +79,7 @@ ScreenPrompt::ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, bool b m_textAnswer[m_bAnswer].SetEffectGlowShift(); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu prompt") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenMenuPrompt music.mp3") ); } void ScreenPrompt::Update( float fDeltaTime ) @@ -151,7 +151,7 @@ void ScreenPrompt::MenuRight( PlayerNumber pn ) m_rectAnswerBox.SetTweenXY( m_textAnswer[m_bAnswer].GetX(), m_textAnswer[m_bAnswer].GetY() ); m_rectAnswerBox.SetTweenZoomX( m_textAnswer[m_bAnswer].GetWidestLineWidthInSourcePixels()+10.0f ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","edit change line") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","ScreenPrompt change") ); } void ScreenPrompt::MenuStart( PlayerNumber pn ) @@ -171,7 +171,7 @@ void ScreenPrompt::MenuStart( PlayerNumber pn ) m_textAnswer[1].BeginTweening( 0.2f ); m_textAnswer[1].SetTweenDiffuse( RageColor(1,1,1,0) ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); if( m_bAnswer ) if( m_pOnYes ) diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index 7ddfb71067..b98f8ee8eb 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -45,7 +45,7 @@ const ScreenMessage SM_ShowNextPage = (ScreenMessage)(SM_User+67); const ScreenMessage SM_HidePage = (ScreenMessage)(SM_User+68); -ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking") +ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking") { m_textCategory.LoadFromFont( THEME->GetPathTo("Fonts","Header2") ); m_textCategory.EnableShadow( false ); @@ -59,7 +59,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking") for( int i=0; iGetPathTo("Graphics",("ranking bullets 1x5")) ); + m_sprBullets[i].Load( THEME->GetPathTo("Graphics",("ScreenRanking bullets 1x5")) ); m_sprBullets[i].SetXY( BULLETS_START_X+LINE_SPACING_X*i, BULLETS_START_Y+LINE_SPACING_Y*i ); m_sprBullets[i].SetDiffuse( RageColor(1,1,1,0) ); m_sprBullets[i].StopAnimating(); @@ -149,7 +149,8 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking","ranking") } } - this->MoveToTail( &m_Fade ); + this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added + this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow @@ -160,9 +161,10 @@ void ScreenRanking::HandleScreenMessage( const ScreenMessage SM ) { switch( SM ) { - case SM_BeginFadingOut: - m_Fade.CloseWipingRight(SM_GoToNextScreen); - break; + // redundant +// case SM_BeginFadingOut: +// m_Out.CloseWipingRight(SM_GoToNextScreen); +// break; case SM_ShowNextPage: if( m_vPagesToShow.size() > 0 ) { @@ -173,7 +175,7 @@ void ScreenRanking::HandleScreenMessage( const ScreenMessage SM ) } else { - m_Fade.CloseWipingRight(SM_GoToNextScreen); + m_Out.StartTransitioning(SM_GoToNextScreen); } break; case SM_HidePage: diff --git a/stepmania/src/ScreenSelect.cpp b/stepmania/src/ScreenSelect.cpp index ac8ad008d1..4404481090 100644 --- a/stepmania/src/ScreenSelect.cpp +++ b/stepmania/src/ScreenSelect.cpp @@ -26,14 +26,10 @@ #include "ModeChoice.h" -#define CHOICES_TYPE THEME->GetMetricI(m_sClassName,"ChoicesType") #define CHOICES THEME->GetMetric (m_sClassName,"Choices") #define HELP_TEXT THEME->GetMetric (m_sClassName,"HelpText") #define TIMER_SECONDS THEME->GetMetricI(m_sClassName,"TimerSeconds") -#define NEXT_SCREEN THEME->GetMetric (m_sClassName,"NextScreen") -#define NEXT_SCREEN_ARCADE THEME->GetMetric (m_sClassName,"NextScreenArcade") -#define NEXT_SCREEN_ONI THEME->GetMetric (m_sClassName,"NextScreenOni") -#define NEXT_SCREEN_BATTLE THEME->GetMetric (m_sClassName,"NextScreenBattle") +#define NEXT_SCREEN( choice ) THEME->GetMetric (m_sClassName,ssprintf("NextScreen%d",choice+1)) ScreenSelect::ScreenSelect( CString sClassName ) @@ -42,190 +38,102 @@ ScreenSelect::ScreenSelect( CString sClassName ) m_sClassName = sClassName; - - m_type = (ChoicesType)CHOICES_TYPE; - m_sClassName = sClassName; + GAMESTATE->m_bPlayersCanJoin = false; + // Set this true later if we discover a choice that chooses the Style - GAMESTATE->m_bPlayersCanJoin = (m_type==CHOICES_STYLE)||(m_type==CHOICES_MODE); + CStringArray asChoices; + split( CHOICES, ",", asChoices ); - - switch( m_type ) + for( unsigned c=0; c aStyles; - GAMEMAN->GetStylesForGame( GAMESTATE->m_CurGame, aStyles ); - ASSERT( !aStyles.empty() ); // every game should have at least one Style, or else why have the Game? :-) + CString sBit = asBits[b]; - for( unsigned s=0; sStringToGameType( sBit ); + if( game != GAME_INVALID ) { - Style style = aStyles[s]; - const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(aStyles[s]); + mc.game = game; + continue; + } - int iNumSidesJoinedToPlay; - switch( pStyleDef->m_StyleType ) - { - case StyleDef::ONE_PLAYER_ONE_CREDIT: iNumSidesJoinedToPlay = 1; break; - case StyleDef::TWO_PLAYERS_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break; - case StyleDef::ONE_PLAYER_TWO_CREDITS: iNumSidesJoinedToPlay = 2; break; - default: ASSERT(0); iNumSidesJoinedToPlay = 1; - } - - ModeChoice mc = { - GAMESTATE->m_CurGame, - style, - PLAY_MODE_INVALID, - DIFFICULTY_INVALID, - "", - iNumSidesJoinedToPlay - }; - strcpy( mc.name, pStyleDef->m_szName ); - m_aModeChoices.push_back( mc ); + Style style = GAMEMAN->GameAndStringToStyle( GAMESTATE->m_CurGame, sBit ); + if( style != STYLE_INVALID ) + { + mc.style = style; + // There is a choices that allows players to choose a style. Allow joining. + GAMESTATE->m_bPlayersCanJoin = true; + continue; + } + + PlayMode pm = StringToPlayMode( sBit ); + if( pm != PLAY_MODE_INVALID ) + { + mc.pm = pm; + continue; + } + + Difficulty dc = StringToDifficulty( sBit ); + if( dc != DIFFICULTY_INVALID ) + { + mc.dc = dc; + continue; + } + + LOG->Warn( "The choice token '%s' is not recognized as a Game, Style, PlayMode, or Difficulty. The choice containing this token will be ignored.", sBit.GetString() ); + bChoiceIsInvalid |= true; + } + + if( mc.style != STYLE_INVALID ) + { + const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(mc.style); + switch( pStyleDef->m_StyleType ) + { + case StyleDef::ONE_PLAYER_ONE_CREDIT: + mc.numSidesJoinedToPlay = 1; + break; + case StyleDef::TWO_PLAYERS_TWO_CREDITS: + case StyleDef::ONE_PLAYER_TWO_CREDITS: + mc.numSidesJoinedToPlay = 2; + break; + default: + ASSERT(0); } } - break; - case CHOICES_MODE: - { - CStringArray asChoices; - split( CHOICES, ",", asChoices ); - for( unsigned c=0; cm_CurGame, - STYLE_INVALID, - PLAY_MODE_INVALID, - DIFFICULTY_INVALID, - "", - 1 }; - - CStringArray asBits; - split( asChoices[c], "-", asBits ); - - if( asBits.size() != 3 ) - RageException::Throw( - "The mode choice '%s' is invalid. Mode choices must be in the format " - "'style-playmode-difficulty'", asChoices[c].GetString() ); - - mc.game = GAMESTATE->m_CurGame; - - mc.style = GAMEMAN->GameAndStringToStyle( mc.game, asBits[0] ); - if( mc.style == STYLE_INVALID ) - RageException::Throw( - "The specified style '%s' in the mode choice '%s' is invalid.", asBits[0].GetString(), asChoices[c].GetString() ); + if( ! bChoiceIsInvalid ) + m_aModeChoices.push_back( mc ); - mc.pm = StringToPlayMode( asBits[1] ); - if( mc.pm == PLAY_MODE_INVALID ) - RageException::Throw( - "The specified play mode '%s' in the mode choice '%s' is invalid.", asBits[1].GetString(), asChoices[c].GetString() ); - - mc.dc = StringToDifficulty( asBits[2] ); - if( mc.dc == DIFFICULTY_INVALID ) - RageException::Throw( - "The specified difficulty '%s' in the mode choice '%s' is invalid.", asBits[2].GetString(), asChoices[c].GetString() ); - - strcpy( mc.name, asChoices[c] ); - - const StyleDef* pStyleDef = GAMEMAN->GetStyleDefForStyle(mc.style); - switch( pStyleDef->m_StyleType ) - { - case StyleDef::ONE_PLAYER_ONE_CREDIT: - mc.numSidesJoinedToPlay = 1; - break; - case StyleDef::TWO_PLAYERS_TWO_CREDITS: - case StyleDef::ONE_PLAYER_TWO_CREDITS: - mc.numSidesJoinedToPlay = 2; - break; - default: - ASSERT(0); - } - - m_aModeChoices.push_back( mc ); - } - } - break; - case CHOICES_DIFFICULTY: - { - if( GAMESTATE->m_CurStyle == STYLE_INVALID ) - RageException::Throw( "The current Style has not been set. A theme must set the style before it can display a difficulty selection screen." ); - - CStringArray asBits; - split( CHOICES, ",", asBits ); - - unsigned choice; - - for( choice=0; choicem_CurGame, - GAMESTATE->m_CurStyle, - PLAY_MODE_ARCADE, - dc, - "", - GAMESTATE->GetNumSidesJoined() }; - strcpy( mc.name, DifficultyToString(dc) ); - m_aModeChoices.push_back( mc ); - } - else if( pm!=PLAY_MODE_INVALID ) // valid play mode - { - ModeChoice mc = { - GAMESTATE->m_CurGame, - GAMESTATE->m_CurStyle, - pm, - DIFFICULTY_MEDIUM, - "", - GAMESTATE->GetNumSidesJoined() }; - strcpy( mc.name, PlayModeToString(pm) ); - m_aModeChoices.push_back( mc ); - } - else - RageException::Throw( "Invalid Choice%d value '%s'.", choice+1, asBits[choice].GetString() ); - } - } - break; - case CHOICES_GAME: - ASSERT(0); // TODO - break; - } - - - for( unsigned c=0; cGetPathToOptional("BGAnimations",ssprintf("%s %s",m_sClassName.GetString(),m_aModeChoices[c].name)); + + CString sBGAnimationDir = THEME->GetPathToOptional("BGAnimations",ssprintf("%s %s",m_sClassName.GetString(),mc.name)); if( sBGAnimationDir == "" ) - sBGAnimationDir = THEME->GetPathTo("BGAnimations",m_sClassName.GetString()); + sBGAnimationDir = THEME->GetPathTo("BGAnimations",m_sClassName+" background"); m_BGAnimations[c].LoadFromAniDir( sBGAnimationDir ); } - m_Menu.Load( - "", // don't load any BGAnimation. We have our own. - THEME->GetPathTo("Graphics",m_sClassName+" top edge"), - HELP_TEXT, false, true, TIMER_SECONDS - ); + m_Menu.Load( sClassName, true, false ); // don't load any BGAnimation. We have our own. this->AddChild( &m_Menu ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(m_sClassName+" intro") ); SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds",m_sClassName+" music") ); - - switch( m_type ) - { - case CHOICES_STYLE: - case CHOICES_MODE: - // This is probably the first screen in the menu sequence. - m_Menu.TweenOnScreenFromBlack( SM_None ); - break; - case CHOICES_DIFFICULTY: - // This is probably not the first screen in the menu sequence. - m_Menu.TweenOnScreenFromMenu( SM_None ); - break; - } } @@ -255,10 +163,8 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type, if( MenuI.IsValid() && MenuI.button==MENU_BUTTON_START ) { PlayerNumber pn = MenuI.player; - switch( m_type ) + if( GAMESTATE->m_bPlayersCanJoin ) { - case CHOICES_STYLE: - case CHOICES_MODE: if( pn!=PLAYER_INVALID && !GAMESTATE->m_bSideIsJoined[pn] ) { /* I think JP should allow playing two-pad singleplayer modes (doubles), @@ -271,6 +177,10 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type, * Also, credit deduction should be handled in StepMania.cpp (along with * the coin logic) using GAMESTATE->m_bPlayersCanJoin, since there * are other screens you can join (eg ScreenCaution). -glenn */ + + /* Joint premium on a DDR machine does allow two player modes with a single + * credit. -Chris */ + if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY ) { if( !PREFSMAN->m_bJointPremium ) @@ -287,17 +197,16 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type, } /* If credits had to be used, it's already taken care of.. add the player */ - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); GAMESTATE->m_bSideIsJoined[pn] = true; SCREENMAN->RefreshCreditsMessages(); this->UpdateSelectableChoices(); return; } - break; } } - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler @@ -316,9 +225,8 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) GAMESTATE->m_bPlayersCanJoin = false; SCREENMAN->RefreshCreditsMessages(); - m_Menu.StopTimer(); - - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + if( !m_Menu.IsTransitioning() ) + m_Menu.StartTransitioning( SM_GoToNextScreen ); } break; case SM_MenuTimer: @@ -333,25 +241,9 @@ void ScreenSelect::HandleScreenMessage( const ScreenMessage SM ) SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); break; case SM_GoToNextScreen: - switch( m_type ) { - case CHOICES_STYLE: - // if they only chose a style, then the play mode isn't set. - SCREENMAN->SetNewScreen( NEXT_SCREEN ); - break; - case CHOICES_MODE: - case CHOICES_DIFFICULTY: - // go to a specific screen depending on the play mode - switch( GAMESTATE->m_PlayMode ) - { - case PLAY_MODE_ARCADE: SCREENMAN->SetNewScreen( NEXT_SCREEN_ARCADE ); break; - case PLAY_MODE_NONSTOP: - case PLAY_MODE_ONI: - case PLAY_MODE_ENDLESS: SCREENMAN->SetNewScreen( NEXT_SCREEN_ONI ); break; - case PLAY_MODE_BATTLE: SCREENMAN->SetNewScreen( NEXT_SCREEN_BATTLE ); break; - default: ASSERT(0); - } - break; + int iSelectionIndex = GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber); + SCREENMAN->SetNewScreen( NEXT_SCREEN(iSelectionIndex) ); } break; } @@ -361,5 +253,5 @@ void ScreenSelect::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } diff --git a/stepmania/src/ScreenSelect.h b/stepmania/src/ScreenSelect.h index 60afbf1efa..6a546d68da 100644 --- a/stepmania/src/ScreenSelect.h +++ b/stepmania/src/ScreenSelect.h @@ -39,8 +39,6 @@ protected: virtual int GetSelectionIndex( PlayerNumber pn ) = 0; virtual void UpdateSelectableChoices() = 0; // derived screens must handle this - enum ChoicesType { CHOICES_STYLE, CHOICES_DIFFICULTY, CHOICES_MODE, CHOICES_GAME }; - ChoicesType m_type; CString m_sClassName; MenuElements m_Menu; diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index c52824dfe6..f451b5f5a2 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -62,20 +62,16 @@ ScreenSelectCourse::ScreenSelectCourse() CodeDetector::RefreshCacheItems(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select course music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectCourse music") ); m_bMadeChoice = false; m_bGoToOptions = false; m_bAllowOptionsMenuRepeat = false; - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select course"), - THEME->GetPathTo("Graphics","select course top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenSelectCourse" ); this->AddChild( &m_Menu ); - m_sprExplanation.Load( THEME->GetPathTo("Graphics","select course explanation") ); + m_sprExplanation.Load( THEME->GetPathTo("Graphics","ScreenSelectCourse explanation") ); m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y ); this->AddChild( &m_sprExplanation ); @@ -83,16 +79,16 @@ ScreenSelectCourse::ScreenSelectCourse() m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); this->AddChild( &m_Banner ); - m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select course banner frame") ); + m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","ScreenSelectCourse banner frame") ); m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y ); this->AddChild( &m_sprBannerFrame ); - m_textNumSongs.LoadFromFont( THEME->GetPathTo("Fonts","select course num songs") ); + m_textNumSongs.LoadFromFont( THEME->GetPathTo("Fonts","ScreenSelectCourse num songs") ); m_textNumSongs.SetXY( STAGES_X, STAGES_Y ); m_textNumSongs.EnableShadow( false ); this->AddChild( &m_textNumSongs ); - m_textTime.LoadFromFont( THEME->GetPathTo("Fonts","select course total time") ); + m_textTime.LoadFromFont( THEME->GetPathTo("Fonts","ScreenSelectCourse total time") ); m_textTime.SetXY( TIME_X, TIME_Y ); m_textTime.EnableShadow( false ); this->AddChild( &m_textTime ); @@ -108,7 +104,7 @@ ScreenSelectCourse::ScreenSelectCourse() if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) continue; // skip - m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","select music score frame") ); + m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectCourse score frame") ); m_sprHighScoreFrame[p].StopAnimating(); m_sprHighScoreFrame[p].SetState( p ); m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) ); @@ -120,7 +116,7 @@ ScreenSelectCourse::ScreenSelectCourse() this->AddChild( &m_HighScore[p] ); } - m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message 1x2") ); + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","ScreenSelectCourse options message 1x2") ); m_sprOptionsMessage.StopAnimating(); m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); m_sprOptionsMessage.SetZoomY( 0 ); @@ -128,20 +124,19 @@ ScreenSelectCourse::ScreenSelectCourse() this->AddChild( &m_sprOptionsMessage ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music options") ); - m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music notes") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); + m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","ScreenSelectCourse options") ); + m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","ScreenSelectCourse difficulty") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select course intro") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select course music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectCourse music") ); UpdateOptionsDisplays(); AfterCourseChange(); TweenOnScreen(); - m_Menu.TweenOnScreenFromMenu( SM_None ); } @@ -235,11 +230,11 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type, m_bGoToOptions = true; m_sprOptionsMessage.SetState( 1 ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + m_soundSelect.Play(); return; } - if( m_Menu.IsClosing() ) return; // ignore + if( m_Menu.IsTransitioning() ) return; // ignore if( m_bMadeChoice ) return; @@ -354,7 +349,7 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn ) m_sprOptionsMessage.SetTweenZoomY( 0 ); this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.75f ); - m_Menu.TweenOffScreenToBlack( SM_None, false ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); Course* pCourse = m_MusicWheel.GetSelectedCourse(); GAMESTATE->m_pCurCourse = pCourse; @@ -378,11 +373,8 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn ) // GAMESTATE->m_PlayerOptions[p].FromString( sModifiers ); //GAMESTATE->m_SongOptions.FromString( sModifiers ); - m_Menu.StopTimer(); AdjustOptions(); - this->SendScreenMessage( SM_GoToNextScreen, 2.5f ); - break; } } @@ -392,7 +384,7 @@ void ScreenSelectCourse::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } diff --git a/stepmania/src/ScreenSelectMaxType2.cpp b/stepmania/src/ScreenSelectDifficulty.cpp similarity index 69% rename from stepmania/src/ScreenSelectMaxType2.cpp rename to stepmania/src/ScreenSelectDifficulty.cpp index 0cc5eda1e6..648f08e29a 100644 --- a/stepmania/src/ScreenSelectMaxType2.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -1,7 +1,7 @@ #include "global.h" /* ----------------------------------------------------------------------------- - Class: ScreenSelectMaxType2 + Class: ScreenSelectDifficulty Desc: See header. @@ -10,7 +10,7 @@ ----------------------------------------------------------------------------- */ -#include "ScreenSelectMaxType2.h" +#include "ScreenSelectDifficulty.h" #include "GameManager.h" #include "ThemeManager.h" #include "PrefsManager.h" @@ -20,40 +20,39 @@ #include "ModeChoice.h" -#define NUM_CHOICES_ON_PAGE_1 THEME->GetMetricI("ScreenSelectMaxType2","NumChoicesOnPage1") -#define LOCK_INPUT_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","LockInputSeconds") -#define SLEEP_AFTER_CHOICE_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","SleepAfterChoiceSeconds") -#define SLEEP_AFTER_TWEEN_OFF_SECONDS THEME->GetMetricF("ScreenSelectMaxType2","SleepAfterTweenOffSeconds") -#define MORE_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("MorePage%dOnCommand",page+1)) -#define MORE_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("MorePage%dOffCommand",page+1)) -#define EXPLANATION_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("ExplanationPage%dOnCommand",page+1)) -#define EXPLANATION_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("ExplanationPage%dOffCommand",page+1)) -#define HEADER_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("HeaderPage%dChoice%dOnCommand",page+1,choice+1)) -#define HEADER_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("HeaderPage%dChoice%dOffCommand",page+1,choice+1)) -#define PICTURE_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("PicturePage%dChoice%dOnCommand",page+1,choice+1)) -#define PICTURE_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectMaxType2",ssprintf("PicturePage%dChoice%dOffCommand",page+1,choice+1)) -#define CURSOR_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorOnCommand") -#define CURSOR_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorChooseCommand") -#define CURSOR_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","CursorOffCommand") -#define CURSOR_OFFSET_X_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectMaxType2",ssprintf("CursorP%dOffsetXFromPicture",p+1)) -#define CURSOR_OFFSET_Y_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectMaxType2",ssprintf("CursorP%dOffsetYFromPicture",p+1)) -#define SHADOW_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowOnCommand") -#define SHADOW_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowChooseCommand") -#define SHADOW_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","ShadowOffCommand") -#define SHADOW_LENGTH_X THEME->GetMetricF("ScreenSelectMaxType2","ShadowLengthX") -#define SHADOW_LENGTH_Y THEME->GetMetricF("ScreenSelectMaxType2","ShadowLengthY") -#define OK_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKOnCommand") -#define OK_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKChooseCommand") -#define OK_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType2","OKOffCommand") -#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectMaxType2","DisabledColor") +#define NUM_CHOICES_ON_PAGE_1 THEME->GetMetricI("ScreenSelectDifficulty","NumChoicesOnPage1") +#define LOCK_INPUT_SECONDS THEME->GetMetricF("ScreenSelectDifficulty","LockInputSeconds") +#define SLEEP_AFTER_CHOICE_SECONDS THEME->GetMetricF("ScreenSelectDifficulty","SleepAfterChoiceSeconds") +#define SLEEP_AFTER_TWEEN_OFF_SECONDS THEME->GetMetricF("ScreenSelectDifficulty","SleepAfterTweenOffSeconds") +#define MORE_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("MorePage%dOnCommand",page+1)) +#define MORE_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("MorePage%dOffCommand",page+1)) +#define EXPLANATION_ON_COMMAND( page ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("ExplanationPage%dOnCommand",page+1)) +#define EXPLANATION_OFF_COMMAND( page ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("ExplanationPage%dOffCommand",page+1)) +#define INFO_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("InfoPage%dChoice%dOnCommand",page+1,choice+1)) +#define INFO_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("InfoPage%dChoice%dOffCommand",page+1,choice+1)) +#define PICTURE_ON_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("PicturePage%dChoice%dOnCommand",page+1,choice+1)) +#define PICTURE_OFF_COMMAND( page, choice ) THEME->GetMetric ("ScreenSelectDifficulty",ssprintf("PicturePage%dChoice%dOffCommand",page+1,choice+1)) +#define CURSOR_ON_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","CursorOnCommand") +#define CURSOR_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","CursorChooseCommand") +#define CURSOR_OFF_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","CursorOffCommand") +#define CURSOR_OFFSET_X_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectDifficulty",ssprintf("CursorP%dOffsetXFromPicture",p+1)) +#define CURSOR_OFFSET_Y_FROM_PICTURE( p ) THEME->GetMetricF("ScreenSelectDifficulty",ssprintf("CursorP%dOffsetYFromPicture",p+1)) +#define SHADOW_ON_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","ShadowOnCommand") +#define SHADOW_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","ShadowChooseCommand") +#define SHADOW_OFF_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","ShadowOffCommand") +#define SHADOW_LENGTH_X THEME->GetMetricF("ScreenSelectDifficulty","ShadowLengthX") +#define SHADOW_LENGTH_Y THEME->GetMetricF("ScreenSelectDifficulty","ShadowLengthY") +#define OK_ON_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","OKOnCommand") +#define OK_CHOOSE_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","OKChooseCommand") +#define OK_OFF_COMMAND THEME->GetMetric ("ScreenSelectDifficulty","OKOffCommand") +#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectDifficulty","DisabledColor") -ScreenSelectMaxType2::ScreenSelectMaxType2() : ScreenSelect( "ScreenSelectMaxType2" ) +ScreenSelectDifficulty::ScreenSelectDifficulty() : ScreenSelect( "ScreenSelectDifficulty" ) { m_CurrentPage = PAGE_1; - int p; - for( p=0; pGetPathTo("Graphics",sPictureFile) ); m_framePages.AddChild( &m_sprPicture[page][choice] ); - m_sprHeader[page][choice].Load( THEME->GetPathTo("Graphics",sHeaderFile) ); - m_framePages.AddChild( &m_sprHeader[page][choice] ); + m_sprInfo[page][choice].Load( THEME->GetPathTo("Graphics",sInfoFile) ); + m_framePages.AddChild( &m_sprInfo[page][choice] ); } - m_sprMore[page].Load( THEME->GetPathTo("Graphics", ssprintf("ScreenSelectMaxType2 more page%d",page+1) ) ); + m_sprMore[page].Load( THEME->GetPathTo("Graphics", ssprintf("ScreenSelectDifficulty more page%d",page+1) ) ); m_framePages.AddChild( &m_sprMore[page] ); - m_sprExplanation[page].Load( THEME->GetPathTo("Graphics", "ScreenSelectMaxType2 explanation") ); + m_sprExplanation[page].Load( THEME->GetPathTo("Graphics", "ScreenSelectDifficulty explanation") ); m_sprExplanation[page].StopAnimating(); m_sprExplanation[page].SetState( page ); m_framePages.AddChild( &m_sprExplanation[page] ); @@ -101,18 +100,18 @@ ScreenSelectMaxType2::ScreenSelectMaxType2() : ScreenSelect( "ScreenSelectMaxTyp if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) continue; - m_sprShadow[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectMaxType2 shadow 2x1") ); + m_sprShadow[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectDifficulty shadow 2x1") ); m_sprShadow[p].StopAnimating(); m_sprShadow[p].SetState( p ); m_sprShadow[p].SetDiffuse( RageColor(0,0,0,0.6f) ); m_framePages.AddChild( &m_sprShadow[p] ); - m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectMaxType2 cursor 2x1") ); + m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectDifficulty cursor 2x1") ); m_sprCursor[p].StopAnimating(); m_sprCursor[p].SetState( p ); m_framePages.AddChild( &m_sprCursor[p] ); - m_sprOK[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectMaxType2 ok 2x1") ); + m_sprOK[p].Load( THEME->GetPathTo("Graphics", "ScreenSelectDifficulty ok 2x1") ); m_sprOK[p].SetState( p ); m_sprOK[p].StopAnimating(); m_sprOK[p].SetDiffuse( RageColor(1,1,1,0) ); @@ -121,22 +120,22 @@ ScreenSelectMaxType2::ScreenSelectMaxType2() : ScreenSelect( "ScreenSelectMaxTyp this->AddChild( &m_framePages ); - m_soundChange.Load( THEME->GetPathTo("Sounds", "ScreenSelectMaxType2 change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds", "menu start") ); - m_soundDifficult.Load( ANNOUNCER->GetPathTo("ScreenSelectMaxType2 challenge") ); + m_soundChange.Load( THEME->GetPathTo("Sounds", "ScreenSelectDifficulty change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds", "Common start") ); + m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") ); m_fLockInputTime = LOCK_INPUT_SECONDS; TweenOnScreen(); } -void ScreenSelectMaxType2::Update( float fDelta ) +void ScreenSelectDifficulty::Update( float fDelta ) { ScreenSelect::Update( fDelta ); m_fLockInputTime = max( 0, m_fLockInputTime-fDelta ); } -void ScreenSelectMaxType2::HandleScreenMessage( const ScreenMessage SM ) +void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM ) { ScreenSelect::HandleScreenMessage( SM ); @@ -149,7 +148,7 @@ void ScreenSelectMaxType2::HandleScreenMessage( const ScreenMessage SM ) } } -int ScreenSelectMaxType2::GetSelectionIndex( PlayerNumber pn ) +int ScreenSelectDifficulty::GetSelectionIndex( PlayerNumber pn ) { int index = 0; for( int page=0; pageIsPlayable(m_ModeChoices[page][i]) ) { - m_sprHeader[page][i].SetDiffuse( RageColor(1,1,1,1) ); + m_sprInfo[page][i].SetDiffuse( RageColor(1,1,1,1) ); m_sprPicture[page][i].SetDiffuse( RageColor(1,1,1,1) ); } else { - m_sprHeader[page][i].SetDiffuse( DISABLED_COLOR ); + m_sprInfo[page][i].SetDiffuse( DISABLED_COLOR ); m_sprPicture[page][i].SetDiffuse( DISABLED_COLOR ); } } @@ -189,7 +188,7 @@ void ScreenSelectMaxType2::UpdateSelectableChoices() } } -void ScreenSelectMaxType2::MenuLeft( PlayerNumber pn ) +void ScreenSelectDifficulty::MenuLeft( PlayerNumber pn ) { if( m_fLockInputTime > 0 ) return; @@ -205,7 +204,7 @@ void ScreenSelectMaxType2::MenuLeft( PlayerNumber pn ) } -void ScreenSelectMaxType2::MenuRight( PlayerNumber pn ) +void ScreenSelectDifficulty::MenuRight( PlayerNumber pn ) { if( m_fLockInputTime > 0 ) return; @@ -220,7 +219,7 @@ void ScreenSelectMaxType2::MenuRight( PlayerNumber pn ) ChangeWithinPage( pn, m_iChoiceOnPage[pn]+1, false ); } -void ScreenSelectMaxType2::ChangePage( Page newPage ) +void ScreenSelectDifficulty::ChangePage( Page newPage ) { int p; @@ -251,7 +250,7 @@ void ScreenSelectMaxType2::ChangePage( Page newPage ) m_framePages.SetTweenX( (float)newPage*-SCREEN_WIDTH ); } -void ScreenSelectMaxType2::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages ) +void ScreenSelectDifficulty::ChangeWithinPage( PlayerNumber pn, int iNewChoice, bool bChangingPages ) { for( int p=0; p 0 ) return; @@ -305,7 +304,7 @@ void ScreenSelectMaxType2::MenuStart( PlayerNumber pn ) if(m_CurrentPage != PAGE_2 || !AnotherPlayerSelected) { - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("ScreenSelectMaxType2 comment %s",mc.name)) ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo(ssprintf("ScreenSelectDifficulty comment %s",mc.name)) ); m_soundSelect.Play(); } @@ -329,20 +328,20 @@ void ScreenSelectMaxType2::MenuStart( PlayerNumber pn ) // check to see if everyone has chosen - for( int pl=0; plIsPlayerEnabled((PlayerNumber)pl) && m_bChosen[pl] == false ) + if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false ) return; } this->SendScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_CHOICE_SECONDS ); // tell our owner it's time to move on } // Err, this breaks back ... -//void ScreenSelectMaxType2::MenuBack( PlayerNumber pn ) +//void ScreenSelectDifficulty::MenuBack( PlayerNumber pn ) //{ //} -void ScreenSelectMaxType2::TweenOnScreen() +void ScreenSelectDifficulty::TweenOnScreen() { unsigned p; @@ -356,8 +355,8 @@ void ScreenSelectMaxType2::TweenOnScreen() for( unsigned c=0; cGetMetricF("ScreenSelectDifficultyEX",ssprintf("CursorOffsetP%dX",p+1)) #define CURSOR_OFFSET_EX_Y( i ) THEME->GetMetricF("ScreenSelectDifficultyEX",ssprintf("CursorOffsetP%dY",i+1)) #define INITIAL_CHOICE THEME->GetMetricI("ScreenSelectDifficultyEX","InitialChoice") -#define HELP_TEXT THEME->GetMetric("ScreenSelectDifficultyEX","HelpText") +#define HELP_TEXT THEME->GetMetric ("ScreenSelectDifficultyEX","HelpText") #define TIMER_SECONDS THEME->GetMetricI("ScreenSelectDifficultyEX","TimerSeconds") -#define NEXT_SCREEN_ARCADE THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenArcade") -#define NEXT_SCREEN_ONI THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenOni") -#define NEXT_SCREEN_BATTLE THEME->GetMetric("ScreenSelectDifficultyEX","NextScreenBattle") +#define NEXT_SCREEN_ARCADE THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenArcade") +#define NEXT_SCREEN_ONI THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenOni") +#define NEXT_SCREEN_BATTLE THEME->GetMetric ("ScreenSelectDifficultyEX","NextScreenBattle") const CString CHOICE_TEXT[ScreenSelectDifficultyEX::NUM_CHOICES_EX] = @@ -54,8 +54,6 @@ float CURSOR_EX_X( int p ) { return DIFFICULTY_X(p) + CURSOR_OFFSET_EX_X(p); } float CURSOR_EX_Y( int p ) { return DIFFICULTY_Y(p) + CURSOR_OFFSET_EX_Y(p); } -const ScreenMessage SM_StartTweeningOffScreen = ScreenMessage(SM_User + 3); -const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 4); ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() @@ -66,19 +64,15 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() GAMESTATE->m_PlayMode = PLAY_MODE_INVALID; - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select difficulty ex"), - THEME->GetPathTo("Graphics","select difficulty ex top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load( "SelectDifficultyEx" ); this->AddChild( &m_Menu ); for( unsigned c=0; cIsPlayerEnabled(c) == true ) { - CString sHeaderFile = ssprintf( "select difficulty ex header %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() ); - CString sPictureFile = ssprintf( "select difficulty ex picture %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() ); + CString sHeaderFile = ssprintf( "SelectDifficultyEx header %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() ); + CString sPictureFile = ssprintf( "SelectDifficultyEx picture %s", CHOICE_TEXT[INITIAL_CHOICE].c_str() ); m_sprPicture[c].Load( THEME->GetPathTo("Graphics",sPictureFile) ); m_sprPicture[c].SetVertAlign( align_top ); @@ -101,14 +95,14 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) continue; - m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "select difficulty ex cursor 2x1") ); + m_sprCursor[p].Load( THEME->GetPathTo("Graphics", "SelectDifficultyEx cursor 2x1") ); m_sprCursor[p].SetXY( -1600, -1600 ); m_sprCursor[p].StopAnimating(); m_sprCursor[p].SetState( p ); m_sprCursor[p].EnableShadow( false ); m_framePages.AddChild( &m_sprCursor[p] ); - m_sprOK[p].Load( THEME->GetPathTo("Graphics", "select difficulty ex ok 2x1") ); + m_sprOK[p].Load( THEME->GetPathTo("Graphics", "SelectDifficultyEx ok 2x1") ); m_sprOK[p].SetState( p ); m_sprOK[p].StopAnimating(); m_sprOK[p].SetDiffuse( RageColor(1,1,1,0) ); @@ -117,16 +111,15 @@ ScreenSelectDifficultyEX::ScreenSelectDifficultyEX() this->AddChild( &m_framePages ); - m_soundChange.Load( THEME->GetPathTo("Sounds", "select difficulty change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds", "menu start") ); + m_soundChange.Load( THEME->GetPathTo("Sounds", "SelectDifficultyEx change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds", "Common start") ); m_soundDifficult.Load( ANNOUNCER->GetPathTo("select difficulty challenge") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select difficulty intro") ); - m_Menu.TweenOnScreenFromMenu( SM_None ); TweenOnScreen(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select difficulty music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","SelectDifficultyEx music") ); m_fLockInputTime = LOCK_INPUT_TIME; } @@ -142,7 +135,7 @@ void ScreenSelectDifficultyEX::Input( const DeviceInput& DeviceI, const InputEve { LOG->Trace( "ScreenSelectDifficultyEX::Input()" ); - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; if( m_fLockInputTime > 0 ) @@ -218,13 +211,6 @@ void ScreenSelectDifficultyEX::HandleScreenMessage( const ScreenMessage SM ) default: ASSERT(0); } - break; - case SM_StartTweeningOffScreen: - TweenOffScreen(); - this->SendScreenMessage( SM_StartFadingOut, 0.8f ); - break; - case SM_StartFadingOut: - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); break; } } @@ -410,13 +396,15 @@ void ScreenSelectDifficultyEX::MenuStart( PlayerNumber pn ) // check to see if everyone has chosen + bool bAllChosen = true; for( int p=0; pIsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false ) - return; + if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) + bAllChosen &= m_bChosen[p]; } - m_Menu.StopTimer(); - this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f ); + + if( bAllChosen ) + m_Menu.StartTransitioning( SM_GoToNextScreen ); } void ScreenSelectDifficultyEX::ShowSelected( PlayerNumber pv ) @@ -436,7 +424,7 @@ void ScreenSelectDifficultyEX::ShowSelected( PlayerNumber pv ) void ScreenSelectDifficultyEX::MenuBack( PlayerNumber pn ) { - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenSelectDifficultyEX::TweenOffScreen() diff --git a/stepmania/src/ScreenSelectGame.cpp b/stepmania/src/ScreenSelectGame.cpp index ccfe1342f5..9b9a1d2233 100644 --- a/stepmania/src/ScreenSelectGame.cpp +++ b/stepmania/src/ScreenSelectGame.cpp @@ -34,11 +34,7 @@ OptionRowData g_SelectGameLines[NUM_SELECT_GAME_LINES] = ScreenSelectGame::ScreenSelectGame() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","select game"), - THEME->GetPathTo("Graphics","select game page"), - THEME->GetPathTo("Graphics","select game top edge") - ) + ScreenOptions("ScreenSelectGame",false) { LOG->Trace( "ScreenSelectGame::ScreenSelectGame()" ); @@ -55,14 +51,24 @@ ScreenSelectGame::ScreenSelectGame() : g_SelectGameLines[0].iNumOptions = i; + // fill g_InputOptionsLines with explanation text + for( i=0; iGetMetric("ScreenSelectGame",sLineName) ); + } + + Init( INPUTMODE_BOTH, g_SelectGameLines, NUM_SELECT_GAME_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select game music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectGame music") ); } void ScreenSelectGame::ImportOptions() diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 5f9a518223..6fc551179c 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -42,31 +42,23 @@ #define NEXT_SCREEN THEME->GetMetric("ScreenSelectGroup","NextScreen") -const ScreenMessage SM_StartFadingOut = ScreenMessage(SM_User + 3); - - ScreenSelectGroup::ScreenSelectGroup() -{ - +{ LOG->Trace( "ScreenSelectGroup::ScreenSelectGroup()" ); - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select group") , - THEME->GetPathTo("Graphics","select group top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); - this->AddChild( &m_Menu ); - - if(!PREFSMAN->m_bShowSelectGroup) + if( !PREFSMAN->m_bShowSelectGroup ) { GAMESTATE->m_sPreferredGroup = GROUP_ALL_MUSIC; - m_Menu.ImmedOffScreenToMenu(); - m_bChosen = true; - this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + HandleScreenMessage( SM_GoToNextScreen ); return; } + + m_Menu.Load( "ScreenSelectGroup" ); + this->AddChild( &m_Menu ); + + unsigned i; int j; @@ -131,7 +123,7 @@ ScreenSelectGroup::ScreenSelectGroup() m_bChosen = false; - m_sprExplanation.Load( THEME->GetPathTo("Graphics","select group explanation") ); + m_sprExplanation.Load( THEME->GetPathTo("Graphics","ScreenSelectGroup explanation") ); m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y ); this->AddChild( &m_sprExplanation ); @@ -140,17 +132,17 @@ ScreenSelectGroup::ScreenSelectGroup() m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); this->AddChild( &m_Banner ); - m_sprFrame.Load( THEME->GetPathTo("Graphics","select group info frame") ); + m_sprFrame.Load( THEME->GetPathTo("Graphics","ScreenSelectGroup frame") ); m_sprFrame.SetXY( FRAME_X, FRAME_Y ); this->AddChild( &m_sprFrame ); - m_textNumber.LoadFromFont( THEME->GetPathTo("Fonts","select group num songs") ); + m_textNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","ScreenSelectGroup numbers") ); m_textNumber.SetXY( NUMBER_X, NUMBER_Y ); m_textNumber.SetHorizAlign( Actor::align_right ); m_textNumber.EnableShadow( false ); this->AddChild( &m_textNumber ); - m_sprContents.Load( THEME->GetPathTo("Graphics","select group contents header") ); + m_sprContents.Load( THEME->GetPathTo("Graphics","ScreenSelectGroup contents") ); m_sprContents.SetXY( CONTENTS_X, CONTENTS_Y ); this->AddChild( &m_sprContents ); @@ -162,14 +154,13 @@ ScreenSelectGroup::ScreenSelectGroup() this->AddChild( &m_GroupList ); - m_soundChange.Load( THEME->GetPathTo("Sounds","select group change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); + m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenSelectGroup change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select group intro") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select group music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectGroup music") ); - m_Menu.TweenOnScreenFromMenu( SM_None ); TweenOnScreen(); AfterChange(); m_GroupList.SetSelection(0); @@ -187,7 +178,7 @@ void ScreenSelectGroup::Input( const DeviceInput& DeviceI, const InputEventType { LOG->Trace( "ScreenSelectGroup::Input()" ); - if( m_Menu.IsClosing() || m_bChosen ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler @@ -213,9 +204,6 @@ void ScreenSelectGroup::HandleScreenMessage( const ScreenMessage SM ) case SM_GoToNextScreen: SCREENMAN->SetNewScreen( NEXT_SCREEN ); break; - case SM_StartFadingOut: - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); - break; } } @@ -228,16 +216,12 @@ void ScreenSelectGroup::AfterChange() CString sGroupBannerPath; if( sSelectedGroupName == GROUP_ALL_MUSIC ) - sGroupBannerPath = THEME->GetPathTo("Graphics","all music banner"); - else if( SONGMAN->GetGroupBannerPath(sSelectedGroupName) != "" ) - sGroupBannerPath = SONGMAN->GetGroupBannerPath(sSelectedGroupName); - else - sGroupBannerPath = THEME->GetPathTo("Graphics","fallback banner"); + m_Banner.LoadAllMusic(); + else + m_Banner.LoadFromGroup( sSelectedGroupName ); const int iNumSongs = m_MusicList.GetNumSongs(); m_textNumber.SetText( ssprintf("%d", iNumSongs) ); - - m_Banner.LoadFromGroup( sSelectedGroupName ); } @@ -291,14 +275,12 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn ) TweenOffScreen(); - m_Menu.StopTimer(); - - this->SendScreenMessage( SM_StartFadingOut, 0.8f ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); } void ScreenSelectGroup::MenuBack( PlayerNumber pn ) { - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenSelectGroup::TweenOffScreen() diff --git a/stepmania/src/ScreenSelectMode.cpp b/stepmania/src/ScreenSelectMode.cpp index a06ee4a850..263fb91aff 100644 --- a/stepmania/src/ScreenSelectMode.cpp +++ b/stepmania/src/ScreenSelectMode.cpp @@ -63,7 +63,7 @@ ScreenSelectMode::ScreenSelectMode() /*********** TODO: MAKE THIS WORK FOR ALL GAME STYLES! *************/ - m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","select mode list frame")); + m_ChoiceListFrame.Load( THEME->GetPathTo("Graphics","ScreenSelectMode list frame")); m_ChoiceListFrame.SetXY( SCROLLING_LIST_X, SCROLLING_LIST_Y); this->AddChild( &m_ChoiceListFrame ); @@ -72,7 +72,7 @@ ScreenSelectMode::ScreenSelectMode() m_ScrollingList.SetNumberVisible( 9 ); this->AddChild( &m_ScrollingList ); - m_ChoiceListHighlight.Load( THEME->GetPathTo("Graphics","select mode list highlight")); + m_ChoiceListHighlight.Load( THEME->GetPathTo("Graphics","ScreenSelectMode list highlight")); m_ChoiceListHighlight.SetXY( CENTER_X, SCROLLING_LIST_Y); this->AddChild( &m_ChoiceListHighlight ); @@ -82,7 +82,7 @@ ScreenSelectMode::ScreenSelectMode() for( int p=0; pGetPathTo("Graphics","select player join frame 1x2") ); + m_sprJoinFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectMode join frame 1x2") ); m_sprJoinFrame[p].StopAnimating(); m_sprJoinFrame[p].SetState( p ); m_sprJoinFrame[p].SetXY( JOIN_FRAME_X(p), JOIN_FRAME_Y(p) ); @@ -91,7 +91,7 @@ ScreenSelectMode::ScreenSelectMode() if( GAMESTATE->m_bSideIsJoined[p] ) m_sprJoinFrame[p].SetZoomY( 0 ); - m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","select player join message 2x2") ); + m_sprJoinMessage[p].Load( THEME->GetPathTo("Graphics","ScreenSelectMode join message 2x2") ); m_sprJoinMessage[p].StopAnimating(); m_sprJoinMessage[p].SetState( p ); m_sprJoinMessage[p].SetXY( JOIN_MESSAGE_X(p), JOIN_MESSAGE_Y(p) ); @@ -112,19 +112,15 @@ ScreenSelectMode::ScreenSelectMode() } - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select style"), - THEME->GetPathTo("Graphics","select style top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenSelectMode" ); this->AddChild( &m_Menu ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundChange.Load( THEME->GetPathTo("Sounds","select style change"), true ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); + m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenSelectMode change"), true ); - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style intro") ); + SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select mode intro") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select style music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectMode music") ); RefreshModeChoices(); @@ -135,7 +131,7 @@ ScreenSelectMode::ScreenSelectMode() for( unsigned i=0; iname; - m_Infotext[i].Load( THEME->GetPathTo("Graphics",ssprintf("select mode infotext %s %s", sGameName.GetString(), sChoiceName.GetString())) ); + m_Infotext[i].Load( THEME->GetPathTo("Graphics",ssprintf("ScreenSelectMode infotext %s %s", sGameName.GetString(), sChoiceName.GetString())) ); m_Infotext[i].SetXY( GUIDE_X, GUIDE_Y ); this->AddChild( &m_Infotext[i] ); m_Infotext[i].SetDiffuse( RageColor(0,0,0,0)); @@ -144,8 +140,6 @@ ScreenSelectMode::ScreenSelectMode() AfterChange(); TweenOnScreen(); - m_Menu.TweenOnScreenFromBlack( SM_None ); - } /************************************ @@ -189,7 +183,7 @@ void ScreenSelectMode::Input( const DeviceInput& DeviceI, const InputEventType t { LOG->Trace( "ScreenSelectMode::Input()" ); - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler @@ -208,10 +202,8 @@ void ScreenSelectMode::HandleScreenMessage( const ScreenMessage SM ) { case SM_MenuTimer: MenuStart( PLAYER_INVALID ); - m_Menu.StopTimer(); - TweenOffScreen(); - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); break; case SM_GoToPrevScreen: SOUNDMAN->StopMusic(); @@ -292,7 +284,7 @@ void ScreenSelectMode::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenSelectMode::AfterChange() @@ -379,7 +371,7 @@ void ScreenSelectMode::MenuStart( PlayerNumber pn ) m_soundSelect.Play(); TweenOffScreen(); - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); GAMESTATE->m_bPlayersCanJoin = false; SCREENMAN->RefreshCreditsMessages(); } diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 1e5b860da0..787b05dda0 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -94,11 +94,7 @@ ScreenSelectMusic::ScreenSelectMusic() int p; - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select music"), - THEME->GetPathTo("Graphics","select music top edge"), - HELP_TEXT, true, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenSelectMusic" ); this->AddChild( &m_Menu ); // these guys get loaded SetSong and TweenToSong @@ -106,7 +102,7 @@ ScreenSelectMusic::ScreenSelectMusic() m_Banner.SetCroppedSize( BANNER_WIDTH, BANNER_HEIGHT ); this->AddChild( &m_Banner ); - m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","select music banner frame") ); + m_sprBannerFrame.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic banner frame") ); m_sprBannerFrame.SetXY( BANNER_FRAME_X, BANNER_FRAME_Y ); this->AddChild( &m_sprBannerFrame ); @@ -119,7 +115,7 @@ ScreenSelectMusic::ScreenSelectMusic() m_StageDisplay.Refresh(); this->AddChild( &m_StageDisplay ); - m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") ); + m_sprCDTitle.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic fallback cdtitle") ); m_sprCDTitle.EnableShadow( false ); m_sprCDTitle.SetXY( CD_TITLE_X, CD_TITLE_Y ); this->AddChild( &m_sprCDTitle ); @@ -129,17 +125,17 @@ ScreenSelectMusic::ScreenSelectMusic() if( !GAMESTATE->IsPlayerEnabled(p) ) continue; // skip - m_sprDifficultyFrame[p].Load( THEME->GetPathTo("Graphics","select music difficulty frame 2x1") ); + m_sprDifficultyFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectMusic difficulty frame 2x1") ); m_sprDifficultyFrame[p].SetXY( DIFFICULTY_FRAME_X(p), DIFFICULTY_FRAME_Y(p) ); m_sprDifficultyFrame[p].StopAnimating(); m_sprDifficultyFrame[p].SetState( p ); this->AddChild( &m_sprDifficultyFrame[p] ); - m_DifficultyIcon[p].Load( THEME->GetPathTo("graphics","select music difficulty icons 1x5") ); + m_DifficultyIcon[p].Load( THEME->GetPathTo("graphics","ScreenSelectMusic difficulty icons 1x5") ); m_DifficultyIcon[p].SetXY( DIFFICULTY_ICON_X(p), DIFFICULTY_ICON_Y(p) ); this->AddChild( &m_DifficultyIcon[p] ); - m_AutoGenIcon[p].Load( THEME->GetPathTo("graphics","select music autogen icon") ); + m_AutoGenIcon[p].Load( THEME->GetPathTo("graphics","ScreenSelectMusic autogen") ); m_AutoGenIcon[p].SetXY( DIFFICULTY_ICON_X(p), DIFFICULTY_ICON_Y(p) ); this->AddChild( &m_AutoGenIcon[p] ); } @@ -168,15 +164,15 @@ ScreenSelectMusic::ScreenSelectMusic() m_OptionIconRow[p].Refresh( (PlayerNumber)p ); this->AddChild( &m_OptionIconRow[p] ); - m_sprMeterFrame[p].Load( THEME->GetPathTo("Graphics","select music meter frame") ); + m_sprMeterFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectMusic meter frame") ); m_sprMeterFrame[p].SetXY( METER_FRAME_X(p), METER_FRAME_Y(p) ); m_sprMeterFrame[p].StopAnimating(); m_sprMeterFrame[p].SetState( p ); this->AddChild( &m_sprMeterFrame[p] ); - m_FootMeter[p].SetXY( METER_X(p), METER_Y(p) ); - m_FootMeter[p].SetShadowLength( 2 ); - this->AddChild( &m_FootMeter[p] ); + m_DifficultyMeter[p].SetXY( METER_X(p), METER_Y(p) ); + m_DifficultyMeter[p].SetShadowLength( 2 ); + this->AddChild( &m_DifficultyMeter[p] ); } m_MusicWheel.SetXY( WHEEL_X, WHEEL_Y ); @@ -187,7 +183,7 @@ ScreenSelectMusic::ScreenSelectMusic() if( !GAMESTATE->IsPlayerEnabled((PlayerNumber)p) ) continue; // skip - m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","select music score frame 1x2") ); + m_sprHighScoreFrame[p].Load( THEME->GetPathTo("Graphics","ScreenSelectMusic score frame 1x2") ); m_sprHighScoreFrame[p].StopAnimating(); m_sprHighScoreFrame[p].SetState( p ); m_sprHighScoreFrame[p].SetXY( SCORE_X(p), SCORE_Y(p) ); @@ -203,7 +199,7 @@ ScreenSelectMusic::ScreenSelectMusic() m_MusicSortDisplay.Set( GAMESTATE->m_SongSortOrder ); this->AddChild( &m_MusicSortDisplay ); - m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","select music marathon balloon") ); + m_sprMarathonBalloon.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic marathon") ); m_sprMarathonBalloon.StopAnimating(); m_sprMarathonBalloon.SetXY( BALLOON_X, BALLOON_Y ); m_sprMarathonBalloon.SetZoomY( 0 ); @@ -211,7 +207,7 @@ ScreenSelectMusic::ScreenSelectMusic() m_sprMarathonBalloon.SetEffectBob( 2, RageVector3(0,10,0) ); this->AddChild( &m_sprMarathonBalloon ); - m_sprLongBalloon.Load( THEME->GetPathTo("Graphics","select music long balloon") ); + m_sprLongBalloon.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic long") ); m_sprLongBalloon.StopAnimating(); m_sprLongBalloon.SetXY( BALLOON_X, BALLOON_Y ); m_sprLongBalloon.SetZoomY( 0 ); @@ -219,7 +215,7 @@ ScreenSelectMusic::ScreenSelectMusic() m_sprLongBalloon.SetEffectBob( 2, RageVector3(0,10,0) ); this->AddChild( &m_sprLongBalloon ); - m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message") ); + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic options") ); m_sprOptionsMessage.StopAnimating(); m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); m_sprOptionsMessage.SetZoom( 1 ); @@ -227,10 +223,10 @@ ScreenSelectMusic::ScreenSelectMusic() this->AddChild( &m_sprOptionsMessage ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","select music notes") ); - m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","select music options") ); - m_soundLocked.Load( THEME->GetPathTo("Sounds","select music locked") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); + m_soundChangeNotes.Load( THEME->GetPathTo("Sounds","ScreenSelectMusic notes") ); + m_soundOptionsChange.Load( THEME->GetPathTo("Sounds","ScreenSelectMusic options") ); + m_soundLocked.Load( THEME->GetPathTo("Sounds","ScreenSelectMusic locked") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select music intro") ); @@ -243,7 +239,6 @@ ScreenSelectMusic::ScreenSelectMusic() AfterMusicChange(); TweenOnScreen(); - m_Menu.TweenOnScreenFromMenu( SM_None ); } @@ -290,7 +285,7 @@ void ScreenSelectMusic::TweenOnScreen() m_DifficultyIcon[p].FadeOn( 0, "foldy", TWEEN_TIME ); m_AutoGenIcon[p].FadeOn( 0, "foldy", TWEEN_TIME ); - m_FootMeter[p].FadeOn( 0, "foldy", TWEEN_TIME ); + m_DifficultyMeter[p].FadeOn( 0, "foldy", TWEEN_TIME ); } m_MusicSortDisplay.FadeOn( 0, "fade", TWEEN_TIME ); @@ -333,7 +328,7 @@ void ScreenSelectMusic::TweenOffScreen() m_DifficultyIcon[p].FadeOff( 0, "foldy", TWEEN_TIME ); m_AutoGenIcon[p].FadeOff( 0, "foldy", TWEEN_TIME ); - m_FootMeter[p].FadeOff( 0, "foldy", TWEEN_TIME ); + m_DifficultyMeter[p].FadeOff( 0, "foldy", TWEEN_TIME ); } m_MusicSortDisplay.FadeOff( 0, "fade", TWEEN_TIME ); @@ -462,11 +457,11 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, InputEventType type, m_bGoToOptions = true; m_sprOptionsMessage.SetState( 1 ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); return; } - if( m_Menu.IsClosing() ) return; // ignore + if( m_Menu.IsTransitioning() ) return; // ignore if( m_bMadeChoice ) return; @@ -613,12 +608,12 @@ void ScreenSelectMusic::HandleScreenMessage( const ScreenMessage SM ) if( m_MusicWheel.IsRouletting() ) { MenuStart(PLAYER_INVALID); - m_Menu.SetTimer( 15 ); + m_Menu.m_MenuTimer.SetTimer( 15 ); } else if( m_MusicWheel.GetSelectedType() != TYPE_SONG ) { m_MusicWheel.StartRoulette(); - m_Menu.SetTimer( 15 ); + m_Menu.m_MenuTimer.SetTimer( 15 ); } else { @@ -739,12 +734,8 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.75f ); } - m_Menu.TweenOffScreenToBlack( SM_None, false ); - - m_Menu.StopTimer(); + m_Menu.StartTransitioning( SM_GoToNextScreen ); AdjustOptions(); - - this->SendScreenMessage( SM_GoToNextScreen, 2.5f ); break; } case TYPE_SECTION: @@ -776,7 +767,7 @@ void ScreenSelectMusic::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn ) @@ -809,14 +800,14 @@ void ScreenSelectMusic::AfterNotesChange( PlayerNumber pn ) m_AutoGenIcon[pn].SetEffectNone(); m_AutoGenIcon[pn].SetDiffuse( RageColor(1,1,1,0) ); } - m_FootMeter[pn].SetFromNotes( pNotes ); + m_DifficultyMeter[pn].SetFromNotes( pNotes ); m_GrooveRadar.SetFromNotes( pn, pNotes ); m_MusicWheel.NotesChanged( pn ); } void ScreenSelectMusic::AfterMusicChange() { - m_Menu.StallTimer(); + m_Menu.m_MenuTimer.StallTimer(); Song* pSong = m_MusicWheel.GetSelectedSong(); GAMESTATE->m_pCurSong = pSong; @@ -883,7 +874,7 @@ void ScreenSelectMusic::AfterMusicChange() if( pSong->HasCDTitle() ) m_sprCDTitle.Load( pSong->GetCDTitlePath() ); else - m_sprCDTitle.Load( THEME->GetPathTo("Graphics","fallback cd title") ); + m_sprCDTitle.Load( THEME->GetPathTo("Graphics","ScreenSelectMusic fallback cdtitle") ); for( int p=0; pIsPlayerEnabled( PlayerNumber(p) ) ) @@ -956,7 +947,7 @@ void ScreenSelectMusic::PlayMusicSample() 1.5f); /* fade out for 1.5 seconds */ } // else -// SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select music music") ); +// SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectMusic music") ); } void ScreenSelectMusic::UpdateOptionsDisplays() diff --git a/stepmania/src/ScreenSelectMusic.h b/stepmania/src/ScreenSelectMusic.h index e254fa0de8..306b536abe 100644 --- a/stepmania/src/ScreenSelectMusic.h +++ b/stepmania/src/ScreenSelectMusic.h @@ -20,7 +20,7 @@ #include "MenuElements.h" #include "GrooveRadar.h" #include "DifficultyIcon.h" -#include "FootMeter.h" +#include "DifficultyMeter.h" #include "OptionIconRow.h" #include "StageDisplay.h" @@ -74,7 +74,7 @@ protected: BitmapText m_textSongOptions; OptionIconRow m_OptionIconRow[NUM_PLAYERS]; Sprite m_sprMeterFrame[NUM_PLAYERS]; - FootMeter m_FootMeter[NUM_PLAYERS]; + DifficultyMeter m_DifficultyMeter[NUM_PLAYERS]; MusicSortDisplay m_MusicSortDisplay; Sprite m_sprHighScoreFrame[NUM_PLAYERS]; ScoreDisplayNormal m_HighScore[NUM_PLAYERS]; diff --git a/stepmania/src/ScreenSelectMaxType1.cpp b/stepmania/src/ScreenSelectStyle.cpp similarity index 59% rename from stepmania/src/ScreenSelectMaxType1.cpp rename to stepmania/src/ScreenSelectStyle.cpp index 90ca8159a3..55ff10eac2 100644 --- a/stepmania/src/ScreenSelectMaxType1.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -1,7 +1,7 @@ #include "global.h" /* ----------------------------------------------------------------------------- - Class: ScreenSelectMaxType1 + Class: ScreenSelectStyle Desc: See header. @@ -10,7 +10,7 @@ ----------------------------------------------------------------------------- */ -#include "ScreenSelectMaxType1.h" +#include "ScreenSelectStyle.h" #include "GameManager.h" #include "ThemeManager.h" #include "PrefsManager.h" @@ -18,20 +18,24 @@ #include "GameState.h" -#define JOINT_PREMIUM_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","JointPremiumOnCommand") -#define JOINT_PREMIUM_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","JointPremiumOffCommand") -#define ICON_ON_COMMAND( i ) THEME->GetMetric ("ScreenSelectMaxType1",ssprintf("Icon%dOnCommand",i+1)) -#define ICON_OFF_COMMAND( i ) THEME->GetMetric ("ScreenSelectMaxType1",ssprintf("Icon%dOffCommand",i+1)) -#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectMaxType1","DisabledColor") -#define EXPLANATION_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","ExplanationOnCommand") -#define EXPLANATION_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","ExplanationOffCommand") -#define INFO_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","InfoOnCommand") -#define INFO_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","InfoOffCommand") -#define PREVIEW_ON_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","PreviewOnCommand") -#define PREVIEW_OFF_COMMAND THEME->GetMetric ("ScreenSelectMaxType1","PreviewOffCommand") +#define JOINT_PREMIUM_ON_COMMAND THEME->GetMetric ("ScreenSelectStyle","JointPremiumOnCommand") +#define JOINT_PREMIUM_OFF_COMMAND THEME->GetMetric ("ScreenSelectStyle","JointPremiumOffCommand") +#define ICON_ON_COMMAND( i ) THEME->GetMetric ("ScreenSelectStyle",ssprintf("Icon%dOnCommand",i+1)) +#define ICON_OFF_COMMAND( i ) THEME->GetMetric ("ScreenSelectStyle",ssprintf("Icon%dOffCommand",i+1)) +#define ICON_GAIN_FOCUS_COMMAND THEME->GetMetric ("ScreenSelectStyle","IconGainFocusCommand") +#define ICON_LOSE_FOCUS_COMMAND THEME->GetMetric ("ScreenSelectStyle","IconLoseFocusCommand") +#define DISABLED_COLOR THEME->GetMetricC("ScreenSelectStyle","DisabledColor") +#define EXPLANATION_ON_COMMAND THEME->GetMetric ("ScreenSelectStyle","ExplanationOnCommand") +#define EXPLANATION_OFF_COMMAND THEME->GetMetric ("ScreenSelectStyle","ExplanationOffCommand") +#define WARNING_ON_COMMAND THEME->GetMetric ("ScreenSelectStyle","WarningOnCommand") +#define WARNING_OFF_COMMAND THEME->GetMetric ("ScreenSelectStyle","WarningOffCommand") +#define INFO_ON_COMMAND THEME->GetMetric ("ScreenSelectStyle","InfoOnCommand") +#define INFO_OFF_COMMAND THEME->GetMetric ("ScreenSelectStyle","InfoOffCommand") +#define PICTURE_ON_COMMAND THEME->GetMetric ("ScreenSelectStyle","PictureOnCommand") +#define PICTURE_OFF_COMMAND THEME->GetMetric ("ScreenSelectStyle","PictureOffCommand") -ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxType1" ) +ScreenSelectStyle::ScreenSelectStyle() : ScreenSelect( "ScreenSelectStyle" ) { m_iSelection = 0; @@ -40,13 +44,11 @@ ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxTyp for( i=0; iGetGameDefForGame(mc.game)->m_szName; - // // Load icon // - CString sIconElementName = ssprintf("ScreenSelectMaxType1 icon %s %s", sGameName.GetString(), mc.name ); + CString sIconElementName = ssprintf("ScreenSelectStyle icon %s", mc.name ); CString sIconPath = THEME->GetPathTo("Graphics",sIconElementName); if( sIconPath.empty() ) // element doesn't exist { @@ -63,23 +65,23 @@ ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxTyp // - // Load preview + // Load Picture // - CString sPreviewElementName = ssprintf("ScreenSelectMaxType1 preview %s %s", sGameName.GetString(), mc.name ); - CString sPreviewPath = THEME->GetPathTo("Graphics",sPreviewElementName); - if( sPreviewPath != "" ) + CString sPictureElementName = ssprintf("ScreenSelectStyle picture %s", mc.name ); + CString sPicturePath = THEME->GetPathTo("Graphics",sPictureElementName); + if( sPicturePath != "" ) { - m_sprPreview[i].Load( sPreviewPath ); -// m_sprPreview[i].Command( PREVIEW_X, PREVIEW_Y ); - m_sprPreview[i].SetDiffuse( RageColor(1,1,1,0) ); - this->AddChild( &m_sprPreview[i] ); + m_sprPicture[i].Load( sPicturePath ); +// m_sprPicture[i].Command( PREVIEW_X, PREVIEW_Y ); + m_sprPicture[i].SetDiffuse( RageColor(1,1,1,0) ); + this->AddChild( &m_sprPicture[i] ); } // // Load info // - CString sInfoElementName = ssprintf("ScreenSelectMaxType1 info %s %s", sGameName.GetString(), mc.name ); + CString sInfoElementName = ssprintf("ScreenSelectStyle info %s", mc.name ); CString sInfoPath = THEME->GetPathTo("Graphics",sInfoElementName); if( sInfoPath != "" ) { @@ -90,29 +92,33 @@ ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxTyp } } - // fix Z ordering of Preview and Info so that they draw on top + + m_sprWarning.Load( THEME->GetPathTo("Graphics","ScreenSelectStyle warning") ); + this->AddChild( &m_sprWarning ); + + m_sprExplanation.Load( THEME->GetPathTo("Graphics","ScreenSelectStyle explanation") ); + this->AddChild( &m_sprExplanation ); + + + + // fix Z ordering of Picture and Info so that they draw on top for( i=0; im_aModeChoices.size(); i++ ) - this->MoveToTail( &m_sprPreview[i] ); + this->MoveToTail( &m_sprPicture[i] ); for( i=0; im_aModeChoices.size(); i++ ) this->MoveToTail( &m_sprInfo[i] ); this->UpdateSelectableChoices(); - m_sprExplanation.Load( THEME->GetPathTo("Graphics","ScreenSelectMaxType1 explanation") ); -// m_sprExplanation.SetXY( EXPLANATION_X, EXPLANATION_Y ); - this->AddChild( &m_sprExplanation ); - if( PREFSMAN->m_bJointPremium ) { - m_sprJointPremium.Load( THEME->GetPathTo("Graphics","ScreenSelectMaxType1 joint premium") ); -// m_sprJointPremium.SetXY( JOINT_PREMIUM_BANNER_X, JOINT_PREMIUM_BANNER_Y ); + m_sprJointPremium.Load( THEME->GetPathTo("Graphics","ScreenSelectStyle joint premium") ); this->AddChild( &m_sprJointPremium ); } - m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenSelectMaxType1 change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); + m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenSelectStyle change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); // @@ -124,12 +130,13 @@ ScreenSelectMaxType1::ScreenSelectMaxType1() : ScreenSelect( "ScreenSelectMaxTyp m_sprIcon[i].Command( ICON_ON_COMMAND(i) ); } m_sprExplanation.Command( EXPLANATION_ON_COMMAND ); + m_sprWarning.Command( WARNING_ON_COMMAND ); m_sprJointPremium.Command( JOINT_PREMIUM_ON_COMMAND ); - // let AfterChange tween Preview and Info + // let AfterChange tween Picture and Info } -void ScreenSelectMaxType1::MenuLeft( PlayerNumber pn ) +void ScreenSelectStyle::MenuLeft( PlayerNumber pn ) { int iSwitchToIndex = -1; // -1 means none found for( int i=m_iSelection-1; i>=0; i-- ) @@ -150,7 +157,7 @@ void ScreenSelectMaxType1::MenuLeft( PlayerNumber pn ) AfterChange(); } -void ScreenSelectMaxType1::MenuRight( PlayerNumber pn ) +void ScreenSelectStyle::MenuRight( PlayerNumber pn ) { int iSwitchToIndex = -1; // -1 means none found for( unsigned i=m_iSelection+1; iSendMessageToTopScreen( SM_AllDoneChoosing, 0 ); @@ -192,17 +199,18 @@ void ScreenSelectMaxType1::MenuStart( PlayerNumber pn ) m_textIcon[i].Command( ICON_OFF_COMMAND(i) ); } m_sprExplanation.Command( EXPLANATION_OFF_COMMAND ); - m_sprPreview[m_iSelection].Command( PREVIEW_OFF_COMMAND ); + m_sprWarning.Command( WARNING_OFF_COMMAND ); + m_sprPicture[m_iSelection].Command( PICTURE_OFF_COMMAND ); m_sprInfo[m_iSelection].Command( INFO_OFF_COMMAND ); m_sprJointPremium.Command( JOINT_PREMIUM_OFF_COMMAND ); } -int ScreenSelectMaxType1::GetSelectionIndex( PlayerNumber pn ) +int ScreenSelectStyle::GetSelectionIndex( PlayerNumber pn ) { return m_iSelection; } -void ScreenSelectMaxType1::UpdateSelectableChoices() +void ScreenSelectStyle::UpdateSelectableChoices() { unsigned i; /* If a player joins during the tween-in, this diffuse change @@ -244,27 +252,27 @@ void ScreenSelectMaxType1::UpdateSelectableChoices() AfterChange(); } -void ScreenSelectMaxType1::BeforeChange() +void ScreenSelectStyle::BeforeChange() { // dim/hide old selection - m_sprIcon[m_iSelection].SetEffectNone(); - m_textIcon[m_iSelection].SetEffectNone(); - m_sprPreview[m_iSelection].StopTweening(); + m_sprIcon[m_iSelection].Command( ICON_LOSE_FOCUS_COMMAND ); + m_textIcon[m_iSelection].Command( ICON_LOSE_FOCUS_COMMAND ); + m_sprPicture[m_iSelection].StopTweening(); m_sprInfo[m_iSelection].StopTweening(); - m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,0) ); + m_sprPicture[m_iSelection].SetDiffuse( RageColor(1,1,1,0) ); m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,0) ); - m_sprPreview[m_iSelection].SetGlow( RageColor(1,1,1,0) ); + m_sprPicture[m_iSelection].SetGlow( RageColor(1,1,1,0) ); m_sprInfo[m_iSelection].SetGlow( RageColor(1,1,1,0) ); } -void ScreenSelectMaxType1::AfterChange() +void ScreenSelectStyle::AfterChange() { - m_sprIcon[m_iSelection].SetEffectGlowShift(); - m_textIcon[m_iSelection].SetEffectGlowShift(); - m_sprPreview[m_iSelection].SetDiffuse( RageColor(1,1,1,1) ); + m_sprIcon[m_iSelection].Command( ICON_GAIN_FOCUS_COMMAND ); + m_textIcon[m_iSelection].Command( ICON_GAIN_FOCUS_COMMAND ); + m_sprPicture[m_iSelection].SetDiffuse( RageColor(1,1,1,1) ); m_sprInfo[m_iSelection].SetDiffuse( RageColor(1,1,1,1) ); - m_sprPreview[m_iSelection].SetZoom( 1 ); + m_sprPicture[m_iSelection].SetZoom( 1 ); m_sprInfo[m_iSelection].SetZoom( 1 ); - m_sprPreview[m_iSelection].Command( PREVIEW_ON_COMMAND ); + m_sprPicture[m_iSelection].Command( PICTURE_ON_COMMAND ); m_sprInfo[m_iSelection].Command( INFO_ON_COMMAND ); } diff --git a/stepmania/src/ScreenSelectMaxType1.h b/stepmania/src/ScreenSelectStyle.h similarity index 83% rename from stepmania/src/ScreenSelectMaxType1.h rename to stepmania/src/ScreenSelectStyle.h index 6a6302b568..d56b067d53 100644 --- a/stepmania/src/ScreenSelectMaxType1.h +++ b/stepmania/src/ScreenSelectStyle.h @@ -1,8 +1,8 @@ -#ifndef ScreenSelectMaxType1_H -#define ScreenSelectMaxType1_H +#ifndef ScreenSelectStyle_H +#define ScreenSelectStyle_H /* ----------------------------------------------------------------------------- - Class: ScreenSelectMaxType1 + Class: ScreenSelectStyle Desc: @@ -19,10 +19,10 @@ #define MAX_MODE_CHOICES 30 -class ScreenSelectMaxType1 : public ScreenSelect +class ScreenSelectStyle : public ScreenSelect { public: - ScreenSelectMaxType1(); + ScreenSelectStyle(); virtual void MenuLeft( PlayerNumber pn ); virtual void MenuRight( PlayerNumber pn ); @@ -39,9 +39,10 @@ protected: // Artists don't make graphics for every single Game, so // have a text representation if textures are missing. BitmapText m_textIcon[MAX_MODE_CHOICES]; - Sprite m_sprPreview[MAX_MODE_CHOICES]; + Sprite m_sprPicture[MAX_MODE_CHOICES]; Sprite m_sprInfo[MAX_MODE_CHOICES]; Sprite m_sprExplanation; + Sprite m_sprWarning; Sprite m_sprJointPremium; RageSound m_soundChange; diff --git a/stepmania/src/ScreenSelectStyle5th.cpp b/stepmania/src/ScreenSelectStyle5th.cpp index a50f8bdefa..d188724a28 100644 --- a/stepmania/src/ScreenSelectStyle5th.cpp +++ b/stepmania/src/ScreenSelectStyle5th.cpp @@ -28,6 +28,8 @@ #define TIMER_SECONDS THEME->GetMetricI("ScreenSelectStyle5th","TimerSeconds") #define NEXT_SCREEN THEME->GetMetric("ScreenSelectStyle5th","NextScreen") +const int NUM_DANCE_STYLES = 5; + const CString DANCE_STYLES[NUM_DANCE_STYLES] = { "single", "versus", @@ -164,23 +166,18 @@ ScreenSelectStyle5th::ScreenSelectStyle5th() m_textExplanation2.SetHorizAlign( BitmapText::align_left ); this->AddChild( &m_textExplanation2 ); - m_Menu.Load( - THEME->GetPathTo("BGAnimations","select style"), - THEME->GetPathTo("Graphics","select style top edge"), - HELP_TEXT, false, true, TIMER_SECONDS - ); + m_Menu.Load( "ScreenSelectStyle5th" ); this->AddChild( &m_Menu ); - m_soundChange.Load( THEME->GetPathTo("Graphics","select style change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); + m_soundChange.Load( THEME->GetPathTo("Graphics","ScreenSelectStyle5th change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style intro") ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","select style music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSelectStyle5th music") ); m_soundChange.PlayRandom(); TweenOnScreen(); - m_Menu.TweenOnScreenFromBlack( SM_None ); } @@ -201,7 +198,7 @@ void ScreenSelectStyle5th::Input( const DeviceInput& DeviceI, const InputEventTy { LOG->Trace( "ScreenSelectStyle5th::Input()" ); - if( m_Menu.IsClosing() ) + if( m_Menu.IsTransitioning() ) return; Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); // default input handler @@ -274,8 +271,8 @@ void ScreenSelectStyle5th::MenuStart( PlayerNumber pn ) CString sCurStyleName = GAMESTATE->GetCurrentStyleDef()->m_szName; sCurStyleName.MakeLower(); - if( -1!=sCurStyleName.Find("single") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style comment single") ); - else if( -1!=sCurStyleName.Find("versus") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style comment versus") ); + if( -1!=sCurStyleName.Find("single") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("ScreenSelectStyle5th comment single") ); + else if( -1!=sCurStyleName.Find("versus") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("ScreenSelectStyle5th comment versus") ); else if( -1!=sCurStyleName.Find("double") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style comment double") ); else if( -1!=sCurStyleName.Find("couple") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style comment couple") ); else if( -1!=sCurStyleName.Find("solo") ) SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("select style comment solo") ); @@ -283,7 +280,7 @@ void ScreenSelectStyle5th::MenuStart( PlayerNumber pn ) this->ClearMessageQueue(); TweenOffScreen(); - m_Menu.TweenOffScreenToMenu( SM_GoToNextScreen ); + m_Menu.StartTransitioning( SM_GoToNextScreen ); m_soundSelect.PlayRandom(); } @@ -291,7 +288,7 @@ void ScreenSelectStyle5th::MenuBack( PlayerNumber pn ) { SOUNDMAN->StopMusic(); - m_Menu.TweenOffScreenToBlack( SM_GoToPrevScreen, true ); + m_Menu.Back( SM_GoToPrevScreen ); } void ScreenSelectStyle5th::BeforeChange() diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index 607349f124..ac3d86a6b6 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -43,11 +43,7 @@ OptionRowData g_SongOptionsLines[NUM_SONG_OPTIONS_LINES] = { ScreenSongOptions::ScreenSongOptions() : - ScreenOptions( - THEME->GetPathTo("BGAnimations","song options"), - THEME->GetPathTo("Graphics","song options page"), - THEME->GetPathTo("Graphics","song options top edge") - ) + ScreenOptions("ScreenSongOptions",true) { LOG->Trace( "ScreenSongOptions::ScreenSongOptions()" ); diff --git a/stepmania/src/ScreenSoundOptions.cpp b/stepmania/src/ScreenSoundOptions.cpp index 2716c79e82..1948c694be 100644 --- a/stepmania/src/ScreenSoundOptions.cpp +++ b/stepmania/src/ScreenSoundOptions.cpp @@ -33,9 +33,7 @@ OptionRowData g_SoundOptionsLines[NUM_SOUND_OPTIONS_LINES] = { }; ScreenSoundOptions::ScreenSoundOptions() : - ScreenOptions( THEME->GetPathTo("BGAnimations","sound options"), - THEME->GetPathTo("Graphics","sound options page"), - THEME->GetPathTo("Graphics","sound options top edge") ) + ScreenOptions("ScreenSoundOptions",false) { LOG->Trace( "ScreenSoundOptions::ScreenSoundOptions()" ); @@ -49,9 +47,9 @@ ScreenSoundOptions::ScreenSoundOptions() : } Init( INPUTMODE_BOTH, g_SoundOptionsLines, NUM_SOUND_OPTIONS_LINES, false ); - m_Menu.StopTimer(); + m_Menu.m_MenuTimer.StopTimer(); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","sound options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenSoundOptions music") ); } void ScreenSoundOptions::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ) diff --git a/stepmania/src/ScreenStage.cpp b/stepmania/src/ScreenStage.cpp index 024d8fbc47..27de9c314f 100644 --- a/stepmania/src/ScreenStage.cpp +++ b/stepmania/src/ScreenStage.cpp @@ -110,14 +110,14 @@ ScreenStage::ScreenStage() int i; for( i=0; i<4; i++ ) { - m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage parts 5x3") ); + m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","ScreenStage parts 5x3") ); if( g_StageType != STAGE_TYPE_EZ2 ) // DONT DIFFUSE COLORS FOR EZ2. Coz we actually set the color in the .png m_sprNumbers[i].SetDiffuse( GAMESTATE->GetStageColor() ); m_sprNumbers[i].StopAnimating(); } - m_sprStage.Load( THEME->GetPathTo("Graphics","stage stage") ); // we may load a different graphic into here later + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage stage") ); // we may load a different graphic into here later m_sprStage.SetDiffuse( GAMESTATE->GetStageColor() ); @@ -179,22 +179,22 @@ ScreenStage::ScreenStage() } break; case MODE_FINAL: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage final") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage final") ); break; case MODE_EXTRA1: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra1") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage extra1") ); break; case MODE_EXTRA2: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage extra2") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage extra2") ); break; case MODE_NONSTOP: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage nonstop") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage nonstop") ); break; case MODE_ONI: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage oni") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage oni") ); break; case MODE_ENDLESS: - m_sprStage.Load( THEME->GetPathTo("Graphics","stage endless") ); + m_sprStage.Load( THEME->GetPathTo("Graphics","ScreenStage endless") ); break; default: ASSERT(0); @@ -221,7 +221,7 @@ ScreenStage::ScreenStage() m_quadMask.SetZ( 1 ); m_frameStage.SetXY( CENTER_X, fStageOffScreenY ); - m_frameStage.BeginTweening(0.8f, Actor::TWEEN_ACCELERATE ); + m_frameStage.BeginTweening(0.8f, Actor::TWEEN_DECELERATE ); m_frameStage.SetTweenY( CENTER_Y ); this->AddChild( &m_quadMask ); // add quad mask before stage so that it will block out the stage sprites diff --git a/stepmania/src/ScreenTextEntry.cpp b/stepmania/src/ScreenTextEntry.cpp index d7dad8059d..d7c6900b71 100644 --- a/stepmania/src/ScreenTextEntry.cpp +++ b/stepmania/src/ScreenTextEntry.cpp @@ -200,7 +200,7 @@ void ScreenTextEntry::MenuStart( PlayerNumber pn ) m_textAnswer.BeginTweening( 0.2f ); m_textAnswer.SetTweenDiffuse( RageColor(1,1,1,0) ); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu start") ); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") ); if( m_bCancelled ) { if( m_pOnCancel ) m_pOnCancel(); diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 740948ef5b..09c1c1fb36 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -27,40 +27,53 @@ #include "RageSoundManager.h" -#define HELP_X THEME->GetMetricF("ScreenTitleMenu","HelpX") -#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY") -#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX") -#define CHOICES_START_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesStartY") -#define CHOICES_SPACING_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesSpacingY") -#define CHOICES_SHADOW_LENGTH THEME->GetMetricF("ScreenTitleMenu","ChoicesShadowLength") -#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenTitleMenu","ColorNotSelected") -#define COLOR_SELECTED THEME->GetMetricC("ScreenTitleMenu","ColorSelected") -#define ZOOM_NOT_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomNotSelected") -#define ZOOM_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomSelected") -#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenComments") -#define SECONDS_BETWEEN_JOINT_PREMIUM_SCROLL THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenJointPremiumScroll") -#define SECONDS_BEFORE_ATTRACT THEME->GetMetricF("ScreenTitleMenu","SecondsBeforeAttract") -#define HELP_TEXT_HOME THEME->GetMetric("ScreenTitleMenu","HelpTextHome") -#define HELP_TEXT_PAY THEME->GetMetric("ScreenTitleMenu","HelpTextPay") -#define HELP_TEXT_FREE THEME->GetMetric("ScreenTitleMenu","HelpTextFree") -#define NEXT_SCREEN THEME->GetMetric("ScreenTitleMenu","NextScreen") +#define HELP_X THEME->GetMetricF("ScreenTitleMenu","HelpX") +#define HELP_Y THEME->GetMetricF("ScreenTitleMenu","HelpY") +#define CHOICES_X THEME->GetMetricF("ScreenTitleMenu","ChoicesX") +#define CHOICES_START_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesStartY") +#define CHOICES_SPACING_Y THEME->GetMetricF("ScreenTitleMenu","ChoicesSpacingY") +#define CHOICES_SHADOW_LENGTH THEME->GetMetricF("ScreenTitleMenu","ChoicesShadowLength") +#define COLOR_NOT_SELECTED THEME->GetMetricC("ScreenTitleMenu","ColorNotSelected") +#define COLOR_SELECTED THEME->GetMetricC("ScreenTitleMenu","ColorSelected") +#define ZOOM_NOT_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomNotSelected") +#define ZOOM_SELECTED THEME->GetMetricF("ScreenTitleMenu","ZoomSelected") +#define SECONDS_BETWEEN_COMMENTS THEME->GetMetricF("ScreenTitleMenu","SecondsBetweenComments") +#define SECONDS_BEFORE_ATTRACT THEME->GetMetricF("ScreenTitleMenu","SecondsBeforeAttract") +#define HELP_TEXT_HOME THEME->GetMetric("ScreenTitleMenu","HelpTextHome") +#define HELP_TEXT_PAY THEME->GetMetric("ScreenTitleMenu","HelpTextPay") +#define HELP_TEXT_FREE THEME->GetMetric("ScreenTitleMenu","HelpTextFree") +#define NEXT_SCREEN THEME->GetMetric("ScreenTitleMenu","NextScreen") const ScreenMessage SM_PlayComment = ScreenMessage(SM_User+1); const ScreenMessage SM_GoToAttractLoop = ScreenMessage(SM_User+13); -const ScreenMessage SM_ScrollJointPremium = ScreenMessage(SM_User+14); ScreenTitleMenu::ScreenTitleMenu() { LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" ); - if( PREFSMAN->m_bJointPremium ) - { - m_sprJointPremiumMsg.Load( THEME->GetPathTo("Graphics","title menu joint premium") ); - this->AddChild( &m_sprJointPremiumMsg ); - m_sprJointPremiumMsg.SetX( SCREEN_RIGHT+m_sprJointPremiumMsg.GetUnzoomedWidth()/2 ); - m_sprJointPremiumMsg.SetY( SCREEN_BOTTOM/2 ); + if( PREFSMAN->m_CoinMode!=PrefsManager::COIN_HOME && PREFSMAN->m_bJointPremium ) + { + m_JointPremium.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenTitleMenu joint premium") ); + this->AddChild( &m_JointPremium ); } + switch( PREFSMAN->m_CoinMode ) + { + case PrefsManager::COIN_HOME: + // do nothing + break; + case PrefsManager::COIN_PAY: + m_CoinMode.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenTitleMenu pay") ); + this->AddChild( &m_CoinMode ); + break; + case PrefsManager::COIN_FREE: + m_CoinMode.LoadFromAniDir( THEME->GetPathTo("BGAnimations","ScreenTitleMenu free") ); + this->AddChild( &m_CoinMode ); + break; + default: + ASSERT(0); + } + m_textHelp.LoadFromFont( THEME->GetPathTo("Fonts","help") ); CString sHelpText; switch( PREFSMAN->m_CoinMode ) @@ -105,9 +118,9 @@ ScreenTitleMenu::ScreenTitleMenu() m_soundAttract.Load( ANNOUNCER->GetPathTo("title menu attract") ); - m_soundChange.Load( THEME->GetPathTo("Sounds","title menu change") ); - m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); - m_soundInvalid.Load( THEME->GetPathTo("Sounds","menu invalid") ); + m_soundChange.Load( THEME->GetPathTo("Sounds","ScreenTitleMenu change") ); + m_soundSelect.Load( THEME->GetPathTo("Sounds","Common start") ); + m_soundInvalid.Load( THEME->GetPathTo("Sounds","Common invalid") ); m_Choice = CHOICE_GAME_START; @@ -115,12 +128,12 @@ ScreenTitleMenu::ScreenTitleMenu() LoseFocus( i ); GainFocus( m_Choice ); - SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","title menu music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenTitleMenu music") ); this->SendScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS); - this->MoveToTail( &(ScreenAttract::m_Fade) ); // put it in the back so it covers up the stuff we just added - this->SendScreenMessage( SM_ScrollJointPremium, 1); + this->MoveToTail( &m_In ); // put it in the back so it covers up the stuff we just added + this->MoveToTail( &m_Out ); // put it in the back so it covers up the stuff we just added } ScreenTitleMenu::~ScreenTitleMenu() @@ -135,133 +148,132 @@ void ScreenTitleMenu::Input( const DeviceInput& DeviceI, const InputEventType ty if( type != IET_FIRST_PRESS ) return; - if( DeviceI.device == DEVICE_KEYBOARD && DeviceI.button == SDLK_F3 ) + + /* If the CoinMode was changed, we need to reload this screen + * so that the right choices will show */ + if( ScreenAttract::ChangeCoinModeInput( DeviceI, type, GameI, MenuI, StyleI ) ) { - /* Coin mode changed.. since this effects how this screen appears, JUST the - screen is just reloaded, not a reset as was before -- Miryokuteki */ - (int&)PREFSMAN->m_CoinMode = (PREFSMAN->m_CoinMode+1) % PrefsManager::NUM_COIN_MODES; - CString sMessage = "Coin Mode: "; - switch( PREFSMAN->m_CoinMode ) - { - case PrefsManager::COIN_HOME: sMessage += "HOME"; break; - case PrefsManager::COIN_PAY: sMessage += "PAY"; break; - case PrefsManager::COIN_FREE: sMessage += "FREE"; break; - } - SCREENMAN->SystemMessage( sMessage ); - SCREENMAN->RefreshCreditsMessages(); - SCREENMAN->SetNewScreen("ScreenTitleMenu"); - return; + SCREENMAN->SetNewScreen( "ScreenTitleMenu" ); } if( !MenuI.IsValid() ) return; - if( PREFSMAN->m_CoinMode==PrefsManager::COIN_HOME && m_Fade.IsClosing() ) - return; - - switch( MenuI.button ) + switch( PREFSMAN->m_CoinMode ) { - case MENU_BUTTON_UP: - switch( PREFSMAN->m_CoinMode ) + case PrefsManager::COIN_HOME: + switch( MenuI.button ) { - case PrefsManager::COIN_HOME: + case MENU_BUTTON_UP: + if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + break; TimeToDemonstration.GetDeltaTime(); /* Reset the demonstration timer when a key is pressed. */ LoseFocus( m_Choice ); if( m_Choice == 0 ) // wrap around m_Choice = (Choice)((int)NUM_CHOICES); m_Choice = Choice( m_Choice-1 ); - m_soundChange.PlayRandom(); + m_soundChange.Play(); GainFocus( m_Choice ); break; - case PrefsManager::COIN_PAY: - case PrefsManager::COIN_FREE: - return; // ignore - default: - ASSERT(0); - } - break; - case MENU_BUTTON_DOWN: - switch( PREFSMAN->m_CoinMode ) - { - case PrefsManager::COIN_HOME: + case MENU_BUTTON_DOWN: + if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + break; TimeToDemonstration.GetDeltaTime(); /* Reset the demonstration timer when a key is pressed. */ LoseFocus( m_Choice ); if( m_Choice == (int)ScreenTitleMenu::NUM_CHOICES-1 ) m_Choice = (Choice)-1; // wrap around m_Choice = Choice( m_Choice+1 ); - m_soundChange.PlayRandom(); + m_soundChange.Play(); GainFocus( m_Choice ); break; - case PrefsManager::COIN_PAY: - case PrefsManager::COIN_FREE: - return; // ignore - } - break; - case MENU_BUTTON_BACK: - m_Fade.CloseWipingRight( SM_GoToAttractLoop ); - break; - case MENU_BUTTON_START: - /* If this side is already in, don't re-join (and re-pay!). */ - if(GAMESTATE->m_bSideIsJoined[MenuI.player]) + case MENU_BUTTON_BACK: + if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + break; + m_Out.StartTransitioning( SM_GoToAttractLoop ); break; - - switch( PREFSMAN->m_CoinMode ) - { - case PrefsManager::COIN_PAY: - if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit ) - break; // not enough coins - else - GAMESTATE->m_iCoins -= PREFSMAN->m_iCoinsPerCredit; - SCREENMAN->RefreshCreditsMessages(); - // fall through - case PrefsManager::COIN_HOME: - case PrefsManager::COIN_FREE: - GAMESTATE->m_bSideIsJoined[MenuI.player] = true; - GAMESTATE->m_MasterPlayerNumber = MenuI.player; - GAMESTATE->m_bPlayersCanJoin = false; - + case MENU_BUTTON_START: + if( m_In.IsTransitioning() ) + break; + /* break if the choice is invalid */ switch( m_Choice ) { case CHOICE_GAME_START: case CHOICE_SELECT_GAME: - /* At request, moved this into the options/operator menu -- Miryokuteki */ - //case CHOICE_MAP_KEY_JOY: case CHOICE_OPTIONS: #ifdef DEBUG case CHOICE_SANDBOX: #endif - m_soundSelect.PlayRandom(); - m_Fade.CloseWipingRight( SM_GoToNextScreen ); - break; case CHOICE_JUKEBOX: case CHOICE_EDIT: if( SONGMAN->GetNumSongs() == 0 ) { - m_soundInvalid.PlayRandom(); + m_soundInvalid.Play(); SCREENMAN->SystemMessage( "No songs are installed" ); - } - else - { - m_soundSelect.PlayRandom(); - m_Fade.CloseWipingRight( SM_GoToNextScreen ); + break; } break; case CHOICE_EXIT: - m_soundSelect.PlayRandom(); ExitGame(); LOG->Trace("CHOICE_EXIT: shutting down"); return; default: ASSERT(0); } - break; - default: - ASSERT(0); + + /* If this side is already in, don't re-join (and re-pay!). */ + if(GAMESTATE->m_bSideIsJoined[MenuI.player]) + break; + + GAMESTATE->m_bSideIsJoined[MenuI.player] = true; + if( GAMESTATE->m_MasterPlayerNumber == PLAYER_INVALID ) + GAMESTATE->m_MasterPlayerNumber = MenuI.player; + + SCREENMAN->RefreshCreditsMessages(); + + m_soundSelect.Play(); + + if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + break; + m_Out.StartTransitioning( SM_GoToNextScreen ); + } + break; + case PrefsManager::COIN_PAY: + case PrefsManager::COIN_FREE: + switch( MenuI.button ) + { + case MENU_BUTTON_BACK: + m_Out.StartTransitioning( SM_GoToAttractLoop ); + break; + case MENU_BUTTON_START: + /* If this side is already in, don't re-join (and re-pay!). */ + if(GAMESTATE->m_bSideIsJoined[MenuI.player]) + break; + + /* subtract coins */ + if( PREFSMAN->m_CoinMode == PrefsManager::COIN_PAY ) + if( GAMESTATE->m_iCoins < PREFSMAN->m_iCoinsPerCredit ) + break; // not enough coins + else + GAMESTATE->m_iCoins -= PREFSMAN->m_iCoinsPerCredit; + + GAMESTATE->m_bSideIsJoined[MenuI.player] = true; + if( GAMESTATE->m_MasterPlayerNumber == PLAYER_INVALID ) + GAMESTATE->m_MasterPlayerNumber = MenuI.player; + + SCREENMAN->RefreshCreditsMessages(); + + m_soundSelect.Play(); + + if( m_In.IsTransitioning() || m_Out.IsTransitioning() ) + break; + m_Out.StartTransitioning( SM_GoToNextScreen ); + break; } break; } + - Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); +// Screen::Input( DeviceI, type, GameI, MenuI, StyleI ); } void ScreenTitleMenu::Update( float fDelta ) @@ -271,11 +283,6 @@ void ScreenTitleMenu::Update( float fDelta ) this->SendScreenMessage( SM_GoToAttractLoop, 0 ); TimeToDemonstration.GetDeltaTime(); } - if( PREFSMAN->m_bJointPremium && TimeToJPScroll.PeekDeltaTime() >= SECONDS_BETWEEN_JOINT_PREMIUM_SCROLL ) - { - this->SendScreenMessage( SM_ScrollJointPremium, 0 ); - TimeToJPScroll.GetDeltaTime(); - } Screen::Update(fDelta); } @@ -284,19 +291,6 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM ) { switch( SM ) { - case SM_ScrollJointPremium: - if( PREFSMAN->m_bJointPremium ) - { - m_sprJointPremiumMsg.StopTweening(); - m_sprJointPremiumMsg.SetDiffuse( RageColor(1,1,1,1) ); - - m_sprJointPremiumMsg.SetX( SCREEN_RIGHT+m_sprJointPremiumMsg.GetUnzoomedWidth()/2 ); - m_sprJointPremiumMsg.SetY( SCREEN_BOTTOM/2 ); - - m_sprJointPremiumMsg.BeginTweening( 13.0f, Actor::TWEEN_ACCELERATE ); // slide on - m_sprJointPremiumMsg.SetTweenX( SCREEN_LEFT-m_sprJointPremiumMsg.GetUnzoomedWidth()*2 ); - } - break; case SM_PlayComment: m_soundAttract.PlayRandom(); this->SendScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS ); diff --git a/stepmania/src/ScreenTitleMenu.h b/stepmania/src/ScreenTitleMenu.h index e8c3cbcf83..5cde7892d6 100644 --- a/stepmania/src/ScreenTitleMenu.h +++ b/stepmania/src/ScreenTitleMenu.h @@ -13,9 +13,10 @@ #include "Sprite.h" #include "BitmapText.h" #include "TransitionFade.h" -#include "RandomSample.h" +#include "RageSound.h" #include "BGAnimation.h" #include "RageTimer.h" +#include "RandomSample.h" class ScreenTitleMenu : public ScreenLogo @@ -72,15 +73,15 @@ private: BitmapText m_textHelp; BitmapText m_textChoice[NUM_CHOICES]; - Sprite m_sprJointPremiumMsg; - RandomSample m_soundAttract; - RandomSample m_soundChange; - RandomSample m_soundSelect; - RandomSample m_soundInvalid; + RageSound m_soundChange; + RageSound m_soundSelect; + RageSound m_soundInvalid; RageTimer TimeToDemonstration; - RageTimer TimeToJPScroll; + + BGAnimation m_CoinMode; + BGAnimation m_JointPremium; }; diff --git a/stepmania/src/ScreenUnlock.h b/stepmania/src/ScreenUnlock.h index 17e8d7ddd1..8a3012943e 100644 --- a/stepmania/src/ScreenUnlock.h +++ b/stepmania/src/ScreenUnlock.h @@ -15,7 +15,7 @@ class ScreenUnlock : public ScreenAttract { public: - ScreenUnlock() : ScreenAttract("ScreenUnlock","unlock") { }; + ScreenUnlock() : ScreenAttract("ScreenUnlock") { }; }; diff --git a/stepmania/src/ScreenWarning.h b/stepmania/src/ScreenWarning.h index 64f26a6d5b..2513e669f5 100644 --- a/stepmania/src/ScreenWarning.h +++ b/stepmania/src/ScreenWarning.h @@ -15,7 +15,7 @@ class ScreenWarning : public ScreenAttract { public: - ScreenWarning() : ScreenAttract("ScreenWarning","warning") {}; + ScreenWarning() : ScreenAttract("ScreenWarning") {}; }; diff --git a/stepmania/src/ScrollBar.cpp b/stepmania/src/ScrollBar.cpp index cbd7ec01df..a5489f56d6 100644 --- a/stepmania/src/ScrollBar.cpp +++ b/stepmania/src/ScrollBar.cpp @@ -19,25 +19,25 @@ ScrollBar::ScrollBar() { - m_sprBackground.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") ); + m_sprBackground.Load( THEME->GetPathTo("Graphics","ScrollBar parts 1x3") ); m_sprBackground.StopAnimating(); m_sprBackground.SetState( 1 ); this->AddChild( &m_sprBackground ); - m_sprScrollThumbPart1.Load( THEME->GetPathTo("Graphics","select music scrollbar thumb") ); + m_sprScrollThumbPart1.Load( THEME->GetPathTo("Graphics","ScrollBar thumb") ); m_sprScrollThumbPart1.StopAnimating(); this->AddChild( &m_sprScrollThumbPart1 ); - m_sprScrollThumbPart2.Load( THEME->GetPathTo("Graphics","select music scrollbar thumb") ); + m_sprScrollThumbPart2.Load( THEME->GetPathTo("Graphics","ScrollBar thumb") ); m_sprScrollThumbPart2.StopAnimating(); this->AddChild( &m_sprScrollThumbPart2 ); - m_sprTopButton.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") ); + m_sprTopButton.Load( THEME->GetPathTo("Graphics","ScrollBar parts 1x3") ); m_sprTopButton.StopAnimating(); m_sprTopButton.SetState( 0 ); this->AddChild( &m_sprTopButton ); - m_sprBottomButton.Load( THEME->GetPathTo("Graphics","select music scrollbar parts 1x3") ); + m_sprBottomButton.Load( THEME->GetPathTo("Graphics","ScrollBar parts 1x3") ); m_sprBottomButton.StopAnimating(); m_sprBottomButton.SetState( 2 ); this->AddChild( &m_sprBottomButton ); diff --git a/stepmania/src/SmallGradeDisplay.cpp b/stepmania/src/SmallGradeDisplay.cpp index faf695094a..9f4b595e56 100644 --- a/stepmania/src/SmallGradeDisplay.cpp +++ b/stepmania/src/SmallGradeDisplay.cpp @@ -25,7 +25,7 @@ const float GRADES_TO_SCROLL = NUM_GRADE_FRAMES*4; SmallGradeDisplay::SmallGradeDisplay() { - Load( THEME->GetPathTo("Graphics","select music small grades 2x9") ); + Load( THEME->GetPathTo("Graphics","SmallGradeDisplay grades 2x9") ); StopAnimating(); SetGrade( PLAYER_1, GRADE_NO_DATA ); diff --git a/stepmania/src/SnapDisplay.cpp b/stepmania/src/SnapDisplay.cpp index 1009532208..4cf5ef1eb8 100644 --- a/stepmania/src/SnapDisplay.cpp +++ b/stepmania/src/SnapDisplay.cpp @@ -25,7 +25,7 @@ SnapDisplay::SnapDisplay() int i; for( i=0; i<2; i++ ) { - m_sprIndicators[i].Load( THEME->GetPathTo("Graphics","edit snap indicator") ); + m_sprIndicators[i].Load( THEME->GetPathTo("Graphics","SnapDisplay icon 6x1") ); ASSERT( m_sprIndicators[i].GetNumStates() == NUM_NOTE_TYPES ); m_sprIndicators[i].StopAnimating(); this->AddChild( &m_sprIndicators[i] ); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 05ea6ea5b9..7d52754eb0 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -326,18 +326,14 @@ int main(int argc, char* argv[]) ResetGame(); if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowSoftwareRenderer ) - SCREENMAN->Prompt( - SM_None, - "OpenGL hardware acceleration\n" - "was not detected.\n\n" - "StepMania will use the Microsoft\n" - "software OpenGL renderer.\n" - "However, the game is not playable\n" - "with this software renderer.\n" - "Please install the latest video\n" - "driver from your graphics card vendor\n" - "to enable OpenGL hardware acceleration." - ); + RageException::Throw( + "OpenGL hardware acceleration is not available on your system.\n\n" + "StepMania requires OpenGL hardware acceleration.\n\n" + "Please install the latest video driver from your graphics card vendor " + "to enable OpenGL hardware acceleration.\n\n" + "NO NOT FILE THIS ERROR AS A BUG!\n\n" + "(Advanced: To allow use of the software renderer, set 'AllowSoftwareRenderer=1' " + "in StepMania.ini)" ); /* Run the main loop. */ GameLoop(); @@ -389,10 +385,13 @@ int main(int argc, char* argv[]) * the key should be sent on to screens. */ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput GameI, MenuInput MenuI, StyleInput StyleI ) { + /* None of the globals keys act on types other than FIRST_PRESS */ + if( type == IET_FIRST_PRESS ) + return false; + switch( MenuI.button ) { case MENU_BUTTON_OPERATOR: - if( type == IET_FIRST_PRESS ) return true; /* Global operator key, to get quick access to the options menu. Don't * do this if we're on a "system menu", which includes the editor @@ -406,28 +405,16 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam case MENU_BUTTON_COIN: /* Handle a coin insertion. */ - if( GAMESTATE->m_bEditing ) + if( GAMESTATE->m_bEditing ) // no coins while editing break; - if( type == IET_FIRST_PRESS ) return true; - - switch( PREFSMAN->m_CoinMode ) - { - case PrefsManager::COIN_FREE: // fall through - case PrefsManager::COIN_HOME: // fall through - case PrefsManager::COIN_PAY: - GAMESTATE->m_iCoins++; - SCREENMAN->RefreshCreditsMessages(); - SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") ); - return true; - default: - ASSERT(0); - return true; - } + GAMESTATE->m_iCoins++; + SCREENMAN->RefreshCreditsMessages(); + SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common coin") ); + return false; // Attract need to know because they go to TitleMenu on > 1 credit } if(DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_F4)) { - if(type != IET_FIRST_PRESS) return true; if( INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || INPUTFILTER->IsBeingPressed( DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) { @@ -449,8 +436,6 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam if(DeviceI == DeviceInput(DEVICE_KEYBOARD, SDLK_F5)) // F5 conflicts with editor and AutoSync { - if(type != IET_FIRST_PRESS) return true; - // pressed F6. Save Screenshot. CString sPath; for( int i=0; i<1000; i++ ) @@ -469,7 +454,6 @@ bool HandleGlobalInputs( DeviceInput DeviceI, InputEventType type, GameInput Gam if( INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_RALT)) || INPUTFILTER->IsBeingPressed(DeviceInput(DEVICE_KEYBOARD, SDLK_LALT)) ) { - if(type != IET_FIRST_PRESS) return true; /* alt-enter */ PREFSMAN->m_bWindowed = !PREFSMAN->m_bWindowed; ApplyGraphicOptions(); diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 24a7713e76..3fb4a56bc3 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -1052,6 +1052,14 @@ SOURCE=.\DifficultyIcon.h # End Source File # Begin Source File +SOURCE=.\DifficultyMeter.cpp +# End Source File +# Begin Source File + +SOURCE=.\DifficultyMeter.h +# End Source File +# Begin Source File + SOURCE=.\DifficultyRating.cpp # End Source File # Begin Source File @@ -1076,14 +1084,6 @@ SOURCE=.\FadingBanner.h # End Source File # Begin Source File -SOURCE=.\FootMeter.cpp -# End Source File -# Begin Source File - -SOURCE=.\FootMeter.h -# End Source File -# Begin Source File - SOURCE=.\GradeDisplay.cpp # End Source File # Begin Source File @@ -1156,14 +1156,6 @@ SOURCE=.\MusicSortDisplay.h # End Source File # Begin Source File -SOURCE=.\MusicStatusDisplay.cpp -# End Source File -# Begin Source File - -SOURCE=.\MusicStatusDisplay.h -# End Source File -# Begin Source File - SOURCE=.\MusicWheel.cpp # End Source File # Begin Source File @@ -1258,6 +1250,14 @@ SOURCE=.\TipDisplay.cpp SOURCE=.\TipDisplay.h # End Source File +# Begin Source File + +SOURCE=.\WheelNotifyIcon.cpp +# End Source File +# Begin Source File + +SOURCE=.\WheelNotifyIcon.h +# End Source File # End Group # Begin Group "Actors used in Gameplay" @@ -1797,6 +1797,22 @@ SOURCE=.\ScreenSelectCourse.h # End Source File # Begin Source File +SOURCE=.\ScreenSelectDifficulty.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenSelectDifficulty.h +# End Source File +# Begin Source File + +SOURCE=.\ScreenSelectDifficultyEX.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenSelectDifficultyEX.h +# End Source File +# Begin Source File + SOURCE=.\ScreenSelectGame.cpp # End Source File # Begin Source File @@ -1813,30 +1829,6 @@ SOURCE=.\ScreenSelectGroup.h # End Source File # Begin Source File -SOURCE=.\ScreenSelectMaxType1.cpp -# End Source File -# Begin Source File - -SOURCE=.\ScreenSelectMaxType1.h -# End Source File -# Begin Source File - -SOURCE=.\ScreenSelectMaxType2.cpp -# End Source File -# Begin Source File - -SOURCE=.\ScreenSelectMaxType2.h -# End Source File -# Begin Source File - -SOURCE=.\ScreenSelectMaxType2EX.cpp -# End Source File -# Begin Source File - -SOURCE=.\ScreenSelectMaxType2EX.h -# End Source File -# Begin Source File - SOURCE=.\ScreenSelectMode.cpp # End Source File # Begin Source File @@ -1853,6 +1845,14 @@ SOURCE=.\ScreenSelectMusic.h # End Source File # Begin Source File +SOURCE=.\ScreenSelectStyle.cpp +# End Source File +# Begin Source File + +SOURCE=.\ScreenSelectStyle.h +# End Source File +# Begin Source File + SOURCE=.\ScreenSelectStyle5th.cpp # End Source File # Begin Source File diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index bf39411e41..8438fc465d 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -387,6 +387,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + + @@ -405,18 +411,6 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ - - - - - - - - @@ -429,6 +423,12 @@ cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ + + + + diff --git a/stepmania/src/Style.h b/stepmania/src/Style.h index 91eca29e2f..d77e29b546 100644 --- a/stepmania/src/Style.h +++ b/stepmania/src/Style.h @@ -36,29 +36,5 @@ enum Style STYLE_INVALID, }; -const int NUM_DANCE_STYLES = 6; -const int NUM_PUMP_STYLES = 5; -const int NUM_EZ2_STYLES = 5; -const int NUM_PARA_STYLES = 1; -const int NUM_DS3DDX_STYLES = 1; -const int NUM_BM_STYLES = 1; - -// Ugh. This is needed for the style icon. -// TODO: Find a more elegant way to handle this -inline int GetStyleIndexRelativeToGame( int iGameIndex, Style style ) -{ - int iStyleIndex = style; - switch( iGameIndex ) - { - case 0: break; // dance - case 1: iStyleIndex -= NUM_DANCE_STYLES; break; // pump - case 2: iStyleIndex -= NUM_DANCE_STYLES+NUM_PUMP_STYLES; break; // ez2 - case 3: iStyleIndex -= NUM_DANCE_STYLES+NUM_PUMP_STYLES+NUM_EZ2_STYLES; break; // para - case 4: iStyleIndex -= NUM_DANCE_STYLES+NUM_PUMP_STYLES+NUM_EZ2_STYLES+NUM_PARA_STYLES; break; // ds3ddx - case 5: iStyleIndex -= NUM_DANCE_STYLES+NUM_PUMP_STYLES+NUM_EZ2_STYLES+NUM_PARA_STYLES+NUM_DS3DDX_STYLES; break; // bm - default: ASSERT(0); // invalid game index - } - return iStyleIndex; -} #endif diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index f455cc0728..c06f028170 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -151,7 +151,7 @@ try_element_again: #if defined(WIN32) // XXX arch? if( DISPLAY->IsWindowed() ) - if( MessageBox(NULL, message.GetString(), "ThemeManager", MB_RETRYCANCEL ) == IDRETRY) + if( MessageBox(NULL, message, "ThemeManager", MB_RETRYCANCEL ) == IDRETRY) goto try_element_again; #endif RageException::Throw( "%s", message.GetString() ); @@ -233,7 +233,7 @@ try_element_again: return ret; #if defined(DEBUG) && defined(WIN32) - CString sMessage = ssprintf("The theme element %s/%s is missing.",sAssetCategory.GetString(),sFileName.GetString()); + CString sMessage = ssprintf("The theme element '%s/%s' is missing.",sAssetCategory.GetString(),sFileName.GetString()); switch( MessageBox(NULL, sMessage, "ThemeManager", MB_RETRYCANCEL ) ) { case IDRETRY: @@ -301,7 +301,7 @@ try_metric_again: } #if defined(DEBUG) && defined(WIN32) - if( IDRETRY == MessageBox(NULL,ssprintf("The theme metric %s-%s is missing. Correct this and click Retry, or Cancel to break.",sClassName.GetString(),sValueName.GetString()),"ThemeManager",MB_RETRYCANCEL ) ) + if( IDRETRY == MessageBox(NULL,ssprintf("The theme metric '%s-%s' is missing. Correct this and click Retry, or Cancel to break.",sClassName.GetString(),sValueName.GetString()),"ThemeManager",MB_RETRYCANCEL ) ) goto try_metric_again; #endif diff --git a/stepmania/src/TransitionBGAnimation.cpp b/stepmania/src/TransitionBGAnimation.cpp index 27598c5028..f7972e6d9b 100644 --- a/stepmania/src/TransitionBGAnimation.cpp +++ b/stepmania/src/TransitionBGAnimation.cpp @@ -24,6 +24,8 @@ TransitionBGAnimation::TransitionBGAnimation() void TransitionBGAnimation::Load( CString sBGAniDir ) { m_BGAnimation.LoadFromAniDir( sBGAniDir ); + + m_sound.Load( sBGAniDir ); } @@ -56,6 +58,11 @@ void TransitionBGAnimation::StartTransitioning( ScreenMessage send_when_done ) ASSERT( m_State == waiting ); // can't call this more than once m_MessageToSendWhenDone = send_when_done; m_State = transitioning; + m_sound.PlayRandom(); m_fSecsIntoTransition = 0.0; } +float TransitionBGAnimation::GetLengthSeconds() +{ + return m_BGAnimation.GetLengthSeconds(); +} diff --git a/stepmania/src/TransitionBGAnimation.h b/stepmania/src/TransitionBGAnimation.h index 08e92b6aaa..7beff2d12c 100644 --- a/stepmania/src/TransitionBGAnimation.h +++ b/stepmania/src/TransitionBGAnimation.h @@ -14,6 +14,7 @@ #include "Actor.h" #include "BGAnimation.h" #include "ScreenMessage.h" +#include "RandomSample.h" class TransitionBGAnimation : public Actor @@ -26,9 +27,10 @@ public: virtual void Update( float fDeltaTime ); virtual void DrawPrimitives(); - virtual void StartTransitioning( ScreenMessage send_when_done ); + virtual void StartTransitioning( ScreenMessage send_when_done = SM_None ); bool IsTransitioning() { return m_State == transitioning; }; + float GetLengthSeconds(); protected: @@ -41,6 +43,7 @@ protected: BGAnimation m_BGAnimation; + RandomSample m_sound; ScreenMessage m_MessageToSendWhenDone; }; diff --git a/stepmania/src/MusicStatusDisplay.cpp b/stepmania/src/WheelNotifyIcon.cpp similarity index 85% rename from stepmania/src/MusicStatusDisplay.cpp rename to stepmania/src/WheelNotifyIcon.cpp index e0133b6eb3..54eef8e3ba 100644 --- a/stepmania/src/MusicStatusDisplay.cpp +++ b/stepmania/src/WheelNotifyIcon.cpp @@ -1,7 +1,7 @@ #include "global.h" /* ----------------------------------------------------------------------------- - Class: MusicStatusDisplay + Class: WheelNotifyIcon Desc: See header. @@ -10,24 +10,24 @@ ----------------------------------------------------------------------------- */ -#include "MusicStatusDisplay.h" +#include "WheelNotifyIcon.h" #include "RageUtil.h" #include "GameConstantsAndTypes.h" #include "MusicWheel.h" -#include "MusicStatusDisplay.h" +#include "WheelNotifyIcon.h" #include "RageTimer.h" #include #include "ThemeManager.h" -MusicStatusDisplay::MusicStatusDisplay() +WheelNotifyIcon::WheelNotifyIcon() { - Load( THEME->GetPathTo("Graphics","music status icons 4x2") ); + Load( THEME->GetPathTo("Graphics","WheelNotifyIcon icons 4x2") ); StopAnimating(); } -void MusicStatusDisplay::SetFlags( Flags flags ) +void WheelNotifyIcon::SetFlags( Flags flags ) { m_vIconsToShow.clear(); @@ -71,7 +71,7 @@ void MusicStatusDisplay::SetFlags( Flags flags ) Sprite::SetDiffuse( RageColor(1,1,1,1) ); } -void MusicStatusDisplay::DrawPrimitives() +void WheelNotifyIcon::DrawPrimitives() { float fSecondFraction = fmodf(RageTimer::GetTimeSinceStart(), 1 ); if( m_vIconsToShow.size() > 0 ) diff --git a/stepmania/src/MusicStatusDisplay.h b/stepmania/src/WheelNotifyIcon.h similarity index 84% rename from stepmania/src/MusicStatusDisplay.h rename to stepmania/src/WheelNotifyIcon.h index 1eee7da834..ad58a28de6 100644 --- a/stepmania/src/MusicStatusDisplay.h +++ b/stepmania/src/WheelNotifyIcon.h @@ -1,8 +1,8 @@ -#ifndef MUSICSTATUSDISPLAY_H -#define MUSICSTATUSDISPLAY_H +#ifndef WheelNotifyIcon_H +#define WheelNotifyIcon_H /* ----------------------------------------------------------------------------- - Class: MusicStatusDisplay + Class: WheelNotifyIcon Desc: A little graphic to the left of the song's text banner in the MusicWheel. @@ -16,10 +16,10 @@ -class MusicStatusDisplay : public Sprite +class WheelNotifyIcon : public Sprite { public: - MusicStatusDisplay(); + WheelNotifyIcon(); struct Flags {