Skip to content

Commit

Permalink
Fix LoadMetatiles bug with 128 blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lwelyk committed Jan 9, 2024
1 parent 74e8814 commit 0f6a3e7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions home/map.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,12 @@ LoadMetatiles::
ld e, l
ld d, h
; Set hl to the address of the current metatile data ([wTilesetBlocksAddress] + (a) tiles).
; BUG: LoadMetatiles wraps around past 128 blocks (see docs/bugs_and_glitches.md)
add a
ld l, a
ld h, 0
add hl, hl
add hl, hl
add hl, hl
add hl, hl
ld a, [wTilesetBlocksAddress]
add l
ld l, a
Expand Down

0 comments on commit 0f6a3e7

Please sign in to comment.