diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas
index 44a9db46fc7adcc63d9c3b734a55f55bbab9d275..4be9437ab278b002c609235a6865c85c3fadab02 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
procedure g_GFX_OnceAnim(X, Y: Integer; Anim: TAnimation; AnimType: Byte = 0);
-//procedure g_Mark(x, y, Width, Height: Integer; t: Byte; st: Boolean);
+procedure g_Mark(x, y, Width, Height: Integer; t: Byte; st: Boolean);
procedure g_GFX_Update();
procedure g_GFX_Draw();
+var
+ gpart_dbg_enabled: Boolean = true;
+ gpart_dbg_phys_enabled: Boolean = true;
+
+
implementation
uses
function isBlockedAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, (PANEL_WALL or PANEL_CLOSEDOOR or PANEL_STEP));
end;
-
// ???
function isWallAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, (PANEL_WALL or PANEL_STEP));
end;
-
function isLiftUpAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, PANEL_LIFTUP);
end;
function isLiftDownAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, PANEL_LIFTDOWN);
end;
function isLiftLeftAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, PANEL_LIFTLEFT);
end;
function isLiftRightAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, PANEL_LIFTRIGHT);
end;
-
function isLiquidAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, (PANEL_WATER or PANEL_ACID1 or PANEL_ACID2));
end;
-
function isAnythingAt (x, y: Integer): Boolean; inline;
begin
+ if not gpart_dbg_phys_enabled then begin result := false; exit; end;
result := g_Map_HasAnyPanelAtPoint(x, y, (PANEL_WALL or PANEL_CLOSEDOOR or PANEL_OPENDOOR or PANEL_WATER or PANEL_ACID1 or PANEL_ACID2 or PANEL_STEP or PANEL_LIFTUP or PANEL_LIFTDOWN or PANEL_LIFTLEFT or PANEL_LIFTRIGHT));
end;
-{$IF DEFINED(HAS_COLLIDE_BITMAP)}
procedure g_Mark(x, y, Width, Height: Integer; t: Byte; st: Boolean);
+{$IF not DEFINED(HAS_COLLIDE_BITMAP)}
+begin
+end;
+{$ELSE}
var
yy, y2, xx, x2: Integer;
begin
s: ShortInt;
//c: Byte;
begin
+ if not gpart_dbg_enabled then exit;
if Particles <> nil then
begin
w := gMapInfo.Width;