cleanup: move ProfileLoadResult into GameConstantsAndTypes so we don't take dependencies on Profile.h for ProfileLoadResult

This commit is contained in:
Chris Danford
2005-08-13 06:59:27 +00:00
parent 6e155cf810
commit ff7c122289
6 changed files with 52 additions and 46 deletions
+4 -4
View File
@@ -939,17 +939,17 @@ void GameCommand::ApplySelf( const vector<PlayerNumber> &vpns ) const
Profile backup = *PROFILEMAN->GetMachineProfile();
Profile::LoadResult lr = PROFILEMAN->GetMachineProfile()->LoadAllFromDir( sDir, PREFSMAN->m_bSignProfileData );
ProfileLoadResult lr = PROFILEMAN->GetMachineProfile()->LoadAllFromDir( sDir, PREFSMAN->m_bSignProfileData );
switch( lr )
{
case Profile::success:
case ProfileLoadResult_Success:
SCREENMAN->SystemMessage( ssprintf("Machine stats loaded from P%d card.",pn+1) );
break;
case Profile::failed_no_profile:
case ProfileLoadResult_FailedNoProfile:
SCREENMAN->SystemMessage( ssprintf("There is no machine profile on P%d card.",pn+1) );
*PROFILEMAN->GetMachineProfile() = backup;
break;
case Profile::failed_tampered:
case ProfileLoadResult_FailedTampered:
SCREENMAN->SystemMessage( ssprintf("The profile on P%d card contains corrupt or tampered data.",pn+1) );
*PROFILEMAN->GetMachineProfile() = backup;
break;