From 6965b6f46471ba194010184ab2eeb5cce7cfe986 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Tue, 8 Nov 2011 23:59:14 +0000 Subject: [PATCH] Fix tilemap offset. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1861 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/tiles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tiles.c b/src/tiles.c index 4f867c9f..9d8a55fa 100644 --- a/src/tiles.c +++ b/src/tiles.c @@ -144,8 +144,8 @@ void Tilemap_draw(word x, word y, byte color) return; tile = first_tile = TILE_FOR_COORDS(x,y); - rel_x = (x + Snap_offset_X + Snap_width) % Snap_width; - rel_y = (y + Snap_offset_Y + Snap_height) % Snap_height; + rel_x = (x - Snap_offset_X + Snap_width) % Snap_width; + rel_y = (y - Snap_offset_Y + Snap_height) % Snap_height; do { int xx,yy;