s/UNLOCKSYS/UNLOCKMAN/

This commit is contained in:
Glenn Maynard
2004-02-21 01:06:35 +00:00
parent 7cbd73345c
commit 1421f168db
12 changed files with 42 additions and 42 deletions
+5 -5
View File
@@ -365,12 +365,12 @@ void MusicWheel::GetSongList(vector<Song*> &arraySongs, SongSortOrder so, CStrin
/* Don't show in roulette if #SELECTABLE:NO unless some other song in the same
* roulette class has previously been unlocked. */
if( so==SORT_ROULETTE && !(pSong->RouletteDisplayed()
|| UNLOCKSYS->SongIsRoulette( pSong )) )
|| UNLOCKMAN->SongIsRoulette( pSong )) )
continue;
}
// If we're using unlocks, check it here to prevent from being shown
if( so!=SORT_ROULETTE && UNLOCKSYS->SongIsLocked(pSong) )
if( so!=SORT_ROULETTE && UNLOCKMAN->SongIsLocked(pSong) )
continue;
vector<Steps*> arraySteps;
@@ -489,7 +489,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
Song *pSong = arrayAllSongs[i];
if( SONGMAN->GetNumStagesForSong(pSong) > GAMESTATE->GetNumStagesLeft() )
continue;
if( UNLOCKSYS->SongIsLocked(pSong) )
if( UNLOCKMAN->SongIsLocked(pSong) )
continue;
arraySongs.push_back( pSong );
@@ -648,7 +648,7 @@ void MusicWheel::BuildWheelItemDatas( vector<WheelItemData> &arrayWheelItemDatas
Course* pCourse = apCourses[c];
// if unlocks are on, make sure it is unlocked
if ( UNLOCKSYS->CourseIsLocked(pCourse) )
if ( UNLOCKMAN->CourseIsLocked(pCourse) )
continue;
CString sThisSection = "";
@@ -1241,7 +1241,7 @@ bool MusicWheel::Select() // return true if this selection ends the screen
return false;
case TYPE_SONG:
if( !GAMESTATE->IsExtraStage() && !GAMESTATE->IsExtraStage2() )
UNLOCKSYS->UnlockSong( m_CurWheelItemData[m_iSelection]->m_pSong );
UNLOCKMAN->UnlockSong( m_CurWheelItemData[m_iSelection]->m_pSong );
return true;
case TYPE_COURSE:
return true;
+1 -1
View File
@@ -391,7 +391,7 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
if( m_iCurToastyCombo==250 && !GAMESTATE->m_bDemonstrationOrJukebox )
{
SCREENMAN->PostMessageToTopScreen( SM_PlayToasty, 0 );
UNLOCKSYS->UnlockToasty();
UNLOCKMAN->UnlockToasty();
}
break;
default:
+8 -8
View File
@@ -227,21 +227,21 @@ void ScreenEvaluation::Init()
{
case stage:
// update unlock data
UNLOCKSYS->UnlockClearStage();
UNLOCKSYS->UnlockAddAP( grade[p] );
UNLOCKSYS->UnlockAddSP( grade[p] );
UNLOCKSYS->UnlockAddDP( (float)stageStats.iActualDancePoints[p] );
UNLOCKMAN->UnlockClearStage();
UNLOCKMAN->UnlockAddAP( grade[p] );
UNLOCKMAN->UnlockAddSP( grade[p] );
UNLOCKMAN->UnlockAddDP( (float)stageStats.iActualDancePoints[p] );
// if it's extra stage, update # passed stages
if ( (GAMESTATE->IsExtraStage() || GAMESTATE->IsExtraStage2() ) &&
grade[p] > GRADE_FAILED )
UNLOCKSYS->UnlockClearExtraStage();
UNLOCKMAN->UnlockClearExtraStage();
break;
case course:
UNLOCKSYS->UnlockAddDP( (float) stageStats.iActualDancePoints[p] );
UNLOCKSYS->UnlockAddAP( (float) stageStats.iSongsPassed[p] );
UNLOCKSYS->UnlockAddSP( (float) stageStats.iSongsPassed[p] );
UNLOCKMAN->UnlockAddDP( (float) stageStats.iActualDancePoints[p] );
UNLOCKMAN->UnlockAddAP( (float) stageStats.iSongsPassed[p] );
UNLOCKMAN->UnlockAddSP( (float) stageStats.iSongsPassed[p] );
break;
}
}
+3 -3
View File
@@ -2134,9 +2134,9 @@ void ScreenGameplay::HandleScreenMessage( const ScreenMessage SM )
m_textSurviveTime.SetText( "TIME: " + SecondsToTime(fMaxSurviveSeconds) );
SET_XY_AND_ON_COMMAND( m_textSurviveTime );
// if unlocks are on, update fail extra stage count
if (PREFSMAN->m_bUseUnlockSystem)
UNLOCKSYS->UnlockFailExtraStage();
// Increment update failed extra stage count.
if( PREFSMAN->m_bUseUnlockSystem )
UNLOCKMAN->UnlockFailExtraStage();
}
// Feels hackish. Feel free to make cleaner.
+2 -2
View File
@@ -186,7 +186,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
for( unsigned s=0; s<num_songs; s++ )
{
Song *pSong = SONGMAN->GetAllSongs()[s];
if( UNLOCKSYS->SongIsLocked(pSong) )
if( UNLOCKMAN->SongIsLocked(pSong) )
continue;
StepsScoreRowItem* pStepsScoreRowItem = new StepsScoreRowItem;
@@ -233,7 +233,7 @@ ScreenRanking::ScreenRanking( CString sClassName ) : ScreenAttract( sClassName )
LOG->Trace("rankings: adding %u courses", unsigned(courses.size()));
for( unsigned s=0; s<courses.size(); s++ )
{
if( UNLOCKSYS->CourseIsLocked(courses[s]) )
if( UNLOCKMAN->CourseIsLocked(courses[s]) )
continue;
CourseScoreRowItem* pCourseScoreRowItem = new CourseScoreRowItem;
+1 -1
View File
@@ -21,7 +21,7 @@ void ScreenReloadSongs::Update( float fDeltaTime )
m_FirstUpdate = false;
SONGMAN->Reload();
UNLOCKSYS->UpdateSongs();
UNLOCKMAN->UpdateSongs();
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
}
+1 -1
View File
@@ -165,7 +165,7 @@ void ScreenSelect::Input( const DeviceInput& DeviceI, const InputEventType type,
vector<CString> asBits;
split( parts[j], ",", asBits, true );
if( !asBits[0].CompareNoCase("unlock") )
UNLOCKSYS->UnlockCode( atoi(asBits[1]) );
UNLOCKMAN->UnlockCode( atoi(asBits[1]) );
if( !asBits[0].CompareNoCase("sound") )
SOUND->PlayOnce( THEME->GetPathToS( asBits[1] ) );
}
+1 -1
View File
@@ -62,7 +62,7 @@ ScreenSelectGroup::ScreenSelectGroup( CString sClassName ) : Screen( sClassName
{
bool DisplaySong = aAllSongs[j]->NormallyDisplayed();
if( UNLOCKSYS->SongIsLocked( aAllSongs[j] ) )
if( UNLOCKMAN->SongIsLocked( aAllSongs[j] ) )
DisplaySong = false;
if( aAllSongs[j]->SongCompleteForStyle(GAMESTATE->GetCurrentStyleDef()) &&
+1 -1
View File
@@ -109,7 +109,7 @@ ScreenTitleMenu::ScreenTitleMenu( CString sClassName ) : ScreenSelect( sClassNam
m_textSongs.Command( SONGS_ON_COMMAND );
CString text = ssprintf("%d songs in %d groups, %d courses", SONGMAN->GetNumSongs(), SONGMAN->GetNumGroups(), SONGMAN->GetNumCourses() );
if( PREFSMAN->m_bUseUnlockSystem )
text += ssprintf(", %d unlocks", UNLOCKSYS->GetNumUnlocks() );
text += ssprintf(", %d unlocks", UNLOCKMAN->GetNumUnlocks() );
m_textSongs.SetText( text );
this->AddChild( &m_textSongs );
+14 -14
View File
@@ -43,8 +43,8 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
LOG->Trace("ScreenUnlock::ScreenUnlock()");
unsigned NumUnlocks = NUM_UNLOCKS;
if (UNLOCKSYS->m_SongEntries.size() < NumUnlocks)
NumUnlocks = UNLOCKSYS->m_SongEntries.size();
if (UNLOCKMAN->m_SongEntries.size() < NumUnlocks)
NumUnlocks = UNLOCKMAN->m_SongEntries.size();
if (!PREFSMAN->m_bUseUnlockSystem || NumUnlocks == 0)
{
@@ -62,11 +62,11 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
// get pertaining UnlockEntry
CString SongTitle = DISPLAYED_SONG(i);
if (USE_UNLOCKS_DAT == 1)
if ((unsigned)i <= UNLOCKSYS->m_SongEntries.size() )
SongTitle = UNLOCKSYS->m_SongEntries[i-1].m_sSongName;
if ((unsigned)i <= UNLOCKMAN->m_SongEntries.size() )
SongTitle = UNLOCKMAN->m_SongEntries[i-1].m_sSongName;
LOG->Trace("UnlockScreen: Searching for %s", SongTitle.c_str());
const UnlockEntry *pSong = UNLOCKSYS->FindLockEntry( SongTitle );
const UnlockEntry *pSong = UNLOCKMAN->FindLockEntry( SongTitle );
if( pSong == NULL)
{
@@ -115,11 +115,11 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
{
CString DisplayedSong = DISPLAYED_SONG(i);
if (USE_UNLOCKS_DAT == 1)
if ((unsigned)i <= UNLOCKSYS->m_SongEntries.size() )
DisplayedSong = UNLOCKSYS->m_SongEntries[i-1].m_sSongName;
if ((unsigned)i <= UNLOCKMAN->m_SongEntries.size() )
DisplayedSong = UNLOCKMAN->m_SongEntries[i-1].m_sSongName;
DisplayedSong.MakeUpper();
UnlockEntry *pSong = UNLOCKSYS->FindLockEntry(DisplayedSong);
UnlockEntry *pSong = UNLOCKMAN->FindLockEntry(DisplayedSong);
if ( pSong == NULL ) // no such song
continue;
@@ -242,12 +242,12 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
CString DisplayedSong = DISPLAYED_SONG(NextIcon);
if (USE_UNLOCKS_DAT == 1)
{
if (NextIcon <= UNLOCKSYS->m_SongEntries.size() )
DisplayedSong = UNLOCKSYS->m_SongEntries[NextIcon-1].m_sSongName;
if (NextIcon <= UNLOCKMAN->m_SongEntries.size() )
DisplayedSong = UNLOCKMAN->m_SongEntries[NextIcon-1].m_sSongName;
}
DisplayedSong.MakeUpper();
UnlockEntry *pSong = UNLOCKSYS->FindLockEntry(DisplayedSong);
UnlockEntry *pSong = UNLOCKMAN->FindLockEntry(DisplayedSong);
if (pSong->m_pSong == NULL)
continue;
@@ -306,13 +306,13 @@ ScreenUnlock::ScreenUnlock( CString sClassName ) : ScreenAttract( sClassName )
CString PointDisplay = TYPE_TO_DISPLAY;
if (PointDisplay == "DP" || PointDisplay == "Dance")
{
CString sDP = ssprintf( "%d", (int)UNLOCKSYS->DancePointsUntilNextUnlock() );
CString sDP = ssprintf( "%d", (int)UNLOCKMAN->DancePointsUntilNextUnlock() );
PointsUntilNextUnlock.SetText( sDP );
} else if (PointDisplay == "AP" || PointDisplay == "Arcade") {
CString sAP = ssprintf( "%d", (int)UNLOCKSYS->ArcadePointsUntilNextUnlock() );
CString sAP = ssprintf( "%d", (int)UNLOCKMAN->ArcadePointsUntilNextUnlock() );
PointsUntilNextUnlock.SetText( sAP );
} else if (PointDisplay == "SP" || PointDisplay == "Song") {
CString sSP = ssprintf( "%d", (int)UNLOCKSYS->SongPointsUntilNextUnlock() );
CString sSP = ssprintf( "%d", (int)UNLOCKMAN->SongPointsUntilNextUnlock() );
PointsUntilNextUnlock.SetText( sSP );
}
+4 -4
View File
@@ -22,7 +22,7 @@
#include "IniFile.h"
#include "MsdFile.h"
UnlockSystem* UNLOCKSYS = NULL; // global and accessable from anywhere in our program
UnlockSystem* UNLOCKMAN = NULL; // global and accessable from anywhere in our program
#define UNLOCKS_PATH "Data/Unlocks.dat"
#define MEMCARD_PATH "Data/MemCard.ini"
@@ -40,7 +40,7 @@ static const char *g_UnlockNames[NUM_UNLOCK_TYPES] =
UnlockSystem::UnlockSystem()
{
UNLOCKSYS = this;
UNLOCKMAN = this;
LoadFromDATFile();
@@ -144,10 +144,10 @@ UnlockEntry::UnlockEntry()
bool UnlockEntry::IsLocked() const
{
for( int i = 0; i < NUM_UNLOCK_TYPES; ++i )
if( m_fRequired[i] && UNLOCKSYS->m_fScores[i] >= m_fRequired[i] )
if( m_fRequired[i] && UNLOCKMAN->m_fScores[i] >= m_fRequired[i] )
return false;
if( m_iCode != -1 && UNLOCKSYS->m_UnlockedCodes.find(m_iCode) != UNLOCKSYS->m_UnlockedCodes.end() )
if( m_iCode != -1 && UNLOCKMAN->m_UnlockedCodes.find(m_iCode) != UNLOCKMAN->m_UnlockedCodes.end() )
return false;
return true;
+1 -1
View File
@@ -110,6 +110,6 @@ private:
set<int> m_RouletteCodes; // "codes" which are available in roulette and which unlock if rouletted
};
extern UnlockSystem* UNLOCKSYS; // global and accessable from anywhere in program
extern UnlockSystem* UNLOCKMAN; // global and accessable from anywhere in program
#endif