diff options
author | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-26 12:03:20 +0000 |
---|---|---|
committer | jaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2008-03-26 12:03:20 +0000 |
commit | bbf6784e26b5f94c87c9deedb75711948d937f46 (patch) | |
tree | 61c758183bf12ee20677e21912c69e572bf00bd5 /Game/Code/Classes/ULog.pas | |
parent | 7968b0878c1c13f61dddbacb603e00997af38f63 (diff) | |
download | usdx-bbf6784e26b5f94c87c9deedb75711948d937f46.tar.gz usdx-bbf6784e26b5f94c87c9deedb75711948d937f46.tar.xz usdx-bbf6784e26b5f94c87c9deedb75711948d937f46.zip |
added "-debug" flag at run time and "CONSOLE" Define in switches.inc
also the default is to run with no debug info sent to the console
git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@973 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/ULog.pas | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas index c30bf676..4e976ab4 100644 --- a/Game/Code/Classes/ULog.pas +++ b/Game/Code/Classes/ULog.pas @@ -53,6 +53,7 @@ type end;
procedure SafeWriteLn(const msg: string); {$IFDEF HasInline}inline;{$ENDIF}
+procedure debugWriteln( aString : String );
var
Log: TLog;
@@ -66,8 +67,8 @@ uses SysUtils,
DateUtils,
//UFiles,
- UMain,
URecord,
+ UMain,
UTime,
//UIni, // JB - Seems to not be needed.
{$IFDEF FPC}
@@ -136,10 +137,20 @@ begin SDL_CondSignal(ConsoleCond);
SDL_mutexV(ConsoleMutex);
{$ELSE}
- WriteLn(msg);
+ debugWriteln(msg);
{$ENDIF}
end;
+procedure debugWriteln( aString : String );
+begin + {$IFDEF CONSOLE}
+ if FindCmdLineSwitch( cDebug ) then
+ writeln( 'DEBUG - '+aString );
+ {$ENDIF}
+
+end; +
+
constructor TLog.Create;
begin
{$IFDEF FPC}
|