DEADSOFTWARE

allow resources in non current directory (warning: res downloader are broken)
[d2df-sdl.git] / src / game / g_holmes.pas
index 83b74acc2ba7c6d00f9cbee483d13832f3adf8b1..a2a55ad87bb0664ec651338a1b396a0994b7b77d 100644 (file)
@@ -2,8 +2,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -48,12 +47,8 @@ var
 implementation
 
 uses
-{$IFDEF USE_NANOGL}
-  nanoGL,
-{$ELSE}
-  GL,
-{$ENDIF}
-  {rttiobj,} typinfo, e_texture,
+  {$INCLUDE ../nogl/noGLuses.inc}
+  {rttiobj,} typinfo, e_texture, e_res,
   SysUtils, Classes, SDL2,
   MAPDEF, g_main, g_options,
   utils, hashtable, xparser;
@@ -1254,6 +1249,8 @@ var
   mx, my, mw, mh: Integer;
   //pan: TPanel;
   //ex, ey: Integer;
+  s: AnsiString;
+  dx, dy: Integer;
 begin
   if (gPlayer1 = nil) then exit;
 
@@ -1328,10 +1325,19 @@ begin
 
   if showMapCurPos then
   begin
+    s := Format('mappos:(%d,%d)', [pmsCurMapX, pmsCurMapY]);
     gxSetContext(hlmContext);
     hlmContext.font := 'win8';
+    hlmContext.color := TGxRGBA.Create(0, 0, 0);
+    for dy := -1 to 1 do
+    begin
+      for dx := -1 to 1 do
+      begin
+        if (dx <> 0) or (dy <> 0) then hlmContext.drawText(4+dx, gWinSizeY-10+dy, s);
+      end;
+    end;
     hlmContext.color := TGxRGBA.Create(255, 255, 0);
-    hlmContext.drawText(4, gWinSizeY-10, Format('mappos:(%d,%d)', [pmsCurMapX, pmsCurMapY]));
+    hlmContext.drawText(4, gWinSizeY-10, s);
     gxSetContext(nil);
   end;
 end;
@@ -1734,7 +1740,7 @@ begin
 
     // load bindings from file
     try
-      st := openDiskFileRO(GameDir+'holmes.rc');
+      st := e_OpenResourceRO(ConfigDirs, 'holmes.rc');
       pr := TFileTextParser.Create(st);
       conwriteln('parsing "holmes.rc"...');
       while (pr.tokType <> pr.TTEOF) do