ref: 36f8cd1477b8ebe0537e99abd3ba53471a2e16c4
parent: 73be62fad6007b1a84675153634aaf57676455ac
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sat Jul 4 12:16:29 EDT 2020
UPDATE_PARTY_MENU_BLK_PACKET -> SET_PAL_PARTY_MENU_HP_BARS, and introduce SET_PAL_DEFAULT
--- a/constants/palette_constants.asm
+++ b/constants/palette_constants.asm
@@ -22,7 +22,8 @@
const SET_PAL_GAME_FREAK_INTRO ; $0C
const SET_PAL_TRAINER_CARD ; $0D
-UPDATE_PARTY_MENU_BLK_PACKET EQU $fc
+SET_PAL_PARTY_MENU_HP_BARS EQU $fc
+SET_PAL_DEFAULT EQU $ff
; sgb palettes
const_def
--- a/engine/gfx/palettes.asm
+++ b/engine/gfx/palettes.asm
@@ -1,11 +1,11 @@
_RunPaletteCommand:
call GetPredefRegisters
ld a, b
- cp $ff
- jr nz, .next
- ld a, [wDefaultPaletteCommand] ; use default command if command ID is $ff
-.next
- cp UPDATE_PARTY_MENU_BLK_PACKET
+ cp SET_PAL_DEFAULT
+ jr nz, .not_default
+ ld a, [wDefaultPaletteCommand]
+.not_default
+ cp SET_PAL_PARTY_MENU_HP_BARS
jp z, UpdatePartyMenuBlkPacket
ld l, a
ld h, 0
--- a/engine/menus/party_menu.asm
+++ b/engine/menus/party_menu.asm
@@ -318,7 +318,7 @@
ld b, 0
add hl, bc
call GetHealthBarColor
- ld b, UPDATE_PARTY_MENU_BLK_PACKET
+ ld b, SET_PAL_PARTY_MENU_HP_BARS
call RunPaletteCommand
ld hl, wWhichPartyMenuHPBar
inc [hl]
--- a/home.asm
+++ b/home.asm
@@ -1654,7 +1654,7 @@
ret
RunDefaultPaletteCommand::
- ld b, $ff
+ ld b, SET_PAL_DEFAULT
RunPaletteCommand::
ld a, [wOnSGB]
and a