Skip to content

Commit

Permalink
Rename pikachu palette packets
Browse files Browse the repository at this point in the history
  • Loading branch information
dannye committed Nov 22, 2023
1 parent 1ad7a6c commit 0ebc202
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 92 deletions.
110 changes: 56 additions & 54 deletions constants/palette_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,67 @@ DEF NUM_ACTIVE_PALS EQU 4
; pal/blk packets
; SetPalFunctions indexes (see engine/gfx/palettes.asm)
const_def
const SET_PAL_BATTLE_BLACK ; $00
const SET_PAL_BATTLE ; $01
const SET_PAL_TOWN_MAP ; $02
const SET_PAL_STATUS_SCREEN ; $03
const SET_PAL_POKEDEX ; $04
const SET_PAL_SLOTS ; $05
const SET_PAL_TITLE_SCREEN ; $06
const SET_PAL_NIDORINO_INTRO ; $07
const SET_PAL_GENERIC ; $08
const SET_PAL_OVERWORLD ; $09
const SET_PAL_PARTY_MENU ; $0A
const SET_PAL_POKEMON_WHOLE_SCREEN ; $0B
const SET_PAL_GAME_FREAK_INTRO ; $0C
const SET_PAL_TRAINER_CARD ; $0D
const SET_PAL_BATTLE_BLACK ; $00
const SET_PAL_BATTLE ; $01
const SET_PAL_TOWN_MAP ; $02
const SET_PAL_STATUS_SCREEN ; $03
const SET_PAL_POKEDEX ; $04
const SET_PAL_SLOTS ; $05
const SET_PAL_TITLE_SCREEN ; $06
const SET_PAL_NIDORINO_INTRO ; $07
const SET_PAL_GENERIC ; $08
const SET_PAL_OVERWORLD ; $09
const SET_PAL_PARTY_MENU ; $0A
const SET_PAL_POKEMON_WHOLE_SCREEN ; $0B
const SET_PAL_GAME_FREAK_INTRO ; $0C
const SET_PAL_TRAINER_CARD ; $0D
const SET_PAL_SURFING_PIKACHU_TITLE ; $0E
const SET_PAL_SURFING_PIKACHU_MINIGAME ; $0F

DEF SET_PAL_PARTY_MENU_HP_BARS EQU $fc
DEF SET_PAL_DEFAULT EQU $ff

