You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Clean up bugs commented in the source code (#912)
Co-authored-by: Rangi <remy.oukaour+rangi42@gmail.com>
This commit is contained in:
@@ -186,6 +186,7 @@ ClearVRAM::
|
||||
ClearWRAM::
|
||||
; Wipe swappable WRAM banks (1-7)
|
||||
; Assumes CGB or AGB
|
||||
; BUG: ClearWRAM only clears WRAM bank 1 (see docs/bugs_and_glitches.md)
|
||||
|
||||
ld a, 1
|
||||
.bank_loop
|
||||
@@ -198,7 +199,7 @@ ClearWRAM::
|
||||
pop af
|
||||
inc a
|
||||
cp 8
|
||||
jr nc, .bank_loop ; Should be jr c
|
||||
jr nc, .bank_loop
|
||||
ret
|
||||
|
||||
ClearsScratch::
|
||||
|
12
home/map.asm
12
home/map.asm
@@ -146,12 +146,10 @@ LoadMetatiles::
|
||||
ld e, l
|
||||
ld d, h
|
||||
; Set hl to the address of the current metatile data ([wTilesetBlocksAddress] + (a) tiles).
|
||||
; This is buggy; it wraps around past 128 blocks.
|
||||
; To fix, uncomment the line below.
|
||||
add a ; Comment or delete this line to fix the above bug.
|
||||
; 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
|
||||
@@ -584,18 +582,16 @@ ReadObjectEvents::
|
||||
call CopyMapObjectEvents
|
||||
|
||||
; get NUM_OBJECTS - [wCurMapObjectEventCount]
|
||||
; BUG: ReadObjectEvents overflows into wObjectMasks (see docs/bugs_and_glitches.md)
|
||||
ld a, [wCurMapObjectEventCount]
|
||||
ld c, a
|
||||
ld a, NUM_OBJECTS ; - 1
|
||||
ld a, NUM_OBJECTS
|
||||
sub c
|
||||
jr z, .skip
|
||||
; jr c, .skip
|
||||
|
||||
; could have done "inc hl" instead
|
||||
ld bc, 1
|
||||
add hl, bc
|
||||
; Fill the remaining sprite IDs and y coords with 0 and -1, respectively.
|
||||
; Bleeds into wObjectMasks due to a bug. Uncomment the above code to fix.
|
||||
ld bc, MAPOBJECT_LENGTH
|
||||
.loop
|
||||
ld [hl], 0
|
||||
|
Reference in New Issue
Block a user