diff --git a/stepmania/NEWS b/stepmania/NEWS index f04682b572..611ada5ab9 100644 --- a/stepmania/NEWS +++ b/stepmania/NEWS @@ -1,4 +1,8 @@ ------------------------CVS after 3.00 beta 6---------------- +NEW FEATURE: Precise adjustment of timing window for each grade via the + stepmania.ini file (see JudgeWindowPerfectPercent, JudgeWindowGreatPercent, + etc). +OPTIMIZATION: Better texture caching algorithm for faster loading of menus. NEW FEATURE: Ez2SelectStyle ScrollingList Contents now Metric Configurable. NEW FEATURE: PPP and PUMP use Ez2SelectStyle Menus to become more arcade-accurate. diff --git a/stepmania/TODO.chris b/stepmania/TODO.chris index c2bf08eaed..99c7843682 100644 --- a/stepmania/TODO.chris +++ b/stepmania/TODO.chris @@ -2,6 +2,11 @@ Fix ///////////////////////// +on Ez2, the Ranking doesn't save (AAA, AA, A, B e.t.c.) +but the score does, any ideas why? + +timing window in INI + if you do an entire song in it. and save it'll crash re-add texture hints diff --git a/stepmania/src/Banner.cpp b/stepmania/src/Banner.cpp index 39522f53d6..869e7c5c95 100644 --- a/stepmania/src/Banner.cpp +++ b/stepmania/src/Banner.cpp @@ -77,7 +77,7 @@ bool Banner::LoadFromGroup( CString sGroupName ) else if( sGroupBannerPath != "" ) Banner::Load( sGroupBannerPath ); else - Banner::Load( THEME->GetPathTo("Graphics","select music section banner") ); + Banner::Load( THEME->GetPathTo("Graphics","fallback banner") ); return true; } diff --git a/stepmania/src/BitmapText.h b/stepmania/src/BitmapText.h index b39d617fc2..d8af24cb62 100644 --- a/stepmania/src/BitmapText.h +++ b/stepmania/src/BitmapText.h @@ -28,6 +28,7 @@ public: bool LoadFromFont( CString sFontName ); + bool LoadFromNumbers( CString sTexturePath ) { return LoadFromTextureAndChars(sTexturePath,"0123456789%. :x"); }; bool LoadFromTextureAndChars( CString sTexturePath, CString sChars ); void SetText( CString sText ); diff --git a/stepmania/src/Combo.cpp b/stepmania/src/Combo.cpp index bcc7d1a5a7..a46a6dd202 100644 --- a/stepmania/src/Combo.cpp +++ b/stepmania/src/Combo.cpp @@ -35,7 +35,7 @@ Combo::Combo() m_sprCombo.SetX( 40 ); m_sprCombo.SetZoom( 1.0f ); - m_textComboNumber.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay combo numbers 5x3"), "0123456789%. :x" ); + m_textComboNumber.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay combo numbers") ); m_textComboNumber.TurnShadowOn(); m_textComboNumber.SetHorizAlign( Actor::align_right ); m_textComboNumber.SetX( 0 ); diff --git a/stepmania/src/GameManager.cpp b/stepmania/src/GameManager.cpp index c5df0d00a4..9319a4edd8 100644 --- a/stepmania/src/GameManager.cpp +++ b/stepmania/src/GameManager.cpp @@ -1208,7 +1208,7 @@ NotesType GameManager::StringToNotesType( CString sNotesType ) return NotesType(i); // invalid NotesType - ASSERT(0); + LOG->Warn( "Invalid NotesType string '%s' encountered. Assuming this is 'dance-single'.", sNotesType ); return NOTES_TYPE_DANCE_SINGLE; } diff --git a/stepmania/src/LifeMeterBattery.cpp b/stepmania/src/LifeMeterBattery.cpp index 254a73b397..79b1479b74 100644 --- a/stepmania/src/LifeMeterBattery.cpp +++ b/stepmania/src/LifeMeterBattery.cpp @@ -53,13 +53,13 @@ void LifeMeterBattery::Load( PlayerNumber pn ) if( bPlayerEnabled ) this->AddChild( &m_sprBattery ); - m_textNumLives.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay battery life numbers 5x3"), "0123456789%. :x" ); + m_textNumLives.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery life numbers") ); m_textNumLives.SetDiffuse( D3DXCOLOR(1,1,1,1) ); m_textNumLives.TurnShadowOff(); if( bPlayerEnabled ) this->AddChild( &m_textNumLives ); - m_textPercent.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay battery percent numbers 5x3"), "0123456789%. :x" ); + m_textPercent.LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay battery percent numbers") ); m_textPercent.TurnShadowOff(); m_textPercent.SetZoom( 0.7f ); m_textPercent.SetText( "00.0" ); diff --git a/stepmania/src/MenuTimer.cpp b/stepmania/src/MenuTimer.cpp index 94fea32ddf..ed719320b6 100644 --- a/stepmania/src/MenuTimer.cpp +++ b/stepmania/src/MenuTimer.cpp @@ -25,12 +25,12 @@ MenuTimer::MenuTimer() m_fStallSeconds = 0; m_bTimerStopped = false; - m_textDigit1.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x3"), "0123456789%. :x" ); + m_textDigit1.LoadFromNumbers( THEME->GetPathTo("Numbers","menu timer numbers") ); m_textDigit1.TurnShadowOff(); m_textDigit1.SetXY( -18, 0 ); this->AddChild( &m_textDigit1 ); - m_textDigit2.LoadFromTextureAndChars( THEME->GetPathTo("Graphics","menu timer numbers 5x3"), "0123456789%. :x" ); + m_textDigit2.LoadFromNumbers( THEME->GetPathTo("Numbers","menu timer numbers") ); m_textDigit2.TurnShadowOff(); m_textDigit2.SetXY( +18, 0 ); this->AddChild( &m_textDigit2 ); diff --git a/stepmania/src/MsdFile.cpp b/stepmania/src/MsdFile.cpp index 4fd96f4232..6af98cffb7 100644 --- a/stepmania/src/MsdFile.cpp +++ b/stepmania/src/MsdFile.cpp @@ -49,9 +49,9 @@ bool MsdFile::ReadFile( CString sNewPath ) int iBytesRead = fread( szFileString, 1, iBufferSize, fp ); - ASSERT( iBufferSize > iBytesRead ); // why are these not always =? - /* because iBufferSize is the filesize+1000. why are we using Windows - * API calls for simple file access, anyway? XXX -glenn */ + ASSERT( iBufferSize > iBytesRead ); + /* why are we using Windows API calls for simple file access, anyway? XXX -glenn */ + /* What is the C way to get the file size? I don't see 'fstat' in C library... -Chris */ m_iNumValues = 0; diff --git a/stepmania/src/Player.cpp b/stepmania/src/Player.cpp index 7622d29d3d..4a683469c9 100644 --- a/stepmania/src/Player.cpp +++ b/stepmania/src/Player.cpp @@ -389,9 +389,9 @@ void Player::Step( int col ) TapNoteScore &score = m_TapNoteScores[col][iIndexOverlappingNote]; - if( fPercentFromPerfect < 0.25f ) score = TNS_PERFECT; - else if( fPercentFromPerfect < 0.50f ) score = TNS_GREAT; - else if( fPercentFromPerfect < 0.75f ) score = TNS_GOOD; + if( fPercentFromPerfect < PREFSMAN->m_fJudgeWindowPerfectPercent ) score = TNS_PERFECT; + else if( fPercentFromPerfect < PREFSMAN->m_fJudgeWindowGreatPercent ) score = TNS_GREAT; + else if( fPercentFromPerfect < PREFSMAN->m_fJudgeWindowGoodPercent ) score = TNS_GOOD; else score = TNS_BOO; if( GAMESTATE->m_bDemonstration || PREFSMAN->m_bAutoPlay ) @@ -633,7 +633,7 @@ void Player::HandleNoteScore( HoldNoteScore score ) float Player::GetMaxBeatDifference() { - return GAMESTATE->m_fCurBPS * PREFSMAN->m_fJudgeWindow * GAMESTATE->m_SongOptions.m_fMusicRate; + return GAMESTATE->m_fCurBPS * PREFSMAN->m_fJudgeWindowSeconds * GAMESTATE->m_SongOptions.m_fMusicRate; } void Player::FadeToFail() diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 7a97d3df59..8cfde12db6 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -45,7 +45,10 @@ PrefsManager::PrefsManager() m_bEventMode = false; m_iNumArcadeStages = 3; m_bAutoPlay = false; - m_fJudgeWindow = 0.18f; + m_fJudgeWindowSeconds = 0.18f; + m_fJudgeWindowPerfectPercent = 0.25f; + m_fJudgeWindowGreatPercent = 0.50f; + m_fJudgeWindowGoodPercent = 0.75f; m_fLifeDifficultyScale = 1.0f; m_iMovieDecodeMS = 2; m_bUseBGIfNoBanner = false; @@ -75,31 +78,34 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) if( !ini.ReadFile() ) return; // could not read config file, load nothing - ini.GetValueB( "Options", "Windowed", m_bWindowed ); - ini.GetValueI( "Options", "DisplayResolution", m_iDisplayResolution ); - ini.GetValueI( "Options", "TextureResolution", m_iTextureResolution ); - ini.GetValueI( "Options", "RefreshRate", m_iRefreshRate ); - ini.GetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes ); - ini.GetValueB( "Options", "UseDedicatedMenuButtons",m_bOnlyDedicatedMenuButtons ); - ini.GetValueB( "Options", "ShowStats", m_bShowStats ); - ini.GetValueI( "Options", "BackgroundMode", (int&)m_BackgroundMode ); - ini.GetValueB( "Options", "ShowDanger", m_bShowDanger ); - ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness ); - ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer ); - ini.GetValueB( "Options", "EventMode", m_bEventMode ); - ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); - ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay ); - ini.GetValueF( "Options", "JudgeWindow", m_fJudgeWindow ); - ini.GetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale ); - ini.GetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS ); - ini.GetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); - ini.GetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); - ini.GetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); - ini.GetValueB( "Options", "Vsync", m_bVsync ); - ini.GetValueB( "Options", "HowToPlay", m_bHowToPlay ); - ini.GetValueB( "Options", "ArcadeOptionsNavigation",m_bArcadeOptionsNavigation ); - ini.GetValue ( "Options", "DWIPath", m_DWIPath ); - ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); + ini.GetValueB( "Options", "Windowed", m_bWindowed ); + ini.GetValueI( "Options", "DisplayResolution", m_iDisplayResolution ); + ini.GetValueI( "Options", "TextureResolution", m_iTextureResolution ); + ini.GetValueI( "Options", "RefreshRate", m_iRefreshRate ); + ini.GetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes ); + ini.GetValueB( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons ); + ini.GetValueB( "Options", "ShowStats", m_bShowStats ); + ini.GetValueI( "Options", "BackgroundMode", (int&)m_BackgroundMode ); + ini.GetValueB( "Options", "ShowDanger", m_bShowDanger ); + ini.GetValueF( "Options", "BGBrightness", m_fBGBrightness ); + ini.GetValueB( "Options", "MenuTimer", m_bMenuTimer ); + ini.GetValueB( "Options", "EventMode", m_bEventMode ); + ini.GetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); + ini.GetValueB( "Options", "AutoPlay", m_bAutoPlay ); + ini.GetValueF( "Options", "JudgeWindowSeconds", m_fJudgeWindowSeconds ); + ini.GetValueF( "Options", "JudgeWindowPerfectPercent", m_fJudgeWindowPerfectPercent ); + ini.GetValueF( "Options", "JudgeWindowGreatPercent", m_fJudgeWindowGreatPercent ); + ini.GetValueF( "Options", "JudgeWindowGoodPercent", m_fJudgeWindowGoodPercent ); + ini.GetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale ); + ini.GetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS ); + ini.GetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); + ini.GetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); + ini.GetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); + ini.GetValueB( "Options", "Vsync", m_bVsync ); + ini.GetValueB( "Options", "HowToPlay", m_bHowToPlay ); + ini.GetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); + ini.GetValue ( "Options", "DWIPath", m_DWIPath ); + ini.GetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); m_asAdditionalSongFolders.RemoveAll(); CString sAdditionalSongFolders; @@ -120,31 +126,34 @@ void PrefsManager::SaveGlobalPrefsToDisk() IniFile ini; ini.SetPath( "StepMania.ini" ); - ini.SetValueB( "Options", "Windowed", m_bWindowed ); - ini.SetValueI( "Options", "DisplayResolution", m_iDisplayResolution ); - ini.SetValueI( "Options", "TextureResolution", m_iTextureResolution ); - ini.SetValueI( "Options", "RefreshRate", m_iRefreshRate ); - ini.SetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes ); - ini.SetValueB( "Options", "UseDedicatedMenuButtons",m_bOnlyDedicatedMenuButtons ); - ini.SetValueB( "Options", "ShowStats", m_bShowStats ); - ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode); - ini.SetValueB( "Options", "ShowDanger", m_bShowDanger ); - ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness ); - ini.SetValueB( "Options", "EventMode", m_bEventMode ); - ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer ); - ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); - ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay ); - ini.SetValueF( "Options", "JudgeWindow", m_fJudgeWindow ); - ini.SetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale ); - ini.SetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS ); - ini.SetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); - ini.SetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); - ini.SetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); - ini.SetValueB( "Options", "Vsync", m_bVsync ); - ini.SetValueB( "Options", "HowToPlay", m_bHowToPlay ); - ini.SetValueB( "Options", "ArcadeOptionsNavigation",m_bArcadeOptionsNavigation ); - ini.SetValue ( "Options", "DWIPath", m_DWIPath ); - ini.SetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); + ini.SetValueB( "Options", "Windowed", m_bWindowed ); + ini.SetValueI( "Options", "DisplayResolution", m_iDisplayResolution ); + ini.SetValueI( "Options", "TextureResolution", m_iTextureResolution ); + ini.SetValueI( "Options", "RefreshRate", m_iRefreshRate ); + ini.SetValueB( "Options", "IgnoreJoyAxes", m_bIgnoreJoyAxes ); + ini.SetValueB( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons ); + ini.SetValueB( "Options", "ShowStats", m_bShowStats ); + ini.SetValueI( "Options", "BackgroundMode", m_BackgroundMode); + ini.SetValueB( "Options", "ShowDanger", m_bShowDanger ); + ini.SetValueF( "Options", "BGBrightness", m_fBGBrightness ); + ini.SetValueB( "Options", "EventMode", m_bEventMode ); + ini.SetValueB( "Options", "MenuTimer", m_bMenuTimer ); + ini.SetValueI( "Options", "NumArcadeStages", m_iNumArcadeStages ); + ini.SetValueB( "Options", "AutoPlay", m_bAutoPlay ); + ini.SetValueF( "Options", "JudgeWindowSeconds", m_fJudgeWindowSeconds ); + ini.SetValueF( "Options", "JudgeWindowPerfectPercent", m_fJudgeWindowPerfectPercent ); + ini.SetValueF( "Options", "JudgeWindowGreatPercent", m_fJudgeWindowGreatPercent ); + ini.SetValueF( "Options", "JudgeWindowGoodPercent", m_fJudgeWindowGoodPercent ); + ini.SetValueF( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale ); + ini.SetValueI( "Options", "MovieDecodeMS", m_iMovieDecodeMS ); + ini.SetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); + ini.SetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); + ini.SetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); + ini.SetValueB( "Options", "Vsync", m_bVsync ); + ini.SetValueB( "Options", "HowToPlay", m_bHowToPlay ); + ini.SetValueB( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation ); + ini.SetValue ( "Options", "DWIPath", m_DWIPath ); + ini.SetValueI( "Options", "UnloadTextureDelaySeconds", m_iUnloadTextureDelaySeconds ); ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 3aaddeb963..03aeaa15ac 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -27,31 +27,34 @@ public: enum BackgroundMode { BGMODE_OFF, BGMODE_ANIMATIONS, BGMODE_MOVIEVIS, BGMODE_RANDOMMOVIES }; // GameOptions (ARE saved between sessions) - bool m_bWindowed; - int m_iDisplayResolution; - int m_iTextureResolution; - int m_iRefreshRate; // 0 means 'default' - bool m_bShowStats; + bool m_bWindowed; + int m_iDisplayResolution; + int m_iTextureResolution; + int m_iRefreshRate; // 0 means 'default' + bool m_bShowStats; BackgroundMode m_BackgroundMode; - float m_fBGBrightness; - int m_iMovieDecodeMS; - bool m_bUseBGIfNoBanner; - bool m_bHiddenSongs; - bool m_bVsync; - int m_iUnloadTextureDelaySeconds; + float m_fBGBrightness; + int m_iMovieDecodeMS; + bool m_bUseBGIfNoBanner; + bool m_bHiddenSongs; + bool m_bVsync; + int m_iUnloadTextureDelaySeconds; - bool m_bIgnoreJoyAxes; - bool m_bOnlyDedicatedMenuButtons; - bool m_bMenuTimer; - bool m_bShowDanger; - int m_iNumArcadeStages; - bool m_bEventMode; - float m_fJudgeWindow; - float m_fLifeDifficultyScale; - bool m_bAutoPlay; - bool m_bDelayedEscape; - bool m_bHowToPlay; - bool m_bArcadeOptionsNavigation; + bool m_bIgnoreJoyAxes; + bool m_bOnlyDedicatedMenuButtons; + bool m_bMenuTimer; + bool m_bShowDanger; + int m_iNumArcadeStages; + bool m_bEventMode; + float m_fJudgeWindowSeconds; + float m_fLifeDifficultyScale; + float m_fJudgeWindowPerfectPercent; + float m_fJudgeWindowGreatPercent; + float m_fJudgeWindowGoodPercent; + bool m_bAutoPlay; + bool m_bDelayedEscape; + bool m_bHowToPlay; + bool m_bArcadeOptionsNavigation; CStringArray m_asAdditionalSongFolders; CString m_DWIPath; diff --git a/stepmania/src/ScoreDisplayNormal.cpp b/stepmania/src/ScoreDisplayNormal.cpp index 0b830decf1..4a0fe2e42c 100644 --- a/stepmania/src/ScoreDisplayNormal.cpp +++ b/stepmania/src/ScoreDisplayNormal.cpp @@ -26,7 +26,7 @@ ScoreDisplayNormal::ScoreDisplayNormal() LOG->Trace( "ScoreDisplayNormal::ScoreDisplayNormal()" ); // init the text - BitmapText::LoadFromTextureAndChars( THEME->GetPathTo("Graphics","gameplay score numbers 5x3"), "0123456789%. :x" ); + BitmapText::LoadFromNumbers( THEME->GetPathTo("Numbers","gameplay score numbers") ); TurnShadowOff(); m_fScore = 0; diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index e13bd136d3..35866e9de6 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -369,7 +369,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) m_sprPercentFrame[p].SetXY( GRADE_X(p), GRADE_Y ); this->AddChild( &m_sprPercentFrame[p] ); - m_textOniPercentLarge[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation percent numbers 5x3"),"0123456789%. :x" ); + m_textOniPercentLarge[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") ); m_textOniPercentLarge[p].TurnShadowOff(); m_textOniPercentLarge[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y ); m_textOniPercentLarge[p].SetHorizAlign( Actor::align_right ); @@ -377,7 +377,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) m_textOniPercentLarge[p].SetEffectGlowing( 1.0f ); this->AddChild( &m_textOniPercentLarge[p] ); - m_textOniPercentSmall[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation percent numbers 5x3"),"0123456789%. :x" ); + m_textOniPercentSmall[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation percent numbers") ); m_textOniPercentSmall[p].TurnShadowOff(); m_textOniPercentSmall[p].SetZoom( 0.5f ); m_textOniPercentSmall[p].SetXY( PERCENT_BASE_X(p), PERCENT_BASE_Y ); @@ -401,7 +401,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) m_sprCourseFrame[p].SetXY( BONUS_X(p), BONUS_Y ); this->AddChild( &m_sprCourseFrame[p] ); - m_textSongsSurvived[p].LoadFromTextureAndChars( THEME->GetPathTo("Graphics","evaluation stage numbers 5x3"),"0123456789%. :x"); + m_textSongsSurvived[p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation stage numbers") ); m_textSongsSurvived[p].TurnShadowOff(); m_textSongsSurvived[p].SetXY( SONGS_SURVIVED_X(p), SONGS_SURVIVED_Y ); m_textSongsSurvived[p].SetText( ssprintf("%02d", GAMESTATE->m_iSongsBeforeFail[p]) ); @@ -511,7 +511,7 @@ ScreenEvaluation::ScreenEvaluation( bool bSummary ) for( l=0; lGetPathTo("Graphics","evaluation score numbers 5x3"), "0123456789%. :x" ); + m_textJudgeNumbers[l][p].LoadFromNumbers( THEME->GetPathTo("Numbers","evaluation score numbers") ); m_textJudgeNumbers[l][p].TurnShadowOff(); m_textJudgeNumbers[l][p].SetXY( JUDGE_X(m_ResultMode==RM_ONI,p,l), JUDGE_Y(l) ); m_textJudgeNumbers[l][p].SetZoom( 0.7f ); diff --git a/stepmania/src/ScreenMachineOptions.cpp b/stepmania/src/ScreenMachineOptions.cpp index 5b7a85ba64..b286dca047 100644 --- a/stepmania/src/ScreenMachineOptions.cpp +++ b/stepmania/src/ScreenMachineOptions.cpp @@ -88,15 +88,15 @@ void ScreenMachineOptions::ImportOptions() * impossible, and perhaps it *is* justice that even the CPU fails * it. :) */ - if( PREFSMAN->m_fJudgeWindow == 0.24f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 0; - else if( PREFSMAN->m_fJudgeWindow == 0.22f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 1; - else if( PREFSMAN->m_fJudgeWindow == 0.20f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 2; - else if( PREFSMAN->m_fJudgeWindow == 0.18f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 3; - else if( PREFSMAN->m_fJudgeWindow == 0.16f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 4; - else if( PREFSMAN->m_fJudgeWindow == 0.14f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 5; - else if( PREFSMAN->m_fJudgeWindow == 0.12f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 6; - else if( PREFSMAN->m_fJudgeWindow == 0.06f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 7; -// else if( PREFSMAN->m_fJudgeWindow == 0.02f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 8; + if( PREFSMAN->m_fJudgeWindowSeconds == 0.24f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 0; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.22f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 1; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.20f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 2; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.18f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 3; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.16f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 4; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.14f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 5; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.12f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 6; + else if( PREFSMAN->m_fJudgeWindowSeconds == 0.06f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 7; +// else if( PREFSMAN->m_fJudgeWindowSeconds == 0.02f ) m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 8; else m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] = 3; if( PREFSMAN->m_fLifeDifficultyScale == 1.60f ) m_iSelectedOption[0][MO_LIFE_DIFFICULTY] = 0; @@ -121,15 +121,15 @@ void ScreenMachineOptions::ExportOptions() switch( m_iSelectedOption[0][MO_JUDGE_DIFFICULTY] ) { - case 0: PREFSMAN->m_fJudgeWindow = 0.24f; break; - case 1: PREFSMAN->m_fJudgeWindow = 0.22f; break; - case 2: PREFSMAN->m_fJudgeWindow = 0.20f; break; - case 3: PREFSMAN->m_fJudgeWindow = 0.18f; break; - case 4: PREFSMAN->m_fJudgeWindow = 0.16f; break; - case 5: PREFSMAN->m_fJudgeWindow = 0.14f; break; - case 6: PREFSMAN->m_fJudgeWindow = 0.12f; break; - case 7: PREFSMAN->m_fJudgeWindow = 0.06f; break; -// case 8: PREFSMAN->m_fJudgeWindow = 0.02f; break; + case 0: PREFSMAN->m_fJudgeWindowSeconds = 0.24f; break; + case 1: PREFSMAN->m_fJudgeWindowSeconds = 0.22f; break; + case 2: PREFSMAN->m_fJudgeWindowSeconds = 0.20f; break; + case 3: PREFSMAN->m_fJudgeWindowSeconds = 0.18f; break; + case 4: PREFSMAN->m_fJudgeWindowSeconds = 0.16f; break; + case 5: PREFSMAN->m_fJudgeWindowSeconds = 0.14f; break; + case 6: PREFSMAN->m_fJudgeWindowSeconds = 0.12f; break; + case 7: PREFSMAN->m_fJudgeWindowSeconds = 0.06f; break; +// case 8: PREFSMAN->m_fJudgeWindowSeconds = 0.02f; break; default: ASSERT(0); } diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index 70f33273a6..628c398fb4 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -118,13 +118,12 @@ ScreenSelectCourse::ScreenSelectCourse() this->AddChild( &m_HighScore[p] ); } - m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","select music hold") ); - m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y ); - m_textHoldForOptions.SetText( "press START again for options" ); - m_textHoldForOptions.SetZoom( 1 ); - m_textHoldForOptions.SetZoomY( 0 ); - m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) ); - this->AddChild( &m_textHoldForOptions ); + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message 1x2") ); + m_sprOptionsMessage.StopAnimating(); + m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); + m_sprOptionsMessage.SetZoomY( 0 ); + m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) ); + this->AddChild( &m_sprOptionsMessage ); m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); @@ -201,7 +200,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, const InputEventType if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) { m_bGoToOptions = true; - m_textHoldForOptions.SetText( "Entering Options..." ); + m_sprOptionsMessage.SetState( 1 ); SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") ); return; } @@ -286,14 +285,14 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn ) m_bMadeChoice = true; // show "hold START for options" - m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) ); - m_textHoldForOptions.BeginTweening( 0.25f ); // fade in - m_textHoldForOptions.SetTweenZoomY( 1 ); - m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) ); - m_textHoldForOptions.BeginTweening( 2.0f ); // sleep - m_textHoldForOptions.BeginTweening( 0.25f ); // fade out - m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) ); - m_textHoldForOptions.SetTweenZoomY( 0 ); + m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) ); + m_sprOptionsMessage.BeginTweening( 0.25f ); // fade in + m_sprOptionsMessage.SetTweenZoomY( 1 ); + m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) ); + m_sprOptionsMessage.BeginTweening( 2.0f ); // sleep + m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out + m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) ); + m_sprOptionsMessage.SetTweenZoomY( 0 ); m_Menu.TweenOffScreenToBlack( SM_None, false ); diff --git a/stepmania/src/ScreenSelectCourse.h b/stepmania/src/ScreenSelectCourse.h index 1c1758f53f..f86929c272 100644 --- a/stepmania/src/ScreenSelectCourse.h +++ b/stepmania/src/ScreenSelectCourse.h @@ -60,7 +60,7 @@ protected: bool m_bMadeChoice; bool m_bGoToOptions; - BitmapText m_textHoldForOptions; + Sprite m_sprOptionsMessage; RageSoundSample m_soundSelect; RageSoundSample m_soundOptionsChange; diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index a40a1cc5b4..f130b7c9d6 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -214,14 +214,12 @@ ScreenSelectMusic::ScreenSelectMusic() this->AddChild( &m_MusicSortDisplay ); - m_textHoldForOptions.LoadFromFont( THEME->GetPathTo("Fonts","select music hold") ); - m_textHoldForOptions.SetXY( CENTER_X, CENTER_Y ); - m_textHoldForOptions.SetText( "press START again for options" ); - m_textHoldForOptions.SetZoom( 1 ); - m_textHoldForOptions.SetZoomY( 0 ); - m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) ); - m_textHoldForOptions.SetZ( -2 ); - this->AddChild( &m_textHoldForOptions ); + m_sprOptionsMessage.Load( THEME->GetPathTo("Graphics","select music options message") ); + m_sprOptionsMessage.StopAnimating(); + m_sprOptionsMessage.SetXY( CENTER_X, CENTER_Y ); + m_sprOptionsMessage.SetZoom( 1 ); + m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) ); + this->AddChild( &m_sprOptionsMessage ); m_soundSelect.Load( THEME->GetPathTo("Sounds","menu start") ); @@ -399,7 +397,7 @@ void ScreenSelectMusic::Input( const DeviceInput& DeviceI, const InputEventType if( m_bMadeChoice && !m_bGoToOptions && MenuI.IsValid() && MenuI.button == MENU_BUTTON_START && !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) { m_bGoToOptions = true; - m_textHoldForOptions.SetText( "Entering Options..." ); + m_sprOptionsMessage.SetState( 1 ); SOUND->PlayOnceStreamed( THEME->GetPathTo("Sounds","menu start") ); return; } @@ -639,14 +637,14 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() ) { // show "hold START for options" - m_textHoldForOptions.SetDiffuse( D3DXCOLOR(1,1,1,0) ); - m_textHoldForOptions.BeginTweening( 0.25f ); // fade in - m_textHoldForOptions.SetTweenZoomY( 1 ); - m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) ); - m_textHoldForOptions.BeginTweening( 2.0f ); // sleep - m_textHoldForOptions.BeginTweening( 0.25f ); // fade out - m_textHoldForOptions.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) ); - m_textHoldForOptions.SetTweenZoomY( 0 ); + m_sprOptionsMessage.SetDiffuse( D3DXCOLOR(1,1,1,0) ); + m_sprOptionsMessage.BeginTweening( 0.25f ); // fade in + m_sprOptionsMessage.SetTweenZoomY( 1 ); + m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,1) ); + m_sprOptionsMessage.BeginTweening( 2.0f ); // sleep + m_sprOptionsMessage.BeginTweening( 0.25f ); // fade out + m_sprOptionsMessage.SetTweenDiffuse( D3DXCOLOR(1,1,1,0) ); + m_sprOptionsMessage.SetTweenZoomY( 0 ); } m_Menu.TweenOffScreenToBlack( SM_None, false ); diff --git a/stepmania/src/ScreenSelectMusic.h b/stepmania/src/ScreenSelectMusic.h index cbcb2d3084..4c026b8ab3 100644 --- a/stepmania/src/ScreenSelectMusic.h +++ b/stepmania/src/ScreenSelectMusic.h @@ -82,7 +82,7 @@ protected: bool m_bMadeChoice; bool m_bGoToOptions; - BitmapText m_textHoldForOptions; + Sprite m_sprOptionsMessage; RageSoundSample m_soundSelect; RageSoundSample m_soundChangeNotes; diff --git a/stepmania/src/ScreenStage.cpp b/stepmania/src/ScreenStage.cpp index 854d5d1a8a..f140663ead 100644 --- a/stepmania/src/ScreenStage.cpp +++ b/stepmania/src/ScreenStage.cpp @@ -105,7 +105,7 @@ ScreenStage::ScreenStage() for( int i=0; i<4; i++ ) { - m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage numbers") ); + m_sprNumbers[i].Load( THEME->GetPathTo("Graphics","stage 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() ); diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 2fffdf02e6..7e41f4ad37 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -144,10 +144,12 @@ try_element_again: }; static const char *sound_masks[] = { ".set", ".mp3", ".ogg", ".wav", ".redir", NULL }; static const char *font_masks[] = { " 16x16.png", ".redir", NULL }; + static const char *numbers_masks[] = { " 5x3.png", ".redir", NULL }; const char **asset_masks = NULL; if( sAssetCategory == "graphics" ) asset_masks = graphic_masks; else if( sAssetCategory == "sounds" ) asset_masks = sound_masks; else if( sAssetCategory == "fonts" ) asset_masks = font_masks; + else if( sAssetCategory == "numbers" ) asset_masks = numbers_masks; else ASSERT(0); // Unknown theme asset category int i; for(i = 0; asset_masks[i]; ++i)