File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -79,21 +79,21 @@ FlushPalettesIfRequested::
7979
8080FlushAllCGBPalettes::
8181 ; flush 8 BGP palettes
82- xor a
82+ xor a ; start with BGP0 (wBackgroundPalettesCGB)
8383 ld b , 8 palettes
8484 call CopyCGBPalettes
8585 ; flush 8 OBP palettes
86- ld a , PAL_SIZE
86+ ld a , NUM_BACKGROUND_PALETTES ; skip all background palettes and start with OBP0 (wObjectPalettesCGB)
8787 ld b , 8 palettes
8888 call CopyCGBPalettes
8989 jr FlushPalettesIfRequested.done
9090
9191; copy b bytes of CGB palette data starting at
9292; (wBackgroundPalettesCGB + a palettes) into rBGPD or rOBPD.
9393CopyCGBPalettes::
94- add a
95- add a
96- add a
94+ add a ; *2
95+ add a ; *4
96+ add a ; *8 (PAL_SIZE)
9797 ld e , a
9898 ld d , $ 0
9999 ld hl , wBackgroundPalettesCGB
You can’t perform that action at this time.
0 commit comments