various bugfixes/updates

unlock system now supports clear and failed extra stages
songs unlocked by roulette are no longer unlocked by selecting them as extra stage
'fixed' survived time for extra stage when failing
This commit is contained in:
Andrew Wong
2003-08-07 10:15:16 +00:00
parent 4df19805c5
commit 5cc3dbe4bb
4 changed files with 21 additions and 2 deletions
+2 -1
View File
@@ -1174,7 +1174,8 @@ bool MusicWheel::Select() // return true if this selection ends the screen
StartRandom();
return false;
case TYPE_SONG:
GAMESTATE->m_pUnlockingSys->RouletteUnlock( m_CurWheelItemData[m_iSelection]->m_pSong );
if (PREFSMAN->m_bUseUnlockSystem)
GAMESTATE->m_pUnlockingSys->RouletteUnlock( m_CurWheelItemData[m_iSelection]->m_pSong );
// fall-through - we want to check for unlocking only if its a song
case TYPE_COURSE:
return true;
+9
View File
@@ -135,8 +135,17 @@ ScreenEvaluation::ScreenEvaluation( CString sClassName, Type type ) : Screen(sCl
Grade max_grade = GRADE_NO_DATA;
for( p=0; p<NUM_PLAYERS; p++ )
{
max_grade = max( max_grade, grade[p] );
// if its extra stage, update # passed stages
if (PREFSMAN->m_bUseUnlockSystem &&
(GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) &&
grade[p] > GRADE_E &&
m_Type != summary)
GAMESTATE->m_pUnlockingSys->UnlockClearExtraStage();
}
//
// update persistent statistics
+6 -1
View File
@@ -44,6 +44,7 @@
#include "Inventory.h"
#include "Course.h"
#include "NoteDataUtil.h"
#include "UnlockSystem.h"
//
// Defines
@@ -1810,7 +1811,11 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
fMaxSurviveSeconds = max( fMaxSurviveSeconds, GAMESTATE->m_CurStageStats.fAliveSeconds[p] );
ASSERT( fMaxSurviveSeconds > 0 );
m_textSurviveTime.SetText( "TIME: " + SecondsToTime(fMaxSurviveSeconds) );
SET_XY( m_textSurviveTime );
SET_XY_AND_ON_COMMAND( m_textSurviveTime );
// if unlocks are on, update fail extra stage count
if (PREFSMAN->m_bUseUnlockSystem)
GAMESTATE->m_pUnlockingSys->UnlockFailExtraStage();
}
SOUND->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay failed") );
+4
View File
@@ -46,6 +46,10 @@ UnlockSystem::UnlockSystem()
void UnlockSystem::RouletteUnlock( const Song *song )
{
// if its an extra stage, don't count it
if (GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2())
return;
SongEntry *p = FindSong( song );
if (!p)
return; // does not exist