move IsWindowed check inside of ArchHooks_Win32
This commit is contained in:
@@ -802,16 +802,14 @@ void Actor::HandleCommand( const CStringArray &asTokens )
|
||||
{
|
||||
CString sError = ssprintf( "Actor::HandleCommand: Unrecognized command name '%s'.", sName.c_str() );
|
||||
LOG->Warn( sError );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
}
|
||||
|
||||
if( iMaxIndexAccessed != (int)asTokens.size()-1 )
|
||||
{
|
||||
CString sError = ssprintf( "Actor::HandleCommand: Wrong number of parameters in command '%s'. Expected %d but there are %d.", join(",",asTokens).c_str(), iMaxIndexAccessed+1, (int)asTokens.size() );
|
||||
LOG->Warn( sError );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,8 +133,7 @@ void IncorrectActorParametersWarning( const CStringArray &asTokens, int iMaxInde
|
||||
const CString sError = ssprintf( "Actor::HandleCommand: Wrong number of parameters in command '%s'. Expected %d but there are %d.",
|
||||
join(",",asTokens).c_str(), iMaxIndexAccessed+1, size );
|
||||
LOG->Warn( sError );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
}
|
||||
|
||||
void UtilSetXY( Actor& actor, CString sClassName )
|
||||
|
||||
@@ -472,9 +472,8 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
||||
}
|
||||
else if( sFile == "" )
|
||||
{
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( ssprintf(
|
||||
"In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.c_str(), sLayer.c_str() ) );
|
||||
HOOKS->MessageBoxOK( ssprintf(
|
||||
"In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.c_str(), sLayer.c_str() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -486,8 +485,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
||||
if(asElementPaths.size() == 0)
|
||||
{
|
||||
CString sError = ssprintf("In the ini file for BGAnimation '%s', the specified File '%s' does not exist.", sAniDir.c_str(), sFile.c_str());
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
LOG->Warn( sError );
|
||||
return;
|
||||
}
|
||||
@@ -497,8 +495,7 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
|
||||
"There is more than one file that matches "
|
||||
"'%s/%s'. Please remove all but one of these matches.",
|
||||
sAniDir.c_str(), sFile.c_str() );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
LOG->Warn( sError );
|
||||
}
|
||||
sPath = asElementPaths[0];
|
||||
|
||||
@@ -26,8 +26,7 @@ bool DifficultyIcon::Load( CString sPath )
|
||||
Sprite::Load( sPath );
|
||||
int iStates = GetNumStates();
|
||||
if( iStates != 5 && iStates != 10 )
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( ssprintf("The difficulty icon graphic '%s' must have 5 or 10 frames. It has %d states.", sPath.c_str(), iStates) );
|
||||
HOOKS->MessageBoxOK( ssprintf("The difficulty icon graphic '%s' must have 5 or 10 frames. It has %d states.", sPath.c_str(), iStates) );
|
||||
StopAnimating();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -543,11 +543,23 @@ void NoteField::DrawPrimitives()
|
||||
|
||||
bool bIsAddition = (tn == TAP_ADDITION);
|
||||
bool bIsMine = (tn == TAP_MINE);
|
||||
bool bIsAttack = (tn==TAP_ATTACK);
|
||||
|
||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||
|
||||
NoteDisplayCols *nd = CurDisplay->second;
|
||||
nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
|
||||
if( bIsAttack )
|
||||
{
|
||||
const AttackNote* pA = GetAttackNoteAt( c, i );
|
||||
Sprite sprite;
|
||||
sprite.Load( THEME->GetPathToG("NoteField attack "+pA->sModifiers) );
|
||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||
NoteDisplayCols *nd = CurDisplay->second;
|
||||
nd->display[c].DrawActor( &sprite, c, NoteRowToBeat(i), bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
|
||||
NoteDisplayCols *nd = CurDisplay->second;
|
||||
nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
|
||||
}
|
||||
}
|
||||
|
||||
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
|
||||
|
||||
@@ -280,8 +280,7 @@ CString NoteSkinManager::GetPathTo( CString sDir, CString sFileName )
|
||||
if( matches.size() > 1 )
|
||||
{
|
||||
CString sError = "Multiple files match '"+sDir+sFileName+"'. Please remove all but one of these files.";
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
}
|
||||
|
||||
CString sPath = matches[0];
|
||||
|
||||
@@ -346,8 +346,7 @@ apply_color_key:
|
||||
fBetterSourceWidth, fBetterSourceHeight,
|
||||
fBetterFrameWidth, fBetterFrameHeight );
|
||||
LOG->Warn( sWarning );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sWarning, "FRAME_DIMENSIONS_WARNING" );
|
||||
HOOKS->MessageBoxOK( sWarning, "FRAME_DIMENSIONS_WARNING" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,11 @@
|
||||
#include "RageException.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#if defined(WIN32) && defined(DEBUG)
|
||||
#include "windows.h"
|
||||
#endif
|
||||
|
||||
RageException::RageException( const char *fmt, ...)
|
||||
{
|
||||
|
||||
@@ -248,8 +248,7 @@ void RageMatrixCommand( CString sCommandString, RageMatrix &mat )
|
||||
{
|
||||
CString sError = ssprintf( "MatrixCommand: Unrecognized matrix command name '%s' in command string '%s'.", sName.c_str(), sCommandString.c_str() );
|
||||
LOG->Warn( sError );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -258,8 +257,7 @@ void RageMatrixCommand( CString sCommandString, RageMatrix &mat )
|
||||
{
|
||||
CString sError = ssprintf( "MatrixCommand: Wrong number of parameters in command '%s'. Expected %d but there are %d.", join(",",asTokens).c_str(), iMaxIndexAccessed+1, (int)asTokens.size() );
|
||||
LOG->Warn( sError );
|
||||
if( DISPLAY->IsWindowed() )
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
HOOKS->MessageBoxOK( sError );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,9 +244,8 @@ try_element_again:
|
||||
"'%s/%s/%s'. Please remove all but one of these matches.",
|
||||
sThemeName.c_str(), sCategory.c_str(), sFileName.c_str() );
|
||||
|
||||
if( DISPLAY->IsWindowed() )
|
||||
if( ArchHooks::retry == HOOKS->MessageBoxRetryCancel(message) )
|
||||
goto try_element_again;
|
||||
if( ArchHooks::retry == HOOKS->MessageBoxRetryCancel(message) )
|
||||
goto try_element_again;
|
||||
|
||||
RageException::Throw( message );
|
||||
}
|
||||
@@ -292,9 +291,8 @@ try_element_again:
|
||||
"Verify that this redirect is correct.",
|
||||
sPath.c_str(), sNewFileName.c_str());
|
||||
|
||||
if( DISPLAY->IsWindowed() )
|
||||
if( ArchHooks::retry == HOOKS->MessageBoxAbortRetryIgnore(message) )
|
||||
goto try_element_again;
|
||||
if( ArchHooks::retry == HOOKS->MessageBoxAbortRetryIgnore(message) )
|
||||
goto try_element_again;
|
||||
|
||||
RageException::Throw( "%s", message.c_str() );
|
||||
}
|
||||
@@ -339,24 +337,23 @@ try_element_again:
|
||||
|
||||
CString sCategory = ELEMENT_CATEGORY_STRING[category];
|
||||
|
||||
#if defined(DEBUG) && defined(WIN32)
|
||||
CString sMessage = "The theme element '" + sCategory + SLASH + sFileName +"' is missing.";
|
||||
switch( MessageBox(NULL, sMessage, "ThemeManager", MB_RETRYCANCEL ) )
|
||||
switch( HOOKS->MessageBoxRetryCancel(sMessage) )
|
||||
{
|
||||
case IDRETRY:
|
||||
case ArchHooks::retry:
|
||||
FlushDirCache();
|
||||
g_ThemePathCache[category].clear();
|
||||
|
||||
goto try_element_again;
|
||||
case IDCANCEL:
|
||||
case ArchHooks::cancel:
|
||||
RageException::Throw( "Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.",
|
||||
sCategory.c_str(),
|
||||
sFileName.c_str(),
|
||||
GetThemeDirFromName(m_sCurThemeName).c_str(),
|
||||
GetThemeDirFromName(BASE_THEME_NAME).c_str() );
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
LOG->Warn(
|
||||
"Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.",
|
||||
@@ -424,22 +421,19 @@ try_metric_again:
|
||||
if( m_pIniMetrics->GetValue(sClassName,sValueName,sValue) )
|
||||
return sValue;
|
||||
|
||||
if( DISPLAY->IsWindowed() )
|
||||
CString sMessage = ssprintf( "The theme metric '%s-%s' is missing. Correct this and click Retry, or Cancel to break.",sClassName.c_str(),sValueName.c_str() );
|
||||
switch( HOOKS->MessageBoxAbortRetryIgnore(sMessage) )
|
||||
{
|
||||
CString sMessage = ssprintf( "The theme metric '%s-%s' is missing. Correct this and click Retry, or Cancel to break.",sClassName.c_str(),sValueName.c_str() );
|
||||
switch( HOOKS->MessageBoxAbortRetryIgnore(sMessage) )
|
||||
{
|
||||
case ArchHooks::abort:
|
||||
break; // fall through
|
||||
case ArchHooks::retry:
|
||||
FlushDirCache();
|
||||
ReloadMetrics();
|
||||
goto try_metric_again;
|
||||
case ArchHooks::ignore:
|
||||
return "";
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
case ArchHooks::abort:
|
||||
break; // fall through
|
||||
case ArchHooks::retry:
|
||||
FlushDirCache();
|
||||
ReloadMetrics();
|
||||
goto try_metric_again;
|
||||
case ArchHooks::ignore:
|
||||
return "";
|
||||
default:
|
||||
ASSERT(0);
|
||||
}
|
||||
|
||||
RageException::Throw( "Theme metric '%s : %s' could not be found in '%s' or '%s'.",
|
||||
|
||||
Reference in New Issue
Block a user