X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Frenders%2Fopengl%2Fr_map.pas;h=3ef4979ad1fadf181c8879a2cb7106b445fb863f;hb=06d69487e8ed454d11cfad4e9675a9b4374b3fb6;hp=d33433860f5f24f12268f9996eda4e884fc53e99;hpb=0d5485ed1bc589919ffbe4d38513ebe6344eddc1;p=d2df-sdl.git diff --git a/src/game/renders/opengl/r_map.pas b/src/game/renders/opengl/r_map.pas index d334338..3ef4979 100644 --- a/src/game/renders/opengl/r_map.pas +++ b/src/game/renders/opengl/r_map.pas @@ -802,7 +802,7 @@ implementation tex.width, tex.height, d = TDirection.D_LEFT, - 255, 255, 255, 255, false + 255, 255, 255, alpha, false ); end; end; @@ -1165,7 +1165,19 @@ implementation ww := w; hh := h; - // TODO lock camera at map bounds + if g_dbg_ignore_bounds = false then + begin + if xx + ww > gMapInfo.Width then + xx := gMapInfo.Width - ww; + if yy + hh > gMapInfo.Height then + yy := gMapInfo.Height - hh; + if xx < 0 then + xx := 0; + if yy < 0 then + yy := 0; + cx := xx - x; + cy := yy - y; + end; // TODO draw paralax if SkyTexture <> nil then