SCGB_PARTY_MENU_HP_PALS -> SCGB_PARTY_MENU_HP_BARS, and SCGB_RAM -> SCGB_DEFAULT

This commit is contained in:
Rangi 2020-07-04 16:18:16 -04:00
parent 26d764de5d
commit f5ac9b0eb7
8 changed files with 25 additions and 25 deletions

View File

@ -32,8 +32,8 @@
const SCGB_MYSTERY_GIFT
const SCGB_1E
SCGB_PARTY_MENU_HP_PALS EQU -4
SCGB_RAM EQU -1
SCGB_PARTY_MENU_HP_BARS EQU $fc
SCGB_DEFAULT EQU $ff
; PredefPals indexes (see gfx/sgb/predef.pal)
; GetPredefPal arguments (see engine/gfx/color.asm)

View File

@ -7,11 +7,11 @@ CheckCGB:
LoadSGBLayoutCGB:
ld a, b
cp SCGB_RAM
jr nz, .not_ram
ld a, [wSGBPredef]
.not_ram
cp SCGB_PARTY_MENU_HP_PALS
cp SCGB_DEFAULT
jr nz, .not_default
ld a, [wDefaultSGBLayout]
.not_default
cp SCGB_PARTY_MENU_HP_BARS
jp z, CGB_ApplyPartyMenuHPPals
call ResetBGPals
ld l, a
@ -109,7 +109,7 @@ _CGB_BattleColors:
pop hl
call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_PLAYER
ld a, SCGB_BATTLE_COLORS
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
call ApplyPals
_CGB_FinishBattleScreenLayout:
call InitPartyMenuBGPal7
@ -531,7 +531,7 @@ _CGB_Diploma:
_CGB_MapPals:
call LoadMapPals
ld a, SCGB_MAPPALS
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
ret
_CGB_PartyMenu:
@ -589,7 +589,7 @@ _CGB_GSTitleScreen:
ld a, BANK(wOBPals1)
call FarCopyWRAM
ld a, SCGB_DIPLOMA
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
call ApplyPals
ld a, $1
ldh [hCGBPalUpdate], a

View File

@ -106,7 +106,7 @@ InitPartyMenuPalettes:
call WipeAttrmap
ret
; SGB layout for SCGB_PARTY_MENU_HP_PALS
; SGB layout for SCGB_PARTY_MENU_HP_BARS
SGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]
@ -630,7 +630,7 @@ ApplyAttrmap:
ldh [rVBK], a
ret
; CGB layout for SCGB_PARTY_MENU_HP_PALS
; CGB layout for SCGB_PARTY_MENU_HP_BARS
CGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]

View File

@ -1,8 +1,8 @@
GetMysteryGift_MobileAdapterLayout:
ld a, b
cp SCGB_RAM
cp SCGB_DEFAULT
jr nz, .not_ram
ld a, [wSGBPredef]
ld a, [wDefaultSGBLayout]
.not_ram
push af
farcall ResetBGPals

View File

@ -3,11 +3,11 @@ LoadSGBLayout:
jp nz, LoadSGBLayoutCGB
ld a, b
cp SCGB_RAM
jr nz, .not_ram
ld a, [wSGBPredef]
.not_ram
cp SCGB_PARTY_MENU_HP_PALS
cp SCGB_DEFAULT
jr nz, .not_default
ld a, [wDefaultSGBLayout]
.not_default
cp SCGB_PARTY_MENU_HP_BARS
jp z, SGB_ApplyPartyMenuHPPals
ld l, a
ld h, 0
@ -130,7 +130,7 @@ LoadSGBLayout:
ld hl, wSGBPals
ld de, wSGBPals + PALPACKET_LENGTH
ld a, SCGB_BATTLE_COLORS
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
ret
.SGB_MoveList:
@ -318,7 +318,7 @@ endr
ld hl, PalPacket_GSTitleScreen
ld de, BlkPacket_GSTitleScreen
ld a, SCGB_DIPLOMA
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
ret
.SGB_MagnetTrain:
@ -350,7 +350,7 @@ endr
ld [hld], a
ld de, BlkPacket_9a86
ld a, SCGB_MAPPALS
ld [wSGBPredef], a
ld [wDefaultSGBLayout], a
ret
.SGB_Evolution:

View File

@ -138,7 +138,7 @@ PlacePartyHPBar:
ld b, $0
add hl, bc
call SetHPPal
ld b, SCGB_PARTY_MENU_HP_PALS
ld b, SCGB_PARTY_MENU_HP_BARS
call GetSGBLayout
.skip
ld hl, wSGBPals

View File

@ -202,7 +202,7 @@ ClearPalettes::
ret
GetMemSGBLayout::
ld b, SCGB_RAM
ld b, SCGB_DEFAULT
GetSGBLayout::
; load sgb packets unless dmg

View File

@ -1336,7 +1336,7 @@ wcd8c:: ds 1
wcd8d:: ds 11
ENDU
wSGBPredef:: db
wDefaultSGBLayout:: db
wPlayerHPPal:: db
wEnemyHPPal:: db