From 389bbc68d2c6573a6d252e06271298c49006d9e9 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 12 Aug 2004 23:06:06 +0000 Subject: [PATCH] allow ignoring actor errors --- stepmania/src/ActorUtil.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index d2b2311c41..05af78eecd 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -176,14 +176,19 @@ retry: if( asPaths.empty() ) { CString sError = ssprintf( "The actor file '%s' references a file '%s' which doesn't exist.", sIniPath.c_str(), sFile.c_str() ); - switch( Dialog::RetryCancel( sError, sError ) ) + switch( Dialog::AbortRetryIgnore( sError, "BROKEN_ACTOR_REFERENCE" ) ) { - case Dialog::cancel: + case Dialog::abort: RageException::Throw( sError ); break; case Dialog::retry: FlushDirCache(); goto retry; + case Dialog::ignore: + asPaths.push_back( sNewPath ); + if( GetExtension(asPaths[0]) == "" ) + asPaths[0] = SetExtension( asPaths[0], "png" ); + break; default: ASSERT(0); } @@ -191,14 +196,17 @@ retry: else if( asPaths.size() > 1 ) { CString sError = ssprintf( "The actor file '%s' references a file '%s' which has multiple matches.", sIniPath.c_str(), sFile.c_str() ); - switch( Dialog::RetryCancel( sError, sError ) ) + switch( Dialog::AbortRetryIgnore( sError, "DUPLICATE_ACTOR_REFERENCE" ) ) { - case Dialog::cancel: + case Dialog::abort: RageException::Throw( sError ); break; case Dialog::retry: FlushDirCache(); goto retry; + case Dialog::ignore: + asPaths.erase( asPaths.begin()+1, asPaths.end() ); + break; default: ASSERT(0); }