move IsWindowed check inside of ArchHooks_Win32

This commit is contained in:
Chris Danford
2003-11-15 06:08:13 +00:00
parent c8c4b5ec0b
commit c123681854
10 changed files with 54 additions and 54 deletions
-2
View File
@@ -802,7 +802,6 @@ void Actor::HandleCommand( const CStringArray &asTokens )
{ {
CString sError = ssprintf( "Actor::HandleCommand: Unrecognized command name '%s'.", sName.c_str() ); CString sError = ssprintf( "Actor::HandleCommand: Unrecognized command name '%s'.", sName.c_str() );
LOG->Warn( sError ); LOG->Warn( sError );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
} }
@@ -810,7 +809,6 @@ void Actor::HandleCommand( const CStringArray &asTokens )
{ {
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() ); 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 ); LOG->Warn( sError );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
} }
} }
-1
View File
@@ -133,7 +133,6 @@ 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.", 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 ); join(",",asTokens).c_str(), iMaxIndexAccessed+1, size );
LOG->Warn( sError ); LOG->Warn( sError );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
} }
-3
View File
@@ -472,7 +472,6 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
} }
else if( sFile == "" ) else if( sFile == "" )
{ {
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( ssprintf( HOOKS->MessageBoxOK( ssprintf(
"In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.c_str(), sLayer.c_str() ) ); "In the ini file for BGAnimation '%s', '%s' is missing a the line 'File='.", sAniDir.c_str(), sLayer.c_str() ) );
} }
@@ -486,7 +485,6 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
if(asElementPaths.size() == 0) 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()); 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 ); LOG->Warn( sError );
return; return;
@@ -497,7 +495,6 @@ void BGAnimationLayer::LoadFromIni( CString sAniDir, CString sLayer )
"There is more than one file that matches " "There is more than one file that matches "
"'%s/%s'. Please remove all but one of these matches.", "'%s/%s'. Please remove all but one of these matches.",
sAniDir.c_str(), sFile.c_str() ); sAniDir.c_str(), sFile.c_str() );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
LOG->Warn( sError ); LOG->Warn( sError );
} }
-1
View File
@@ -26,7 +26,6 @@ bool DifficultyIcon::Load( CString sPath )
Sprite::Load( sPath ); Sprite::Load( sPath );
int iStates = GetNumStates(); int iStates = GetNumStates();
if( iStates != 5 && iStates != 10 ) 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(); StopAnimating();
return true; return true;
+13 -1
View File
@@ -543,12 +543,24 @@ void NoteField::DrawPrimitives()
bool bIsAddition = (tn == TAP_ADDITION); bool bIsAddition = (tn == TAP_ADDITION);
bool bIsMine = (tn == TAP_MINE); bool bIsMine = (tn == TAP_MINE);
bool bIsAttack = (tn==TAP_ATTACK);
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) ); SearchForBeat( CurDisplay, NextDisplay, NoteRowToBeat(i) );
NoteDisplayCols *nd = CurDisplay->second; NoteDisplayCols *nd = CurDisplay->second;
nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels ); nd->display[c].DrawTap( c, NoteRowToBeat(i), bHoldNoteBeginsOnThisBeat, bIsAddition, bIsMine, bIsInSelectionRange ? fSelectedRangeGlow : m_fPercentFadeToFail, 1, m_fYReverseOffsetPixels );
} }
}
g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c); g_NoteFieldMode[m_PlayerNumber].EndDrawTrack(c);
} }
-1
View File
@@ -280,7 +280,6 @@ CString NoteSkinManager::GetPathTo( CString sDir, CString sFileName )
if( matches.size() > 1 ) if( matches.size() > 1 )
{ {
CString sError = "Multiple files match '"+sDir+sFileName+"'. Please remove all but one of these files."; CString sError = "Multiple files match '"+sDir+sFileName+"'. Please remove all but one of these files.";
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
} }
-1
View File
@@ -346,7 +346,6 @@ apply_color_key:
fBetterSourceWidth, fBetterSourceHeight, fBetterSourceWidth, fBetterSourceHeight,
fBetterFrameWidth, fBetterFrameHeight ); fBetterFrameWidth, fBetterFrameHeight );
LOG->Warn( sWarning ); LOG->Warn( sWarning );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sWarning, "FRAME_DIMENSIONS_WARNING" ); HOOKS->MessageBoxOK( sWarning, "FRAME_DIMENSIONS_WARNING" );
} }
} }
+5
View File
@@ -13,6 +13,11 @@
#include "RageException.h" #include "RageException.h"
#include "RageUtil.h" #include "RageUtil.h"
#include "RageLog.h" #include "RageLog.h"
#include "RageLog.h"
#if defined(WIN32) && defined(DEBUG)
#include "windows.h"
#endif
RageException::RageException( const char *fmt, ...) RageException::RageException( const char *fmt, ...)
{ {
-2
View File
@@ -248,7 +248,6 @@ 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() ); CString sError = ssprintf( "MatrixCommand: Unrecognized matrix command name '%s' in command string '%s'.", sName.c_str(), sCommandString.c_str() );
LOG->Warn( sError ); LOG->Warn( sError );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
continue; continue;
} }
@@ -258,7 +257,6 @@ 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() ); 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 ); LOG->Warn( sError );
if( DISPLAY->IsWindowed() )
HOOKS->MessageBoxOK( sError ); HOOKS->MessageBoxOK( sError );
continue; continue;
} }
+5 -11
View File
@@ -244,7 +244,6 @@ try_element_again:
"'%s/%s/%s'. Please remove all but one of these matches.", "'%s/%s/%s'. Please remove all but one of these matches.",
sThemeName.c_str(), sCategory.c_str(), sFileName.c_str() ); sThemeName.c_str(), sCategory.c_str(), sFileName.c_str() );
if( DISPLAY->IsWindowed() )
if( ArchHooks::retry == HOOKS->MessageBoxRetryCancel(message) ) if( ArchHooks::retry == HOOKS->MessageBoxRetryCancel(message) )
goto try_element_again; goto try_element_again;
@@ -292,7 +291,6 @@ try_element_again:
"Verify that this redirect is correct.", "Verify that this redirect is correct.",
sPath.c_str(), sNewFileName.c_str()); sPath.c_str(), sNewFileName.c_str());
if( DISPLAY->IsWindowed() )
if( ArchHooks::retry == HOOKS->MessageBoxAbortRetryIgnore(message) ) if( ArchHooks::retry == HOOKS->MessageBoxAbortRetryIgnore(message) )
goto try_element_again; goto try_element_again;
@@ -339,24 +337,23 @@ try_element_again:
CString sCategory = ELEMENT_CATEGORY_STRING[category]; CString sCategory = ELEMENT_CATEGORY_STRING[category];
#if defined(DEBUG) && defined(WIN32)
CString sMessage = "The theme element '" + sCategory + SLASH + sFileName +"' is missing."; 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(); FlushDirCache();
g_ThemePathCache[category].clear(); g_ThemePathCache[category].clear();
goto try_element_again; goto try_element_again;
case IDCANCEL: case ArchHooks::cancel:
RageException::Throw( "Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.", RageException::Throw( "Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.",
sCategory.c_str(), sCategory.c_str(),
sFileName.c_str(), sFileName.c_str(),
GetThemeDirFromName(m_sCurThemeName).c_str(), GetThemeDirFromName(m_sCurThemeName).c_str(),
GetThemeDirFromName(BASE_THEME_NAME).c_str() ); GetThemeDirFromName(BASE_THEME_NAME).c_str() );
break; break;
default:
ASSERT(0);
} }
#endif
LOG->Warn( LOG->Warn(
"Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.", "Theme element '%s" SLASH "%s' could not be found in '%s' or '%s'.",
@@ -424,8 +421,6 @@ try_metric_again:
if( m_pIniMetrics->GetValue(sClassName,sValueName,sValue) ) if( m_pIniMetrics->GetValue(sClassName,sValueName,sValue) )
return 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() ); 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) ) switch( HOOKS->MessageBoxAbortRetryIgnore(sMessage) )
{ {
@@ -440,7 +435,6 @@ try_metric_again:
default: default:
ASSERT(0); ASSERT(0);
} }
}
RageException::Throw( "Theme metric '%s : %s' could not be found in '%s' or '%s'.", RageException::Throw( "Theme metric '%s : %s' could not be found in '%s' or '%s'.",
sClassName.c_str(), sClassName.c_str(),