From: Lukas Krickl Date: Sat, 19 Oct 2024 05:09:58 +0000 (+0200) Subject: Fixed tile -> player collision by using the correct shift X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=e16b9a7446efb67f6e3c47e26b12f7dc2e077496;p=gbrg%2F.git Fixed tile -> player collision by using the correct shift instructions. For future reference sra did not do it because bit 7 might be set in normal gameplay we needed srl --- diff --git a/src/collision.s b/src/collision.s index 7afc985..63406bb 100644 --- a/src/collision.s +++ b/src/collision.s @@ -103,16 +103,16 @@ collision_tile_table_check: ; a = 1 -> collision collision_tile: ; y pos / 16 -> tile pos - sra d ; / 2 - sra d ; / 4 - sra d ; / 8 - sra d ; / 16 + srl d ; / 2 + srl d ; / 4 + srl d ; / 8 + srl d ; / 16 ; x pos / 16 -> tile pos - sra e ; / 2 - sra e ; / 4 - sra e ; / 8 - sra e ; / 16 + srl e ; / 2 + srl e ; / 4 + srl e ; / 8 + srl e ; / 16 ld a, e ; a = x pos ld e, d diff --git a/src/map.s b/src/map.s index 16a6146..5713f4b 100644 --- a/src/map.s +++ b/src/map.s @@ -164,4 +164,4 @@ base_room_flags: .db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 .db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 .db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -.db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +.db RF_WALL, RF_WALL, RF_WALL, RF_WALL, 0, 0, RF_WALL, RF_WALL, RF_WALL, RF_WALL