GAMEMAN-> to GameManager::

This commit is contained in:
Steve Checkoway
2008-03-24 12:50:16 +00:00
parent 551d9bfc23
commit 521c1c23e5
28 changed files with 42 additions and 42 deletions
+2 -2
View File
@@ -317,7 +317,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
{
XNode* pNode2 = pNode->AppendChild( "Style" );
vector<const Style*> vpStyle;
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vpStyle );
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vpStyle );
FOREACH( const Style*, vpStyle, pStyle )
{
if( !SHOW_STYLE(*pStyle) )
@@ -325,7 +325,7 @@ void CatalogXml::Save( LoadingWindow *loading_window )
StyleID sID;
sID.FromStyle( (*pStyle) );
XNode* pNode3 = pNode2->AppendChild( sID.CreateNode() );
pNode3->AppendAttr( "DisplayAs", GAMEMAN->StyleToLocalizedString(*pStyle) );
pNode3->AppendAttr( "DisplayAs", GameManager::StyleToLocalizedString(*pStyle) );
}
}
+1 -1
View File
@@ -120,7 +120,7 @@ void ThemeMetricStepsTypesToShow::Read()
ThemeMetric<RString>::Read();
m_v.clear();
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, m_v );
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, m_v );
RemoveStepsTypes( m_v, ThemeMetric<RString>::GetValue() );
}
+2 -2
View File
@@ -682,7 +682,7 @@ void Course::GetTrails( vector<Trail*> &AddTo, StepsType st ) const
void Course::GetAllTrails( vector<Trail*> &AddTo ) const
{
vector<StepsType> vStepsTypesToShow;
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, vStepsTypesToShow );
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, vStepsTypesToShow );
FOREACH( StepsType, vStepsTypesToShow, st )
{
GetTrails( AddTo, *st );
@@ -734,7 +734,7 @@ bool Course::AllSongsAreFixed() const
const Style *Course::GetCourseStyle( const Game *pGame, int iNumPlayers ) const
{
vector<const Style*> vpStyles;
GAMEMAN->GetCompatibleStyles( pGame, iNumPlayers, vpStyles );
GameManager::GetCompatibleStyles( pGame, iNumPlayers, vpStyles );
for( int s=0; s < (int) vpStyles.size(); ++s )
{
+1 -1
View File
@@ -264,7 +264,7 @@ void DifficultyDisplay::SetInternal( const SetParams &params )
// TODO: Make this an AutoActor, optimize graphic loading
if( params.st != StepsType_Invalid )
{
RString sStepsType = GAMEMAN->GetStepsTypeInfo(params.st).szName;
RString sStepsType = GameManager::GetStepsTypeInfo(params.st).szName;
m_sprStepsType.Load( THEME->GetPathG(m_sMetricsGroup,"StepsType "+sStepsType) );
}
}
+1 -1
View File
@@ -174,7 +174,7 @@ void GameCommand::LoadOne( const Command& cmd )
if( sName == "style" )
{
const Style* style = GAMEMAN->GameAndStringToStyle( GAMESTATE->m_pCurGame, sValue );
const Style* style = GameManager::GameAndStringToStyle( GAMESTATE->m_pCurGame, sValue );
if( style )
m_pStyle = style;
else
+3 -3
View File
@@ -352,7 +352,7 @@ void GameState::JoinPlayer( PlayerNumber pn )
// Set the current style to something appropriate for the new number of joined players.
if( ALLOW_LATE_JOIN && m_pCurStyle != NULL )
{
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), m_pCurStyle->m_StepsType );
const Style *pStyle = GameManager::GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), m_pCurStyle->m_StepsType );
m_pCurStyle.Set( pStyle );
}
@@ -591,7 +591,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
{
/* If a style isn't set, use the style of the selected steps. */
StepsType st = pSteps->m_StepsType;
pStyle = GAMEMAN->GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), st );
pStyle = GameManager::GetFirstCompatibleStyle( m_pCurGame, GetNumSidesJoined(), st );
}
else
{
@@ -599,7 +599,7 @@ int GameState::GetNumStagesForCurrentSongAndStepsOrCourse() const
* joined players, or one player if no players are joined. */
vector<const Style*> vpStyles;
int iJoined = max( GetNumSidesJoined(), 1 );
GAMEMAN->GetCompatibleStyles( m_pCurGame, iJoined, vpStyles );
GameManager::GetCompatibleStyles( m_pCurGame, iJoined, vpStyles );
ASSERT( !vpStyles.empty() );
pStyle = vpStyles[0];
}
+1 -1
View File
@@ -69,7 +69,7 @@ static void GetUsedGameInputs( vector<GameInput> &vGameInputsOut )
set<GameInput> vGIs;
vector<const Style*> vStyles;
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
FOREACH( const Style*, vStyles, style )
{
bool bFound = find( CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().begin(), CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end(), (*style)->m_StepsType ) != CommonMetrics::STEPS_TYPES_TO_SHOW.GetValue().end();
+1 -1
View File
@@ -1003,7 +1003,7 @@ void MusicWheel::SetOpenSection( RString group )
vector<const Style*> vpPossibleStyles;
if( CommonMetrics::AUTO_SET_STYLE )
GAMEMAN->GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
GameManager::GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
m_CurWheelItemData.clear();
vector<MusicWheelItemData *> &from = m_WheelItemDatas[GAMESTATE->m_SortOrder];
+2 -2
View File
@@ -662,8 +662,8 @@ void NetworkSyncManager::ProcessInput()
GameName = m_packet.ReadNT();
StyleName = m_packet.ReadNT();
GAMESTATE->SetCurGame( GAMEMAN->StringToGameType(GameName) );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
GAMESTATE->SetCurGame( GameManager::StringToGameType(GameName) );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GAMESTATE->m_pCurGame,StyleName) );
SCREENMAN->SetNewScreen( "ScreenNetSelectMusic" ); //Should this be metric'd out?
}
+2 -2
View File
@@ -676,11 +676,11 @@ class OptionRowHandlerListStyles: public OptionRowHandlerList
m_Def.m_bAllowThemeItems = false; // we theme the text ourself
vector<const Style*> vStyles;
GAMEMAN->GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
GameManager::GetStylesForGame( GAMESTATE->m_pCurGame, vStyles );
ASSERT( vStyles.size() );
FOREACH_CONST( const Style*, vStyles, s )
{
m_Def.m_vsChoices.push_back( GAMEMAN->StyleToLocalizedString(*s) );
m_Def.m_vsChoices.push_back( GameManager::StyleToLocalizedString(*s) );
GameCommand mc;
mc.m_pStyle = *s;
m_aListEntries.push_back( mc );
+1 -1
View File
@@ -1237,7 +1237,7 @@ void Profile::LoadGeneralDataFromNode( const XNode* pNode )
pNode->GetChildValue( "SortOrder", s ); m_SortOrder = StringToSortOrder( s );
pNode->GetChildValue( "LastDifficulty", s ); m_LastDifficulty = StringToDifficulty( s );
pNode->GetChildValue( "LastCourseDifficulty", s ); m_LastCourseDifficulty = StringToDifficulty( s );
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GAMEMAN->StringToStepsType( s );
pNode->GetChildValue( "LastStepsType", s ); m_LastStepsType = GameManager::StringToStepsType( s );
pTemp = pNode->GetChild( "Song" ); if( pTemp ) m_lastSong.LoadFromNode( pTemp );
pTemp = pNode->GetChild( "Course" ); if( pTemp ) m_lastCourse.LoadFromNode( pTemp );
pNode->GetChildValue( "TotalPlays", m_iTotalPlays );
+1 -1
View File
@@ -40,7 +40,7 @@ void ScreenDemonstration::Init()
}
vector<const Style*> vStylePossible;
GAMEMAN->GetDemonstrationStylesForGame( GAMESTATE->m_pCurGame, vStylePossible );
GameManager::GetDemonstrationStylesForGame( GAMESTATE->m_pCurGame, vStylePossible );
for( int i=(int)(vStylePossible.size())-1; i>=0; i-- )
{
bool bAllowThis = find( vStyleTypeAllow.begin(), vStyleTypeAllow.end(), vStylePossible[i]->m_StyleType ) != vStyleTypeAllow.end();
+1 -1
View File
@@ -183,7 +183,7 @@ void ScreenEditMenu::MenuStart( const InputEventPlus &input )
GAMESTATE->m_pCurSong.Set( pSong );
GAMESTATE->m_pCurCourse.Set( NULL );
GAMESTATE->SetCurrentStyle( GAMEMAN->GetEditorStyleForStepsType(st) );
GAMESTATE->SetCurrentStyle( GameManager::GetEditorStyleForStepsType(st) );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
//
+1 -1
View File
@@ -30,7 +30,7 @@ ScreenEnding::ScreenEnding()
PROFILEMAN->LoadFirstAvailableProfile(PLAYER_2);
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
GAMESTATE->JoinPlayer( PLAYER_1 );
GAMESTATE->JoinPlayer( PLAYER_2 );
GAMESTATE->m_pCurSong.Set( SONGMAN->GetRandomSong() );
+1 -1
View File
@@ -96,7 +96,7 @@ void ScreenEvaluation::Init()
StageStats &ss = STATSMAN->m_vPlayedStageStats.back();
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GameManager::GetDefaultGame(),"versus") );
ss.m_playMode = GAMESTATE->m_PlayMode;
ss.m_pStyle = GAMESTATE->GetCurrentStyle();
ss.m_Stage = STAGE_NORMAL;
+1 -1
View File
@@ -15,7 +15,7 @@ REGISTER_SCREEN_CLASS( ScreenGameplaySyncMachine );
void ScreenGameplaySyncMachine::Init()
{
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->SetCurrentStyle( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
AdjustSync::ResetOriginalSyncData();
RString sFile = THEME->GetPathO("ScreenGameplaySyncMachine","music.sm");
+1 -1
View File
@@ -127,7 +127,7 @@ void ScreenHowToPlay::Init()
m_pLifeMeterBar->FillForHowToPlay( NUM_W2S, NUM_MISSES );
}
GAMESTATE->SetCurrentStyle( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->SetCurrentStyle( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
if( USE_PLAYER )
{
+3 -3
View File
@@ -125,7 +125,7 @@ ScreenNameEntry::ScreenNameEntry()
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
StageStats ss;
for( int z = 0; z < 3; ++z )
{
@@ -172,8 +172,8 @@ void ScreenNameEntry::Init()
{
#if 0
// DEBUGGING STUFF
GAMESTATE->m_pCurGame.Set( GAMEMAN->GetDefaultGame() );
GAMESTATE->m_pCurStyle.Set( GAMEMAN->GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->m_pCurGame.Set( GameManager::GetDefaultGame() );
GAMESTATE->m_pCurStyle.Set( GameManager::GetHowToPlayStyleForGame(GAMESTATE->m_pCurGame) );
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->m_bSideIsJoined[PLAYER_1] = true;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
+1 -1
View File
@@ -24,7 +24,7 @@ void ScreenNameEntryTraditional::Init()
GAMESTATE->m_bSideIsJoined[PLAYER_2] = true;
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle( GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle( GameManager::GetDefaultGame(),"versus") );
for( int z = 0; z < 3; ++z )
{
StageStats ss;
@@ -282,7 +282,7 @@ void ScreenOptionsEditCourseEntry::HandleScreenMessage( const ScreenMessage SM )
ASSERT( pSteps );
// Set up for ScreenEdit
const Style *pStyle = GAMEMAN->GetEditorStyleForStepsType(pSteps->m_StepsType);
const Style *pStyle = GameManager::GetEditorStyleForStepsType(pSteps->m_StepsType);
GAMESTATE->SetCurrentStyle( pStyle );
GAMESTATE->m_pCurSong.Set( pSong );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
@@ -140,7 +140,7 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
{
Steps *pSteps = GAMESTATE->m_pCurSteps[PLAYER_1];
ASSERT( pSteps );
const Style *pStyle = GAMEMAN->GetEditorStyleForStepsType( pSteps->m_StepsType );
const Style *pStyle = GameManager::GetEditorStyleForStepsType( pSteps->m_StepsType );
GAMESTATE->SetCurrentStyle( pStyle );
// do base behavior
}
+2 -2
View File
@@ -156,7 +156,7 @@ static void MoveNop( int &iSel, bool bToSel, const ConfOption *pConfOption )
static void GameChoices( vector<RString> &out )
{
vector<const Game*> aGames;
GAMEMAN->GetEnabledGames( aGames );
GameManager::GetEnabledGames( aGames );
FOREACH( const Game*, aGames, g )
{
RString sGameName = (*g)->m_szName;
@@ -179,7 +179,7 @@ static void GameSel( int &sel, bool ToSel, const ConfOption *pConfOption )
sel = i;
} else {
vector<const Game*> aGames;
GAMEMAN->GetEnabledGames( aGames );
GameManager::GetEnabledGames( aGames );
StepMania::ChangeCurrentGame( aGames[sel] );
}
}
+1 -1
View File
@@ -103,7 +103,7 @@ void ScreenOptionsReviewWorkout::HandleScreenMessage( const ScreenMessage SM )
pWorkout->GenerateCourse( *WORKOUTMAN->m_pTempCourse );
GAMESTATE->m_pCurSong.Set( NULL ); // CurSong will be set if we back out. Set it back to NULL so that ScreenStage won't show the last song.
GAMESTATE->m_pCurCourse.Set( WORKOUTMAN->m_pTempCourse );
const Style *pStyle = GAMEMAN->GameAndStringToStyle(GAMESTATE->m_pCurGame,"single");
const Style *pStyle = GameManager::GameAndStringToStyle(GAMESTATE->m_pCurGame,"single");
StepsType st = pStyle->m_StepsType;
Trail *pTrail = GAMESTATE->m_pCurCourse->GetTrail( st );
ASSERT( pTrail );
+1 -1
View File
@@ -382,7 +382,7 @@ void ScreenRankingScroller::Init()
StepsType st = STEPS_TYPES_TO_SHOW.GetValue()[i];
if( asBits.size() > 1 )
st = GAMEMAN->StringToStepsType( asBits[1] );
st = GameManager::StringToStepsType( asBits[1] );
pts.aTypes.push_back( make_pair(dc, st) );
}
+4 -4
View File
@@ -60,7 +60,7 @@ void ScreenSelectMusic::Init()
if( PREFSMAN->m_bScreenTestMode && CommonMetrics::INITIAL_SCREEN == m_sName )
{
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
GAMESTATE->SetCurrentStyle( GAMEMAN->GameAndStringToStyle(GAMEMAN->GetDefaultGame(),"versus") );
GAMESTATE->SetCurrentStyle( GameManager::GameAndStringToStyle(GameManager::GetDefaultGame(),"versus") );
GAMESTATE->JoinPlayer( PLAYER_1 );
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
}
@@ -180,8 +180,8 @@ void ScreenSelectMusic::BeginScreen()
if( CommonMetrics::AUTO_SET_STYLE )
{
vector<StepsType> vst;
GAMEMAN->GetStepsTypesForGame( GAMESTATE->m_pCurGame, vst );
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), vst[0] );
GameManager::GetStepsTypesForGame( GAMESTATE->m_pCurGame, vst );
const Style *pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), vst[0] );
GAMESTATE->SetCurrentStyle( pStyle );
}
@@ -932,7 +932,7 @@ void ScreenSelectMusic::MenuStart( const InputEventPlus &input )
stCurrent = GAMESTATE->m_pCurSteps[pn]->m_StepsType;
}
vector<StepsType> vst;
pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), stCurrent );
pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumSidesJoined(), stCurrent );
}
GAMESTATE->SetCurrentStyle( pStyle );
}
+1 -1
View File
@@ -949,7 +949,7 @@ void Song::AddAutoGenNotes()
void Song::AutoGen( StepsType ntTo, StepsType ntFrom )
{
// int iNumTracksOfTo = GAMEMAN->StepsTypeToNumTracks(ntTo);
// int iNumTracksOfTo = GameManager::StepsTypeToNumTracks(ntTo);
for( unsigned int j=0; j<m_vpSteps.size(); j++ )
{
+2 -2
View File
@@ -837,7 +837,7 @@ static void GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
{
vector<const Style*> vpPossibleStyles;
if( CommonMetrics::AUTO_SET_STYLE )
GAMEMAN->GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
GameManager::GetCompatibleStyles( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), vpPossibleStyles );
else
vpPossibleStyles.push_back( GAMESTATE->m_pCurStyle );
@@ -872,7 +872,7 @@ static void GetPlayableStepsTypes( const Song *pSong, set<StepsType> &vOut )
{
bool bShowThisStepsType = find( vstToShow.begin(), vstToShow.end(), *st ) != vstToShow.end();
const Style *pStyle = GAMEMAN->GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), *st );
const Style *pStyle = GameManager::GetFirstCompatibleStyle( GAMESTATE->m_pCurGame, GAMESTATE->GetNumPlayersEnabled(), *st );
bool bEnoughStages = GAMESTATE->GetSmallestNumStagesLeftForAnyHumanPlayer() >= GAMESTATE->GetNumStagesForSongAndStyleType(pSong, pStyle->m_StyleType);
if( bShowThisStepsType && bEnoughStages )
+2 -2
View File
@@ -10,7 +10,7 @@ void StyleID::FromStyle( const Style *p )
{
if( p )
{
sGame = GAMEMAN->GetGameForStyle(p)->m_szName;
sGame = GameManager::GetGameForStyle(p)->m_szName;
sStyle = p->m_szName;
}
else
@@ -26,7 +26,7 @@ const Style *StyleID::ToStyle() const
if( pGame == NULL )
return NULL;
return GAMEMAN->GameAndStringToStyle( pGame, sStyle );
return GameManager::GameAndStringToStyle( pGame, sStyle );
}
XNode* StyleID::CreateNode() const