diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas
index 530bf8e4c2ea873385be3eb3403a548122bfdd8f..f6653a3126574ff91eb115f2af3dda260595b8e1 100644 (file)
--- a/src/game/g_basic.pas
+++ b/src/game/g_basic.pas
implementation
uses
- Math, e_log, g_map, g_gfx, g_player, SysUtils, MAPDEF,
+ Math, geom, e_log, g_map, g_gfx, g_player, SysUtils, MAPDEF,
StrUtils, e_graphics, g_monsters, g_items, g_game;
function g_PatchLength(X1, Y1, X2, Y2: Integer): Word;
begin
if not gmon_dbg_los_enabled then begin result := false; exit; end; // always "wall hit"
- if ((b^.X > a^.X) and (d = D_LEFT)) or
- ((b^.X < a^.X) and (d = D_RIGHT)) then
+ if ((b^.X > a^.X) and (d = TDirection.D_LEFT)) or
+ ((b^.X < a^.X) and (d = TDirection.D_RIGHT)) then
begin
Result := False;
Exit;
end;}
function g_CollideLine(x1, y1, x2, y2, rX, rY: Integer; rWidth, rHeight: Word): Boolean;
+{
var
i: Integer;
dx, dy: Integer;
Xerr, Yerr: Integer;
incX, incY: Integer;
x, y, d: Integer;
+}
begin
+ result := lineAABBIntersects(x1, y1, x2, y2, rX, rY, rWidth, rHeight);
+{
Result := True;
Xerr := 0;
end;
Result := False;
+}
end;
function GetStr(var Str: string): string;