CHANGE: cleaned up debug messages

This commit is contained in:
Chris Danford
2002-01-20 07:51:09 +00:00
parent d2d2e6ac08
commit 40df826636
10 changed files with 51 additions and 29 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ BitmapText::BitmapText()
bool BitmapText::Load( CString sFontFilePath )
{
RageLog( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
//RageLog( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
m_sFontFilePath = sFontFilePath; // save
+9 -2
View File
@@ -492,8 +492,15 @@ void MusicWheel::Update( float fDeltaTime )
void MusicWheel::PrevMusic()
{
if( m_WheelState != STATE_IDLE )
return;
switch( m_WheelState )
{
//case STATE_SWITCHING_TO_PREV_MUSIC:
case STATE_IDLE:
break; // fall through
default:
return; // don't fall through
}
MUSIC->Stop();
+3 -3
View File
@@ -71,7 +71,7 @@ LPRageTexture RageTextureManager::LoadTexture( CString sTexturePath )
}
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;
splitpath( FALSE, sTexturePath, sDrive, sDir, sFName, sExt );
@@ -105,7 +105,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
if( sTexturePath == "" )
{
RageLog( "RageTextureManager::UnloadTexture() tried to Unload a blank" );
RageLog( "RageTextureManager::UnloadTexture(): tried to Unload a blank" );
return;
}
@@ -120,7 +120,7 @@ void RageTextureManager::UnloadTexture( CString sTexturePath )
pTexture->m_iRefCount--;
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
m_mapPathToTexture.RemoveKey( sTexturePath ); // and remove the key in the map
}
+9 -4
View File
@@ -92,8 +92,6 @@ void RageLogStart()
//-----------------------------------------------------------------------------
void RageLog( LPCTSTR fmt, ...)
{
#if defined(DEBUG) | defined(_DEBUG)
va_list va;
va_start(va, fmt);
@@ -110,8 +108,15 @@ void RageLog( LPCTSTR fmt, ...)
fprintf(fp, sBuff);
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 )
{
RageLog( "DoesFileExist(%s)", sPath );
//RageLog( "DoesFileExist(%s)", sPath );
DWORD dwAttr = GetFileAttributes( sPath );
if( dwAttr == (DWORD)-1 )
+6 -4
View File
@@ -11,6 +11,11 @@
#ifndef _RAGEUTIL_H_
#define _RAGEUTIL_H_
#include "dxerr8.h"
#pragma comment(lib, "DxErr8.lib")
//-----------------------------------------------------------------------------
// SAFE_ Macros
//-----------------------------------------------------------------------------
@@ -98,14 +103,11 @@ void SortCStringArray( CStringArray &AddTo, BOOL bSortAcsending = TRUE );
//-----------------------------------------------------------------------------
void RageLogStart();
void RageLog( LPCTSTR fmt, ...);
void RageLogHr( HRESULT hr, LPCTSTR fmt, ...);
//-----------------------------------------------------------------------------
// Error helpers
//-----------------------------------------------------------------------------
#include "dxerr8.h"
#pragma comment(lib, "DxErr8.lib")
VOID DisplayErrorAndDie( CString sError );
+8 -8
View File
@@ -12,16 +12,16 @@
#define _SCREENDIMENSIONS_H_
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const float LEFT_EDGE = 0;
const float RIGHT_EDGE = SCREEN_WIDTH;
const float TOP_EDGE = 0;
const float BOTTOM_EDGE = SCREEN_HEIGHT;
const float SCREEN_LEFT = 0;
const float SCREEN_RIGHT = SCREEN_WIDTH;
const float SCREEN_TOP = 0;
const float SCREEN_BOTTOM = SCREEN_HEIGHT;
const float CENTER_X = LEFT_EDGE + (RIGHT_EDGE - LEFT_EDGE)/2.0f;
const float CENTER_Y = TOP_EDGE + (BOTTOM_EDGE - TOP_EDGE)/2.0f;
const float CENTER_X = SCREEN_LEFT + (SCREEN_RIGHT - SCREEN_LEFT)/2.0f;
const float CENTER_Y = SCREEN_TOP + (SCREEN_BOTTOM - SCREEN_TOP)/2.0f;
#endif
-4
View File
@@ -211,8 +211,6 @@ bool Song::LoadSongInfoFromBMSDir( CString sDir )
// get group name
CStringArray sDirectoryParts;
split( m_sSongDir, "\\", sDirectoryParts, true );
for( int p=0; p<sDirectoryParts.GetSize(); p++ )
RageLog( "sDirectoryParts[p] = '%s'", sDirectoryParts[p] );
m_sGroupName = sDirectoryParts[1];
@@ -369,8 +367,6 @@ bool Song::LoadSongInfoFromDWIFile( CString sPath )
// get group name
CStringArray sDirectoryParts;
split( m_sSongDir, "\\", sDirectoryParts, true );
for( int p=0; p<sDirectoryParts.GetSize(); p++ )
RageLog( "sDirectoryParts[p] = '%s'", sDirectoryParts[p] );
m_sGroupName = sDirectoryParts[1];
}
+2
View File
@@ -70,6 +70,8 @@ CString ThemeManager::GetPathTo( ThemeElement te, CString sThemeName )
case GRAPHIC_SECTION_BACKGROUND: sAssetPath = "Graphics\\section background"; 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_DANGER: sAssetPath = "Graphics\\danger"; break;
case GRAPHIC_DANGER_BACKGROUND: sAssetPath = "Graphics\\danger background"; break;
case SOUND_FAILED: sAssetPath = "Sounds\\failed"; break;
case SOUND_ASSIST: sAssetPath = "Sounds\\Assist"; break;
+13 -1
View File
@@ -60,6 +60,8 @@ enum ThemeElement {
GRAPHIC_SECTION_BACKGROUND,
GRAPHIC_MUSIC_SORT_ICONS,
GRAPHIC_MUSIC_STATUS_ICONS,
GRAPHIC_DANGER,
GRAPHIC_DANGER_BACKGROUND,
SOUND_FAILED,
SOUND_ASSIST,
@@ -129,7 +131,17 @@ public:
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
-2
View File
@@ -7,8 +7,6 @@
#define IDI_ICON 1003
#define IDC_CURSOR 1004
#define IDM_EXIT 40003
#define IDM_WINDOWED 40008
#define IDM_PADS 40011
// Next default values for new objects
//