DEADSOFTWARE

gl: fix mouse coords for holmes
[d2df-sdl.git] / src / game / renders / opengl / r_map.pas
index eb7321773680c186524226d53fe4553c0c88f757..c9a4d3370393095ea4e2f363027b357ea1c13b0e 100644 (file)
@@ -40,7 +40,7 @@ interface
 
   procedure r_Map_Update;
 
-  procedure r_Map_Draw (x, y, w, h, camx, camy: Integer; player: TPlayer);
+  procedure r_Map_Draw (x, y, w, h, camx, camy: Integer; player: TPlayer; out acx, acy: Integer);
 
 implementation
 
@@ -1125,6 +1125,7 @@ implementation
       glEnable(GL_BLEND);
       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
+      r_Draw_SetColor(255, 255, 255, 255);
       glBegin(GL_POINTS);
         for i := 0 to High(Particles) do
         begin
@@ -1137,6 +1138,7 @@ implementation
           end;
         end;
       glEnd;
+      r_Draw_SetColor(0, 0, 0, 255);
 
       glDisable(GL_BLEND);
     end;
@@ -1383,7 +1385,7 @@ implementation
     end;
   end;
 
-  procedure r_Map_Draw (x, y, w, h, camx, camy: Integer; player: TPlayer);
+  procedure r_Map_Draw (x, y, w, h, camx, camy: Integer; player: TPlayer; out acx, acy: Integer);
     var iter: TPanelGrid.Iter; p: PPanel; cx, cy, cw, ch, xx, yy, ww, hh, ml, mt, mr, mb, mcx, mcy: Integer; sx, sy, sw, sh: LongInt; l, t, r, b: Integer;
   begin
     r_Draw_GetRect(l, t, r, b);
@@ -1413,6 +1415,9 @@ implementation
         cy := 0;
     end;
 
+    acx := cx;
+    acy := cy;
+
     (* map bounds *)
     xx := cx;
     yy := cy;
@@ -1489,6 +1494,9 @@ implementation
     r_Map_DrawPanelType(PANEL_FORE);
     // TODO draw monsters health bar
     // TODO draw players health bar
+
+    r_Draw_SetRect(x, y, x + w, y + h);
+
     if gGameSettings.GameMode <> GM_SINGLE then
       r_Map_DrawPlayerIndicators(player, cx, cy, cw, ch);
     if DebugCameraScale <> 1.0 then