diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index 9ad87f5584..c716eb5486 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -67,7 +67,7 @@ void Actor::Draw() // set the world matrix and calculate actor properties, the } - SCREEN->Translate( pos.x+0.5f, pos.y-0.5f, pos.z ); // offset so that pixels are aligned to texels + SCREEN->Translate( pos.x-0.5f, pos.y-0.5f, pos.z ); // offset so that pixels are aligned to texels SCREEN->Scale( scale.x, scale.y, 1 ); // super slow! diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 20267b9187..c62bac708a 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -15,8 +15,9 @@ //----------------------------------------------------------------------------- // UTIL globals //----------------------------------------------------------------------------- -const CString g_sLogFileName = "debug.log"; - +const CString g_sLogFileName = "log.txt"; +const CString g_sErrorFileName = "error.txt"; +FILE* g_fileLog = NULL; //----------------------------------------------------------------------------- // Name: randomf() @@ -67,12 +68,11 @@ void RageLogStart() { #if defined(DEBUG) | defined(_DEBUG) - // delete the old log and create a new one + // create a new log file, overwriting the old one DeleteFile( g_sLogFileName ); - FILE *fp = NULL; - fp = fopen( g_sLogFileName, "w" ); - fclose( fp ); + g_fileLog = fopen( g_sLogFileName, "w" ); + // let the OS close the file when the app exits SYSTEMTIME st; GetLocalTime( &st ); @@ -98,16 +98,7 @@ void RageLog( LPCTSTR fmt, ...) CString sBuff = vssprintf( fmt, va ); sBuff += "\n"; - FILE *fp = NULL; - - // open our logging file - fp = fopen( g_sLogFileName, "a" ); - if( fp==NULL ) - RageLog( ssprintf("Couldn't write to log %s", g_sLogFileName) ); - - fprintf(fp, sBuff); - - fclose(fp); + fprintf(g_fileLog, sBuff); } void RageLogHr( HRESULT hr, LPCTSTR fmt, ...) @@ -398,8 +389,6 @@ void SortCStringArray( CStringArray &arrayCStrings, BOOL bSortAcsending ) VOID DisplayErrorAndDie( CString sError ) { - // Something very bad happened. Display an error dialog, then exit right away. - /* //////////////////////// // get a stack trace @@ -418,19 +407,12 @@ VOID DisplayErrorAndDie( CString sError ) } sError += "\n\n" + fromClipboard; */ + + FILE* fp = fopen( g_sErrorFileName, "w" ); - RageLog( "" ); - RageLog( "// Fatal Error /////////////////////////////" ); - RageLog( sError ); - RageLog( "////////////////////////////////////////////" ); + fprintf( fp, sError ); + fclose( fp ); - - MessageBox( - NULL, // handle of owner window - sError, // text in message box - "Fatal Error", // address of title of message box - MB_OK | MB_ICONERROR // style of message box - ); exit(1); } diff --git a/stepmania/src/StepMania.dsw b/stepmania/src/StepMania.dsw index a387ec3711..edae4bc44c 100644 --- a/stepmania/src/StepMania.dsw +++ b/stepmania/src/StepMania.dsw @@ -27,6 +27,18 @@ Package=<4> ############################################################################### +Project: "smlauncher"=.\smlauncher\smlauncher.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + Project: "smpackage"=.\smpackage\smpackage.dsp - Package Owner=<4> Package=<5> diff --git a/stepmania/src/smpackage/smpackage.dsp b/stepmania/src/smpackage/smpackage.dsp index 269ae1eb63..2a0788dc53 100644 --- a/stepmania/src/smpackage/smpackage.dsp +++ b/stepmania/src/smpackage/smpackage.dsp @@ -85,9 +85,14 @@ LINK32=link.exe # Name "smpackage - Win32 Release" # Name "smpackage - Win32 Debug" -# Begin Group "Stepmania Package files" +# Begin Source File -# PROP Default_Filter "" +SOURCE=.\install.bmp +# End Source File +# Begin Source File + +SOURCE=.\manage.bmp +# End Source File # Begin Source File SOURCE=..\RageUtil.cpp @@ -98,6 +103,10 @@ SOURCE=..\RageUtil.h # End Source File # Begin Source File +SOURCE=.\ReadMe.txt +# End Source File +# Begin Source File + SOURCE=.\Resource.h # End Source File # Begin Source File @@ -114,6 +123,10 @@ SOURCE=.\res\smpackage.ico # End Source File # Begin Source File +SOURCE=.\smpackage.ICO +# End Source File +# Begin Source File + SOURCE=.\smpackage.rc # End Source File # Begin Source File @@ -145,23 +158,6 @@ SOURCE=.\StdAfx.cpp SOURCE=.\StdAfx.h # End Source File -# End Group -# Begin Source File - -SOURCE=.\install.bmp -# End Source File -# Begin Source File - -SOURCE=.\manage.bmp -# End Source File -# Begin Source File - -SOURCE=.\ReadMe.txt -# End Source File -# Begin Source File - -SOURCE=.\smpackage.ICO -# End Source File # Begin Source File SOURCE=.\res\StepMania.ICO