summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 615316a)
raw | patch | inline | side by side (parent: 615316a)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 29 Dec 2022 18:58:16 +0000 (21:58 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:10:19 +0000 (12:10 +0300) |
src/game/renders/opengl/r_map.pas | patch | blob | history | |
src/game/renders/opengl/r_render.pas | patch | blob | history |
index 86a69a11b85903f4cd83c81dee9eccef81d6c28a..c9a4d3370393095ea4e2f363027b357ea1c13b0e 100644 (file)
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
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);
cy := 0;
end;
+ acx := cx;
+ acy := cy;
+
(* map bounds *)
xx := cx;
yy := cy;
index 9fa586aee5beb8782268231b0d02be8bc1996352..5a15b28869ec57ca5f3e30b1e18ed8fa19cb4e97 100644 (file)
end;
procedure r_Render_DrawView (x, y, w, h: Integer; p: TPlayer);
- var l, t, r, b, xx, yy: Integer;
+ var l, t, r, b, xx, yy, cx, cy: Integer;
begin
r_Draw_GetRect(l, t, r, b);
r_Draw_SetRect(x, y, x + w, y + h);
r_Common_GetCameraPos(p, true, xx, yy);
if p <> nil then
begin
+ r_Map_Draw(x, y, w, h, xx, yy, p, cx, cy);
{$IFDEF ENABLE_HOLMES}
if p = gPlayer1 then
begin
- r_Holmes_plrViewPos(x, y);
- r_Holmes_plrViewSize(w, h);
+ r_Holmes_plrViewPos(cx, cy);
+ r_Holmes_plrViewSize(h, w);
end;
{$ENDIF}
- r_Map_Draw(x, y, w, h, xx, yy, p);
r_Render_DrawStatsView(x, y, w, h, p);
if p.Spectator and p.NoRespawn then
r_Common_DrawText(_lc[I_PLAYER_SPECT4], x div 2 + w div 2, y div 2 + h div 2, 255, 255, 255, 255, stdfont, TBasePoint.BP_CENTER);
end
else
begin
- r_Map_Draw(x, y, w, h, xx, yy, nil);
+ r_Map_Draw(x, y, w, h, xx, yy, nil, cx, cy);
end;
r_Draw_SetRect(l, t, r, b);
end;
procedure r_Render_DrawMapView (x, y, w, h, camx, camy: Integer);
- var l, t, r, b: Integer;
+ var l, t, r, b, cx, cy: Integer;
begin
r_Draw_GetRect(l, t, r, b);
r_Draw_SetRect(x, y, x + w, y + h);
- r_Map_Draw(x, y, w, h, camx, camy, nil);
+ r_Map_Draw(x, y, w, h, camx, camy, nil, cx, cy);
r_Draw_SetRect(l, t, r, b);
end;