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;
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;