diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 19:57:35 -0500 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2018-01-22 19:57:35 -0500 |
commit | 14ef9d3066ddf48f392b8afb698d85f0a7583f6f (patch) | |
tree | 538154be8b70d72332d43af772cf55220d92e675 | |
parent | a73c532738d055bb3d28a46b59f7fc87d2c998d4 (diff) |
PALETTE_SIZE
-rw-r--r-- | constants/gfx_constants.asm | 1 | ||||
-rw-r--r-- | engine/color.asm | 2 | ||||
-rw-r--r-- | home/palettes.asm | 2 | ||||
-rw-r--r-- | macros/gfx.asm | 6 |
4 files changed, 6 insertions, 5 deletions
diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index bfa2140e7..584a62cda 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -4,6 +4,7 @@ LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes NUM_PAL_COLORS EQU 4 PAL_COLOR_SIZE EQU 2 +PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE PALRGB_WHITE EQUS "palred 31 + palgreen 31 + palblue 31" ; $7fff diff --git a/engine/color.asm b/engine/color.asm index b9c0419f8..35a17f868 100644 --- a/engine/color.asm +++ b/engine/color.asm @@ -497,7 +497,7 @@ LoadHLPaletteIntoDE: push af ld a, BANK(wOBPals1) ld [rSVBK], a - ld c, $8 + ld c, PALETTE_SIZE .loop ld a, [hli] ld [de], a diff --git a/home/palettes.asm b/home/palettes.asm index e47b73e99..8dafb23e7 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -280,7 +280,7 @@ CopyPals:: ; d50 jr nz, .loop ; de += 8 (next pal) - ld a, NUM_PAL_COLORS * PAL_COLOR_SIZE + ld a, PALETTE_SIZE add e jr nc, .ok inc d diff --git a/macros/gfx.asm b/macros/gfx.asm index d9b1c46b0..ff07ba468 100644 --- a/macros/gfx.asm +++ b/macros/gfx.asm @@ -11,9 +11,9 @@ palred EQUS "(1 << 0) *" palgreen EQUS "(1 << 5) *" palblue EQUS "(1 << 10) *" -palettes EQUS "* 8" -palette EQUS "+ 8 *" -color EQUS "+ 2 *" +palettes EQUS "* PALETTE_SIZE" +palette EQUS "+ PALETTE_SIZE *" +color EQUS "+ PAL_COLOR_SIZE *" tiles EQUS "* LEN_2BPP_TILE" tile EQUS "+ LEN_2BPP_TILE *" |