X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_map.pas;h=86a69a11b85903f4cd83c81dee9eccef81d6c28a;hb=007ba24a2c0e0c07941679f415561c3cdf43cef2;hp=6b54fa3a4273f1fd738451366082640d45f38eee;hpb=414c86aa09181c7af8f9eb84aae0d12eb862db3c;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index 6b54fa3..86a69a1 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -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; @@ -1398,13 +1400,18 @@ implementation (* camera bounds *) if g_dbg_ignore_bounds = false then begin - if cx + cw > gMapInfo.Width then - cx := gMapInfo.Width - cw; - if cy + ch > gMapInfo.Height then - cy := gMapInfo.Height - ch; - if cx < 0 then + if w > gMapInfo.Width then + cx := gMapInfo.Width div 2 - w div 2 + else if cx + cw > gMapInfo.Width then + cx := gMapInfo.Width - cw + else if cx < 0 then cx := 0; - if cy < 0 then + + if h > gMapInfo.Height then + cy := gMapInfo.Height div 2 - h div 2 + else if cy + ch > gMapInfo.Height then + cy := gMapInfo.Height - ch + else if cy < 0 then cy := 0; end; @@ -1484,6 +1491,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