diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index ab295a453c..4a1774f4c7 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -489,13 +489,13 @@ GradeP1OnCommand=x,94;y,100;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;dece GradeP1OffCommand=sleep,0.8;accelerate,0.3;xoffset,-320 GradeP2OnCommand=x,546;y,100;glowshift;effectperiod,2;xoffset,320;sleep,0.0;decelerate,0.3;xoffset,-320 GradeP2OffCommand=sleep,0.8;accelerate,0.3;xoffset,320 -PercentWholeP1OnCommand=horizalign,right;vertalign,bottom;x,100;y,132;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;decelerate,0.3;xoffset,320 +PercentWholeP1OnCommand=horizalign,right;vertalign,bottom;x,120;y,132;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;decelerate,0.3;xoffset,320 PercentWholeP1OffCommand=sleep,0.8;accelerate,0.3;xoffset,-320 -PercentWholeP2OnCommand=horizalign,right;vertalign,bottom;x,552;y,132;glowshift;effectperiod,2;xoffset,320;sleep,0.0;decelerate,0.3;xoffset,-320 +PercentWholeP2OnCommand=horizalign,right;vertalign,bottom;x,572;y,132;glowshift;effectperiod,2;xoffset,320;sleep,0.0;decelerate,0.3;xoffset,-320 PercentWholeP2OffCommand=sleep,0.8;accelerate,0.3;xoffset,320 -PercentRemainderP1OnCommand=horizalign,left;vertalign,bottom;x,100;y,132;zoom,0.5;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;decelerate,0.3;xoffset,320 +PercentRemainderP1OnCommand=horizalign,left;vertalign,bottom;x,120;y,132;zoom,0.5;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;decelerate,0.3;xoffset,320 PercentRemainderP1OffCommand=sleep,0.8;accelerate,0.3;xoffset,-320 -PercentRemainderP2OnCommand=horizalign,left;vertalign,bottom;x,552;y,132;zoom,0.5;glowshift;effectperiod,2;xoffset,320;sleep,0.0;decelerate,0.3;xoffset,-320 +PercentRemainderP2OnCommand=horizalign,left;vertalign,bottom;x,572;y,132;zoom,0.5;glowshift;effectperiod,2;xoffset,320;sleep,0.0;decelerate,0.3;xoffset,-320 PercentRemainderP2OffCommand=sleep,0.8;accelerate,0.3;xoffset,320 DancePointsP1OnCommand=x,94;y,100;glowshift;effectperiod,2;xoffset,-320;sleep,0.0;decelerate,0.3;xoffset,320 DancePointsP1OffCommand=sleep,0.8;accelerate,0.3;xoffset,-320 @@ -692,6 +692,14 @@ HelpText=Press START to continue TimerSeconds=40 [ScreenEvaluationCourse] +GradeP1OnCommand=diffuse,1,1,1,0 +GradeP1OffCommand= +GradeP2OnCommand=diffuse,1,1,1,0 +GradeP2OffCommand= +MaxComboNumberP1OnCommand=diffuse,1,1,1,0 +MaxComboNumberP1OffCommand= +MaxComboNumberP2OnCommand=diffuse,1,1,1,0 +MaxComboNumberP2OffCommand= BarPossible1P1OnCommand=diffuse,1,1,1,0 BarPossible1P1OffCommand= BarPossible1P2OnCommand=diffuse,1,1,1,0 diff --git a/stepmania/src/GameState.cpp b/stepmania/src/GameState.cpp index f94c32d273..ccd22b0c2d 100644 --- a/stepmania/src/GameState.cpp +++ b/stepmania/src/GameState.cpp @@ -192,6 +192,7 @@ GameDef* GameState::GetCurrentGameDef() const StyleDef* GameState::GetCurrentStyleDef() { + ASSERT( m_CurStyle != STYLE_INVALID ); // the style must be set before calling this return GAMEMAN->GetStyleDefForStyle( m_CurStyle ); } diff --git a/stepmania/src/MenuTimer.cpp b/stepmania/src/MenuTimer.cpp index 7eaeee39c6..ad1a667a36 100644 --- a/stepmania/src/MenuTimer.cpp +++ b/stepmania/src/MenuTimer.cpp @@ -127,7 +127,7 @@ void MenuTimer::Update( float fDeltaTime ) m_soundBeep.Play(); break; case 0: - SCREENMAN->SendMessageToTopScreen( SM_MenuTimer, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_MenuTimer, 0 ); Stop(); break; } diff --git a/stepmania/src/MusicWheel.cpp b/stepmania/src/MusicWheel.cpp index c1344b8303..932c70f29f 100644 --- a/stepmania/src/MusicWheel.cpp +++ b/stepmania/src/MusicWheel.cpp @@ -649,7 +649,7 @@ void MusicWheel::Update( float fDeltaTime ) if(GAMESTATE->m_SongSortOrder > MaxSelectableSort) GAMESTATE->m_SongSortOrder = SongSortOrder(0); - SCREENMAN->SendMessageToTopScreen( SM_SortOrderChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SortOrderChanged, 0 ); SetOpenGroup(GetSectionNameFromSongAndSort( pPrevSelectedSong, GAMESTATE->m_SongSortOrder )); //RebuildWheelItems(); @@ -684,7 +684,7 @@ void MusicWheel::Update( float fDeltaTime ) } } - SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); RebuildWheelItemDisplays(); TweenOnScreen(true); m_WheelState = STATE_FLYING_ON_AFTER_NEXT_SORT; @@ -744,7 +744,7 @@ void MusicWheel::Update( float fDeltaTime ) m_fLockedWheelVelocity = 0; /* Send this again so the screen starts sample music. */ - SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); } else { @@ -862,7 +862,7 @@ void MusicWheel::ChangeMusic(int dist) if(GAMESTATE->m_bDifficultCourses && GAMESTATE->m_PlayMode == PLAY_MODE_NONSTOP) GetSelectedCourse()->MakeDifficult(); - SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); /* If we're moving automatically, don't play this; it'll be called in Update. */ if(!IsMoving()) @@ -916,7 +916,7 @@ bool MusicWheel::Select() // return true of a playable item was chosen m_WheelState = STATE_LOCKED; m_soundStart.Play(); m_fLockedWheelVelocity = 0; - SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); return false; } @@ -1195,7 +1195,7 @@ void MusicWheel::Move(int n) /* Make sure the user always gets an SM_SongChanged when * Moving() is 0, so the final banner, etc. always gets set. */ - SCREENMAN->SendMessageToTopScreen( SM_SongChanged, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_SongChanged, 0 ); } m_TimeBeforeMovingBegins = TIME_BEFORE_SLOW_REPEATS; diff --git a/stepmania/src/ScoreKeeperMAX2.cpp b/stepmania/src/ScoreKeeperMAX2.cpp index f4795f7202..c1208f3607 100644 --- a/stepmania/src/ScoreKeeperMAX2.cpp +++ b/stepmania/src/ScoreKeeperMAX2.cpp @@ -139,7 +139,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa m_iCurToastyCombo += iNumTapsInRow; if( m_iCurToastyCombo==250 && !GAMESTATE->m_bDemonstrationOrJukebox ) - SCREENMAN->SendMessageToTopScreen( SM_PlayToasty, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 ); break; default: m_iCurToastyCombo = 0; @@ -175,16 +175,16 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa #define CROSSED( i ) (iOldComboSendMessageToTopScreen( SM_100Combo, 0 ); - else if( CROSSED(200) ) SCREENMAN->SendMessageToTopScreen( SM_200Combo, 0 ); - else if( CROSSED(300) ) SCREENMAN->SendMessageToTopScreen( SM_300Combo, 0 ); - else if( CROSSED(400) ) SCREENMAN->SendMessageToTopScreen( SM_400Combo, 0 ); - else if( CROSSED(500) ) SCREENMAN->SendMessageToTopScreen( SM_500Combo, 0 ); - else if( CROSSED(600) ) SCREENMAN->SendMessageToTopScreen( SM_600Combo, 0 ); - else if( CROSSED(700) ) SCREENMAN->SendMessageToTopScreen( SM_700Combo, 0 ); - else if( CROSSED(800) ) SCREENMAN->SendMessageToTopScreen( SM_800Combo, 0 ); - else if( CROSSED(900) ) SCREENMAN->SendMessageToTopScreen( SM_900Combo, 0 ); - else if( CROSSED(1000)) SCREENMAN->SendMessageToTopScreen( SM_1000Combo, 0 ); + if ( CROSSED(100) ) SCREENMAN->PostMessageToTopScreen( SM_100Combo, 0 ); + else if( CROSSED(200) ) SCREENMAN->PostMessageToTopScreen( SM_200Combo, 0 ); + else if( CROSSED(300) ) SCREENMAN->PostMessageToTopScreen( SM_300Combo, 0 ); + else if( CROSSED(400) ) SCREENMAN->PostMessageToTopScreen( SM_400Combo, 0 ); + else if( CROSSED(500) ) SCREENMAN->PostMessageToTopScreen( SM_500Combo, 0 ); + else if( CROSSED(600) ) SCREENMAN->PostMessageToTopScreen( SM_600Combo, 0 ); + else if( CROSSED(700) ) SCREENMAN->PostMessageToTopScreen( SM_700Combo, 0 ); + else if( CROSSED(800) ) SCREENMAN->PostMessageToTopScreen( SM_800Combo, 0 ); + else if( CROSSED(900) ) SCREENMAN->PostMessageToTopScreen( SM_900Combo, 0 ); + else if( CROSSED(1000)) SCREENMAN->PostMessageToTopScreen( SM_1000Combo, 0 ); // new max combo GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber] = max(GAMESTATE->m_CurStageStats.iMaxCombo[m_PlayerNumber], iCurCombo); @@ -202,7 +202,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa pInventory->OnComboBroken( m_PlayerNumber, iCurCombo ); default: if( iCurCombo>50 ) - SCREENMAN->SendMessageToTopScreen( SM_ComboStopped, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_ComboStopped, 0 ); } iCurCombo = 0; diff --git a/stepmania/src/Screen.cpp b/stepmania/src/Screen.cpp index bff146189b..b81a24e8a6 100644 --- a/stepmania/src/Screen.cpp +++ b/stepmania/src/Screen.cpp @@ -199,7 +199,7 @@ void Screen::MenuCoin( PlayerNumber pn ) // This is now handled globally by Stepmania.cpp -- Miryokuteki } -void Screen::SendScreenMessage( const ScreenMessage SM, float fDelay ) +void Screen::PostScreenMessage( const ScreenMessage SM, float fDelay ) { ASSERT( fDelay >= 0.0 ); diff --git a/stepmania/src/Screen.h b/stepmania/src/Screen.h index 0531d0adc7..1e32d28093 100644 --- a/stepmania/src/Screen.h +++ b/stepmania/src/Screen.h @@ -37,7 +37,7 @@ public: static bool JoinInput( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); // return true if a player joined virtual void HandleScreenMessage( const ScreenMessage SM ) {}; - void SendScreenMessage( const ScreenMessage SM, const float fDelay ); + void PostScreenMessage( const ScreenMessage SM, const float fDelay ); void ClearMessageQueue(); void ClearMessageQueue( const ScreenMessage SM ); // clear of a specific SM diff --git a/stepmania/src/ScreenAttract.cpp b/stepmania/src/ScreenAttract.cpp index 44c5dc6077..7ae0444986 100644 --- a/stepmania/src/ScreenAttract.cpp +++ b/stepmania/src/ScreenAttract.cpp @@ -59,7 +59,7 @@ ScreenAttract::ScreenAttract( CString sClassName ) float fTimeUntilBeginFadingOut = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds(); - this->SendScreenMessage( SM_BeginFadingOut, fTimeUntilBeginFadingOut ); + this->PostScreenMessage( SM_BeginFadingOut, fTimeUntilBeginFadingOut ); } @@ -121,7 +121,7 @@ void ScreenAttract::AttractInput( const DeviceInput& DeviceI, const InputEventTy { case MENU_BUTTON_LEFT: case MENU_BUTTON_RIGHT: - SCREENMAN->SendMessageToTopScreen( SM_BeginFadingOut, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_BeginFadingOut, 0 ); break; } } diff --git a/stepmania/src/ScreenCaution.cpp b/stepmania/src/ScreenCaution.cpp index 0a7fe5e46b..ddf668c3f9 100644 --- a/stepmania/src/ScreenCaution.cpp +++ b/stepmania/src/ScreenCaution.cpp @@ -33,7 +33,7 @@ ScreenCaution::ScreenCaution() if(!PREFSMAN->m_bShowDontDie) { - this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + this->PostScreenMessage( SM_GoToNextScreen, 0.f ); return; } @@ -50,7 +50,7 @@ ScreenCaution::ScreenCaution() m_Back.Load( THEME->GetPathTo("BGAnimations","Common back") ); this->AddChild( &m_Back ); - this->SendScreenMessage( SM_StartClosing, 3 ); + this->PostScreenMessage( SM_StartClosing, 3 ); SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenCaution music") ); } diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 1fdec0094e..4dbb4d6c92 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -51,7 +51,7 @@ ScreenDemonstration::ScreenDemonstration() : ScreenJukebox( PrepareForDemonstrat if( GAMESTATE->m_pCurSong == NULL ) // we didn't find a song. { - this->SendScreenMessage( SM_GoToNextScreen, 0 ); // Abort demonstration. + this->PostScreenMessage( SM_GoToNextScreen, 0 ); // Abort demonstration. return; } @@ -67,7 +67,7 @@ ScreenDemonstration::ScreenDemonstration() : ScreenJukebox( PrepareForDemonstrat GAMESTATE->m_bPastHereWeGo = true; m_DancingState = STATE_DANCING; - this->SendScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); + this->PostScreenMessage( SM_BeginFadingOut, SECONDS_TO_SHOW ); } ScreenDemonstration::~ScreenDemonstration() diff --git a/stepmania/src/ScreenEvaluation.cpp b/stepmania/src/ScreenEvaluation.cpp index 7573c607cc..270c516ffd 100644 --- a/stepmania/src/ScreenEvaluation.cpp +++ b/stepmania/src/ScreenEvaluation.cpp @@ -87,22 +87,21 @@ const ScreenMessage SM_PlayCheer = ScreenMessage(SM_User+6); ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) { -/* // // debugging // - GAMESTATE->m_PlayMode = PLAY_MODE_ARCADE; + GAMESTATE->m_PlayMode = PLAY_MODE_NONSTOP; GAMESTATE->m_CurStyle = STYLE_DANCE_VERSUS; GAMESTATE->m_MasterPlayerNumber = PLAYER_1; - GAMESTATE->m_pCurSong = SONGMAN->GetAllSongs()[0]; - GAMESTATE->m_pCurNotes[PLAYER_1] = GAMESTATE->m_pCurSong->GetNotes( NOTES_TYPE_DANCE_SINGLE, DIFFICULTY_HARD ); - GAMESTATE->m_pCurNotes[PLAYER_2] = GAMESTATE->m_pCurSong->GetNotes( NOTES_TYPE_DANCE_SINGLE, DIFFICULTY_HARD ); + GAMESTATE->m_pCurCourse = SONGMAN->m_pCourses[0]; +// GAMESTATE->m_pCurNotes[PLAYER_1] = GAMESTATE->m_pCurSong->GetNotes( NOTES_TYPE_DANCE_SINGLE, DIFFICULTY_HARD ); +// GAMESTATE->m_pCurNotes[PLAYER_2] = GAMESTATE->m_pCurSong->GetNotes( NOTES_TYPE_DANCE_SINGLE, DIFFICULTY_HARD ); GAMESTATE->m_PlayerOptions[PLAYER_1].m_bHoldNotes = false; GAMESTATE->m_PlayerOptions[PLAYER_2].m_bHoldNotes = false; GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed = 2; GAMESTATE->m_PlayerOptions[PLAYER_2].m_fScrollSpeed = 2; - GAMESTATE->m_iCurrentStageIndex = 2; -*/ +// GAMESTATE->m_iCurrentStageIndex = 2; + LOG->Trace( "ScreenEvaluation::ScreenEvaluation()" ); @@ -315,38 +314,41 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) m_sprGradeFrame[p].Command( GRADE_FRAME_ON_COMMAND(p) ); this->AddChild( &m_sprGradeFrame[p] ); - m_Grades[p].Command( GRADE_ON_COMMAND(p) ); if( SPIN_GRADES ) m_Grades[p].SpinAndSettleOn( grade[p] ); else m_Grades[p].SetGrade( (PlayerNumber)p, grade[p] ); + m_Grades[p].Command( GRADE_ON_COMMAND(p) ); this->AddChild( &m_Grades[p] ); - m_textPercentWhole[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); - m_textPercentWhole[p].EnableShadow( false ); - m_textPercentWhole[p].Command( PERCENT_WHOLE_ON_COMMAND(p) ); - this->AddChild( &m_textPercentWhole[p] ); + if( !PREFSMAN->m_bDancePointsForOni ) + { + m_textPercentWhole[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); + m_textPercentWhole[p].EnableShadow( false ); + m_textPercentWhole[p].Command( PERCENT_WHOLE_ON_COMMAND(p) ); + this->AddChild( &m_textPercentWhole[p] ); - m_textPercentRemainder[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); - m_textPercentRemainder[p].EnableShadow( false ); - m_textPercentRemainder[p].Command( PERCENT_REMAINDER_ON_COMMAND(p) ); - this->AddChild( &m_textPercentRemainder[p] ); + m_textPercentRemainder[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); + m_textPercentRemainder[p].EnableShadow( false ); + m_textPercentRemainder[p].Command( PERCENT_REMAINDER_ON_COMMAND(p) ); + this->AddChild( &m_textPercentRemainder[p] ); - stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] ); - float fPercentDancePoints = stageStats.iActualDancePoints[p] / (float)stageStats.iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors - fPercentDancePoints = max( fPercentDancePoints, 0 ); -// int iPercentWhole = int(fPercentDancePoints*100); -// int iPercentRemainder = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 ); -// m_textPercentWhole[p].SetText( ssprintf("%02d", iPercentWhole) ); -// m_textPercentRemainder[p].SetText( ssprintf(".%01d%%", iPercentRemainder) ); - m_textPercentWhole[p].SetText( "00" ); - m_textPercentRemainder[p].SetText( ".11%" ); - - m_textDancePoints[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); - m_textDancePoints[p].EnableShadow( false ); - m_textDancePoints[p].SetText( ssprintf("%d", stageStats.iActualDancePoints[p]) ); - m_textDancePoints[p].Command( DANCE_POINTS_ON_COMMAND(p) ); - this->AddChild( &m_textDancePoints[p] ); + stageStats.iPossibleDancePoints[p] = max( 1, stageStats.iPossibleDancePoints[p] ); + float fPercentDancePoints = stageStats.iActualDancePoints[p] / (float)stageStats.iPossibleDancePoints[p] + 0.0001f; // correct for rounding errors + fPercentDancePoints = max( fPercentDancePoints, 0 ); + int iPercentWhole = int(fPercentDancePoints*100); + int iPercentRemainder = int( (fPercentDancePoints*100 - int(fPercentDancePoints*100)) * 10 ); + m_textPercentWhole[p].SetText( ssprintf("%02d", iPercentWhole) ); + m_textPercentRemainder[p].SetText( ssprintf(".%01d%%", iPercentRemainder) ); + } + else // PREFSMAN->m_bDancePointsForOni + { + m_textDancePoints[p].LoadFromNumbers( GET_THEME_ELEMENT_FALLBACK("Numbers"," percent numbers") ); + m_textDancePoints[p].EnableShadow( false ); + m_textDancePoints[p].SetText( ssprintf("%d", stageStats.iActualDancePoints[p]) ); + m_textDancePoints[p].Command( DANCE_POINTS_ON_COMMAND(p) ); + this->AddChild( &m_textDancePoints[p] ); + } } @@ -506,7 +508,7 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) case GRADE_AA: case GRADE_AAA: case GRADE_AAAA: - this->SendScreenMessage( SM_PlayCheer, 2.5f ); + this->PostScreenMessage( SM_PlayCheer, 2.5f ); break; } diff --git a/stepmania/src/ScreenEz2SelectMusic.cpp b/stepmania/src/ScreenEz2SelectMusic.cpp index 78a1ea1397..7ef1617aba 100644 --- a/stepmania/src/ScreenEz2SelectMusic.cpp +++ b/stepmania/src/ScreenEz2SelectMusic.cpp @@ -364,7 +364,7 @@ void ScreenEz2SelectMusic::Update( float fDeltaTime ) { SCREENMAN->Prompt( SM_NoSongs, "ERROR:\n \nThere are no songs available for play!" ); i_ErrorDetected=1; - this->SendScreenMessage( SM_NoSongs, 5.5f ); // timeout incase the user decides to do nothing :D + this->PostScreenMessage( SM_NoSongs, 5.5f ); // timeout incase the user decides to do nothing :D } Screen::Update( fDeltaTime ); diff --git a/stepmania/src/ScreenGameOver.cpp b/stepmania/src/ScreenGameOver.cpp index 9bdf6afdec..618bd35cb9 100644 --- a/stepmania/src/ScreenGameOver.cpp +++ b/stepmania/src/ScreenGameOver.cpp @@ -34,8 +34,8 @@ ScreenGameOver::ScreenGameOver() SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenGameOver music") ); - this->SendScreenMessage( SM_PlayAnnouncer, 0.5 ); - this->SendScreenMessage( SM_StartFadingOut, 5 ); + this->PostScreenMessage( SM_PlayAnnouncer, 0.5 ); + this->PostScreenMessage( SM_StartFadingOut, 5 ); } @@ -61,5 +61,5 @@ void ScreenGameOver::MenuStart( PlayerNumber pn ) return; this->ClearMessageQueue(); - this->SendScreenMessage( SM_StartFadingOut, 0 ); + this->PostScreenMessage( SM_StartFadingOut, 0 ); } diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index 3f7e38f1f1..50f43b71ce 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -842,7 +842,7 @@ void ScreenGameplay::Update( float fDeltaTime ) if( GAMESTATE->m_fMusicSeconds > fSecondsToStop && !m_OniFade.IsClosing() ) { GAMESTATE->m_fSongBeat = 0; - this->SendScreenMessage( SM_NotesEnded, 0 ); + this->PostScreenMessage( SM_NotesEnded, 0 ); } // @@ -854,7 +854,7 @@ void ScreenGameplay::Update( float fDeltaTime ) switch( GAMESTATE->m_SongOptions.m_LifeType ) { case SongOptions::LIFE_BAR: - if( AllAreFailing() ) SCREENMAN->SendMessageToTopScreen( SM_BeginFailed, 0 ); + if( AllAreFailing() ) SCREENMAN->PostMessageToTopScreen( SM_BeginFailed, 0 ); if( AllAreInDanger() ) m_Background.TurnDangerOn(); else m_Background.TurnDangerOff(); @@ -867,7 +867,7 @@ void ScreenGameplay::Update( float fDeltaTime ) break; case SongOptions::LIFE_BATTERY: - if( AllFailedEarlier() )SCREENMAN->SendMessageToTopScreen( SM_BeginFailed, 0 ); + if( AllFailedEarlier() )SCREENMAN->PostMessageToTopScreen( SM_BeginFailed, 0 ); if( AllAreInDanger() ) m_Background.TurnDangerOn(); else m_Background.TurnDangerOff(); @@ -1289,7 +1289,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) if( GAMESTATE->m_SongOptions.m_FailType == SongOptions::FAIL_END_OF_SONG && AllFailedEarlier() ) { - this->SendScreenMessage( SM_BeginFailed, 0 ); + this->PostScreenMessage( SM_BeginFailed, 0 ); } else // ! failed { @@ -1298,13 +1298,13 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) { m_Extra.StartTransitioning( SM_GoToStateAfterCleared ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay extra") ); -// this->SendScreenMessage( SM_ShowTryExtraStage, 1 ); +// this->PostScreenMessage( SM_ShowTryExtraStage, 1 ); } else { m_Cleared.StartTransitioning( SM_GoToStateAfterCleared ); SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay cleared") ); -// this->SendScreenMessage( SM_ShowCleared, 1 ); +// this->PostScreenMessage( SM_ShowCleared, 1 ); } } } @@ -1412,7 +1412,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_sprCleared.BeginTweening(1.5f); // sleep m_sprCleared.BeginTweening(0.7f); m_sprCleared.SetTweenDiffuse( RageColor(1,1,1,0) ); - SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 4 ); + SCREENMAN->PostMessageToTopScreen( SM_GoToStateAfterCleared, 4 ); break; */ /* case SM_ShowTryExtraStage: @@ -1442,7 +1442,7 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) m_sprTryExtraStage.BeginTweening( 2 ); // sleep m_sprTryExtraStage.BeginTweening( 1 ); // fade out m_sprTryExtraStage.SetTweenDiffuse( colorStage ); - SCREENMAN->SendMessageToTopScreen( SM_GoToStateAfterCleared, 5 ); + SCREENMAN->PostMessageToTopScreen( SM_GoToStateAfterCleared, 5 ); } break; */ @@ -1487,37 +1487,32 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) ShowSavePrompt( SM_GoToStateAfterCleared ); break; } - SCREENMAN->SetNewScreen( "ScreenEvaluationStage" ); + switch( GAMESTATE->m_PlayMode ) + { + case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: + SCREENMAN->SetNewScreen( "ScreenEvaluationStage" ); + case PLAY_MODE_NONSTOP: + case PLAY_MODE_ONI: + case PLAY_MODE_ENDLESS: + SCREENMAN->SetNewScreen( "ScreenEvaluationCourse" ); + break; + default: + ASSERT(0); + } break; case SM_BeginFailed: m_DancingState = STATE_OUTRO; m_soundMusic.StopPlaying(); -// m_Failed.StartTransitioning( SM_ShowFailed ); -// this->SendScreenMessage( SM_GoToScreenAfterFail, 0.2f ); -// SCREENMAN->SendMessageToTopScreen( SM_PlayFailComment, 1.0f ); m_Failed.StartTransitioning( SM_GoToScreenAfterFail ); // 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 - m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in - m_sprFailed.BeginTweening( 0.3f ); - m_sprFailed.SetTweenZoom( 1.1f ); // bounce - m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in - m_sprFailed.BeginTweening( 0.2f ); - m_sprFailed.SetTweenZoom( 1.0f ); // come to rest - m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0.7f) ); // and fade in - m_sprFailed.BeginTweening( 2 ); // sleep - m_sprFailed.BeginTweening( 1 ); - m_sprFailed.SetTweenDiffuse( RageColor(1,1,1,0) ); -*/ // show the survive time if extra stage + // TODO: Move this animation to a metric? if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) { float fMaxSurviveSeconds = 0; @@ -1535,14 +1530,8 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) } SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay failed") ); - -// SCREENMAN->SendMessageToTopScreen( SM_GoToScreenAfterFail, 5.0f ); break; -/* case SM_PlayFailComment: - SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay failed") ); - break; -*/ case SM_GoToScreenAfterFail: /* Reset options. (Should this be done in ScreenSelect*?) */ GAMESTATE->RestoreSelectedOptions(); @@ -1554,16 +1543,25 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM ) break; } - if( GAMESTATE->m_PlayMode == PLAY_MODE_NONSTOP || - GAMESTATE->m_PlayMode == PLAY_MODE_ONI || - GAMESTATE->m_PlayMode == PLAY_MODE_ENDLESS || - GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2()) - SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" ); - else if( PREFSMAN->m_bEventMode ) - HandleScreenMessage( SM_GoToScreenAfterBack ); - else - SCREENMAN->SetNewScreen( "ScreenGameOver" ); - break; + switch( GAMESTATE->m_PlayMode ) + { + case PLAY_MODE_ARCADE: + case PLAY_MODE_BATTLE: + if( PREFSMAN->m_bEventMode ) + HandleScreenMessage( SM_GoToScreenAfterBack ); + else if( GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) + SCREENMAN->SetNewScreen( "ScreenEvaluationSummary" ); + else + SCREENMAN->SetNewScreen( "ScreenGameOver" ); + break; + case PLAY_MODE_NONSTOP: + case PLAY_MODE_ONI: + case PLAY_MODE_ENDLESS: + SCREENMAN->SetNewScreen( "ScreenEvaluationCourse" ); + break; + default: + ASSERT(0); + } } } diff --git a/stepmania/src/ScreenIntroMovie.cpp b/stepmania/src/ScreenIntroMovie.cpp index 86207944ec..84458e4ec8 100644 --- a/stepmania/src/ScreenIntroMovie.cpp +++ b/stepmania/src/ScreenIntroMovie.cpp @@ -8,7 +8,7 @@ void ScreenIntroMovie::Update( float fDelta ) /* RageTexture *tex = sprite->GetTexture(); if(tex->IsAMovie() && !tex->IsPlaying()) - this->SendScreenMessage( SM_BeginFadingOut,0 ); + this->PostScreenMessage( SM_BeginFadingOut,0 ); and when initting the sprite in ScreenIntroMovie::ScreenIntroMovie: if(sprite->GetTexture->IsAMovie()) diff --git a/stepmania/src/ScreenJukebox.cpp b/stepmania/src/ScreenJukebox.cpp index 9f11c83f07..25b2425d65 100644 --- a/stepmania/src/ScreenJukebox.cpp +++ b/stepmania/src/ScreenJukebox.cpp @@ -131,7 +131,7 @@ ScreenJukebox::ScreenJukebox( bool bDemonstration ) : ScreenGameplay( PrepareFor if( GAMESTATE->m_pCurSong == NULL ) // we didn't find a song. { - this->SendScreenMessage( SM_GoToNextScreen, 0 ); // Abort demonstration. + this->PostScreenMessage( SM_GoToNextScreen, 0 ); // Abort demonstration. return; } @@ -171,7 +171,7 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type { case MENU_BUTTON_LEFT: case MENU_BUTTON_RIGHT: - SCREENMAN->SendMessageToTopScreen( SM_NotesEnded, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_NotesEnded, 0 ); break; /* XXX: this is a copy-and-paste from ScreenAttract */ case MENU_BUTTON_START: diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index 5594d0751a..f07edba76b 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -508,10 +508,16 @@ void ScreenManager::PopTopScreen( ScreenMessage SM ) pNewTopScreen->HandleScreenMessage( SM ); } -void ScreenManager::SendMessageToTopScreen( ScreenMessage SM, float fDelay ) +void ScreenManager::PostMessageToTopScreen( ScreenMessage SM, float fDelay ) { Screen* pTopScreen = m_ScreenStack.back(); - pTopScreen->SendScreenMessage( SM, fDelay ); + pTopScreen->PostScreenMessage( SM, fDelay ); +} + +void ScreenManager::SendMessageToTopScreen( ScreenMessage SM ) +{ + Screen* pTopScreen = m_ScreenStack.back(); + pTopScreen->HandleScreenMessage( SM ); } diff --git a/stepmania/src/ScreenManager.h b/stepmania/src/ScreenManager.h index 4ea8940d10..55095c1bfa 100644 --- a/stepmania/src/ScreenManager.h +++ b/stepmania/src/ScreenManager.h @@ -50,7 +50,8 @@ public: void PopTopScreen( ScreenMessage SM = SM_RegainingFocus ); void SystemMessage( CString sMessage ); - void SendMessageToTopScreen( ScreenMessage SM, float fDelay ); + void PostMessageToTopScreen( ScreenMessage SM, float fDelay ); + void SendMessageToTopScreen( ScreenMessage SM ); void RefreshCreditsMessages(); diff --git a/stepmania/src/ScreenMusicScroll.cpp b/stepmania/src/ScreenMusicScroll.cpp index c7834c7075..ac69da82b3 100644 --- a/stepmania/src/ScreenMusicScroll.cpp +++ b/stepmania/src/ScreenMusicScroll.cpp @@ -185,7 +185,7 @@ ScreenMusicScroll::ScreenMusicScroll() m_textLines[i].SetTweenXY( CENTER_X, SCREEN_TOP - 40 ); } - this->SendScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f ); + this->PostScreenMessage( SM_BeginFadingOut, 0.2f * i + 3.0f ); m_In.Load( THEME->GetPathTo("BGAnimations","ScreenMusicScroll in") ); // this->AddChild( &m_In ); // draw and update manually @@ -255,11 +255,11 @@ void ScreenMusicScroll::HandleScreenMessage( const ScreenMessage SM ) void ScreenMusicScroll::MenuStart( PlayerNumber pn ) { - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); } void ScreenMusicScroll::MenuBack( PlayerNumber pn ) { - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); } diff --git a/stepmania/src/ScreenNameEntry.cpp b/stepmania/src/ScreenNameEntry.cpp index 266621f201..dd15df00a6 100644 --- a/stepmania/src/ScreenNameEntry.cpp +++ b/stepmania/src/ScreenNameEntry.cpp @@ -222,7 +222,7 @@ ScreenNameEntry::ScreenNameEntry() bAnyStillEntering |= m_bStillEnteringName[p]; if( !bAnyStillEntering ) { - this->SendScreenMessage( SM_GoToNextScreen, 0 ); + this->PostScreenMessage( SM_GoToNextScreen, 0 ); return; } } diff --git a/stepmania/src/ScreenOptions.cpp b/stepmania/src/ScreenOptions.cpp index 39f9d38c7c..94b37667f2 100644 --- a/stepmania/src/ScreenOptions.cpp +++ b/stepmania/src/ScreenOptions.cpp @@ -405,7 +405,7 @@ void ScreenOptions::HandleScreenMessage( const ScreenMessage SM ) switch( SM ) { case SM_MenuTimer: - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); break; case SM_GoToPrevScreen: // this->ExportOptions(); // Don't save options if we're going back! @@ -460,7 +460,7 @@ void ScreenOptions::MenuBack( PlayerNumber pn ) void ScreenOptions::StartGoToNextState() { - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); } void ScreenOptions::MenuStart( PlayerNumber pn ) @@ -478,11 +478,11 @@ void ScreenOptions::MenuStart( PlayerNumber pn ) if( m_iCurrentRow[pn] != m_iNumOptionRows ) // not on exit MenuDown( pn ); // can't go down any more else if( bAllOnExit ) - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); } else // !m_bArcadeOptionsNavigation { - this->SendScreenMessage( SM_BeginFadingOut, 0 ); + this->PostScreenMessage( SM_BeginFadingOut, 0 ); } } diff --git a/stepmania/src/ScreenRanking.cpp b/stepmania/src/ScreenRanking.cpp index b98f8ee8eb..55f80d016d 100644 --- a/stepmania/src/ScreenRanking.cpp +++ b/stepmania/src/ScreenRanking.cpp @@ -154,7 +154,7 @@ ScreenRanking::ScreenRanking() : ScreenAttract("ScreenRanking") this->ClearMessageQueue( SM_BeginFadingOut ); // ignore ScreenAttract's SecsToShow - this->SendScreenMessage( SM_ShowNextPage, 0.5f ); + this->PostScreenMessage( SM_ShowNextPage, 0.5f ); } void ScreenRanking::HandleScreenMessage( const ScreenMessage SM ) @@ -170,7 +170,7 @@ void ScreenRanking::HandleScreenMessage( const ScreenMessage SM ) { SetPage( m_vPagesToShow[0] ); m_vPagesToShow.erase( m_vPagesToShow.begin() ); - this->SendScreenMessage( SM_HidePage, SECONDS_PER_PAGE-1 ); + this->PostScreenMessage( SM_HidePage, SECONDS_PER_PAGE-1 ); TweenPageOnScreen(); } else @@ -180,7 +180,7 @@ void ScreenRanking::HandleScreenMessage( const ScreenMessage SM ) break; case SM_HidePage: TweenPageOffScreen(); - this->SendScreenMessage( SM_ShowNextPage, 1 ); + this->PostScreenMessage( SM_ShowNextPage, 1 ); break; } diff --git a/stepmania/src/ScreenSelectCourse.cpp b/stepmania/src/ScreenSelectCourse.cpp index 74e270a460..8b76e509a1 100644 --- a/stepmania/src/ScreenSelectCourse.cpp +++ b/stepmania/src/ScreenSelectCourse.cpp @@ -259,7 +259,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type, { m_soundChangeNotes.Play(); GAMESTATE->m_bDifficultCourses = false; - SCREENMAN->SendMessageToTopScreen(SM_SongChanged,0); + SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0); } } @@ -269,7 +269,7 @@ void ScreenSelectCourse::Input( const DeviceInput& DeviceI, InputEventType type, { m_soundChangeNotes.Play(); GAMESTATE->m_bDifficultCourses = true; - SCREENMAN->SendMessageToTopScreen(SM_SongChanged,0); + SCREENMAN->PostMessageToTopScreen(SM_SongChanged,0); } } @@ -361,7 +361,7 @@ void ScreenSelectCourse::MenuStart( PlayerNumber pn ) * hit accidentally. Accept an initial START right away, though, * so we don't ignore deliberate fast presses (which would be * annoying). */ - this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); + this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); m_Menu.StartTransitioning( SM_GoToNextScreen ); diff --git a/stepmania/src/ScreenSelectDifficulty.cpp b/stepmania/src/ScreenSelectDifficulty.cpp index 63b5f63194..778f8fa673 100644 --- a/stepmania/src/ScreenSelectDifficulty.cpp +++ b/stepmania/src/ScreenSelectDifficulty.cpp @@ -144,7 +144,7 @@ void ScreenSelectDifficulty::HandleScreenMessage( const ScreenMessage SM ) { case SM_BeginFadingOut: TweenOffScreen(); - SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing, SLEEP_AFTER_TWEEN_OFF_SECONDS ); // nofify parent that we're finished + SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, SLEEP_AFTER_TWEEN_OFF_SECONDS ); // nofify parent that we're finished m_Menu.m_MenuTimer.Stop(); break; } @@ -335,7 +335,7 @@ void ScreenSelectDifficulty::MenuStart( PlayerNumber pn ) 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 + this->PostScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_CHOICE_SECONDS ); // tell our owner it's time to move on } // Err, this breaks back ... diff --git a/stepmania/src/ScreenSelectDifficultyEX.cpp b/stepmania/src/ScreenSelectDifficultyEX.cpp index 0b3fea1b2e..c6b0005a0a 100644 --- a/stepmania/src/ScreenSelectDifficultyEX.cpp +++ b/stepmania/src/ScreenSelectDifficultyEX.cpp @@ -216,7 +216,7 @@ void ScreenSelectDifficultyEX::HandleScreenMessage( const ScreenMessage SM ) break; case SM_StartTweeningOffScreen: TweenOffScreen(); - this->SendScreenMessage( SM_StartFadingOut, 0.8f ); + this->PostScreenMessage( SM_StartFadingOut, 0.8f ); break; case SM_StartFadingOut: m_Menu.StartTransitioning( SM_GoToNextScreen ); @@ -410,7 +410,7 @@ void ScreenSelectDifficultyEX::MenuStart( PlayerNumber pn ) if( GAMESTATE->IsPlayerEnabled((PlayerNumber)p) && m_bChosen[p] == false ) return; } - this->SendScreenMessage( SM_StartTweeningOffScreen, 0.7f ); + this->PostScreenMessage( SM_StartTweeningOffScreen, 0.7f ); } void ScreenSelectDifficultyEX::ShowSelected( PlayerNumber pv ) diff --git a/stepmania/src/ScreenSelectGroup.cpp b/stepmania/src/ScreenSelectGroup.cpp index 3c522289e4..6565f90b80 100644 --- a/stepmania/src/ScreenSelectGroup.cpp +++ b/stepmania/src/ScreenSelectGroup.cpp @@ -271,7 +271,7 @@ void ScreenSelectGroup::MenuStart( PlayerNumber pn ) TweenOffScreen(); - this->SendScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_TWEEN_OFF_SECONDS ); + this->PostScreenMessage( SM_BeginFadingOut, SLEEP_AFTER_TWEEN_OFF_SECONDS ); } void ScreenSelectGroup::MenuBack( PlayerNumber pn ) diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index 413e5c294b..0a48932363 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -686,7 +686,7 @@ void ScreenSelectMusic::MenuStart( PlayerNumber pn ) * hit accidentally. Accept an initial START right away, though, * so we don't ignore deliberate fast presses (which would be * annoying). */ - this->SendScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); + this->PostScreenMessage( SM_AllowOptionsMenuRepeat, 0.5f ); } m_Menu.StartTransitioning( SM_GoToNextScreen ); diff --git a/stepmania/src/ScreenSelectStyle.cpp b/stepmania/src/ScreenSelectStyle.cpp index 55ff10eac2..0314307db4 100644 --- a/stepmania/src/ScreenSelectStyle.cpp +++ b/stepmania/src/ScreenSelectStyle.cpp @@ -181,7 +181,7 @@ void ScreenSelectStyle::MenuRight( PlayerNumber pn ) void ScreenSelectStyle::MenuStart( PlayerNumber pn ) { m_soundSelect.Play(); - SCREENMAN->SendMessageToTopScreen( SM_AllDoneChoosing, 0 ); + SCREENMAN->PostMessageToTopScreen( SM_AllDoneChoosing, 0 ); // // TweenOffScreen diff --git a/stepmania/src/ScreenSelectStyle5th.cpp b/stepmania/src/ScreenSelectStyle5th.cpp index d188724a28..3c99c98833 100644 --- a/stepmania/src/ScreenSelectStyle5th.cpp +++ b/stepmania/src/ScreenSelectStyle5th.cpp @@ -387,8 +387,8 @@ void ScreenSelectStyle5th::AfterChange() break; } - this->SendScreenMessage( SM_TweenExplanation2, 1 ); - this->SendScreenMessage( SM_UpdateAnimations, TWEEN_TIME ); + this->PostScreenMessage( SM_TweenExplanation2, 1 ); + this->PostScreenMessage( SM_UpdateAnimations, TWEEN_TIME ); } void ScreenSelectStyle5th::TweenOffScreen() @@ -451,7 +451,7 @@ void ScreenSelectStyle5th::TweenOnScreen() m_textExplanation1.SetText( TEXT_EXPLANATION1[m_iSelection] ); m_textExplanation2.SetText( TEXT_EXPLANATION2[m_iSelection] ); - this->SendScreenMessage( SM_TweenExplanation2, 1 ); - this->SendScreenMessage( SM_UpdateAnimations, TWEEN_TIME ); + this->PostScreenMessage( SM_TweenExplanation2, 1 ); + this->PostScreenMessage( SM_UpdateAnimations, TWEEN_TIME ); } diff --git a/stepmania/src/ScreenStage.cpp b/stepmania/src/ScreenStage.cpp index 7b6742123c..bcaad10baa 100644 --- a/stepmania/src/ScreenStage.cpp +++ b/stepmania/src/ScreenStage.cpp @@ -72,7 +72,7 @@ ScreenStage::ScreenStage() /* Prep the new screen once the animation is complete. This way, we * start loading the gameplay screen as soon as possible. */ - this->SendScreenMessage( SM_PrepScreen, m_Background.GetLengthSeconds() ); + this->PostScreenMessage( SM_PrepScreen, m_Background.GetLengthSeconds() ); /* Start fading out after m_In is complete, minus the length of m_Out. This * essentially makes m_In a timer to pad the length, so we always wait a minimum @@ -83,7 +83,7 @@ ScreenStage::ScreenStage() /* Never do this before we send SM_PrepScreen--we havn't loaded the screen yet. */ fStartFadingOutSeconds = max(fStartFadingOutSeconds, m_Background.GetLengthSeconds()); - this->SendScreenMessage( SM_BeginFadingOut, fStartFadingOutSeconds ); + this->PostScreenMessage( SM_BeginFadingOut, fStartFadingOutSeconds ); //g_StageType = (StageType)STAGE_TYPE; @@ -557,8 +557,8 @@ ScreenStage::ScreenStage() // m_Fade.SetOpened(); //*/ - //this->SendScreenMessage( SM_DoneFadingIn, 1.0f ); - //this->SendScreenMessage( SM_StartFadingOut, 4.0f ); + //this->PostScreenMessage( SM_DoneFadingIn, 1.0f ); + //this->PostScreenMessage( SM_StartFadingOut, 4.0f ); } void ScreenStage::Update( float fDeltaTime ) diff --git a/stepmania/src/ScreenStyleSplash.cpp b/stepmania/src/ScreenStyleSplash.cpp index 54f5842362..f46023858e 100644 --- a/stepmania/src/ScreenStyleSplash.cpp +++ b/stepmania/src/ScreenStyleSplash.cpp @@ -32,7 +32,7 @@ ScreenStyleSplash::ScreenStyleSplash() if(!PREFSMAN->m_bShowDontDie) { - this->SendScreenMessage( SM_GoToNextScreen, 0.f ); + this->PostScreenMessage( SM_GoToNextScreen, 0.f ); return; } @@ -46,7 +46,7 @@ ScreenStyleSplash::ScreenStyleSplash() m_Menu.Load( "ScreenStyleSplash" ); this->AddChild( &m_Menu ); - this->SendScreenMessage( SM_StartClosing, 2 ); + this->PostScreenMessage( SM_StartClosing, 2 ); } diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 9f94e83ccb..94d246e4a8 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -132,7 +132,7 @@ ScreenTitleMenu::ScreenTitleMenu() SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenTitleMenu music") ); - this->SendScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS); + this->PostScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS); 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 @@ -227,7 +227,7 @@ void ScreenTitleMenu::Update( float fDelta ) { if(TimeToDemonstration.PeekDeltaTime() >= SECONDS_BEFORE_ATTRACT) { - this->SendScreenMessage( SM_GoToAttractLoop, 0 ); + this->PostScreenMessage( SM_GoToAttractLoop, 0 ); TimeToDemonstration.GetDeltaTime(); } Screen::Update(fDelta); @@ -240,7 +240,7 @@ void ScreenTitleMenu::HandleScreenMessage( const ScreenMessage SM ) { case SM_PlayComment: m_soundAttract.PlayRandom(); - this->SendScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS ); + this->PostScreenMessage( SM_PlayComment, SECONDS_BETWEEN_COMMENTS ); break; case SM_GoToNextScreen: switch( m_Choice ) diff --git a/stepmania/src/Transition.cpp b/stepmania/src/Transition.cpp index 0fa087139a..73a7c1f251 100644 --- a/stepmania/src/Transition.cpp +++ b/stepmania/src/Transition.cpp @@ -51,7 +51,7 @@ void Transition::Update( float fDeltaTime ) break; } - SCREENMAN->SendMessageToTopScreen( m_MessageToSendWhenDone, 0 ); + SCREENMAN->PostMessageToTopScreen( m_MessageToSendWhenDone, 0 ); } m_fPercentThroughTransition += fDeltaTime/m_fTransitionTime; diff --git a/stepmania/src/TransitionBGAnimation.cpp b/stepmania/src/TransitionBGAnimation.cpp index f7972e6d9b..7683aa2a00 100644 --- a/stepmania/src/TransitionBGAnimation.cpp +++ b/stepmania/src/TransitionBGAnimation.cpp @@ -40,7 +40,7 @@ void TransitionBGAnimation::Update( float fDeltaTime ) { m_fSecsIntoTransition = 0.0; m_State = finished; - SCREENMAN->SendMessageToTopScreen( m_MessageToSendWhenDone, 0 ); + SCREENMAN->SendMessageToTopScreen( m_MessageToSendWhenDone ); } m_fSecsIntoTransition += fDeltaTime; @@ -49,7 +49,7 @@ void TransitionBGAnimation::Update( float fDeltaTime ) void TransitionBGAnimation::DrawPrimitives() { - if( m_State == transitioning ) +// if( m_State == transitioning ) m_BGAnimation.Draw(); }