; sgb palettes
; SuperPalettes indexes (see data/sgb/sgb_palettes.asm)
const_def
const PAL_ROUTE ; $00
const PAL_PALLET ; $01
const PAL_VIRIDIAN ; $02
const PAL_PEWTER ; $03
const PAL_CERULEAN ; $04
const PAL_LAVENDER ; $05
const PAL_VERMILION ; $06
const PAL_CELADON ; $07
const PAL_FUCHSIA ; $08
const PAL_CINNABAR ; $09
const PAL_INDIGO ; $0A
const PAL_SAFFRON ; $0B
const PAL_TOWNMAP ; $0C
const PAL_LOGO1 ; $0D
const PAL_LOGO2 ; $0E
const PAL_0F ; $0F
const PAL_MEWMON ; $10
const PAL_BLUEMON ; $11
const PAL_REDMON ; $12
const PAL_CYANMON ; $13
const PAL_PURPLEMON ; $14
const PAL_BROWNMON ; $15
const PAL_GREENMON ; $16
const PAL_PINKMON ; $17
const PAL_YELLOWMON ; $18
const PAL_GREYMON ; $19
const PAL_SLOTS1 ; $1A
const PAL_SLOTS2 ; $1B
const PAL_SLOTS3 ; $1C
const PAL_SLOTS4 ; $1D
const PAL_BLACK ; $1E
const PAL_GREENBAR ; $1F
const PAL_YELLOWBAR ; $20
const PAL_REDBAR ; $21
const PAL_BADGE ; $22
const PAL_CAVE ; $23
const PAL_GAMEFREAK ; $24
const PAL_25 ; $25
const PAL_26 ; $26
const PAL_27 ; $27
const PAL_ROUTE ; $00
const PAL_PALLET ; $01
const PAL_VIRIDIAN ; $02
const PAL_PEWTER ; $03
const PAL_CERULEAN ; $04
const PAL_LAVENDER ; $05
const PAL_VERMILION ; $06
const PAL_CELADON ; $07
const PAL_FUCHSIA ; $08
const PAL_CINNABAR ; $09
const PAL_INDIGO ; $0A
const PAL_SAFFRON ; $0B
const PAL_TOWNMAP ; $0C
const PAL_LOGO1 ; $0D
const PAL_LOGO2 ; $0E
const PAL_0F ; $0F
const PAL_MEWMON ; $10
const PAL_BLUEMON ; $11
const PAL_REDMON ; $12
const PAL_CYANMON ; $13
const PAL_PURPLEMON ; $14
const PAL_BROWNMON ; $15
const PAL_GREENMON ; $16
const PAL_PINKMON ; $17
const PAL_YELLOWMON ; $18
const PAL_GREYMON ; $19
const PAL_SLOTS1 ; $1A
const PAL_SLOTS2 ; $1B
const PAL_SLOTS3 ; $1C
const PAL_SLOTS4 ; $1D
const PAL_BLACK ; $1E
const PAL_GREENBAR ; $1F
const PAL_YELLOWBAR ; $20
const PAL_REDBAR ; $21
const PAL_BADGE ; $22
const PAL_CAVE ; $23
const PAL_GAMEFREAK ; $24
const PAL_PIKACHUS_BEACH ; $25
const PAL_PIKACHU_PORTRAIT ; $26
const PAL_PIKACHUS_BEACH_TITLE ; $27
DEF NUM_SGB_PALS EQU const_value
26 changes: 13 additions & 13 deletions data/sgb/sgb_packets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ UnknownPacket_72751:
ds 8


PalPacket_Empty: PAL_SET 0, 0, 0, 0
PalPacket_PartyMenu: PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR
PalPacket_Black: PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK
PalPacket_TownMap: PAL_SET PAL_TOWNMAP, 0, 0, 0
PalPacket_Pokedex: PAL_SET PAL_BROWNMON, 0, 0, 0
PalPacket_Slots: PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4
PalPacket_Titlescreen: PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON
PalPacket_TrainerCard: PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
PalPacket_Generic: PAL_SET PAL_MEWMON, 0, 0, 0
PalPacket_NidorinoIntro: PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0
PalPacket_GameFreakIntro: PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON
UnknownPalPacket_72811: PAL_SET PAL_25, PAL_25, PAL_25, PAL_25
UnknownPalPacket_72821: PAL_SET PAL_25, PAL_27, PAL_25, PAL_25
PalPacket_Empty: PAL_SET 0, 0, 0, 0
PalPacket_PartyMenu: PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR
PalPacket_Black: PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK
PalPacket_TownMap: PAL_SET PAL_TOWNMAP, 0, 0, 0
PalPacket_Pokedex: PAL_SET PAL_BROWNMON, 0, 0, 0
PalPacket_Slots: PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4
PalPacket_Titlescreen: PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON
PalPacket_TrainerCard: PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
PalPacket_Generic: PAL_SET PAL_MEWMON, 0, 0, 0
PalPacket_NidorinoIntro: PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0
PalPacket_GameFreakIntro: PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON
PalPacket_PikachusBeach: PAL_SET PAL_PIKACHUS_BEACH, PAL_PIKACHUS_BEACH, PAL_PIKACHUS_BEACH, PAL_PIKACHUS_BEACH
PalPacket_PikachusBeachTitle: PAL_SET PAL_PIKACHUS_BEACH, PAL_PIKACHUS_BEACH_TITLE, PAL_PIKACHUS_BEACH, PAL_PIKACHUS_BEACH

