This commit is contained in:
@@ -186,7 +186,6 @@ 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
|
||||
@@ -199,7 +198,7 @@ ClearWRAM::
|
||||
pop af
|
||||
inc a
|
||||
cp 8
|
||||
jr nc, .bank_loop
|
||||
jr c, .bank_loop
|
||||
ret
|
||||
|
||||
ClearsScratch::
|
||||
|
18
home/map.asm
18
home/map.asm
@@ -146,13 +146,13 @@ 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
|
||||
@@ -581,13 +581,13 @@ ReadObjectEvents::
|
||||
ld a, [wCurMapObjectEventCount]
|
||||
call CopyMapObjectEvents
|
||||
|
||||
; get NUM_OBJECTS - [wCurMapObjectEventCount]
|
||||
; BUG: ReadObjectEvents overflows into wObjectMasks (see docs/bugs_and_glitches.md)
|
||||
; get NUM_OBJECTS - [wCurMapObjectEventCount] - 1
|
||||
ld a, [wCurMapObjectEventCount]
|
||||
ld c, a
|
||||
ld a, NUM_OBJECTS
|
||||
ld a, NUM_OBJECTS - 1
|
||||
sub c
|
||||
jr z, .skip
|
||||
jr c, .skip
|
||||
|
||||
; could have done "inc hl" instead
|
||||
ld bc, 1
|
||||
@@ -2203,8 +2203,8 @@ GetMapMusic::
|
||||
ld a, c
|
||||
cp MUSIC_MAHOGANY_MART
|
||||
jr z, .mahoganymart
|
||||
bit RADIO_TOWER_MUSIC_F, c
|
||||
jr nz, .radiotower
|
||||
cp MUSIC_RADIO_TOWER
|
||||
jr z, .radiotower
|
||||
farcall Function8b342
|
||||
ld e, c
|
||||
ld d, 0
|
||||
@@ -2221,11 +2221,7 @@ GetMapMusic::
|
||||
jr .done
|
||||
|
||||
.clearedradiotower
|
||||
; the rest of the byte
|
||||
ld a, c
|
||||
and RADIO_TOWER_MUSIC - 1
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld de, MUSIC_GOLDENROD_CITY
|
||||
jr .done
|
||||
|
||||
.mahoganymart
|
||||
|
Reference in New Issue
Block a user