From 0d92175e04766f8fd76e6307aca98b5ae71b720b Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Sat, 5 Jul 2025 09:17:49 +0200 Subject: [PATCH] exits: fixed exit table pointer lookup --- maps/default_map.s | 6 +++--- src/exittables.s | 2 +- src/player.s | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/maps/default_map.s b/maps/default_map.s index 7016845..d650c8a 100644 --- a/maps/default_map.s +++ b/maps/default_map.s @@ -19,8 +19,8 @@ default_map_bg: .db 0xf, 0x60, 0x1, 0x60, 0xf, 0x60, 0x1, 0x60 .db 0xf, 0x60, 0x1, 0x60, 0x2, 0x60, 0x4, 0x44 .db 0x8, 0x60, 0x1, 0x6e, 0x1, 0x60, 0x7, 0x60 -.db 0x3, 0x62, 0x4, 0x60, 0x1, 0x6e, 0x1, 0x60 -.db 0x7, 0x60, 0x3, 0x62, 0x5, 0x60, 0x1, 0x60 +.db 0x3, 0x62, 0x4, 0x60, 0x1, 0x6e, 0x1, 0x6e +.db 0x7, 0x60, 0x3, 0x62, 0x5, 0x60, 0x1, 0x6e .db 0x7, 0x60, 0x3, 0x62, 0x5, 0x60, 0x1, 0x60 .db 0xf, 0x60, 0x1, 0x60, 0xf, 0x60, 0x1, 0x60 .db 0xf, 0x60, 0x1, 0x60, 0xf, 0x60, 0x1, 0x62 @@ -30,5 +30,5 @@ default_map_tile_flags: .db 0x27, 0x0, 0x4, 0x1, 0x48, 0x0, 0x4, 0x1 .db 0x8, 0x0, 0x1, 0x2, 0xf, 0x0, 0x1, 0x2 -.db 0x70, 0x0 +.db 0x1, 0x12, 0xf, 0x0, 0x1, 0x12, 0x5f, 0x0 .db 0x00 ; termiante data diff --git a/src/exittables.s b/src/exittables.s index ff0aec1..ce89138 100644 --- a/src/exittables.s +++ b/src/exittables.s @@ -1,3 +1,3 @@ default_map_exit_table: exit_def EXITF_GOTOXY_REL, BTNRIGHT, 0, -15, default_map_header -exit_def 0, 0, 0, 0, default_map_header +exit_def EXITF_GOTOXY_REL, BTNLEFT, 0, 15, default_map_header diff --git a/src/player.s b/src/player.s index 7c44bd0..9381b0f 100644 --- a/src/player.s +++ b/src/player.s @@ -82,7 +82,7 @@ unit_check_exit_hit: @calculate_ptr: add hl, de dec a - jr z, @calculate_ptr REL + jr nz, @calculate_ptr REL @done_calculate_ptr: ; hl == the exit table entry -- 2.30.2