PalTrnPacket: PAL_TRN
MltReq1Packet: MLT_REQ 1
Expand Down
12 changes: 6 additions & 6 deletions data/sgb/sgb_palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ SuperPalettes:
RGB 31,31,30, 20,15,11, 22,21,20, 06,06,06 ; PAL_BADGE
RGB 31,31,30, 20,15,11, 22,21,20, 06,06,06 ; PAL_CAVE
RGB 31,31,30, 28,24,14, 20,20,11, 06,06,06 ; PAL_GAMEFREAK
RGB 31,31,30, 31,30,22, 23,27,31, 06,06,06 ; PAL_25
RGB 31,31,30, 28,23,09, 18,14,10, 06,06,06 ; PAL_26
RGB 31,31,30, 16,16,16, 31,25,09, 06,06,06 ; PAL_27
RGB 31,31,30, 31,30,22, 23,27,31, 06,06,06 ; PAL_PIKACHUS_BEACH
RGB 31,31,30, 28,23,09, 18,14,10, 06,06,06 ; PAL_PIKACHU_PORTRAIT
RGB 31,31,30, 16,16,16, 31,25,09, 06,06,06 ; PAL_PIKACHUS_BEACH_TITLE
assert_table_length NUM_SGB_PALS

GBCBasePalettes:
Expand Down Expand Up @@ -83,7 +83,7 @@ GBCBasePalettes:
RGB 31,31,31, 23,08,00, 17,14,11, 03,03,03 ; PAL_BADGE
RGB 31,31,31, 23,08,00, 17,14,11, 03,03,03 ; PAL_CAVE
RGB 31,31,31, 31,19,00, 19,19,00, 03,03,03 ; PAL_GAMEFREAK
RGB 31,31,31, 31,31,00, 11,23,31, 03,03,03 ; PAL_25
RGB 31,31,31, 31,18,00, 19,07,01, 03,03,03 ; PAL_26
RGB 31,31,31, 09,09,09, 31,21,00, 03,03,03 ; PAL_27
RGB 31,31,31, 31,31,00, 11,23,31, 03,03,03 ; PAL_PIKACHUS_BEACH
RGB 31,31,31, 31,18,00, 19,07,01, 03,03,03 ; PAL_PIKACHU_PORTRAIT
RGB 31,31,31, 09,09,09, 31,21,00, 03,03,03 ; PAL_PIKACHUS_BEACH_TITLE
assert_table_length NUM_SGB_PALS
2 changes: 1 addition & 1 deletion data/text/text_2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ _NoMovesLeftText::
_MultiHitText::
text "Hit the enemy"
line "@"
text_decimal wPlayerNumHits,1,1
text_decimal wPlayerNumHits, 1, 1
text " times!"
prompt

Expand Down
16 changes: 8 additions & 8 deletions engine/gfx/palettes.asm
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ SetPal_TrainerCard:
ld de, wTrainerCardBlkPacket
ret

SendUnknownPalPacket_7205d::
ld hl, UnknownPalPacket_72811
SetPal_PikachusBeach::
ld hl, PalPacket_PikachusBeach
ld de, BlkPacket_WholeScreen
ret

SendUnknownPalPacket_72064::
ld hl, UnknownPalPacket_72821
SetPal_PikachusBeachTitle::
ld hl, PalPacket_PikachusBeachTitle
ld de, UnknownPacket_72751
ret

Expand All @@ -279,8 +279,8 @@ SetPalFunctions:
dw SetPal_PokemonWholeScreen
dw SetPal_GameFreakIntro
dw SetPal_TrainerCard
dw SendUnknownPalPacket_7205d
dw SendUnknownPalPacket_72064
dw SetPal_PikachusBeach
dw SetPal_PikachusBeachTitle

; The length of the blk data of each badge on the Trainer Card.
; The Rainbow Badge has 3 entries because of its many colors.
Expand Down Expand Up @@ -323,7 +323,7 @@ YellowIntroPaletteAction::
jp InitGBCPalettes

