summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ee3fd1)
raw | patch | inline | side by side (parent: 5ee3fd1)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 20:59:03 +0000 (23:59 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 21:02:16 +0000 (00:02 +0300) |
src/game/g_gfx.pas | patch | blob | history |
diff --git a/src/game/g_gfx.pas b/src/game/g_gfx.pas
index fe494a8cd539128405cc5b12c4ef78a1ac65f496..4fcd318df451b0abdf0f4ab2177d3b71118aa281 100644 (file)
--- a/src/game/g_gfx.pas
+++ b/src/game/g_gfx.pas
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*)
{$INCLUDE ../shared/a_modes.inc}
-{.$DEFINE HAS_COLLIDE_BITMAP}
unit g_gfx;
interface
procedure g_GFX_Draw();
-{$IF DEFINED(HAS_COLLIDE_BITMAP)}
-var
- gCollideMap: Array of Array of Byte;
-{$ENDIF}
-
-
implementation
uses
OnceAnims := nil;
end;
-
- {$IF DEFINED(HAS_COLLIDE_BITMAP)}
- gCollideMap := nil;
- {$ENDIF}
end;
procedure CorrectOffsets(id: Integer);
-{$IF not DEFINED(HAS_COLLIDE_BITMAP)}
var
part: PParticle;
-{$ENDIF}
begin
-{$IF DEFINED(HAS_COLLIDE_BITMAP)}
- with Particles[id] do
- begin
- if (X >= 0) and (Y > 0) and
- (Y < Length(gCollideMap)) and (X < Length(gCollideMap[0])) and
- (ByteBool(gCollideMap[Y-1, X] and MARK_BLOCKED)) then
- offsetY := 1 // Ñòåíà ñâåðõó
- else
- offsetY := 0;
-
- if (X > 0) and (Y >= 0) and
- (Y < Length(gCollideMap)) and (X < Length(gCollideMap[0])) and
- (ByteBool(gCollideMap[Y, X-1] and MARK_BLOCKED)) then
- offsetX := 1 // Ñòåíà ñëåâà
- else
- offsetX := 0;
- end;
-{$ELSE}
part := @Particles[id];
part.offsetX := 0;
part.offsetY := 0;
if isBlockedAt(part.X, part.Y-1) then part.offsetY := 1;
// check for left wall
if isBlockedAt(part.X-1, part.Y) then part.offsetX := 1;
-{$ENDIF}
end;