Added a missing header

SGP_DEBUG is now exclusively for outputting huge amounts of debug info, made consistent in DEBUG.cpp
Fix for slow bullets and other anims

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1099 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-22 19:33:36 +00:00
parent 4b42b95a8c
commit ec8efcadea
3 changed files with 17 additions and 8 deletions
+1
View File
@@ -32,6 +32,7 @@
#include "Multi Language Graphic Utils.h"
#include "Encrypted File.h"
#include "ja2 splash.h"
#include "GameVersion.h"
#endif
#define MAINMENU_TEXT_FILE "LoadScreens\\MainMenu.edt"
+14 -6
View File
@@ -16,7 +16,7 @@
// Because we're in a library, define SGP_DEBUG here - the client may not always
// use the code to write text, because the header switches on the define
#define SGP_DEBUG
//#define SGP_DEBUG
//#undef _DEBUG
// WDS: Note: To compile with VS2005 in release mode you might have to not define SGP_DEBUG and
@@ -487,9 +487,16 @@ void _DebugMessage(UINT8 *pString, UINT32 uiLineNum, UINT8 *pSourceFile)
}
#endif
}
#else
BOOLEAN DbgInitialize(void) { return true; };
void DbgShutdown(void) {};
#endif
#if defined ( _DEBUG ) || defined ( FORCE_ASSERTS_ON )
//////////////////////////////////////////////////////////////////////
// This func is used by Assert()
void _Null(void)
@@ -504,7 +511,7 @@ void _FailMessage( STR8 pString, UINT32 uiLineNum, STR8 pSourceFile )
CHAR8 ubOutputString[512];
#ifndef _NO_DEBUG_TXT
MSG Message;
FILE *DebugFile;
// FILE *DebugFile;
#endif
BOOLEAN fDone = FALSE;
//Build the output strings
@@ -520,6 +527,7 @@ void _FailMessage( STR8 pString, UINT32 uiLineNum, STR8 pSourceFile )
//Record to file if required
#ifndef _NO_DEBUG_TXT
#if 0
if (gfRecordToFile)
{
if ((DebugFile = fopen( gpcDebugLogFileName, "a+t" )) != NULL)
@@ -528,7 +536,10 @@ void _FailMessage( STR8 pString, UINT32 uiLineNum, STR8 pSourceFile )
fclose( DebugFile );
}
}
#endif
// 0verhaul: Replacement for the above. More consistent.
DbgMessage( TOPIC_GAME, DBG_LEVEL_1, ubOutputString);
#if 0
if( !FontObjs[0] )
{ //Font manager hasn't yet been initialized so use the windows error system
@@ -613,9 +624,6 @@ void _FailMessage(STR8 pString, UINT32 uiLineNum, STR8 pSourceFile)
#endif
#else
BOOLEAN DbgInitialize(void) { return true; };
void DbgShutdown(void) {};
#endif
// This is NOT a _DEBUG only function! It is also needed in
+2 -2
View File
@@ -848,8 +848,8 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR p
FastDebugMsg("Running Game");
// 0verhaul: Roughly 60 frames per second. The original "low cpu" code did 30, but that is really slow
SetTimer( ghWindow, uiTimer, 16, NULL);
// 0verhaul: Use the smallest available timer to make sure all animation updates happen at the speed they're supposed to
SetTimer( ghWindow, uiTimer, 1, NULL);
// At this point the SGP is set up, which means all I/O, Memory, tools, etc... are available. All we need to do is
// attend to the gaming mechanics themselves