mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
use PAL_COLOR_SIZE
This commit is contained in:
parent
ea480fa31e
commit
4d93741a54
@ -497,7 +497,7 @@ LoadHLPaletteIntoDE:
|
|||||||
push af
|
push af
|
||||||
ld a, BANK(wOBPals1)
|
ld a, BANK(wOBPals1)
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld c, PALETTE_SIZE
|
ld c, 1 palettes
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
@ -253,7 +253,7 @@ CopyPals:: ; d50
|
|||||||
|
|
||||||
; get pal color
|
; get pal color
|
||||||
ld a, b
|
ld a, b
|
||||||
and %11 ; color
|
maskbits 1 << PAL_COLOR_SIZE
|
||||||
; 2 bytes per color
|
; 2 bytes per color
|
||||||
add a
|
add a
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -271,8 +271,9 @@ CopyPals:: ; d50
|
|||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc hl
|
inc hl
|
||||||
; next pal color
|
; next pal color
|
||||||
|
rept PAL_COLOR_SIZE
|
||||||
srl b
|
srl b
|
||||||
srl b
|
endr
|
||||||
; source
|
; source
|
||||||
pop de
|
pop de
|
||||||
; done pal?
|
; done pal?
|
||||||
|
Loading…
Reference in New Issue
Block a user