Stub to recieve /draw command
authorunc0rr
Wed, 08 Dec 2010 22:25:30 +0300
changeset 4490 f6840f7e2f60
parent 4489 c4ca9ced258b
child 4491 dbd332f86dac
Stub to recieve /draw command
hedgewars/hwengine.pas
hedgewars/uLandPainted.pas
--- a/hedgewars/hwengine.pas	Wed Dec 08 22:18:50 2010 +0300
+++ b/hedgewars/hwengine.pas	Wed Dec 08 22:25:30 2010 +0300
@@ -31,7 +31,7 @@
 
 uses SDLh, uMisc, uConsole, uGame, uConsts, uLand, uAmmos, uVisualGears, uGears, uStore, uWorld, uKeys, uSound,
      uScript, uTeams, uStats, uIO, uLocale, uChat, uAI, uAIMisc, uRandom, uLandTexture, uCollisions, uMobile,
-     sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers;
+     sysutils, uTypes, uVariables, uCommands, uUtils, uCaptions, uDebug, uCommandHandlers, uLandPainted;
 
 {$IFDEF HWLIBRARY}
 procedure initEverything(complete:boolean);
@@ -323,6 +323,8 @@
     uCommandHandlers.initModule;
 
     uLand.initModule;
+    uLandPainted.initModule;
+
     uIO.initModule;
 
     if complete then
--- a/hedgewars/uLandPainted.pas	Wed Dec 08 22:18:50 2010 +0300
+++ b/hedgewars/uLandPainted.pas	Wed Dec 08 22:25:30 2010 +0300
@@ -23,9 +23,10 @@
 interface
 
 procedure LoadFromFile(fileName: shortstring);
+procedure initModule;
 
 implementation
-uses uLandGraphics, uConsts, uUtils, SDLh;
+uses uLandGraphics, uConsts, uUtils, SDLh, uCommands;
 
 type PointRec = packed record
     X, Y: SmallInt;
@@ -123,4 +124,13 @@
     closeFile(f);
 end;
 
+procedure chDraw(var s: shortstring);
+begin
+end;
+
+procedure initModule;
+begin
+    RegisterVariable('draw', vtCommand, @chDraw, false);
+end;
+
 end.