.asm_720bd
ld hl, UnknownPalPacket_72811
ld hl, PalPacket_PikachusBeach
ldh a, [hGBC]
and a
jp z, SendSGBPacket
Expand Down Expand Up @@ -351,7 +351,7 @@ LoadOverworldPikachuFrontpicPalettes::
ld hl, wPartyMenuBlkPacket
ld [hl], a
ld hl, wPartyMenuBlkPacket + 2
ld a, $26
ld a, PAL_PIKACHU_PORTRAIT
ld [hl], a
ld hl, wPalPacket
ldh a, [hGBC]
Expand Down
8 changes: 4 additions & 4 deletions engine/link/cable_club.asm
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ CableClub_DoBattleOrTradeAgain:
ld [wCurOpponent], a
call ClearScreen
call Delay3
ld b, $9
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
ld hl, wOptions
res 7, [hl]
Expand Down Expand Up @@ -316,7 +316,7 @@ CallCurrentTradeCenterFunction:
TradeCenter_SelectMon:
call ClearScreen
call Delay3
ld b, $9
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
call LoadTrainerInfoTextBoxTiles
call TradeCenter_DrawPartyLists
Expand Down Expand Up @@ -633,7 +633,7 @@ TradeCenter_DisplayStats:
predef StatusScreen
predef StatusScreen2
call Delay3
ld b, $9
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
call GBPalNormal
call LoadTrainerInfoTextBoxTiles
Expand Down Expand Up @@ -859,7 +859,7 @@ TradeCenter_Trade:
ld c, 40
call DelayFrames
call Delay3
ld b, $9
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
hlcoord 0, 12
lb bc, 4, 18
Expand Down
4 changes: 2 additions & 2 deletions engine/minigame/surfing_pikachu.asm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ SurfingPikachuMinigame::
SurfingPikachuLoop:
call SurfingPikachuMinigame_LoadGFXAndLayout
call DelayFrame
ld b, $e
ld b, SET_PAL_SURFING_PIKACHU_TITLE
call RunPaletteCommand
.loop
ld a, [wSurfingMinigameRoutineNumber]
Expand Down Expand Up @@ -2362,7 +2362,7 @@ SurfingPikachuMinigameIntro:
ldh [hSCY], a
ld a, $90
ldh [hWY], a
ld b, $f
ld b, SET_PAL_SURFING_PIKACHU_MINIGAME
call RunPaletteCommand
ld a, $e3
ldh [rLCDC], a
Expand Down
2 changes: 1 addition & 1 deletion engine/movie/intro_yellow.asm
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ InitYellowIntroGFXAndMusic:
call CopyVideoData
call ClearObjectAnimationBuffers
call LoadYellowIntroObjectAnimationDataPointers
ld b, $8
ld b, SET_PAL_GENERIC
call RunPaletteCommand
xor a
ld hl, wYellowIntroCurrentScene
Expand Down
2 changes: 1 addition & 1 deletion engine/printer/printer.asm
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ Printer_PrepareSurfingMinigameHighScoreTileMap::
add hl, bc
call PlaceString
call CopySurfingMinigameScore
ld b, 8
ld b, SET_PAL_GENERIC
call RunPaletteCommand
ld a, $1
ldh [hAutoBGTransferEnabled], a
Expand Down
2 changes: 1 addition & 1 deletion engine/printer/printer2.asm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Printer_GetMonStats:
ld a, [wLoadedMonMoves + 3]
call .PlaceMoveName

ld b, $4 ; SET_PAL_STATUS_SCREEN
ld b, SET_PAL_POKEDEX
call RunPaletteCommand

ld a, $1
Expand Down
2 changes: 1 addition & 1 deletion home/overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ LoadMapData::
ld a, $01
ld [wUpdateSpritesEnabled], a
call EnableLCD
ld b, $09
ld b, SET_PAL_OVERWORLD
call RunPaletteCommand
call LoadPlayerSpriteGraphics
ld a, [wd732]
Expand Down

0 comments on commit 0ebc202

Please sign in to comment.