aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UHooks.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-26 12:03:20 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-03-26 12:03:20 +0000
commitbbf6784e26b5f94c87c9deedb75711948d937f46 (patch)
tree61c758183bf12ee20677e21912c69e572bf00bd5 /Game/Code/Classes/UHooks.pas
parent7968b0878c1c13f61dddbacb603e00997af38f63 (diff)
downloadusdx-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/UHooks.pas22
1 files changed, 12 insertions, 10 deletions
diff --git a/Game/Code/Classes/UHooks.pas b/Game/Code/Classes/UHooks.pas
index 8b33959d..9c9e7dca 100644
--- a/Game/Code/Classes/UHooks.pas
+++ b/Game/Code/Classes/UHooks.pas
@@ -66,7 +66,9 @@ var
HookManager: THookManager;
implementation
-uses UCore;
+uses
+ ULog,
+ UCore;
//------------
// Create - Creates Class and Set Standard Values
@@ -82,7 +84,7 @@ begin
SpaceinEvents := SpacetoAllocate;
{$IFDEF DEBUG}
- WriteLn('HookManager: Succesful Created.');
+ debugWriteLn('HookManager: Succesful Created.');
{$ENDIF}
end;
@@ -109,7 +111,7 @@ begin
end;
{$IFDEF DEBUG}
- WriteLn('HookManager: Found Space for Event at Handle: ''' + InttoStr(Result+1) + '');
+ debugWriteLn('HookManager: Found Space for Event at Handle: ''' + InttoStr(Result+1) + '');
{$ENDIF}
end
else
@@ -127,12 +129,12 @@ begin
Inc(Result);
{$IFDEF DEBUG}
- WriteLn('HookManager: Add Event succesful: ''' + EventName + '');
+ debugWriteLn('HookManager: Add Event succesful: ''' + EventName + '');
{$ENDIF}
end
{$IFDEF DEBUG}
else
- WriteLn('HookManager: Trying to ReAdd Event: ''' + EventName + '');
+ debugWriteLn('HookManager: Trying to ReAdd Event: ''' + EventName + '');
{$ENDIF}
end;
@@ -160,7 +162,7 @@ begin
end;
{$IFDEF DEBUG}
- WriteLn('HookManager: Removed Event succesful: ''' + Events[hEvent].Name + '');
+ debugWriteLn('HookManager: Removed Event succesful: ''' + Events[hEvent].Name + '');
{$ENDIF}
//Free the Event
@@ -170,7 +172,7 @@ begin
{$IFDEF DEBUG}
else
- WriteLn('HookManager: Try to Remove not Existing Event. Handle: ''' + InttoStr(hEvent) + '');
+ debugWriteLn('HookManager: Try to Remove not Existing Event. Handle: ''' + InttoStr(hEvent) + '');
{$ENDIF}
end;
@@ -239,7 +241,7 @@ begin
Events[EventIndex].LastSubscriber := Cur;
{$IFDEF DEBUG}
- WriteLn('HookManager: Add Subscriber to Event ''' + Events[EventIndex].Name + ''' succesful. Handle: ''' + InttoStr(Result) + ''' Owner: ' + InttoStr(Cur.Owner));
+ debugWriteLn('HookManager: Add Subscriber to Event ''' + Events[EventIndex].Name + ''' succesful. Handle: ''' + InttoStr(Result) + ''' Owner: ' + InttoStr(Cur.Owner));
{$ENDIF}
end;
end;
@@ -298,7 +300,7 @@ begin
FreeSubscriber(EventIndex, Last, Cur);
{$IFDEF DEBUG}
- WriteLn('HookManager: Del Subscriber from Event ''' + Events[EventIndex].Name + ''' succesful. Handle: ''' + InttoStr(hSubscriber) + '');
+ debugWriteLn('HookManager: Del Subscriber from Event ''' + Events[EventIndex].Name + ''' succesful. Handle: ''' + InttoStr(hSubscriber) + '');
{$ENDIF}
//Set Result and Break the Loop
@@ -353,7 +355,7 @@ begin
end;
{$IFDEF DEBUG}
- WriteLn('HookManager: Called Chain from Event ''' + Events[EventIndex].Name + ''' succesful. Result: ''' + InttoStr(Result) + '');
+ debugWriteLn('HookManager: Called Chain from Event ''' + Events[EventIndex].Name + ''' succesful. Result: ''' + InttoStr(Result) + '');
{$ENDIF}
end;