-
Notifications
You must be signed in to change notification settings - Fork 806
Colored trainer card badges
Rangi edited this page May 15, 2022
·
17 revisions
This one is a simple upgrade.
Create gfx/trainer_card/badges.pal:
+ RGB 31,31,31, 21,21,24, 13,13,16, 00,00,00 ; ZEPHYRBADGE
+ RGB 31,31,31, 31,12,12, 29,00,00, 00,00,00 ; HIVEBADGE
+ RGB 31,31,31, 29,29,29, 27,24,00, 00,00,00 ; PLAINBADGE
+ RGB 31,31,31, 23,22,26, 11,10,23, 00,00,00 ; FOGBADGE
+ RGB 31,31,31, 27,16,08, 12,07,04, 00,00,00 ; STORMBADGE
+ RGB 31,31,31, 23,26,29, 15,19,23, 00,00,00 ; MINERALBADGE
+ RGB 31,31,31, 19,27,30, 00,22,26, 00,00,00 ; GLACIERBADGE
+ RGB 31,31,31, 30,09,05, 05,05,06, 00,00,00 ; RISINGBADGE
Edit engine/gfx/cgb_layouts.asm:
_CGB_TrainerCard:
...
- ld a, PREDEFPAL_CGB_BADGE
- call GetPredefPal
- call LoadHLPaletteIntoDE
+ ld hl, .BadgePalettes
+ ld bc, 8 palettes
+ ld a, BANK(wOBPals1)
+ call FarCopyWRAM
...
ret
+
+.BadgePalettes:
+INCLUDE "gfx/trainer_card/badges.pal"
Edit engine/menus/trainer_card.asm:
TrainerCard_JohtoBadgesOAM:
; Template OAM data for each badge on the trainer card.
; Format:
; y, x, palette
; cycle 1: face tile, in1 tile, in2 tile, in3 tile
; cycle 2: face tile, in1 tile, in2 tile, in3 tile
dw wJohtoBadges
; Zephyrbadge
db $68, $18, 0
db $00, $20, $24, $20 | (1 << 7)
db $00, $20, $24, $20 | (1 << 7)
; Hivebadge
- db $68, $38, 0
+ db $68, $38, 1
...
; Plainbadge
- db $68, $58, 0
+ db $68, $58, 2
...
; Fogbadge
- db $68, $78, 0
+ db $68, $78, 3
...
; Mineralbadge
- db $80, $38, 0
+ db $80, $38, 5
...
; Stormbadge
- db $80, $18, 0
+ db $80, $18, 4
...
; Glacierbadge
- db $80, $58, 0
+ db $80, $58, 6
...
; Risingbadge
; X-flips on alternate cycles.
- db $80, $78, 0
+ db $80, $78, 7
...
Edit gfx/trainer_card/badges.png:
This changes the Hive Badge, Plain Badge, Fog Badge, and Rising Badge to look better with their new color palettes.
That's it!