Oops. Fix my broken ScreenEval logic and other things.

This commit is contained in:
Chris Danford
2003-02-11 02:44:26 +00:00
parent 6320e15256
commit c55e4a15b4
6 changed files with 33 additions and 19 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type
case MENU_BUTTON_COIN:
Screen::MenuCoin( MenuI.player ); // increment coins, play sound
SOUNDMAN->StopMusic();
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case MENU_BUTTON_START:
@@ -115,7 +115,7 @@ void ScreenAttract::Input( const DeviceInput& DeviceI, const InputEventType type
case PrefsManager::COIN_HOME:
SOUNDMAN->StopMusic();
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
default:
+2 -2
View File
@@ -208,7 +208,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp
case MENU_BUTTON_COIN:
Screen::MenuCoin( MenuI.player ); // increment coins, play sound
m_soundMusic.Stop();
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case MENU_BUTTON_START:
@@ -224,7 +224,7 @@ void ScreenDemonstration::Input( const DeviceInput& DeviceI, const InputEventTyp
case PrefsManager::COIN_HOME:
m_soundMusic.Stop();
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
default:
+16 -8
View File
@@ -806,15 +806,18 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
}
else // not event mode
{
if( m_bTryExtraStage )
m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic );
else if( m_ResultMode == RM_ARCADE_STAGE )
switch( m_ResultMode )
{
if( GAMESTATE->IsFinalStage() )
case RM_ARCADE_STAGE:
if( m_bTryExtraStage )
{
m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic );
}
else if( GAMESTATE->IsFinalStage() || GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() )
{
/* Tween the screen out, but leave the MenuElements where they are.
* Play the "swoosh" sound manually (would normally be played by the ME
* tween out). */
* Play the "swoosh" sound manually (would normally be played by the ME
* tween out). */
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","menu swoosh") );
TweenOffScreen();
SCREENMAN->SendMessageToTopScreen( SM_GoToFinalEvaluation, MENU_ELEMENTS_TWEEN_TIME );
@@ -823,9 +826,14 @@ void ScreenEvaluation::MenuStart( PlayerNumber pn )
{
m_Menu.TweenOffScreenToMenu( SM_GoToSelectMusic );
}
}
else
break;
case RM_ARCADE_SUMMARY:
m_Menu.TweenOffScreenToBlack( SM_GoToGameFinished, false );
break;
case RM_COURSE:
m_Menu.TweenOffScreenToBlack( SM_GoToGameFinished, false );
break;
}
}
switch( m_ResultMode )
+2 -2
View File
@@ -190,7 +190,7 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
case MENU_BUTTON_COIN:
Screen::MenuCoin( MenuI.player ); // increment coins, play sound
m_soundMusic.Stop();
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
case MENU_BUTTON_START:
@@ -206,7 +206,7 @@ void ScreenJukebox::Input( const DeviceInput& DeviceI, const InputEventType type
case PrefsManager::COIN_HOME:
m_soundMusic.Stop();
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","insert coin") );
::Sleep( 200 ); // do a little pause, like the arcade does
::Sleep( 800 ); // do a little pause, like the arcade does
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
break;
default:
+4 -3
View File
@@ -63,11 +63,12 @@ const char NAME_CHARS[] =
#define HEIGHT_OF_ALL_CHARS (NUM_NAME_CHARS * g_fCharsSpacingY)
int GetClosestCharIndex( float fFakeBeat )
{
return ((int)roundf(fFakeBeat)) % NUM_NAME_CHARS;
};
int iCharIndex = (int)roundf(fFakeBeat) % NUM_NAME_CHARS;
ASSERT( iCharIndex >= 0 );
return iCharIndex;
}
// return value is relative to gray arrows
float GetClosestCharYOffset( float fFakeBeat )
+7 -2
View File
@@ -832,10 +832,15 @@ bool Song::IsEasy( NotesType nt ) const
Notes* pHardNotes = GetNotes( nt, DIFFICULTY_HARD );
// HACK: Looks bizarre to see the easy mark by Legend of MAX.
if( pHardNotes->GetMeter() <= 9 )
if( pHardNotes && pHardNotes->GetMeter()<=9 )
return false;
return pBeginnerNotes->GetMeter() == 1 || pEasyNotes->GetMeter() == 1;
if( pBeginnerNotes && pBeginnerNotes->GetMeter()==1 )
return true;
else if( pEasyNotes && pEasyNotes->GetMeter()==1 )
return true;
else
return false;
}
bool Song::HasEdits( NotesType nt ) const