From 46c841ae8ff130c2169efd2c684c175ebc7f261d Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Wed, 18 Jun 2025 14:22:07 +0200 Subject: [PATCH] map: fixed map_get_tile This function incorrectly added y-offsets for y=0. --- src/map.s | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map.s b/src/map.s index ea237a0..b768182 100644 --- a/src/map.s +++ b/src/map.s @@ -19,12 +19,17 @@ map_get_tile: ld hl, state_cells ld d, 0 ld e, MAP_W * c_size + + ld a, b + cp a, 0 + jr z, @skip_y REL ; calculate y offset @y_loop: add hl, de dec b jr nz, @y_loop REL +@skip_y: ; add x offset ld e, c -- 2.30.2