Fix palette constant and a few comments

This commit is contained in:
Sha0den 2025-09-21 14:20:56 -04:00
parent 263da90d9f
commit 8ac8ad6aa9

View File

@ -79,11 +79,11 @@ FlushPalettesIfRequested::
FlushAllCGBPalettes::
; flush 8 BGP palettes
xor a
xor a ; start with BGP0 (wBackgroundPalettesCGB)
ld b, 8 palettes
call CopyCGBPalettes
; flush 8 OBP palettes
ld a, PAL_SIZE
ld a, NUM_BACKGROUND_PALETTES ; skip all background palettes and start with OBP0 (wObjectPalettesCGB)
ld b, 8 palettes
call CopyCGBPalettes
jr FlushPalettesIfRequested.done
@ -91,9 +91,9 @@ FlushAllCGBPalettes::
; copy b bytes of CGB palette data starting at
; (wBackgroundPalettesCGB + a palettes) into rBGPD or rOBPD.
CopyCGBPalettes::
add a
add a
add a
add a ; *2
add a ; *4
add a ; *8 (PAL_SIZE)
ld e, a
ld d, $0
ld hl, wBackgroundPalettesCGB