Improve use of palette macro and use PAL_* constants (#1087)

* Improve use of palette macro and use PAL_* constants

* Use proper constant for battle stats (#1088)

* Add suggestions about function names and variables

* Add colors macro

---------

Co-authored-by: vulcandth <vulcandth@gmail.com>
This commit is contained in:
Idain
2023-11-17 14:24:09 -04:00
committed by GitHub
parent 75f0ad3955
commit 2907d65a47
9 changed files with 40 additions and 39 deletions

View File

@@ -975,7 +975,7 @@ MobileTradeAnim_GiveTrademon1:
MobileTradeAnim_GiveTrademon2:
ld c, 40
ld hl, wBGPals2 + 1 palettes
ld hl, wBGPals2 palette 1
call Function1082f0
call Function108af4
call Function108b5a
@@ -1069,12 +1069,12 @@ MobileTradeAnim_GetTrademon1:
MobileTradeAnim_GetTrademon2:
ld c, 20
ld hl, wBGPals2 + 1 palettes
ld hl, wBGPals2 palette 1
call Function1082fa
ld de, SFX_GIVE_TRADEMON
call PlaySFX
ld c, 20
ld hl, wBGPals2 + 1 palettes
ld hl, wBGPals2 palette 1
call Function1082fa
call Function108af4
.asm_1088ad
@@ -1439,8 +1439,8 @@ Function108b5a:
ld a, $5
ldh [rSVBK], a
ld de, palred 18 + palgreen 31 + palblue 15
ld hl, wBGPals2 + 4 palettes
ld c, $10
ld hl, wBGPals2 palette 4
ld c, 2 palettes
.loop
ld a, e
ld [hli], a
@@ -1491,13 +1491,13 @@ Function108b98:
and $1
xor d
jr z, .asm_108bad
ld hl, Palette_108b98 + 1 palettes
ld hl, Palette_108b98 palette 1
jr .asm_108bb0
.asm_108bad
ld hl, Palette_108b98
.asm_108bb0
ld de, wBGPals1 + 7 palettes
ld de, wBGPals1 palette 7
ld bc, 8 palettes
call CopyBytes
pop af
@@ -1724,7 +1724,7 @@ LoadMobileAdapterPalette:
ld hl, MobileAdapterPalettes
call AddNTimes
ld a, BANK(wBGPals1)
ld de, wBGPals1 + 4 palettes
ld de, wBGPals1 palette 4
ld bc, 1 palettes
call FarCopyWRAM
ret