summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-04 16:17:59 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-04 16:17:59 -0400
commita33e8713bd9ae2a4e517e434d25fc3c4a4819065 (patch)
treeb57f39dd0b824576e30032ea288639f10b205d27
parent2b13e868bee696d424db65ba29424897fa89c072 (diff)
SCGB_PARTY_MENU_HP_PALS -> SCGB_PARTY_MENU_HP_BARS, and SCGB_RAM -> SCGB_DEFAULT
-rw-r--r--constants/scgb_constants.asm4
-rw-r--r--engine/gfx/cgb_layouts.asm16
-rw-r--r--engine/gfx/color.asm4
-rw-r--r--engine/gfx/sgb_layouts.asm16
-rw-r--r--engine/pokemon/party_menu.asm2
-rw-r--r--home/tilemap.asm2
-rw-r--r--wram.asm2
7 files changed, 23 insertions, 23 deletions
diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm
index 80bfcfc2..c929a642 100644
--- a/constants/scgb_constants.asm
+++ b/constants/scgb_constants.asm
@@ -33,8 +33,8 @@
const SCGB_1E
const SCGB_POKEDEX_5X5
-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)
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index 3288e486..97180f7f 100644
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -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
@@ -110,7 +110,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:
ld hl, TilesetBGPalette palette 7
@@ -509,7 +509,7 @@ _CGB_Diploma:
_CGB_MapPals:
call LoadMapPals
ld a, SCGB_MAPPALS
- ld [wSGBPredef], a
+ ld [wDefaultSGBLayout], a
ret
_CGB_PartyMenu:
@@ -562,7 +562,7 @@ _CGB_GSTitleScreen:
ld bc, 2 palettes
call CopyBytes
ld a, SCGB_DIPLOMA
- ld [wSGBPredef], a
+ ld [wDefaultSGBLayout], a
call ApplyPals
ld a, $1
ldh [hCGBPalUpdate], a
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index 04f1aa71..bf6ac5a2 100644
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -114,7 +114,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]
@@ -568,7 +568,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]
diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm
index 8e86210f..93673068 100644
--- a/engine/gfx/sgb_layouts.asm
+++ b/engine/gfx/sgb_layouts.asm
@@ -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
@@ -131,7 +131,7 @@ LoadSGBLayout:
ld hl, wSGBPals
ld de, wSGBPals + PALPACKET_LENGTH
ld a, SCGB_BATTLE_COLORS
- ld [wSGBPredef], a
+ ld [wDefaultSGBLayout], a
ret
.SGB_MoveList:
@@ -324,7 +324,7 @@ endr
ld hl, PalPacket_GSTitleScreen
ld de, BlkPacket_GSTitleScreen
ld a, SCGB_DIPLOMA
- ld [wSGBPredef], a
+ ld [wDefaultSGBLayout], a
ret
.SGB_MagnetTrain:
@@ -356,7 +356,7 @@ endr
ld [hld], a
ld de, BlkPacket_9ee5
ld a, SCGB_MAPPALS
- ld [wSGBPredef], a
+ ld [wDefaultSGBLayout], a
ret
.SGB_Evolution:
diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm
index c899b5cb..9398ae5e 100644
--- a/engine/pokemon/party_menu.asm
+++ b/engine/pokemon/party_menu.asm
@@ -137,7 +137,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
diff --git a/home/tilemap.asm b/home/tilemap.asm
index 55b4c991..ddd32d9e 100644
--- a/home/tilemap.asm
+++ b/home/tilemap.asm
@@ -185,7 +185,7 @@ ClearPalettes::
ret
GetMemSGBLayout::
- ld b, SCGB_RAM
+ ld b, SCGB_DEFAULT
GetSGBLayout::
; load sgb packets unless dmg
diff --git a/wram.asm b/wram.asm
index ea05aa8a..33df0924 100644
--- a/wram.asm
+++ b/wram.asm
@@ -1079,7 +1079,7 @@ wBGMapPalBuffer:: ds 40
wBGMapBufferPtrs:: ds 40 ; 20 bg map addresses (16x8 tiles)
wBGMapBufferEnd::
-wSGBPredef:: db
+wDefaultSGBLayout:: db
wPlayerHPPal:: db
wEnemyHPPal:: db