Handle the repositioning in the new map of a mocked player object after going through a map connection (#29)

This commit is contained in:
xCrystal
2024-01-05 20:57:35 +01:00
parent 67e20e454e
commit 98b04522e1
10 changed files with 336 additions and 8 deletions

View File

@ -27,6 +27,23 @@ endc
jp hl
ENDM
MACRO jumptable_bc
if STRIN("\2", "h") == 1
ldh a, [\2]
else
ld a, [\2]
endc
ld c, a
ld b, 0
ld hl, \1
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
ENDM
MACRO maskbits
; masks just enough bits to cover values 0 to \1 - 1
; \2 is an optional shift amount