CHANGE: cleaned up debug messages
This commit is contained in:
@@ -34,7 +34,7 @@ BitmapText::BitmapText()
|
|||||||
|
|
||||||
bool BitmapText::Load( CString sFontFilePath )
|
bool BitmapText::Load( CString sFontFilePath )
|
||||||
{
|
{
|
||||||
RageLog( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
|
//RageLog( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
|
||||||
|
|
||||||
m_sFontFilePath = sFontFilePath; // save
|
m_sFontFilePath = sFontFilePath; // save
|
||||||
|
|
||||||
|
|||||||
@@ -492,8 +492,15 @@ void MusicWheel::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void MusicWheel::PrevMusic()
|
void MusicWheel::PrevMusic()
|
||||||
{
|
{
|
||||||
if( m_WheelState != STATE_IDLE )
|
switch( m_WheelState )
|
||||||
return;
|
{
|
||||||
|
//case STATE_SWITCHING_TO_PREV_MUSIC:
|
||||||
|
|
||||||
|
case STATE_IDLE:
|
||||||
|
break; // fall through
|
||||||
|
default:
|
||||||
|
return; // don't fall through
|
||||||
|
}
|
||||||
|
|
||||||
MUSIC->Stop();
|
MUSIC->Stop();
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ LPRageTexture RageTextureManager::LoadTexture( CString sTexturePath )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RageLog( ssprintf("Didn't find '%s' already loaded. Creating a new texture.", sTexturePath) );
|
RageLog( ssprintf("RageTextureManager: allocating space for '%s'.", sTexturePath) );
|
||||||
|
|
||||||
CString sDrive, sDir, sFName, sExt;
|
CString sDrive, sDir, sFName, sExt;
|
||||||
splitpath( FALSE, sTexturePath, sDrive, sDir, sFName, sExt );
|
splitpath( FALSE, sTexturePath, sDrive, sDir, sFName, sExt );
|
||||||
@@ -105,7 +105,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
|
|||||||
|
|
||||||
if( sTexturePath == "" )
|
if( sTexturePath == "" )
|
||||||
{
|
{
|
||||||
RageLog( "RageTextureManager::UnloadTexture() tried to Unload a blank" );
|
RageLog( "RageTextureManager::UnloadTexture(): tried to Unload a blank" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
|
|||||||
pTexture->m_iRefCount--;
|
pTexture->m_iRefCount--;
|
||||||
if( pTexture->m_iRefCount == 0 ) // there are no more references to this texture
|
if( pTexture->m_iRefCount == 0 ) // there are no more references to this texture
|
||||||
{
|
{
|
||||||
RageLog( ssprintf("The texture '%s' has no more references. It will be deleted.", sTexturePath) );
|
RageLog( ssprintf("RageTextureManager: deallocating '%s'.", sTexturePath) );
|
||||||
SAFE_DELETE( pTexture ); // free the texture
|
SAFE_DELETE( pTexture ); // free the texture
|
||||||
m_mapPathToTexture.RemoveKey( sTexturePath ); // and remove the key in the map
|
m_mapPathToTexture.RemoveKey( sTexturePath ); // and remove the key in the map
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ void RageLogStart()
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void RageLog( LPCTSTR fmt, ...)
|
void RageLog( LPCTSTR fmt, ...)
|
||||||
{
|
{
|
||||||
|
|
||||||
#if defined(DEBUG) | defined(_DEBUG)
|
|
||||||
va_list va;
|
va_list va;
|
||||||
va_start(va, fmt);
|
va_start(va, fmt);
|
||||||
|
|
||||||
@@ -110,8 +108,15 @@ void RageLog( LPCTSTR fmt, ...)
|
|||||||
fprintf(fp, sBuff);
|
fprintf(fp, sBuff);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
|
void RageLogHr( HRESULT hr, LPCTSTR fmt, ...)
|
||||||
|
{
|
||||||
|
va_list va;
|
||||||
|
va_start(va, fmt);
|
||||||
|
CString s = vssprintf( fmt, va );
|
||||||
|
s += ssprintf( "(%s)", DXGetErrorString8(hr) );
|
||||||
|
RageLog( s );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -364,7 +369,7 @@ DWORD GetFileSizeInBytes( CString sFilePath )
|
|||||||
|
|
||||||
bool DoesFileExist( CString sPath )
|
bool DoesFileExist( CString sPath )
|
||||||
{
|
{
|
||||||
RageLog( "DoesFileExist(%s)", sPath );
|
//RageLog( "DoesFileExist(%s)", sPath );
|
||||||
|
|
||||||
DWORD dwAttr = GetFileAttributes( sPath );
|
DWORD dwAttr = GetFileAttributes( sPath );
|
||||||
if( dwAttr == (DWORD)-1 )
|
if( dwAttr == (DWORD)-1 )
|
||||||
|
|||||||
@@ -11,6 +11,11 @@
|
|||||||
#ifndef _RAGEUTIL_H_
|
#ifndef _RAGEUTIL_H_
|
||||||
#define _RAGEUTIL_H_
|
#define _RAGEUTIL_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include "dxerr8.h"
|
||||||
|
#pragma comment(lib, "DxErr8.lib")
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// SAFE_ Macros
|
// SAFE_ Macros
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -98,14 +103,11 @@ void SortCStringArray( CStringArray &AddTo, BOOL bSortAcsending = TRUE );
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void RageLogStart();
|
void RageLogStart();
|
||||||
void RageLog( LPCTSTR fmt, ...);
|
void RageLog( LPCTSTR fmt, ...);
|
||||||
|
void RageLogHr( HRESULT hr, LPCTSTR fmt, ...);
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Error helpers
|
// Error helpers
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
#include "dxerr8.h"
|
|
||||||
#pragma comment(lib, "DxErr8.lib")
|
|
||||||
|
|
||||||
|
|
||||||
VOID DisplayErrorAndDie( CString sError );
|
VOID DisplayErrorAndDie( CString sError );
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,16 +12,16 @@
|
|||||||
#define _SCREENDIMENSIONS_H_
|
#define _SCREENDIMENSIONS_H_
|
||||||
|
|
||||||
|
|
||||||
const int SCREEN_WIDTH = 640;
|
const int SCREEN_WIDTH = 640;
|
||||||
const int SCREEN_HEIGHT = 480;
|
const int SCREEN_HEIGHT = 480;
|
||||||
|
|
||||||
const float LEFT_EDGE = 0;
|
const float SCREEN_LEFT = 0;
|
||||||
const float RIGHT_EDGE = SCREEN_WIDTH;
|
const float SCREEN_RIGHT = SCREEN_WIDTH;
|
||||||
const float TOP_EDGE = 0;
|
const float SCREEN_TOP = 0;
|
||||||
const float BOTTOM_EDGE = SCREEN_HEIGHT;
|
const float SCREEN_BOTTOM = SCREEN_HEIGHT;
|
||||||
|
|
||||||
const float CENTER_X = LEFT_EDGE + (RIGHT_EDGE - LEFT_EDGE)/2.0f;
|
const float CENTER_X = SCREEN_LEFT + (SCREEN_RIGHT - SCREEN_LEFT)/2.0f;
|
||||||
const float CENTER_Y = TOP_EDGE + (BOTTOM_EDGE - TOP_EDGE)/2.0f;
|
const float CENTER_Y = SCREEN_TOP + (SCREEN_BOTTOM - SCREEN_TOP)/2.0f;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -211,8 +211,6 @@ bool Song::LoadSongInfoFromBMSDir( CString sDir )
|
|||||||
// get group name
|
// get group name
|
||||||
CStringArray sDirectoryParts;
|
CStringArray sDirectoryParts;
|
||||||
split( m_sSongDir, "\\", sDirectoryParts, true );
|
split( m_sSongDir, "\\", sDirectoryParts, true );
|
||||||
for( int p=0; p<sDirectoryParts.GetSize(); p++ )
|
|
||||||
RageLog( "sDirectoryParts[p] = '%s'", sDirectoryParts[p] );
|
|
||||||
m_sGroupName = sDirectoryParts[1];
|
m_sGroupName = sDirectoryParts[1];
|
||||||
|
|
||||||
|
|
||||||
@@ -369,8 +367,6 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath )
|
|||||||
// get group name
|
// get group name
|
||||||
CStringArray sDirectoryParts;
|
CStringArray sDirectoryParts;
|
||||||
split( m_sSongDir, "\\", sDirectoryParts, true );
|
split( m_sSongDir, "\\", sDirectoryParts, true );
|
||||||
for( int p=0; p<sDirectoryParts.GetSize(); p++ )
|
|
||||||
RageLog( "sDirectoryParts[p] = '%s'", sDirectoryParts[p] );
|
|
||||||
m_sGroupName = sDirectoryParts[1];
|
m_sGroupName = sDirectoryParts[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ CString ThemeManager::GetPathTo( ThemeElement te, CString sThemeName )
|
|||||||
case GRAPHIC_SECTION_BACKGROUND: sAssetPath = "Graphics\\section background"; break;
|
case GRAPHIC_SECTION_BACKGROUND: sAssetPath = "Graphics\\section background"; break;
|
||||||
case GRAPHIC_MUSIC_SORT_ICONS: sAssetPath = "Graphics\\music sort icons 1x5"; break;
|
case GRAPHIC_MUSIC_SORT_ICONS: sAssetPath = "Graphics\\music sort icons 1x5"; break;
|
||||||
case GRAPHIC_MUSIC_STATUS_ICONS: sAssetPath = "Graphics\\music status icons 1x4"; break;
|
case GRAPHIC_MUSIC_STATUS_ICONS: sAssetPath = "Graphics\\music status icons 1x4"; break;
|
||||||
|
case GRAPHIC_DANGER: sAssetPath = "Graphics\\danger"; break;
|
||||||
|
case GRAPHIC_DANGER_BACKGROUND: sAssetPath = "Graphics\\danger background"; break;
|
||||||
|
|
||||||
case SOUND_FAILED: sAssetPath = "Sounds\\failed"; break;
|
case SOUND_FAILED: sAssetPath = "Sounds\\failed"; break;
|
||||||
case SOUND_ASSIST: sAssetPath = "Sounds\\Assist"; break;
|
case SOUND_ASSIST: sAssetPath = "Sounds\\Assist"; break;
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ enum ThemeElement {
|
|||||||
GRAPHIC_SECTION_BACKGROUND,
|
GRAPHIC_SECTION_BACKGROUND,
|
||||||
GRAPHIC_MUSIC_SORT_ICONS,
|
GRAPHIC_MUSIC_SORT_ICONS,
|
||||||
GRAPHIC_MUSIC_STATUS_ICONS,
|
GRAPHIC_MUSIC_STATUS_ICONS,
|
||||||
|
GRAPHIC_DANGER,
|
||||||
|
GRAPHIC_DANGER_BACKGROUND,
|
||||||
|
|
||||||
SOUND_FAILED,
|
SOUND_FAILED,
|
||||||
SOUND_ASSIST,
|
SOUND_ASSIST,
|
||||||
@@ -129,7 +131,17 @@ public:
|
|||||||
|
|
||||||
void GetThemeNames( CStringArray& AddTo )
|
void GetThemeNames( CStringArray& AddTo )
|
||||||
{
|
{
|
||||||
GetDirListing( "Themes\\*.*", AddTo, true );
|
GetDirListing( "Themes\\*", AddTo, true );
|
||||||
|
|
||||||
|
// strip out the folder called "CVS"
|
||||||
|
for( int i=0; i<AddTo.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
if( 0 == stricmp( AddTo[i], "cvs" ) )
|
||||||
|
{
|
||||||
|
AddTo.RemoveAt(i);
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
bool SetTheme( CString sThemeName ) // return false if theme doesn't exist
|
bool SetTheme( CString sThemeName ) // return false if theme doesn't exist
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
#define IDI_ICON 1003
|
#define IDI_ICON 1003
|
||||||
#define IDC_CURSOR 1004
|
#define IDC_CURSOR 1004
|
||||||
#define IDM_EXIT 40003
|
#define IDM_EXIT 40003
|
||||||
#define IDM_WINDOWED 40008
|
|
||||||
#define IDM_PADS 40011
|
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user