From dfe6c6885cd77956533df687821356ab6cf950e5 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 29 Jul 2022 16:17:40 -0400 Subject: [PATCH 01/13] Synced sound.c --- asm/macros/music_voice.inc | 2 +- data/battle_anim_scripts.s | 5 +- data/event_scripts.s | 1 + data/maps/BirthIsland_Exterior/scripts.inc | 2 +- data/maps/CeladonCity/scripts.inc | 2 +- .../CeladonCity_Condominiums_1F/scripts.inc | 6 +- data/maps/CeruleanCave_B1F/scripts.inc | 2 +- .../FourIsland_IcefallCave_Back/scripts.inc | 2 +- .../FourIsland_PokemonDayCare/scripts.inc | 4 +- data/maps/LavenderTown_House1/scripts.inc | 2 +- .../scripts.inc | 4 +- data/maps/MtEmber_Summit/scripts.inc | 2 +- data/maps/NavelRock_Base/scripts.inc | 2 +- data/maps/NavelRock_Summit/scripts.inc | 2 +- data/maps/PewterCity_House1/scripts.inc | 2 +- data/maps/PokemonTower_6F/scripts.inc | 2 +- data/maps/PowerPlant/scripts.inc | 6 +- data/maps/Route12/scripts.inc | 2 +- data/maps/Route16/scripts.inc | 2 +- data/maps/Route16_House/scripts.inc | 2 +- data/maps/SSAnne_1F_Room3/scripts.inc | 2 +- data/maps/SSAnne_B1F_Room5/scripts.inc | 2 +- data/maps/SaffronCity/scripts.inc | 2 +- .../SaffronCity_CopycatsHouse_1F/scripts.inc | 2 +- .../SaffronCity_CopycatsHouse_2F/scripts.inc | 2 +- data/maps/SaffronCity_House/scripts.inc | 2 +- data/maps/SeafoamIslands_B4F/scripts.inc | 2 +- .../scripts.inc | 2 +- data/maps/ThreeIsland/scripts.inc | 2 +- data/maps/ThreeIsland_BerryForest/scripts.inc | 2 +- data/maps/VermilionCity/scripts.inc | 2 +- data/maps/VermilionCity_House3/scripts.inc | 2 +- .../VermilionCity_PokemonFanClub/scripts.inc | 4 +- data/maps/ViridianCity_House1/scripts.inc | 2 +- data/scripts/day_care.inc | 4 +- include/constants/fanfares.h | 22 - include/constants/songs.h | 2 + include/constants/sound.h | 44 + include/gba/m4a_internal.h | 2 + include/sound.h | 10 +- sound/voice_groups.inc | 778 +++++++++--------- src/battle_anim.c | 4 +- src/battle_anim_sound_tasks.c | 19 +- src/battle_controller_link_opponent.c | 7 +- src/battle_controller_link_partner.c | 3 +- src/battle_controller_opponent.c | 7 +- src/battle_controller_player.c | 9 +- src/battle_script_commands.c | 4 +- src/credits.c | 3 +- src/diploma.c | 4 +- src/dodrio_berry_picking.c | 6 +- src/field_effect.c | 3 +- src/hall_of_fame.c | 4 +- src/help_system_util.c | 4 +- src/intro.c | 3 +- src/item_use.c | 4 +- src/overworld.c | 3 +- src/party_menu.c | 3 +- src/pokeball.c | 15 +- src/pokedex_screen.c | 9 +- src/pokemon_summary_screen.c | 5 +- src/save_failed_screen.c | 4 +- src/scrcmd.c | 5 +- src/sound.c | 168 ++-- 64 files changed, 643 insertions(+), 599 deletions(-) delete mode 100644 include/constants/fanfares.h create mode 100644 include/constants/sound.h diff --git a/asm/macros/music_voice.inc b/asm/macros/music_voice.inc index 64dd38214..ff87c56d6 100644 --- a/asm/macros/music_voice.inc +++ b/asm/macros/music_voice.inc @@ -145,7 +145,7 @@ .byte 0xff, 0, 0xff, 0 .endm - .macro cry2 sample:req + .macro cry_reverse sample:req .byte 0x30, 60, 0, 0 .4byte \sample .byte 0xff, 0, 0xff, 0 diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index 4acb190f7..a111d52b3 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1,6 +1,7 @@ #include "constants/battle.h" #include "constants/battle_anim.h" #include "constants/songs.h" +#include "constants/sound.h" #include "constants/moves.h" .include "asm/macros.inc" .include "asm/macros/battle_anim_script.inc" @@ -5068,7 +5069,7 @@ Move_ROAR:: monbg ANIM_ATTACKER monbgprio_28 0 setalpha 8, 8 - createvisualtask SoundTask_PlayDoubleCry, 2, 0, 2 + createvisualtask SoundTask_PlayDoubleCry, 2, 0, DOUBLE_CRY_ROAR createvisualtask AnimTask_ScaleMonAndRestore, 5, -5, -5, 10, 0, 1 call RoarEffect delay 20 @@ -5093,7 +5094,7 @@ RoarEffect:: Move_GROWL:: loadspritegfx ANIM_TAG_NOISE_LINE - createvisualtask SoundTask_PlayDoubleCry, 2, 0, 255 + createvisualtask SoundTask_PlayDoubleCry, 2, 0, DOUBLE_CRY_GROWL call RoarEffect delay 10 createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 9, 1 diff --git a/data/event_scripts.s b/data/event_scripts.s index e14eb7465..8d00495a7 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -10,6 +10,7 @@ #include "constants/pokemon.h" #include "constants/moves.h" #include "constants/songs.h" +#include "constants/sound.h" #include "constants/species.h" #include "constants/vars.h" #include "constants/battle.h" diff --git a/data/maps/BirthIsland_Exterior/scripts.inc b/data/maps/BirthIsland_Exterior/scripts.inc index 7577fda82..9c42fd3c1 100644 --- a/data/maps/BirthIsland_Exterior/scripts.inc +++ b/data/maps/BirthIsland_Exterior/scripts.inc @@ -80,7 +80,7 @@ BirthIsland_Exterior_EventScript_Deoxys:: applymovement LOCALID_DEOXYS, Movement_DeoxysApproach waitmovement 0 waitse - playmoncry SPECIES_DEOXYS, 2 + playmoncry SPECIES_DEOXYS, CRY_MODE_ENCOUNTER delay 40 waitmoncry setvar VAR_LAST_TALKED, LOCALID_DEOXYS diff --git a/data/maps/CeladonCity/scripts.inc b/data/maps/CeladonCity/scripts.inc index f69192788..505e8b95f 100644 --- a/data/maps/CeladonCity/scripts.inc +++ b/data/maps/CeladonCity/scripts.inc @@ -45,7 +45,7 @@ CeladonCity_EventScript_Poliwrath:: lock faceplayer waitse - playmoncry SPECIES_POLIWRATH, 0 + playmoncry SPECIES_POLIWRATH, CRY_MODE_NORMAL msgbox CeladonCity_Text_Poliwrath closemessage waitmoncry diff --git a/data/maps/CeladonCity_Condominiums_1F/scripts.inc b/data/maps/CeladonCity_Condominiums_1F/scripts.inc index 39731ff8d..088efff72 100644 --- a/data/maps/CeladonCity_Condominiums_1F/scripts.inc +++ b/data/maps/CeladonCity_Condominiums_1F/scripts.inc @@ -32,7 +32,7 @@ CeladonCity_Condominiums_1F_EventScript_Meowth:: lock faceplayer waitse - playmoncry SPECIES_MEOWTH, 0 + playmoncry SPECIES_MEOWTH, CRY_MODE_NORMAL msgbox CeladonCity_Condominiums_1F_Text_Meowth waitmoncry release @@ -42,7 +42,7 @@ CeladonCity_Condominiums_1F_EventScript_Clefairy:: lock faceplayer waitse - playmoncry SPECIES_CLEFAIRY, 0 + playmoncry SPECIES_CLEFAIRY, CRY_MODE_NORMAL msgbox CeladonCity_Condominiums_1F_Text_Clefairy waitmoncry release @@ -52,7 +52,7 @@ CeladonCity_Condominiums_1F_EventScript_Nidoran:: lock faceplayer waitse - playmoncry SPECIES_NIDORAN_F, 0 + playmoncry SPECIES_NIDORAN_F, CRY_MODE_NORMAL msgbox CeladonCity_Condominiums_1F_Text_Nidoran waitmoncry release diff --git a/data/maps/CeruleanCave_B1F/scripts.inc b/data/maps/CeruleanCave_B1F/scripts.inc index 29ec277e8..2963e9228 100644 --- a/data/maps/CeruleanCave_B1F/scripts.inc +++ b/data/maps/CeruleanCave_B1F/scripts.inc @@ -28,7 +28,7 @@ CeruleanCave_B1F_EventScript_Mewtwo:: lock faceplayer waitse - playmoncry SPECIES_MEWTWO, 2 + playmoncry SPECIES_MEWTWO, CRY_MODE_ENCOUNTER message CeruleanCave_B1F_Text_Mew waitmessage waitmoncry diff --git a/data/maps/FourIsland_IcefallCave_Back/scripts.inc b/data/maps/FourIsland_IcefallCave_Back/scripts.inc index e7fb4e9ee..b0ef13da6 100644 --- a/data/maps/FourIsland_IcefallCave_Back/scripts.inc +++ b/data/maps/FourIsland_IcefallCave_Back/scripts.inc @@ -62,7 +62,7 @@ FourIsland_IcefallCave_Back_EventScript_LoreleiRocketsScene:: message FourIsland_IcefallCave_Back_Text_LoreleiWellDeepFreezeYou waitmessage waitse - playmoncry SPECIES_LAPRAS, 2 + playmoncry SPECIES_LAPRAS, CRY_MODE_ENCOUNTER waitbuttonpress waitmoncry applymovement LOCALID_ROCKET1, FourIsland_IcefallCave_Back_Movement_Rocket1ReactToThreat diff --git a/data/maps/FourIsland_PokemonDayCare/scripts.inc b/data/maps/FourIsland_PokemonDayCare/scripts.inc index 89a384a2f..aef24b72b 100644 --- a/data/maps/FourIsland_PokemonDayCare/scripts.inc +++ b/data/maps/FourIsland_PokemonDayCare/scripts.inc @@ -36,7 +36,7 @@ FourIsland_PokemonDayCare_GiveMonToRaise:: goto_if_eq FourIsland_PokemonDayCare_OnlyOneAliveMonInParty specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox DayCare_Text_WellRaiseYourMon waitmoncry special StoreSelectedPokemonInDaycare @@ -137,7 +137,7 @@ FourIsland_PokemonDayCare_RetrieveMon:: playse SE_RS_SHOP msgbox DayCare_Text_HeresYourMon waitse - playmoncry VAR_RESULT, 0 + playmoncry VAR_RESULT, CRY_MODE_NORMAL textcolor 3 msgbox DayCare_Text_TookBackMon call EventScript_RestorePrevTextColor diff --git a/data/maps/LavenderTown_House1/scripts.inc b/data/maps/LavenderTown_House1/scripts.inc index 9c15c485a..58486f961 100644 --- a/data/maps/LavenderTown_House1/scripts.inc +++ b/data/maps/LavenderTown_House1/scripts.inc @@ -18,7 +18,7 @@ LavenderTown_House1_EventScript_Cubone:: lock faceplayer waitse - playmoncry SPECIES_CUBONE, 0 + playmoncry SPECIES_CUBONE, CRY_MODE_NORMAL msgbox LavenderTown_House1_Text_Cubone waitmoncry release diff --git a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc index e55c045b8..1fe10e416 100644 --- a/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc +++ b/data/maps/LavenderTown_VolunteerPokemonHouse/scripts.inc @@ -54,7 +54,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_Nidorino:: lock faceplayer waitse - playmoncry SPECIES_NIDORINO, 0 + playmoncry SPECIES_NIDORINO, CRY_MODE_NORMAL msgbox LavenderTown_VolunteerPokemonHouse_Text_Nidorino waitmoncry release @@ -64,7 +64,7 @@ LavenderTown_VolunteerPokemonHouse_EventScript_Psyduck:: lock faceplayer waitse - playmoncry SPECIES_PSYDUCK, 0 + playmoncry SPECIES_PSYDUCK, CRY_MODE_NORMAL msgbox LavenderTown_VolunteerPokemonHouse_Text_Psyduck waitmoncry release diff --git a/data/maps/MtEmber_Summit/scripts.inc b/data/maps/MtEmber_Summit/scripts.inc index 174ceff80..3c3757e63 100644 --- a/data/maps/MtEmber_Summit/scripts.inc +++ b/data/maps/MtEmber_Summit/scripts.inc @@ -29,7 +29,7 @@ MtEmber_Summit_EventScript_Moltres:: faceplayer setwildbattle SPECIES_MOLTRES, 50, ITEM_NONE waitse - playmoncry SPECIES_MOLTRES, 2 + playmoncry SPECIES_MOLTRES, CRY_MODE_ENCOUNTER message Text_Gyaoo waitmessage waitmoncry diff --git a/data/maps/NavelRock_Base/scripts.inc b/data/maps/NavelRock_Base/scripts.inc index 6271ad61c..b63ac1fd7 100644 --- a/data/maps/NavelRock_Base/scripts.inc +++ b/data/maps/NavelRock_Base/scripts.inc @@ -53,7 +53,7 @@ NavelRock_Base_EventScript_Lugia:: delay 30 delay 50 waitse - playmoncry SPECIES_LUGIA, 2 + playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER waitmoncry delay 20 setvar VAR_0x8004, SPECIES_LUGIA diff --git a/data/maps/NavelRock_Summit/scripts.inc b/data/maps/NavelRock_Summit/scripts.inc index 88abd253e..1f01b72eb 100644 --- a/data/maps/NavelRock_Summit/scripts.inc +++ b/data/maps/NavelRock_Summit/scripts.inc @@ -49,7 +49,7 @@ NavelRock_Summit_EventScript_HoOh:: setweather 0 doweather waitse - playmoncry SPECIES_HO_OH, 2 + playmoncry SPECIES_HO_OH, CRY_MODE_ENCOUNTER delay 30 waitmoncry delay 60 diff --git a/data/maps/PewterCity_House1/scripts.inc b/data/maps/PewterCity_House1/scripts.inc index a76180f29..56e9c623f 100644 --- a/data/maps/PewterCity_House1/scripts.inc +++ b/data/maps/PewterCity_House1/scripts.inc @@ -26,7 +26,7 @@ PewterCity_House1_EventScript_Nidoran:: PewterCity_House1_EventScript_DoNidoranCry:: textcolor 3 waitse - playmoncry SPECIES_NIDORAN_M, 0 + playmoncry SPECIES_NIDORAN_M, CRY_MODE_NORMAL msgbox PewterCity_House1_Text_Nidoran waitmoncry call EventScript_RestorePrevTextColor diff --git a/data/maps/PokemonTower_6F/scripts.inc b/data/maps/PokemonTower_6F/scripts.inc index d24c42336..e5c33b9af 100644 --- a/data/maps/PokemonTower_6F/scripts.inc +++ b/data/maps/PokemonTower_6F/scripts.inc @@ -21,7 +21,7 @@ PokemonTower_6F_EventScript_DefeatedMarowakGhost:: message PokemonTower_6F_Text_GhostWasCubonesMother waitmessage waitse - playmoncry SPECIES_MAROWAK, 0 + playmoncry SPECIES_MAROWAK, CRY_MODE_NORMAL waitbuttonpress waitmoncry msgbox PokemonTower_6F_Text_MothersSpiritWasCalmed diff --git a/data/maps/PowerPlant/scripts.inc b/data/maps/PowerPlant/scripts.inc index 76641a299..0be023701 100644 --- a/data/maps/PowerPlant/scripts.inc +++ b/data/maps/PowerPlant/scripts.inc @@ -40,7 +40,7 @@ PowerPlant_EventScript_Zapdos:: faceplayer setwildbattle SPECIES_ZAPDOS, 50, ITEM_NONE waitse - playmoncry SPECIES_ZAPDOS, 2 + playmoncry SPECIES_ZAPDOS, CRY_MODE_ENCOUNTER message Text_Gyaoo waitmessage waitmoncry @@ -78,7 +78,7 @@ PowerPlant_EventScript_Electrode1:: faceplayer setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE waitse - playmoncry SPECIES_ELECTRODE, 2 + playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_SPECIAL_WILD_BATTLE @@ -107,7 +107,7 @@ PowerPlant_EventScript_Electrode2:: faceplayer setwildbattle SPECIES_ELECTRODE, 34, ITEM_NONE waitse - playmoncry SPECIES_ELECTRODE, 2 + playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_SYS_SPECIAL_WILD_BATTLE diff --git a/data/maps/Route12/scripts.inc b/data/maps/Route12/scripts.inc index 7a5c9c5a3..e6a1bc440 100644 --- a/data/maps/Route12/scripts.inc +++ b/data/maps/Route12/scripts.inc @@ -22,7 +22,7 @@ Route12_EventScript_Snorlax:: call EventScript_AwakenSnorlax setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE waitse - playmoncry SPECIES_SNORLAX, 2 + playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_HIDE_ROUTE_12_SNORLAX diff --git a/data/maps/Route16/scripts.inc b/data/maps/Route16/scripts.inc index 132dcd280..c1cd5e8a8 100644 --- a/data/maps/Route16/scripts.inc +++ b/data/maps/Route16/scripts.inc @@ -41,7 +41,7 @@ Route16_EventScript_Snorlax:: call EventScript_AwakenSnorlax setwildbattle SPECIES_SNORLAX, 30, ITEM_NONE waitse - playmoncry SPECIES_SNORLAX, 2 + playmoncry SPECIES_SNORLAX, CRY_MODE_ENCOUNTER delay 40 waitmoncry setflag FLAG_HIDE_ROUTE_16_SNORLAX diff --git a/data/maps/Route16_House/scripts.inc b/data/maps/Route16_House/scripts.inc index 8deed78a9..373259698 100644 --- a/data/maps/Route16_House/scripts.inc +++ b/data/maps/Route16_House/scripts.inc @@ -29,7 +29,7 @@ Route16_House_EventScript_Fearow:: lock faceplayer waitse - playmoncry SPECIES_FEAROW, 0 + playmoncry SPECIES_FEAROW, CRY_MODE_NORMAL msgbox Route16_House_Text_Fearow waitmoncry release diff --git a/data/maps/SSAnne_1F_Room3/scripts.inc b/data/maps/SSAnne_1F_Room3/scripts.inc index 67fc9ba93..3f3beb86c 100644 --- a/data/maps/SSAnne_1F_Room3/scripts.inc +++ b/data/maps/SSAnne_1F_Room3/scripts.inc @@ -13,7 +13,7 @@ SSAnne_1F_Room3_EventScript_Wigglytuff:: lock faceplayer waitse - playmoncry SPECIES_WIGGLYTUFF, 0 + playmoncry SPECIES_WIGGLYTUFF, CRY_MODE_NORMAL msgbox SSAnne_1F_Room3_Text_Wigglytuff waitmoncry release diff --git a/data/maps/SSAnne_B1F_Room5/scripts.inc b/data/maps/SSAnne_B1F_Room5/scripts.inc index f2358c179..8cd94e4ea 100644 --- a/data/maps/SSAnne_B1F_Room5/scripts.inc +++ b/data/maps/SSAnne_B1F_Room5/scripts.inc @@ -9,7 +9,7 @@ SSAnne_B1F_Room5_EventScript_Machoke:: lock faceplayer waitse - playmoncry SPECIES_MACHOKE, 0 + playmoncry SPECIES_MACHOKE, CRY_MODE_NORMAL msgbox SSAnne_B1F_Room5_Text_Machoke waitmoncry release diff --git a/data/maps/SaffronCity/scripts.inc b/data/maps/SaffronCity/scripts.inc index 085c0e37a..44dba429b 100644 --- a/data/maps/SaffronCity/scripts.inc +++ b/data/maps/SaffronCity/scripts.inc @@ -76,7 +76,7 @@ SaffronCity_EventScript_Pidgeot:: lock faceplayer waitse - playmoncry SPECIES_PIDGEOT, 0 + playmoncry SPECIES_PIDGEOT, CRY_MODE_NORMAL msgbox SaffronCity_Text_Pidgeot waitmoncry release diff --git a/data/maps/SaffronCity_CopycatsHouse_1F/scripts.inc b/data/maps/SaffronCity_CopycatsHouse_1F/scripts.inc index 4dfd950e0..86b012e28 100644 --- a/data/maps/SaffronCity_CopycatsHouse_1F/scripts.inc +++ b/data/maps/SaffronCity_CopycatsHouse_1F/scripts.inc @@ -13,7 +13,7 @@ SaffronCity_CopycatsHouse_1F_EventScript_Chansey:: lock faceplayer waitse - playmoncry SPECIES_CHANSEY, 0 + playmoncry SPECIES_CHANSEY, CRY_MODE_NORMAL msgbox SaffronCity_CopycatsHouse_1F_Text_Chansey waitmoncry release diff --git a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc index b29cff36d..e30cb601b 100644 --- a/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc +++ b/data/maps/SaffronCity_CopycatsHouse_2F/scripts.inc @@ -5,7 +5,7 @@ SaffronCity_CopycatsHouse_2F_EventScript_Doduo:: lock faceplayer waitse - playmoncry SPECIES_DODUO, 0 + playmoncry SPECIES_DODUO, CRY_MODE_NORMAL msgbox SaffronCity_CopycatsHouse_2F_Text_Doduo waitmoncry release diff --git a/data/maps/SaffronCity_House/scripts.inc b/data/maps/SaffronCity_House/scripts.inc index 8401002fa..898f2d863 100644 --- a/data/maps/SaffronCity_House/scripts.inc +++ b/data/maps/SaffronCity_House/scripts.inc @@ -13,7 +13,7 @@ SaffronCity_House_EventScript_Pidgey:: lock faceplayer waitse - playmoncry SPECIES_PIDGEY, 0 + playmoncry SPECIES_PIDGEY, CRY_MODE_NORMAL msgbox SaffronCity_House_Text_Pidgey waitmoncry release diff --git a/data/maps/SeafoamIslands_B4F/scripts.inc b/data/maps/SeafoamIslands_B4F/scripts.inc index 31cb2fe30..342c46759 100644 --- a/data/maps/SeafoamIslands_B4F/scripts.inc +++ b/data/maps/SeafoamIslands_B4F/scripts.inc @@ -164,7 +164,7 @@ SeafoamIslands_B4F_EventScript_Articuno:: faceplayer setwildbattle SPECIES_ARTICUNO, 50, ITEM_NONE waitse - playmoncry SPECIES_ARTICUNO, 2 + playmoncry SPECIES_ARTICUNO, CRY_MODE_ENCOUNTER message Text_Gyaoo waitmessage waitmoncry diff --git a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc index 4b33397aa..e070f409d 100644 --- a/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc +++ b/data/maps/SevenIsland_SevaultCanyon_House/scripts.inc @@ -76,7 +76,7 @@ SevenIsland_SevaultCanyon_House_EventScript_Chansey:: lock faceplayer waitse - playmoncry SPECIES_CHANSEY, 0 + playmoncry SPECIES_CHANSEY, CRY_MODE_NORMAL msgbox SevenIsland_SevaultCanyon_House_Text_Chansey waitmoncry release diff --git a/data/maps/ThreeIsland/scripts.inc b/data/maps/ThreeIsland/scripts.inc index 7293d0bab..f75505ea2 100644 --- a/data/maps/ThreeIsland/scripts.inc +++ b/data/maps/ThreeIsland/scripts.inc @@ -404,7 +404,7 @@ ThreeIsland_EventScript_Doduo:: lock faceplayer waitse - playmoncry SPECIES_DODUO, 0 + playmoncry SPECIES_DODUO, CRY_MODE_NORMAL msgbox ThreeIsland_Text_Doduo waitmoncry release diff --git a/data/maps/ThreeIsland_BerryForest/scripts.inc b/data/maps/ThreeIsland_BerryForest/scripts.inc index 35134b0b3..8f5210dec 100644 --- a/data/maps/ThreeIsland_BerryForest/scripts.inc +++ b/data/maps/ThreeIsland_BerryForest/scripts.inc @@ -21,7 +21,7 @@ ThreeIsland_BerryForest_EventScript_Lostelle:: msgbox ThreeIsland_BerryForest_Text_HereItComesAgain goto_if_questlog EventScript_ReleaseEnd waitse - playmoncry SPECIES_HYPNO, 2 + playmoncry SPECIES_HYPNO, CRY_MODE_ENCOUNTER waitmoncry setwildbattle SPECIES_HYPNO, 30, ITEM_NONE dowildbattle diff --git a/data/maps/VermilionCity/scripts.inc b/data/maps/VermilionCity/scripts.inc index 2d1e95944..128850f03 100644 --- a/data/maps/VermilionCity/scripts.inc +++ b/data/maps/VermilionCity/scripts.inc @@ -249,7 +249,7 @@ VermilionCity_EventScript_Machop:: lock faceplayer waitse - playmoncry SPECIES_MACHOP, 0 + playmoncry SPECIES_MACHOP, CRY_MODE_NORMAL msgbox VermilionCity_Text_Machop waitmoncry msgbox VermilionCity_Text_MachopStompingLandFlat diff --git a/data/maps/VermilionCity_House3/scripts.inc b/data/maps/VermilionCity_House3/scripts.inc index aeeb8b77c..2bc76d614 100644 --- a/data/maps/VermilionCity_House3/scripts.inc +++ b/data/maps/VermilionCity_House3/scripts.inc @@ -13,7 +13,7 @@ VermilionCity_House3_EventScript_Pidgey:: lock faceplayer waitse - playmoncry SPECIES_PIDGEY, 0 + playmoncry SPECIES_PIDGEY, CRY_MODE_NORMAL msgbox VermilionCity_House3_Text_Pidgey waitmoncry release diff --git a/data/maps/VermilionCity_PokemonFanClub/scripts.inc b/data/maps/VermilionCity_PokemonFanClub/scripts.inc index 9310eff12..6c0efe151 100644 --- a/data/maps/VermilionCity_PokemonFanClub/scripts.inc +++ b/data/maps/VermilionCity_PokemonFanClub/scripts.inc @@ -99,7 +99,7 @@ VermilionCity_PokemonFanClub_EventScript_Pikachu:: lock faceplayer waitse - playmoncry SPECIES_PIKACHU, 0 + playmoncry SPECIES_PIKACHU, CRY_MODE_NORMAL msgbox VermilionCity_PokemonFanClub_Text_Pikachu waitmoncry release @@ -109,7 +109,7 @@ VermilionCity_PokemonFanClub_EventScript_Seel:: lock faceplayer waitse - playmoncry SPECIES_SEEL, 0 + playmoncry SPECIES_SEEL, CRY_MODE_NORMAL msgbox VermilionCity_PokemonFanClub_Text_Seel waitmoncry release diff --git a/data/maps/ViridianCity_House1/scripts.inc b/data/maps/ViridianCity_House1/scripts.inc index 20b7b06d6..0ef2732aa 100644 --- a/data/maps/ViridianCity_House1/scripts.inc +++ b/data/maps/ViridianCity_House1/scripts.inc @@ -13,7 +13,7 @@ ViridianCity_House1_EventScript_Speary:: lock faceplayer waitse - playmoncry SPECIES_SPEAROW, 0 + playmoncry SPECIES_SPEAROW, CRY_MODE_NORMAL msgbox ViridianCity_House1_Text_Speary waitmoncry release diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index 9fa631bbc..febf7aa28 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -31,7 +31,7 @@ Route5_PokemonDayCare_EventScript_TryGiveMon:: specialvar VAR_0x8005, GetSelectedMonNicknameAndSpecies msgbox Route5_PokemonDayCare_Text_LookAfterMonForAWhile waitse - playmoncry VAR_0x8005, 0 + playmoncry VAR_0x8005, CRY_MODE_NORMAL msgbox Route5_PokemonDayCare_Text_ComeSeeMeInAWhile waitmoncry special PutMonInRoute5Daycare @@ -100,7 +100,7 @@ Route5_PokemonDayCare_EventScript_RetrieveMon:: msgbox Route5_PokemonDayCare_Text_ThankYouHeresMon textcolor 3 waitse - playmoncry VAR_RESULT, 0 + playmoncry VAR_RESULT, CRY_MODE_NORMAL msgbox Route5_PokemonDayCare_Text_PlayerGotMonBack call EventScript_RestorePrevTextColor waitmoncry diff --git a/include/constants/fanfares.h b/include/constants/fanfares.h deleted file mode 100644 index 21d3af79c..000000000 --- a/include/constants/fanfares.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef GUARD_CONSTANTS_FANFARES_H -#define GUARD_CONSTANTS_FANFARES_H - -enum Fanfares -{ - FANFARE_00, - FANFARE_01, - FANFARE_02, - FANFARE_03, - FANFARE_04, - FANFARE_05, - FANFARE_06, - FANFARE_07, - FANFARE_08, - FANFARE_09, - FANFARE_10, - FANFARE_POKEFLUTE, - FANFARE_KEY_ITEM, - FANFARE_DEX_EVAL -}; - -#endif //GUARD_CONSTANTS_FANFARES_H diff --git a/include/constants/songs.h b/include/constants/songs.h index 1c8f46844..7addf89ec 100644 --- a/include/constants/songs.h +++ b/include/constants/songs.h @@ -353,4 +353,6 @@ #define MUS_SLOW_PALLET 345 // MUS_RG_SLOWMASARA #define MUS_TEACHY_TV_MENU 346 // MUS_RG_TVNOIZE +#define MUS_NONE 0xFFFF + #endif // GUARD_CONSTANTS_SONGS_H diff --git a/include/constants/sound.h b/include/constants/sound.h new file mode 100644 index 000000000..0890f4290 --- /dev/null +++ b/include/constants/sound.h @@ -0,0 +1,44 @@ +#ifndef GUARD_CONSTANTS_SOUND_H +#define GUARD_CONSTANTS_SOUND_H + +#define FANFARE_LEVEL_UP 0 +#define FANFARE_OBTAIN_ITEM 1 +#define FANFARE_EVOLVED 2 +#define FANFARE_OBTAIN_TMHM 3 +#define FANFARE_HEAL 4 +#define FANFARE_OBTAIN_BADGE 5 +#define FANFARE_MOVE_DELETED 6 +#define FANFARE_OBTAIN_BERRY 7 +#define FANFARE_SLOTS_JACKPOT 8 +#define FANFARE_SLOTS_WIN 9 +#define FANFARE_TOO_BAD 10 +#define FANFARE_POKE_FLUTE 11 +#define FANFARE_KEY_ITEM 12 +#define FANFARE_DEX_EVAL 13 + +#define CRY_MODE_NORMAL 0 // Default +#define CRY_MODE_DOUBLES 1 // Shortened cry for double battles +#define CRY_MODE_ENCOUNTER 2 // Used when starting a static encounter, or when a Pokémon is "aggressive" +#define CRY_MODE_HIGH_PITCH 3 // Highest pitch mode, used exclusively by the move Howl +#define CRY_MODE_ECHO_START 4 // For 1st half of cry used by the move Hyper Voice. Played in reverse +#define CRY_MODE_FAINT 5 // Used when a Pokémon faints +#define CRY_MODE_ECHO_END 6 // For 2nd half of cry used by the move Hyper Voice +#define CRY_MODE_ROAR_1 7 // For 1st cry used by the move Roar +#define CRY_MODE_ROAR_2 8 // For 2nd cry used by the move Roar +#define CRY_MODE_GROWL_1 9 // For 1st cry used by the move Growl. Played in reverse +#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl +#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy +#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK + +// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary +#define DOUBLE_CRY_ROAR 2 +#define DOUBLE_CRY_GROWL 255 + +#define CRY_PRIORITY_NORMAL 10 +#define CRY_PRIORITY_AMBIENT 1 + +// Cry volume was changed from 125 in R/S to 120 for FRLG/Em, but was (accidentally?) not updated outside of sound.c +#define CRY_VOLUME 120 +#define CRY_VOLUME_RS 125 + +#endif //GUARD_CONSTANTS_SOUND_H diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h index 2ccbb18f5..eeb79391b 100644 --- a/include/gba/m4a_internal.h +++ b/include/gba/m4a_internal.h @@ -313,6 +313,8 @@ struct MusicPlayerTrack #define MAX_MUSICPLAYER_TRACKS 16 +#define TRACKS_ALL 0xFFFF + #define TEMPORARY_FADE 0x0001 #define FADE_IN 0x0002 #define FADE_VOL_MAX 64 diff --git a/include/sound.h b/include/sound.h index 82ec758c5..79dd64c54 100644 --- a/include/sound.h +++ b/include/sound.h @@ -25,12 +25,10 @@ void FadeInBGM(u8 speed); void FadeOutBGM(u8 speed); bool8 IsBGMStopped(void); void PlayCry_Normal(u16 species, s8 pan); -void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority); -void PlayCry3(u16 species, s8 pan, u8 mode); -void PlayCry4(u16 species, s8 pan, u8 mode); -void PlayCry5(u16 species, u8 mode); -void PlayCry6(u16 species, s8 pan, u8 mode); -void PlayCry7(u16 species, u8 mode); +void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority); +void PlayCry_ByMode(u16 species, s8 pan, u8 mode); +void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode); +void PlayCry_Script(u16 species, u8 mode); void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode); bool8 IsCryFinished(void); void StopCryAndClearCrySongs(void); diff --git a/sound/voice_groups.inc b/sound/voice_groups.inc index b7fae524e..00bb2cbb0 100644 --- a/sound/voice_groups.inc +++ b/sound/voice_groups.inc @@ -1383,395 +1383,395 @@ gCryTable:: cry Cry_Deoxys cry Cry_Chimecho -gCryTable2:: - cry2 Cry_Bulbasaur - cry2 Cry_Ivysaur - cry2 Cry_Venusaur - cry2 Cry_Charmander - cry2 Cry_Charmeleon - cry2 Cry_Charizard - cry2 Cry_Squirtle - cry2 Cry_Wartortle - cry2 Cry_Blastoise - cry2 Cry_Caterpie - cry2 Cry_Metapod - cry2 Cry_Butterfree - cry2 Cry_Weedle - cry2 Cry_Kakuna - cry2 Cry_Beedrill - cry2 Cry_Pidgey - cry2 Cry_Pidgeotto - cry2 Cry_Pidgeot - cry2 Cry_Rattata - cry2 Cry_Raticate - cry2 Cry_Spearow - cry2 Cry_Fearow - cry2 Cry_Ekans - cry2 Cry_Arbok - cry2 Cry_Pikachu - cry2 Cry_Raichu - cry2 Cry_Sandshrew - cry2 Cry_Sandslash - cry2 Cry_NidoranF - cry2 Cry_Nidorina - cry2 Cry_Nidoqueen - cry2 Cry_NidoranM - cry2 Cry_Nidorino - cry2 Cry_Nidoking - cry2 Cry_Clefairy - cry2 Cry_Clefable - cry2 Cry_Vulpix - cry2 Cry_Ninetales - cry2 Cry_Jigglypuff - cry2 Cry_Wigglytuff - cry2 Cry_Zubat - cry2 Cry_Golbat - cry2 Cry_Oddish - cry2 Cry_Gloom - cry2 Cry_Vileplume - cry2 Cry_Paras - cry2 Cry_Parasect - cry2 Cry_Venonat - cry2 Cry_Venomoth - cry2 Cry_Diglett - cry2 Cry_Dugtrio - cry2 Cry_Meowth - cry2 Cry_Persian - cry2 Cry_Psyduck - cry2 Cry_Golduck - cry2 Cry_Mankey - cry2 Cry_Primeape - cry2 Cry_Growlithe - cry2 Cry_Arcanine - cry2 Cry_Poliwag - cry2 Cry_Poliwhirl - cry2 Cry_Poliwrath - cry2 Cry_Abra - cry2 Cry_Kadabra - cry2 Cry_Alakazam - cry2 Cry_Machop - cry2 Cry_Machoke - cry2 Cry_Machamp - cry2 Cry_Bellsprout - cry2 Cry_Weepinbell - cry2 Cry_Victreebel - cry2 Cry_Tentacool - cry2 Cry_Tentacruel - cry2 Cry_Geodude - cry2 Cry_Graveler - cry2 Cry_Golem - cry2 Cry_Ponyta - cry2 Cry_Rapidash - cry2 Cry_Slowpoke - cry2 Cry_Slowbro - cry2 Cry_Magnemite - cry2 Cry_Magneton - cry2 Cry_Farfetchd - cry2 Cry_Doduo - cry2 Cry_Dodrio - cry2 Cry_Seel - cry2 Cry_Dewgong - cry2 Cry_Grimer - cry2 Cry_Muk - cry2 Cry_Shellder - cry2 Cry_Cloyster - cry2 Cry_Gastly - cry2 Cry_Haunter - cry2 Cry_Gengar - cry2 Cry_Onix - cry2 Cry_Drowzee - cry2 Cry_Hypno - cry2 Cry_Krabby - cry2 Cry_Kingler - cry2 Cry_Voltorb - cry2 Cry_Electrode - cry2 Cry_Exeggcute - cry2 Cry_Exeggutor - cry2 Cry_Cubone - cry2 Cry_Marowak - cry2 Cry_Hitmonlee - cry2 Cry_Hitmonchan - cry2 Cry_Lickitung - cry2 Cry_Koffing - cry2 Cry_Weezing - cry2 Cry_Rhyhorn - cry2 Cry_Rhydon - cry2 Cry_Chansey - cry2 Cry_Tangela - cry2 Cry_Kangaskhan - cry2 Cry_Horsea - cry2 Cry_Seadra - cry2 Cry_Goldeen - cry2 Cry_Seaking - cry2 Cry_Staryu - cry2 Cry_Starmie - cry2 Cry_MrMime - cry2 Cry_Scyther - cry2 Cry_Jynx - cry2 Cry_Electabuzz - cry2 Cry_Magmar - cry2 Cry_Pinsir - cry2 Cry_Tauros - cry2 Cry_Magikarp - cry2 Cry_Gyarados - cry2 Cry_Lapras - cry2 Cry_Ditto - cry2 Cry_Eevee - cry2 Cry_Vaporeon - cry2 Cry_Jolteon - cry2 Cry_Flareon - cry2 Cry_Porygon - cry2 Cry_Omanyte - cry2 Cry_Omastar - cry2 Cry_Kabuto - cry2 Cry_Kabutops - cry2 Cry_Aerodactyl - cry2 Cry_Snorlax - cry2 Cry_Articuno - cry2 Cry_Zapdos - cry2 Cry_Moltres - cry2 Cry_Dratini - cry2 Cry_Dragonair - cry2 Cry_Dragonite - cry2 Cry_Mewtwo - cry2 Cry_Mew - cry2 Cry_Chikorita - cry2 Cry_Bayleef - cry2 Cry_Meganium - cry2 Cry_Cyndaquil - cry2 Cry_Quilava - cry2 Cry_Typhlosion - cry2 Cry_Totodile - cry2 Cry_Croconaw - cry2 Cry_Feraligatr - cry2 Cry_Sentret - cry2 Cry_Furret - cry2 Cry_Hoothoot - cry2 Cry_Noctowl - cry2 Cry_Ledyba - cry2 Cry_Ledian - cry2 Cry_Spinarak - cry2 Cry_Ariados - cry2 Cry_Crobat - cry2 Cry_Chinchou - cry2 Cry_Lanturn - cry2 Cry_Pichu - cry2 Cry_Cleffa - cry2 Cry_Igglybuff - cry2 Cry_Togepi - cry2 Cry_Togetic - cry2 Cry_Natu - cry2 Cry_Xatu - cry2 Cry_Mareep - cry2 Cry_Flaaffy - cry2 Cry_Ampharos - cry2 Cry_Bellossom - cry2 Cry_Marill - cry2 Cry_Azumarill - cry2 Cry_Sudowoodo - cry2 Cry_Politoed - cry2 Cry_Hoppip - cry2 Cry_Skiploom - cry2 Cry_Jumpluff - cry2 Cry_Aipom - cry2 Cry_Sunkern - cry2 Cry_Sunflora - cry2 Cry_Yanma - cry2 Cry_Wooper - cry2 Cry_Quagsire - cry2 Cry_Espeon - cry2 Cry_Umbreon - cry2 Cry_Murkrow - cry2 Cry_Slowking - cry2 Cry_Misdreavus - cry2 Cry_Unown - cry2 Cry_Wobbuffet - cry2 Cry_Girafarig - cry2 Cry_Pineco - cry2 Cry_Forretress - cry2 Cry_Dunsparce - cry2 Cry_Gligar - cry2 Cry_Steelix - cry2 Cry_Snubbull - cry2 Cry_Granbull - cry2 Cry_Qwilfish - cry2 Cry_Scizor - cry2 Cry_Shuckle - cry2 Cry_Heracross - cry2 Cry_Sneasel - cry2 Cry_Teddiursa - cry2 Cry_Ursaring - cry2 Cry_Slugma - cry2 Cry_Magcargo - cry2 Cry_Swinub - cry2 Cry_Piloswine - cry2 Cry_Corsola - cry2 Cry_Remoraid - cry2 Cry_Octillery - cry2 Cry_Delibird - cry2 Cry_Mantine - cry2 Cry_Skarmory - cry2 Cry_Houndour - cry2 Cry_Houndoom - cry2 Cry_Kingdra - cry2 Cry_Phanpy - cry2 Cry_Donphan - cry2 Cry_Porygon2 - cry2 Cry_Stantler - cry2 Cry_Smeargle - cry2 Cry_Tyrogue - cry2 Cry_Hitmontop - cry2 Cry_Smoochum - cry2 Cry_Elekid - cry2 Cry_Magby - cry2 Cry_Miltank - cry2 Cry_Blissey - cry2 Cry_Raikou - cry2 Cry_Entei - cry2 Cry_Suicune - cry2 Cry_Larvitar - cry2 Cry_Pupitar - cry2 Cry_Tyranitar - cry2 Cry_Lugia - cry2 Cry_HoOh - cry2 Cry_Celebi - cry2 Cry_Kecleon - cry2 Cry_Roselia - cry2 Cry_Torkoal - cry2 Cry_Electrike - cry2 Cry_Manectric - cry2 Cry_Duskull - cry2 Cry_Latias - cry2 Cry_Wynaut - cry2 Cry_Seviper - cry2 Cry_Sharpedo - cry2 Cry_Zangoose - cry2 Cry_Azurill - cry2 Cry_Swablu - cry2 Cry_Altaria - cry2 Cry_Unused265 - cry2 Cry_Taillow - cry2 Cry_Swellow - cry2 Cry_Unused268 - cry2 Cry_Spinda - cry2 Cry_Torchic - cry2 Cry_Combusken - cry2 Cry_Blaziken - cry2 Cry_Treecko - cry2 Cry_Grovyle - cry2 Cry_Sceptile - cry2 Cry_Mudkip - cry2 Cry_Marshtomp - cry2 Cry_Swampert - cry2 Cry_Pelipper - cry2 Cry_Wingull - cry2 Cry_Banette - cry2 Cry_Shuppet - cry2 Cry_Lotad - cry2 Cry_Lombre - cry2 Cry_Ludicolo - cry2 Cry_Seedot - cry2 Cry_Nuzleaf - cry2 Cry_Shiftry - cry2 Cry_Carvanha - cry2 Cry_Wurmple - cry2 Cry_Silcoon - cry2 Cry_Beautifly - cry2 Cry_Cascoon - cry2 Cry_Dustox - cry2 Cry_Ralts - cry2 Cry_Kirlia - cry2 Cry_Gardevoir - cry2 Cry_Slakoth - cry2 Cry_Vigoroth - cry2 Cry_Slaking - cry2 Cry_Nincada - cry2 Cry_Ninjask - cry2 Cry_Shedinja - cry2 Cry_Makuhita - cry2 Cry_Hariyama - cry2 Cry_Nosepass - cry2 Cry_Glalie - cry2 Cry_Plusle - cry2 Cry_Minun - cry2 Cry_Surskit - cry2 Cry_Masquerain - cry2 Cry_Skitty - cry2 Cry_Delcatty - cry2 Cry_Gulpin - cry2 Cry_Swalot - cry2 Cry_Numel - cry2 Cry_Camerupt - cry2 Cry_Barboach - cry2 Cry_Whiscash - cry2 Cry_Corphish - cry2 Cry_Crawdaunt - cry2 Cry_Spoink - cry2 Cry_Grumpig - cry2 Cry_Trapinch - cry2 Cry_Vibrava - cry2 Cry_Flygon - cry2 Cry_Cacnea - cry2 Cry_Cacturne - cry2 Cry_Baltoy - cry2 Cry_Claydol - cry2 Cry_Lunatone - cry2 Cry_Solrock - cry2 Cry_Feebas - cry2 Cry_Milotic - cry2 Cry_Absol - cry2 Cry_Meditite - cry2 Cry_Medicham - cry2 Cry_Spheal - cry2 Cry_Sealeo - cry2 Cry_Walrein - cry2 Cry_Clamperl - cry2 Cry_Huntail - cry2 Cry_Gorebyss - cry2 Cry_Lileep - cry2 Cry_Cradily - cry2 Cry_Anorith - cry2 Cry_Armaldo - cry2 Cry_Beldum - cry2 Cry_Metang - cry2 Cry_Metagross - cry2 Cry_Bagon - cry2 Cry_Shelgon - cry2 Cry_Regirock - cry2 Cry_Regice - cry2 Cry_Registeel - cry2 Cry_Castform - cry2 Cry_Volbeat - cry2 Cry_Illumise - cry2 Cry_Poochyena - cry2 Cry_Mightyena - cry2 Cry_Dusclops - cry2 Cry_Sableye - cry2 Cry_Mawile - cry2 Cry_Aron - cry2 Cry_Lairon - cry2 Cry_Aggron - cry2 Cry_Relicanth - cry2 Cry_Luvdisc - cry2 Cry_Groudon - cry2 Cry_Kyogre - cry2 Cry_Rayquaza - cry2 Cry_Salamence - cry2 Cry_Breloom - cry2 Cry_Shroomish - cry2 Cry_Linoone - cry2 Cry_Tropius - cry2 Cry_Wailmer - cry2 Cry_Zigzagoon - cry2 Cry_Exploud - cry2 Cry_Loudred - cry2 Cry_Wailord - cry2 Cry_Whismur - cry2 Cry_Snorunt - cry2 Cry_Latios - cry2 Cry_Jirachi - cry2 Cry_Deoxys - cry2 Cry_Chimecho +gCryTable_Reverse:: + cry_reverse Cry_Bulbasaur + cry_reverse Cry_Ivysaur + cry_reverse Cry_Venusaur + cry_reverse Cry_Charmander + cry_reverse Cry_Charmeleon + cry_reverse Cry_Charizard + cry_reverse Cry_Squirtle + cry_reverse Cry_Wartortle + cry_reverse Cry_Blastoise + cry_reverse Cry_Caterpie + cry_reverse Cry_Metapod + cry_reverse Cry_Butterfree + cry_reverse Cry_Weedle + cry_reverse Cry_Kakuna + cry_reverse Cry_Beedrill + cry_reverse Cry_Pidgey + cry_reverse Cry_Pidgeotto + cry_reverse Cry_Pidgeot + cry_reverse Cry_Rattata + cry_reverse Cry_Raticate + cry_reverse Cry_Spearow + cry_reverse Cry_Fearow + cry_reverse Cry_Ekans + cry_reverse Cry_Arbok + cry_reverse Cry_Pikachu + cry_reverse Cry_Raichu + cry_reverse Cry_Sandshrew + cry_reverse Cry_Sandslash + cry_reverse Cry_NidoranF + cry_reverse Cry_Nidorina + cry_reverse Cry_Nidoqueen + cry_reverse Cry_NidoranM + cry_reverse Cry_Nidorino + cry_reverse Cry_Nidoking + cry_reverse Cry_Clefairy + cry_reverse Cry_Clefable + cry_reverse Cry_Vulpix + cry_reverse Cry_Ninetales + cry_reverse Cry_Jigglypuff + cry_reverse Cry_Wigglytuff + cry_reverse Cry_Zubat + cry_reverse Cry_Golbat + cry_reverse Cry_Oddish + cry_reverse Cry_Gloom + cry_reverse Cry_Vileplume + cry_reverse Cry_Paras + cry_reverse Cry_Parasect + cry_reverse Cry_Venonat + cry_reverse Cry_Venomoth + cry_reverse Cry_Diglett + cry_reverse Cry_Dugtrio + cry_reverse Cry_Meowth + cry_reverse Cry_Persian + cry_reverse Cry_Psyduck + cry_reverse Cry_Golduck + cry_reverse Cry_Mankey + cry_reverse Cry_Primeape + cry_reverse Cry_Growlithe + cry_reverse Cry_Arcanine + cry_reverse Cry_Poliwag + cry_reverse Cry_Poliwhirl + cry_reverse Cry_Poliwrath + cry_reverse Cry_Abra + cry_reverse Cry_Kadabra + cry_reverse Cry_Alakazam + cry_reverse Cry_Machop + cry_reverse Cry_Machoke + cry_reverse Cry_Machamp + cry_reverse Cry_Bellsprout + cry_reverse Cry_Weepinbell + cry_reverse Cry_Victreebel + cry_reverse Cry_Tentacool + cry_reverse Cry_Tentacruel + cry_reverse Cry_Geodude + cry_reverse Cry_Graveler + cry_reverse Cry_Golem + cry_reverse Cry_Ponyta + cry_reverse Cry_Rapidash + cry_reverse Cry_Slowpoke + cry_reverse Cry_Slowbro + cry_reverse Cry_Magnemite + cry_reverse Cry_Magneton + cry_reverse Cry_Farfetchd + cry_reverse Cry_Doduo + cry_reverse Cry_Dodrio + cry_reverse Cry_Seel + cry_reverse Cry_Dewgong + cry_reverse Cry_Grimer + cry_reverse Cry_Muk + cry_reverse Cry_Shellder + cry_reverse Cry_Cloyster + cry_reverse Cry_Gastly + cry_reverse Cry_Haunter + cry_reverse Cry_Gengar + cry_reverse Cry_Onix + cry_reverse Cry_Drowzee + cry_reverse Cry_Hypno + cry_reverse Cry_Krabby + cry_reverse Cry_Kingler + cry_reverse Cry_Voltorb + cry_reverse Cry_Electrode + cry_reverse Cry_Exeggcute + cry_reverse Cry_Exeggutor + cry_reverse Cry_Cubone + cry_reverse Cry_Marowak + cry_reverse Cry_Hitmonlee + cry_reverse Cry_Hitmonchan + cry_reverse Cry_Lickitung + cry_reverse Cry_Koffing + cry_reverse Cry_Weezing + cry_reverse Cry_Rhyhorn + cry_reverse Cry_Rhydon + cry_reverse Cry_Chansey + cry_reverse Cry_Tangela + cry_reverse Cry_Kangaskhan + cry_reverse Cry_Horsea + cry_reverse Cry_Seadra + cry_reverse Cry_Goldeen + cry_reverse Cry_Seaking + cry_reverse Cry_Staryu + cry_reverse Cry_Starmie + cry_reverse Cry_MrMime + cry_reverse Cry_Scyther + cry_reverse Cry_Jynx + cry_reverse Cry_Electabuzz + cry_reverse Cry_Magmar + cry_reverse Cry_Pinsir + cry_reverse Cry_Tauros + cry_reverse Cry_Magikarp + cry_reverse Cry_Gyarados + cry_reverse Cry_Lapras + cry_reverse Cry_Ditto + cry_reverse Cry_Eevee + cry_reverse Cry_Vaporeon + cry_reverse Cry_Jolteon + cry_reverse Cry_Flareon + cry_reverse Cry_Porygon + cry_reverse Cry_Omanyte + cry_reverse Cry_Omastar + cry_reverse Cry_Kabuto + cry_reverse Cry_Kabutops + cry_reverse Cry_Aerodactyl + cry_reverse Cry_Snorlax + cry_reverse Cry_Articuno + cry_reverse Cry_Zapdos + cry_reverse Cry_Moltres + cry_reverse Cry_Dratini + cry_reverse Cry_Dragonair + cry_reverse Cry_Dragonite + cry_reverse Cry_Mewtwo + cry_reverse Cry_Mew + cry_reverse Cry_Chikorita + cry_reverse Cry_Bayleef + cry_reverse Cry_Meganium + cry_reverse Cry_Cyndaquil + cry_reverse Cry_Quilava + cry_reverse Cry_Typhlosion + cry_reverse Cry_Totodile + cry_reverse Cry_Croconaw + cry_reverse Cry_Feraligatr + cry_reverse Cry_Sentret + cry_reverse Cry_Furret + cry_reverse Cry_Hoothoot + cry_reverse Cry_Noctowl + cry_reverse Cry_Ledyba + cry_reverse Cry_Ledian + cry_reverse Cry_Spinarak + cry_reverse Cry_Ariados + cry_reverse Cry_Crobat + cry_reverse Cry_Chinchou + cry_reverse Cry_Lanturn + cry_reverse Cry_Pichu + cry_reverse Cry_Cleffa + cry_reverse Cry_Igglybuff + cry_reverse Cry_Togepi + cry_reverse Cry_Togetic + cry_reverse Cry_Natu + cry_reverse Cry_Xatu + cry_reverse Cry_Mareep + cry_reverse Cry_Flaaffy + cry_reverse Cry_Ampharos + cry_reverse Cry_Bellossom + cry_reverse Cry_Marill + cry_reverse Cry_Azumarill + cry_reverse Cry_Sudowoodo + cry_reverse Cry_Politoed + cry_reverse Cry_Hoppip + cry_reverse Cry_Skiploom + cry_reverse Cry_Jumpluff + cry_reverse Cry_Aipom + cry_reverse Cry_Sunkern + cry_reverse Cry_Sunflora + cry_reverse Cry_Yanma + cry_reverse Cry_Wooper + cry_reverse Cry_Quagsire + cry_reverse Cry_Espeon + cry_reverse Cry_Umbreon + cry_reverse Cry_Murkrow + cry_reverse Cry_Slowking + cry_reverse Cry_Misdreavus + cry_reverse Cry_Unown + cry_reverse Cry_Wobbuffet + cry_reverse Cry_Girafarig + cry_reverse Cry_Pineco + cry_reverse Cry_Forretress + cry_reverse Cry_Dunsparce + cry_reverse Cry_Gligar + cry_reverse Cry_Steelix + cry_reverse Cry_Snubbull + cry_reverse Cry_Granbull + cry_reverse Cry_Qwilfish + cry_reverse Cry_Scizor + cry_reverse Cry_Shuckle + cry_reverse Cry_Heracross + cry_reverse Cry_Sneasel + cry_reverse Cry_Teddiursa + cry_reverse Cry_Ursaring + cry_reverse Cry_Slugma + cry_reverse Cry_Magcargo + cry_reverse Cry_Swinub + cry_reverse Cry_Piloswine + cry_reverse Cry_Corsola + cry_reverse Cry_Remoraid + cry_reverse Cry_Octillery + cry_reverse Cry_Delibird + cry_reverse Cry_Mantine + cry_reverse Cry_Skarmory + cry_reverse Cry_Houndour + cry_reverse Cry_Houndoom + cry_reverse Cry_Kingdra + cry_reverse Cry_Phanpy + cry_reverse Cry_Donphan + cry_reverse Cry_Porygon2 + cry_reverse Cry_Stantler + cry_reverse Cry_Smeargle + cry_reverse Cry_Tyrogue + cry_reverse Cry_Hitmontop + cry_reverse Cry_Smoochum + cry_reverse Cry_Elekid + cry_reverse Cry_Magby + cry_reverse Cry_Miltank + cry_reverse Cry_Blissey + cry_reverse Cry_Raikou + cry_reverse Cry_Entei + cry_reverse Cry_Suicune + cry_reverse Cry_Larvitar + cry_reverse Cry_Pupitar + cry_reverse Cry_Tyranitar + cry_reverse Cry_Lugia + cry_reverse Cry_HoOh + cry_reverse Cry_Celebi + cry_reverse Cry_Kecleon + cry_reverse Cry_Roselia + cry_reverse Cry_Torkoal + cry_reverse Cry_Electrike + cry_reverse Cry_Manectric + cry_reverse Cry_Duskull + cry_reverse Cry_Latias + cry_reverse Cry_Wynaut + cry_reverse Cry_Seviper + cry_reverse Cry_Sharpedo + cry_reverse Cry_Zangoose + cry_reverse Cry_Azurill + cry_reverse Cry_Swablu + cry_reverse Cry_Altaria + cry_reverse Cry_Unused265 + cry_reverse Cry_Taillow + cry_reverse Cry_Swellow + cry_reverse Cry_Unused268 + cry_reverse Cry_Spinda + cry_reverse Cry_Torchic + cry_reverse Cry_Combusken + cry_reverse Cry_Blaziken + cry_reverse Cry_Treecko + cry_reverse Cry_Grovyle + cry_reverse Cry_Sceptile + cry_reverse Cry_Mudkip + cry_reverse Cry_Marshtomp + cry_reverse Cry_Swampert + cry_reverse Cry_Pelipper + cry_reverse Cry_Wingull + cry_reverse Cry_Banette + cry_reverse Cry_Shuppet + cry_reverse Cry_Lotad + cry_reverse Cry_Lombre + cry_reverse Cry_Ludicolo + cry_reverse Cry_Seedot + cry_reverse Cry_Nuzleaf + cry_reverse Cry_Shiftry + cry_reverse Cry_Carvanha + cry_reverse Cry_Wurmple + cry_reverse Cry_Silcoon + cry_reverse Cry_Beautifly + cry_reverse Cry_Cascoon + cry_reverse Cry_Dustox + cry_reverse Cry_Ralts + cry_reverse Cry_Kirlia + cry_reverse Cry_Gardevoir + cry_reverse Cry_Slakoth + cry_reverse Cry_Vigoroth + cry_reverse Cry_Slaking + cry_reverse Cry_Nincada + cry_reverse Cry_Ninjask + cry_reverse Cry_Shedinja + cry_reverse Cry_Makuhita + cry_reverse Cry_Hariyama + cry_reverse Cry_Nosepass + cry_reverse Cry_Glalie + cry_reverse Cry_Plusle + cry_reverse Cry_Minun + cry_reverse Cry_Surskit + cry_reverse Cry_Masquerain + cry_reverse Cry_Skitty + cry_reverse Cry_Delcatty + cry_reverse Cry_Gulpin + cry_reverse Cry_Swalot + cry_reverse Cry_Numel + cry_reverse Cry_Camerupt + cry_reverse Cry_Barboach + cry_reverse Cry_Whiscash + cry_reverse Cry_Corphish + cry_reverse Cry_Crawdaunt + cry_reverse Cry_Spoink + cry_reverse Cry_Grumpig + cry_reverse Cry_Trapinch + cry_reverse Cry_Vibrava + cry_reverse Cry_Flygon + cry_reverse Cry_Cacnea + cry_reverse Cry_Cacturne + cry_reverse Cry_Baltoy + cry_reverse Cry_Claydol + cry_reverse Cry_Lunatone + cry_reverse Cry_Solrock + cry_reverse Cry_Feebas + cry_reverse Cry_Milotic + cry_reverse Cry_Absol + cry_reverse Cry_Meditite + cry_reverse Cry_Medicham + cry_reverse Cry_Spheal + cry_reverse Cry_Sealeo + cry_reverse Cry_Walrein + cry_reverse Cry_Clamperl + cry_reverse Cry_Huntail + cry_reverse Cry_Gorebyss + cry_reverse Cry_Lileep + cry_reverse Cry_Cradily + cry_reverse Cry_Anorith + cry_reverse Cry_Armaldo + cry_reverse Cry_Beldum + cry_reverse Cry_Metang + cry_reverse Cry_Metagross + cry_reverse Cry_Bagon + cry_reverse Cry_Shelgon + cry_reverse Cry_Regirock + cry_reverse Cry_Regice + cry_reverse Cry_Registeel + cry_reverse Cry_Castform + cry_reverse Cry_Volbeat + cry_reverse Cry_Illumise + cry_reverse Cry_Poochyena + cry_reverse Cry_Mightyena + cry_reverse Cry_Dusclops + cry_reverse Cry_Sableye + cry_reverse Cry_Mawile + cry_reverse Cry_Aron + cry_reverse Cry_Lairon + cry_reverse Cry_Aggron + cry_reverse Cry_Relicanth + cry_reverse Cry_Luvdisc + cry_reverse Cry_Groudon + cry_reverse Cry_Kyogre + cry_reverse Cry_Rayquaza + cry_reverse Cry_Salamence + cry_reverse Cry_Breloom + cry_reverse Cry_Shroomish + cry_reverse Cry_Linoone + cry_reverse Cry_Tropius + cry_reverse Cry_Wailmer + cry_reverse Cry_Zigzagoon + cry_reverse Cry_Exploud + cry_reverse Cry_Loudred + cry_reverse Cry_Wailord + cry_reverse Cry_Whismur + cry_reverse Cry_Snorunt + cry_reverse Cry_Latios + cry_reverse Cry_Jirachi + cry_reverse Cry_Deoxys + cry_reverse Cry_Chimecho .align 2 voicegroup129:: diff --git a/src/battle_anim.c b/src/battle_anim.c index fe3fe2952..3b466329c 100644 --- a/src/battle_anim.c +++ b/src/battle_anim.c @@ -1857,7 +1857,7 @@ void LaunchBattleAnimation(const u8 *const animsTable[], u16 tableId, bool8 isMo { if (tableId == gMovesWithQuietBGM[i]) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128); break; } } @@ -2127,7 +2127,7 @@ static void ScriptCmd_end(void) if (!continuousAnim) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); ResetSpritePriorityOfAllVisibleBattlers(); UpdateOamPriorityInAllHealthboxes(1); gAnimScriptActive = FALSE; diff --git a/src/battle_anim_sound_tasks.c b/src/battle_anim_sound_tasks.c index 44deed318..b05819e70 100644 --- a/src/battle_anim_sound_tasks.c +++ b/src/battle_anim_sound_tasks.c @@ -4,6 +4,7 @@ #include "battle_anim.h" #include "task.h" #include "constants/battle_anim.h" +#include "constants/sound.h" static void sub_80DCE78(u8 taskId); static void sub_80DCEE4(u8 taskId); @@ -142,7 +143,7 @@ void SoundTask_PlayCryHighPitch(u8 taskId) else species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES); if (species != SPECIES_NONE) - PlayCry3(species, pan, 3); + PlayCry_ByMode(species, pan, CRY_MODE_HIGH_PITCH); DestroyAnimVisualTask(taskId); } @@ -177,10 +178,10 @@ void SoundTask_PlayDoubleCry(u8 taskId) gTasks[taskId].data[2] = pan; if (species != SPECIES_NONE) { - if (gBattleAnimArgs[1] == TAIL_SENTINEL) - PlayCry3(species, pan, 9); - else - PlayCry3(species, pan, 7); + if (gBattleAnimArgs[1] == DOUBLE_CRY_GROWL) + PlayCry_ByMode(species, pan, CRY_MODE_GROWL_1); + else // DOUBLE_CRY_ROAR + PlayCry_ByMode(species, pan, CRY_MODE_ROAR_1); gTasks[taskId].func = sub_80DD270; } else @@ -202,13 +203,13 @@ static void sub_80DD270(u8 taskId) { if (!IsCryPlaying()) { - PlayCry3(species, pan, 10); + PlayCry_ByMode(species, pan, CRY_MODE_GROWL_2); DestroyAnimVisualTask(taskId); } } else if (!IsCryPlaying()) { - PlayCry3(species, pan, 8); + PlayCry_ByMode(species, pan, CRY_MODE_ROAR_2); DestroyAnimVisualTask(taskId); } } @@ -232,7 +233,7 @@ void sub_80DD334(u8 taskId) gTasks[taskId].data[2] = pan; if (species != SPECIES_NONE) { - PlayCry3(species, pan, 4); + PlayCry_ByMode(species, pan, CRY_MODE_ECHO_START); gTasks[taskId].func = sub_80DD390; } else @@ -253,7 +254,7 @@ static void sub_80DD390(u8 taskId) u16 species = gTasks[taskId].data[1]; s8 pan = gTasks[taskId].data[2]; - PlayCry3(species, pan, 6); + PlayCry_ByMode(species, pan, CRY_MODE_ECHO_END); DestroyAnimVisualTask(taskId); } } diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index e5fd5678a..8901cb219 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -13,6 +13,7 @@ #include "battle_message.h" #include "constants/battle_anim.h" #include "constants/songs.h" +#include "constants/sound.h" #include "constants/trainers.h" static void LinkOpponentHandleGetMonData(void); @@ -231,7 +232,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); } gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3; gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd; @@ -366,7 +367,7 @@ static void SwitchIn_HandleSoundAndEnd(void) { if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); LinkOpponentBufferExecCompleted(); } } @@ -1512,7 +1513,7 @@ static void LinkOpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, 5); + PlayCry_ByMode(species, 25, CRY_MODE_FAINT); LinkOpponentBufferExecCompleted(); } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 09d2d198e..6fa7282e0 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -12,6 +12,7 @@ #include "battle_message.h" #include "constants/battle_anim.h" #include "constants/songs.h" +#include "constants/sound.h" static void LinkPartnerHandleGetMonData(void); static void LinkPartnerHandleGetRawMonData(void); @@ -1425,7 +1426,7 @@ static void LinkPartnerHandleFaintingCry(void) { u16 species = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, -25, 5); + PlayCry_ByMode(species, -25, CRY_MODE_FAINT); LinkPartnerBufferExecCompleted(); } diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 93c420aed..3fa84eee8 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -19,6 +19,7 @@ #include "constants/battle_anim.h" #include "constants/moves.h" #include "constants/songs.h" +#include "constants/sound.h" static void OpponentHandleGetMonData(void); static void OpponentHandleGetRawMonData(void); @@ -233,7 +234,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI) m4aMPlayContinue(&gMPlayInfo_BGM); else - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].introEndDelay = 3; gBattlerControllerFuncs[gActiveBattler] = Intro_DelayAndEnd; } @@ -372,7 +373,7 @@ static void SwitchIn_HandleSoundAndEnd(void) { if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); OpponentBufferExecCompleted(); } } @@ -1611,7 +1612,7 @@ static void OpponentHandleFaintingCry(void) { u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES); - PlayCry3(species, 25, 5); + PlayCry_ByMode(species, 25, CRY_MODE_FAINT); OpponentBufferExecCompleted(); } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 05b0ad224..0d54be29e 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -22,6 +22,7 @@ #include "constants/items.h" #include "constants/moves.h" #include "constants/songs.h" +#include "constants/sound.h" static void PlayerHandleGetMonData(void); static void PlayerHandleSetMonData(void); @@ -898,7 +899,7 @@ static void Intro_WaitForShinyAnimAndHealthbox(void) if (gBattleTypeFlags & BATTLE_TYPE_MULTI) m4aMPlayContinue(&gMPlayInfo_BGM); else - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); if (IsDoubleBattle()) HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]], gActiveBattler ^ BIT_FLANK); @@ -955,7 +956,7 @@ static void SwitchIn_HandleSoundAndEnd(void) if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].specialAnimActive && !IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); HandleLowHpMusicChange(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], gActiveBattler); PlayerBufferExecCompleted(); } @@ -984,7 +985,7 @@ void Task_PlayerController_RestoreBgmAfterCry(u8 taskId) { if (!IsCryPlayingOrClearCrySongs()) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); DestroyTask(taskId); } } @@ -2687,7 +2688,7 @@ static void PlayerHandlePlayFanfare(void) static void PlayerHandleFaintingCry(void) { - PlayCry3(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, 5); + PlayCry_ByMode(GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES), -25, CRY_MODE_FAINT); PlayerBufferExecCompleted(); } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index f9b00d0a9..ee69a4785 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -3214,9 +3214,7 @@ static void Cmd_getexp(void) else { // music change in wild battle after fainting a poke - if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_POKEDUDE)) - && gBattleMons[0].hp != 0 - && !gBattleStruct->wildVictorySong) + if (!(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_POKEDUDE)) && gBattleMons[0].hp != 0 && !gBattleStruct->wildVictorySong) { BattleStopLowHpSound(); PlayBGM(MUS_VICTORY_WILD); diff --git a/src/credits.c b/src/credits.c index d9dde1c2c..5b92c9c99 100644 --- a/src/credits.c +++ b/src/credits.c @@ -14,6 +14,7 @@ #include "quest_log.h" #include "constants/maps.h" #include "constants/field_weather.h" +#include "constants/sound.h" #if defined(FIRERED) #define TITLE_TEXT gString_PokemonFireRed_Staff @@ -1190,7 +1191,7 @@ static bool32 DoCreditsMonScene(void) { HideBg(2); ShowBg(1); - PlayCry2(GetCreditsMonSpecies(sCreditsMgr->whichMon), 0, 125, 10); + PlayCry_NormalNoDucking(GetCreditsMonSpecies(sCreditsMgr->whichMon), 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); sCreditsMgr->creditsMonTimer = 128; sCreditsMgr->subseqno++; } diff --git a/src/diploma.c b/src/diploma.c index 14ea9814d..0304c7ae3 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -8,7 +8,7 @@ #include "scanline_effect.h" #include "strings.h" #include "task.h" -#include "constants/fanfares.h" +#include "constants/sound.h" struct Diploma { @@ -148,7 +148,7 @@ static void Task_DiplomaInit(u8 taskId) { break; } - PlayFanfareByFanfareNum(FANFARE_05); + PlayFanfareByFanfareNum(FANFARE_OBTAIN_BADGE); gTasks[taskId].func = Task_WaitForExit; } gDiploma->callbackStep++; diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 75ea3a52d..8ad1256f1 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -13,7 +13,7 @@ #include "task.h" #include "text_window.h" #include "constants/songs.h" -#include "constants/fanfares.h" +#include "constants/sound.h" #include "constants/items.h" struct DodrioStruct @@ -1204,7 +1204,7 @@ static void sub_8151D98(void) } else if (gUnknown_203F3E0->unk154 == 1) { - PlayFanfareByFanfareNum(FANFARE_10); // MUS_TOO_BAD + PlayFanfareByFanfareNum(FANFARE_TOO_BAD); gUnknown_203F3E0->unk154 = 2; } } @@ -1262,7 +1262,7 @@ static void sub_8151E94(void) } else if (gUnknown_203F3E0->unk154 == 1) { - PlayFanfareByFanfareNum(FANFARE_10); // MUS_TOO_BAD + PlayFanfareByFanfareNum(FANFARE_TOO_BAD); gUnknown_203F3E0->unk154 = 2; } } diff --git a/src/field_effect.c b/src/field_effect.c index cb8191459..f2bfa3976 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -27,6 +27,7 @@ #include "constants/event_object_movement.h" #include "constants/metatile_behaviors.h" #include "constants/songs.h" +#include "constants/sound.h" extern struct CompressedSpritePalette gMonPaletteTable[]; // Intentionally declared (incorrectly) without const in order to match extern const struct CompressedSpritePalette gTrainerFrontPicPaletteTable[]; @@ -2935,7 +2936,7 @@ static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite * sprite) sprite->callback = SpriteCB_FieldMoveMonWaitAfterCry; if (sprite->data[6]) { - PlayCry2(sprite->data[0], 0, 0x7d, 0xa); + PlayCry_NormalNoDucking(sprite->data[0], 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); } else { diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 75658a28e..849fd2352 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -907,7 +907,7 @@ static void Task_HofPC_HandleInput(u8 taskId) if (IsCryPlayingOrClearCrySongs()) { StopCryAndClearCrySongs(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; } @@ -917,7 +917,7 @@ static void Task_HofPC_HandleInput(u8 taskId) if (IsCryPlayingOrClearCrySongs()) { StopCryAndClearCrySongs(); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); } gTasks[taskId].func = Task_HofPC_HandlePaletteOnExit; } diff --git a/src/help_system_util.c b/src/help_system_util.c index fc74662f7..ed7aa6b78 100644 --- a/src/help_system_util.c +++ b/src/help_system_util.c @@ -60,7 +60,7 @@ u8 RunHelpSystemCallback(void) m4aMPlayStop(&gMPlayInfo_SE2); PlaySE(SE_HELP_OPEN); if (!gDisableHelpSystemVolumeReduce) - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x80); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x80); SaveCallbacks(); sInHelpSystem = 1; sVideoState.state = 1; @@ -122,7 +122,7 @@ u8 RunHelpSystemCallback(void) break; case 7: if (!gDisableHelpSystemVolumeReduce) - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0x100); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0x100); RestoreMapTextColors(); RestoreGPURegs(); sVideoState.state = 8; diff --git a/src/intro.c b/src/intro.c index bee854379..9466301d2 100644 --- a/src/intro.c +++ b/src/intro.c @@ -14,6 +14,7 @@ #include "util.h" #include "trig.h" #include "constants/songs.h" +#include "constants/sound.h" struct IntroSequenceData; @@ -2205,7 +2206,7 @@ static void SpriteCB_NidorinoRearsUp(struct Sprite * sprite) } break; case 1: - PlayCry3(SPECIES_NIDORINO, 0x3F, 1); + PlayCry_ByMode(SPECIES_NIDORINO, 0x3F, CRY_MODE_DOUBLES); sprite->data[1] = 0; sprite->data[0]++; break; diff --git a/src/item_use.c b/src/item_use.c index 990ac6d04..cdafef34f 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -31,7 +31,7 @@ #include "teachy_tv.h" #include "tm_case.h" #include "vs_seeker.h" -#include "constants/fanfares.h" +#include "constants/sound.h" #include "constants/items.h" #include "constants/maps.h" #include "constants/moves.h" @@ -386,7 +386,7 @@ void FieldUseFunc_PokeFlute(u8 taskId) static void sub_80A1648(u8 taskId) { - PlayFanfareByFanfareNum(FANFARE_POKEFLUTE); + PlayFanfareByFanfareNum(FANFARE_POKE_FLUTE); gTasks[taskId].func = sub_80A1674; } diff --git a/src/overworld.c b/src/overworld.c index 3e4e1b0bf..a1b169e1f 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -50,6 +50,7 @@ #include "constants/maps.h" #include "constants/region_map_sections.h" #include "constants/songs.h" +#include "constants/sound.h" #define PLAYER_LINK_STATE_IDLE 0x80 #define PLAYER_LINK_STATE_BUSY 0x81 @@ -1141,7 +1142,7 @@ static void PlayAmbientCry(void) if (gDisableMapMusicChangeOnMapLoad == MUSIC_DISABLE_KEEP) return; - PlayCry2(sAmbientCrySpecies, pan, volume, 1); + PlayCry_NormalNoDucking(sAmbientCrySpecies, pan, volume, CRY_PRIORITY_AMBIENT); } void UpdateAmbientCry(s16 *state, u16 *delayCounter) diff --git a/src/party_menu.c b/src/party_menu.c index 377d4b8fb..4bceaea7d 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -67,6 +67,7 @@ #include "constants/pokemon.h" #include "constants/quest_log.h" #include "constants/songs.h" +#include "constants/sound.h" #define PARTY_PAL_SELECTED (1 << 0) #define PARTY_PAL_FAINTED (1 << 1) @@ -5083,7 +5084,7 @@ static void ItemUseCB_RareCandyStep(u8 taskId, UNUSED TaskFunc func) GetMonLevelUpWindowStats(mon, &ptr->data[NUM_STATS]); gPartyMenuUseExitCallback = TRUE; ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, mon, gSpecialVar_ItemId, 0xFFFF); - PlayFanfareByFanfareNum(0); + PlayFanfareByFanfareNum(FANFARE_LEVEL_UP); UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon); RemoveBagItem(gSpecialVar_ItemId, 1); GetMonNickname(mon, gStringVar1); diff --git a/src/pokeball.c b/src/pokeball.c index fec1866cc..6434b72cd 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -12,6 +12,7 @@ #include "link.h" #include "battle_gfx_sfx_util.h" #include "constants/songs.h" +#include "constants/sound.h" #define tFrames data[0] #define tPan data[1] @@ -681,9 +682,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) break; case 1: if (ShouldPlayNormalPokeCry(mon) == TRUE) - PlayCry3(species, pan, 0); + PlayCry_ByMode(species, pan, CRY_MODE_NORMAL); else - PlayCry3(species, pan, 11); + PlayCry_ByMode(species, pan, CRY_MODE_WEAK); DestroyTask(taskId); break; @@ -696,9 +697,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) if (gTasks[taskId].tCryTaskFrames == 0) { if (ShouldPlayNormalPokeCry(mon) == TRUE) - PlayCry4(species, pan, 1); + PlayCry_ReleaseDouble(species, pan, 1); else - PlayCry4(species, pan, 12); + PlayCry_ReleaseDouble(species, pan, 12); DestroyTask(taskId); } @@ -734,9 +735,9 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) } if (ShouldPlayNormalPokeCry(mon) == TRUE) - PlayCry4(species, pan, 0); + PlayCry_ReleaseDouble(species, pan, 0); else - PlayCry4(species, pan, 11); + PlayCry_ReleaseDouble(species, pan, 11); DestroyTask(taskId); break; @@ -784,7 +785,7 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128); } } diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 780a59698..1e5768f5a 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -17,6 +17,7 @@ #include "trainer_pokemon_sprites.h" #include "decompress.h" #include "constants/songs.h" +#include "constants/sound.h" #include "pokedex_area_markers.h" #include "field_specials.h" @@ -1751,7 +1752,7 @@ static void Task_DexScreen_CategorySubmenu(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); sPokedexScreenData->data[0] = 0; sPokedexScreenData->state = 17; } @@ -1927,7 +1928,7 @@ static void Task_DexScreen_ShowMonPage(u8 taskId) CopyBgTilemapBufferToVram(2); CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); sPokedexScreenData->state = 4; break; case 4: @@ -3295,7 +3296,7 @@ static u8 DexScreen_PageNumberToRenderablePages(u16 page) void DexScreen_InputHandler_StartToCry(void) { if (JOY_NEW(START_BUTTON)) - PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); } u8 DexScreen_RegisterMonToPokedex(u16 species) @@ -3413,7 +3414,7 @@ static void Task_DexScreen_RegisterMonToPokedex(u8 taskId) CopyBgTilemapBufferToVram(1); CopyBgTilemapBufferToVram(0); - PlayCry2(sPokedexScreenData->dexSpecies, 0, 125, 10); + PlayCry_NormalNoDucking(sPokedexScreenData->dexSpecies, 0, CRY_VOLUME_RS, CRY_PRIORITY_NORMAL); sPokedexScreenData->data[0] = 0; sPokedexScreenData->state = 11; } diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2f57133b7..61dffc7c4 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -33,6 +33,7 @@ #include "battle_interface.h" #include "mon_markings.h" #include "pokemon_storage_system.h" +#include "constants/sound.h" // needs conflicting header to match (curIndex is s8 in the function, but has to be defined as u8 here) extern s16 SeekToNextMonInBox(struct BoxPokemon * boxMons, u8 curIndex, u8 maxIndex, u8 flags); @@ -5181,9 +5182,9 @@ static void PokeSum_TryPlayMonCry(void) if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG)) { if (ShouldPlayNormalPokeCry(&sMonSummaryScreen->currentMon) == TRUE) - PlayCry3(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, 0); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL); else - PlayCry3(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, 11); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK); } } diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 7fd2f0f9f..e570b7fa4 100644 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -40,7 +40,7 @@ bool32 RunSaveFailedScreen(void) case 0: if (!sIsInSaveFailedScreen) return FALSE; - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 128); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 128); SaveCallbacks(); sSaveFailedScreenState = 1; break; @@ -95,7 +95,7 @@ bool32 RunSaveFailedScreen(void) sSaveFailedScreenState = 8; break; case 8: - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); RestoreMapTextColors(); RestoreGPURegs(); RestoreCallbacks(); diff --git a/src/scrcmd.c b/src/scrcmd.c index 224da3ef4..523523548 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -34,6 +34,7 @@ #include "fieldmap.h" #include "field_door.h" #include "constants/event_objects.h" +#include "constants/sound.h" extern u16 (*const gSpecials[])(void); extern u16 (*const gSpecialsEnd[])(void); @@ -1523,7 +1524,7 @@ bool8 ScrCmd_showmonpic(struct ScriptContext * ctx) u8 y = ScriptReadByte(ctx); ScriptMenu_ShowPokemonPic(species, x, y); - PlayCry7(species, 0); + PlayCry_Script(species, CRY_MODE_NORMAL); return FALSE; } @@ -2085,7 +2086,7 @@ bool8 ScrCmd_playmoncry(struct ScriptContext * ctx) u16 species = VarGet(ScriptReadHalfword(ctx)); u16 mode = VarGet(ScriptReadHalfword(ctx)); - PlayCry7(species, mode); + PlayCry_Script(species, mode); return FALSE; } diff --git a/src/sound.c b/src/sound.c index 04316adc0..636f88bb3 100644 --- a/src/sound.c +++ b/src/sound.c @@ -5,7 +5,7 @@ #include "quest_log.h" #include "m4a.h" #include "constants/songs.h" -#include "constants/fanfares.h" +#include "constants/sound.h" #include "task.h" struct Fanfare @@ -38,24 +38,7 @@ extern struct MusicPlayerInfo gMPlayInfo_SE1; extern struct MusicPlayerInfo gMPlayInfo_SE2; extern struct MusicPlayerInfo gMPlayInfo_SE3; extern struct ToneData gCryTable[]; -extern struct ToneData gCryTable2[]; - -static const struct Fanfare sFanfares[] = { - [FANFARE_00] = { MUS_LEVEL_UP, 80 }, - [FANFARE_01] = { MUS_OBTAIN_ITEM, 160 }, - [FANFARE_02] = { MUS_EVOLVED, 220 }, - [FANFARE_03] = { MUS_OBTAIN_TMHM, 220 }, - [FANFARE_04] = { MUS_HEAL, 160 }, - [FANFARE_05] = { MUS_OBTAIN_BADGE, 340 }, - [FANFARE_06] = { MUS_MOVE_DELETED, 180 }, - [FANFARE_07] = { MUS_OBTAIN_BERRY, 120 }, - [FANFARE_08] = { MUS_SLOTS_JACKPOT, 250 }, - [FANFARE_09] = { MUS_SLOTS_WIN, 150 }, - [FANFARE_10] = { MUS_TOO_BAD, 160 }, - [FANFARE_POKEFLUTE] = { MUS_POKE_FLUTE, 450 }, - [FANFARE_KEY_ITEM] = { MUS_OBTAIN_KEY_ITEM, 170 }, - [FANFARE_DEX_EVAL] = { MUS_DEX_RATING, 196 } -}; +extern struct ToneData gCryTable_Reverse[]; extern u16 SpeciesToCryId(u16); @@ -64,7 +47,22 @@ static void CreateFanfareTask(void); static void Task_DuckBGMForPokemonCry(u8 taskId); static void RestoreBGMVolumeAfterPokemonCry(void); -#define CRY_VOLUME 120 // was 125 in R/S +static const struct Fanfare sFanfares[] = { + [FANFARE_LEVEL_UP] = { MUS_LEVEL_UP, 80 }, + [FANFARE_OBTAIN_ITEM] = { MUS_OBTAIN_ITEM, 160 }, + [FANFARE_EVOLVED] = { MUS_EVOLVED, 220 }, + [FANFARE_OBTAIN_TMHM] = { MUS_OBTAIN_TMHM, 220 }, + [FANFARE_HEAL] = { MUS_HEAL, 160 }, + [FANFARE_OBTAIN_BADGE] = { MUS_OBTAIN_BADGE, 340 }, + [FANFARE_MOVE_DELETED] = { MUS_MOVE_DELETED, 180 }, + [FANFARE_OBTAIN_BERRY] = { MUS_OBTAIN_BERRY, 120 }, + [FANFARE_SLOTS_JACKPOT] = { MUS_SLOTS_JACKPOT, 250 }, + [FANFARE_SLOTS_WIN] = { MUS_SLOTS_WIN, 150 }, + [FANFARE_TOO_BAD] = { MUS_TOO_BAD, 160 }, + [FANFARE_POKE_FLUTE] = { MUS_POKE_FLUTE, 450 }, + [FANFARE_KEY_ITEM] = { MUS_OBTAIN_KEY_ITEM, 170 }, + [FANFARE_DEX_EVAL] = { MUS_DEX_RATING, 196 } +}; void InitMapMusic(void) { @@ -168,6 +166,7 @@ void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed) sMapMusicFadeInSpeed = fadeInSpeed; } +// Unused static void FadeInNewMapMusic(u16 songNum, u8 speed) { FadeInNewBGM(songNum, speed); @@ -191,7 +190,6 @@ bool8 IsNotWaitingForBGMStop(void) void PlayFanfareByFanfareNum(u8 fanfareNum) { u16 songNum; - if(gQuestLogState == QL_STATE_PLAYBACK) { sFanfareCounter = 0xFF; @@ -223,6 +221,7 @@ bool8 WaitFanfare(bool8 stop) } } +// Unused void StopFanfareByFanfareNum(u8 fanfareNum) { m4aSongNumStop(sFanfares[fanfareNum].songNum); @@ -231,7 +230,7 @@ void StopFanfareByFanfareNum(u8 fanfareNum) void PlayFanfare(u16 songNum) { s32 i; - for (i = 0; (u32)i < 14; i++) + for (i = 0; (u32)i < ARRAY_COUNT(sFanfares); i++) { if (sFanfares[i].songNum == songNum) { @@ -241,6 +240,8 @@ void PlayFanfare(u16 songNum) } } + // songNum is not in sFanfares + // Play first fanfare in table instead PlayFanfareByFanfareNum(0); CreateFanfareTask(); } @@ -275,11 +276,11 @@ void FadeInNewBGM(u16 songNum, u8 speed) { if (gDisableMusic) songNum = 0; - if (songNum == 0xFFFF) + if (songNum == MUS_NONE) songNum = 0; m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_BGM); - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 0); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 0); m4aSongNumStop(songNum); m4aMPlayFadeIn(&gMPlayInfo_BGM, speed); } @@ -317,54 +318,54 @@ bool8 IsBGMStopped(void) void PlayCry_Normal(u16 species, s8 pan) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, 0); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, CRY_MODE_NORMAL); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } -void PlayCry2(u16 species, s8 pan, s8 volume, u8 priority) +void PlayCry_NormalNoDucking(u16 species, s8 pan, s8 volume, u8 priority) { - PlayCryInternal(species, pan, volume, priority, 0); + PlayCryInternal(species, pan, volume, priority, CRY_MODE_NORMAL); } -void PlayCry3(u16 species, s8 pan, u8 mode) +// Assuming it's not CRY_MODE_DOUBLES, this is equivalent to PlayCry_Normal except it allows other modes. +void PlayCry_ByMode(u16 species, s8 pan, u8 mode) { - if (mode == 1) + if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } else { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); } } -void PlayCry4(u16 species, s8 pan, u8 mode) +// Used when releasing multiple Pokémon at once in battle. +void PlayCry_ReleaseDouble(u16 species, s8 pan, u8 mode) { - if (mode == 1) + if (mode == CRY_MODE_DOUBLES) { - PlayCryInternal(species, pan, CRY_VOLUME, 10, 1); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } else { if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); - PlayCryInternal(species, pan, CRY_VOLUME, 10, mode); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); + PlayCryInternal(species, pan, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } } -// PlayCry5 and 6 are not in FR/LG. - -void PlayCry7(u16 species, u8 mode) // exclusive to FR/LG +void PlayCry_Script(u16 species, u8 mode) { - if (!QL_IS_PLAYBACK_STATE) + if (!QL_IS_PLAYBACK_STATE) // This check is exclusive to FR/LG { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 85); - PlayCryInternal(species, 0, CRY_VOLUME, 10, mode); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 85); + PlayCryInternal(species, 0, CRY_VOLUME, CRY_PRIORITY_NORMAL, mode); } gPokemonCryBGMDuckingCounter = 2; RestoreBGMVolumeAfterPokemonCry(); @@ -372,7 +373,7 @@ void PlayCry7(u16 species, u8 mode) // exclusive to FR/LG void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) { - bool32 v0; + bool32 reverse; u32 release; u32 length; u32 pitch; @@ -381,76 +382,80 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) u8 table; species--; + + // Set default values + // May be overridden depending on mode. length = 140; - v0 = FALSE; + reverse = FALSE; release = 0; pitch = 15360; chorus = 0; switch (mode) { - case 0: + case CRY_MODE_NORMAL: break; - case 1: + case CRY_MODE_DOUBLES: length = 20; release = 225; break; - case 2: + case CRY_MODE_ENCOUNTER: release = 225; pitch = 15600; chorus = 20; volume = 90; break; - case 3: + case CRY_MODE_HIGH_PITCH: length = 50; release = 200; pitch = 15800; chorus = 20; volume = 90; break; - case 4: + case CRY_MODE_ECHO_START: length = 25; - v0 = TRUE; + reverse = TRUE; release = 100; pitch = 15600; chorus = 192; volume = 90; break; - case 5: + case CRY_MODE_FAINT: release = 200; pitch = 14440; break; - case 6: // _08072044 + case CRY_MODE_ECHO_END: release = 220; pitch = 15555; chorus = 192; volume = 90; // FR/LG changed this from 70 to 90 break; - case 7: + case CRY_MODE_ROAR_1: length = 10; release = 100; pitch = 14848; break; - case 8: + case CRY_MODE_ROAR_2: length = 60; release = 225; pitch = 15616; break; - case 9: + case CRY_MODE_GROWL_1: length = 15; - v0 = TRUE; + reverse = TRUE; release = 125; pitch = 15200; break; - case 10: + case CRY_MODE_GROWL_2: length = 100; release = 225; pitch = 15200; break; - case 12: + case CRY_MODE_WEAK_DOUBLES: length = 20; release = 225; - case 11: + // fallthrough + case CRY_MODE_WEAK: pitch = 15000; break; } @@ -469,28 +474,29 @@ void PlayCryInternal(u16 species, s8 pan, s8 volume, u8 priority, u8 mode) // If you wish to expand pokemon, you need to // append new cases to the switch. species = SpeciesToCryId(species); - index = species & 0x7F; + index = species % 128; table = species / 128; + #define GET_CRY(speciesIndex, tableId, reversed) \ + ((reversed) ? &gCryTable_Reverse[(128 * (tableId)) + (speciesIndex)] : &gCryTable[(128 * (tableId)) + (speciesIndex)]) + switch (table) { case 0: - gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 0) + index] : &gCryTable[(128 * 0) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 0, reverse)); break; case 1: - gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 1) + index] : &gCryTable[(128 * 1) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 1, reverse)); break; case 2: - gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 2) + index] : &gCryTable[(128 * 2) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 2, reverse)); break; case 3: - gMPlay_PokemonCry = SetPokemonCryTone( - v0 ? &gCryTable2[(128 * 3) + index] : &gCryTable[(128 * 3) + index]); + gMPlay_PokemonCry = SetPokemonCryTone(GET_CRY(index, 3, reverse)); break; } + + #undef GET_CRY } bool8 IsCryFinished(void) @@ -548,7 +554,7 @@ static void Task_DuckBGMForPokemonCry(u8 taskId) if (!IsPokemonCryPlaying(gMPlay_PokemonCry)) { - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); DestroyTask(taskId); } } @@ -563,14 +569,14 @@ void PlayBGM(u16 songNum) { if (gDisableMusic) songNum = 0; - if (songNum == 0xFFFF) + if (songNum == MUS_NONE) songNum = 0; m4aSongNumStart(songNum); } void PlaySE(u16 songNum) { - if(gDisableMapMusicChangeOnMapLoad == 0 && gQuestLogState != QL_STATE_PLAYBACK) + if (gDisableMapMusicChangeOnMapLoad == 0 && gQuestLogState != QL_STATE_PLAYBACK) m4aSongNumStart(songNum); } @@ -579,28 +585,28 @@ void PlaySE12WithPanning(u16 songNum, s8 pan) m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE1); m4aMPlayImmInit(&gMPlayInfo_SE2); - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } void PlaySE1WithPanning(u16 songNum, s8 pan) { m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE1); - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); } void PlaySE2WithPanning(u16 songNum, s8 pan) { m4aSongNumStart(songNum); m4aMPlayImmInit(&gMPlayInfo_SE2); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } void SE12PanpotControl(s8 pan) { - m4aMPlayPanpotControl(&gMPlayInfo_SE1, 0xFFFF, pan); - m4aMPlayPanpotControl(&gMPlayInfo_SE2, 0xFFFF, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE1, TRACKS_ALL, pan); + m4aMPlayPanpotControl(&gMPlayInfo_SE2, TRACKS_ALL, pan); } bool8 IsSEPlaying(void) @@ -633,11 +639,11 @@ bool8 IsSpecialSEPlaying(void) void SetBGMVolume_SuppressHelpSystemReduction(u16 volume) { gDisableHelpSystemVolumeReduce = TRUE; - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, volume); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, volume); } void BGMVolumeMax_EnableHelpSystemReduction(void) { gDisableHelpSystemVolumeReduce = FALSE; - m4aMPlayVolumeControl(&gMPlayInfo_BGM, 0xFFFF, 256); + m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256); } From c40791fd4ef2fb2e56df778cb6e5969a3a10cb69 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 29 Jul 2022 18:37:43 -0400 Subject: [PATCH 02/13] SPRITE_INVALID_TAG -> TAG_NONE --- include/sprite.h | 2 +- src/battle_anim_status_effects.c | 2 +- src/battle_transition.c | 6 +- src/data/field_effects/field_effect_objects.h | 90 ++--- .../object_event_graphics_info.h | 308 +++++++++--------- src/event_object_movement.c | 14 +- src/field_effect.c | 14 +- src/list_menu.c | 2 +- src/menu_indicators.c | 24 +- src/pokeball.c | 2 +- src/pokemon.c | 24 +- src/pokemon_icon.c | 2 +- 12 files changed, 245 insertions(+), 245 deletions(-) diff --git a/include/sprite.h b/include/sprite.h index 228e186e6..9fa6280dc 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -4,7 +4,7 @@ #include "global.h" #define MAX_SPRITES 64 -#define SPRITE_INVALID_TAG 0xFFFF +#define TAG_NONE 0xFFFF struct SpriteSheet { diff --git a/src/battle_anim_status_effects.c b/src/battle_anim_status_effects.c index 366023449..4abcb083a 100644 --- a/src/battle_anim_status_effects.c +++ b/src/battle_anim_status_effects.c @@ -355,7 +355,7 @@ void AnimTask_FrozenIceCube(u8 taskId) SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(0, 16)); spriteId = CreateSprite(&sUnknown_83BF55C, x, y, 4); - if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == SPRITE_INVALID_TAG) + if (GetSpriteTileStartByTag(ANIM_TAG_ICE_CUBE) == TAG_NONE) gSprites[spriteId].invisible = TRUE; SetSubspriteTables(&gSprites[spriteId], sUnknown_83BF554); diff --git a/src/battle_transition.c b/src/battle_transition.c index a14cfd3e3..0682cfaaa 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -466,7 +466,7 @@ static const union AffineAnimCmd *const sSpriteAffineAnimTable_SlidingPokeball[] static const struct SpriteTemplate sSpriteTemplate_SlidingPokeball = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0x1009, .oam = &gObjectEventBaseOam_32x32, .anims = sSpriteAnimTable_SlidingPokeball, @@ -519,7 +519,7 @@ static const union AnimCmd *const sSpriteAnimTable_Unused[] = { sSpriteAnim_Unus static const struct SpriteTemplate sSpriteTemplateTable_Unused[] = { { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0x100A, .oam = &sOamData_Unused, .anims = sSpriteAnimTable_Unused, @@ -528,7 +528,7 @@ static const struct SpriteTemplate sSpriteTemplateTable_Unused[] = .callback = SpriteCB_BT_Phase2Mugshots, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0x100A, .oam = &sOamData_Unused, .anims = sSpriteAnimTable_Unused, diff --git a/src/data/field_effects/field_effect_objects.h b/src/data/field_effects/field_effect_objects.h index 00c40f75b..780ef92f8 100644 --- a/src/data/field_effects/field_effect_objects.h +++ b/src/data/field_effects/field_effect_objects.h @@ -19,8 +19,8 @@ static const struct SpriteFrameImage sPicTable_ShadowExtraLarge[] = { obj_frame_ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_8x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowSmall, @@ -30,8 +30,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowSmall = const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowMedium, @@ -41,8 +41,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowMedium = const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x8, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowLarge, @@ -52,8 +52,8 @@ const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowLarge = const struct SpriteTemplate gFieldEffectObjectTemplate_ShadowExtraLarge = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_64x32, .anims = sAnimTable_Shadow, .images = sPicTable_ShadowExtraLarge, @@ -87,7 +87,7 @@ static const union AnimCmd *const sAnimTable_TallGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_TallGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_TallGrass, @@ -125,7 +125,7 @@ static const union AnimCmd *const sAnimTable_Ripple[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Ripple = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Ripple, @@ -160,7 +160,7 @@ static const union AnimCmd *const sAnimTable_Ash[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Ash = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Ash, @@ -217,8 +217,8 @@ static const union AnimCmd *const sAnimTable_SurfBlob[] = const struct SpriteTemplate gFieldEffectObjectTemplate_SurfBlob = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_32x32, .anims = sAnimTable_SurfBlob, .images = sPicTable_SurfBlob, @@ -276,8 +276,8 @@ static const union AnimCmd *const sAnimTable_Arrow[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Arrow = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_Arrow, .images = sPicTable_Arrow, @@ -307,7 +307,7 @@ static const union AnimCmd *const sAnimTable_GroundImpactDust[] = const struct SpriteTemplate gFieldEffectObjectTemplate_GroundImpactDust = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_GroundImpactDust, @@ -340,7 +340,7 @@ static const union AnimCmd *const sAnimTable_JumpTallGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_JumpTallGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_JumpTallGrass, @@ -390,7 +390,7 @@ static const union AnimCmd *const sAnimTable_SandFootprints[] = const struct SpriteTemplate gFieldEffectObjectTemplate_SandFootprints = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_SandFootprints, @@ -440,7 +440,7 @@ static const union AnimCmd *const sAnimTable_DeepSandFootprints[] = const struct SpriteTemplate gFieldEffectObjectTemplate_DeepSandFootprints = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_DeepSandFootprints, @@ -520,7 +520,7 @@ static const union AnimCmd *const sAnimTable_BikeTireTracks[] = const struct SpriteTemplate gFieldEffectObjectTemplate_BikeTireTracks = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_BikeTireTracks, @@ -553,7 +553,7 @@ static const union AnimCmd *const sAnimTable_JumpBigSplash[] = const struct SpriteTemplate gFieldEffectObjectTemplate_JumpBigSplash = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_JumpBigSplash, @@ -596,7 +596,7 @@ static const union AnimCmd *const sAnimTable_Splash[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Splash = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_Splash, @@ -627,7 +627,7 @@ static const union AnimCmd *const sAnimTable_JumpSmallSplash[] = const struct SpriteTemplate gFieldEffectObjectTemplate_JumpSmallSplash = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_JumpSmallSplash, @@ -663,7 +663,7 @@ static const union AnimCmd *const sAnimTable_LongGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_LongGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_LongGrass, @@ -700,7 +700,7 @@ static const union AnimCmd *const sAnimTable_JumpLongGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_JumpLongGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_JumpLongGrass, @@ -743,7 +743,7 @@ static const union AnimCmd *const sAnimTable_UnusedGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedGrass, @@ -778,7 +778,7 @@ static const union AnimCmd *const sAnimTable_UnusedGrass2[] = const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedGrass2 = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedGrass2, @@ -811,7 +811,7 @@ static const union AnimCmd *const sAnimTable_UnusedSand[] = const struct SpriteTemplate gFieldEffectObjectTemplate_UnusedSand = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_UnusedSand, @@ -842,7 +842,7 @@ static const union AnimCmd *const sAnimTable_SandPile[] = const struct SpriteTemplate gFieldEffectObjectTemplate_SandPile = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x8, .anims = sAnimTable_SandPile, @@ -877,7 +877,7 @@ static const union AnimCmd *const sAnimTable_WaterSurfacing[] = const struct SpriteTemplate gFieldEffectObjectTemplate_WaterSurfacing = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_WaterSurfacing, @@ -923,7 +923,7 @@ const union AffineAnimCmd *const sAffineAnims_ReflectionDistortion[] = const struct SpriteTemplate gFieldEffectObjectTemplate_ReflectionDistortion = { .tileTag = 0x0, - .paletteTag = SPRITE_INVALID_TAG, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -1019,8 +1019,8 @@ static const union AnimCmd *const sAnimTable_TreeDisguise[] = const struct SpriteTemplate gFieldEffectObjectTemplate_TreeDisguise = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_TreeDisguise, .images = sPicTable_TreeDisguise, @@ -1065,8 +1065,8 @@ static const union AnimCmd *const sAnimTable_MountainDisguise[] = const struct SpriteTemplate gFieldEffectObjectTemplate_MountainDisguise = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_MountainDisguise, .images = sPicTable_MountainDisguise, @@ -1087,8 +1087,8 @@ static const struct SpriteFrameImage sPicTable_SandDisguisePlaceholder[] = const struct SpriteTemplate gFieldEffectObjectTemplate_SandDisguisePlaceholder = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_TreeDisguise, .images = sPicTable_SandDisguisePlaceholder, @@ -1146,8 +1146,8 @@ static const union AnimCmd *const sAnimTable_Bird[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Bird = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &gObjectEventBaseOam_64x64, .anims = sAnimTable_Bird, .images = sPicTable_Bird, @@ -1175,7 +1175,7 @@ static const union AnimCmd *const sAnimTable_ShortGrass[] = const struct SpriteTemplate gFieldEffectObjectTemplate_ShortGrass = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_ShortGrass, @@ -1202,7 +1202,7 @@ static const union AnimCmd *const sAnimTable_HotSpringsWater[] = const struct SpriteTemplate gFieldEffectObjectTemplate_HotSpringsWater = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_1, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_HotSpringsWater, @@ -1237,7 +1237,7 @@ static const union AnimCmd *const sAnimTable_AshPuff[] = const struct SpriteTemplate gFieldEffectObjectTemplate_AshPuff = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_ASH, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_AshPuff, @@ -1274,7 +1274,7 @@ static const union AnimCmd *const sAnimTable_AshLaunch[] = const struct SpriteTemplate gFieldEffectObjectTemplate_AshLaunch = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_ASH, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_AshLaunch, @@ -1315,7 +1315,7 @@ static const union AnimCmd *const sAnimTable_Bubbles[] = const struct SpriteTemplate gFieldEffectObjectTemplate_Bubbles = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_GENERAL_0, .oam = &gObjectEventBaseOam_16x32, .anims = sAnimTable_Bubbles, @@ -1345,7 +1345,7 @@ static const union AnimCmd *const sAnimTable_SmallSparkle[] = const struct SpriteTemplate gFieldEffectObjectTemplate_SmallSparkle = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = FLDEFF_PAL_TAG_SMALL_SPARKLE, .oam = &gObjectEventBaseOam_16x16, .anims = sAnimTable_SmallSparkle, diff --git a/src/data/object_events/object_event_graphics_info.h b/src/data/object_events/object_event_graphics_info.h index 3cf2686ab..03632fc16 100644 --- a/src/data/object_events/object_event_graphics_info.h +++ b/src/data/object_events/object_event_graphics_info.h @@ -1,154 +1,154 @@ -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedNormal = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenNormal, sPicTable_RedNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedBike = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_RedBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedSurf = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenSurf, sPicTable_RedSurf, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedFieldMove = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenFieldMove, sPicTable_RedItem, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Policeman = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Policeman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RSBrendan = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RSBrendan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RSMay = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RSMay, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleBoy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_LittleBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleGirl = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_LittleGirl, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SittingBoy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SittingBoy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lass = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lass, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Youngster = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Youngster, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman1 = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman3 = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman3, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Boy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BattleGirl = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BattleGirl, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BugCatcher = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BugCatcher, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FatMan = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_FatMan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BaldingMan = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BaldingMan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman2 = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan1 = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan1, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WorkerM = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_WorkerM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WorkerF = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_WorkerF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Beauty = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Beauty, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Chef = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Chef, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan2 = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan2, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldWoman = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldWoman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Camper = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Camper, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Picnicker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Picnicker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CooltrainerM = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CooltrainerM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CooltrainerF = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CooltrainerF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SuperNerd = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SuperNerd, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Channeler = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Channeler, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RocketF = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RocketF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerMWater = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerMWater, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerFWater = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerFWater, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerMLand = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerMLand, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerFLand = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerFLand, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blackbelt = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blackbelt, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Gentleman = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Gentleman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sailor = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Sailor, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Captain = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Captain, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fisher = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Fisher, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TeachyTVHost = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_TeachyTVHost, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedWoman = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnusedWoman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberF = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMWater = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMWater, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMLand = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMLand, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hiker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Hiker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Biker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Biker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GymGuy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_GymGuy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nurse = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Nurse, sPicTable_Nurse, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMaleReceptionist = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnusedMaleReceptionist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ItemBall = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_ItemBall, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ProfOak = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_ProfOak, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Man, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Rocker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Rocker, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MrFuji = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_MrFuji, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bruno = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Bruno, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldManLyingDown = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_OldManLyingDown, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CutTree = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_CutTree, sPicTable_CutTree, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clerk = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Clerk, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MGDeliveryman = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_MGDeliveryman, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TrainerTowerDude = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_TrainerTowerDude, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CableClubReceptionist = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CableClubReceptionist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnionRoomReceptionist = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnionRoomReceptionist, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RockSmashRock = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_RockSmashRock, sPicTable_RockSmashRock, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_StrengthBoulder = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_StrengthBoulder, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenNormal = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenNormal, sPicTable_GreenNormal, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenBike = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_GreenBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenSurf = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenSurf, sPicTable_GreenSurf, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenFieldMove = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenFieldMove, sPicTable_GreenItem, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedBikeAlt = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_RedBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RocketM = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RocketM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Celio = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Celio, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Agatha = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Agatha, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brock = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Brock, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Misty = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Misty, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LtSurge = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_LtSurge, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Erika = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Erika, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Koga = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Koga, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Giovanni = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Giovanni, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blaine = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blaine, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sabrina = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Sabrina, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bill = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Bill, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Daisy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Daisy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lorelei = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lorelei, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lance = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lance, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blue = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blue, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedFish = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenFish, sPicTable_RedFish, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenFish = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenFish, sPicTable_GreenFish, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedVSSeeker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenVSSeeker, sPicTable_RedItem, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedVSSeekerBike = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenVSSeekerBike, sPicTable_RedVSSeekerBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenVSSeeker = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenVSSeeker, sPicTable_GreenItem, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenVSSeekerBike = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenVSSeekerBike, sPicTable_GreenVSSeekerBike, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TownMap = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 32, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_TownMap, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pokedex = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Pokedex, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GBAKid = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_GBAKid, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Snorlax = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Snorlax, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fossil = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Fossil, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Ruby = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Ruby, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sapphire = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Sapphire, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldAmber = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_OldAmber, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GymSign = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Inanimate, sPicTable_GymSign, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sign = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Sign, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TrainerTips = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_WoodenSign, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clipboard = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Clipboard, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Meteorite = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_METEORITE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Inanimate, sPicTable_BirthIslandStone, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LaprasDoll = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Inanimate, sPicTable_LaprasDoll, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Spearow = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Spearow, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Omanyte = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Omanyte, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kangaskhan = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Kangaskhan, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Psyduck = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Psyduck, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NidoranF = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_NidoranF, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NidoranM = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_NidoranM, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nidorino = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Nidorino, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Meowth = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Meowth, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Seel = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Seel, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Voltorb = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Voltorb, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Slowpoke = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Slowpoke, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Slowbro = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Slowbro, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Machop = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Machop, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wigglytuff = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Wigglytuff, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Doduo = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Doduo, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fearow = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Fearow, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lapras = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Lapras, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Zapdos = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Zapdos, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Moltres = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Moltres, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Articuno = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Articuno, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysD = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysD, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysA = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysA, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysN = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysN, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mewtwo = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Mewtwo, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mew = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Mew, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Entei = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Entei, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Raikou = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Raikou, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Suicune = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Suicune, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lugia = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Lugia, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HoOh = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_HoOh, sPicTable_HoOh, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Celebi = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Celebi, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cubone = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Cubone, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Machoke = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Machoke, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kabuto = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Kabuto, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Poliwrath = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Poliwrath, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pidgeot = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pidgeot, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Chansey = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Chansey, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pikachu = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pikachu, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Jigglypuff = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Jigglypuff, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pidgey = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pidgey, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clefairy = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Clefairy, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mom = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Mom, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Seagallop = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_SEAGALLOP, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_64x64, gObjectEventSpriteOamTables_64x64, sAnimTable_Standard, sPicTable_Seagallop, gDummySpriteAffineAnimTable}; -const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SSAnne = {SPRITE_INVALID_TAG, OBJ_EVENT_PAL_TAG_SS_ANNE, OBJ_EVENT_PAL_TAG_NONE, 4096, 128, 64, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, gObjectEventSpriteOamTables_128x64, sAnimTable_Standard, sPicTable_SSAnne, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenNormal, sPicTable_RedNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_RedBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedSurf = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenSurf, sPicTable_RedSurf, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenFieldMove, sPicTable_RedItem, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Policeman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Policeman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RSBrendan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RSBrendan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RSMay = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RSMay, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_LittleBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LittleGirl = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_LittleGirl, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SittingBoy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SittingBoy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lass = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lass, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Youngster = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Youngster, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman3 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman3, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Boy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Boy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BattleGirl = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BattleGirl, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BugCatcher = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BugCatcher, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_FatMan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_FatMan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_BaldingMan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_BaldingMan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Woman2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Woman2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan1 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan1, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WorkerM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_WorkerM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_WorkerF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_WorkerF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Beauty = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Beauty, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Chef = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Chef, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldMan2 = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldMan2, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldWoman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_OldWoman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Camper = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Camper, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Picnicker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Picnicker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CooltrainerM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CooltrainerM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CooltrainerF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CooltrainerF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SuperNerd = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SuperNerd, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Channeler = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Channeler, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RocketF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RocketF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerMWater = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerMWater, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerFWater = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerFWater, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerMLand = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerMLand, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SwimmerFLand = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_SwimmerFLand, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blackbelt = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blackbelt, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Scientist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Scientist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Gentleman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Gentleman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sailor = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Sailor, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Captain = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Captain, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fisher = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Fisher, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TeachyTVHost = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_TeachyTVHost, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedWoman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnusedWoman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMWater = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMWater, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TuberMLand = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_TuberMLand, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Hiker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Hiker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Biker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Biker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GymGuy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_GymGuy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nurse = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Nurse, sPicTable_Nurse, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnusedMaleReceptionist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnusedMaleReceptionist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ItemBall = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_ItemBall, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_ProfOak = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_ProfOak, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Man = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Man, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Rocker = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Rocker, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MrFuji = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_MrFuji, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bruno = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Bruno, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldManLyingDown = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_OldManLyingDown, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CutTree = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_CutTree, sPicTable_CutTree, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clerk = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Clerk, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_MGDeliveryman = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_MGDeliveryman, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TrainerTowerDude = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_TrainerTowerDude, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_CableClubReceptionist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_CableClubReceptionist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_UnionRoomReceptionist = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_UnionRoomReceptionist, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RockSmashRock = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_RockSmashRock, sPicTable_RockSmashRock, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_StrengthBoulder = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_StrengthBoulder, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenNormal = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenNormal, sPicTable_GreenNormal, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_GreenBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenSurf = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, TRUE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenSurf, sPicTable_GreenSurf, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenFieldMove = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenFieldMove, sPicTable_GreenItem, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedBikeAlt = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_BIKE_TIRE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_RedBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RocketM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_RocketM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Celio = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Celio, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Agatha = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Agatha, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Brock = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Brock, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Misty = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Misty, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LtSurge = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_LtSurge, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Erika = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Erika, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Koga = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Koga, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Giovanni = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Giovanni, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blaine = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blaine, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sabrina = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Sabrina, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Bill = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Bill, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Daisy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Daisy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lorelei = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lorelei, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lance = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Lance, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Blue = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Blue, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedFish = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenFish, sPicTable_RedFish, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenFish = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_GREEN, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenFish, sPicTable_GreenFish, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedVSSeeker = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenVSSeeker, sPicTable_RedItem, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_RedVSSeekerBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenVSSeekerBike, sPicTable_RedVSSeekerBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenVSSeeker = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 256, 16, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_RedGreenVSSeeker, sPicTable_GreenItem, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GreenVSSeekerBike = {TAG_NONE, OBJ_EVENT_PAL_TAG_PLAYER_RED, OBJ_EVENT_PAL_TAG_BRIDGE_REFLECTION, 512, 32, 32, 0, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_RedGreenVSSeekerBike, sPicTable_GreenVSSeekerBike, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TownMap = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 32, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_TownMap, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pokedex = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Pokedex, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GBAKid = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_GBAKid, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Snorlax = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Snorlax, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fossil = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Fossil, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Ruby = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Ruby, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sapphire = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Sapphire, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_OldAmber = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_OldAmber, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_GymSign = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Inanimate, sPicTable_GymSign, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Sign = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Sign, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_TrainerTips = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_WoodenSign, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clipboard = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Inanimate, sPicTable_Clipboard, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Meteorite = {TAG_NONE, OBJ_EVENT_PAL_TAG_METEORITE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 10, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Inanimate, sPicTable_BirthIslandStone, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_LaprasDoll = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_S, TRUE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Inanimate, sPicTable_LaprasDoll, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Spearow = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Spearow, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Omanyte = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Omanyte, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kangaskhan = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Kangaskhan, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Psyduck = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Psyduck, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NidoranF = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_NidoranF, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_NidoranM = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_NidoranM, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Nidorino = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Nidorino, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Meowth = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Meowth, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Seel = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Seel, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Voltorb = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Voltorb, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Slowpoke = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Slowpoke, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Slowbro = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Slowbro, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Machop = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Machop, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Wigglytuff = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Wigglytuff, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Doduo = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Doduo, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Fearow = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Fearow, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lapras = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Lapras, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Zapdos = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Zapdos, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Moltres = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Moltres, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Articuno = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Articuno, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysD = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysD, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysA = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysA, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_DeoxysN = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_DeoxysN, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mewtwo = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Mewtwo, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mew = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Mew, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Entei = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Entei, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Raikou = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Raikou, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Suicune = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Suicune, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Lugia = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_Standard, sPicTable_Lugia, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_HoOh = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 512, 32, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_32x32, gObjectEventSpriteOamTables_32x32, sAnimTable_HoOh, sPicTable_HoOh, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Celebi = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_GREEN, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 4, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Celebi, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Cubone = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_WHITE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 5, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Cubone, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Machoke = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Machoke, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Kabuto = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Kabuto, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Poliwrath = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Poliwrath, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pidgeot = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pidgeot, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Chansey = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Chansey, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pikachu = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pikachu, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Jigglypuff = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Jigglypuff, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Pidgey = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Pidgey, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Clefairy = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_PINK, OBJ_EVENT_PAL_TAG_NONE, 128, 16, 16, 3, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x16, gObjectEventSpriteOamTables_16x16, sAnimTable_Standard, sPicTable_Clefairy, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Mom = {TAG_NONE, OBJ_EVENT_PAL_TAG_NPC_BLUE, OBJ_EVENT_PAL_TAG_NONE, 256, 16, 32, 2, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_FOOT, &gObjectEventBaseOam_16x32, gObjectEventSpriteOamTables_16x32, sAnimTable_Standard, sPicTable_Mom, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_Seagallop = {TAG_NONE, OBJ_EVENT_PAL_TAG_SEAGALLOP, OBJ_EVENT_PAL_TAG_NONE, 2048, 64, 64, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_64x64, gObjectEventSpriteOamTables_64x64, sAnimTable_Standard, sPicTable_Seagallop, gDummySpriteAffineAnimTable}; +const struct ObjectEventGraphicsInfo gObjectEventGraphicsInfo_SSAnne = {TAG_NONE, OBJ_EVENT_PAL_TAG_SS_ANNE, OBJ_EVENT_PAL_TAG_NONE, 4096, 128, 64, 10, SHADOW_SIZE_M, FALSE, FALSE, TRACKS_NONE, &gObjectEventBaseOam_8x8, gObjectEventSpriteOamTables_128x64, sAnimTable_Standard, sPicTable_SSAnne, gDummySpriteAffineAnimTable}; diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 23b39c807..2a91bb38b 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -181,7 +181,7 @@ const u8 gReflectionEffectPaletteMap[16] = {1, 1, 6, 7, 8, 9, 6, 7, 8, 9, 11, 11 static const struct SpriteTemplate gCameraSpriteTemplate = { .tileTag = 0, - .paletteTag = SPRITE_INVALID_TAG, + .paletteTag = TAG_NONE, .oam = &gDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, @@ -1571,7 +1571,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl if (objectEvent->movementType == MOVEMENT_TYPE_INVISIBLE) objectEvent->invisible = TRUE; - *(u16 *)&spriteTemplate->paletteTag = SPRITE_INVALID_TAG; + *(u16 *)&spriteTemplate->paletteTag = TAG_NONE; spriteId = CreateSprite(spriteTemplate, 0, 0, 0); if (spriteId == MAX_SPRITES) { @@ -1702,7 +1702,7 @@ u8 AddPseudoObjectEvent(u16 graphicsId, SpriteCallback callback, s16 x, s16 y, u u8 spriteId; MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, callback, &spriteTemplate, &subspriteTables); - if (spriteTemplate.paletteTag != SPRITE_INVALID_TAG) + if (spriteTemplate.paletteTag != TAG_NONE) { LoadObjectEventPalette(spriteTemplate.paletteTag); } @@ -1725,7 +1725,7 @@ u8 sprite_new(u8 graphicsId, u8 a1, s16 x, s16 y, u8 z, u8 direction) graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, UpdateObjectEventSpriteSubpriorityAndVisibility, &spriteTemplate, &subspriteTables); - *(u16 *)&spriteTemplate.paletteTag = SPRITE_INVALID_TAG; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; x += 7; y += 7; SetSpritePosToOffsetMapCoords(&x, &y, 8, 16); @@ -1767,7 +1767,7 @@ u8 sub_805EB44(u8 graphicsId, u8 a1, s16 x, s16 y) graphicsInfo = GetObjectEventGraphicsInfo(graphicsId); MakeObjectTemplateFromObjectEventGraphicsInfo(graphicsId, SpriteCallbackDummy, &spriteTemplate, &subspriteTables); - *(u16 *)&spriteTemplate.paletteTag = SPRITE_INVALID_TAG; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; spriteId = CreateSpriteAtEnd(&spriteTemplate, x, y, 0); if (spriteId != MAX_SPRITES) @@ -1899,7 +1899,7 @@ static void ReloadMapObjectWithOffset(u8 objectEventId, s16 x, s16 y) spriteFrameImage.size = graphicsInfo->size; MakeObjectTemplateFromObjectEventGraphicsInfoWithCallbackIndex(objectEvent->graphicsId, objectEvent->movementType, &spriteTemplate, &subspriteTables); spriteTemplate.images = &spriteFrameImage; - *(u16 *)&spriteTemplate.paletteTag = SPRITE_INVALID_TAG; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; if (graphicsInfo->paletteSlot == 0) { LoadPlayerObjectReflectionPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot); @@ -1908,7 +1908,7 @@ static void ReloadMapObjectWithOffset(u8 objectEventId, s16 x, s16 y) { LoadSpecialObjectReflectionPalette(graphicsInfo->paletteTag, graphicsInfo->paletteSlot); } - *(u16 *)&spriteTemplate.paletteTag = SPRITE_INVALID_TAG; + *(u16 *)&spriteTemplate.paletteTag = TAG_NONE; spriteId = CreateSprite(&spriteTemplate, 0, 0, 0); if (spriteId != MAX_SPRITES) { diff --git a/src/field_effect.c b/src/field_effect.c index f2bfa3976..5b2f5cdc3 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -160,7 +160,7 @@ static const union AnimCmd *const sNewGameOakAnimTable[] = { }; static const struct SpriteTemplate sNewGameOakObjectTemplate = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 4102, .oam = &sNewGameOakOamAttributes, .anims = sNewGameOakAnimTable, @@ -324,7 +324,7 @@ static const union AnimCmd *const sAnims_HofMonitor[] = { }; static const struct SpriteTemplate sSpriteTemplate_PokeballGlow = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 4103, .oam = &sOamData_8x8, .anims = sAnims_Flicker, @@ -334,7 +334,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokeballGlow = { }; static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 4103, .oam = &sOamData_32x16, .anims = sAnims_Flicker, @@ -344,7 +344,7 @@ static const struct SpriteTemplate sSpriteTemplate_PokecenterMonitor = { }; static const struct SpriteTemplate sSpriteTemplate_HofMonitor = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 4112, .oam = &sOamData_16x16, .anims = sAnims_HofMonitor, @@ -504,7 +504,7 @@ static void FieldEffectFreeTilesIfUnused(u16 tileStart) { u8 i; u16 tileTag = GetSpriteTileTagByTileStart(tileStart); - if (tileTag == SPRITE_INVALID_TAG) + if (tileTag == TAG_NONE) return; for (i = 0; i < MAX_SPRITES; i++) { @@ -518,7 +518,7 @@ static void FieldEffectFreePaletteIfUnused(u8 paletteNum) { u8 i; u16 paletteTag = GetSpritePaletteTagByPaletteNum(paletteNum); - if (paletteTag == SPRITE_INVALID_TAG) + if (paletteTag == TAG_NONE) return; for (i = 0; i < MAX_SPRITES; i++) { @@ -3840,7 +3840,7 @@ static const union AnimCmd *const sAnims_DeoxysRockFragment[] = static const struct SpriteTemplate sSpriteTemplate_DeoxysRockFragment = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 4371, .oam = &sOamData_8x8, .anims = sAnims_DeoxysRockFragment, diff --git a/src/list_menu.c b/src/list_menu.c index 8edd1805a..a914f8bc9 100644 --- a/src/list_menu.c +++ b/src/list_menu.c @@ -413,7 +413,7 @@ static u8 ListMenuAddCursorObject(struct ListMenu *list, u32 cursorKind) cursor.rowWidth = GetWindowAttribute(list->template.windowId, WINDOW_WIDTH) * 8 + 2; cursor.rowHeight = GetFontAttribute(list->template.fontId, FONTATTR_MAX_LETTER_HEIGHT) + 2; cursor.tileTag = 0x4000; - cursor.palTag = SPRITE_INVALID_TAG; + cursor.palTag = TAG_NONE; cursor.palNum = 15; return ListMenuAddCursorObjectInternal(&cursor, cursorKind); } diff --git a/src/menu_indicators.c b/src/menu_indicators.c index 8cc442147..b7027a8d5 100644 --- a/src/menu_indicators.c +++ b/src/menu_indicators.c @@ -331,7 +331,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 spriteSheet.size = 0x100; spriteSheet.tag = arrowInfo->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (arrowInfo->palTag == SPRITE_INVALID_TAG) + if (arrowInfo->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * arrowInfo->palNum) + 0x100, 0x20); } @@ -353,7 +353,7 @@ u8 AddScrollIndicatorArrowPair(const struct ScrollArrowsTemplate *arrowInfo, u16 data->topSpriteId = AddScrollIndicatorArrowObject(arrowInfo->firstArrowType, arrowInfo->firstX, arrowInfo->firstY, arrowInfo->tileTag, arrowInfo->palTag); data->bottomSpriteId = AddScrollIndicatorArrowObject(arrowInfo->secondArrowType, arrowInfo->secondX, arrowInfo->secondY, arrowInfo->tileTag, arrowInfo->palTag); - if (arrowInfo->palTag == SPRITE_INVALID_TAG) + if (arrowInfo->palTag == TAG_NONE) { gSprites[data->topSpriteId].oam.paletteNum = arrowInfo->palNum; gSprites[data->bottomSpriteId].oam.paletteNum = arrowInfo->palNum; @@ -410,9 +410,9 @@ void RemoveScrollIndicatorArrowPair(u8 taskId) { struct ScrollIndicatorPair *data = (struct ScrollIndicatorPair *)gTasks[taskId].data; - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->topSpriteId]); DestroySprite(&gSprites[data->bottomSpriteId]); @@ -537,7 +537,7 @@ u8 ListMenuAddRedOutlineCursorObject(const struct CursorStruct *cursor) spriteSheet.size = 0x100; spriteSheet.tag = cursor->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20); } @@ -562,7 +562,7 @@ u8 ListMenuAddRedOutlineCursorObject(const struct CursorStruct *cursor) gSprites[data->spriteId].oam.priority = 0; gSprites[data->spriteId].subpriority = 0; gSprites[data->spriteId].subspriteTableNum = 0; - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) gSprites[data->spriteId].oam.paletteNum = cursor->palNum; return taskId; } @@ -580,9 +580,9 @@ void ListMenuRemoveRedOutlineCursorObject(u8 taskId) struct RedOutlineCursor *data = (struct RedOutlineCursor *)gTasks[taskId].data; Free(data->subspritesPtr); - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->spriteId]); DestroyTask(taskId); @@ -610,7 +610,7 @@ static u8 ListMenuAddRedArrowCursorObject(const struct CursorStruct *cursor) spriteSheet.size = 0x80; spriteSheet.tag = cursor->tileTag; LoadCompressedSpriteSheet(&spriteSheet); - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) { LoadPalette(sRedArrowPal, (16 * cursor->palNum) + 0x100, 0x20); } @@ -630,7 +630,7 @@ static u8 ListMenuAddRedArrowCursorObject(const struct CursorStruct *cursor) data->spriteId = CreateSprite(&spriteTemplate, cursor->left, cursor->top, 0); gSprites[data->spriteId].x2 = 8; gSprites[data->spriteId].y2 = 8; - if (cursor->palTag == SPRITE_INVALID_TAG) + if (cursor->palTag == TAG_NONE) gSprites[data->spriteId].oam.paletteNum = cursor->palNum; return taskId; } @@ -647,9 +647,9 @@ static void ListMenuRemoveRedArrowCursorObject(u8 taskId) { struct RedArrowCursor *data = (struct RedArrowCursor *)gTasks[taskId].data; - if (data->tileTag != SPRITE_INVALID_TAG) + if (data->tileTag != TAG_NONE) FreeSpriteTilesByTag(data->tileTag); - if (data->palTag != SPRITE_INVALID_TAG) + if (data->palTag != TAG_NONE) FreeSpritePaletteByTag(data->palTag); DestroySprite(&gSprites[data->spriteId]); DestroyTask(taskId); diff --git a/src/pokeball.c b/src/pokeball.c index 6434b72cd..9dbdfd0d1 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -1237,7 +1237,7 @@ void LoadBallGfx(u8 ballId) { u16 var; - if (GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag) == SPRITE_INVALID_TAG) + if (GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag) == TAG_NONE) { LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[ballId]); LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[ballId]); diff --git a/src/pokemon.c b/src/pokemon.c index 2e83f5076..fcfd678f4 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1469,7 +1469,7 @@ static const u8 sHoldEffectToType[][2] = const struct SpriteTemplate gSpriteTemplates_Battlers[] = { [B_POSITION_PLAYER_LEFT] = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1478,7 +1478,7 @@ const struct SpriteTemplate gSpriteTemplates_Battlers[] = .callback = SpriteCB_AllyMon, }, [B_POSITION_OPPONENT_LEFT] = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerOpponent, .anims = NULL, @@ -1487,7 +1487,7 @@ const struct SpriteTemplate gSpriteTemplates_Battlers[] = .callback = SpriteCB_EnemyMon, }, [B_POSITION_PLAYER_RIGHT] = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1496,7 +1496,7 @@ const struct SpriteTemplate gSpriteTemplates_Battlers[] = .callback = SpriteCB_AllyMon, }, [B_POSITION_OPPONENT_RIGHT] = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerOpponent, .anims = NULL, @@ -1509,7 +1509,7 @@ const struct SpriteTemplate gSpriteTemplates_Battlers[] = const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = { { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1518,7 +1518,7 @@ const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = .callback = SpriteCB_AllyMon, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1527,7 +1527,7 @@ const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = .callback = SpriteCB_AllyMon, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1536,7 +1536,7 @@ const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = .callback = SpriteCB_AllyMon, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1545,7 +1545,7 @@ const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = .callback = SpriteCB_AllyMon, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1554,7 +1554,7 @@ const struct SpriteTemplate gSpriteTemplates_TrainerBackpics[] = .callback = SpriteCB_AllyMon, }, { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = 0, .oam = &gOamData_BattlerPlayer, .anims = NULL, @@ -1680,8 +1680,8 @@ static const struct OamData sOakSpeechNidoranFDummyOamData = static const struct SpriteTemplate sOakSpeechNidoranFDummyTemplate = { - .tileTag = SPRITE_INVALID_TAG, - .paletteTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, + .paletteTag = TAG_NONE, .oam = &sOakSpeechNidoranFDummyOamData, .anims = gDummySpriteAnimTable, .images = NULL, diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index 2ca312ae0..d9d2c4b6f 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -1252,7 +1252,7 @@ static u8 CreateMonIconSprite(const struct MonIconSpriteTemplate * iconTemplate, struct SpriteTemplate spriteTemplate = { - .tileTag = SPRITE_INVALID_TAG, + .tileTag = TAG_NONE, .paletteTag = iconTemplate->paletteTag, .oam = iconTemplate->oam, .anims = iconTemplate->anims, From dcb9d9de1eaaaa35382ddbfa01c2338a4501ce8e Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 29 Jul 2022 21:39:25 -0400 Subject: [PATCH 03/13] Synced src/pokeball.c --- data/battle_anim_scripts.s | 278 ++++++------- include/battle.h | 22 +- include/battle_anim.h | 2 +- include/battle_gfx_sfx_util.h | 2 +- include/constants/battle.h | 2 +- include/graphics.h | 48 +-- include/librfu.h | 2 +- include/pokeball.h | 10 +- src/battle_anim_special.c | 46 +-- src/battle_controller_link_opponent.c | 4 +- src/battle_controller_link_partner.c | 4 +- src/battle_controller_oak_old_man.c | 4 +- src/battle_controller_opponent.c | 4 +- src/battle_controller_player.c | 16 +- src/battle_controller_pokedude.c | 4 +- src/battle_controllers.c | 2 +- src/battle_gfx_sfx_util.c | 7 +- src/battle_script_commands.c | 2 +- src/battle_setup.c | 4 +- src/battle_transition.c | 6 +- src/data/graphics/interface_pokeballs.h | 48 +-- src/data/party_menu.h | 8 +- src/daycare.c | 4 +- src/fldeff_strength.c | 2 +- src/librfu_stwi.c | 2 +- src/mail_data.c | 2 +- src/menu_indicators.c | 4 +- src/pokeball.c | 512 +++++++++++++----------- src/pokemon.c | 2 +- src/pokemon_jump.c | 10 +- src/pokemon_summary_screen.c | 5 +- src/trainer_see.c | 2 +- 32 files changed, 575 insertions(+), 495 deletions(-) diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s index a111d52b3..936e58a35 100644 --- a/data/battle_anim_scripts.s +++ b/data/battle_anim_scripts.s @@ -1001,9 +1001,9 @@ Move_MEGA_PUNCH:: SetImpactBackground:: delay 2 - createvisualtask AnimTask_IsContest, 2, + createvisualtask AnimTask_IsContest, 2, jumpargeq 7, 1, SetImpactContestsBG - createvisualtask AnimTask_IsTargetPlayerSide, 2, + createvisualtask AnimTask_IsTargetPlayerSide, 2, jumpargeq 7, 0, SetImpactOpponentBG jumpargeq 7, 1, SetImpactPlayerBG SetImpactBackgroundRet:: @@ -1474,12 +1474,12 @@ Move_FURY_CUTTER:: monbg 1 setalpha 12, 8 playsewithpan SE_M_RAZOR_WIND, 63 - createvisualtask AnimTask_IsFuryCutterHitRight, 2, + createvisualtask AnimTask_IsFuryCutterHitRight, 2, jumpargeq 7, 0, FuryCutterLeft goto FuryCutterRight FuryCutterContinue:: - createvisualtask AnimTask_GetFuryCutterHitCount, 2, + createvisualtask AnimTask_GetFuryCutterHitCount, 2, jumpargeq 7, 1, FuryCutterContinue2 jumpargeq 7, 2, FuryCutterMedium jumpargeq 7, 3, FuryCutterStrong @@ -1719,7 +1719,7 @@ Move_DEFENSE_CURL:: loadspritegfx ANIM_TAG_ECLIPSING_ORB loopsewithpan SE_M_TRI_ATTACK, 192, 18, 3 createvisualtask AnimTask_SetGreyscaleOrOriginalPal, 5, 0, 0 - createvisualtask AnimTask_DefenseCurlDeformMon, 5, + createvisualtask AnimTask_DefenseCurlDeformMon, 5, waitforvisualfinish createsprite gEclipsingOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 6, 0, 1 waitforvisualfinish @@ -1757,7 +1757,7 @@ Move_FRUSTRATION:: loadspritegfx ANIM_TAG_ANGER monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask AnimTask_GetFrustrationPowerLevel, 1, + createvisualtask AnimTask_GetFrustrationPowerLevel, 1, jumpargeq 7, 0, Frustration_Strongest jumpargeq 7, 1, Frustration_Strong jumpargeq 7, 2, Frustration_Medium @@ -1815,7 +1815,7 @@ Frustration_Strong:: createsprite gAngerMarkSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, -28 waitforvisualfinish delay 5 - createvisualtask AnimTask_StrongFrustrationGrowAndShrink, 5, + createvisualtask AnimTask_StrongFrustrationGrowAndShrink, 5, delay 7 playsewithpan SE_M_COMET_PUNCH, 63 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 3, 0, 8, 1, 1 @@ -1866,11 +1866,11 @@ Move_SAFEGUARD:: monbg ANIM_ATK_PARTNER setalpha 8, 8 playsewithpan SE_M_MILK_DRINK, 192 - createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, delay 4 - createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, delay 4 - createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gGuardRingSpriteTemplate, ANIM_ATTACKER, 2, waitforvisualfinish playsewithpan SE_SHINY, 192 createvisualtask AnimTask_CurseBlendEffect, 2, 10, 0, 2, 0, 10, RGB_WHITE @@ -1955,7 +1955,7 @@ Move_PAY_DAY:: waitforvisualfinish playsewithpan SE_M_PAY_DAY, 63 createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, 1, 2 - createsprite gFallingCoinSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gFallingCoinSpriteTemplate, ANIM_ATTACKER, 2, createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 6, 1 waitforvisualfinish clearmonbg 1 @@ -2070,7 +2070,7 @@ Move_ATTRACT:: createsprite gRedHeartBurstSpriteTemplate, ANIM_TARGET, 3, -384, -31 waitforvisualfinish waitplaysewithpan SE_M_ATTRACT2, 0, 15 - createvisualtask AnimTask_HeartsBackground, 5, + createvisualtask AnimTask_HeartsBackground, 5, createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 16, 256, 0 createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 224, 240, 15 createsprite gRedHeartRisingSpriteTemplate, ANIM_ATTACKER, 40, 126, 272, 30 @@ -2137,7 +2137,7 @@ Move_CONFUSE_RAY:: Move_LOCK_ON:: loadspritegfx ANIM_TAG_LOCK_ON - createsprite gLockOnTargetSpriteTemplate, ANIM_ATTACKER, 40, + createsprite gLockOnTargetSpriteTemplate, ANIM_ATTACKER, 40, createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 1 createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 2 createsprite gLockOnMoveTargetSpriteTemplate, ANIM_ATTACKER, 40, 3 @@ -2154,7 +2154,7 @@ Move_MEAN_LOOK:: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 1, 0, 16, 0 loopsewithpan SE_M_CONFUSE_RAY, 63, 15, 4 waitplaysewithpan SE_M_LEER, 63, 85 - createsprite gMeanLookEyeSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gMeanLookEyeSpriteTemplate, ANIM_ATTACKER, 2, delay 120 createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 16, 0, 0 delay 30 @@ -2336,7 +2336,7 @@ Move_SMOKESCREEN:: playsewithpan SE_M_DOUBLE_TEAM, 192 createsprite gBlackBallSpriteTemplate, ANIM_TARGET, 2, 20, 0, 0, 0, 35, -25 waitforvisualfinish - createvisualtask AnimTask_SmokescreenImpact, 2, + createvisualtask AnimTask_SmokescreenImpact, 2, delay 2 playsewithpan SE_M_SAND_ATTACK, 63 createsprite gBlackSmokeSpriteTemplate, ANIM_TARGET, 4, 0, -12, 104, 0, 75 @@ -2399,7 +2399,7 @@ Move_CONVERSION:: playsewithpan SE_M_BARRIER, 192 createvisualtask AnimTask_FlashAnimTagWithColor, 2, 10018, 1, 1, 14335, 12, 0, 0 delay 6 - createvisualtask AnimTask_ConversionAlphaBlend, 5, + createvisualtask AnimTask_ConversionAlphaBlend, 5, waitforvisualfinish delay 1 clearmonbg ANIM_ATK_PARTNER @@ -2429,7 +2429,7 @@ Move_CONVERSION_2:: createsprite gConversion2SpriteTemplate, ANIM_ATTACKER, 2, -8, 24, 125 createsprite gConversion2SpriteTemplate, ANIM_ATTACKER, 2, 8, 24, 130 createsprite gConversion2SpriteTemplate, ANIM_ATTACKER, 2, 24, 24, 135 - createvisualtask AnimTask_Conversion2AlphaBlend, 5, + createvisualtask AnimTask_Conversion2AlphaBlend, 5, delay 60 playsewithpan SE_M_SWIFT, 63 delay 10 @@ -2601,8 +2601,8 @@ HornDrillInContest:: Move_THRASH:: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET - createvisualtask AnimTask_ThrashMoveMonHorizontal, 2, - createvisualtask AnimTask_ThrashMoveMonVertical, 2, + createvisualtask AnimTask_ThrashMoveMonHorizontal, 2, + createvisualtask AnimTask_ThrashMoveMonVertical, 2, createsprite gFistFootRandomPosSpriteTemplate, ANIM_TARGET, 3, 1, 10, 0 createvisualtask AnimTask_ShakeMonInPlace, 2, 1, 4, 0, 7, 1 playsewithpan SE_M_COMET_PUNCH, 63 @@ -2619,7 +2619,7 @@ Move_THRASH:: Move_SING:: loadspritegfx ANIM_TAG_MUSIC_NOTES monbg ANIM_DEF_PARTNER - createvisualtask AnimTask_MusicNotesRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesRainbowBlend, 2, waitforvisualfinish panse_1B SE_M_SING, 192, 63, 2, 0 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 0, 12 @@ -2648,7 +2648,7 @@ Move_SING:: delay 4 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER - createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, waitforvisualfinish end @@ -2840,7 +2840,7 @@ Move_RAGE:: Move_TELEPORT:: call SetPsychicBackground - createvisualtask AnimTask_Teleport, 2 + createvisualtask AnimTask_Teleport, 2 playsewithpan SE_M_TELEPORT, 192 delay 15 call UnsetPsychicBg @@ -2850,7 +2850,7 @@ Move_TELEPORT:: Move_DOUBLE_TEAM:: monbg ANIM_ATK_PARTNER setalpha 12, 8 - createvisualtask AnimTask_DoubleTeam, 2, + createvisualtask AnimTask_DoubleTeam, 2, playsewithpan SE_M_DOUBLE_TEAM, 192 delay 32 playsewithpan SE_M_DOUBLE_TEAM, 192 @@ -2876,7 +2876,7 @@ Move_DOUBLE_TEAM:: Move_MINIMIZE:: setalpha 10, 8 - createvisualtask AnimTask_Minimize, 2, + createvisualtask AnimTask_Minimize, 2, loopsewithpan SE_M_MINIMIZE, 192, 34, 3 waitforvisualfinish blendoff @@ -2934,7 +2934,7 @@ Move_AMNESIA:: loadspritegfx ANIM_TAG_AMNESIA call SetPsychicBackground delay 8 - createsprite gQuestionMarkSpriteTemplate, ANIM_ATTACKER, 20 + createsprite gQuestionMarkSpriteTemplate, ANIM_ATTACKER, 20 playsewithpan SE_M_METRONOME, 192 delay 54 loopsewithpan SE_M_METRONOME, 192, 16, 3 @@ -2971,7 +2971,7 @@ Move_GLARE:: waitforvisualfinish createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 - createvisualtask AnimTask_ScaryFace, 5, + createvisualtask AnimTask_ScaryFace, 5, playsewithpan SE_M_LEER, 192 delay 2 createvisualtask AnimTask_ShakeTargetInPattern, 3, 20, 1, 0 @@ -2981,7 +2981,7 @@ Move_GLARE:: Move_BARRAGE:: loadspritegfx ANIM_TAG_RED_BALL - createvisualtask AnimTask_BarrageBall, 3, + createvisualtask AnimTask_BarrageBall, 3, playsewithpan SE_M_SWAGGER, 192 delay 24 createsprite gShakeMonOrTerrainSpriteTemplate, ANIM_ATTACKER, 2, 8, 1, 40, 1 @@ -3086,7 +3086,7 @@ Move_ACID_ARMOR:: Move_SHARPEN:: loadspritegfx ANIM_TAG_SPHERE_TO_CUBE - createsprite gSharpenSphereSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gSharpenSphereSpriteTemplate, ANIM_ATTACKER, 2, waitforvisualfinish end @@ -3101,7 +3101,7 @@ Move_SUPER_FANG:: delay 20 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 4 delay 4 - createsprite gSuperFangSpriteTemplate, ANIM_TARGET, 2, + createsprite gSuperFangSpriteTemplate, ANIM_TARGET, 2, playsewithpan SE_M_BITE, 63 delay 8 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 1, 2143, 14, RGB_WHITE, 14 @@ -3143,7 +3143,7 @@ Move_SKETCH:: loadspritegfx ANIM_TAG_PENCIL monbg 1 createvisualtask AnimTask_SketchDrawMon, 2 - createsprite gPencilSpriteTemplate, ANIM_TARGET, 2, + createsprite gPencilSpriteTemplate, ANIM_TARGET, 2, waitforvisualfinish clearmonbg 1 createvisualtask AnimTask_Splash, 2, 0, 2 @@ -3206,7 +3206,7 @@ Move_MACH_PUNCH:: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET monbg ANIM_ATK_PARTNER - createvisualtask AnimTask_GetAttackerSide, 2, + createvisualtask AnimTask_GetAttackerSide, 2, jumpargeq 7, 1, MachPunchOnPlayer fadetobg BG_HIGHSPEED_OPPONENT @@ -3334,7 +3334,7 @@ Move_ROLLOUT:: Move_FALSE_SWIPE:: loadspritegfx ANIM_TAG_SLASH_2 loadspritegfx ANIM_TAG_IMPACT - createsprite gFalseSwipeSliceSpriteTemplate, ANIM_TARGET, 2, + createsprite gFalseSwipeSliceSpriteTemplate, ANIM_TARGET, 2, playsewithpan SE_M_VITAL_THROW, 63 delay 16 createsprite gFalseSwipePositionedSliceSpriteTemplate, ANIM_TARGET, 2, 0 @@ -3361,10 +3361,10 @@ Move_FALSE_SWIPE:: Move_SWAGGER:: loadspritegfx ANIM_TAG_BREATH loadspritegfx ANIM_TAG_ANGER - createvisualtask AnimTask_GrowAndShrink, 2, + createvisualtask AnimTask_GrowAndShrink, 2, playsewithpan SE_M_SWAGGER, 192 waitforvisualfinish - createsprite gBreathPuffSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gBreathPuffSpriteTemplate, ANIM_ATTACKER, 2, loopsewithpan SE_M_SWAGGER, 192, 4, 2 waitforvisualfinish delay 24 @@ -3381,7 +3381,7 @@ Move_MILK_DRINK:: loadspritegfx ANIM_TAG_THIN_RING loadspritegfx ANIM_TAG_BLUE_STAR monbg 1 - createsprite gMilkBottleSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gMilkBottleSpriteTemplate, ANIM_ATTACKER, 2, delay 40 playsewithpan SE_M_CRABHAMMER, 192 delay 12 @@ -3398,7 +3398,7 @@ Move_MILK_DRINK:: end Move_MAGNITUDE:: - createvisualtask AnimTask_IsPowerOver99, 2, + createvisualtask AnimTask_IsPowerOver99, 2, waitforvisualfinish jumpargeq 15, 0, MagnitudeRegular jumpargeq 15, 1, MagnitudeIntense @@ -3461,7 +3461,7 @@ Move_MOONLIGHT:: delay 30 createsprite gMoonlightSparkleSpriteTemplate, ANIM_ATTACKER, 40, 10, 0 delay 20 - createvisualtask AnimTask_FadeScreenBlue, 2, + createvisualtask AnimTask_FadeScreenBlue, 2, waitforvisualfinish call HealingEffect waitforvisualfinish @@ -3470,7 +3470,7 @@ Move_MOONLIGHT:: Move_EXTREME_SPEED:: loadspritegfx ANIM_TAG_SPEED_DUST loadspritegfx ANIM_TAG_IMPACT - createvisualtask AnimTask_GetAttackerSide, 2, + createvisualtask AnimTask_GetAttackerSide, 2, jumpargeq 7, 1, ExtremeSpeedOnPlayer fadetobg BG_HIGHSPEED_OPPONENT @@ -3486,7 +3486,7 @@ ExtremeSpeedContinue:: monbg ANIM_TARGET setalpha 12, 8 delay 18 - createvisualtask AnimTask_ExtremeSpeedImpact, 2, + createvisualtask AnimTask_ExtremeSpeedImpact, 2, delay 2 playsewithpan SE_M_COMET_PUNCH, 63 createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, 1, 0, -12, 3 @@ -3497,9 +3497,9 @@ ExtremeSpeedContinue:: playsewithpan SE_M_VITAL_THROW2, 63 createsprite gMonEdgeHitSplatSpriteTemplate, ANIM_TARGET, 2, 1, 0, 0, 3 waitforvisualfinish - createvisualtask AnimTask_SpeedDust, 2, + createvisualtask AnimTask_SpeedDust, 2, delay 10 - createvisualtask AnimTask_ExtremeSpeedMonReappear, 2, + createvisualtask AnimTask_ExtremeSpeedMonReappear, 2, loopsewithpan SE_M_DOUBLE_TEAM, 192, 8, 4 waitforvisualfinish restorebg @@ -3571,7 +3571,7 @@ Move_HAIL:: loadspritegfx ANIM_TAG_ICE_CRYSTALS createvisualtask AnimTask_BlendSelected, 10, 1, 3, 0, 6, RGB_BLACK waitforvisualfinish - createvisualtask AnimTask_Hail1, 5, + createvisualtask AnimTask_Hail1, 5, loopsewithpan SE_M_HAIL, 0, 8, 10 waitforvisualfinish createvisualtask AnimTask_BlendSelected, 10, 1, 3, 6, 0, RGB_BLACK @@ -3580,7 +3580,7 @@ Move_HAIL:: Move_TORMENT:: loadspritegfx ANIM_TAG_ANGER loadspritegfx ANIM_TAG_THOUGHT_BUBBLE - createvisualtask AnimTask_TormentAttacker, 2, + createvisualtask AnimTask_TormentAttacker, 2, waitforvisualfinish createvisualtask AnimTask_BlendMonInAndOut, 2, 1, 31, 10, 1, 1 createsprite gAngerMarkSpriteTemplate, ANIM_TARGET, 2, 1, -20, -28 @@ -3600,7 +3600,7 @@ Move_MEMENTO:: delay 48 playsewithpan SE_M_PSYBEAM2, 192 waitforvisualfinish - createvisualtask sub_80B8664, 2, + createvisualtask sub_80B8664, 2, delay 12 setalpha 0, 16 delay 1 @@ -3703,7 +3703,7 @@ Move_TAUNT:: Move_HELPING_HAND:: loadspritegfx ANIM_TAG_TAG_HAND - createvisualtask AnimTask_HelpingHandAttackerMovement, 5, + createvisualtask AnimTask_HelpingHandAttackerMovement, 5, createsprite gHelpingHandClapSpriteTemplate, ANIM_ATTACKER, 40, 0 createsprite gHelpingHandClapSpriteTemplate, ANIM_ATTACKER, 40, 1 delay 19 @@ -3758,7 +3758,7 @@ Move_SUPERPOWER:: delay 8 createsprite gSuperpowerRockSpriteTemplate, ANIM_ATTACKER, 41, 60, 288, 3, 88 delay 74 - createsprite gSuperpowerFireballSpriteTemplate, ANIM_TARGET, 3, 0 + createsprite gSuperpowerFireballSpriteTemplate, ANIM_TARGET, 3, 0 playsewithpan SE_M_SWAGGER, 192 delay 16 createvisualtask AnimTask_ShakeMon2, 2, 1, 8, 0, 16, 1 @@ -3774,7 +3774,7 @@ Move_RECYCLE:: monbg ANIM_ATTACKER setalpha 0, 16 delay 1 - createsprite gRecycleSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gRecycleSpriteTemplate, ANIM_ATTACKER, 2, loopsewithpan SE_M_TAKE_DOWN, 192, 24, 3 waitforvisualfinish createvisualtask AnimTask_BlendMonInAndOut, 5, 0, RGB_WHITE, 12, 2, 1 @@ -3999,7 +3999,7 @@ Move_LUSTER_PURGE:: loadspritegfx ANIM_TAG_IMPACT fadetobg 3 waitbgfadeout - createvisualtask AnimTask_FadeScreenToWhite, 5, + createvisualtask AnimTask_FadeScreenToWhite, 5, waitbgfadein monbg ANIM_ATTACKER setalpha 12, 8 @@ -4049,7 +4049,7 @@ Move_MIST_BALL:: createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 1, 1, 1, 32279, 16, RGB_WHITE, 16 delay 0 playsewithpan SE_M_HAZE, 0 - createvisualtask AnimTask_LoadMistTiles, 5, + createvisualtask AnimTask_LoadMistTiles, 5, createvisualtask AnimTask_BlendSelected, 10, 4, 3, 0, 16, RGB_WHITE delay 8 createvisualtask AnimTask_ShakeMon, 2, 1, 4, 0, 70, 0 @@ -4082,7 +4082,7 @@ Move_FEATHER_DANCE:: Move_TEETER_DANCE:: loadspritegfx ANIM_TAG_MUSIC_NOTES loadspritegfx ANIM_TAG_DUCK - createvisualtask AnimTask_TeeterDanceMovement, 5, + createvisualtask AnimTask_TeeterDanceMovement, 5, createsprite gFastFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 16, -2 playsewithpan SE_M_TEETER_DANCE, 192 delay 24 @@ -4305,7 +4305,7 @@ Move_AIR_CUTTER:: Move_ODOR_SLEUTH:: monbg 1 - createvisualtask AnimTask_OdorSleuthMovement, 5, + createvisualtask AnimTask_OdorSleuthMovement, 5, delay 24 createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 3, 4 playsewithpan SE_M_SWAGGER, 192 @@ -4323,7 +4323,7 @@ Move_GRASS_WHISTLE:: loadspritegfx ANIM_TAG_MUSIC_NOTES createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 2, 0, 4, 13298 waitforvisualfinish - createvisualtask AnimTask_MusicNotesRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesRainbowBlend, 2, waitforvisualfinish panse_1B SE_M_GRASSWHISTLE, 192, 63, 2, 0 createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 7, 1, 0 @@ -4351,7 +4351,7 @@ Move_GRASS_WHISTLE:: createsprite gWavyMusicNotesSpriteTemplate, ANIM_TARGET, 2, 5, 1, 0 delay 4 waitforvisualfinish - createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 4, 4, 0, 13298 waitforvisualfinish end @@ -4379,13 +4379,13 @@ Move_WATER_SPOUT:: loadspritegfx ANIM_TAG_WATER_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask AnimTask_WaterSpoutLaunch, 5, + createvisualtask AnimTask_WaterSpoutLaunch, 5, playsewithpan SE_M_HEADBUTT, 192 delay 44 playsewithpan SE_M_DIVE, 192 waitforvisualfinish delay 16 - createvisualtask AnimTask_WaterSpoutRain, 5, + createvisualtask AnimTask_WaterSpoutRain, 5, playsewithpan SE_M_SURF, 63 clearmonbg ANIM_DEF_PARTNER blendoff @@ -4459,7 +4459,7 @@ Move_IRON_DEFENSE:: Move_BLOCK:: loadspritegfx ANIM_TAG_X_SIGN - createsprite gBlockXSpriteTemplate, ANIM_TARGET, 66, + createsprite gBlockXSpriteTemplate, ANIM_TARGET, 66, playsewithpan SE_M_SWAGGER, 63 end @@ -4475,10 +4475,10 @@ Move_HOWL:: Move_BULK_UP:: loadspritegfx ANIM_TAG_BREATH - createvisualtask AnimTask_GrowAndShrink, 2, + createvisualtask AnimTask_GrowAndShrink, 2, playsewithpan SE_M_SWAGGER, 192 waitforvisualfinish - createsprite gBreathPuffSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gBreathPuffSpriteTemplate, ANIM_ATTACKER, 2, loopsewithpan SE_M_SWAGGER, 192, 4, 2 waitforvisualfinish end @@ -4549,7 +4549,7 @@ Move_VOLT_TACKLE:: Move_WATER_SPORT:: loadspritegfx ANIM_TAG_GLOWY_BLUE_ORB - createvisualtask AnimTask_WaterSport, 5, + createvisualtask AnimTask_WaterSport, 5, delay 8 playsewithpan SE_M_SURF, 192 delay 44 @@ -4587,7 +4587,7 @@ Move_CALM_MIND:: Move_LEAF_BLADE:: loadspritegfx ANIM_TAG_LEAF loadspritegfx ANIM_TAG_CROSS_IMPACT - createvisualtask AnimTask_LeafBlade, 5, + createvisualtask AnimTask_LeafBlade, 5, delay 2 createvisualtask AnimTask_ShakeMon2, 2, 1, 2, 0, 8, 1 playsewithpan SE_M_CUT, 63 @@ -4672,7 +4672,7 @@ Move_HARDEN:: Move_BELLY_DRUM:: loadspritegfx ANIM_TAG_MUSIC_NOTES loadspritegfx ANIM_TAG_PURPLE_HAND_OUTLINE - createvisualtask AnimTask_MusicNotesRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesRainbowBlend, 2, waitforvisualfinish call BellyDrumRight createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 0, 0 @@ -4698,7 +4698,7 @@ Move_BELLY_DRUM:: createsprite gSlowFlyingMusicNotesSpriteTemplate, ANIM_ATTACKER, 2, 1, 0, 3, 0 playsewithpan SE_M_BELLY_DRUM, 192 waitforvisualfinish - createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, + createvisualtask AnimTask_MusicNotesClearRainbowBlend, 2, waitforvisualfinish end @@ -4719,7 +4719,7 @@ Move_MIND_READER:: monbg 4 playsewithpan SE_M_CONFUSE_RAY, 63 createsprite gOpeningEyeSpriteTemplate, ANIM_ATTACKER, 5, 0, 0, 1, 0 - createsprite gWhiteHaloSpriteTemplate, ANIM_ATTACKER, 5, + createsprite gWhiteHaloSpriteTemplate, ANIM_ATTACKER, 5, delay 40 playsewithpan SE_M_LEER, 63 createvisualtask AnimTask_CurseBlendEffect, 2, 1, 1, 2, 0, 10, 0 @@ -5078,7 +5078,7 @@ Move_ROAR:: clearmonbg ANIM_ATTACKER blendoff waitforvisualfinish - createvisualtask SoundTask_WaitForCry, 5, + createvisualtask SoundTask_WaitForCry, 5, waitforvisualfinish end @@ -5100,7 +5100,7 @@ Move_GROWL:: createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 9, 1 createvisualtask AnimTask_ShakeMon2, 2, 3, 1, 0, 9, 1 waitforvisualfinish - createvisualtask SoundTask_WaitForCry, 5, + createvisualtask SoundTask_WaitForCry, 5, waitforvisualfinish end @@ -5270,7 +5270,7 @@ Move_FAINT_ATTACK:: clearmonbg ANIM_ATTACKER invisible 0 delay 1 - createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2, + createvisualtask AnimTask_SetAttackerInvisibleWaitForSignal, 2, monbg 1 setalpha 12, 8 delay 1 @@ -5501,7 +5501,7 @@ IceBeamCreateCrystals:: Move_WITHDRAW:: playsewithpan SE_M_HEADBUTT, 192 - createvisualtask AnimTask_Withdraw, 5, + createvisualtask AnimTask_Withdraw, 5, waitforvisualfinish end @@ -5594,7 +5594,7 @@ SolarBeamAbsorbEffect:: SolarBeamUnleash:: call SetSolarBeamBg panse_1B SE_M_SOLAR_BEAM, 192, 63, 2, 0 - createvisualtask AnimTask_CreateSmallSolarBeamOrbs, 5, + createvisualtask AnimTask_CreateSmallSolarBeamOrbs, 5, createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 0 delay 4 createsprite gSolarBeamBigOrbSpriteTemplate, ANIM_TARGET, 3, 15, 0, 20, 1 @@ -5638,7 +5638,7 @@ SolarBeamUnleash1:: Move_BLIZZARD:: loadspritegfx ANIM_TAG_ICE_CRYSTALS monbg ANIM_DEF_PARTNER - createvisualtask AnimTask_GetAttackerSide, 2, + createvisualtask AnimTask_GetAttackerSide, 2, jumpargeq 7, 1, BlizzardOnPlayer fadetobg BG_HIGHSPEED_OPPONENT @@ -6892,7 +6892,7 @@ Move_SPORE:: loadspritegfx ANIM_TAG_SPORE monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask AnimTask_SporeDoubleBattle, 2, + createvisualtask AnimTask_SporeDoubleBattle, 2, loopsewithpan SE_M_POISON_POWDER, 63, 16, 11 call CreateSpore call CreateSpore @@ -7067,7 +7067,7 @@ MistCloud:: Move_HAZE:: waitforvisualfinish playsewithpan SE_M_HAZE, 0 - createvisualtask AnimTask_Haze1, 5, + createvisualtask AnimTask_Haze1, 5, delay 30 createvisualtask AnimTask_BlendSelected, 10, 0 | (0xF << 7), 2, 0, 16, RGB_BLACK delay 90 @@ -7624,7 +7624,7 @@ Move_SPIDER_WEB:: call SpiderWebThread waitforvisualfinish playsewithpan SE_M_STRING_SHOT2, 63 - createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gSpiderWebSpriteTemplate, ANIM_ATTACKER, 2, waitforvisualfinish clearmonbg ANIM_DEF_PARTNER delay 1 @@ -7683,7 +7683,7 @@ Move_DISABLE:: playsewithpan SE_M_DETECT, 192 createsprite gSpriteTemplate_83BF480, ANIM_ATTACKER, 13, 24, -16 waitforvisualfinish - createvisualtask AnimTask_GrowAndGreyscale, 5, + createvisualtask AnimTask_GrowAndGreyscale, 5, loopsewithpan SE_M_BIND, 63, 15, 4 waitforvisualfinish delay 1 @@ -7806,7 +7806,7 @@ CurseStats:: CurseStats1:: playsewithpan SE_M_DRAGON_RAGE, 192 - createvisualtask AnimTask_SetUpCurseBackground, 5, + createvisualtask AnimTask_SetUpCurseBackground, 5, createvisualtask AnimTask_CurseBlendEffect, 5, 2, 4, 2, 0, 10, 31 return @@ -7888,7 +7888,7 @@ HealBellRing:: Move_FAKE_OUT:: playsewithpan SE_M_FLATTER, 0 - createvisualtask AnimTask_FakeOut, 5, + createvisualtask AnimTask_FakeOut, 5, waitforvisualfinish playsewithpan SE_M_SKETCH, 63 createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 5, 1 @@ -7904,7 +7904,7 @@ Move_SCARY_FACE:: waitforvisualfinish delay 10 playsewithpan SE_M_LEER, 192 - createvisualtask AnimTask_ScaryFace, 5, + createvisualtask AnimTask_ScaryFace, 5, delay 13 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, -16, -8 createsprite gEyeSparkleSpriteTemplate, ANIM_ATTACKER, 0, 16, -8 @@ -7994,7 +7994,7 @@ Move_INGRAIN:: Move_PRESENT:: loadspritegfx ANIM_TAG_ITEM_BAG - createvisualtask AnimTask_IsHealingMove, 2, + createvisualtask AnimTask_IsHealingMove, 2, createsprite gPresentSpriteTemplate, ANIM_TARGET, 2, 0, -5, 10, 2, -1 playsewithpan SE_M_TAIL_WHIP, 192 delay 14 @@ -8056,7 +8056,7 @@ Move_BATON_PASS:: loadspritegfx ANIM_TAG_POKEBALL playsewithpan SE_M_BATON_PASS, 192 createvisualtask AnimTask_CurseBlendEffect, 2, 31, 1, 2, 0, 11, 31455 - createsprite gBatonPassPokeballSpriteTemplate, ANIM_ATTACKER, 2, + createsprite gBatonPassPokeballSpriteTemplate, ANIM_ATTACKER, 2, end Move_PERISH_SONG:: @@ -8127,14 +8127,14 @@ Move_HYPER_FANG:: playsewithpan SE_M_BITE, 63 delay 1 delay 2 - createvisualtask AnimTask_IsContest, 2, + createvisualtask AnimTask_IsContest, 2, jumpargeq 7, 1, HyperFangInContest - createvisualtask AnimTask_IsTargetPlayerSide, 2, + createvisualtask AnimTask_IsTargetPlayerSide, 2, jumpargeq 7, 0, HyperFangOnOpponent goto HyperFangOnPlayer HyperFangContinue:: waitbgfadeout - createsprite gFangSpriteTemplate, ANIM_TARGET, 2, + createsprite gFangSpriteTemplate, ANIM_TARGET, 2, waitbgfadein createvisualtask AnimTask_ShakeMon, 3, 1, 0, 10, 10, 1 playsewithpan SE_M_LEER, 63 @@ -8239,7 +8239,7 @@ Move_WILL_O_WISP:: Move_ENCORE:: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_TAG_HAND - createvisualtask AnimTask_CreateSpotlight, 2, + createvisualtask AnimTask_CreateSpotlight, 2, createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE waitforvisualfinish createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8 @@ -8253,7 +8253,7 @@ Move_ENCORE:: waitforvisualfinish createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE waitforvisualfinish - createvisualtask AnimTask_RemoveSpotlight, 2, + createvisualtask AnimTask_RemoveSpotlight, 2, end Move_TRICK:: @@ -8263,7 +8263,7 @@ Move_TRICK:: createsprite gTrickBagSpriteTemplate, ANIM_ATTACKER, 2, -40, 208 delay 16 playsewithpan SE_M_SKETCH, 0 - createvisualtask AnimTask_StretchTargetUp, 3, + createvisualtask AnimTask_StretchTargetUp, 3, createvisualtask AnimTask_StretchAttackerUp, 3 delay 30 playsewithpan SE_M_DOUBLE_TEAM, 0 @@ -8290,7 +8290,7 @@ Move_WISH:: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 10, 0 waitforvisualfinish panse_27 SE_M_REFLECT, 63, 192, 253, 0 - createsprite gWishStarSpriteTemplate, ANIM_ATTACKER, 40, + createsprite gWishStarSpriteTemplate, ANIM_ATTACKER, 40, waitforvisualfinish delay 60 loopsewithpan SE_M_HEAL_BELL, 192, 16, 3 @@ -8304,7 +8304,7 @@ Move_STOCKPILE:: loadspritegfx ANIM_TAG_GRAY_ORB playsewithpan SE_M_MEGA_KICK, 192 createvisualtask AnimTask_CurseBlendEffect, 2, 2, 8, 1, 0, 12, RGB_WHITE - createvisualtask AnimTask_StockpileDeformMon, 5, + createvisualtask AnimTask_StockpileDeformMon, 5, call StockpileAbsorb call StockpileAbsorb waitforvisualfinish @@ -8334,7 +8334,7 @@ Move_SPIT_UP:: loadspritegfx ANIM_TAG_RED_ORB_2 loadspritegfx ANIM_TAG_IMPACT playsewithpan SE_M_TAKE_DOWN, 192 - createvisualtask AnimTask_SpitUpDeformMon, 5, + createvisualtask AnimTask_SpitUpDeformMon, 5, createvisualtask AnimTask_ShakeMon2, 2, 0, 1, 0, 8, 2 delay 45 playsewithpan SE_M_SPIT_UP, 192 @@ -8383,7 +8383,7 @@ Move_SWALLOW:: loadspritegfx ANIM_TAG_BLUE_ORB loadspritegfx ANIM_TAG_BLUE_STAR playsewithpan SE_M_TAKE_DOWN, 192 - createvisualtask AnimTask_SwallowDeformMon, 5, + createvisualtask AnimTask_SwallowDeformMon, 5, createvisualtask AnimTask_ShakeMon2, 2, 0, 1, 0, 8, 2 delay 38 playsewithpan SE_M_SPIT_UP, 192 @@ -8430,7 +8430,7 @@ Move_TRANSFORM:: Move_MORNING_SUN:: loadspritegfx ANIM_TAG_GREEN_STAR loadspritegfx ANIM_TAG_BLUE_STAR - createvisualtask AnimTask_MorningSunLightBeam, 5, + createvisualtask AnimTask_MorningSunLightBeam, 5, delay 8 createvisualtask AnimTask_BlendSelected, 10, 1 | (0xF << 7), 8, 0, 12, RGB_WHITE delay 14 @@ -8545,8 +8545,8 @@ Move_HYPER_BEAM:: end HyperBeamOrbs:: - createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2, - createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2, + createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2, + createsprite gHyperBeamOrbSpriteTemplate, ANIM_TARGET, 2, delay 1 return @@ -8554,7 +8554,7 @@ Move_FLATTER:: loadspritegfx ANIM_TAG_SPOTLIGHT loadspritegfx ANIM_TAG_CONFETTI createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, 63 - createvisualtask AnimTask_CreateSpotlight, 2, + createvisualtask AnimTask_CreateSpotlight, 2, createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE waitforvisualfinish createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80 @@ -8588,7 +8588,7 @@ Move_FLATTER:: waitforvisualfinish createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE waitforvisualfinish - createvisualtask AnimTask_RemoveSpotlight, 2, + createvisualtask AnimTask_RemoveSpotlight, 2, end CreateFlatterConfetti:: @@ -8603,7 +8603,7 @@ Move_ROLE_PLAY:: waitforvisualfinish playsewithpan SE_M_TRI_ATTACK, 192 waitplaysewithpan SE_M_DETECT, 192, 30 - createvisualtask AnimTask_RolePlaySilhouette, 2, + createvisualtask AnimTask_RolePlaySilhouette, 2, waitforvisualfinish clearmonbg ANIM_ATK_PARTNER createvisualtask AnimTask_BlendSelected, 10, 4, 2, 16, 0, RGB_WHITE @@ -8663,7 +8663,7 @@ HyperVoiceEffect:: createvisualtask AnimTask_ShakeMon2, 2, 1, 1, 0, 6, 1 createvisualtask AnimTask_ShakeMon2, 2, 3, 1, 0, 6, 1 createvisualtask AnimTask_ShakeBattleTerrain, 2, 1, 0, 6, 1 - createvisualtask SoundTask_WaitForCry, 5, + createvisualtask SoundTask_WaitForCry, 5, return Move_SAND_TOMB:: @@ -8924,7 +8924,7 @@ Move_POISON_FANG:: loadspritegfx ANIM_TAG_FANG_ATTACK loadspritegfx ANIM_TAG_POISON_BUBBLE playsewithpan SE_M_BITE, 63 - createsprite gFangSpriteTemplate, ANIM_TARGET, 2, + createsprite gFangSpriteTemplate, ANIM_TARGET, 2, delay 10 createvisualtask AnimTask_ShakeMon, 3, 1, 3, 0, 10, 1 waitforvisualfinish @@ -8935,7 +8935,7 @@ Move_POISON_FANG:: Move_SUBSTITUTE:: playsewithpan SE_M_ATTRACT, 192 - createvisualtask AnimTask_MonToSubstitute, 2, + createvisualtask AnimTask_MonToSubstitute, 2, end Move_FRENZY_PLANT:: @@ -9029,9 +9029,9 @@ FocusPunch:: loadspritegfx ANIM_TAG_IMPACT loadspritegfx ANIM_TAG_HANDS_AND_FEET delay 1 - createvisualtask AnimTask_IsContest, 2, + createvisualtask AnimTask_IsContest, 2, jumpargeq 7, 1, FocusPunchInContest - createvisualtask AnimTask_IsTargetPlayerSide, 2, + createvisualtask AnimTask_IsTargetPlayerSide, 2, jumpargeq 7, 0, FocusPunchOnOpponent jumpargeq 7, 1, FocusPunchOnPlayer FocusPunchContinue:: @@ -9075,7 +9075,7 @@ Move_RETURN:: loadspritegfx ANIM_TAG_IMPACT monbg ANIM_DEF_PARTNER setalpha 12, 8 - createvisualtask AnimTask_GetReturnPowerLevel, 2, + createvisualtask AnimTask_GetReturnPowerLevel, 2, delay 2 jumpargeq 7, 0, ReturnWeak jumpargeq 7, 1, ReturnMedium @@ -9324,7 +9324,7 @@ Move_SILVER_WIND:: monbgprio_29 delay 0 createvisualtask AnimTask_BlendExcept, 10, 1, 0, 0, 4, 0 - createvisualtask AnimTask_GetTargetSide, 2, + createvisualtask AnimTask_GetTargetSide, 2, jumpargeq 7, 1, SilverWindOnPlayer fadetobg BG_BUG_OPPONENT waitbgfadeout @@ -9532,7 +9532,7 @@ Move_HYDRO_CANNON:: monbg ANIM_DEF_PARTNER setalpha 12, 8 playsewithpan SE_M_SURF, 192 - createsprite gHydroCannonChargeSpriteTemplate, ANIM_TARGET, 2, + createsprite gHydroCannonChargeSpriteTemplate, ANIM_TARGET, 2, delay 10 createvisualtask AnimTask_InvertScreenColor, 2, 257, 257, 257 delay 30 @@ -9578,7 +9578,7 @@ Move_ASTONISH:: playsewithpan SE_M_SKETCH, 63 createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 1, 1 createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 5, 1 - createvisualtask AnimTask_StretchTargetUp, 3, + createvisualtask AnimTask_StretchTargetUp, 3, waitforvisualfinish end @@ -9589,7 +9589,7 @@ Move_SEISMIC_TOSS:: monbg ANIM_DEF_PARTNER setalpha 12, 8 waitforvisualfinish - createvisualtask AnimTask_GetSeismicTossDamageLevel, 3, + createvisualtask AnimTask_GetSeismicTossDamageLevel, 3, delay 1 fadetobg 17 waitbgfadeout @@ -9700,7 +9700,7 @@ Move_PSYCHO_BOOST:: monbg ANIM_ATK_PARTNER fadetobg 3 waitbgfadeout - createvisualtask AnimTask_FadeScreenToWhite, 5, + createvisualtask AnimTask_FadeScreenToWhite, 5, waitbgfadein delay 6 createvisualtask AnimTask_CurseBlendEffect, 2, 1, 2, 8, 0, 10, 0 @@ -9765,7 +9765,7 @@ Move_DOOM_DESIRE:: createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_WHITE waitforvisualfinish delay 10 - createvisualtask AnimTask_DoomDesireLightBeam, 5, + createvisualtask AnimTask_DoomDesireLightBeam, 5, delay 5 playsewithpan SE_M_CONFUSE_RAY, 192 delay 10 @@ -9838,7 +9838,7 @@ Move_SKY_UPPERCUT:: end Move_SECRET_POWER:: - createvisualtask AnimTask_GetBattleTerrain, 5, + createvisualtask AnimTask_GetBattleTerrain, 5, jumpargeq 0, 0, Move_NEEDLE_ARM jumpargeq 0, 1, Move_MAGICAL_LEAF jumpargeq 0, 2, Move_MUD_SHOT @@ -10049,7 +10049,7 @@ Move_WEATHER_BALL:: playsewithpan SE_M_DETECT, 0 createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 31, 5, 1, RGB_WHITE, 10, 0, 0 waitforvisualfinish - createvisualtask AnimTask_GetWeather, 2, + createvisualtask AnimTask_GetWeather, 2, delay 1 jumpargeq 7, 0, WeatherBallNormal jumpargeq 7, 1, WeatherBallFire @@ -10375,7 +10375,7 @@ ConfusionEffect:: SetPsychicBackground:: fadetobg 3 waitbgfadeout - createvisualtask AnimTask_SetPsychicBackground, 5, + createvisualtask AnimTask_SetPsychicBackground, 5, waitbgfadein return @@ -10409,9 +10409,9 @@ UnsetSkyBg:: return SetSolarBeamBg:: - createvisualtask AnimTask_IsContest, 2, + createvisualtask AnimTask_IsContest, 2, jumpargeq 7, 1, SetSolarBeamBgContest - createvisualtask AnimTask_IsTargetPlayerSide, 2, + createvisualtask AnimTask_IsTargetPlayerSide, 2, jumpargeq 7, 0, SetSolarBeamBgOpponent goto SetSolarBeamBgPlayer SetSolarBeamBgContinue:: @@ -10492,7 +10492,7 @@ Status_Freeze:: monbg ANIM_DEF_PARTNER monbgprio_28 1 waitplaysewithpan SE_M_HAIL, 63, 17 - createvisualtask AnimTask_FrozenIceCube, 2, + createvisualtask AnimTask_FrozenIceCube, 2, waitforvisualfinish clearmonbg ANIM_DEF_PARTNER end @@ -10501,7 +10501,7 @@ Status_Curse:: loadspritegfx ANIM_TAG_GHOSTLY_SPIRIT monbg ANIM_DEF_PARTNER playsewithpan SE_M_NIGHTMARE, 63 - createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2, + createsprite gCurseGhostSpriteTemplate, ANIM_TARGET, 2, createvisualtask AnimTask_ShakeMon2, 2, 1, 2, 0, 14, 1 waitforvisualfinish clearmonbg ANIM_DEF_PARTNER @@ -10518,7 +10518,7 @@ Status_Nightmare:: end General_CastformChange:: - createvisualtask AnimTask_IsMonInvisible, 2, + createvisualtask AnimTask_IsMonInvisible, 2, jumpargeq 7, 1, CastformChangeSkipAnim goto CastformChangeContinue @@ -10536,7 +10536,7 @@ CastformChangeSkipAnim:: end General_StatsChange:: - createvisualtask AnimTask_StatsChange, 5, + createvisualtask AnimTask_StatsChange, 5, waitforvisualfinish end @@ -10554,12 +10554,12 @@ General_SubstituteFade:: end General_SubstituteAppear:: - createvisualtask AnimTask_MonToSubstitute, 2, + createvisualtask AnimTask_MonToSubstitute, 2, end General_BaitThrow:: createvisualtask AnimTask_SafariOrGhost_DecideAnimSides, 2, 0 - createvisualtask AnimTask_LoadBaitGfx, 2, + createvisualtask AnimTask_LoadBaitGfx, 2, delay 0 waitplaysewithpan SE_M_JUMP_KICK, 192, 22 createsprite gSafariBaitSpriteTemplate, ANIM_TARGET, 3, -18, 12, 0, 32 @@ -10567,16 +10567,16 @@ General_BaitThrow:: loopsewithpan SE_M_TAIL_WHIP, 63, 19, 2 createvisualtask AnimTask_SwayMon, 5, 1, 8, 1536, 2, 1 waitforvisualfinish - createvisualtask AnimTask_FreeBaitGfx, 2, + createvisualtask AnimTask_FreeBaitGfx, 2, end General_ItemKnockoff:: loadspritegfx ANIM_TAG_ITEM_BAG - createsprite gKnockOffItemSpriteTemplate, ANIM_TARGET, 2, + createsprite gKnockOffItemSpriteTemplate, ANIM_TARGET, 2, end General_TurnTrap:: - createvisualtask AnimTask_GetTrappedMoveAnimId, 5, + createvisualtask AnimTask_GetTrappedMoveAnimId, 5, jumpargeq 0, 1, Status_FireSpin jumpargeq 0, 2, Status_Whirlpool jumpargeq 0, 3, Status_Clamp @@ -10749,7 +10749,7 @@ General_Hail:: goto Move_HAIL General_LeechSeedDrain:: - createvisualtask AnimTask_GetBattlersFromArg, 5, + createvisualtask AnimTask_GetBattlersFromArg, 5, delay 0 goto Move_ABSORB @@ -10768,7 +10768,7 @@ General_MonHit:: General_ItemSteal:: loadspritegfx ANIM_TAG_ITEM_BAG createvisualtask AnimTask_SetAnimAttackerAndTargetForEffectAtk, 2 - createvisualtask AnimTask_TargetToEffectBattler, 2, + createvisualtask AnimTask_TargetToEffectBattler, 2, delay 1 createsprite gItemStealSpriteTemplate, ANIM_ATTACKER, 2, 0, -5, 10, 2, -1 end @@ -10780,7 +10780,7 @@ General_SnatchMove:: delay 1 createvisualtask AnimTask_SwayMon, 2, 0, 5, 5120, 4, 1 waitforvisualfinish - createvisualtask AnimTask_IsTargetSameSide, 2, + createvisualtask AnimTask_IsTargetSameSide, 2, jumpargeq 7, 0, SnatchOpposingMonMove goto SnatchPartnerMonMove @@ -10791,12 +10791,12 @@ SnatchMoveContinue:: SnatchOpposingMonMove:: playsewithpan SE_M_DOUBLE_TEAM, 192 - createvisualtask AnimTask_SnatchOpposingMonMove, 2, + createvisualtask AnimTask_SnatchOpposingMonMove, 2, goto SnatchMoveContinue SnatchPartnerMonMove:: playsewithpan SE_M_DOUBLE_TEAM, 192 - createvisualtask AnimTask_SnatchPartnerMove, 2, + createvisualtask AnimTask_SnatchPartnerMove, 2, goto SnatchMoveContinue General_FutureSightHit:: @@ -10820,12 +10820,12 @@ General_FutureSightHit:: end General_DoomDesireHit:: - createvisualtask AnimTask_SetAnimTargetToBattlerTarget, 2, + createvisualtask AnimTask_SetAnimTargetToBattlerTarget, 2, loadspritegfx ANIM_TAG_EXPLOSION createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, 1, 3, 0, 16, RGB_WHITE waitforvisualfinish delay 10 - createvisualtask AnimTask_DoomDesireLightBeam, 5, + createvisualtask AnimTask_DoomDesireLightBeam, 5, delay 9 playsewithpan SE_M_CONFUSE_RAY, 192 delay 9 @@ -10909,7 +10909,7 @@ General_MonScared:: playsewithpan SE_M_SKETCH, 63 createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 1, 1 createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 5, 1 - createvisualtask AnimTask_StretchTargetUp, 3, + createvisualtask AnimTask_StretchTargetUp, 3, waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, 2, 10, 0, 26336 waitforvisualfinish @@ -10921,7 +10921,7 @@ General_GhostGetOut:: fadetobg 2 waitbgfadeout monbg_22 0 - createvisualtask sub_80B6BBC, 2, + createvisualtask sub_80B6BBC, 2, waitbgfadein loopsewithpan SE_M_PSYBEAM, 63, 20, 3 waitforvisualfinish @@ -10932,7 +10932,7 @@ General_GhostGetOut:: createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 0, 1 createsprite gSprayWaterDropletSpriteTemplate, ANIM_TARGET, 5, 1, 1 createvisualtask AnimTask_ShakeMon2, 2, 1, 4, 0, 5, 1 - createvisualtask AnimTask_StretchTargetUp, 3, + createvisualtask AnimTask_StretchTargetUp, 3, waitforvisualfinish createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, 4, -1, 6, 0, 27349 waitforvisualfinish @@ -10971,7 +10971,7 @@ General_SafariRockThrow:: end General_SafariReaction:: - createvisualtask AnimTask_SafariGetReaction, 2, + createvisualtask AnimTask_SafariGetReaction, 2, waitforvisualfinish jumpargeq 7, 0, SafariReaction_WatchingCarefully jumpargeq 7, 1, SafariReaction_Angry @@ -11005,7 +11005,7 @@ SafariReaction_Eating:: end SnatchMoveTrySwapFromSubstitute:: - createvisualtask AnimTask_IsAttackerBehindSubstitute, 2, + createvisualtask AnimTask_IsAttackerBehindSubstitute, 2, jumpargeq 7, 1, SnatchMoveSwapSubstituteForMon SnatchMoveTrySwapFromSubstituteEnd:: @@ -11018,7 +11018,7 @@ SnatchMoveSwapSubstituteForMon:: goto SnatchMoveTrySwapFromSubstituteEnd SnatchMoveTrySwapToSubstitute:: - createvisualtask AnimTask_IsAttackerBehindSubstitute, 2, + createvisualtask AnimTask_IsAttackerBehindSubstitute, 2, jumpargeq 7, 1, SnatchMoveSwapMonForSubstitute SnatchMoveTrySwapToSubstituteEnd:: @@ -11046,9 +11046,9 @@ Special_SwitchOutPlayerMon:: end Special_SwitchOutOpponentMon:: - createvisualtask AnimTask_SwitchOutBallEffect, 2, + createvisualtask AnimTask_SwitchOutBallEffect, 2, delay 10 - createvisualtask AnimTask_SwitchOutShrinkMon, 2, + createvisualtask AnimTask_SwitchOutShrinkMon, 2, end Special_BallThrow:: @@ -11056,8 +11056,8 @@ Special_BallThrow:: delay 0 playsewithpan SE_BALL_THROW, 0 createvisualtask AnimTask_ThrowBall, 2 - createvisualtask AnimTask_IsBallBlockedByTrainerOrDodged, 2, - jumpargeq 7, -1, BallThrowTrainerBlock + createvisualtask AnimTask_IsBallBlockedByTrainerOrDodged, 2, + jumpargeq 7, -1, BallThrowTrainerBlock jumpargeq 7, -2, BallThrowGhostDodged BallThrowEnd:: waitforvisualfinish @@ -11086,11 +11086,11 @@ BallThrowGhostDodged:: goto BallThrowEnd Special_SafariBallThrow:: - createvisualtask AnimTask_LoadBallGfx, 2, + createvisualtask AnimTask_LoadBallGfx, 2, delay 0 createvisualtask AnimTask_ThrowBallSpecial, 2 waitforvisualfinish - createvisualtask AnimTask_FreeBallGfx, 2, + createvisualtask AnimTask_FreeBallGfx, 2, end Special_SubstituteToMon:: diff --git a/include/battle.h b/include/battle.h index ce764923f..b581190d6 100644 --- a/include/battle.h +++ b/include/battle.h @@ -55,6 +55,12 @@ #define MAX_TRAINER_ITEMS 4 +enum { + BATTLER_AFFINE_NORMAL, + BATTLER_AFFINE_EMERGE, + BATTLER_AFFINE_RETURN, +}; + #define MOVE_TARGET_SELECTED 0 #define MOVE_TARGET_DEPENDS (1 << 0) #define MOVE_TARGET_USER_OR_SELECTED (1 << 1) @@ -545,15 +551,15 @@ struct BattleAnimationInfo u8 field_6; u8 field_7; u8 ballThrowCaseId; - u8 healthboxSlideInStarted : 1; - u8 field_9_x2 : 1; - u8 field_9_x1C : 3; - u8 field_9_x20 : 1; - u8 field_9_x40 : 1; - u8 field_9_x80 : 1; - u8 field_A; + u8 introAnimActive:1; + u8 wildMonInvisible:1; + u8 field_9_x1C:3; + u8 field_9_x20:1; + u8 field_9_x40:1; + u8 field_9_x80:1; + u8 numBallParticles; u8 field_B; - s16 field_C; + s16 ballSubpx; u8 field_E; u8 field_F; }; diff --git a/include/battle_anim.h b/include/battle_anim.h index 1919ba7d0..fc40e1373 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -317,7 +317,7 @@ void AnimRecycle(struct Sprite *); // battle_anim_special.c void TryShinyAnimation(u8 battler, struct Pokemon *mon); u8 ItemIdToBallId(u16 itemId); -u8 LaunchBallStarsTask(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); +u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId); u8 LaunchBallFadeMonTask(bool8 unFadeLater, u8 battlerId, u32 arg2, u8 ballId); void DoLoadHealthboxPalsForLevelUp(u8 *, u8 *, u8 battlerId); void DoFreeHealthboxPalsForLevelUp(u8 batterId); diff --git a/include/battle_gfx_sfx_util.h b/include/battle_gfx_sfx_util.h index c77686e17..9d4f9c549 100644 --- a/include/battle_gfx_sfx_util.h +++ b/include/battle_gfx_sfx_util.h @@ -40,6 +40,6 @@ void BattleInterfaceSetWindowPals(void); void ClearTemporarySpeciesSpriteData(u8 battlerId, bool8 dontClearSubstitute); void AllocateMonSpritesGfx(void); void FreeMonSpritesGfx(void); -bool32 ShouldPlayNormalPokeCry(struct Pokemon *mon); +bool32 ShouldPlayNormalMonCry(struct Pokemon *mon); #endif // GUARD_BATTLE_GFX_SFX_UTIL_H diff --git a/include/constants/battle.h b/include/constants/battle.h index c318f3cde..822675837 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -312,7 +312,7 @@ #define NUM_CASTFORM_FORMS 4 #define CASTFORM_SUBSTITUTE (1 << 7) -// Return value for IsRunningFromBattleImpossible. +// Return value for IsRunningFromBattleImpossible. #define BATTLE_RUN_SUCCESS 0 #define BATTLE_RUN_FORBIDDEN 1 #define BATTLE_RUN_FAILURE 2 diff --git a/include/graphics.h b/include/graphics.h index 4ddc0deea..dc72466c8 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -3,30 +3,30 @@ #include "global.h" -extern const u32 gInterfaceGfx_PokeBall[]; -extern const u32 gInterfacePal_PokeBall[]; -extern const u32 gInterfaceGfx_GreatBall[]; -extern const u32 gInterfacePal_GreatBall[]; -extern const u32 gInterfaceGfx_SafariBall[]; -extern const u32 gInterfacePal_SafariBall[]; -extern const u32 gInterfaceGfx_UltraBall[]; -extern const u32 gInterfacePal_UltraBall[]; -extern const u32 gInterfaceGfx_MasterBall[]; -extern const u32 gInterfacePal_MasterBall[]; -extern const u32 gInterfaceGfx_NetBall[]; -extern const u32 gInterfacePal_NetBall[]; -extern const u32 gInterfaceGfx_DiveBall[]; -extern const u32 gInterfacePal_DiveBall[]; -extern const u32 gInterfaceGfx_NestBall[]; -extern const u32 gInterfacePal_NestBall[]; -extern const u32 gInterfaceGfx_RepeatBall[]; -extern const u32 gInterfacePal_RepeatBall[]; -extern const u32 gInterfaceGfx_TimerBall[]; -extern const u32 gInterfacePal_TimerBall[]; -extern const u32 gInterfaceGfx_LuxuryBall[]; -extern const u32 gInterfacePal_LuxuryBall[]; -extern const u32 gInterfaceGfx_PremierBall[]; -extern const u32 gInterfacePal_PremierBall[]; +extern const u32 gBallGfx_Poke[]; +extern const u32 gBallPal_Poke[]; +extern const u32 gBallGfx_Great[]; +extern const u32 gBallPal_Great[]; +extern const u32 gBallGfx_Safari[]; +extern const u32 gBallPal_Safari[]; +extern const u32 gBallGfx_Ultra[]; +extern const u32 gBallPal_Ultra[]; +extern const u32 gBallGfx_Master[]; +extern const u32 gBallPal_Master[]; +extern const u32 gBallGfx_Net[]; +extern const u32 gBallPal_Net[]; +extern const u32 gBallGfx_Dive[]; +extern const u32 gBallPal_Dive[]; +extern const u32 gBallGfx_Nest[]; +extern const u32 gBallPal_Nest[]; +extern const u32 gBallGfx_Repeat[]; +extern const u32 gBallPal_Repeat[]; +extern const u32 gBallGfx_Timer[]; +extern const u32 gBallPal_Timer[]; +extern const u32 gBallGfx_Luxury[]; +extern const u32 gBallPal_Luxury[]; +extern const u32 gBallGfx_Premier[]; +extern const u32 gBallPal_Premier[]; extern const u32 gOpenPokeballGfx[]; // pokemon gfx diff --git a/include/librfu.h b/include/librfu.h index 88e77acbd..886db0561 100644 --- a/include/librfu.h +++ b/include/librfu.h @@ -324,7 +324,7 @@ struct STWIStatus vu8 sending; }; -// This struct is used as u8 array in SDK. +// This struct is used as u8 array in SDK. struct RfuIntrStruct { union RfuPacket rxPacketAlloc; diff --git a/include/pokeball.h b/include/pokeball.h index 19467e7a7..0ef6d4357 100644 --- a/include/pokeball.h +++ b/include/pokeball.h @@ -20,6 +20,14 @@ enum POKEBALL_COUNT }; +enum { + BALL_AFFINE_ANIM_0, + BALL_ROTATE_RIGHT, + BALL_ROTATE_LEFT, + BALL_AFFINE_ANIM_3, + BALL_AFFINE_ANIM_4 +}; + extern const struct CompressedSpriteSheet gBallSpriteSheets[POKEBALL_COUNT]; extern const struct CompressedSpritePalette gBallSpritePalettes[POKEBALL_COUNT]; extern const struct SpriteTemplate gBallSpriteTemplates[]; @@ -34,6 +42,6 @@ void DoHitAnimHealthboxEffect(u8 bank); void LoadBallGfx(u8 ballId); void FreeBallGfx(u8 ballId); void StartHealthboxSlideIn(u8 battler); -void DestroySpriteAndFreeResources2(struct Sprite *sprite); +void DestroySpriteAndFreeResources_Ball(struct Sprite *sprite); #endif // GUARD_POKEBALL_H diff --git a/src/battle_anim_special.c b/src/battle_anim_special.c index 28ed918f2..238e0b3bd 100644 --- a/src/battle_anim_special.c +++ b/src/battle_anim_special.c @@ -659,7 +659,7 @@ void AnimTask_SwitchOutBallEffect(u8 taskId) y = GetBattlerSpriteCoord(gBattleAnimAttacker, BATTLER_COORD_Y); priority = gSprites[spriteId].oam.priority; subpriority = gSprites[spriteId].subpriority; - gTasks[taskId].data[10] = LaunchBallStarsTask(x, y + 32, priority, subpriority, ballId); + gTasks[taskId].data[10] = AnimateBallOpenParticles(x, y + 32, priority, subpriority, ballId); selectedPalettes = SelectBattleAnimSpriteAndBgPalettes(1, 0, 0, 0, 0, 0, 0); gTasks[taskId].data[11] = LaunchBallFadeMonTask(0, gBattleAnimAttacker, selectedPalettes, ballId); gTasks[taskId].data[0]++; @@ -748,7 +748,7 @@ void AnimTask_ThrowBall(u8 taskId) gSprites[spriteId].data[1] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_X); gSprites[spriteId].data[2] = GetBattlerSpriteCoord(gBattleAnimTarget, BATTLER_COORD_Y) - 16; gSprites[spriteId].callback = SpriteCB_ThrowBall_Init; - gBattleSpritesDataPtr->animationData->field_9_x2 = gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible; + gBattleSpritesDataPtr->animationData->wildMonInvisible = gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible; gTasks[taskId].data[0] = spriteId; gTasks[taskId].func = AnimTask_ThrowBall_WaitAnimObjComplete; } @@ -860,7 +860,7 @@ static void SpriteCB_ThrowBall_ArcFlight(struct Sprite *sprite) switch (ballId) { case 0 ... POKEBALL_COUNT - 1: - LaunchBallStarsTask(sprite->x, sprite->y - 5, 1, 28, ballId); + AnimateBallOpenParticles(sprite->x, sprite->y - 5, 1, 28, ballId); LaunchBallFadeMonTask(0, gBattleAnimTarget, 14, ballId); break; } @@ -1015,7 +1015,7 @@ static void SpriteCB_ThrowBall_InitShake(struct Sprite *sprite) sprite->data[3] = 0; sprite->affineAnimPaused = TRUE; StartSpriteAffineAnim(sprite, 1); - gBattleSpritesDataPtr->animationData->field_C = 0; + gBattleSpritesDataPtr->animationData->ballSubpx = 0; sprite->callback = SpriteCB_ThrowBall_DoShake; PlaySE(SE_BALL); } @@ -1029,14 +1029,14 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) switch (sprite->data[3] & 0xFF) { case 0: - if (gBattleSpritesDataPtr->animationData->field_C > 0xFF) + if (gBattleSpritesDataPtr->animationData->ballSubpx > 0xFF) { sprite->x2 += sprite->data[4]; - gBattleSpritesDataPtr->animationData->field_C &= 0xFF; + gBattleSpritesDataPtr->animationData->ballSubpx &= 0xFF; } else { - gBattleSpritesDataPtr->animationData->field_C += 0xB0; + gBattleSpritesDataPtr->animationData->ballSubpx += 0xB0; } sprite->data[5]++; @@ -1044,7 +1044,7 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) var0 = sprite->data[5] + 7; if (var0 > 14) { - gBattleSpritesDataPtr->animationData->field_C = 0; + gBattleSpritesDataPtr->animationData->ballSubpx = 0; sprite->data[3]++; sprite->data[5] = 0; } @@ -1067,14 +1067,14 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) } break; case 2: - if (gBattleSpritesDataPtr->animationData->field_C > 0xFF) + if (gBattleSpritesDataPtr->animationData->ballSubpx > 0xFF) { sprite->x2 += sprite->data[4]; - gBattleSpritesDataPtr->animationData->field_C &= 0xFF; + gBattleSpritesDataPtr->animationData->ballSubpx &= 0xFF; } else { - gBattleSpritesDataPtr->animationData->field_C += 0xB0; + gBattleSpritesDataPtr->animationData->ballSubpx += 0xB0; } sprite->data[5]++; @@ -1082,7 +1082,7 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) var0 = sprite->data[5] + 12; if (var0 > 24) { - gBattleSpritesDataPtr->animationData->field_C = 0; + gBattleSpritesDataPtr->animationData->ballSubpx = 0; sprite->data[3]++; sprite->data[5] = 0; } @@ -1104,14 +1104,14 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) ChangeSpriteAffineAnim(sprite, 1); // fall through case 4: - if (gBattleSpritesDataPtr->animationData->field_C > 0xFF) + if (gBattleSpritesDataPtr->animationData->ballSubpx > 0xFF) { sprite->x2 += sprite->data[4]; - gBattleSpritesDataPtr->animationData->field_C &= 0xFF; + gBattleSpritesDataPtr->animationData->ballSubpx &= 0xFF; } else { - gBattleSpritesDataPtr->animationData->field_C += 0xB0; + gBattleSpritesDataPtr->animationData->ballSubpx += 0xB0; } sprite->data[5]++; @@ -1119,7 +1119,7 @@ static void SpriteCB_ThrowBall_DoShake(struct Sprite *sprite) var0 = sprite->data[5] + 4; if (var0 > 8) { - gBattleSpritesDataPtr->animationData->field_C = 0; + gBattleSpritesDataPtr->animationData->ballSubpx = 0; sprite->data[3]++; sprite->data[5] = 0; sprite->data[4] = -sprite->data[4]; @@ -1319,7 +1319,7 @@ static void SpriteCB_ThrowBall_BeginBreakOut(struct Sprite *sprite) switch (ballId) { case 0 ... POKEBALL_COUNT - 1: - LaunchBallStarsTask(sprite->x, sprite->y - 5, 1, 28, ballId); + AnimateBallOpenParticles(sprite->x, sprite->y - 5, 1, 28, ballId); LaunchBallFadeMonTask(1, gBattleAnimTarget, 14, ballId); break; } @@ -1351,7 +1351,7 @@ static void SpriteCB_ThrowBall_RunBreakOut(struct Sprite *sprite) if (sprite->animEnded && next) { gSprites[gBattlerSpriteIds[gBattleAnimTarget]].y2 = 0; - gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible = gBattleSpritesDataPtr->animationData->field_9_x2; + gSprites[gBattlerSpriteIds[gBattleAnimTarget]].invisible = gBattleSpritesDataPtr->animationData->wildMonInvisible; sprite->data[0] = 0; sprite->callback = BattleAnimObj_SignalEnd; gDoingBattleAnim = FALSE; @@ -1430,7 +1430,7 @@ static void LoadBallParticleGfx(u8 ballId) } } -u8 LaunchBallStarsTask(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId) +u8 AnimateBallOpenParticles(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId) { u8 taskId; @@ -1448,7 +1448,7 @@ u8 LaunchBallStarsTask(u8 x, u8 y, u8 priority, u8 subpriority, u8 ballId) static void IncrementBattleParticleCounter(void) { if (gMain.inBattle) - gBattleSpritesDataPtr->animationData->field_A++; + gBattleSpritesDataPtr->animationData->numBallParticles++; } static void PokeBallOpenParticleAnimation(u8 taskId) @@ -1850,8 +1850,8 @@ static void DestroyBallOpenAnimationParticle(struct Sprite *sprite) } else { - gBattleSpritesDataPtr->animationData->field_A--; - if (gBattleSpritesDataPtr->animationData->field_A == 0) + gBattleSpritesDataPtr->animationData->numBallParticles--; + if (gBattleSpritesDataPtr->animationData->numBallParticles == 0) { for (j = 0; j < POKEBALL_COUNT; j++) { @@ -2097,7 +2097,7 @@ static void AnimTask_ShinySparkles(u8 taskId) return; } - if (gBattleSpritesDataPtr->animationData->field_A) + if (gBattleSpritesDataPtr->animationData->numBallParticles) return; counter = gTasks[taskId].data[10]++; diff --git a/src/battle_controller_link_opponent.c b/src/battle_controller_link_opponent.c index 8901cb219..839a230ad 100644 --- a/src/battle_controller_link_opponent.c +++ b/src/battle_controller_link_opponent.c @@ -271,7 +271,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); SetBattlerShadowSpriteCallback(gActiveBattler, GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES)); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 0; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForShinyAnimAndHealthbox; } } @@ -1538,7 +1538,7 @@ static void LinkOpponentHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 1; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = LinkOpponentDummy; } diff --git a/src/battle_controller_link_partner.c b/src/battle_controller_link_partner.c index 6fa7282e0..7dbfbde65 100644 --- a/src/battle_controller_link_partner.c +++ b/src/battle_controller_link_partner.c @@ -236,7 +236,7 @@ static void Intro_ShowHealthbox(void) HEALTHBOX_ALL); StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 0; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForHealthbox; } } @@ -1464,7 +1464,7 @@ static void LinkPartnerHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 1; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = LinkPartnerDummy; } diff --git a/src/battle_controller_oak_old_man.c b/src/battle_controller_oak_old_man.c index 16083b6c3..b2c8341ef 100644 --- a/src/battle_controller_oak_old_man.c +++ b/src/battle_controller_oak_old_man.c @@ -427,7 +427,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) HEALTHBOX_ALL); StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 0; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForShinyAnimAndHealthbox; } } @@ -2093,7 +2093,7 @@ static void OakOldManHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 1; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = PlayerDummy; } else diff --git a/src/battle_controller_opponent.c b/src/battle_controller_opponent.c index 3fa84eee8..3aa20e0f3 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle_controller_opponent.c @@ -265,7 +265,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); SetBattlerShadowSpriteCallback(gActiveBattler, GetMonData(&gEnemyParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_SPECIES)); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = FALSE; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForShinyAnimAndHealthbox; } } @@ -1638,7 +1638,7 @@ static void OpponentHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = TRUE; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = OpponentDummy; } diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 0d54be29e..16c812fb0 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -931,7 +931,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) HEALTHBOX_ALL); StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 0; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForShinyAnimAndHealthbox; } } @@ -2719,7 +2719,7 @@ static void PlayerHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 1; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = PlayerDummy; } @@ -2912,8 +2912,8 @@ static void PreviewDeterminativeMoveTargets(void) break; case MOVE_TARGET_BOTH: case MOVE_TARGET_OPPONENTS_FIELD: - bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)] - | gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)]) << 16; + bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)] + | gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)]) << 16; startY = 8; break; case MOVE_TARGET_USER: @@ -2935,8 +2935,8 @@ static void PreviewDeterminativeMoveTargets(void) case MOVE_MIST: case MOVE_HEAL_BELL: case MOVE_AROMATHERAPY: - bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)] - | gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)]) << 16; + bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)] + | gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)]) << 16; break; case MOVE_HELPING_HAND: bitMask = (gBitTable[GetBattlerAtPosition(GetBattlerPosition(gActiveBattler) ^ BIT_FLANK)]) << 16; @@ -2948,8 +2948,8 @@ static void PreviewDeterminativeMoveTargets(void) startY = 8; break; case MOVE_TARGET_FOES_AND_ALLY: - bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)] - | gBitTable[GetBattlerAtPosition(GetBattlerPosition(gActiveBattler) ^ BIT_FLANK)] + bitMask = (gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)] + | gBitTable[GetBattlerAtPosition(GetBattlerPosition(gActiveBattler) ^ BIT_FLANK)] | gBitTable[GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)]) << 16; startY = 8; break; diff --git a/src/battle_controller_pokedude.c b/src/battle_controller_pokedude.c index 68c1642eb..9f27cd1c3 100644 --- a/src/battle_controller_pokedude.c +++ b/src/battle_controller_pokedude.c @@ -408,7 +408,7 @@ static void Intro_TryShinyAnimShowHealthbox(void) HEALTHBOX_ALL); StartHealthboxSlideIn(gActiveBattler); SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]); - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 0; + gBattleSpritesDataPtr->animationData->introAnimActive = FALSE; gBattlerControllerFuncs[gActiveBattler] = Intro_WaitForShinyAnimAndHealthbox; } } @@ -1865,7 +1865,7 @@ static void PokedudeHandleIntroTrainerBallThrow(void) gTasks[taskId].data[0] = gActiveBattler; if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].partyStatusSummaryShown) gTasks[gBattlerStatusSummaryTaskId[gActiveBattler]].func = Task_HidePartyStatusSummary; - gBattleSpritesDataPtr->animationData->healthboxSlideInStarted = 1; + gBattleSpritesDataPtr->animationData->introAnimActive = TRUE; gBattlerControllerFuncs[gActiveBattler] = PokedudeDummy; } diff --git a/src/battle_controllers.c b/src/battle_controllers.c index 89975500b..f259903e7 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -800,7 +800,7 @@ void BtlController_EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2) } // not used -static void BtlController_EmitUnknownYesNoBox(u8 bufferId, u32 arg1) // TODO: Does the function name make sense for pokefirered? +static void BtlController_EmitUnknownYesNoBox(u8 bufferId, u32 arg1) // TODO: Does the function name make sense for pokefirered? { sBattleBuffersTransferData[0] = CONTROLLER_UNKNOWNYESNOBOX; sBattleBuffersTransferData[1] = arg1; diff --git a/src/battle_gfx_sfx_util.c b/src/battle_gfx_sfx_util.c index 5c6be1bbe..88334ba9c 100644 --- a/src/battle_gfx_sfx_util.c +++ b/src/battle_gfx_sfx_util.c @@ -663,7 +663,7 @@ void HandleSpeciesGfxDataChange(u8 battlerAtk, u8 battlerDef, u8 transformType) { const void *src; void *dst; - + position = GetBattlerPosition(battlerAtk); targetSpecies = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_SPECIES); personalityValue = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerAtk]], MON_DATA_PERSONALITY); @@ -1042,17 +1042,20 @@ void FreeMonSpritesGfx(void) FREE_AND_SET_NULL(gMonSpritesGfxPtr); } -bool32 ShouldPlayNormalPokeCry(struct Pokemon *mon) +bool32 ShouldPlayNormalMonCry(struct Pokemon *mon) { s16 hp, maxHP; s32 barLevel; if (GetMonData(mon, MON_DATA_STATUS) & (STATUS1_ANY | STATUS1_TOXIC_COUNTER)) return FALSE; + hp = GetMonData(mon, MON_DATA_HP); maxHP = GetMonData(mon, MON_DATA_MAX_HP); + barLevel = GetHPBarLevel(hp, maxHP); if (barLevel <= HP_BAR_YELLOW) return FALSE; + return TRUE; } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index ee69a4785..b42a51dea 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -676,7 +676,7 @@ static const struct OamData sOamData_MonIconOnLvlUpBanner = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(32x32), .x = 0, diff --git a/src/battle_setup.c b/src/battle_setup.c index 6b87edd69..31d0f068a 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -181,7 +181,7 @@ static void Task_BattleStart(u8 taskId) case 0: if (!FldEffPoison_IsActive()) { - HelpSystem_Disable(); + HelpSystem_Disable(); BT_StartOnField(tTransition); ++tState; } @@ -189,7 +189,7 @@ static void Task_BattleStart(u8 taskId) case 1: if (BT_IsDone() == TRUE) { - HelpSystem_Enable(); + HelpSystem_Enable(); CleanupOverworldWindowsAndTilemaps(); SetMainCallback2(CB2_InitBattle); RestartWildEncounterImmunitySteps(); diff --git a/src/battle_transition.c b/src/battle_transition.c index 0682cfaaa..21d732aa5 100644 --- a/src/battle_transition.c +++ b/src/battle_transition.c @@ -394,7 +394,7 @@ static const TransitionStateFunc sBT_Phase2WhiteFadeInStripesFuncs[] = }; static const u16 sWhiteStripeDelay[] = { 0, 9, 15, 6, 12, 3 }; - + static const TransitionStateFunc sBT_Phase2GridSquaresFuncs[] = { BT_Phase2GridSquares_LoadGfx, @@ -480,7 +480,7 @@ static const struct OamData sOamData_Unused = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(64x64), .x = 0, @@ -1022,7 +1022,7 @@ static void VBCB_BT_Phase2BigPokeball2(void) #undef tTheta #undef tAmplitude -// TODO: Document this effect after knowing more about field effects. +// TODO: Document this effect after knowing more about field effects. static void BT_Phase2SlidingPokeballs(u8 taskId) { while (sBT_Phase2SlidingPokeballsFuncs[gTasks[taskId].tState](&gTasks[taskId])); diff --git a/src/data/graphics/interface_pokeballs.h b/src/data/graphics/interface_pokeballs.h index fe9a4e5be..69d09d51f 100644 --- a/src/data/graphics/interface_pokeballs.h +++ b/src/data/graphics/interface_pokeballs.h @@ -1,37 +1,37 @@ -const u32 gInterfaceGfx_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.4bpp.lz"); -const u32 gInterfacePal_PokeBall[] = INCBIN_U32("graphics/interface/ball/poke.gbapal.lz"); +const u32 gBallGfx_Poke[] = INCBIN_U32("graphics/interface/ball/poke.4bpp.lz"); +const u32 gBallPal_Poke[] = INCBIN_U32("graphics/interface/ball/poke.gbapal.lz"); -const u32 gInterfaceGfx_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.4bpp.lz"); -const u32 gInterfacePal_GreatBall[] = INCBIN_U32("graphics/interface/ball/great.gbapal.lz"); +const u32 gBallGfx_Great[] = INCBIN_U32("graphics/interface/ball/great.4bpp.lz"); +const u32 gBallPal_Great[] = INCBIN_U32("graphics/interface/ball/great.gbapal.lz"); -const u32 gInterfaceGfx_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.4bpp.lz"); -const u32 gInterfacePal_SafariBall[] = INCBIN_U32("graphics/interface/ball/safari.gbapal.lz"); +const u32 gBallGfx_Safari[] = INCBIN_U32("graphics/interface/ball/safari.4bpp.lz"); +const u32 gBallPal_Safari[] = INCBIN_U32("graphics/interface/ball/safari.gbapal.lz"); -const u32 gInterfaceGfx_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.4bpp.lz"); -const u32 gInterfacePal_UltraBall[] = INCBIN_U32("graphics/interface/ball/ultra.gbapal.lz"); +const u32 gBallGfx_Ultra[] = INCBIN_U32("graphics/interface/ball/ultra.4bpp.lz"); +const u32 gBallPal_Ultra[] = INCBIN_U32("graphics/interface/ball/ultra.gbapal.lz"); -const u32 gInterfaceGfx_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.4bpp.lz"); -const u32 gInterfacePal_MasterBall[] = INCBIN_U32("graphics/interface/ball/master.gbapal.lz"); +const u32 gBallGfx_Master[] = INCBIN_U32("graphics/interface/ball/master.4bpp.lz"); +const u32 gBallPal_Master[] = INCBIN_U32("graphics/interface/ball/master.gbapal.lz"); -const u32 gInterfaceGfx_NetBall[] = INCBIN_U32("graphics/interface/ball/net.4bpp.lz"); -const u32 gInterfacePal_NetBall[] = INCBIN_U32("graphics/interface/ball/net.gbapal.lz"); +const u32 gBallGfx_Net[] = INCBIN_U32("graphics/interface/ball/net.4bpp.lz"); +const u32 gBallPal_Net[] = INCBIN_U32("graphics/interface/ball/net.gbapal.lz"); -const u32 gInterfaceGfx_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.4bpp.lz"); -const u32 gInterfacePal_DiveBall[] = INCBIN_U32("graphics/interface/ball/dive.gbapal.lz"); +const u32 gBallGfx_Dive[] = INCBIN_U32("graphics/interface/ball/dive.4bpp.lz"); +const u32 gBallPal_Dive[] = INCBIN_U32("graphics/interface/ball/dive.gbapal.lz"); -const u32 gInterfaceGfx_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.4bpp.lz"); -const u32 gInterfacePal_NestBall[] = INCBIN_U32("graphics/interface/ball/nest.gbapal.lz"); +const u32 gBallGfx_Nest[] = INCBIN_U32("graphics/interface/ball/nest.4bpp.lz"); +const u32 gBallPal_Nest[] = INCBIN_U32("graphics/interface/ball/nest.gbapal.lz"); -const u32 gInterfaceGfx_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.4bpp.lz"); -const u32 gInterfacePal_RepeatBall[] = INCBIN_U32("graphics/interface/ball/repeat.gbapal.lz"); +const u32 gBallGfx_Repeat[] = INCBIN_U32("graphics/interface/ball/repeat.4bpp.lz"); +const u32 gBallPal_Repeat[] = INCBIN_U32("graphics/interface/ball/repeat.gbapal.lz"); -const u32 gInterfaceGfx_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.4bpp.lz"); -const u32 gInterfacePal_TimerBall[] = INCBIN_U32("graphics/interface/ball/timer.gbapal.lz"); +const u32 gBallGfx_Timer[] = INCBIN_U32("graphics/interface/ball/timer.4bpp.lz"); +const u32 gBallPal_Timer[] = INCBIN_U32("graphics/interface/ball/timer.gbapal.lz"); -const u32 gInterfaceGfx_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.4bpp.lz"); -const u32 gInterfacePal_LuxuryBall[] = INCBIN_U32("graphics/interface/ball/luxury.gbapal.lz"); +const u32 gBallGfx_Luxury[] = INCBIN_U32("graphics/interface/ball/luxury.4bpp.lz"); +const u32 gBallPal_Luxury[] = INCBIN_U32("graphics/interface/ball/luxury.gbapal.lz"); -const u32 gInterfaceGfx_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.4bpp.lz"); -const u32 gInterfacePal_PremierBall[] = INCBIN_U32("graphics/interface/ball/premier.gbapal.lz"); +const u32 gBallGfx_Premier[] = INCBIN_U32("graphics/interface/ball/premier.4bpp.lz"); +const u32 gBallPal_Premier[] = INCBIN_U32("graphics/interface/ball/premier.gbapal.lz"); const u32 gOpenPokeballGfx[] = INCBIN_U32("graphics/interface/ball_open.4bpp.lz"); diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 084062b50..689ee6da5 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -711,7 +711,7 @@ static const struct OamData sOamData_HeldItem = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(8x8), .x = 0, @@ -767,7 +767,7 @@ static const struct OamData sOamData_MenuPokeball = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(32x32), .x = 0, @@ -824,7 +824,7 @@ static const struct OamData sOamData_MenuPokeballSmall = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(16x16), .x = 0, @@ -905,7 +905,7 @@ static const struct OamData sOamData_StatusCondition = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(32x8), .x = 0, diff --git a/src/daycare.c b/src/daycare.c index 54b06751d..a7bd7f7ac 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -143,7 +143,7 @@ static const struct OamData sOamData_EggHatch = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(32x32), .x = 0, @@ -223,7 +223,7 @@ static const struct OamData sOamData_EggShard = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(8x8), .x = 0, diff --git a/src/fldeff_strength.c b/src/fldeff_strength.c index c9a0fd1d5..c5dbfa6cd 100644 --- a/src/fldeff_strength.c +++ b/src/fldeff_strength.c @@ -15,7 +15,7 @@ bool8 SetUpFieldMove_Strength(void) { if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING) || CheckObjectGraphicsInFrontOfPlayer(OBJ_EVENT_GFX_PUSHABLE_BOULDER) != TRUE) { - return FALSE; + return FALSE; } else { diff --git a/src/librfu_stwi.c b/src/librfu_stwi.c index 43f291826..fb90cb452 100644 --- a/src/librfu_stwi.c +++ b/src/librfu_stwi.c @@ -118,7 +118,7 @@ void STWI_init_Callback_S(void) STWI_set_Callback_S(NULL); } -// The callback can take 2 or 3 arguments. +// The callback can take 2 or 3 arguments. void STWI_set_Callback_M(void *callbackM) { gSTWIStatus->callbackM = callbackM; diff --git a/src/mail_data.c b/src/mail_data.c index 3dd75f8c0..bb5fa6581 100644 --- a/src/mail_data.c +++ b/src/mail_data.c @@ -54,7 +54,7 @@ u8 GiveMailToMon(struct Pokemon *mon, u16 itemId) for (i = 0; i < PLAYER_NAME_LENGTH && gSaveBlock2Ptr->playerName[i] != EOS; i++) gSaveBlock1Ptr->mail[id].playerName[i] = gSaveBlock2Ptr->playerName[i]; for (; i <= 5; i++) - gSaveBlock1Ptr->mail[id].playerName[i] = CHAR_SPACE; + gSaveBlock1Ptr->mail[id].playerName[i] = CHAR_SPACE; gSaveBlock1Ptr->mail[id].playerName[i] = EOS; for (i = 0; i < 4; i++) gSaveBlock1Ptr->mail[id].trainerId[i] = gSaveBlock2Ptr->playerTrainerId[i]; diff --git a/src/menu_indicators.c b/src/menu_indicators.c index b7027a8d5..33f95705d 100644 --- a/src/menu_indicators.c +++ b/src/menu_indicators.c @@ -84,7 +84,7 @@ static const struct OamData sOamData_ScrollArrowIndicator = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(16x16), .x = 0, @@ -224,7 +224,7 @@ static const struct OamData sOamData_RedArrowCursor = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = SPRITE_SHAPE(16x16), .x = 0, diff --git a/src/pokeball.c b/src/pokeball.c index 9dbdfd0d1..a77401d44 100644 --- a/src/pokeball.c +++ b/src/pokeball.c @@ -14,13 +14,34 @@ #include "constants/songs.h" #include "constants/sound.h" -#define tFrames data[0] -#define tPan data[1] -#define tThrowId data[2] -#define tBattler data[3] -#define tOpponentBattler data[4] +static void Task_DoPokeballSendOutAnim(u8 taskId); +static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite); +static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite); +static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite); +static void SpriteCB_BallThrow(struct Sprite *sprite); +static void SpriteCB_BallThrow_ReachMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartShrinkMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_ShrinkMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_Close(struct Sprite *sprite); +static void SpriteCB_BallThrow_FallToGround(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartShakes(struct Sprite *sprite); +static void SpriteCB_BallThrow_Shake(struct Sprite *sprite); +static void SpriteCB_BallThrow_StartCaptureMon(struct Sprite *sprite); +static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite); +static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite); +static void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite); +static void HandleBallAnimEnd(struct Sprite *sprite); +static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite); +static void SpriteCB_ReleasedMonFlyOut(struct Sprite *sprite); +static void SpriteCB_TradePokeball(struct Sprite *sprite); +static void SpriteCB_TradePokeballSendOff(struct Sprite *sprite); +static void SpriteCB_TradePokeballEnd(struct Sprite *sprite); +static void SpriteCB_HealthboxSlideInDelayed(struct Sprite *sprite); +static void SpriteCB_HealthboxSlideIn(struct Sprite *sprite); +static void SpriteCB_HitAnimHealthoxEffect(struct Sprite *sprite); +static u16 GetBattlerPokeballItemId(u8 battlerId); -#define sBattler data[6] +// rom const data #define GFX_TAG_POKE_BALL 55000 #define GFX_TAG_GREAT_BALL 55001 @@ -35,68 +56,36 @@ #define GFX_TAG_LUXURY_BALL 55010 #define GFX_TAG_PREMIER_BALL 55011 -// Function Declarations -static void Task_DoPokeballSendOutAnim(u8 taskId); -static void SpriteCB_TestBallThrow(struct Sprite *sprite); -static void SpriteCB_BallThrow_ReachMon(struct Sprite *sprite); -static void SpriteCB_BallThrow_StartShrinkMon(struct Sprite *sprite); -static void SpriteCB_BallThrow_ShrinkMon(struct Sprite *sprite); -static void SpriteCB_BallThrow_Close(struct Sprite *sprite); -static void SpriteCB_BallThrow_FallToGround(struct Sprite *sprite); -static void SpriteCB_BallThrow_StartShakes(struct Sprite *sprite); -static void SpriteCB_BallThrow_Shake(struct Sprite *sprite); -static void Task_PlayCryWhenReleasedFromBall(u8 taskId); -static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite); -static void SpriteCB_BallThrow_StartCaptureMon(struct Sprite *sprite); -static void HandleBallAnimEnd(struct Sprite *sprite); -static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite); -static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite); -static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite); -static void SpriteCB_ReleaseMon2FromBall(struct Sprite *sprite); -static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite); -static u8 LaunchBallStarsTaskForPokeball(u8 x, u8 y, u8 kindOfStars, u8 d); -static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 battlerId, u32 arg2); -static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite); -static void SpriteCB_ReleasedMonFlyOut(struct Sprite *sprite); -static void SpriteCB_TradePokeball(struct Sprite *sprite); -static void SpriteCB_TradePokeballSendOff(struct Sprite *sprite); -static void SpriteCB_TradePokeballEnd(struct Sprite *sprite); -static void SpriteCB_HealthboxSlideInDelayed(struct Sprite *sprite); -static void SpriteCB_HealthboxSlideIn(struct Sprite *sprite); -static void SpriteCB_HitAnimHealthoxEffect(struct Sprite *sprite); -static u16 GetBattlerPokeballItemId(u8 battlerId); - -// Data const struct CompressedSpriteSheet gBallSpriteSheets[POKEBALL_COUNT] = { - {gInterfaceGfx_PokeBall, 384, GFX_TAG_POKE_BALL}, - {gInterfaceGfx_GreatBall, 384, GFX_TAG_GREAT_BALL}, - {gInterfaceGfx_SafariBall, 384, GFX_TAG_SAFARI_BALL}, - {gInterfaceGfx_UltraBall, 384, GFX_TAG_ULTRA_BALL}, - {gInterfaceGfx_MasterBall, 384, GFX_TAG_MASTER_BALL}, - {gInterfaceGfx_NetBall, 384, GFX_TAG_NET_BALL}, - {gInterfaceGfx_DiveBall, 384, GFX_TAG_DIVE_BALL}, - {gInterfaceGfx_NestBall, 384, GFX_TAG_NEST_BALL}, - {gInterfaceGfx_RepeatBall, 384, GFX_TAG_REPEAT_BALL}, - {gInterfaceGfx_TimerBall, 384, GFX_TAG_TIMER_BALL}, - {gInterfaceGfx_LuxuryBall, 384, GFX_TAG_LUXURY_BALL}, - {gInterfaceGfx_PremierBall, 384, GFX_TAG_PREMIER_BALL}, + [BALL_POKE] = {gBallGfx_Poke, 384, GFX_TAG_POKE_BALL}, + [BALL_GREAT] = {gBallGfx_Great, 384, GFX_TAG_GREAT_BALL}, + [BALL_SAFARI] = {gBallGfx_Safari, 384, GFX_TAG_SAFARI_BALL}, + [BALL_ULTRA] = {gBallGfx_Ultra, 384, GFX_TAG_ULTRA_BALL}, + [BALL_MASTER] = {gBallGfx_Master, 384, GFX_TAG_MASTER_BALL}, + [BALL_NET] = {gBallGfx_Net, 384, GFX_TAG_NET_BALL}, + [BALL_DIVE] = {gBallGfx_Dive, 384, GFX_TAG_DIVE_BALL}, + [BALL_NEST] = {gBallGfx_Nest, 384, GFX_TAG_NEST_BALL}, + [BALL_REPEAT] = {gBallGfx_Repeat, 384, GFX_TAG_REPEAT_BALL}, + [BALL_TIMER] = {gBallGfx_Timer, 384, GFX_TAG_TIMER_BALL}, + [BALL_LUXURY] = {gBallGfx_Luxury, 384, GFX_TAG_LUXURY_BALL}, + [BALL_PREMIER] = {gBallGfx_Premier, 384, GFX_TAG_PREMIER_BALL}, }; const struct CompressedSpritePalette gBallSpritePalettes[POKEBALL_COUNT] = { - {gInterfacePal_PokeBall, GFX_TAG_POKE_BALL}, - {gInterfacePal_GreatBall, GFX_TAG_GREAT_BALL}, - {gInterfacePal_SafariBall, GFX_TAG_SAFARI_BALL}, - {gInterfacePal_UltraBall, GFX_TAG_ULTRA_BALL}, - {gInterfacePal_MasterBall, GFX_TAG_MASTER_BALL}, - {gInterfacePal_NetBall, GFX_TAG_NET_BALL}, - {gInterfacePal_DiveBall, GFX_TAG_DIVE_BALL}, - {gInterfacePal_NestBall, GFX_TAG_NEST_BALL}, - {gInterfacePal_RepeatBall, GFX_TAG_REPEAT_BALL}, - {gInterfacePal_TimerBall, GFX_TAG_TIMER_BALL}, - {gInterfacePal_LuxuryBall, GFX_TAG_LUXURY_BALL}, - {gInterfacePal_PremierBall, GFX_TAG_PREMIER_BALL}, + [BALL_POKE] = {gBallPal_Poke, GFX_TAG_POKE_BALL}, + [BALL_GREAT] = {gBallPal_Great, GFX_TAG_GREAT_BALL}, + [BALL_SAFARI] = {gBallPal_Safari, GFX_TAG_SAFARI_BALL}, + [BALL_ULTRA] = {gBallPal_Ultra, GFX_TAG_ULTRA_BALL}, + [BALL_MASTER] = {gBallPal_Master, GFX_TAG_MASTER_BALL}, + [BALL_NET] = {gBallPal_Net, GFX_TAG_NET_BALL}, + [BALL_DIVE] = {gBallPal_Dive, GFX_TAG_DIVE_BALL}, + [BALL_NEST] = {gBallPal_Nest, GFX_TAG_NEST_BALL}, + [BALL_REPEAT] = {gBallPal_Repeat, GFX_TAG_REPEAT_BALL}, + [BALL_TIMER] = {gBallPal_Timer, GFX_TAG_TIMER_BALL}, + [BALL_LUXURY] = {gBallPal_Luxury, GFX_TAG_LUXURY_BALL}, + [BALL_PREMIER] = {gBallPal_Premier, GFX_TAG_PREMIER_BALL}, }; static const struct OamData sBallOamData = @@ -171,171 +160,192 @@ static const union AnimCmd *const sBallAnimSequences[] = sBallAnimSeq6, }; -static const union AffineAnimCmd sBallAffineAnimSeq0[] = +static const union AffineAnimCmd sAffineAnim_BallRotate_0[] = { AFFINEANIMCMD_FRAME(0, 0, 0, 1), AFFINEANIMCMD_JUMP(0), }; -static const union AffineAnimCmd sBallAffineAnimSeq1[] = +static const union AffineAnimCmd sAffineAnim_BallRotate_Right[] = { AFFINEANIMCMD_FRAME(0, 0, -3, 1), AFFINEANIMCMD_JUMP(0), }; -static const union AffineAnimCmd sBallAffineAnimSeq2[] = +static const union AffineAnimCmd sAffineAnim_BallRotate_Left[] = { AFFINEANIMCMD_FRAME(0, 0, 3, 1), AFFINEANIMCMD_JUMP(0), }; -static const union AffineAnimCmd sBallAffineAnimSeq3[] = +static const union AffineAnimCmd sAffineAnim_BallRotate_3[] = { AFFINEANIMCMD_FRAME(256, 256, 0, 0), AFFINEANIMCMD_END, }; -static const union AffineAnimCmd sBallAffineAnimSeq4[] = +static const union AffineAnimCmd sAffineAnim_BallRotate_4[] = { AFFINEANIMCMD_FRAME(0, 0, 25, 1), AFFINEANIMCMD_JUMP(0), }; -static const union AffineAnimCmd *const sBallAffineAnimSequences[] = +static const union AffineAnimCmd *const sAffineAnim_BallRotate[] = { - sBallAffineAnimSeq0, - sBallAffineAnimSeq1, - sBallAffineAnimSeq2, - sBallAffineAnimSeq3, - sBallAffineAnimSeq4, + [BALL_AFFINE_ANIM_0] = sAffineAnim_BallRotate_0, + [BALL_ROTATE_RIGHT] = sAffineAnim_BallRotate_Right, + [BALL_ROTATE_LEFT] = sAffineAnim_BallRotate_Left, + [BALL_AFFINE_ANIM_3] = sAffineAnim_BallRotate_3, + [BALL_AFFINE_ANIM_4] = sAffineAnim_BallRotate_4, }; const struct SpriteTemplate gBallSpriteTemplates[POKEBALL_COUNT] = { + [BALL_POKE] = { .tileTag = GFX_TAG_POKE_BALL, .paletteTag = GFX_TAG_POKE_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_GREAT] = { .tileTag = GFX_TAG_GREAT_BALL, .paletteTag = GFX_TAG_GREAT_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_SAFARI] = { .tileTag = GFX_TAG_SAFARI_BALL, .paletteTag = GFX_TAG_SAFARI_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_ULTRA] = { .tileTag = GFX_TAG_ULTRA_BALL, .paletteTag = GFX_TAG_ULTRA_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_MASTER] = { .tileTag = GFX_TAG_MASTER_BALL, .paletteTag = GFX_TAG_MASTER_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_NET] = { .tileTag = GFX_TAG_NET_BALL, .paletteTag = GFX_TAG_NET_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_DIVE] = { .tileTag = GFX_TAG_DIVE_BALL, .paletteTag = GFX_TAG_DIVE_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_NEST] = { .tileTag = GFX_TAG_NEST_BALL, .paletteTag = GFX_TAG_NEST_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_REPEAT] = { .tileTag = GFX_TAG_REPEAT_BALL, .paletteTag = GFX_TAG_REPEAT_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_TIMER] = { .tileTag = GFX_TAG_TIMER_BALL, .paletteTag = GFX_TAG_TIMER_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_LUXURY] = { .tileTag = GFX_TAG_LUXURY_BALL, .paletteTag = GFX_TAG_LUXURY_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, + [BALL_PREMIER] = { .tileTag = GFX_TAG_PREMIER_BALL, .paletteTag = GFX_TAG_PREMIER_BALL, .oam = &sBallOamData, .anims = sBallAnimSequences, .images = NULL, - .affineAnims = sBallAffineAnimSequences, - .callback = SpriteCB_TestBallThrow, + .affineAnims = sAffineAnim_BallRotate, + .callback = SpriteCB_BallThrow, }, }; -// Functions +#define tFrames data[0] +#define tPan data[1] +#define tThrowId data[2] +#define tBattler data[3] +#define tOpponentBattler data[4] + u8 DoPokeballSendOutAnimation(s16 pan, u8 kindOfThrow) { u8 taskId; - + gDoingBattleAnim = TRUE; gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive = TRUE; + taskId = CreateTask(Task_DoPokeballSendOutAnim, 5); gTasks[taskId].tPan = pan; gTasks[taskId].tThrowId = kindOfThrow; gTasks[taskId].tBattler = gActiveBattler; + return 0; } +#define sBattler data[6] + static void Task_DoPokeballSendOutAnim(u8 taskId) { u16 throwCaseId; @@ -362,12 +372,12 @@ static void Task_DoPokeballSendOutAnim(u8 taskId) ballId = ItemIdToBallId(itemId); LoadBallGfx(ballId); - + if (gBattleTypeFlags & BATTLE_TYPE_LINK) gender = gLinkPlayers[GetBattlerMultiplayerId(battlerId)].gender; else gender = gSaveBlock2Ptr->playerGender; - + ballSpriteId = CreateSprite(&gBallSpriteTemplates[ballId], 32, 80, 29); gSprites[ballSpriteId].data[0] = 0x80; gSprites[ballSpriteId].data[1] = 0; @@ -387,7 +397,7 @@ static void Task_DoPokeballSendOutAnim(u8 taskId) x = 48; y = 70; } - + gBattlerTarget = battlerId; gSprites[ballSpriteId].x = x; gSprites[ballSpriteId].y = y; @@ -425,7 +435,10 @@ static void Task_DoPokeballSendOutAnim(u8 taskId) PlaySE(SE_BALL_THROW); } -static void SpriteCB_TestBallThrow(struct Sprite *sprite) +// This sequence of functions is very similar to those that get run when +// a Pokéball gets thrown at a wild Pokémon, starting at SpriteCB_Ball_Arc. +// These do not seem to get run. +static void SpriteCB_BallThrow(struct Sprite *sprite) { if (TranslateAnimHorizontalArc(sprite)) { @@ -442,7 +455,7 @@ static void SpriteCB_TestBallThrow(struct Sprite *sprite) sprite->y2 = 0; sprite->data[5] = 0; ballId = ItemIdToBallId(GetBattlerPokeballItemId(opponentBattler)); - LaunchBallStarsTask(sprite->x, sprite->y - 5, 1, 0x1C, ballId); + AnimateBallOpenParticles(sprite->x, sprite->y - 5, 1, 28, ballId); sprite->data[0] = LaunchBallFadeMonTask(FALSE, opponentBattler, 14, ballId); sprite->sBattler = opponentBattler; sprite->data[7] = noOfShakes; @@ -468,7 +481,7 @@ static void SpriteCB_BallThrow_StartShrinkMon(struct Sprite *sprite) { sprite->data[5] = 0; sprite->callback = SpriteCB_BallThrow_ShrinkMon; - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], 2); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_RETURN); AnimateSprite(&gSprites[gBattlerSpriteIds[sprite->sBattler]]); gSprites[gBattlerSpriteIds[sprite->sBattler]].data[1] = 0; } @@ -479,7 +492,7 @@ static void SpriteCB_BallThrow_ShrinkMon(struct Sprite *sprite) sprite->data[5]++; if (sprite->data[5] == 11) PlaySE(SE_BALL_TRADE); - + if (gSprites[gBattlerSpriteIds[sprite->sBattler]].affineAnimEnded) { StartSpriteAnim(sprite, 2); @@ -649,7 +662,7 @@ static void SpriteCB_BallThrow_Shake(struct Sprite *sprite) StartSpriteAffineAnim(sprite, 2); else StartSpriteAffineAnim(sprite, 1); - + PlaySE(SE_BALL); } break; @@ -666,10 +679,10 @@ static void SpriteCB_BallThrow_Shake(struct Sprite *sprite) static void Task_PlayCryWhenReleasedFromBall(u8 taskId) { - u8 state2 = gTasks[taskId].data[2]; + u8 wantedCry = gTasks[taskId].tCryTaskWantedCry; s8 pan = gTasks[taskId].tCryTaskPan; u16 species = gTasks[taskId].tCryTaskSpecies; - struct Pokemon *mon = (void *)(u32)((u32)(gTasks[taskId].tCryTaskMonPtr1 << 0x10) | ((u16)gTasks[taskId].tCryTaskMonPtr2)); + struct Pokemon *mon = (void *)(u32)((gTasks[taskId].tCryTaskMonPtr1 << 16) | (u16)(gTasks[taskId].tCryTaskMonPtr2)); switch (gTasks[taskId].tCryTaskState) { @@ -678,14 +691,15 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) if (gTasks[taskId].data[8] < 3) gTasks[taskId].data[8]++; else - gTasks[taskId].tCryTaskState = state2 + 1; + gTasks[taskId].tCryTaskState = wantedCry + 1; break; case 1: - if (ShouldPlayNormalPokeCry(mon) == TRUE) + // Play single cry + if (ShouldPlayNormalMonCry(mon) == TRUE) PlayCry_ByMode(species, pan, CRY_MODE_NORMAL); else PlayCry_ByMode(species, pan, CRY_MODE_WEAK); - + DestroyTask(taskId); break; case 2: @@ -696,10 +710,11 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) case 20: if (gTasks[taskId].tCryTaskFrames == 0) { - if (ShouldPlayNormalPokeCry(mon) == TRUE) - PlayCry_ReleaseDouble(species, pan, 1); + // Play first doubles cry + if (ShouldPlayNormalMonCry(mon) == TRUE) + PlayCry_ReleaseDouble(species, pan, CRY_MODE_DOUBLES); else - PlayCry_ReleaseDouble(species, pan, 12); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_WEAK_DOUBLES); DestroyTask(taskId); } @@ -719,6 +734,7 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) break; } gTasks[taskId].tCryTaskState++; + // fall through case 31: if (!IsCryPlayingOrClearCrySongs()) { @@ -733,11 +749,11 @@ static void Task_PlayCryWhenReleasedFromBall(u8 taskId) gTasks[taskId].tCryTaskFrames--; break; } - - if (ShouldPlayNormalPokeCry(mon) == TRUE) - PlayCry_ReleaseDouble(species, pan, 0); + // Play second doubles cry + if (ShouldPlayNormalMonCry(mon) == TRUE) + PlayCry_ReleaseDouble(species, pan, CRY_MODE_NORMAL); else - PlayCry_ReleaseDouble(species, pan, 11); + PlayCry_ReleaseDouble(species, pan, CRY_MODE_WEAK); DestroyTask(taskId); break; @@ -751,8 +767,8 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) StartSpriteAnim(sprite, 1); ballId = ItemIdToBallId(GetBattlerPokeballItemId(battlerId)); - LaunchBallStarsTask(sprite->x, sprite->y - 5, 1, 0x1C, ballId); - sprite->data[0] = LaunchBallFadeMonTask(1, sprite->sBattler, 14, ballId); + AnimateBallOpenParticles(sprite->x, sprite->y - 5, 1, 28, ballId); + sprite->data[0] = LaunchBallFadeMonTask(TRUE, sprite->sBattler, 14, ballId); sprite->callback = HandleBallAnimEnd; if (gMain.inBattle) @@ -776,7 +792,7 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) species = GetMonData(mon, MON_DATA_SPECIES); if ((battlerId == GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) || battlerId == GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)) - && IsDoubleBattle() && gBattleSpritesDataPtr->animationData->healthboxSlideInStarted) + && IsDoubleBattle() && gBattleSpritesDataPtr->animationData->introAnimActive) { if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { @@ -789,23 +805,23 @@ static void SpriteCB_ReleaseMonFromBall(struct Sprite *sprite) } } - if (!IsDoubleBattle() || !gBattleSpritesDataPtr->animationData->healthboxSlideInStarted) + if (!IsDoubleBattle() || !gBattleSpritesDataPtr->animationData->introAnimActive) wantedCryCase = 0; else if (battlerId == GetBattlerAtPosition(B_POSITION_PLAYER_LEFT) || battlerId == GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT)) wantedCryCase = 1; else wantedCryCase = 2; - + taskId = CreateTask(Task_PlayCryWhenReleasedFromBall, 3); gTasks[taskId].tCryTaskSpecies = species; gTasks[taskId].tCryTaskPan = pan; gTasks[taskId].tCryTaskWantedCry = wantedCryCase; - gTasks[taskId].tCryTaskMonPtr1 = (u32)(mon) >> 0x10; + gTasks[taskId].tCryTaskMonPtr1 = (u32)(mon) >> 16; gTasks[taskId].tCryTaskMonPtr2 = (u32)(mon); gTasks[taskId].tCryTaskState = 0; } - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], 1); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[sprite->sBattler]], BATTLER_AFFINE_EMERGE); AnimateSprite(&gSprites[gBattlerSpriteIds[sprite->sBattler]]); gSprites[gBattlerSpriteIds[sprite->sBattler]].data[1] = 0x1000; } @@ -837,7 +853,7 @@ static void HandleBallAnimEnd(struct Sprite *sprite) sprite->invisible = TRUE; if (gSprites[gBattlerSpriteIds[battlerId]].affineAnimEnded) { - StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[battlerId]], 0); + StartSpriteAffineAnim(&gSprites[gBattlerSpriteIds[battlerId]], BATTLER_AFFINE_NORMAL); affineAnimEnded = TRUE; } else @@ -857,7 +873,7 @@ static void HandleBallAnimEnd(struct Sprite *sprite) for (doneBattlers = 0, i = 0; i < MAX_BATTLERS_COUNT; i++) { - if (!gBattleSpritesDataPtr->healthBoxesData[i].ballAnimActive) + if (gBattleSpritesDataPtr->healthBoxesData[i].ballAnimActive == FALSE) doneBattlers++; } if (doneBattlers == MAX_BATTLERS_COUNT) @@ -896,8 +912,8 @@ static void SpriteCB_BallThrow_CaptureMon(struct Sprite *sprite) static void SpriteCB_PlayerMonSendOut_1(struct Sprite *sprite) { sprite->data[0] = 25; - sprite->data[2] = GetBattlerSpriteCoord(sprite->sBattler, 2); - sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, 3) + 24; + sprite->data[2] = GetBattlerSpriteCoord(sprite->sBattler, BATTLER_COORD_X_2); + sprite->data[4] = GetBattlerSpriteCoord(sprite->sBattler, BATTLER_COORD_Y_PIC_OFFSET) + 24; sprite->data[5] = -30; sprite->oam.affineParam = sprite->sBattler; InitAnimArcTranslation(sprite); @@ -946,11 +962,12 @@ static void SpriteCB_PlayerMonSendOut_2(struct Sprite *sprite) { sprite->x += sprite->x2; sprite->y += sprite->y2; - sprite->x2 = sprite->y2 = 0; + sprite->y2 = 0; + sprite->x2 = 0; sprite->sBattler = sprite->oam.affineParam & 0xFF; sprite->data[0] = 0; - if (IsDoubleBattle() && gBattleSpritesDataPtr->animationData->healthboxSlideInStarted + if (IsDoubleBattle() && gBattleSpritesDataPtr->animationData->introAnimActive && sprite->sBattler == GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT)) sprite->callback = SpriteCB_ReleaseMon2FromBall; else @@ -976,7 +993,7 @@ static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite) if (sprite->data[0] > 15) { sprite->data[0] = 0; - if (IsDoubleBattle() && gBattleSpritesDataPtr->animationData->healthboxSlideInStarted + if (IsDoubleBattle() && gBattleSpritesDataPtr->animationData->introAnimActive && sprite->sBattler == GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT)) sprite->callback = SpriteCB_ReleaseMon2FromBall; else @@ -986,121 +1003,144 @@ static void SpriteCB_OpponentMonSendOut(struct Sprite *sprite) #undef sBattler -static u8 LaunchBallStarsTaskForPokeball(u8 x, u8 y, u8 kindOfStars, u8 d) +static u8 AnimateBallOpenParticlesForPokeball(u8 x, u8 y, u8 kindOfStars, u8 subpriority) { - return LaunchBallStarsTask(x, y, kindOfStars, d, BALL_POKE); + return AnimateBallOpenParticles(x, y, kindOfStars, subpriority, BALL_POKE); } -static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 battlerId, u32 arg2) +static u8 LaunchBallFadeMonTaskForPokeball(bool8 unFadeLater, u8 spritePalNum, u32 selectedPalettes) { - return LaunchBallFadeMonTask(unFadeLater, battlerId, arg2, BALL_POKE); + return LaunchBallFadeMonTask(unFadeLater, spritePalNum, selectedPalettes, BALL_POKE); } -void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 battlerId, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 g, u32 h) +// Sprite data for the pokeball +#define sMonSpriteId data[0] +#define sDelay data[1] +#define sMonPalNum data[2] +#define sFadePalsLo data[3] +#define sFadePalsHi data[4] +#define sFinalMonX data[5] +#define sFinalMonY data[6] +#define sTrigIdx data[7] + +// Pokeball in Oak intro, and when receiving via trade +void CreatePokeballSpriteToReleaseMon(u8 monSpriteId, u8 monPalNum, u8 x, u8 y, u8 oamPriority, u8 subpriortiy, u8 delay, u32 fadePalettes) { u8 spriteId; - LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[0]); - LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[0]); - spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subpriortiy); - gSprites[spriteId].data[0] = monSpriteId; - gSprites[spriteId].data[5] = gSprites[monSpriteId].x; - gSprites[spriteId].data[6] = gSprites[monSpriteId].y; + LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[BALL_POKE]); + LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[BALL_POKE]); + spriteId = CreateSprite(&gBallSpriteTemplates[BALL_POKE], x, y, subpriortiy); + + gSprites[spriteId].sMonSpriteId = monSpriteId; + gSprites[spriteId].sFinalMonX = gSprites[monSpriteId].x; + gSprites[spriteId].sFinalMonY = gSprites[monSpriteId].y; + gSprites[monSpriteId].x = x; gSprites[monSpriteId].y = y; - gSprites[spriteId].data[1] = g; - gSprites[spriteId].data[2] = battlerId; - gSprites[spriteId].data[3] = h; - gSprites[spriteId].data[4] = h >> 0x10; + + gSprites[spriteId].sDelay = delay; + gSprites[spriteId].sMonPalNum = monPalNum; + gSprites[spriteId].sFadePalsLo = fadePalettes; + gSprites[spriteId].sFadePalsHi = fadePalettes >> 16; gSprites[spriteId].oam.priority = oamPriority; gSprites[spriteId].callback = SpriteCB_PokeballReleaseMon; + gSprites[monSpriteId].invisible = TRUE; } static void SpriteCB_PokeballReleaseMon(struct Sprite *sprite) { - if (sprite->data[1] == 0) + if (sprite->sDelay == 0) { - u8 r5; - u8 r7 = sprite->data[0]; - u8 battlerId = sprite->data[2]; - u32 r4 = (u16)sprite->data[3] | ((u16)sprite->data[4] << 16); + u8 subpriority; + u8 spriteId = sprite->sMonSpriteId; + u8 monPalNum = sprite->sMonPalNum; + u32 selectedPalettes = (u16)sprite->sFadePalsLo | ((u16)sprite->sFadePalsHi << 16); if (sprite->subpriority != 0) - r5 = sprite->subpriority - 1; + subpriority = sprite->subpriority - 1; else - r5 = 0; + subpriority = 0; StartSpriteAnim(sprite, 1); - LaunchBallStarsTaskForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, r5); - sprite->data[1] = LaunchBallFadeMonTaskForPokeball(1, battlerId, r4); + AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority); + // sDelay re-used to store task id but never read + sprite->sDelay = LaunchBallFadeMonTaskForPokeball(TRUE, monPalNum, selectedPalettes); sprite->callback = SpriteCB_ReleasedMonFlyOut; - gSprites[r7].invisible = FALSE; - StartSpriteAffineAnim(&gSprites[r7], 1); - AnimateSprite(&gSprites[r7]); - gSprites[r7].data[1] = 0x1000; - sprite->data[7] = 0; + gSprites[spriteId].invisible = FALSE; + StartSpriteAffineAnim(&gSprites[spriteId], BATTLER_AFFINE_EMERGE); + AnimateSprite(&gSprites[spriteId]); + gSprites[spriteId].data[1] = 0x1000; + sprite->sTrigIdx = 0; } else { - sprite->data[1]--; + sprite->sDelay--; } } static void SpriteCB_ReleasedMonFlyOut(struct Sprite *sprite) { - bool8 r12 = FALSE; - bool8 r6 = FALSE; - u8 monSpriteId = sprite->data[0]; - u16 var1; - u16 var2; + bool8 emergeAnimFinished = FALSE; + bool8 atFinalPosition = FALSE; + u8 monSpriteId = sprite->sMonSpriteId; + u16 x, y; if (sprite->animEnded) sprite->invisible = TRUE; - + if (gSprites[monSpriteId].affineAnimEnded) { - StartSpriteAffineAnim(&gSprites[monSpriteId], 0); - r12 = TRUE; + StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_NORMAL); + emergeAnimFinished = TRUE; } - - var1 = (sprite->data[5] - sprite->x) * sprite->data[7] / 128 + sprite->x; - var2 = (sprite->data[6] - sprite->y) * sprite->data[7] / 128 + sprite->y; - gSprites[monSpriteId].x = var1; - gSprites[monSpriteId].y = var2; - if (sprite->data[7] < 128) - { - s16 sine = -(gSineTable[(u8)sprite->data[7]] / 8); - sprite->data[7] += 4; + x = (sprite->sFinalMonX - sprite->x) * sprite->sTrigIdx / 128 + sprite->x; + y = (sprite->sFinalMonY - sprite->y) * sprite->sTrigIdx / 128 + sprite->y; + gSprites[monSpriteId].x = x; + gSprites[monSpriteId].y = y; + + if (sprite->sTrigIdx < 128) + { + s16 sine = -(gSineTable[(u8)sprite->sTrigIdx] / 8); + + sprite->sTrigIdx += 4; gSprites[monSpriteId].x2 = sine; gSprites[monSpriteId].y2 = sine; } else { - gSprites[monSpriteId].x = sprite->data[5]; - gSprites[monSpriteId].y = sprite->data[6]; + gSprites[monSpriteId].x = sprite->sFinalMonX; + gSprites[monSpriteId].y = sprite->sFinalMonY; gSprites[monSpriteId].x2 = 0; gSprites[monSpriteId].y2 = 0; - r6 = TRUE; + atFinalPosition = TRUE; } - - if (sprite->animEnded && r12 && r6) + if (sprite->animEnded && emergeAnimFinished && atFinalPosition) + { DestroySpriteAndFreeResources(sprite); + } } -u8 CreateTradePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 g, u32 h) +#undef sFinalMonX +#undef sFinalMonY +#undef sTrigIdx + +#define sTimer data[5] + +u8 CreateTradePokeballSprite(u8 monSpriteId, u8 monPalNum, u8 x, u8 y, u8 oamPriority, u8 subPriority, u8 delay, u32 fadePalettes) { u8 spriteId; - LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[0]); - LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[0]); - spriteId = CreateSprite(&gBallSpriteTemplates[0], x, y, subPriority); - gSprites[spriteId].data[0] = a; - gSprites[spriteId].data[1] = g; - gSprites[spriteId].data[2] = b; - gSprites[spriteId].data[3] = h; - gSprites[spriteId].data[4] = h >> 16; + LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[BALL_POKE]); + LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[BALL_POKE]); + spriteId = CreateSprite(&gBallSpriteTemplates[BALL_POKE], x, y, subPriority); + gSprites[spriteId].sMonSpriteId = monSpriteId; + gSprites[spriteId].sDelay = delay; + gSprites[spriteId].sMonPalNum = monPalNum; + gSprites[spriteId].sFadePalsLo = fadePalettes; + gSprites[spriteId].sFadePalsHi = fadePalettes >> 16; gSprites[spriteId].oam.priority = oamPriority; gSprites[spriteId].callback = SpriteCB_TradePokeball; return spriteId; @@ -1108,29 +1148,35 @@ u8 CreateTradePokeballSprite(u8 a, u8 b, u8 x, u8 y, u8 oamPriority, u8 subPrior static void SpriteCB_TradePokeball(struct Sprite *sprite) { - if (sprite->data[1] == 0) + if (sprite->sDelay == 0) { - u8 r6; - u8 r7 = sprite->data[0]; - u8 r8 = sprite->data[2]; - u32 r5 = (u16)sprite->data[3] | ((u16)sprite->data[4] << 16); + u8 subpriority; + u8 monSpriteId = sprite->sMonSpriteId; + u8 monPalNum = sprite->sMonPalNum; + u32 selectedPalettes = (u16)sprite->sFadePalsLo | ((u16)sprite->sFadePalsHi << 16); if (sprite->subpriority != 0) - r6 = sprite->subpriority - 1; + subpriority = sprite->subpriority - 1; else - r6 = 0; + subpriority = 0; StartSpriteAnim(sprite, 1); - LaunchBallStarsTaskForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, r6); - sprite->data[1] = LaunchBallFadeMonTaskForPokeball(1, r8, r5); + AnimateBallOpenParticlesForPokeball(sprite->x, sprite->y - 5, sprite->oam.priority, subpriority); + // sDelay re-used to store task id but never read + sprite->sDelay = LaunchBallFadeMonTaskForPokeball(TRUE, monPalNum, selectedPalettes); sprite->callback = SpriteCB_TradePokeballSendOff; - StartSpriteAffineAnim(&gSprites[r7], 2); - AnimateSprite(&gSprites[r7]); - gSprites[r7].data[1] = 0; +#ifdef BUGFIX + // FIX: If this is used on a sprite that has previously had an affine animation, it will not + // play the shrink anim properly due to being paused. + gSprites[monSpriteId].affineAnimPaused = FALSE; +#endif // BUGFIX + StartSpriteAffineAnim(&gSprites[monSpriteId], BATTLER_AFFINE_RETURN); + AnimateSprite(&gSprites[monSpriteId]); + gSprites[monSpriteId].data[1] = 0; } else { - sprite->data[1]--; + sprite->sDelay--; } } @@ -1138,16 +1184,16 @@ static void SpriteCB_TradePokeballSendOff(struct Sprite *sprite) { u8 monSpriteId; - sprite->data[5]++; - if (sprite->data[5] == 11) + sprite->sTimer++; + if (sprite->sTimer == 11) PlaySE(SE_BALL_TRADE); - - monSpriteId = sprite->data[0]; + + monSpriteId = sprite->sMonSpriteId; if (gSprites[monSpriteId].affineAnimEnded) { StartSpriteAnim(sprite, 2); gSprites[monSpriteId].invisible = TRUE; - sprite->data[5] = 0; + sprite->sTimer = 0; sprite->callback = SpriteCB_TradePokeballEnd; } else @@ -1163,28 +1209,40 @@ static void SpriteCB_TradePokeballEnd(struct Sprite *sprite) sprite->callback = SpriteCallbackDummy; } -void DestroySpriteAndFreeResources2(struct Sprite *sprite) +#undef sMonSpriteId +#undef sDelay +#undef sMonPalNum +#undef sFadePalsLo +#undef sFadePalsHi +#undef sTimer + +// Unreferenced in RSE, but used here, possibly by mistake. +void DestroySpriteAndFreeResources_Ball(struct Sprite *sprite) { DestroySpriteAndFreeResources(sprite); } +#define sSpeedX data[0] +#define sSpeedY data[1] + +#define sDelayTimer data[1] + void StartHealthboxSlideIn(u8 battlerId) { struct Sprite *healthboxSprite = &gSprites[gHealthboxSpriteIds[battlerId]]; - healthboxSprite->data[0] = 5; - healthboxSprite->data[1] = 0; + healthboxSprite->sSpeedX = 5; + healthboxSprite->sSpeedY = 0; healthboxSprite->x2 = 0x73; healthboxSprite->y2 = 0; healthboxSprite->callback = SpriteCB_HealthboxSlideIn; if (GetBattlerSide(battlerId) != B_SIDE_PLAYER) { - healthboxSprite->data[0] = -healthboxSprite->data[0]; - healthboxSprite->data[1] = -healthboxSprite->data[1]; + healthboxSprite->sSpeedX = -healthboxSprite->sSpeedX; + healthboxSprite->sSpeedY = -healthboxSprite->sSpeedY; healthboxSprite->x2 = -healthboxSprite->x2; healthboxSprite->y2 = -healthboxSprite->y2; } - gSprites[healthboxSprite->data[5]].callback(&gSprites[healthboxSprite->data[5]]); if (GetBattlerPosition(battlerId) == B_POSITION_PLAYER_RIGHT) healthboxSprite->callback = SpriteCB_HealthboxSlideInDelayed; @@ -1192,22 +1250,26 @@ void StartHealthboxSlideIn(u8 battlerId) static void SpriteCB_HealthboxSlideInDelayed(struct Sprite *sprite) { - sprite->data[1]++; - if (sprite->data[1] == 20) + sprite->sDelayTimer++; + if (sprite->sDelayTimer == 20) { - sprite->data[1] = 0; + sprite->sDelayTimer = 0; sprite->callback = SpriteCB_HealthboxSlideIn; } } static void SpriteCB_HealthboxSlideIn(struct Sprite *sprite) { - sprite->x2 -= sprite->data[0]; - sprite->y2 -= sprite->data[1]; + sprite->x2 -= sprite->sSpeedX; + sprite->y2 -= sprite->sSpeedY; if (sprite->x2 == 0 && sprite->y2 == 0) sprite->callback = SpriteCallbackDummy; } +#undef sSpeedX +#undef sSpeedY +#undef sDelayTimer + void DoHitAnimHealthboxEffect(u8 battlerId) { u8 spriteId; @@ -1242,7 +1304,7 @@ void LoadBallGfx(u8 ballId) LoadCompressedSpriteSheetUsingHeap(&gBallSpriteSheets[ballId]); LoadCompressedSpritePaletteUsingHeap(&gBallSpritePalettes[ballId]); } - + switch (ballId) { case BALL_DIVE: @@ -1251,7 +1313,7 @@ void LoadBallGfx(u8 ballId) break; default: var = GetSpriteTileStartByTag(gBallSpriteSheets[ballId].tag); - LZDecompressVram(gOpenPokeballGfx, (void *)(VRAM + 0x10100 + var * 32)); + LZDecompressVram(gOpenPokeballGfx, (void *)(OBJ_VRAM0 + 0x100 + var * 32)); break; } } diff --git a/src/pokemon.c b/src/pokemon.c index fcfd678f4..e2bfb20cf 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1667,7 +1667,7 @@ static const struct OamData sOakSpeechNidoranFDummyOamData = .y = 0, .affineMode = 0, .objMode = 0, - .mosaic = 0, + .mosaic = FALSE, .bpp = 0, .shape = 0, .x = 0, diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index 1287bbab5..b345de9bf 100644 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3859,7 +3859,7 @@ static const struct OamData sOamData_JumpMon = .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(64x64), .x = 0, @@ -3876,7 +3876,7 @@ static const struct OamData sOamData_Vine16x32 = .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(16x32), .x = 0, @@ -3893,7 +3893,7 @@ static const struct OamData sOamData_Vine32x32 = .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(32x32), .x = 0, @@ -3910,7 +3910,7 @@ static const struct OamData sOamData_Vine32x16 = .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(32x16), .x = 0, @@ -4064,7 +4064,7 @@ static const struct OamData sOamData_Star = .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(16x16), .x = 0, diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 61dffc7c4..da4df9eff 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -4133,7 +4133,8 @@ static void ShowOrHideBallIconObj(u8 invisible) static void DestroyBallIconObj(void) { - DestroySpriteAndFreeResources2(&gSprites[sMonSummaryScreen->ballIconSpriteId]); + // Redundant, as DestroySpriteAndFreeResources could've been used. + DestroySpriteAndFreeResources_Ball(&gSprites[sMonSummaryScreen->ballIconSpriteId]); } static void PokeSum_CreateMonIconSprite(void) @@ -5181,7 +5182,7 @@ static void PokeSum_TryPlayMonCry(void) { if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG)) { - if (ShouldPlayNormalPokeCry(&sMonSummaryScreen->currentMon) == TRUE) + if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE) PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL); else PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK); diff --git a/src/trainer_see.c b/src/trainer_see.c index d1c97e9af..e884d6104 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -566,7 +566,7 @@ static const struct OamData sOamData_Emoticons = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, .objMode = ST_OAM_OBJ_NORMAL, - .mosaic = 0, + .mosaic = FALSE, .bpp = ST_OAM_4BPP, .shape = SPRITE_SHAPE(16x16), .x = 0, From 4a60396428be7f1b0c69a1bbf2a91d23b05da0af Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Fri, 29 Jul 2022 22:49:52 -0400 Subject: [PATCH 04/13] Colors --- src/berry_crush.c | 4 ++-- src/fame_checker.c | 8 ++++---- src/hall_of_fame.c | 6 +++--- src/help_system_util.c | 10 +++++----- src/menu_helpers.c | 2 +- src/new_menu_helpers.c | 10 +++++----- src/oak_speech.c | 4 ++-- src/party_menu.c | 8 ++++---- src/script_menu.c | 8 ++++---- src/start_menu.c | 2 +- src/text.c | 2 +- 11 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/berry_crush.c b/src/berry_crush.c index 254bd170f..2b4a5ed55 100644 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -2367,9 +2367,9 @@ static u32 Cmd_StopGame(struct BerryCrushGame * game, UNUSED u8 *args) case 0: DrawDialogueFrame(0, FALSE); if (game->playAgainState == PLAY_AGAIN_NO_BERRIES) - AddTextPrinterParameterized2(0, 2, sMessages[MSG_NO_BERRIES], game->textSpeed, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sMessages[MSG_NO_BERRIES], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else - AddTextPrinterParameterized2(0, 2, sMessages[MSG_DROPPED], game->textSpeed, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sMessages[MSG_DROPPED], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); break; case 1: diff --git a/src/fame_checker.c b/src/fame_checker.c index e44ff2371..f0e359bed 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -822,7 +822,7 @@ static bool8 TryExitPickMode(u8 taskId) static void MessageBoxPrintEmptyText(void) { - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_ClearTextbox, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_ClearTextbox, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void Task_EnterPickMode(u8 taskId) @@ -962,7 +962,7 @@ static void GetPickModeText(void) if (HasUnlockedAllFlavorTextsForCurrentPerson() == TRUE) whichText = NUM_FAMECHECKER_PERSONS; StringExpandPlaceholders(gStringVar4, sFameCheckerNameAndQuotesPointers[sFameCheckerData->unlockedPersons[who] + whichText]); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } } @@ -973,7 +973,7 @@ static void PrintSelectedNameInBrightGreen(u8 taskId) u16 cursorPos = FameCheckerGetCursorY(); FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); StringExpandPlaceholders(gStringVar4, sFameCheckerFlavorTextPointers[sFameCheckerData->unlockedPersons[cursorPos] * 6 + data[1]]); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } @@ -1513,7 +1513,7 @@ static void Task_SwitchToPickMode(u8 taskId) static void PrintCancelDescription(void) { FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_FameCheckerWillBeClosed, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_FameCheckerWillBeClosed, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 849fd2352..68494d9cf 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -452,7 +452,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) *lastSavedTeam = *sHofMonPtr; DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_TrySaveData; } @@ -638,7 +638,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); HallOfFame_PrintPlayerInfo(1, 2); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_LeagueChamp, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gText_LeagueChamp, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_ExitOnKeyPressed; } @@ -968,7 +968,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { TopBarWindowPrintString(gText_ABUTTONExit, 8, TRUE); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_HOFCorrupted, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gText_HOFCorrupted, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_HofPC_ExitOnButtonPress; } diff --git a/src/help_system_util.c b/src/help_system_util.c index ed7aa6b78..49554acf8 100644 --- a/src/help_system_util.c +++ b/src/help_system_util.c @@ -574,27 +574,27 @@ void DecompressAndRenderGlyph(u8 font, u16 glyph, struct Bitmap *srcBlit, struct void HelpSystem_PrintTextInTopLeftCorner(const u8 * str) { - GenerateFontHalfRowLookupTable(1, 15, 2); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_DARK_GRAY); HelpSystemRenderText(5, gDecompressionBuffer + 0x3D00, str, 6, 2, 7, 2); } void HelpSystem_PrintTextRightAlign_Row52(const u8 * str) { s32 left = 0x7C - GetStringWidth(0, str, 0); - GenerateFontHalfRowLookupTable(1, 15, 2); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_DARK_GRAY); HelpSystemRenderText(0, gDecompressionBuffer + 0x3400, str, left, 2, 16, 2); } void HelpSystem_PrintTextAt(const u8 * str, u8 x, u8 y) { - GenerateFontHalfRowLookupTable(1, 15, 2); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_DARK_GRAY); HelpSystemRenderText(2, gDecompressionBuffer + 0x0000, str, x, y, 26, 16); } void HelpSystem_PrintQuestionAndAnswerPair(const u8 * question, const u8 * answer) { CpuFill16(0xEEEE, gDecompressionBuffer + 0x0000, 0x3400); - GenerateFontHalfRowLookupTable(1, 14, 2); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_5, TEXT_COLOR_DARK_GRAY); HelpSystemRenderText(2, gDecompressionBuffer + 0x0000, question, 0, 0, 26, 16); HelpSystemRenderText(2, gDecompressionBuffer + 0x09C0, answer, 0, 0, 26, 13); } @@ -602,7 +602,7 @@ void HelpSystem_PrintQuestionAndAnswerPair(const u8 * question, const u8 * answe void HelpSystem_PrintTopicMouseoverDescription(const u8 * str) { CpuFill16(0x1111, gDecompressionBuffer + 0x23C0, 0x1040); - GenerateFontHalfRowLookupTable(2, 1, 3); + GenerateFontHalfRowLookupTable(TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); HelpSystemRenderText(2, gDecompressionBuffer + 0x23C0, str, 2, 6, 26, 5); } diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 9a534dd4b..5e4e39763 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -27,7 +27,7 @@ void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 tileNum, u8 palet StringExpandPlaceholders(gStringVar4, string); gTextFlags.canABSpeedUpPrint = 1; - AddTextPrinterParameterized2(windowId, fontId, gStringVar4, textSpeed, NULL, 2, 1, 3); + AddTextPrinterParameterized2(windowId, fontId, gStringVar4, textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); gUnknown_20399CC = taskFunc; gTasks[taskId].func = Task_ContinueTaskAfterMessagePrints; } diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 22f559f8a..0dfeffa46 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -431,23 +431,23 @@ void AddTextPrinterDiffStyle(bool8 allowSkippingDelayWithButtonPress) gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; result = ContextNpcGetTextColor(); if (result == 0) - AddTextPrinterParameterized2(0, 4, gStringVar4, GetTextSpeedSetting(), nptr, 8, 1, 3); + AddTextPrinterParameterized2(0, 4, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else if (result == 1) - AddTextPrinterParameterized2(0, 5, gStringVar4, GetTextSpeedSetting(), nptr, 4, 1, 3); + AddTextPrinterParameterized2(0, 5, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else - AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), nptr, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 2, gStringVar4, speed, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void LoadStdWindowFrameGfx(void) diff --git a/src/oak_speech.c b/src/oak_speech.c index f23905fd7..b0e3e1a6f 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -906,11 +906,11 @@ static void Task_OakSpeech9(u8 taskId) if (str != gStringVar4) \ { \ StringExpandPlaceholders(gStringVar4, str); \ - AddTextPrinterParameterized2(0, 4, gStringVar4, speed, NULL, 2, 1, 3); \ + AddTextPrinterParameterized2(0, 4, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ } \ else \ { \ - AddTextPrinterParameterized2(0, 4, str, speed, NULL, 2, 1, 3); \ + AddTextPrinterParameterized2(0, 4, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ } \ CopyWindowToVram(0, COPYWIN_FULL); \ }) diff --git a/src/party_menu.c b/src/party_menu.c index 4bceaea7d..d1679b695 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2596,7 +2596,7 @@ static void PartyMenuPrintText(const u8 *text) { DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(6, 2, text, GetTextSpeedSetting(), 0, 2, 1, 3); + AddTextPrinterParameterized2(6, 2, text, GetTextSpeedSetting(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void PartyMenuDisplayYesNoMenu(void) @@ -2621,7 +2621,7 @@ static void PartyMenu_Oak_PrintText(u8 windowId, const u8 *str) { StringExpandPlaceholders(gStringVar4, str); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(windowId, 4, gStringVar4, GetTextSpeedSetting(), NULL, 2, 1, 3); + AddTextPrinterParameterized2(windowId, 4, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static bool8 FirstBattleEnterParty_CreateWindowAndMsg1Printer(void) @@ -5134,7 +5134,7 @@ static void DisplayLevelUpStatsPg1(u8 taskId) s16 *arrayPtr = sPartyMenuInternal->data; arrayPtr[12] = CreateLevelUpStatsWindow(); - DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3); + DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(arrayPtr[12], COPYWIN_GFX); ScheduleBgCopyTilemapToVram(2); } @@ -5143,7 +5143,7 @@ static void DisplayLevelUpStatsPg2(u8 taskId) { s16 *arrayPtr = sPartyMenuInternal->data; - DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], 1, 2, 3); + DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(arrayPtr[12], COPYWIN_GFX); ScheduleBgCopyTilemapToVram(2); } diff --git a/src/script_menu.c b/src/script_menu.c index 6a59fc8d4..0f17a2bd8 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -827,15 +827,15 @@ static void MultiChoicePrintHelpDescription(u8 mcId) { case 39: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; case 47: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; case 50: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; } } @@ -1003,7 +1003,7 @@ static void CreatePCMenuWindow(void) void ScriptMenu_DisplayPCStartupPrompt(void) { sub_80F7768(0, TRUE); - AddTextPrinterParameterized2(0, 2, Text_AccessWhichPC, 0, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, Text_AccessWhichPC, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void Task_ScriptShowMonPic(u8 taskId) diff --git a/src/start_menu.c b/src/start_menu.c index 2c0de8245..4dba3ce92 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -909,7 +909,7 @@ static void task50_after_link_battle_save(u8 taskId) { case 0: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0xFF, NULL, 2, 1, 3); + AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0xFF, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); DrawTextBorderOuter(0, 0x008, 0x0F); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/text.c b/src/text.c index 3b5cc3204..a29906052 100644 --- a/src/text.c +++ b/src/text.c @@ -1181,7 +1181,7 @@ u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str, int a3, int a4, int a5, int a bgColor = 0; shadowColor = 3; - GenerateFontHalfRowLookupTable(1, 0, 3); + GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_LIGHT_GRAY); strLocal = str; strPos = 0; From 60ce72fa5aa369af691cfb04306d4a62a4572dcb Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 30 Jul 2022 02:22:59 -0400 Subject: [PATCH 05/13] Synced src/mon_markings.c and partly synced PSS --- include/box_party_pokemon_dropdown.h | 4 +- include/ereader_helpers.h | 2 +- include/event_object_movement.h | 4 +- include/field_effect.h | 6 +- include/field_effect_helpers.h | 30 +- include/field_player_avatar.h | 2 +- include/graphics.h | 6 +- include/item_menu_icons.h | 2 +- include/link.h | 2 +- include/link_rfu.h | 2 +- include/map_preview_screen.h | 6 +- include/mevent.h | 6 +- include/mevent_server.h | 24 +- include/mon_markings.h | 34 +- include/new_menu_helpers.h | 2 +- include/pokedex_area_markers.h | 2 +- include/pokemon_icon.h | 4 +- include/pokemon_special_anim_internal.h | 4 +- include/pokemon_storage_system.h | 1 + include/pokemon_storage_system_internal.h | 217 ++++--- include/quest_log.h | 2 +- include/text_window_graphics.h | 6 +- src/AgbRfu_LinkManager.c | 2 +- src/battle_anim_mon_movement.c | 36 +- src/battle_interface.c | 14 +- src/battle_records.c | 6 +- src/berry_crush.c | 20 +- src/berry_fix_program.c | 2 +- src/box_party_pokemon_dropdown.c | 12 +- src/cereader_tool.c | 4 +- src/dodrio_berry_picking_2.c | 44 +- src/easy_chat_3.c | 28 +- src/ereader_helpers.c | 8 +- src/event_object_movement.c | 20 +- src/evolution_graphics.c | 14 +- src/fame_checker.c | 10 +- src/field_effect.c | 124 ++-- src/field_effect_helpers.c | 150 ++--- src/field_player_avatar.c | 6 +- src/fldeff_cut.c | 12 +- src/graphics.c | 4 +- src/hall_of_fame.c | 8 +- src/intro.c | 76 +-- src/item_menu.c | 2 +- src/item_menu_icons.c | 20 +- src/itemfinder.c | 16 +- src/learn_move.c | 4 +- src/link_rfu_2.c | 4 +- src/m4a_tables.c | 2 +- src/mail.c | 6 +- src/main_menu.c | 4 +- src/mevent.c | 6 +- src/mevent_client.c | 2 +- src/mevent_server.c | 10 +- src/mevent_server_helpers.c | 6 +- src/minigame_countdown.c | 6 +- src/mon_markings.c | 758 ++++++++++++---------- src/naming_screen.c | 20 +- src/oak_speech.c | 8 +- src/option_menu.c | 10 +- src/overworld.c | 2 +- src/pokedex_screen.c | 2 +- src/pokemon_icon.c | 12 +- src/pokemon_special_anim_scene.c | 70 +- src/pokemon_storage_system_2.c | 244 ++++--- src/pokemon_storage_system_3.c | 154 ++--- src/pokemon_storage_system_4.c | 368 +++++------ src/pokemon_storage_system_5.c | 366 +++++------ src/pokemon_storage_system_6.c | 16 +- src/pokemon_storage_system_8.c | 24 +- src/pokemon_storage_system_9.c | 18 +- src/pokemon_summary_screen.c | 38 +- src/psychic.c | 2 +- src/quest_log.c | 16 +- src/region_map.c | 16 +- src/seagallop.c | 12 +- src/slot_machine.c | 14 +- src/smokescreen.c | 2 +- src/ss_anne.c | 8 +- src/teachy_tv.c | 6 +- src/text_printer.c | 2 +- src/text_window_graphics.c | 2 +- src/title_screen.c | 10 +- src/tm_case.c | 14 +- src/trade_scene.c | 40 +- src/trainer_see.c | 2 +- src/union_room_chat_objects.c | 4 +- tools/gbagfx/huff.c | 16 +- 88 files changed, 1742 insertions(+), 1590 deletions(-) diff --git a/include/box_party_pokemon_dropdown.h b/include/box_party_pokemon_dropdown.h index 52e620956..795a22e67 100644 --- a/include/box_party_pokemon_dropdown.h +++ b/include/box_party_pokemon_dropdown.h @@ -14,8 +14,8 @@ enum void AllocBoxPartyPokemonDropdowns(u8 num); void FreeBoxPartyPokemonDropdowns(void); void CopyAllBoxPartyPokemonDropdownsToVram(void); -void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height); -void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void * src); +void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void *src, u16 width, u16 height); +void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void *src); void SetBoxPartyPokemonDropdownMap2Pos(u8 idx, u16 x, u16 y); void SetBoxPartyPokemonDropdownMap2Rect(u8 idx, u16 x, u16 y, u16 width, u16 height); void AdjustBoxPartyPokemonDropdownPos(u8 a0, u8 a1, s8 a2); diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h index dab97470a..d6f3d13bb 100644 --- a/include/ereader_helpers.h +++ b/include/ereader_helpers.h @@ -31,6 +31,6 @@ void EReaderHelper_Timer3Callback(void); void EReaderHelper_SaveRegsState(void); void EReaderHelper_ClearsSendRecvMgr(void); void EReaderHelper_RestoreRegsState(void); -u16 EReaderHandleTransfer(u8 mode, size_t size, const void * src, void * dest); +u16 EReaderHandleTransfer(u8 mode, size_t size, const void *src, void *dest); #endif //GUARD_EREADER_HELPERS_H diff --git a/include/event_object_movement.h b/include/event_object_movement.h index d167699d9..10ee23172 100644 --- a/include/event_object_movement.h +++ b/include/event_object_movement.h @@ -156,14 +156,14 @@ bool32 RfuUnionObjectIsWarping(u8 objectEventId); u8 GetJumpSpecialMovementAction(u32 direction); void EnableObjectGroundEffectsByXY(s16 x, s16 y); void MoveObjectEventToMapCoords(struct ObjectEvent *objectEvent, s16 x, s16 y); -u8 CreateCopySpriteAt(struct Sprite * sprite, s16 x, s16 y, u8 subpriority); +u8 CreateCopySpriteAt(struct Sprite *sprite, s16 x, s16 y, u8 subpriority); u16 GetObjectPaletteTag(u8 paletteIndex); void SetSpritePosToMapCoords(s16 x, s16 y, s16 *x2, s16 *y2); void UpdateObjectEventSpriteVisibility(struct Sprite *sprite, bool8 invisible); bool8 AreZCoordsCompatible(u8, u8); u8 ZCoordToPriority(u8 z); void ObjectEventUpdateZCoord(struct ObjectEvent *pObject); -void SetObjectSubpriorityByZCoord(u8 z, struct Sprite * sprite, u8 offset); +void SetObjectSubpriorityByZCoord(u8 z, struct Sprite *sprite, u8 offset); bool8 IsZCoordMismatchAt(u8, s16, s16); void MakeObjectTemplateFromObjectEventGraphicsInfo(u16 graphicsId, void (*callback)(struct Sprite *), struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables); u8 AddCameraObject(u8 trackedSpriteId); diff --git a/include/field_effect.h b/include/field_effect.h index a4246655b..23f309fe5 100644 --- a/include/field_effect.h +++ b/include/field_effect.h @@ -20,12 +20,12 @@ void StartEscalatorWarp(u8 metatileBehavior, u8 priority); void StartLavaridgeGymB1FWarp(u8 a0); void StartLavaridgeGym1FWarp(u8 a0); void ApplyGlobalFieldPaletteTint(u8 paletteIdx); -void FreeResourcesAndDestroySprite(struct Sprite * sprite, u8 spriteId); +void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId); u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, bool8 unused); void ReturnToFieldFromFlyMapSelect(void); void MultiplyInvertedPaletteRGBComponents(u16 i, u8 r, u8 g, u8 b); -void SpriteCB_PopOutOfAsh(struct Sprite * sprite); -void SpriteCB_AshLaunch(struct Sprite * sprite); +void SpriteCB_PopOutOfAsh(struct Sprite *sprite); +void SpriteCB_AshLaunch(struct Sprite *sprite); void FieldEffectActiveListClear(void); #endif //GUARD_FIELD_EFFECTS_H diff --git a/include/field_effect_helpers.h b/include/field_effect_helpers.h index fa42aef9a..9347483c6 100644 --- a/include/field_effect_helpers.h +++ b/include/field_effect_helpers.h @@ -25,20 +25,20 @@ u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y); void SetSpriteInvisible(u8 spriteId); void SetSurfBlob_PlayerOffset(u8 spriteId, bool8 hasOffset, s16 offset); -void UpdateJumpImpactEffect(struct Sprite * sprite); -void UpdateShadowFieldEffect(struct Sprite * sprite); -void UpdateBubblesFieldEffect(struct Sprite * sprite); -void UpdateSparkleFieldEffect(struct Sprite * sprite); -void UpdateTallGrassFieldEffect(struct Sprite * sprite); -void WaitFieldEffectSpriteAnim(struct Sprite * sprite); -void UpdateAshFieldEffect(struct Sprite * sprite); -void UpdateSurfBlobFieldEffect(struct Sprite * sprite); -void UpdateFootprintsTireTracksFieldEffect(struct Sprite * sprite); -void UpdateSplashFieldEffect(struct Sprite * sprite); -void UpdateShortGrassFieldEffect(struct Sprite * sprite); -void UpdateLongGrassFieldEffect(struct Sprite * sprite); -void UpdateSandPileFieldEffect(struct Sprite * sprite); -void UpdateDisguiseFieldEffect(struct Sprite * sprite); -void UpdateHotSpringsWaterFieldEffect(struct Sprite * sprite); +void UpdateJumpImpactEffect(struct Sprite *sprite); +void UpdateShadowFieldEffect(struct Sprite *sprite); +void UpdateBubblesFieldEffect(struct Sprite *sprite); +void UpdateSparkleFieldEffect(struct Sprite *sprite); +void UpdateTallGrassFieldEffect(struct Sprite *sprite); +void WaitFieldEffectSpriteAnim(struct Sprite *sprite); +void UpdateAshFieldEffect(struct Sprite *sprite); +void UpdateSurfBlobFieldEffect(struct Sprite *sprite); +void UpdateFootprintsTireTracksFieldEffect(struct Sprite *sprite); +void UpdateSplashFieldEffect(struct Sprite *sprite); +void UpdateShortGrassFieldEffect(struct Sprite *sprite); +void UpdateLongGrassFieldEffect(struct Sprite *sprite); +void UpdateSandPileFieldEffect(struct Sprite *sprite); +void UpdateDisguiseFieldEffect(struct Sprite *sprite); +void UpdateHotSpringsWaterFieldEffect(struct Sprite *sprite); #endif //GUARD_FIELD_EFFECT_HELPERS_H diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index a970385db..9f726cf99 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -13,7 +13,7 @@ u8 GetPlayerMovementDirection(void); u8 PlayerGetCopyableMovement(void); void MovePlayerNotOnBike(u8 direction, u16 heldKeys); -void MovementType_Player(struct Sprite * sprite); +void MovementType_Player(struct Sprite *sprite); void HandleEnforcedLookDirectionOnPlayerStopMoving(void); void StopPlayerAvatar(void); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); diff --git a/include/graphics.h b/include/graphics.h index dc72466c8..add2653d4 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2980,7 +2980,7 @@ extern const u8 gFile_graphics_items_icon_palettes_soda_pop_palette[]; extern const u8 gFile_graphics_items_icons_lemonade_sheet[]; extern const u8 gFile_graphics_items_icon_palettes_lemonade_palette[]; extern const u8 gFile_graphics_items_icons_moomoo_milk_sheet[]; -extern const u8 gFile_graphics_items_icon_palettes_moomoo_milk_palette[];; +extern const u8 gFile_graphics_items_icon_palettes_moomoo_milk_palette[]; extern const u8 gFile_graphics_items_icon_palettes_energy_powder_palette[]; extern const u8 gFile_graphics_items_icons_energy_root_sheet[]; extern const u8 gFile_graphics_items_icon_palettes_energy_root_palette[]; @@ -4829,8 +4829,8 @@ extern const u16 gTradeButtons_Gfx[]; extern const u16 gTradeMenuMonBox_Tilemap[]; // mon_markings -extern const u16 gUnknown_8E9CBBC[]; -extern const u16 gUnknown_8E9CB9C[]; +extern const u16 gMonMarkingsMenu_Gfx[]; +extern const u16 gMonMarkingsMenu_Pal[]; // hall_of_fame extern const u32 gFile_graphics_misc_confetti_sheet[]; diff --git a/include/item_menu_icons.h b/include/item_menu_icons.h index ef3bda923..01e481080 100644 --- a/include/item_menu_icons.h +++ b/include/item_menu_icons.h @@ -22,7 +22,7 @@ void ItemMenuIcons_MoveInsertIndicatorBar(s16 x, u16 y); void ItemMenuIcons_ToggleInsertIndicatorBarVisibility(bool8 invisible); void SetBagVisualPocketId(u8); void ShakeBagSprite(void); -const void * GetItemIconGfxPtr(u16 itemId, u8 ptrId); +const void *GetItemIconGfxPtr(u16 itemId, u8 ptrId); void CreateBagOrSatchelSprite(u8 animNum); #endif // GUARD_ITEM_MENU_ICONS diff --git a/include/link.h b/include/link.h index e7dafadf6..47f85bb9d 100644 --- a/include/link.h +++ b/include/link.h @@ -190,7 +190,7 @@ struct Link struct BlockRequest { - void * address; + void *address; u32 size; }; diff --git a/include/link_rfu.h b/include/link_rfu.h index 7dac12fbb..1792781ff 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -221,7 +221,7 @@ void DestroyWirelessStatusIndicatorSprite(void); void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0); void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0); void MEvent_CreateTask_Leader(u32 arg0); -void Rfu_SendPacket(void * data); +void Rfu_SendPacket(void *data); u8 CreateTask_ListenToWireless(void); void LinkRfu_DestroyIdleTask(void); void InitRFUAPI(void); diff --git a/include/map_preview_screen.h b/include/map_preview_screen.h index 228d37d54..7fbcc675e 100644 --- a/include/map_preview_screen.h +++ b/include/map_preview_screen.h @@ -43,9 +43,9 @@ struct MapPreviewScreen u8 mapsec; u8 type; u16 flagId; - const void * tilesptr; - const void * tilemapptr; - const void * palptr; + const void *tilesptr; + const void *tilemapptr; + const void *palptr; }; u16 MapPreview_CreateMapNameWindow(u8 id); diff --git a/include/mevent.h b/include/mevent.h index 28920b118..3dc1621b0 100644 --- a/include/mevent.h +++ b/include/mevent.h @@ -25,7 +25,7 @@ struct MEvent_Str_1 { u16 status; size_t size; - const void * data; + const void *data; }; struct MEvent_Str_2 @@ -63,8 +63,8 @@ void MEvent_WonderCardResetUnk08_6(struct WonderCard * buffer); bool32 MEvent_ReceiveDistributionMon(const u16 * data); void BuildMEventClientHeader(struct MEventClientHeaderStruct * data); bool32 ValidateMEventClientHeader(const struct MEventClientHeaderStruct * data); -u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused); -u32 MEvent_CanPlayerReceiveDistributionMon(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused); +u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void *unused); +u32 MEvent_CanPlayerReceiveDistributionMon(const u16 * a0, const struct MEventClientHeaderStruct * a1, void *unused); bool32 sub_8144474(const struct MEventClientHeaderStruct * a0, const u16 * a1); u16 sub_81444B0(const struct MEventClientHeaderStruct * a0, u32 command); bool32 InitWonderCardResources(struct WonderCard * r5, struct WonderCardMetadata * r6); diff --git a/include/mevent_server.h b/include/mevent_server.h index 17ece2f26..9560fe25f 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -18,8 +18,8 @@ struct mevent_srv_sub u16 sendCounter; u16 sendCRC; u16 sendSize; - void * recvBfr; - const void * sendBfr; + void *recvBfr; + const void *sendBfr; u32 (*recvFunc)(struct mevent_srv_sub *); u32 (*sendFunc)(struct mevent_srv_sub *); }; @@ -59,10 +59,10 @@ struct mevent_client u32 mainseqno; u32 flag; u32 cmdidx; - void * sendBuffer; - void * recvBuffer; + void *sendBuffer; + void *recvBuffer; struct mevent_client_cmd * cmdBuffer; - void * buffer; + void *buffer; struct mevent_srv_sub manager; }; @@ -70,7 +70,7 @@ struct mevent_server_cmd { u32 instr; bool32 flag; - void * parameter; + void *parameter; }; // Server commands @@ -99,13 +99,13 @@ struct mevent_srv_common u32 mainseqno; u32 cmdidx; const struct mevent_server_cmd * cmdBuffer; - void * recvBuffer; + void *recvBuffer; struct WonderCard * card; struct WonderNews * news; struct MEventClientHeaderStruct * mevent_unk1442cc; - void * sendBuffer1; + void *sendBuffer1; u32 sendBuffer1Size; - void * sendBuffer2; + void *sendBuffer2; u32 sendBuffer2Size; u32 sendWord; struct mevent_srv_sub manager; @@ -114,13 +114,13 @@ struct mevent_srv_common u32 mevent_srv_sub_recv(struct mevent_srv_sub * svr); u32 mevent_srv_sub_send(struct mevent_srv_sub * svr); void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recvPlayerNo); -void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void * src, u32 size); -void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * dest); +void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void *src, u32 size); +void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void *dest); void mevent_client_do_init(void); u32 mevent_client_do_exec(u16 * a0); void mevent_client_inc_flag(void); -void * mevent_client_get_buffer(void); +void *mevent_client_get_buffer(void); void mevent_client_set_param(u32 a0); void mevent_srv_init_wnews(void); void mevent_srv_new_wcard(void); diff --git a/include/mon_markings.h b/include/mon_markings.h index ddda73931..d52a1d745 100644 --- a/include/mon_markings.h +++ b/include/mon_markings.h @@ -1,33 +1,35 @@ #ifndef GUARD_MON_MARKINGS_H #define GUARD_MON_MARKINGS_H -struct PokemonMarkMenu +#define NUM_MON_MARKINGS 4 + +struct MonMarkingsMenu { /*0x0000*/ u16 baseTileTag; /*0x0002*/ u16 basePaletteTag; /*0x0004*/ u8 markings; // bit flags /*0x0005*/ s8 cursorPos; - /*0x0006*/ bool8 markingsArray[4]; + /*0x0006*/ bool8 markingsArray[NUM_MON_MARKINGS]; /*0x000A*/ u8 cursorBaseY; /*0x000B*/ bool8 spriteSheetLoadRequired; - /*0x000C*/ struct Sprite * menuWindowSprites[2]; // upper and lower halves of menu window - /*0x0014*/ struct Sprite * menuMarkingSprites[4]; - /*0x0024*/ struct Sprite * unkSprite; - /*0x0028*/ struct Sprite * menuTextSprite; + /*0x000C*/ struct Sprite *windowSprites[2]; // upper and lower halves of menu window + /*0x0014*/ struct Sprite *markingSprites[NUM_MON_MARKINGS]; + /*0x0024*/ struct Sprite *cursorSprite; + /*0x0028*/ struct Sprite *textSprite; /*0x002C*/ const u8 *frameTiles; /*0x0030*/ const u16 *framePalette; - /*0x0034*/ u8 menuWindowSpriteTiles[0x1000]; - /*0x1034*/ u8 filler1034[0x80]; + /*0x0034*/ u8 windowSpriteTiles[0x1000]; + /*0x1034*/ u8 unused[0x80]; /*0x10B4*/ u8 tileLoadState; }; // 10b8 -void SetMonMarkingsMenuPointer(struct PokemonMarkMenu * markMenu); -void LoadMonMarkingsFrameGfx(void); -void DrawMonMarkingsMenu(u8 markings, s16 x, s16 y); -void TeardownMonMarkingsMenu(void); -bool8 MonMarkingsHandleInput(void); -struct Sprite * CreateMonMarkingSprite_SelectCombo(u16 tileTag, u16 paletteTag, const u16 *palette); -struct Sprite * CreateMonMarkingSprite_AllOff(u16 tileTag, u16 paletteTag, const u16 *palette); -void RequestDma3LoadMonMarking(u8 markings, void * dest); +void InitMonMarkingsMenu(struct MonMarkingsMenu *ptr); +void BufferMonMarkingsMenuTiles(void); +void OpenMonMarkingsMenu(u8 markings, s16 x, s16 y); +void FreeMonMarkingsMenu(void); +bool8 HandleMonMarkingsMenuInput(void); +struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, const u16 *palette); +struct Sprite *CreateMonMarkingComboSprite(u16 tileTag, u16 paletteTag, const u16 *palette); +void UpdateMonMarkingTiles(u8 markings, void *dest); #endif //GUARD_MON_MARKINGS_H diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h index 5fd03151f..3af2074ba 100644 --- a/include/new_menu_helpers.h +++ b/include/new_menu_helpers.h @@ -14,7 +14,7 @@ void *DecompressAndCopyTileDataToVram(u8 bgId, const void *src, u32 size, u16 of void *DecompressAndCopyTileDataToVram2(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); void DecompressAndLoadBgGfxUsingHeap(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); void DecompressAndLoadBgGfxUsingHeap2(u8 bgId, const void *src, u32 size, u16 offset, u8 mode); -void * MallocAndDecompress(const void * src, u32 * size); +void *MallocAndDecompress(const void *src, u32 * size); void SetBgTilemapPalette(u8 bgId, u8 left, u8 top, u8 width, u8 height, u8 palette); void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8 height); void ResetBgPositions(void); diff --git a/include/pokedex_area_markers.h b/include/pokedex_area_markers.h index a9669a80a..c0b1978cc 100644 --- a/include/pokedex_area_markers.h +++ b/include/pokedex_area_markers.h @@ -4,7 +4,7 @@ struct PAM_TaskData { struct SubspriteTable subsprites; - void * buffer; + void *buffer; u8 unk_0C; u8 spr_id; u16 tilesTag; diff --git a/include/pokemon_icon.h b/include/pokemon_icon.h index 76b787137..20650dfc4 100644 --- a/include/pokemon_icon.h +++ b/include/pokemon_icon.h @@ -19,10 +19,10 @@ void DestroyMonIcon(struct Sprite *); u16 GetUnownLetterByPersonality(u32 personality); void SpriteCB_MonIcon(struct Sprite *); u8 CreateMonIcon(u16 species, SpriteCallback callback, s16 x, s16 y, u8 subpriority, u32 personality, bool32 extra); -u8 UpdateMonIconFrame(struct Sprite * sprite); +u8 UpdateMonIconFrame(struct Sprite *sprite); void LoadMonIconPalette(u16 iconId); void FreeMonIconPalette(u16 iconId); -void SetPartyHPBarSprite(struct Sprite * sprite, u8 animNum); +void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum); u8 GetMonIconPaletteIndexFromSpecies(u16 species); u16 GetIconSpecies(u16 species, u32 personality); void LoadMonIconPalettesAt(u16 offset); diff --git a/include/pokemon_special_anim_internal.h b/include/pokemon_special_anim_internal.h index e9df6f985..707c40002 100644 --- a/include/pokemon_special_anim_internal.h +++ b/include/pokemon_special_anim_internal.h @@ -25,8 +25,8 @@ struct PokemonSpecialAnimScene u16 monSpriteY1; u16 monSpriteY2; u8 lastCloseness; - struct Sprite * monSprite; - struct Sprite * itemIconSprite; + struct Sprite *monSprite; + struct Sprite *itemIconSprite; u8 textBuf[0x900]; u8 field_0914[BG_SCREEN_SIZE]; u8 field_1114[BG_SCREEN_SIZE]; diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 7422b4522..f111796d8 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -26,6 +26,7 @@ enum WALLPAPER_PLAIN, WALLPAPER_COUNT }; +#define MAX_DEFAULT_WALLPAPER WALLPAPER_SAVANNA u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 4e1bf0557..2358347fb 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -7,8 +7,15 @@ #define IN_BOX_COLUMNS 5 #define IN_BOX_ROWS 6 -#define MAX_MON_ICONS 40 +// The maximum number of Pokémon icons that can appear on-screen. +// By default the limit is 40 (though in practice only 37 can be). +#define MAX_MON_ICONS (IN_BOX_COUNT + PARTY_SIZE + 1 >= 40 ? IN_BOX_COUNT + PARTY_SIZE + 1 : 40) + +// The maximum number of item icons that can appear on-screen while +// moving held items. 1 in the cursor, and 2 more while switching +// between 2 Pokémon with held items #define MAX_ITEM_ICONS 3 + #define MAX_MENU_ITEMS 7 enum @@ -167,19 +174,19 @@ struct StorageAction u8 format; }; -struct UnkPSSStruct_2002370 +struct ChooseBoxMenu { - struct Sprite *unk_0000; - struct Sprite *unk_0004[4]; - u32 unk_0014[3]; // unused - struct Sprite *unk_0020[2]; + struct Sprite *menuSprite; + struct Sprite *menuSideSprites[4]; + u32 unused1[3]; + struct Sprite *arrowSprites[2]; u8 buffer[0x200]; // passed but not used u8 strbuf[20]; - bool32 loadPal; - u16 tilesTag; + bool32 loadedPalette; + u16 tileTag; u16 paletteTag; u8 curBox; - u8 unk_0245; // unused + u8 unused3; u8 subpriority; }; @@ -189,19 +196,19 @@ struct StorageMenu int textId; }; -struct UnkStruct_2000028 +struct UnkUtilData { const u8 *unk_00; u8 *unk_04; u16 unk_08; u16 unk_0a; u16 newField; - void (*unk_0c)(struct UnkStruct_2000028 *data); + void (*unk_0c)(struct UnkUtilData *data); }; -struct UnkStruct_2000020 +struct UnkUtil { - struct UnkStruct_2000028 *unk_00; + struct UnkUtilData *unk_00; u8 unk_04; u8 unk_05; }; @@ -231,115 +238,115 @@ struct PokemonStorageSystemData u8 screenChangeType; bool8 isReshowingPSS; u8 taskId; - struct UnkStruct_2000020 unk_0020; - struct UnkStruct_2000028 unk_0028[8]; - u16 field_B0[528 / 2]; - u16 field_2C0; - u16 field_2C2; - u8 field_2C4; - u8 field_2C5; + struct UnkUtil unkUtil; + struct UnkUtilData unkUtilData[8]; + u16 partyMenuTilemapBuffer[0x108]; + u16 partyMenuUnused1; // Never read + u16 partyMenuY; + u8 partyMenuUnused2; // Unused + u8 partyMenuMoveTimer; u8 showPartyMenuState; - bool8 unk_02C7; - u8 unk_02C8; - bool8 unk_02C9; + bool8 closeBoxFlashing; + u8 closeBoxFlashTimer; + bool8 closeBoxFlashState; s16 newCurrBoxId; u16 bg2_X; - s16 field_2CE; - u16 field_2D0; - u8 field_2D2; - u8 field_2D3; - u8 field_2D4; - u16 field_2D6; - s16 field_2D8; - u16 field_2DA; - u16 field_2DC; - u16 field_2DE; - u16 field_2E0; - u8 filler[22]; + s16 scrollSpeed; + u16 scrollTimer; + u8 wallpaperOffset; + u8 scrollUnused1; // Never read + u8 scrollToBoxIdUnused; // Never read + u16 scrollUnused2; // Never read + s16 scrollDirectionUnused; // Never read. + u16 scrollUnused3; // Never read + u16 scrollUnused4; // Never read + u16 scrollUnused5; // Never read + u16 scrollUnused6; // Never read + u8 filler1[22]; u8 field_2F8[512]; u8 field_4F8[512]; - u8 field_6F8; - u8 field_6F9; - u8 field_6FA; - s8 field_6FB; - u16 field_6FC[16]; - u16 field_71C; - u16 field_71E; - struct Sprite *field_720[2]; - struct Sprite *field_728[2]; - struct Sprite *field_730[2]; - u32 field_738; - u8 field_73C[80]; - u16 field_78C; + u8 boxTitleCycleId; + u8 wallpaperLoadState; // Written to, but never read. + u8 wallpaperLoadBoxId; + s8 wallpaperLoadDir; + u16 boxTitlePal[16]; + u16 boxTitlePalOffset; + u16 boxTitleAltPalOffset; + struct Sprite *curBoxTitleSprites[2]; + struct Sprite *nextBoxTitleSprites[2]; + struct Sprite *arrowSprites[2]; + u32 wallpaperPalBits; + u8 filler2[80]; // Unused + u16 unkUnused1; // Never read. s16 wallpaperSetId; s16 wallpaperId; - u16 field_792[360]; + u16 wallpaperTilemap[360]; u8 wallpaperChangeState; - u8 field_A63; - u8 field_A64; - s8 field_A65; + u8 scrollState; + u8 scrollToBoxId; + s8 scrollDirection; // u8 *wallpaperTiles; // used only in Emerald for Walda /* 0a68 */ struct Sprite *movingMonSprite; /* 0a6c */ struct Sprite *partySprites[PARTY_SIZE]; /* 0a84 */ struct Sprite *boxMonsSprites[IN_BOX_COUNT]; - /* 0afc */ struct Sprite **field_B00; - /* 0b00 */ struct Sprite **field_B04; - /* 0b04 */ u16 field_B08[MAX_MON_ICONS]; - /* 0b54 */ u16 field_B58[MAX_MON_ICONS]; + /* 0afc */ struct Sprite **shiftMonSpritePtr; + /* 0b00 */ struct Sprite **releaseMonSpritePtr; + /* 0b04 */ u16 numIconsPerSpecies[MAX_MON_ICONS]; + /* 0b54 */ u16 iconSpeciesList[MAX_MON_ICONS]; /* 0ba4 */ u16 boxSpecies[IN_BOX_COUNT]; /* 0be0 */ u32 boxPersonalities[IN_BOX_COUNT]; - /* 0c58 */ u8 field_C5C; - /* 0c59 */ u8 field_C5D; - /* 0c5a */ u8 field_C5E; - /* 0c5c */ u16 field_C60; - /* 0c5e */ s16 field_C62; - /* 0c60 */ s16 field_C64; - /* 0c62 */ u16 field_C66; - /* 0c64 */ u8 field_C68; - /* 0c65 */ s8 field_C69; - /* 0c66 */ u8 field_C6A; - /* 0c67 */ u8 field_C6B; + /* 0c58 */ u8 incomingBoxId; + /* 0c59 */ u8 shiftTimer; + /* 0c5a */ u8 numPartyToCompact; + /* 0c5c */ u16 iconScrollDistance; + /* 0c5e */ s16 iconScrollPos; + /* 0c60 */ s16 iconScrollSpeed; + /* 0c62 */ u16 iconScrollNumIncoming; + /* 0c64 */ u8 iconScrollCurColumn; + /* 0c65 */ s8 iconScrollDirection; // Unnecessary duplicate of scrollDirection + /* 0c66 */ u8 iconScrollState; + /* 0c67 */ u8 iconScrollToBoxId; // Unused duplicate of scrollToBoxId /* 0c68 */ struct WindowTemplate menuWindow; /* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS]; /* 0ca8 */ u8 menuItemsCount; /* 0ca9 */ u8 menuWidth; - /* 0caa */ u8 field_CAE; - /* 0cac */ u16 field_CB0; - /* 0cb0 */ struct Sprite *field_CB4; - /* 0cb4 */ struct Sprite *field_CB8; - /* 0cb8 */ s32 field_CBC; - /* 0cbc */ s32 field_CC0; - /* 0cc0 */ u32 field_CC4; - /* 0cc4 */ u32 field_CC8; - /* 0cc8 */ s16 field_CCC; - /* 0cca */ s16 field_CCE; - /* 0ccc */ u16 field_CD0; - /* 0cce */ s8 field_CD2; - /* 0ccf */ s8 field_CD3; - /* 0cd0 */ u8 field_CD4; - /* 0cd1 */ u8 field_CD5; - /* 0cd2 */ u8 field_CD6; - /* 0cd3 */ u8 field_CD7; - /* 0cd4 */ u8 field_CD8[2]; - /* 0cd8 */ const u32 *cursorMonPalette; - /* 0cdc */ u32 cursorMonPersonality; - /* 0ce0 */ u16 cursorMonSpecies; - /* 0ce2 */ u16 cursorMonItem; - /* 0ce4 */ u16 field_CE8; + /* 0caa */ u8 menuUnusedField; // Never read. + /* 0cac */ u16 menuWindowId; + /* 0cb0 */ struct Sprite *cursorSprite; + /* 0cb4 */ struct Sprite *cursorShadowSprite; + /* 0cb8 */ s32 cursorNewX; + /* 0cbc */ s32 cursorNewY; + /* 0cc0 */ u32 cursorSpeedX; + /* 0cc4 */ u32 cursorSpeedY; + /* 0cc8 */ s16 cursorTargetX; + /* 0cca */ s16 cursorTargetY; + /* 0ccc */ u16 cursorMoveSteps; + /* 0cce */ s8 cursorVerticalWrap; + /* 0ccf */ s8 cursorHorizontalWrap; + /* 0cd0 */ u8 newCursorArea; + /* 0cd1 */ u8 newCursorPosition; + /* 0cd2 */ u8 cursorPrevHorizPos; + /* 0cd3 */ u8 cursorFlipTimer; + /* 0cd4 */ u8 cursorPalNums[2]; + /* 0cd8 */ const u32 *displayMonPalette; + /* 0cdc */ u32 displayMonPersonality; + /* 0ce0 */ u16 displayMonSpecies; + /* 0ce2 */ u16 displayMonItemId; + /* 0ce4 */ u16 displayUnusedVar; /* 0ce6 */ bool8 setMosaic; - /* 0ce7 */ u8 cursorMonMarkings; - /* 0ce8 */ u8 cursorMonLevel; - /* 0ce9 */ bool8 cursorMonIsEgg; - /* 0cea */ u8 cursorMonNick[POKEMON_NAME_LENGTH + 1]; - /* 0cf5 */ u8 cursorMonTexts[4][36]; + /* 0ce7 */ u8 displayMonMarkings; + /* 0ce8 */ u8 displayMonLevel; + /* 0ce9 */ bool8 displayMonIsEgg; + /* 0cea */ u8 displayMonName[POKEMON_NAME_LENGTH + 1]; + /* 0cf5 */ u8 displayMonTexts[4][36]; /* 0d88 */ bool8 (*monPlaceChangeFunc)(void); /* 0d8c */ u8 monPlaceChangeState; - /* 0d8d */ u8 field_D91; - /* 0d90 */ struct Sprite *monMarkingSprite; - /* 0d94 */ struct Sprite *field_D98[2]; - /* 0d9c */ u16 *monMarkingSpriteTileStart; - /* 0da0 */ struct PokemonMarkMenu field_DA4; - /* 1e58 */ struct UnkPSSStruct_2002370 field_1E5C; + /* 0d8d */ u8 shiftBoxId; + /* 0d90 */ struct Sprite *markingComboSprite; + /* 0d94 */ struct Sprite *waveformSprites[2]; + /* 0d9c */ u16 *markingComboTilesPtr; + /* 0da0 */ struct MonMarkingsMenu markMenu; + /* 1e58 */ struct ChooseBoxMenu field_1E5C; /* 20a0 */ struct Pokemon movingMon; /* 2104 */ struct Pokemon field_2108; /* 2168 */ u8 field_216C; @@ -392,12 +399,12 @@ void SetCurrentBox(u8 boxId); void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst); void SetBoxMonAt(u8 boxId, u8 boxPosition, struct BoxPokemon * src); -void Cb2_ExitPSS(void); +void CB2_ExitPokeStorage(void); void FreeBoxSelectionPopupSpriteGfx(void); void sub_808C940(u8 curBox); void sub_808C950(void); u8 HandleBoxChooseSelectionInput(void); -void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); +void LoadChooseBoxMenuGfx(struct ChooseBoxMenu *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal); void SetCurrentBoxMonData(u8 boxPosition, s32 request, const void *value); u32 GetCurrentBoxMonData(u8 boxPosition, s32 request); u32 GetAndCopyBoxMonDataAt(u8 boxId, u8 boxPosition, s32 request, void *dst); @@ -438,7 +445,7 @@ const u8 *GetMovingItemName(void); void sub_80966F4(void); bool8 sub_8096728(void); bool8 sub_80967C0(void); -void sub_8096BE4(struct UnkStruct_2000020 *arg0, struct UnkStruct_2000028 *arg1, u32 arg2); +void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2); void sub_8096BF8(void); void AddMenu(void); bool8 CanMovePartyMon(void); @@ -475,7 +482,7 @@ bool8 IsCursorOnBox(void); bool8 IsCursorInBox(void); void sub_808FFAC(void); -struct Sprite * CreateMonIconSprite(u16 species, u32 pid, s16 x, s16 y, u8 priority, u8 subpriority); +struct Sprite *CreateMonIconSprite(u16 species, u32 pid, s16 x, s16 y, u8 priority, u8 subpriority); void CreatePartyMonsSprites(bool8 species); void sub_80909F4(void); bool8 sub_8090A60(void); diff --git a/include/quest_log.h b/include/quest_log.h index 295f942f2..21801e45a 100644 --- a/include/quest_log.h +++ b/include/quest_log.h @@ -85,7 +85,7 @@ void sub_81113E4(void); void sub_8111438(void); void StartRecordingQuestLogEntry(u16 eventId); bool8 WillCommandOfSizeFitInSav1Record(u16 *cursor, size_t size); -bool8 sub_8110944(const void * a0, size_t cmdSize); +bool8 sub_8110944(const void *a0, size_t cmdSize); void sub_8113BD8(void); void ResetUnk203B044(void); diff --git a/include/text_window_graphics.h b/include/text_window_graphics.h index e2b351de9..c57143661 100644 --- a/include/text_window_graphics.h +++ b/include/text_window_graphics.h @@ -3,8 +3,8 @@ struct TextWindowGraphics { - const void * tiles; - const void * palette; + const void *tiles; + const void *palette; }; extern const u16 gUnknown_8470B0C[]; @@ -14,6 +14,6 @@ extern const u16 gUnknown_8471DEC[][16]; extern const struct TextWindowGraphics gUserFrames[]; -const struct TextWindowGraphics * GetUserFrameGraphicsInfo(u8 idx); +const struct TextWindowGraphics *GetWindowFrameTilesPal(u8 idx); #endif //GUARD_TEXT_WINDOW_GRAPHICS_H diff --git a/src/AgbRfu_LinkManager.c b/src/AgbRfu_LinkManager.c index 35ac45d5f..558b19514 100644 --- a/src/AgbRfu_LinkManager.c +++ b/src/AgbRfu_LinkManager.c @@ -918,7 +918,7 @@ static void rfu_LMAN_REQ_callback(u16 reqCommandId, u16 reqResult) { lman.reserveDisconnectSlot_flag = 0; lman.acceptCount = 0; - lman.acceptSlot_flag = 0;; + lman.acceptSlot_flag = 0; lman.parent_child = MODE_NEUTRAL; rfu_LMAN_managerChangeAgbClockMaster(); if (reqCommandId == ID_STOP_MODE_REQ) diff --git a/src/battle_anim_mon_movement.c b/src/battle_anim_mon_movement.c index 996f5cd38..2ee4697ac 100644 --- a/src/battle_anim_mon_movement.c +++ b/src/battle_anim_mon_movement.c @@ -12,15 +12,15 @@ static void AnimTask_ShakeMon2Step(u8 taskId); static void AnimTask_ShakeMonInPlaceStep(u8 taskId); static void AnimTask_ShakeAndSinkMonStep(u8 taskId); static void AnimTask_TranslateMonEllipticalStep(u8 taskId); -static void DoHorizontalLunge(struct Sprite * sprite); -static void ReverseHorizontalLungeDirection(struct Sprite * sprite); -static void DoVerticalDip(struct Sprite * sprite); -static void ReverseVerticalDipDirection(struct Sprite * sprite); -static void SlideMonToOriginalPos(struct Sprite * sprite); -static void SlideMonToOriginalPosStep(struct Sprite * sprite); -static void SlideMonToOffset(struct Sprite * sprite); -static void sub_8099394(struct Sprite * sprite); -static void sub_809946C(struct Sprite * sprite); +static void DoHorizontalLunge(struct Sprite *sprite); +static void ReverseHorizontalLungeDirection(struct Sprite *sprite); +static void DoVerticalDip(struct Sprite *sprite); +static void ReverseVerticalDipDirection(struct Sprite *sprite); +static void SlideMonToOriginalPos(struct Sprite *sprite); +static void SlideMonToOriginalPosStep(struct Sprite *sprite); +static void SlideMonToOffset(struct Sprite *sprite); +static void sub_8099394(struct Sprite *sprite); +static void sub_809946C(struct Sprite *sprite); static void AnimTask_WindUpLungePart1(u8 taskId); static void AnimTask_WindUpLungePart2(u8 taskId); static void sub_80996B8(u8 taskId); @@ -383,7 +383,7 @@ void AnimTask_TranslateMonEllipticalRespectSide(u8 taskId) // horizontally, and then moves back in the opposite direction. // arg 0: duration of single lunge direction // arg 1: x pixel delta that is applied each frame -static void DoHorizontalLunge(struct Sprite * sprite) +static void DoHorizontalLunge(struct Sprite *sprite) { sprite->invisible = TRUE; if (GetBattlerSide(gBattleAnimAttacker) != B_SIDE_PLAYER) @@ -398,7 +398,7 @@ static void DoHorizontalLunge(struct Sprite * sprite) sprite->callback = TranslateMonSpriteLinear; } -static void ReverseHorizontalLungeDirection(struct Sprite * sprite) +static void ReverseHorizontalLungeDirection(struct Sprite *sprite) { sprite->data[0] = sprite->data[4]; sprite->data[1] = -sprite->data[1]; @@ -411,7 +411,7 @@ static void ReverseHorizontalLungeDirection(struct Sprite * sprite) // arg 0: duration of single dip direction // arg 1: y pixel delta that is applied each frame // arg 2: battler -static void DoVerticalDip(struct Sprite * sprite) +static void DoVerticalDip(struct Sprite *sprite) { u8 spriteId; sprite->invisible = TRUE; @@ -425,7 +425,7 @@ static void DoVerticalDip(struct Sprite * sprite) sprite->callback = TranslateMonSpriteLinear; } -static void ReverseVerticalDipDirection(struct Sprite * sprite) +static void ReverseVerticalDipDirection(struct Sprite *sprite) { sprite->data[0] = sprite->data[4]; sprite->data[2] = -sprite->data[2]; @@ -438,7 +438,7 @@ static void ReverseVerticalDipDirection(struct Sprite * sprite) // arg 0: 1 = target or 0 = attacker // arg 1: direction (0 = horizontal and vertical, 1 = horizontal only, 2 = vertical only) // arg 2: duration -static void SlideMonToOriginalPos(struct Sprite * sprite) +static void SlideMonToOriginalPos(struct Sprite *sprite) { u8 spriteId; if (gBattleAnimArgs[0] == 0) @@ -465,7 +465,7 @@ static void SlideMonToOriginalPos(struct Sprite * sprite) sprite->callback = SlideMonToOriginalPosStep; } -static void SlideMonToOriginalPosStep(struct Sprite * sprite) +static void SlideMonToOriginalPosStep(struct Sprite *sprite) { u8 data7 = sprite->data[7]; struct Sprite *otherSprite = &gSprites[sprite->data[7] >> 8]; @@ -495,7 +495,7 @@ static void SlideMonToOriginalPosStep(struct Sprite * sprite) // arg 2: target y pixel offset // arg 3: mirror vertical translation for opposite battle side // arg 4: duration -static void SlideMonToOffset(struct Sprite * sprite) +static void SlideMonToOffset(struct Sprite *sprite) { u8 battlerId; u8 spriteId; @@ -524,7 +524,7 @@ static void SlideMonToOffset(struct Sprite * sprite) sprite->callback = TranslateMonSpriteLinearFixedPoint; } -static void sub_8099394(struct Sprite * sprite) +static void sub_8099394(struct Sprite *sprite) { u8 battlerId; u8 spriteId; @@ -557,7 +557,7 @@ static void sub_8099394(struct Sprite * sprite) sprite->callback = TranslateMonSpriteLinearFixedPoint; } -static void sub_809946C(struct Sprite * sprite) +static void sub_809946C(struct Sprite *sprite) { gSprites[sprite->data[5]].x2 = 0; gSprites[sprite->data[5]].y2 = 0; diff --git a/src/battle_interface.c b/src/battle_interface.c index 43358e6a2..2f7625f21 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -151,19 +151,19 @@ enum HEALTHBOX_GFX_117, //unknown_D1300C }; -static void SpriteCB_HealthBoxOther(struct Sprite * sprite); -static void SpriteCB_HealthBar(struct Sprite * sprite); +static void SpriteCB_HealthBoxOther(struct Sprite *sprite); +static void SpriteCB_HealthBar(struct Sprite *sprite); static const u8 *GetHealthboxElementGfxPtr(u8 which); static void UpdateHpTextInHealthboxInDoubles(u8 healthboxSpriteId, s16 value, u8 maxOrCurrent); static void sub_8049388(u8 taskId); static void sub_80493E4(u8 taskId); -static void sub_8049568(struct Sprite * sprite); -static void sub_8049630(struct Sprite * sprite); +static void sub_8049568(struct Sprite *sprite); +static void sub_8049630(struct Sprite *sprite); static void sub_804948C(u8 taskId); -static void SpriteCB_StatusSummaryBallsOnSwitchout(struct Sprite * sprite); +static void SpriteCB_StatusSummaryBallsOnSwitchout(struct Sprite *sprite); static void UpdateStatusIconInHealthbox(u8 spriteId); -static void SpriteCB_StatusSummaryBar(struct Sprite * sprite); -static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite * sprite); +static void SpriteCB_StatusSummaryBar(struct Sprite *sprite); +static void SpriteCB_StatusSummaryBallsOnBattleStart(struct Sprite *sprite); static u8 GetStatusIconForBattlerId(u8 statusElementId, u8 battlerId); static void MoveBattleBarGraphically(u8 battlerId, u8 whichBar); static u8 GetScaledExpFraction(s32 oldValue, s32 receivedValue, s32 maxValue, u8 scale); diff --git a/src/battle_records.c b/src/battle_records.c index 33fbf89f1..991767140 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -205,19 +205,19 @@ static void ClearWindowCommitAndRemove(u8 windowId) static void ResetGpu(void) { { - void * dest = (void *)VRAM; + void *dest = (void *)VRAM; u32 size = VRAM_SIZE; DmaClearLarge16(3, dest, size, 0x1000); } { - void * dest = (void *)OAM; + void *dest = (void *)OAM; u32 size = OAM_SIZE; DmaClear32(3, dest, size); } { - void * dest = (void *)PLTT; + void *dest = (void *)PLTT; u32 size = PLTT_SIZE; DmaClear16(3, dest, size); } diff --git a/src/berry_crush.c b/src/berry_crush.c index 2b4a5ed55..259b36a6f 100644 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -387,10 +387,10 @@ static void DrawPlayerNameWindows(struct BerryCrushGame * game); static void CopyPlayerNameWindowGfxToBg(struct BerryCrushGame * game); static void CreateGameSprites(struct BerryCrushGame * game); static void DestroyGameSprites(struct BerryCrushGame * game); -static void SpriteCB_Impact(struct Sprite * sprite); -static void SpriteCB_Sparkle_End(struct Sprite * sprite); -static void SpriteCB_Sparkle(struct Sprite * sprite); -static void SpriteCB_Sparkle_Init(struct Sprite * sprite); +static void SpriteCB_Impact(struct Sprite *sprite); +static void SpriteCB_Sparkle_End(struct Sprite *sprite); +static void SpriteCB_Sparkle(struct Sprite *sprite); +static void SpriteCB_Sparkle_Init(struct Sprite *sprite); static struct BerryCrushGame *GetBerryCrushGame(void); static u32 QuitBerryCrush(MainCallback callback); static void ChooseBerry(void); @@ -410,7 +410,7 @@ static bool32 OpenResultsWindow(struct BerryCrushGame *game, struct BerryCrushGa static void CloseResultsWindow(struct BerryCrushGame *game); static void ResetCrusherPos(struct BerryCrushGame *game); static void HideTimer(struct BerryCrushGame_Gfx *gfx); -static void SpriteCB_DropBerryIntoCrusher(struct Sprite * sprite); +static void SpriteCB_DropBerryIntoCrusher(struct Sprite *sprite); static const u8 sBitTable[] = { 1 << 0, @@ -2728,7 +2728,7 @@ static void CreateBerrySprites(struct BerryCrushGame * game, struct BerryCrushGa } } -static void SpriteCB_DropBerryIntoCrusher(struct Sprite * sprite) +static void SpriteCB_DropBerryIntoCrusher(struct Sprite *sprite) { s16 *data = sprite->data; @@ -3387,7 +3387,7 @@ static void DestroyGameSprites(struct BerryCrushGame * game) DestroySprite(game->gfx.coreSprite); } -static void SpriteCB_Impact(struct Sprite * sprite) +static void SpriteCB_Impact(struct Sprite *sprite) { if (sprite->animEnded) { @@ -3396,7 +3396,7 @@ static void SpriteCB_Impact(struct Sprite * sprite) } } -static void SpriteCB_Sparkle_End(struct Sprite * sprite) +static void SpriteCB_Sparkle_End(struct Sprite *sprite) { u8 r1 = 0; SpriteCallback r5 = SpriteCallbackDummy; @@ -3425,7 +3425,7 @@ static void SpriteCB_Sparkle_End(struct Sprite * sprite) #define MASK_TARGET_Y 0x7FFF #define F_MOVE_HORIZ 0x8000 -static void SpriteCB_Sparkle(struct Sprite * sprite) +static void SpriteCB_Sparkle(struct Sprite *sprite) { s16 *data = sprite->data; @@ -3447,7 +3447,7 @@ static void SpriteCB_Sparkle(struct Sprite * sprite) sprite->callback = SpriteCB_Sparkle_End; } -static void SpriteCB_Sparkle_Init(struct Sprite * sprite) +static void SpriteCB_Sparkle_Init(struct Sprite *sprite) { s16 *data = sprite->data; s16 xMult, var; diff --git a/src/berry_fix_program.c b/src/berry_fix_program.c index 2e0bf8256..5eb053ec5 100644 --- a/src/berry_fix_program.c +++ b/src/berry_fix_program.c @@ -20,7 +20,7 @@ typedef struct { // Static RAM declarations -const void * gUnknown_3005EF0; +const void *gUnknown_3005EF0; int gUnknown_3005EF4; size_t gUnknown_3005EF8; struct MultiBootParam gUnknown_3005F00; diff --git a/src/box_party_pokemon_dropdown.c b/src/box_party_pokemon_dropdown.c index b194777f3..09767f3d9 100644 --- a/src/box_party_pokemon_dropdown.c +++ b/src/box_party_pokemon_dropdown.c @@ -17,8 +17,8 @@ struct BPPD_Struct { struct BPPD_MapRect map1Rect; struct BPPD_MapRect map2Rect; - const void * src1; - const void * src2; + const void *src1; + const void *src2; u16 src1Height; u16 src1Width; u16 src2Width; @@ -80,7 +80,7 @@ void CopyAllBoxPartyPokemonDropdownsToVram(void) } } -void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width, u16 height) +void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void *src, u16 width, u16 height) { u16 screenSize; u16 bgType; @@ -112,7 +112,7 @@ void SetBoxPartyPokemonDropdownMap2(u8 idx, u8 bgId, const void * src, u16 width } } -void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void * src) +void SetBoxPartyPokemonDropdownMap1Tiles(u8 idx, const void *src) { if (idx < sBoxPartyPokemonDropdownCount) { @@ -191,7 +191,7 @@ static void PushMap1(u8 idx) { int i; int run = sBoxPartyPokemonDropdownPtr[idx].mapSize * sBoxPartyPokemonDropdownPtr[idx].src1Height; - const void * addr = sBoxPartyPokemonDropdownPtr[idx].src1 + run * sBoxPartyPokemonDropdownPtr[idx].map1Rect.destY2 + sBoxPartyPokemonDropdownPtr[idx].map1Rect.destX2 * sBoxPartyPokemonDropdownPtr[idx].mapSize; + const void *addr = sBoxPartyPokemonDropdownPtr[idx].src1 + run * sBoxPartyPokemonDropdownPtr[idx].map1Rect.destY2 + sBoxPartyPokemonDropdownPtr[idx].map1Rect.destX2 * sBoxPartyPokemonDropdownPtr[idx].mapSize; for (i = 0; i < sBoxPartyPokemonDropdownPtr[idx].map1Rect.height; i++) { CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[idx].bgId, addr, sBoxPartyPokemonDropdownPtr[idx].map1Rect.destX2, sBoxPartyPokemonDropdownPtr[idx].map1Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[idx].map1Rect.width, 1); @@ -203,7 +203,7 @@ static void PushMap2(u8 idx) { int i; int run = sBoxPartyPokemonDropdownPtr[idx].mapSize * sBoxPartyPokemonDropdownPtr[idx].src2Width; - const void * addr = sBoxPartyPokemonDropdownPtr[idx].src2 + run * sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY + sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX * sBoxPartyPokemonDropdownPtr[idx].mapSize; + const void *addr = sBoxPartyPokemonDropdownPtr[idx].src2 + run * sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY + sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX * sBoxPartyPokemonDropdownPtr[idx].mapSize; for (i = 0; i < sBoxPartyPokemonDropdownPtr[idx].map2Rect.height; i++) { CopyToBgTilemapBufferRect(sBoxPartyPokemonDropdownPtr[idx].bgId, addr, sBoxPartyPokemonDropdownPtr[idx].map2Rect.destX2, sBoxPartyPokemonDropdownPtr[idx].map2Rect.destY2 + i, sBoxPartyPokemonDropdownPtr[idx].map2Rect.width, 1); diff --git a/src/cereader_tool.c b/src/cereader_tool.c index cb8c48f7a..d00caffd8 100644 --- a/src/cereader_tool.c +++ b/src/cereader_tool.c @@ -64,7 +64,7 @@ bool32 CEReaderTool_SaveTrainerTower(struct EReaderTrainerTowerSet * ttdata) return result; } -static bool32 CEReaderTool_LoadTrainerTower_r(struct EReaderTrainerTowerSet * ttdata, void * buffer) +static bool32 CEReaderTool_LoadTrainerTower_r(struct EReaderTrainerTowerSet * ttdata, void *buffer) { if (TryCopySpecialSaveSection(SECTOR_TTOWER(0), buffer) != 1) return FALSE; @@ -81,7 +81,7 @@ static bool32 CEReaderTool_LoadTrainerTower_r(struct EReaderTrainerTowerSet * tt bool32 CEReaderTool_LoadTrainerTower(struct EReaderTrainerTowerSet * ttdata) { - void * buffer = AllocZeroed(0x1000); + void *buffer = AllocZeroed(0x1000); bool32 success = CEReaderTool_LoadTrainerTower_r(ttdata, buffer); Free(buffer); return success; diff --git a/src/dodrio_berry_picking_2.c b/src/dodrio_berry_picking_2.c index f032945d6..2fcc0a682 100644 --- a/src/dodrio_berry_picking_2.c +++ b/src/dodrio_berry_picking_2.c @@ -29,13 +29,13 @@ static EWRAM_DATA u16 *gUnknown_203F42C[4] = {NULL}; static EWRAM_DATA struct DodrioStruct_2022CF4 * gUnknown_203F43C = NULL; static EWRAM_DATA struct DodrioSubstruct_0160 * gUnknown_203F440 = NULL; -static void sub_8153B9C(struct Sprite * sprite); -static u32 sub_8153C30(struct Sprite * sprite); -static u32 sub_8153CA0(struct Sprite * sprite); +static void sub_8153B9C(struct Sprite *sprite); +static u32 sub_8153C30(struct Sprite *sprite); +static u32 sub_8153CA0(struct Sprite *sprite); static void sub_8153D48(bool8 a0, u8 a1); -static void nullsub_97(struct Sprite * sprite); +static void nullsub_97(struct Sprite *sprite); static void sub_8154324(bool8 a0); -static void sub_81543E8(struct Sprite * sprite); +static void sub_81543E8(struct Sprite *sprite); static s16 sub_8154608(u8 a0, u8 a1); static void sub_8154A08(u8 taskId); static void sub_8154A2C(void); @@ -304,7 +304,7 @@ void sub_8153AFC(struct DodrioSubstruct_318C * arg0, u8 arg1, u8 id, u8 arg3) sub_8153D48(TRUE, id); } -static void sub_8153B9C(struct Sprite * sprite) +static void sub_8153B9C(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -321,7 +321,7 @@ static void sub_8153B9C(struct Sprite * sprite) void sub_8153BC0(u8 unused) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3E4[GetMultiplayerId()]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3E4[GetMultiplayerId()]]; sprite->data[0] = 1; sprite->data[1] = 0; sprite->data[2] = 0; @@ -331,7 +331,7 @@ void sub_8153BC0(u8 unused) void sub_8153BF8(u8 unused) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3E4[GetMultiplayerId()]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3E4[GetMultiplayerId()]]; sprite->data[0] = 2; sprite->data[1] = 0; sprite->data[2] = 0; @@ -339,7 +339,7 @@ void sub_8153BF8(u8 unused) sprite->data[4] = 0; } -static u32 sub_8153C30(struct Sprite * sprite) +static u32 sub_8153C30(struct Sprite *sprite) { s8 var; u8 mod = (++sprite->data[1] / 2) % 4; @@ -368,7 +368,7 @@ static u32 sub_8153C30(struct Sprite * sprite) return 0; } -static u32 sub_8153CA0(struct Sprite * sprite) +static u32 sub_8153CA0(struct Sprite *sprite) { u8 mod = (++sprite->data[1] / 13) % 4; @@ -388,7 +388,7 @@ void sub_8153D08(u8 count) u8 i; for (i = 0; i < count; i++) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3E4[i]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3E4[i]]; if (sprite != NULL) DestroySpriteAndFreeResources(sprite); // Memory should be freed here but is not. @@ -412,7 +412,7 @@ void sub_8153DA8(u8 id, u8 frameNum) StartSpriteAnim(&gSprites[*gUnknown_203F3E4[id]], frameNum); } -static void nullsub_97(struct Sprite * sprite) +static void nullsub_97(struct Sprite *sprite) { } @@ -422,7 +422,7 @@ void sub_8153DD8(void) u8 i; for (i = 0; i < 10; i++) { - struct Sprite * sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; + struct Sprite *sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; sprite->x = (i * 16) + 48; sprite->y = -8 - (i * 8); gUnknown_203F43C->unkC[i] = 0; @@ -466,7 +466,7 @@ void sub_8153ED8(void) u8 i; for (i = 0; i < 10; i++) { - struct Sprite * sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; + struct Sprite *sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; if (sprite != NULL) DestroySpriteAndFreeResources(sprite); } @@ -479,7 +479,7 @@ bool32 sub_8153F1C(void) bool32 r3 = FALSE; for (i = 0; i < 10; i++) { - struct Sprite * sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; + struct Sprite *sprite = &gSprites[gUnknown_203F43C->unk2A[i]]; gUnknown_203F43C->unk16[i] = 2; if (gUnknown_203F43C->unkC[i] != 0 && sprite->y == 8) continue; @@ -621,7 +621,7 @@ void sub_815417C(void) void sub_8154274(void) { - struct Sprite * sprite; + struct Sprite *sprite; u8 i; for (i = 0; i < 11; i++) @@ -677,7 +677,7 @@ static void sub_81543C4(u8 spriteId) #define sKeepPosX data[10] #endif // BUGFIX -static void sub_81543E8(struct Sprite * sprite) +static void sub_81543E8(struct Sprite *sprite) { u8 i; static const u8 array[] = {30, 20}; @@ -735,7 +735,7 @@ void sub_81544F0(void) u8 i; for (i = 0; i < 2; i++) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3F8[i]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3F8[i]]; sprite->sKeepPosX = TRUE; sprite->x = gUnknown_8478E0E[i][0]; sprite->y = gUnknown_8478E0E[i][1]; @@ -747,7 +747,7 @@ void sub_8154540(void) u8 i; for (i = 0; i < 2; i++) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3F8[i]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3F8[i]]; sprite->sKeepPosX = FALSE; } } @@ -757,7 +757,7 @@ void sub_8154578(void) u8 i; for (i = 0; i < 2; i++) { - struct Sprite * sprite = &gSprites[*gUnknown_203F3F8[i]]; + struct Sprite *sprite = &gSprites[*gUnknown_203F3F8[i]]; if (sprite) DestroySprite(sprite); FREE_AND_SET_NULL(gUnknown_203F3F8[i]); @@ -833,8 +833,8 @@ void sub_81546C0(void) static void sub_81546EC(u8 frameId) { - LoadBgTiles(0, GetUserFrameGraphicsInfo(frameId)->tiles, 0x120, 1); - LoadPalette(GetUserFrameGraphicsInfo(frameId)->palette, 0xA0, 0x20); + LoadBgTiles(0, GetWindowFrameTilesPal(frameId)->tiles, 0x120, 1); + LoadPalette(GetWindowFrameTilesPal(frameId)->palette, 0xA0, 0x20); } static void sub_8154720(void) diff --git a/src/easy_chat_3.c b/src/easy_chat_3.c index e02a93905..393020674 100644 --- a/src/easy_chat_3.c +++ b/src/easy_chat_3.c @@ -23,16 +23,16 @@ struct ECWork u16 bg2ScrollRow; int tgtBgY; int deltaBgY; - struct Sprite * selectDestFieldCursorSprite; - struct Sprite * rectCursorSpriteRight; - struct Sprite * rectCursorSpriteLeft; - struct Sprite * selectWordCursorSprite; - struct Sprite * selectGroupHelpSprite; - struct Sprite * modeIconsSprite; - struct Sprite * upTriangleCursorSprite; - struct Sprite * downTriangleCursorSprite; - struct Sprite * startPgUpButtonSprite; - struct Sprite * selectPgDnButtonSprite; + struct Sprite *selectDestFieldCursorSprite; + struct Sprite *rectCursorSpriteRight; + struct Sprite *rectCursorSpriteLeft; + struct Sprite *selectWordCursorSprite; + struct Sprite *selectGroupHelpSprite; + struct Sprite *modeIconsSprite; + struct Sprite *upTriangleCursorSprite; + struct Sprite *downTriangleCursorSprite; + struct Sprite *startPgUpButtonSprite; + struct Sprite *selectPgDnButtonSprite; u16 bg1TilemapBuffer[BG_SCREEN_SIZE / 2]; u16 bg3TilemapBuffer[BG_SCREEN_SIZE / 2]; }; @@ -104,7 +104,7 @@ static int GetBg2ScrollRow(void); static void SetRegWin0Coords(u8 left, u8 top, u8 right, u8 bottom); static void LoadSpriteGfx(void); static void CreateSelectDestFieldCursorSprite(void); -static void SpriteCB_BounceCursor(struct Sprite * sprite); +static void SpriteCB_BounceCursor(struct Sprite *sprite); static void SetSelectDestFieldCursorSpritePosAndResetAnim(u8 x, u8 y); static void FreezeSelectDestFieldCursorSprite(void); static void UnfreezeSelectDestFieldCursorSprite(void); @@ -114,7 +114,7 @@ static void EC_MoveCursor(void); static void MoveCursor_Group(s8 a0, s8 a1); static void MoveCursor_Alpha(s8 a0, s8 a1); static void CreateSelectWordCursorSprite(void); -static void SpriteCB_SelectWordCursorSprite(struct Sprite * sprite); +static void SpriteCB_SelectWordCursorSprite(struct Sprite *sprite); static void SetSelectWordCursorSpritePos(void); static void SetSelectWordCursorSpritePosExplicit(u8 x, u8 y); static void DestroySelectWordCursorSprite(void); @@ -1933,7 +1933,7 @@ static void CreateSelectDestFieldCursorSprite(void) gSprites[spriteId].data[1] = 1; } -static void SpriteCB_BounceCursor(struct Sprite * sprite) +static void SpriteCB_BounceCursor(struct Sprite *sprite) { if (sprite->data[1]) { @@ -2076,7 +2076,7 @@ static void CreateSelectWordCursorSprite(void) SetSelectWordCursorSpritePos(); } -static void SpriteCB_SelectWordCursorSprite(struct Sprite * sprite) +static void SpriteCB_SelectWordCursorSprite(struct Sprite *sprite) { if (++sprite->data[0] > 2) { diff --git a/src/ereader_helpers.c b/src/ereader_helpers.c index df1b1c279..cee90fc09 100644 --- a/src/ereader_helpers.c +++ b/src/ereader_helpers.c @@ -34,7 +34,7 @@ static u16 sSavedTm3Cnt; static u16 sSavedSioCnt; static u16 sSavedRCnt; -int EReader_Send(size_t size, const void * src) +int EReader_Send(size_t size, const void *src) { int result; EReaderHelper_SaveRegsState(); @@ -73,7 +73,7 @@ int EReader_Send(size_t size, const void * src) return result; } -int EReader_Recv(void * dest) +int EReader_Recv(void *dest) { int result; EReaderHelper_SaveRegsState(); @@ -147,7 +147,7 @@ static void OpenSerial32(void) sCounter2 = 0; } -u16 EReaderHandleTransfer(u8 mode, size_t size, const void * data, void * recvBuffer) +u16 EReaderHandleTransfer(u8 mode, size_t size, const void *data, void *recvBuffer) { switch (sSendRecvMgr.state) { @@ -240,7 +240,7 @@ static bool16 DetermineSendRecvState(u8 mode) return resp; } -static void SetUpTransferManager(size_t size, const void * data, void * recvBuffer) +static void SetUpTransferManager(size_t size, const void *data, void *recvBuffer) { if (sSendRecvMgr.master_slave) { diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 2a91bb38b..f3ba2133b 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -94,7 +94,7 @@ static u8 MovementType_VsSeeker4D_Callback(struct ObjectEvent *, struct Sprite * static u8 MovementType_VsSeeker4E_Callback(struct ObjectEvent *, struct Sprite *); static u8 MovementType_VsSeeker4F_Callback(struct ObjectEvent *, struct Sprite *); static void sub_8064544(struct ObjectEvent *, struct Sprite *); -static void DoObjectUnionRoomWarpYDisplacement(struct Sprite * sprite); +static void DoObjectUnionRoomWarpYDisplacement(struct Sprite *sprite); static void MovementType_None(struct Sprite *); static void MovementType_LookAround(struct Sprite *); static void MovementType_WanderAround(struct Sprite *); @@ -8840,37 +8840,37 @@ void UnfreezeObjectEvents(void) #define tSpeed data[4] #define tStepNo data[5] -static void little_step(struct Sprite * sprite, u8 direction) +static void little_step(struct Sprite *sprite, u8 direction) { sprite->x += sDirectionToVectors[direction].x; sprite->y += sDirectionToVectors[direction].y; } -static void double_little_steps(struct Sprite * sprite, u8 direction) +static void double_little_steps(struct Sprite *sprite, u8 direction) { sprite->x += 2 * (u16)sDirectionToVectors[direction].x; sprite->y += 2 * (u16)sDirectionToVectors[direction].y; } -static void triple_little_steps(struct Sprite * sprite, u8 direction) +static void triple_little_steps(struct Sprite *sprite, u8 direction) { sprite->x += 2 * (u16)sDirectionToVectors[direction].x + (u16)sDirectionToVectors[direction].x; sprite->y += 2 * (u16)sDirectionToVectors[direction].y + (u16)sDirectionToVectors[direction].y; } -static void quad_little_steps(struct Sprite * sprite, u8 direction) +static void quad_little_steps(struct Sprite *sprite, u8 direction) { sprite->x += 4 * (u16)sDirectionToVectors[direction].x; sprite->y += 4 * (u16)sDirectionToVectors[direction].y; } -static void oct_little_steps(struct Sprite * sprite, u8 direction) +static void oct_little_steps(struct Sprite *sprite, u8 direction) { sprite->x += 8 * (u16)sDirectionToVectors[direction].x; sprite->y += 8 * (u16)sDirectionToVectors[direction].y; } -void SetSpriteDataForNormalStep(struct Sprite * sprite, u8 direction, u8 speed) +void SetSpriteDataForNormalStep(struct Sprite *sprite, u8 direction, u8 speed) { sprite->tDirection = direction; sprite->tSpeed = speed; @@ -9322,7 +9322,7 @@ void RfuUnionObjectStartWarp(u8 objectEventId, u8 animNo) } } -static void DoObjectUnionRoomWarpYDisplacementUpwards(struct Sprite * sprite) +static void DoObjectUnionRoomWarpYDisplacementUpwards(struct Sprite *sprite) { switch (sprite->tUnionRoomWarpAnimState) { @@ -9342,7 +9342,7 @@ static void DoObjectUnionRoomWarpYDisplacementUpwards(struct Sprite * sprite) } } -static void DoObjectUnionRoomWarpYDisplacementDownwards(struct Sprite * sprite) +static void DoObjectUnionRoomWarpYDisplacementDownwards(struct Sprite *sprite) { switch (sprite->tUnionRoomWarpAnimState) { @@ -9360,7 +9360,7 @@ static void DoObjectUnionRoomWarpYDisplacementDownwards(struct Sprite * sprite) } } -static void DoObjectUnionRoomWarpYDisplacement(struct Sprite * sprite) +static void DoObjectUnionRoomWarpYDisplacement(struct Sprite *sprite) { switch (sprite->tUnionRoomWarpAnimNo) { diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index c1d6befac..e0ec9197e 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -8,7 +8,7 @@ #include "evolution_graphics.h" #include "constants/songs.h" -static void SpriteCallbackDummy_EvoSparkles(struct Sprite * sprite); +static void SpriteCallbackDummy_EvoSparkles(struct Sprite *sprite); static void EvoTask_PreEvoSparkleSet1Init(u8 taskId); static void EvoTask_CreatePreEvoSparkleSet1(u8 taskId); static void EvoTask_WaitForPre1SparklesToGoUp(u8 taskId); @@ -90,7 +90,7 @@ static const s16 sUnref_841EF28[][2] = { { 4, 0x10} }; -static void SpriteCallbackDummy_EvoSparkles(struct Sprite * sprite) +static void SpriteCallbackDummy_EvoSparkles(struct Sprite *sprite) { } @@ -102,7 +102,7 @@ static void SetEvoSparklesMatrices(void) SetOamMatrix(i + 20, sEvolutionSparkleMatrixScales[i], 0, 0, sEvolutionSparkleMatrixScales[i]); } -static void SpriteCB_PreEvoSparkleSet1(struct Sprite * sprite) +static void SpriteCB_PreEvoSparkleSet1(struct Sprite *sprite) { u8 mnum; if (sprite->y > 8) @@ -143,7 +143,7 @@ static void CreatePreEvoSparkleSet1(u8 a0) } } -static void SpriteCB_PreEvoSparkleSet2(struct Sprite * sprite) +static void SpriteCB_PreEvoSparkleSet2(struct Sprite *sprite) { if (sprite->y < 88) { @@ -174,7 +174,7 @@ static void CreatePreEvoSparkleSet2(u8 a0) } } -static void SpriteCB_PostEvoSparkleSet1(struct Sprite * sprite) +static void SpriteCB_PostEvoSparkleSet1(struct Sprite *sprite) { if (sprite->data[5] > 8) { @@ -205,7 +205,7 @@ static void CreatePostEvoSparkleSet1(u8 a0, u8 a1) } } -static void SpriteCB_PostEvoSparkleSet2(struct Sprite * sprite) +static void SpriteCB_PostEvoSparkleSet2(struct Sprite *sprite) { u8 mnum; if ((sprite->data[7] & 3) == 0) @@ -481,7 +481,7 @@ static void EvoTask_CreatePostEvoSparklesSet2Trade(u8 taskId) } } -static void SpriteCallbackDummy_MonSprites(struct Sprite * sprite) +static void SpriteCallbackDummy_MonSprites(struct Sprite *sprite) { } diff --git a/src/fame_checker.c b/src/fame_checker.c index f0e359bed..6bad8f81b 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -100,7 +100,7 @@ static void DestroyPersonPicSprite(u8 taskId, u16 who); static void UpdateIconDescriptionBox(u8 whichText); static void UpdateIconDescriptionBoxOff(void); static void FC_CreateListMenu(void); -static void SpriteCB_FCSpinningPokeball(struct Sprite * sprite); +static void SpriteCB_FCSpinningPokeball(struct Sprite *sprite); static void InitListMenuTemplate(void); static void FC_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu * list); static void Task_SwitchToPickMode(u8 taskId); @@ -1164,7 +1164,7 @@ void FullyUnlockFameChecker(void) static void FCSetup_ClearVideoRegisters(void) { - void * vram = (void *)VRAM; + void *vram = (void *)VRAM; DmaClearLarge16(3, vram, VRAM_SIZE, 0x1000); DmaClear32(3, OAM, OAM_SIZE); DmaClear16(3, PLTT, PLTT_SIZE); @@ -1268,7 +1268,7 @@ static u8 CreateFlavorTextIconSelectorCursorSprite(s16 where) return CreateSprite(&sSpriteTemplate_SelectorCursor, x, y, 0); } -static void SpriteCB_DestroyFlavorTextIconSelectorCursor(struct Sprite * sprite) +static void SpriteCB_DestroyFlavorTextIconSelectorCursor(struct Sprite *sprite) { DestroySprite(sprite); } @@ -1297,7 +1297,7 @@ static u8 CreateSpinningPokeballSprite(void) return CreateSprite(&sSpinningPokeballSpriteTemplate, 0xe2, 0x42, 0); } -static void SpriteCB_DestroySpinningPokeball(struct Sprite * sprite) +static void SpriteCB_DestroySpinningPokeball(struct Sprite *sprite) { FreeSpriteOamMatrix(sprite); DestroySprite(sprite); @@ -1311,7 +1311,7 @@ static void FreeNonTrainerPicTiles(void) FreeSpriteTilesByTag(SPRITETAG_BILL); } -static void SpriteCB_FCSpinningPokeball(struct Sprite * sprite) +static void SpriteCB_FCSpinningPokeball(struct Sprite *sprite) { if (sprite->data[0] == 1) { diff --git a/src/field_effect.c b/src/field_effect.c index 5b2f5cdc3..cbcc4b1d8 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -485,7 +485,7 @@ static void FieldEffectScript_CallNative(const u8 **script, u32 *result) *script += sizeof(u32); } -static void FieldEffectFreeGraphicsResources(struct Sprite * sprite) +static void FieldEffectFreeGraphicsResources(struct Sprite *sprite) { u16 tileStart = sprite->sheetTileStart; u8 paletteNum = sprite->oam.paletteNum; @@ -494,7 +494,7 @@ static void FieldEffectFreeGraphicsResources(struct Sprite * sprite) FieldEffectFreePaletteIfUnused(paletteNum); } -void FieldEffectStop(struct Sprite * sprite, u8 fldeff) +void FieldEffectStop(struct Sprite *sprite, u8 fldeff) { FieldEffectFreeGraphicsResources(sprite); FieldEffectActiveListRemove(fldeff); @@ -625,7 +625,7 @@ static u8 CreateMonSprite_FieldMove(u16 species, u32 otId, u32 personality, s16 return spriteId; } -void FreeResourcesAndDestroySprite(struct Sprite * sprite, u8 spriteId) +void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId) { ResetPreservedPalettesInWeather(); if (sprite->oam.affineMode != ST_OAM_AFFINE_OFF) @@ -1172,7 +1172,7 @@ static void Task_FallWarpFieldEffect(u8 taskId) static bool8 FallWarpEffect_1(struct Task * task) { struct ObjectEvent * playerObject; - struct Sprite * playerSprite; + struct Sprite *playerSprite; playerObject = &gObjectEvents[gPlayerAvatar.objectEventId]; playerSprite = &gSprites[gPlayerAvatar.spriteId]; CameraObjectReset2(); @@ -1198,7 +1198,7 @@ static bool8 FallWarpEffect_2(struct Task * task) static bool8 FallWarpEffect_3(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; s16 centerToCornerVecY; sprite = &gSprites[gPlayerAvatar.spriteId]; centerToCornerVecY = -(sprite->centerToCornerVecY << 1); @@ -1214,7 +1214,7 @@ static bool8 FallWarpEffect_3(struct Task * task) static bool8 FallWarpEffect_4(struct Task * task) { struct ObjectEvent * objectEvent; - struct Sprite * sprite; + struct Sprite *sprite; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1402,7 +1402,7 @@ static bool8 EscalatorWarpEffect_6(struct Task * task) static void Escalator_AnimatePlayerGoingDown(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x84, task->data[2]); sprite->y2 = Sin(0x94, task->data[2]); @@ -1415,7 +1415,7 @@ static void Escalator_AnimatePlayerGoingDown(struct Task * task) static void Escalator_AnimatePlayerGoingUp(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x7c, task->data[2]); sprite->y2 = Sin(0x76, task->data[2]); @@ -1499,7 +1499,7 @@ static bool8 EscalatorWarpInEffect_1(struct Task * task) static bool8 EscalatorWarpInEffect_2(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x84, task->data[1]); sprite->y2 = Sin(0x94, task->data[1]); @@ -1509,7 +1509,7 @@ static bool8 EscalatorWarpInEffect_2(struct Task * task) static bool8 EscalatorWarpInEffect_3(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x84, task->data[1]); sprite->y2 = Sin(0x94, task->data[1]); @@ -1530,7 +1530,7 @@ static bool8 EscalatorWarpInEffect_3(struct Task * task) static bool8 EscalatorWarpInEffect_4(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x7c, task->data[1]); sprite->y2 = Sin(0x76, task->data[1]); @@ -1540,7 +1540,7 @@ static bool8 EscalatorWarpInEffect_4(struct Task * task) static bool8 EscalatorWarpInEffect_5(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; sprite->x2 = Cos(0x7c, task->data[1]); sprite->y2 = Sin(0x76, task->data[1]); @@ -1723,20 +1723,20 @@ static bool8 DiveFieldEffect_TryWarp(struct Task *task) } static void Task_LavaridgeGymB1FWarp(u8 taskId); -static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); static void FieldCB_LavaridgeGymB1FWarpExit(void); static void Task_LavaridgeGymB1FWarpExit(u8 taskId); -static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 (*const sLavaridgeGymB1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) = { +static bool8 (*const sLavaridgeGymB1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGymB1FWarpEffect_1, LavaridgeGymB1FWarpEffect_2, LavaridgeGymB1FWarpEffect_3, @@ -1755,7 +1755,7 @@ static void Task_LavaridgeGymB1FWarp(u8 taskId) while (sLavaridgeGymB1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { FreezeObjectEvents(); CameraObjectReset2(); @@ -1767,7 +1767,7 @@ static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent return TRUE; } -static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { SetCameraPanning(0, task->data[1]); task->data[1] = -task->data[1]; @@ -1780,7 +1780,7 @@ static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { sprite->y2 = 0; task->data[3] = 1; @@ -1794,7 +1794,7 @@ static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent return TRUE; } -static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { s16 centerToCornerVecY; SetCameraPanning(0, task->data[1]); @@ -1837,7 +1837,7 @@ static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { TryFadeOutOldMapMusic(); WarpFadeOutScreen(); @@ -1845,7 +1845,7 @@ static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { @@ -1857,7 +1857,7 @@ static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 (*const sLavaridgeGymB1FWarpExitEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) = { +static bool8 (*const sLavaridgeGymB1FWarpExitEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGymB1FWarpExitEffect_1, LavaridgeGymB1FWarpExitEffect_2, LavaridgeGymB1FWarpExitEffect_3, @@ -1879,7 +1879,7 @@ static void Task_LavaridgeGymB1FWarpExit(u8 taskId) while (sLavaridgeGymB1FWarpExitEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { CameraObjectReset2(); FreezeObjectEvents(); @@ -1889,7 +1889,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (IsWeatherNotFadingIn()) { @@ -1903,7 +1903,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { sprite = &gSprites[task->data[1]]; if (sprite->animCmdIndex > 1) @@ -1917,7 +1917,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (ObjectEventClearHeldMovementIfFinished(objectEvent)) { @@ -1930,13 +1930,13 @@ static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEv } static void Task_LavaridgeGym1FWarp(u8 taskId); -static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); -static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite); +static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 (*const sLavaridgeGym1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) = { +static bool8 (*const sLavaridgeGym1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGym1FWarpEffect_1, LavaridgeGym1FWarpEffect_2, LavaridgeGym1FWarpEffect_3, @@ -1955,7 +1955,7 @@ u8 FldEff_LavaridgeGymWarp(void) return spriteId; } -void SpriteCB_AshLaunch(struct Sprite * sprite) +void SpriteCB_AshLaunch(struct Sprite *sprite) { if (sprite->animEnded) { @@ -1973,7 +1973,7 @@ static void Task_LavaridgeGym1FWarp(u8 taskId) while(sLavaridgeGym1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { FreezeObjectEvents(); CameraObjectReset2(); @@ -1983,7 +1983,7 @@ static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (ObjectEventClearHeldMovementIfFinished(objectEvent)) { @@ -2005,7 +2005,7 @@ static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (gSprites[task->data[1]].animCmdIndex == 2) { @@ -2015,7 +2015,7 @@ static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH)) { @@ -2026,7 +2026,7 @@ static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite * sprite) +static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { @@ -2048,7 +2048,7 @@ u8 FldEff_PopOutOfAsh(void) return spriteId; } -void SpriteCB_PopOutOfAsh(struct Sprite * sprite) +void SpriteCB_PopOutOfAsh(struct Sprite *sprite) { if (sprite->animEnded) { @@ -2397,7 +2397,7 @@ static void TeleportFieldEffectTask3(struct Task * task) { u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH}; struct ObjectEvent * objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; - struct Sprite * sprite = &gSprites[gPlayerAvatar.spriteId]; + struct Sprite *sprite = &gSprites[gPlayerAvatar.spriteId]; if ((--task->data[1]) <= 0) { task->data[1] = 4; @@ -2462,7 +2462,7 @@ static void Task_DoTeleportInFieldEffect(u8 taskId) static void TeleportInFieldEffectTask1(struct Task * task) { - struct Sprite * sprite; + struct Sprite *sprite; s16 centerToCornerVecY; if (IsWeatherNotFadingIn()) { @@ -2483,7 +2483,7 @@ static void TeleportInFieldEffectTask2(struct Task * task) { u8 spinDirections[5] = {1, 3, 4, 2, 1}; struct ObjectEvent * objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; - struct Sprite * sprite = &gSprites[gPlayerAvatar.spriteId]; + struct Sprite *sprite = &gSprites[gPlayerAvatar.spriteId]; if ((sprite->y2 += task->data[1]) >= -8) { if (task->data[13] == 0) @@ -2559,9 +2559,9 @@ static void AnimateIndoorShowMonBg(struct Task * task); static bool8 SlideIndoorBannerOnscreen(struct Task * task); static bool8 SlideIndoorBannerOffscreen(struct Task * task); static u8 InitFieldMoveMonSprite(u32 species, u32 otId, u32 personality); -static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite * sprite); -static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite * sprite); -static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite * sprite); +static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite *sprite); +static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite *sprite); +static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite *sprite); static void (*const sShowMonOutdoorsEffectFuncs[])(struct Task * task) = { ShowMonEffect_Outdoors_1, @@ -2915,7 +2915,7 @@ static u8 InitFieldMoveMonSprite(u32 species, u32 otId, u32 personality) { bool16 playCry; u8 monSprite; - struct Sprite * sprite; + struct Sprite *sprite; playCry = (species & 0x80000000) >> 16; species &= 0x7fffffff; monSprite = CreateMonSprite_FieldMove(species, otId, personality, 0x140, 0x50, 0); @@ -2927,7 +2927,7 @@ static u8 InitFieldMoveMonSprite(u32 species, u32 otId, u32 personality) return monSprite; } -static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite * sprite) +static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite *sprite) { if ((sprite->x -= 20) <= 0x78) { @@ -2945,7 +2945,7 @@ static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite * sprite) } } -static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite * sprite) +static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite *sprite) { if ((--sprite->data[1]) == 0) { @@ -2953,7 +2953,7 @@ static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite * sprite) } } -static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite * sprite) +static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite *sprite) { if (sprite->x < -0x40) { @@ -3137,12 +3137,12 @@ static void UseVsSeekerEffect_4(struct Task * task) } } -static void SpriteCB_NPCFlyOut(struct Sprite * sprite); +static void SpriteCB_NPCFlyOut(struct Sprite *sprite); u8 FldEff_NpcFlyOut(void) { u8 spriteId = CreateSprite(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_BIRD], 0x78, 0, 1); - struct Sprite * sprite = &gSprites[spriteId]; + struct Sprite *sprite = &gSprites[spriteId]; sprite->oam.paletteNum = 0; sprite->oam.priority = 1; @@ -3152,9 +3152,9 @@ u8 FldEff_NpcFlyOut(void) return spriteId; } -static void SpriteCB_NPCFlyOut(struct Sprite * sprite) +static void SpriteCB_NPCFlyOut(struct Sprite *sprite) { - struct Sprite * npcSprite; + struct Sprite *npcSprite; sprite->x2 = Cos(sprite->data[2], 0x8c); sprite->y2 = Sin(sprite->data[2], 0x48); @@ -3748,7 +3748,7 @@ u32 FldEff_MoveDeoxysRock(void) static void Task_MoveDeoxysRock_Step(u8 taskId) { s16 *data = gTasks[taskId].data; - struct Sprite * sprite = &gSprites[data[1]]; + struct Sprite *sprite = &gSprites[data[1]]; struct ObjectEvent * objectEvent; switch (data[0]) { diff --git a/src/field_effect_helpers.c b/src/field_effect_helpers.c index 789e0a188..342ff9e8b 100644 --- a/src/field_effect_helpers.c +++ b/src/field_effect_helpers.c @@ -13,26 +13,26 @@ #define OBJ_EVENT_PAL_TAG_NONE 0x11FF // duplicate of define in event_object_movement.c -static void UpdateObjectReflectionSprite(struct Sprite * sprite); -static void LoadObjectReflectionPalette(struct ObjectEvent * objectEvent, struct Sprite * sprite); +static void UpdateObjectReflectionSprite(struct Sprite *sprite); +static void LoadObjectReflectionPalette(struct ObjectEvent * objectEvent, struct Sprite *sprite); static void LoadObjectHighBridgeReflectionPalette(struct ObjectEvent * objectEvent, u8 paletteNum); static void LoadObjectRegularReflectionPalette(struct ObjectEvent * objectEvent, u8 paletteNum); -static void UpdateGrassFieldEffectSubpriority(struct Sprite * sprite, u8 z, u8 offset); -static void FadeFootprintsTireTracks_Step0(struct Sprite * sprite); -static void FadeFootprintsTireTracks_Step1(struct Sprite * sprite); -static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite * sprite); -static void UpdateAshFieldEffect_Step0(struct Sprite * sprite); -static void UpdateAshFieldEffect_Step1(struct Sprite * sprite); -static void UpdateAshFieldEffect_Step2(struct Sprite * sprite); -static void SynchroniseSurfAnim(struct ObjectEvent * objectEvent, struct Sprite * sprite); -static void SynchroniseSurfPosition(struct ObjectEvent * objectEvent, struct Sprite * sprite); -static void CreateBobbingEffect(struct ObjectEvent * objectEvent, struct Sprite * linkedSprite, struct Sprite * sprite); -static void SpriteCB_UnderwaterSurfBlob(struct Sprite * sprite); +static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 z, u8 offset); +static void FadeFootprintsTireTracks_Step0(struct Sprite *sprite); +static void FadeFootprintsTireTracks_Step1(struct Sprite *sprite); +static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite *sprite); +static void UpdateAshFieldEffect_Step0(struct Sprite *sprite); +static void UpdateAshFieldEffect_Step1(struct Sprite *sprite); +static void UpdateAshFieldEffect_Step2(struct Sprite *sprite); +static void SynchroniseSurfAnim(struct ObjectEvent * objectEvent, struct Sprite *sprite); +static void SynchroniseSurfPosition(struct ObjectEvent * objectEvent, struct Sprite *sprite); +static void CreateBobbingEffect(struct ObjectEvent * objectEvent, struct Sprite *linkedSprite, struct Sprite *sprite); +static void SpriteCB_UnderwaterSurfBlob(struct Sprite *sprite); static u32 ShowDisguiseFieldEffect(u8 fldEff, u8 templateIdx, u8 paletteNum); -void SetUpReflection(struct ObjectEvent * objectEvent, struct Sprite * sprite, bool8 stillReflection) +void SetUpReflection(struct ObjectEvent * objectEvent, struct Sprite *sprite, bool8 stillReflection) { - struct Sprite * reflectionSprite; + struct Sprite *reflectionSprite; reflectionSprite = &gSprites[CreateCopySpriteAt(sprite, sprite->x, sprite->y, 0x98)]; reflectionSprite->callback = UpdateObjectReflectionSprite; @@ -58,7 +58,7 @@ static s16 GetReflectionVerticalOffset(struct ObjectEvent * objectEvent) return GetObjectEventGraphicsInfo(objectEvent->graphicsId)->height - 2; } -static void LoadObjectReflectionPalette(struct ObjectEvent * objectEvent, struct Sprite * sprite) +static void LoadObjectReflectionPalette(struct ObjectEvent * objectEvent, struct Sprite *sprite) { u8 bridgeType; u16 bridgeReflectionVerticalOffsets[] = { 12, 28, 44 }; @@ -111,10 +111,10 @@ static void LoadObjectHighBridgeReflectionPalette(struct ObjectEvent * objectEve } } -static void UpdateObjectReflectionSprite(struct Sprite * reflectionSprite) +static void UpdateObjectReflectionSprite(struct Sprite *reflectionSprite) { struct ObjectEvent * objectEvent; - struct Sprite * mainSprite; + struct Sprite *mainSprite; objectEvent = &gObjectEvents[reflectionSprite->data[0]]; mainSprite = &gSprites[objectEvent->spriteId]; @@ -164,7 +164,7 @@ extern const struct SpriteTemplate * const gFieldEffectObjectTemplatePointers[]; u8 CreateWarpArrowSprite(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_ARROW], 0, 0, 0x52); if (spriteId != MAX_SPRITES) @@ -186,7 +186,7 @@ void ShowWarpArrowSprite(u8 spriteId, u8 direction, s16 x, s16 y) { s16 x2; s16 y2; - struct Sprite * sprite; + struct Sprite *sprite; sprite = &gSprites[spriteId]; if (sprite->invisible || sprite->data[0] != x || sprite->data[1] != y) @@ -236,11 +236,11 @@ u32 FldEff_Shadow(void) return 0; } -void UpdateShadowFieldEffect(struct Sprite * sprite) +void UpdateShadowFieldEffect(struct Sprite *sprite) { u8 objectEventId; struct ObjectEvent * objectEvent; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; if (TryGetObjectEventIdByLocalIdAndMap(sprite->data[0], sprite->data[1], sprite->data[2], &objectEventId)) { @@ -270,7 +270,7 @@ u32 FldEff_TallGrass(void) s16 x; s16 y; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; x = gFieldEffectArguments[0]; y = gFieldEffectArguments[1]; @@ -295,7 +295,7 @@ u32 FldEff_TallGrass(void) return 0; } -void UpdateTallGrassFieldEffect(struct Sprite * sprite) +void UpdateTallGrassFieldEffect(struct Sprite *sprite) { u8 mapNum; u8 mapGroup; @@ -339,7 +339,7 @@ void UpdateTallGrassFieldEffect(struct Sprite * sprite) u32 FldEff_JumpTallGrass(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 12); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_JUMP_TALL_GRASS], gFieldEffectArguments[0], gFieldEffectArguments[1], 0); @@ -356,7 +356,7 @@ u32 FldEff_JumpTallGrass(void) u8 FindTallGrassFieldEffectSpriteId(u8 localId, u8 mapNum, u8 mapGroup, s16 x, s16 y) { - struct Sprite * sprite; + struct Sprite *sprite; u8 i; for (i = 0; i < MAX_SPRITES; i++) @@ -377,7 +377,7 @@ u32 FldEff_LongGrass(void) s16 x; s16 y; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; x = gFieldEffectArguments[0]; y = gFieldEffectArguments[1]; @@ -402,7 +402,7 @@ u32 FldEff_LongGrass(void) return 0; } -void UpdateLongGrassFieldEffect(struct Sprite * sprite) +void UpdateLongGrassFieldEffect(struct Sprite *sprite) { u8 mapNum; u8 mapGroup; @@ -442,7 +442,7 @@ void UpdateLongGrassFieldEffect(struct Sprite * sprite) u32 FldEff_JumpLongGrass(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_JUMP_LONG_GRASS], gFieldEffectArguments[0], gFieldEffectArguments[1], 0); @@ -462,7 +462,7 @@ u32 FldEff_ShortGrass(void) u8 objectEventId; struct ObjectEvent * objectEvent; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); objectEvent = &gObjectEvents[objectEventId]; @@ -481,13 +481,13 @@ u32 FldEff_ShortGrass(void) return 0; } -void UpdateShortGrassFieldEffect(struct Sprite * sprite) +void UpdateShortGrassFieldEffect(struct Sprite *sprite) { u8 objectEventId; s16 x; s16 y; const struct ObjectEventGraphicsInfo * graphicsInfo; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; if (TryGetObjectEventIdByLocalIdAndMap(sprite->data[0], sprite->data[1], sprite->data[2], &objectEventId) || !gObjectEvents[objectEventId].inShortGrass) { @@ -520,7 +520,7 @@ void UpdateShortGrassFieldEffect(struct Sprite * sprite) u32 FldEff_SandFootprints(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_SAND_FOOTPRINTS], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -538,7 +538,7 @@ u32 FldEff_SandFootprints(void) u32 FldEff_DeepSandFootprints(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_DEEP_SAND_FOOTPRINTS], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -556,7 +556,7 @@ u32 FldEff_DeepSandFootprints(void) u32 FldEff_BikeTireTracks(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_BIKE_TIRE_TRACKS], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -571,17 +571,17 @@ u32 FldEff_BikeTireTracks(void) return spriteId; } -void (*const gFadeFootprintsTireTracksFuncs[])(struct Sprite * sprite) = { +void (*const gFadeFootprintsTireTracksFuncs[])(struct Sprite *sprite) = { FadeFootprintsTireTracks_Step0, FadeFootprintsTireTracks_Step1 }; -void UpdateFootprintsTireTracksFieldEffect(struct Sprite * sprite) +void UpdateFootprintsTireTracksFieldEffect(struct Sprite *sprite) { gFadeFootprintsTireTracksFuncs[sprite->data[0]](sprite); } -static void FadeFootprintsTireTracks_Step0(struct Sprite * sprite) +static void FadeFootprintsTireTracks_Step0(struct Sprite *sprite) { // Wait 40 frames before the flickering starts. if (++sprite->data[1] > 40) @@ -590,7 +590,7 @@ static void FadeFootprintsTireTracks_Step0(struct Sprite * sprite) UpdateObjectEventSpriteVisibility(sprite, FALSE); } -static void FadeFootprintsTireTracks_Step1(struct Sprite * sprite) +static void FadeFootprintsTireTracks_Step1(struct Sprite *sprite) { sprite->invisible ^= 1; sprite->data[1]++; @@ -606,9 +606,9 @@ u32 FldEff_Splash(void) u8 objectEventId; struct ObjectEvent * objectEvent; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; const struct ObjectEventGraphicsInfo * graphicsInfo; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); objectEvent = &gObjectEvents[objectEventId]; @@ -629,7 +629,7 @@ u32 FldEff_Splash(void) return 0; } -void UpdateSplashFieldEffect(struct Sprite * sprite) +void UpdateSplashFieldEffect(struct Sprite *sprite) { u8 objectEventId; @@ -648,7 +648,7 @@ void UpdateSplashFieldEffect(struct Sprite * sprite) u32 FldEff_JumpSmallSplash(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 12); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_JUMP_SMALL_SPLASH], gFieldEffectArguments[0], gFieldEffectArguments[1], 0); @@ -666,7 +666,7 @@ u32 FldEff_JumpSmallSplash(void) u32 FldEff_JumpBigSplash(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 8); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_JUMP_BIG_SPLASH], gFieldEffectArguments[0], gFieldEffectArguments[1], 0); @@ -686,7 +686,7 @@ u32 FldEff_FeetInFlowingWater(void) u8 objectEventId; struct ObjectEvent * objectEvent; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; const struct ObjectEventGraphicsInfo * graphicsInfo; objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -710,10 +710,10 @@ u32 FldEff_FeetInFlowingWater(void) return 0; } -static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite * sprite) +static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite *sprite) { u8 objectEventId; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; struct ObjectEvent * objectEvent; if (TryGetObjectEventIdByLocalIdAndMap(sprite->data[0], sprite->data[1], sprite->data[2], &objectEventId) || !gObjectEvents[objectEventId].inShallowFlowingWater) @@ -743,7 +743,7 @@ static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite * sprite) u32 FldEff_Ripple(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_RIPPLE], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); if (spriteId != MAX_SPRITES) @@ -761,7 +761,7 @@ u32 FldEff_HotSpringsWater(void) u8 objectEventId; struct ObjectEvent * objectEvent; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); objectEvent = &gObjectEvents[objectEventId]; @@ -780,11 +780,11 @@ u32 FldEff_HotSpringsWater(void) return 0; } -void UpdateHotSpringsWaterFieldEffect(struct Sprite * sprite) +void UpdateHotSpringsWaterFieldEffect(struct Sprite *sprite) { u8 objectEventId; const struct ObjectEventGraphicsInfo * graphicsInfo; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; if (TryGetObjectEventIdByLocalIdAndMap(sprite->data[0], sprite->data[1], sprite->data[2], &objectEventId) || !gObjectEvents[objectEventId].inHotSprings) { @@ -885,7 +885,7 @@ u32 FldEff_Ash(void) s16 x; s16 y; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; x = gFieldEffectArguments[0]; y = gFieldEffectArguments[1]; @@ -904,18 +904,18 @@ u32 FldEff_Ash(void) return 0; } -void (*const gAshFieldEffectFuncs[])(struct Sprite * sprite) = { +void (*const gAshFieldEffectFuncs[])(struct Sprite *sprite) = { UpdateAshFieldEffect_Step0, UpdateAshFieldEffect_Step1, UpdateAshFieldEffect_Step2 }; -void UpdateAshFieldEffect(struct Sprite * sprite) +void UpdateAshFieldEffect(struct Sprite *sprite) { gAshFieldEffectFuncs[sprite->data[0]](sprite); } -static void UpdateAshFieldEffect_Step0(struct Sprite * sprite) +static void UpdateAshFieldEffect_Step0(struct Sprite *sprite) { sprite->invisible = TRUE; sprite->animPaused = TRUE; @@ -923,7 +923,7 @@ static void UpdateAshFieldEffect_Step0(struct Sprite * sprite) sprite->data[0] = 1; } -static void UpdateAshFieldEffect_Step1(struct Sprite * sprite) +static void UpdateAshFieldEffect_Step1(struct Sprite *sprite) { sprite->invisible = FALSE; sprite->animPaused = FALSE; @@ -933,7 +933,7 @@ static void UpdateAshFieldEffect_Step1(struct Sprite * sprite) sprite->data[0] = 2; } -static void UpdateAshFieldEffect_Step2(struct Sprite * sprite) +static void UpdateAshFieldEffect_Step2(struct Sprite *sprite) { UpdateObjectEventSpriteVisibility(sprite, FALSE); if (sprite->animEnded) @@ -1089,7 +1089,7 @@ static void CreateBobbingEffect(struct ObjectEvent *objectEvent, struct Sprite * u8 StartUnderwaterSurfBlobBobbing(u8 oldSpriteId) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; spriteId = CreateSpriteAtEnd(&gDummySpriteTemplate, 0, 0, -1); sprite = &gSprites[spriteId]; @@ -1100,9 +1100,9 @@ u8 StartUnderwaterSurfBlobBobbing(u8 oldSpriteId) return spriteId; } -static void SpriteCB_UnderwaterSurfBlob(struct Sprite * sprite) +static void SpriteCB_UnderwaterSurfBlob(struct Sprite *sprite) { - struct Sprite * oldSprite; + struct Sprite *oldSprite; oldSprite = &gSprites[sprite->data[0]]; if (((sprite->data[2]++) & 0x03) == 0) @@ -1118,7 +1118,7 @@ static void SpriteCB_UnderwaterSurfBlob(struct Sprite * sprite) u32 FldEff_Dust(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 12); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_GROUND_IMPACT_DUST], gFieldEffectArguments[0], gFieldEffectArguments[1], 0); @@ -1138,7 +1138,7 @@ u32 FldEff_SandPile(void) u8 objectEventId; struct ObjectEvent * objectEvent; u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; const struct ObjectEventGraphicsInfo * graphicsInfo; objectEventId = GetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -1161,7 +1161,7 @@ u32 FldEff_SandPile(void) return 0; } -void UpdateSandPileFieldEffect(struct Sprite * sprite) +void UpdateSandPileFieldEffect(struct Sprite *sprite) { u8 objectEventId; s16 x; @@ -1194,7 +1194,7 @@ void UpdateSandPileFieldEffect(struct Sprite * sprite) u32 FldEff_Bubbles(void) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 0); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_BUBBLES], gFieldEffectArguments[0], gFieldEffectArguments[1], 0x52); @@ -1207,7 +1207,7 @@ u32 FldEff_Bubbles(void) return 0; } -void UpdateBubblesFieldEffect(struct Sprite * sprite) +void UpdateBubblesFieldEffect(struct Sprite *sprite) { sprite->data[0] += 0x80; sprite->data[0] &= 0x100; @@ -1222,7 +1222,7 @@ void UpdateBubblesFieldEffect(struct Sprite * sprite) u32 FldEff_BerryTreeGrowthSparkle(void) { /*u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; SetSpritePosToOffsetMapCoords((s16 *)&gFieldEffectArguments[0], (s16 *)&gFieldEffectArguments[1], 8, 4); spriteId = CreateSpriteAtEnd(gFieldEffectObjectTemplatePointers[FLDEFFOBJ_SPARKLE], gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2]); @@ -1255,7 +1255,7 @@ u32 ShowSandDisguiseFieldEffect(void) static u32 ShowDisguiseFieldEffect(u8 fldEff, u8 templateIdx, u8 paletteNum) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; if (TryGetObjectEventIdByLocalIdAndMap(gFieldEffectArguments[0], gFieldEffectArguments[1], gFieldEffectArguments[2], &spriteId)) { @@ -1276,11 +1276,11 @@ static u32 ShowDisguiseFieldEffect(u8 fldEff, u8 templateIdx, u8 paletteNum) return spriteId; } -void UpdateDisguiseFieldEffect(struct Sprite * sprite) +void UpdateDisguiseFieldEffect(struct Sprite *sprite) { u8 objectEventId; const struct ObjectEventGraphicsInfo * graphicsInfo; - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; if (TryGetObjectEventIdByLocalIdAndMap(sprite->data[2], sprite->data[3], sprite->data[4], &objectEventId)) { @@ -1318,7 +1318,7 @@ void StartRevealDisguise(struct ObjectEvent * objectEvent) bool8 UpdateRevealDisguise(struct ObjectEvent * objectEvent) { - struct Sprite * sprite; + struct Sprite *sprite; if (objectEvent->directionSequenceIndex == 2) { @@ -1354,7 +1354,7 @@ u32 FldEff_Sparkle(void) return 0; } -void UpdateSparkleFieldEffect(struct Sprite * sprite) +void UpdateSparkleFieldEffect(struct Sprite *sprite) { if (sprite->data[0] == 0) { @@ -1372,7 +1372,7 @@ void UpdateSparkleFieldEffect(struct Sprite * sprite) FieldEffectStop(sprite, FLDEFF_SPARKLE); } -void UpdateJumpImpactEffect(struct Sprite * sprite) +void UpdateJumpImpactEffect(struct Sprite *sprite) { if (sprite->animEnded) { @@ -1385,7 +1385,7 @@ void UpdateJumpImpactEffect(struct Sprite * sprite) } } -void WaitFieldEffectSpriteAnim(struct Sprite * sprite) +void WaitFieldEffectSpriteAnim(struct Sprite *sprite) { if (sprite->animEnded) FieldEffectStop(sprite, sprite->data[0]); @@ -1393,12 +1393,12 @@ void WaitFieldEffectSpriteAnim(struct Sprite * sprite) UpdateObjectEventSpriteVisibility(sprite, FALSE); } -static void UpdateGrassFieldEffectSubpriority(struct Sprite * sprite, u8 z, u8 offset) +static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 z, u8 offset) { u8 i; s16 var, xhi, lyhi, yhi, ylo; const struct ObjectEventGraphicsInfo * graphicsInfo; // Unused Variable - struct Sprite * linkedSprite; + struct Sprite *linkedSprite; SetObjectSubpriorityByZCoord(z, sprite, offset); for (i = 0; i < OBJECT_EVENTS_COUNT; i++) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index e9789560d..a5be40b5c 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -32,7 +32,7 @@ static EWRAM_DATA u8 sTeleportSavedFacingDirection = DIR_NONE; EWRAM_DATA struct ObjectEvent gObjectEvents[OBJECT_EVENTS_COUNT] = {}; EWRAM_DATA struct PlayerAvatar gPlayerAvatar = {}; -static u8 ObjectEventCB2_NoMovement2(struct ObjectEvent * object, struct Sprite * sprite); +static u8 ObjectEventCB2_NoMovement2(struct ObjectEvent * object, struct Sprite *sprite); static bool8 TryUpdatePlayerSpinDirection(void); static bool8 TryInterruptObjectEventSpecialAnim(struct ObjectEvent * playerObjEvent, u8 direction); static void npc_clear_strange_bits(struct ObjectEvent * playerObjEvent); @@ -128,7 +128,7 @@ void MovementType_Player(struct Sprite *sprite) UpdateObjectEventCurrentMovement(&gObjectEvents[sprite->data[0]], sprite, ObjectEventCB2_NoMovement2); } -static u8 ObjectEventCB2_NoMovement2(struct ObjectEvent * object, struct Sprite * sprite) +static u8 ObjectEventCB2_NoMovement2(struct ObjectEvent * object, struct Sprite *sprite) { return 0; } @@ -1952,7 +1952,7 @@ static bool8 Fishing16(struct Task *task) #undef tFrameCounter #undef tFishingRod -void AlignFishingAnimationFrames(struct Sprite * playerSprite) +void AlignFishingAnimationFrames(struct Sprite *playerSprite) { u8 animCmdIndex; u8 animType; diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c index faa076a6c..e6029448c 100644 --- a/src/fldeff_cut.c +++ b/src/fldeff_cut.c @@ -28,9 +28,9 @@ static void FieldCallback_CutGrass(void); static void FieldCallback_CutTree(void); static void FieldMoveCallback_CutGrass(void); static void SetCutGrassMetatileAt(s16 x, s16 y); -static void SpriteCallback_CutGrass_Init(struct Sprite * sprite); -static void SpriteCallback_CutGrass_Run(struct Sprite * sprite); -static void SpriteCallback_CutGrass_Cleanup(struct Sprite * sprite); +static void SpriteCallback_CutGrass_Init(struct Sprite *sprite); +static void SpriteCallback_CutGrass_Run(struct Sprite *sprite); +static void SpriteCallback_CutGrass_Cleanup(struct Sprite *sprite); static void FieldMoveCallback_CutTree(void); static const u16 sCutGrassMetatileMapping[][2] = { @@ -251,7 +251,7 @@ static void SetCutGrassMetatileAt(s16 x, s16 y) } } -static void SpriteCallback_CutGrass_Init(struct Sprite * sprite) +static void SpriteCallback_CutGrass_Init(struct Sprite *sprite) { sprite->data[0] = 8; sprite->data[1] = 0; @@ -259,7 +259,7 @@ static void SpriteCallback_CutGrass_Init(struct Sprite * sprite) sprite->callback = SpriteCallback_CutGrass_Run; } -static void SpriteCallback_CutGrass_Run(struct Sprite * sprite) +static void SpriteCallback_CutGrass_Run(struct Sprite *sprite) { sprite->x2 = Sin(sprite->data[2], sprite->data[0]); sprite->y2 = Cos(sprite->data[2], sprite->data[0]); @@ -274,7 +274,7 @@ static void SpriteCallback_CutGrass_Run(struct Sprite * sprite) sprite->callback = SpriteCallback_CutGrass_Cleanup; } -static void SpriteCallback_CutGrass_Cleanup(struct Sprite * sprite) +static void SpriteCallback_CutGrass_Cleanup(struct Sprite *sprite) { u8 i; for (i = 1; i < CUT_GRASS_SPRITE_COUNT; i++) diff --git a/src/graphics.c b/src/graphics.c index b1266dc90..e8c2a96e1 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1255,8 +1255,8 @@ const u32 gPSSMenu_Gfx[] = INCBIN_U32("graphics/interface/box_tiles.4bpp.lz"); const u32 gUnknown_8E9CAEC[] = INCBIN_U32("graphics/unknown/unknown_E9CAEC.bin.lz"); -const u16 gUnknown_8E9CB9C[] = INCBIN_U16("graphics/misc/markings2.gbapal"); -const u16 gUnknown_8E9CBBC[] = INCBIN_U16("graphics/misc/markings2.4bpp"); +const u16 gMonMarkingsMenu_Pal[] = INCBIN_U16("graphics/misc/markings2.gbapal"); +const u16 gMonMarkingsMenu_Gfx[] = INCBIN_U16("graphics/misc/markings2.4bpp"); const u16 gTradeMenu_Pal[] = INCBIN_U16("graphics/trade/menu.gbapal"); const u16 gTradeButtons_Pal[] = INCBIN_U16("graphics/trade/unknown_DDB444.gbapal"); diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 68494d9cf..9b7e1f7af 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -87,8 +87,8 @@ static void ClearVramOamPltt_LoadHofPal(void); static void HofInit_ResetGpuBuffersAndLoadConfettiGfx(void); static void Hof_InitBgs(void); static bool8 DrawHofBackground(void); -static void SpriteCB_GetOnScreen(struct Sprite * sprite); -static void SpriteCB_Confetti(struct Sprite * sprite); +static void SpriteCB_GetOnScreen(struct Sprite *sprite); +static void SpriteCB_Confetti(struct Sprite *sprite); static bool8 Hof_SpawnConfetti(void); static const struct BgTemplate sHof_BgTemplates[] = { @@ -1213,12 +1213,12 @@ static bool8 DrawHofBackground(void) return TRUE; } -static void SpriteCB_EndGetOnScreen(struct Sprite * sprite) +static void SpriteCB_EndGetOnScreen(struct Sprite *sprite) { } -static void SpriteCB_GetOnScreen(struct Sprite * sprite) +static void SpriteCB_GetOnScreen(struct Sprite *sprite) { if (sprite->x != sprite->data[1] || sprite->y != sprite->data[2]) diff --git a/src/intro.c b/src/intro.c index 9466301d2..fd6875eee 100644 --- a/src/intro.c +++ b/src/intro.c @@ -27,12 +27,12 @@ struct IntroSequenceData u8 taskId; bool8 gengarAttackLanded; u16 data[6]; - struct Sprite * gameFreakLogoArtSprite; - struct Sprite * nidorinoAnimSprite; - struct Sprite * gengarStaticSprite; - struct Sprite * nidorinoStaticSprite; - struct Sprite * grassSprite; - struct Sprite * gengarBackSpriteArray[4]; + struct Sprite *gameFreakLogoArtSprite; + struct Sprite *nidorinoAnimSprite; + struct Sprite *gengarStaticSprite; + struct Sprite *nidorinoStaticSprite; + struct Sprite *grassSprite; + struct Sprite *gengarBackSpriteArray[4]; u8 filler_0038[0x4]; u8 gamefreakLogoArtSpriteTiles[0x400]; u8 gamefreakTextBitmap[0x400]; @@ -85,7 +85,7 @@ static void IntroCB_FightScene3(struct IntroSequenceData * ptr); static void FightScene3_StartBg1Scroll(void); static void Task_FightScene3_ForestBgScroll(u8 taskId); static void CreateGrassSprite(struct IntroSequenceData * ptr); -static void SpriteCB_Grass(struct Sprite * sprite); +static void SpriteCB_Grass(struct Sprite *sprite); static void IntroCB_FightScene4(struct IntroSequenceData * ptr); static void CreateGengarBackSprite(struct IntroSequenceData * ptr); static void FightScene4_StartNidorinoAffineAnim(struct IntroSequenceData * ptr); @@ -96,31 +96,31 @@ static void GameFreakScene_StartTrailingSparkleSpawner(void); static void Task_GameFreakScene_TrailingSparkleSpawner(u8 taskId); static void GameFreakScene_StartRevealGameFreakTextSparklesSpawner(void); static void Task_RevealGameFreakTextSparklesSpawner(u8 taskId); -static struct Sprite * CreateGameFreakLogoArtSprite(void); +static struct Sprite *CreateGameFreakLogoArtSprite(void); static void FightScene4_StartGengarAttack(struct IntroSequenceData * ptr); static void Task_FightScene4_GengarAttack(u8 taskId); static void FightScene4_CreateGengarSwipeSprites(void); -static void SpriteCB_GengarSwipe(struct Sprite * sprite); +static void SpriteCB_GengarSwipe(struct Sprite *sprite); static void Task_FightScene3_Bg0Scroll(u8 taskId); -static void SpriteCB_LargeStar(struct Sprite * sprite); -static void SpriteCB_TrailingSparkles(struct Sprite * sprite); -static void SpriteCB_TrailingSparkles2(struct Sprite * sprite); -static void SpriteCB_RevealGameFreakTextSparkles(struct Sprite * sprite); +static void SpriteCB_LargeStar(struct Sprite *sprite); +static void SpriteCB_TrailingSparkles(struct Sprite *sprite); +static void SpriteCB_TrailingSparkles2(struct Sprite *sprite); +static void SpriteCB_RevealGameFreakTextSparkles(struct Sprite *sprite); static void CreateNidorinoAnimSprite(struct IntroSequenceData * ptr); -static void StartNidorinoAnimSpriteSlideIn(struct Sprite * sprite, s16 x0, s16 x1, u16 speed); -static void SpriteCB_NidorinoAnimSpriteSlideIn(struct Sprite * sprite); +static void StartNidorinoAnimSpriteSlideIn(struct Sprite *sprite, s16 x0, s16 x1, u16 speed); +static void SpriteCB_NidorinoAnimSpriteSlideIn(struct Sprite *sprite); static bool32 IsNidorinoAnimSpriteSlideInRunning(struct IntroSequenceData * ptr); static void FightScene4_NidorinoRearsUp(struct IntroSequenceData * ptr); -static void SpriteCB_NidorinoRearsUp(struct Sprite * sprite); +static void SpriteCB_NidorinoRearsUp(struct Sprite *sprite); static void FightScene4_StartNidorinoRecoilAnim(struct IntroSequenceData * ptr); -static void SpriteCB_NidorinoRecoil(struct Sprite * sprite); +static void SpriteCB_NidorinoRecoil(struct Sprite *sprite); static bool8 FightScene4_NidorinoAnimIsRunning(struct IntroSequenceData * ptr); static void CreateNidorinoRecoilDustSprites(s16 a1, s16 a2, s16 a3); -static void SpriteCB_NidorinoRecoilDust(struct Sprite * sprite); -static void StartSpriteHopToPosAnim(struct Sprite * sprite, u16 a1, s16 a2, u8 a3); -static void SpriteCB_HopToPos(struct Sprite * sprite); +static void SpriteCB_NidorinoRecoilDust(struct Sprite *sprite); +static void StartSpriteHopToPosAnim(struct Sprite *sprite, u16 a1, s16 a2, u8 a3); +static void SpriteCB_HopToPos(struct Sprite *sprite); static void StartNidorinoAnim_LaunchSelfAtGengarAnim(struct IntroSequenceData * ptr); -static void SpriteCB_NidorinoAnim_LaunchSelfAtGengar(struct Sprite * sprite); +static void SpriteCB_NidorinoAnim_LaunchSelfAtGengar(struct Sprite *sprite); static void LoadFightSceneSpriteTilesAndPals(void); #if REVISION >= 1 static void Rev1_GameFreakScene_CreatePresentsText(void); @@ -1524,7 +1524,7 @@ static void CreateGrassSprite(struct IntroSequenceData * this) this->grassSprite = NULL; } -static void SpriteCB_Grass(struct Sprite * sprite) +static void SpriteCB_Grass(struct Sprite *sprite) { s16 * data = sprite->data; @@ -1695,7 +1695,7 @@ static void IntroCB_FightScene4(struct IntroSequenceData * this) } } -static void FightScene_CalcCenterToCornerVec(struct Sprite * sprite) +static void FightScene_CalcCenterToCornerVec(struct Sprite *sprite) { CalcCenterToCornerVec(sprite, sprite->oam.shape, sprite->oam.size, sprite->oam.affineMode); } @@ -1730,7 +1730,7 @@ static void FightScene4_StartNidorinoAffineAnim(struct IntroSequenceData * this) StartSpriteAffineAnim(this->nidorinoAnimSprite, 1); } -static void SpriteCB_DummyButNotDummy(struct Sprite * sprite) +static void SpriteCB_DummyButNotDummy(struct Sprite *sprite) { } @@ -1889,7 +1889,7 @@ static void Task_RevealGameFreakTextSparklesSpawner(u8 taskId) data[0] = 0; } -static struct Sprite * CreateGameFreakLogoArtSprite(void) +static struct Sprite *CreateGameFreakLogoArtSprite(void) { u8 spriteId = CreateSprite(&sSpriteTemplate_GameFreakLogoArt, 120, 70, 4); return &gSprites[spriteId]; @@ -2009,7 +2009,7 @@ static void FightScene4_CreateGengarSwipeSprites(void) } } -static void SpriteCB_GengarSwipe(struct Sprite * sprite) +static void SpriteCB_GengarSwipe(struct Sprite *sprite) { sprite->invisible ^= TRUE; if (sprite->animEnded) @@ -2043,7 +2043,7 @@ static void Task_FightScene3_Bg0Scroll(u8 taskId) } } -static void SpriteCB_LargeStar(struct Sprite * sprite) +static void SpriteCB_LargeStar(struct Sprite *sprite) { unsigned v; sprite->data[0] -= sprite->data[2]; @@ -2065,7 +2065,7 @@ static void SpriteCB_LargeStar(struct Sprite * sprite) DestroySprite(sprite); } -static void SpriteCB_TrailingSparkles(struct Sprite * sprite) +static void SpriteCB_TrailingSparkles(struct Sprite *sprite) { u32 v; @@ -2088,7 +2088,7 @@ static void SpriteCB_TrailingSparkles(struct Sprite * sprite) DestroySprite(sprite); } -static void SpriteCB_TrailingSparkles2(struct Sprite * sprite) +static void SpriteCB_TrailingSparkles2(struct Sprite *sprite) { if (sprite->data[2]) { @@ -2137,7 +2137,7 @@ static void SpriteCB_TrailingSparkles2(struct Sprite * sprite) } } -static void SpriteCB_RevealGameFreakTextSparkles(struct Sprite * sprite) +static void SpriteCB_RevealGameFreakTextSparkles(struct Sprite *sprite) { if (sprite->animEnded) DestroySprite(sprite); @@ -2149,7 +2149,7 @@ static void CreateNidorinoAnimSprite(struct IntroSequenceData * this) this->nidorinoAnimSprite = &gSprites[spriteId]; } -static void StartNidorinoAnimSpriteSlideIn(struct Sprite * sprite, s16 x0, s16 x1, u16 speed) +static void StartNidorinoAnimSpriteSlideIn(struct Sprite *sprite, s16 x0, s16 x1, u16 speed) { sprite->data[0] = x0 << 4; sprite->data[1] = ((x1 - x0) << 4) / speed; @@ -2161,7 +2161,7 @@ static void StartNidorinoAnimSpriteSlideIn(struct Sprite * sprite, s16 x0, s16 x sprite->callback = SpriteCB_NidorinoAnimSpriteSlideIn; } -static void SpriteCB_NidorinoAnimSpriteSlideIn(struct Sprite * sprite) +static void SpriteCB_NidorinoAnimSpriteSlideIn(struct Sprite *sprite) { sprite->data[4]++; if (sprite->data[4] >= 40) @@ -2192,7 +2192,7 @@ static void FightScene4_NidorinoRearsUp(struct IntroSequenceData * ptr) ptr->nidorinoAnimSprite->callback = SpriteCB_NidorinoRearsUp; } -static void SpriteCB_NidorinoRearsUp(struct Sprite * sprite) +static void SpriteCB_NidorinoRearsUp(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -2244,7 +2244,7 @@ static void FightScene4_StartNidorinoRecoilAnim(struct IntroSequenceData * ptr) ptr->nidorinoAnimSprite->callback = SpriteCB_NidorinoRecoil; } -static void SpriteCB_NidorinoRecoil(struct Sprite * sprite) +static void SpriteCB_NidorinoRecoil(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -2326,7 +2326,7 @@ static void CreateNidorinoRecoilDustSprites(s16 x, s16 y, s16 seed) } } -static void SpriteCB_NidorinoRecoilDust(struct Sprite * sprite) +static void SpriteCB_NidorinoRecoilDust(struct Sprite *sprite) { s16 * data = sprite->data; @@ -2354,7 +2354,7 @@ static void SpriteCB_NidorinoRecoilDust(struct Sprite * sprite) } } -static void StartSpriteHopToPosAnim(struct Sprite * sprite, u16 a1, s16 a2, u8 a3) +static void StartSpriteHopToPosAnim(struct Sprite *sprite, u16 a1, s16 a2, u8 a3) { sprite->data[0] = 0; sprite->data[1] = a1; @@ -2368,7 +2368,7 @@ static void StartSpriteHopToPosAnim(struct Sprite * sprite, u16 a1, s16 a2, u8 a sprite->callback = SpriteCB_HopToPos; } -static void SpriteCB_HopToPos(struct Sprite * sprite) +static void SpriteCB_HopToPos(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -2434,7 +2434,7 @@ static void StartNidorinoAnim_LaunchSelfAtGengarAnim(struct IntroSequenceData * ptr->nidorinoAnimSprite->callback = SpriteCB_NidorinoAnim_LaunchSelfAtGengar; } -static void SpriteCB_NidorinoAnim_LaunchSelfAtGengar(struct Sprite * sprite) +static void SpriteCB_NidorinoAnim_LaunchSelfAtGengar(struct Sprite *sprite) { switch (sprite->data[0]) { diff --git a/src/item_menu.c b/src/item_menu.c index 31463f1e4..88ebd1e17 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -64,7 +64,7 @@ struct BagSlots EWRAM_DATA struct BagStruct gBagMenuState = {}; static EWRAM_DATA struct BagMenuAlloc * sBagMenuDisplay = NULL; -static EWRAM_DATA void * sBagBgTilemapBuffer = NULL; +static EWRAM_DATA void *sBagBgTilemapBuffer = NULL; static EWRAM_DATA struct ListMenuItem * sListMenuItems = NULL; static EWRAM_DATA u8 (*sListMenuItemStrings)[19] = NULL; static EWRAM_DATA u8 sContextMenuItemsBuffer[4] = {}; diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c index 4df80761f..09fe4675d 100644 --- a/src/item_menu_icons.c +++ b/src/item_menu_icons.c @@ -6,11 +6,11 @@ #include "constants/items.h" static EWRAM_DATA u8 sItemMenuIconSpriteIds[12] = {0}; -static EWRAM_DATA void * sItemIconTilesBuffer = NULL; -static EWRAM_DATA void * sItemIconTilesBufferPadded = NULL; +static EWRAM_DATA void *sItemIconTilesBuffer = NULL; +static EWRAM_DATA void *sItemIconTilesBufferPadded = NULL; -static void SpriteCB_BagVisualSwitchingPockets(struct Sprite * sprite); -static void SpriteCB_ShakeBagSprite(struct Sprite * sprite); +static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite); +static void SpriteCB_ShakeBagSprite(struct Sprite *sprite); static const struct OamData sOamData_BagOrSatchel = { .affineMode = ST_OAM_AFFINE_NORMAL, @@ -561,13 +561,13 @@ void CreateBagOrSatchelSprite(u8 animNum) void SetBagVisualPocketId(u8 animNum) { - struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]]; + struct Sprite *sprite = &gSprites[sItemMenuIconSpriteIds[0]]; sprite->y2 = -5; sprite->callback = SpriteCB_BagVisualSwitchingPockets; StartSpriteAnim(sprite, animNum); } -static void SpriteCB_BagVisualSwitchingPockets(struct Sprite * sprite) +static void SpriteCB_BagVisualSwitchingPockets(struct Sprite *sprite) { if (sprite->y2 != 0) sprite->y2++; @@ -577,7 +577,7 @@ static void SpriteCB_BagVisualSwitchingPockets(struct Sprite * sprite) void ShakeBagSprite(void) { - struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]]; + struct Sprite *sprite = &gSprites[sItemMenuIconSpriteIds[0]]; if (sprite->affineAnimEnded) { StartSpriteAffineAnim(sprite, 1); @@ -585,7 +585,7 @@ void ShakeBagSprite(void) } } -static void SpriteCB_ShakeBagSprite(struct Sprite * sprite) +static void SpriteCB_ShakeBagSprite(struct Sprite *sprite) { if (sprite->affineAnimEnded) { @@ -658,7 +658,7 @@ static bool8 TryAllocItemIconTilesBuffers(void) return TRUE; } -void CopyItemIconPicTo4x4Buffer(const void * src, void * dest) +void CopyItemIconPicTo4x4Buffer(const void *src, void *dest) { u8 i; @@ -760,7 +760,7 @@ void DestroyItemMenuIcon(u8 idx) } } -const void * GetItemIconGfxPtr(u16 itemId, u8 attrId) +const void *GetItemIconGfxPtr(u16 itemId, u8 attrId) { if (itemId > ITEM_N_A) itemId = ITEM_NONE; diff --git a/src/itemfinder.c b/src/itemfinder.c index 5627582be..8e8736bf1 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -28,11 +28,11 @@ static void Task_ItemfinderUnderfootDigUpItem(u8 taskId); static void DestroyArrowAndStarTiles(void); static void LoadArrowAndStarTiles(void); static void CreateArrowSprite(u8 animNum, u8 direction); -static void SpriteCallback_Arrow(struct Sprite * sprite); -static void SpriteCallback_DestroyArrow(struct Sprite * sprite); +static void SpriteCallback_Arrow(struct Sprite *sprite); +static void SpriteCallback_DestroyArrow(struct Sprite *sprite); static u8 CreateStarSprite(void); -static void SpriteCallback_Star(struct Sprite * sprite); -static void SpriteCallback_DestroyStar(struct Sprite * sprite); +static void SpriteCallback_Star(struct Sprite *sprite); +static void SpriteCallback_DestroyStar(struct Sprite *sprite); #define ARROW_TILE_TAG 2000 @@ -592,7 +592,7 @@ static void CreateArrowSprite(u8 animNum, u8 direction) } } -static void SpriteCallback_Arrow(struct Sprite * sprite) +static void SpriteCallback_Arrow(struct Sprite *sprite) { s16 x, y; sprite->spCurX += sprite->spDeltaX; @@ -606,7 +606,7 @@ static void SpriteCallback_Arrow(struct Sprite * sprite) sprite->callback = SpriteCallback_DestroyArrow; } -static void SpriteCallback_DestroyArrow(struct Sprite * sprite) +static void SpriteCallback_DestroyArrow(struct Sprite *sprite) { FreeSpriteOamMatrix(sprite); DestroySprite(sprite); @@ -629,7 +629,7 @@ static u8 CreateStarSprite(void) return spriteId; } -static void SpriteCallback_Star(struct Sprite * sprite) +static void SpriteCallback_Star(struct Sprite *sprite) { s16 x, y; sprite->spCurX += sprite->spDeltaX; @@ -643,7 +643,7 @@ static void SpriteCallback_Star(struct Sprite * sprite) sprite->callback = SpriteCallback_DestroyStar; } -static void SpriteCallback_DestroyStar(struct Sprite * sprite) +static void SpriteCallback_DestroyStar(struct Sprite *sprite) { DestroySprite(sprite); } diff --git a/src/learn_move.c b/src/learn_move.c index 9c00245fc..12fa40b65 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -159,7 +159,7 @@ static void MoveRelearnerStateMachine(void); static void DrawTextBorderOnWindows6and7(void); static void PrintTeachWhichMoveToStrVar1(bool8 onInit); static void InitMoveRelearnerStateVariables(void); -static void SpriteCB_ListMenuScrollIndicators(struct Sprite * sprite); +static void SpriteCB_ListMenuScrollIndicators(struct Sprite *sprite); static void SpawnListMenuScrollIndicatorSprites(void); static void MoveRelearnerInitListMenuBuffersEtc(void); static void MoveRelearnerMenuHandleInput(void); @@ -711,7 +711,7 @@ static void InitMoveRelearnerStateVariables(void) sMoveRelearner->learnableMoves[i] = MOVE_NONE; } -static void SpriteCB_ListMenuScrollIndicators(struct Sprite * sprite) +static void SpriteCB_ListMenuScrollIndicators(struct Sprite *sprite) { s16 abcissa = (sprite->data[1] * 10) & 0xFF; switch (sprite->data[0]) diff --git a/src/link_rfu_2.c b/src/link_rfu_2.c index 104125b7d..2cac8210a 100644 --- a/src/link_rfu_2.c +++ b/src/link_rfu_2.c @@ -61,7 +61,7 @@ static void UpdateChildStatuses(void); static s32 GetRfuRecvStatus(void); static void sub_80FA834(u8 taskId); static void ClearSelectedLinkPlayerIds(u16 disconnectMask); -static void ValidateAndReceivePokemonSioInfo(void * a0); +static void ValidateAndReceivePokemonSioInfo(void *a0); static void Task_ExchangeLinkPlayers(u8 taskId); static void sub_80FACF0(u8 taskId); static void GetLinkmanErrorParams(u32 msg); @@ -1220,7 +1220,7 @@ static void RfuPrepareSendBuffer(u16 command) } } -void Rfu_SendPacket(void * data) +void Rfu_SendPacket(void *data) { if (IsSendCmdComplete() && !RfuHasErrored()) { diff --git a/src/m4a_tables.c b/src/m4a_tables.c index 9a4ea32e6..55eae171f 100644 --- a/src/m4a_tables.c +++ b/src/m4a_tables.c @@ -3,7 +3,7 @@ // Some of these functions have different signatures, so we need to make this // an array of void pointers or a struct. It's simpler to just make it an array // for now. -void * const gMPlayJumpTableTemplate[] = +void *const gMPlayJumpTableTemplate[] = { ply_fine, ply_goto, diff --git a/src/mail.c b/src/mail.c index 0b77b5a2f..aae5b93a5 100644 --- a/src/mail.c +++ b/src/mail.c @@ -45,9 +45,9 @@ struct MailAttrStruct struct MailGfxData { - const void * pal; - const void * tiles; - const void * map; + const void *pal; + const void *tiles; + const void *map; u32 size; u16 textpals[2]; }; diff --git a/src/main_menu.c b/src/main_menu.c index 2959966a9..5c3b888a2 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -677,8 +677,8 @@ static void PrintBadgeCount(void) static void LoadUserFrameToBg(u8 bgId) { - LoadBgTiles(bgId, GetUserFrameGraphicsInfo(gSaveBlock2Ptr->optionsWindowFrameType)->tiles, 0x120, 0x1B1); - LoadPalette(GetUserFrameGraphicsInfo(gSaveBlock2Ptr->optionsWindowFrameType)->palette, 0x20, 0x20); + LoadBgTiles(bgId, GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->tiles, 0x120, 0x1B1); + LoadPalette(GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->palette, 0x20, 0x20); MainMenu_EraseWindow(&sWindowTemplate[MAIN_MENU_WINDOW_ERROR]); } diff --git a/src/mevent.c b/src/mevent.c index dde22bfd8..68b3cd610 100644 --- a/src/mevent.c +++ b/src/mevent.c @@ -75,7 +75,7 @@ struct MEvent_Str_1 sMEventSendToEReaderManager; static EWRAM_DATA bool32 sReceivedWonderCardIsValid = FALSE; -void SendUnknownSerialData_Init(struct MEvent_Str_1 *mgr, size_t size, const void * data) +void SendUnknownSerialData_Init(struct MEvent_Str_1 *mgr, size_t size, const void *data) { vu16 imeBak = REG_IME; REG_IME = 0; @@ -799,7 +799,7 @@ bool32 ValidateMEventClientHeader(const struct MEventClientHeaderStruct * data) return TRUE; } -u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused) +u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void *unused) { if (a1->id == 0) return 0; @@ -808,7 +808,7 @@ u32 sub_8144418(const u16 * a0, const struct MEventClientHeaderStruct * a1, void return 2; } -u32 MEvent_CanPlayerReceiveDistributionMon(const u16 * a0, const struct MEventClientHeaderStruct * a1, void * unused) +u32 MEvent_CanPlayerReceiveDistributionMon(const u16 * a0, const struct MEventClientHeaderStruct * a1, void *unused) { s32 numSpaces = a1->maxDistributionMons - CountReceivedDistributionMons(&a1->unk_20, a1->maxDistributionMons); if (numSpaces == 0) diff --git a/src/mevent_client.c b/src/mevent_client.c index 5346a4e82..3838558df 100644 --- a/src/mevent_client.c +++ b/src/mevent_client.c @@ -43,7 +43,7 @@ void mevent_client_inc_flag(void) s_mevent_client_ptr->flag++; } -void * mevent_client_get_buffer(void) +void *mevent_client_get_buffer(void) { return s_mevent_client_ptr->buffer; } diff --git a/src/mevent_server.c b/src/mevent_server.c index ea639314c..b304fa09b 100644 --- a/src/mevent_server.c +++ b/src/mevent_server.c @@ -41,7 +41,7 @@ u32 mevent_srv_common_do_exec(u16 * a0) return result; } -static void mevent_srv_init_common(struct mevent_srv_common * svr, const void * cmdBuffer, u32 sendPlayerNo, u32 recvPlayerNo) +static void mevent_srv_init_common(struct mevent_srv_common * svr, const void *cmdBuffer, u32 sendPlayerNo, u32 recvPlayerNo) { svr->unk_00 = 0; svr->mainseqno = 0; @@ -62,13 +62,13 @@ static void mevent_srv_free_resources(struct mevent_srv_common * svr) Free(svr->mevent_unk1442cc); } -static void mevent_srv_common_init_send(struct mevent_srv_common * svr, u32 ident, const void * src, u32 size) +static void mevent_srv_common_init_send(struct mevent_srv_common * svr, u32 ident, const void *src, u32 size) { AGB_ASSERT_EX(size <= ME_SEND_BUF_SIZE, ABSPATH("mevent_server.c"), 257); mevent_srv_sub_init_send(&svr->manager, ident, src, size); } -static void * mevent_first_if_not_null_else_second(void * a0, void * a1) +static void *mevent_first_if_not_null_else_second(void *a0, void *a1) { if (a0 != NULL) return a0; @@ -76,7 +76,7 @@ static void * mevent_first_if_not_null_else_second(void * a0, void * a1) return a1; } -static u32 mevent_compare_pointers(void * a0, void * a1) +static u32 mevent_compare_pointers(void *a0, void *a1) { if (a1 < a0) return 0; @@ -119,7 +119,7 @@ static u32 common_mainseq_4(struct mevent_srv_common * svr) { // process command const struct mevent_server_cmd * cmd = &svr->cmdBuffer[svr->cmdidx]; - void * ptr; + void *ptr; svr->cmdidx++; switch (cmd->instr) diff --git a/src/mevent_server_helpers.c b/src/mevent_server_helpers.c index 234064afc..33148d539 100644 --- a/src/mevent_server_helpers.c +++ b/src/mevent_server_helpers.c @@ -34,7 +34,7 @@ void mevent_srv_sub_init(struct mevent_srv_sub * svr, u32 sendPlayerNo, u32 recv svr->recvFunc = mevent_receive_func; } -void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void * src, u32 size) +void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void *src, u32 size) { svr->seqno = 0; svr->sendIdent = ident; @@ -47,7 +47,7 @@ void mevent_srv_sub_init_send(struct mevent_srv_sub * svr, u32 ident, const void svr->sendBfr = src; } -void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * dest) +void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void *dest) { svr->seqno = 0; svr->recvIdent = ident; @@ -57,7 +57,7 @@ void mevent_srv_sub_init_recv(struct mevent_srv_sub * svr, u32 ident, void * des svr->recvBfr = dest; } -static void mevent_recv_block(u32 recv_idx, void * dest, size_t size) +static void mevent_recv_block(u32 recv_idx, void *dest, size_t size) { memcpy(dest, gBlockRecvBuffer[recv_idx], size); } diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index 45048dea1..278a0c0de 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -9,7 +9,7 @@ static void Task_MinigameCountdown(u8 taskId); static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId); static void StartStartGraphic(u8 spriteId1, u8 spriteId2, u8 spriteId3); static bool32 IsStartGraphicAnimRunning(u8 spriteId); -static void SpriteCB_Start(struct Sprite * sprite); +static void SpriteCB_Start(struct Sprite *sprite); static void Load321StartGfx(u16 tilesTag, u16 palTag); static u8 CreateNumberSprite(u16 tilesTag, u16 palTag, s16 x, s16 y, u8 subpriority); static void CreateStartSprite(u16 tilesTag, u16 palTag, s16 x, s16 y, u8 subpriority, s16 * spriteId2_p, s16 * spriteId3_p); @@ -75,7 +75,7 @@ static void Task_MinigameCountdown(u8 taskId) static bool32 RunMinigameCountdownDigitsAnim(u8 spriteId) { - struct Sprite * sprite = &gSprites[spriteId]; + struct Sprite *sprite = &gSprites[spriteId]; switch (sprite->data[0]) { @@ -160,7 +160,7 @@ static bool32 IsStartGraphicAnimRunning(u8 spriteId) return gSprites[spriteId].callback == SpriteCB_Start; } -static void SpriteCB_Start(struct Sprite * sprite) +static void SpriteCB_Start(struct Sprite *sprite) { s16 * data = sprite->data; s32 y; diff --git a/src/mon_markings.c b/src/mon_markings.c index b9f1ebe96..d444538e5 100644 --- a/src/mon_markings.c +++ b/src/mon_markings.c @@ -5,510 +5,606 @@ #include "graphics.h" #include "constants/songs.h" -static EWRAM_DATA struct PokemonMarkMenu * sMenu = NULL; +#define ANIM_CURSOR (NUM_MON_MARKINGS * 2) +#define ANIM_TEXT (ANIM_CURSOR + 1) -static void CreateMonMarkingsMenuSprites(s16 x, s16 y, u16 tilesTag, u16 paletteTag); -static void nullsub_62(struct Sprite * sprite); -static void SpriteCB_MarkingIcon(struct Sprite * sprite); -static void SpriteCB_Cursor(struct Sprite * sprite); -static struct Sprite * CreateMonMarkingSprite(u16 tilesTag, u16 paletteTag, const u16 *palette, u16 size); +#define SELECTION_OK NUM_MON_MARKINGS +#define SELECTION_CANCEL (SELECTION_OK + 1) + +static void CreateMonMarkingsMenuSprites(s16, s16, u16, u16); +static void SpriteCB_Dummy(struct Sprite *); +static void SpriteCB_Marking(struct Sprite *); +static void SpriteCB_Cursor(struct Sprite *); +static struct Sprite *CreateMarkingComboSprite(u16, u16, const u16 *, u16); static const u16 sMonMarkingsPal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal"); -static const u16 sMonMarkingsTiles[] = INCBIN_U16("graphics/misc/mon_markings.4bpp"); +static const u16 sMonMarkings_Gfx[] = INCBIN_U16("graphics/misc/mon_markings.4bpp"); static const u8 sUnref_83EE828[] = {0x09, 0x50, 0x13, 0x02, 0xFF}; -static const struct OamData sOamData_64x64 = { - .shape = SPRITE_SHAPE(64x64), - .size = SPRITE_SIZE(64x64) -}; - -static const struct OamData sOamData_8x8 = { - .shape = SPRITE_SHAPE(8x8), - .size = SPRITE_SIZE(8x8) -}; - -static const union AnimCmd sAnimCmd_MenuMark_CircleOff[] = { - ANIMCMD_FRAME(0x0, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_CircleOn[] = { - ANIMCMD_FRAME(0x1, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_SquareOff[] = { - ANIMCMD_FRAME(0x2, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_SquareOn[] = { - ANIMCMD_FRAME(0x3, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_TriangleOff[] = { - ANIMCMD_FRAME(0x4, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_TriangleOn[] = { - ANIMCMD_FRAME(0x5, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_HeartOff[] = { - ANIMCMD_FRAME(0x6, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_HeartOn[] = { - ANIMCMD_FRAME(0x7, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_Cursor[] = { - ANIMCMD_FRAME(0x8, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MenuMark_Blank[] = { - ANIMCMD_FRAME(0x9, 5), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_MenuMark[] = { - sAnimCmd_MenuMark_CircleOff, - sAnimCmd_MenuMark_CircleOn, - sAnimCmd_MenuMark_SquareOff, - sAnimCmd_MenuMark_SquareOn, - sAnimCmd_MenuMark_TriangleOff, - sAnimCmd_MenuMark_TriangleOn, - sAnimCmd_MenuMark_HeartOff, - sAnimCmd_MenuMark_HeartOn, - sAnimCmd_MenuMark_Cursor, - sAnimCmd_MenuMark_Blank -}; - -static const union AnimCmd sAnimCmd_Frame_0[] = { - ANIMCMD_FRAME(0x0, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_Frame_1[] = { - ANIMCMD_FRAME(0x40, 5), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_Frame[] = { - sAnimCmd_Frame_0, - sAnimCmd_Frame_1 -}; - -static const struct OamData sOamData_32x8 = { - .shape = SPRITE_SHAPE(32x8), - .size = SPRITE_SIZE(32x8) -}; - -static const union AnimCmd sAnimCmd_MonMark_0000[] = { - ANIMCMD_FRAME(0x0, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1000[] = { - ANIMCMD_FRAME(0x4, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0100[] = { - ANIMCMD_FRAME(0x8, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1100[] = { - ANIMCMD_FRAME(0xc, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0010[] = { - ANIMCMD_FRAME(0x10, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1010[] = { - ANIMCMD_FRAME(0x14, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0110[] = { - ANIMCMD_FRAME(0x18, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1110[] = { - ANIMCMD_FRAME(0x1c, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0001[] = { - ANIMCMD_FRAME(0x20, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1001[] = { - ANIMCMD_FRAME(0x24, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0101[] = { - ANIMCMD_FRAME(0x28, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1101[] = { - ANIMCMD_FRAME(0x2c, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0011[] = { - ANIMCMD_FRAME(0x30, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1011[] = { - ANIMCMD_FRAME(0x34, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_0111[] = { - ANIMCMD_FRAME(0x38, 5), - ANIMCMD_END -}; - -static const union AnimCmd sAnimCmd_MonMark_1111[] = { - ANIMCMD_FRAME(0x3c, 5), - ANIMCMD_END -}; - -static const union AnimCmd *const sSpriteAnimTable_MonMarkSet[] = { - sAnimCmd_MonMark_0000, - sAnimCmd_MonMark_1000, - sAnimCmd_MonMark_0100, - sAnimCmd_MonMark_1100, - sAnimCmd_MonMark_0010, - sAnimCmd_MonMark_1010, - sAnimCmd_MonMark_0110, - sAnimCmd_MonMark_1110, - sAnimCmd_MonMark_0001, - sAnimCmd_MonMark_1001, - sAnimCmd_MonMark_0101, - sAnimCmd_MonMark_1101, - sAnimCmd_MonMark_0011, - sAnimCmd_MonMark_1011, - sAnimCmd_MonMark_0111, - sAnimCmd_MonMark_1111 -}; - -void SetMonMarkingsMenuPointer(struct PokemonMarkMenu * markMenu) +static const struct OamData sOamData_MenuWindow = { - sMenu = markMenu; + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(64x64), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +// Used for the markings, OK/Cancel text, and cursor sprites +static const struct OamData sOamData_8x8 = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x8), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(8x8), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sAnim_Marking_CircleOff[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_CircleOn[] = +{ + ANIMCMD_FRAME(1, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_SquareOff[] = +{ + ANIMCMD_FRAME(2, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_SquareOn[] = +{ + ANIMCMD_FRAME(3, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_TriangleOff[] = +{ + ANIMCMD_FRAME(4, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_TriangleOn[] = +{ + ANIMCMD_FRAME(5, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_HeartOff[] = +{ + ANIMCMD_FRAME(6, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Marking_HeartOn[] = +{ + ANIMCMD_FRAME(7, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_Cursor[] = +{ + ANIMCMD_FRAME(8, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_OKCancelText[] = +{ + ANIMCMD_FRAME(9, 5), + ANIMCMD_END, +}; + +static const union AnimCmd *const sAnims_MenuSprite[] = +{ + sAnim_Marking_CircleOff, + sAnim_Marking_CircleOn, + sAnim_Marking_SquareOff, + sAnim_Marking_SquareOn, + sAnim_Marking_TriangleOff, + sAnim_Marking_TriangleOn, + sAnim_Marking_HeartOff, + sAnim_Marking_HeartOn, + [ANIM_CURSOR] = sAnim_Cursor, + [ANIM_TEXT] = sAnim_OKCancelText, +}; + +static const union AnimCmd sAnim_MenuWindow_UpperHalf[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MenuWindow_LowerHalf[] = +{ + ANIMCMD_FRAME(64, 5), + ANIMCMD_END, +}; + +static const union AnimCmd *const sAnims_MenuWindow[] = +{ + sAnim_MenuWindow_UpperHalf, + sAnim_MenuWindow_LowerHalf, +}; + +static const struct OamData sOamData_MarkingCombo = +{ + .y = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(32x8), + .x = 0, + .matrixNum = 0, + .size = SPRITE_SIZE(32x8), + .tileNum = 0, + .priority = 0, + .paletteNum = 0, + .affineParam = 0, +}; + +static const union AnimCmd sAnim_MarkingCombo_AllOff[] = +{ + ANIMCMD_FRAME(0, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_Circle[] = +{ + ANIMCMD_FRAME(4, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_Square[] = +{ + ANIMCMD_FRAME(8, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleSquare[] = +{ + ANIMCMD_FRAME(12, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_Triangle[] = +{ + ANIMCMD_FRAME(16, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleTriangle[] = +{ + ANIMCMD_FRAME(20, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_SquareTriangle[] = +{ + ANIMCMD_FRAME(24, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleSquareTriangle[] = +{ + ANIMCMD_FRAME(28, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_Heart[] = +{ + ANIMCMD_FRAME(32, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleHeart[] = +{ + ANIMCMD_FRAME(36, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_SquareHeart[] = +{ + ANIMCMD_FRAME(40, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleSquareHeart[] = +{ + ANIMCMD_FRAME(44, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_TriangleHeart[] = +{ + ANIMCMD_FRAME(48, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_CircleTriangleHeart[] = +{ + ANIMCMD_FRAME(52, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_SquareTriangleHeart[] = +{ + ANIMCMD_FRAME(56, 5), + ANIMCMD_END, +}; + +static const union AnimCmd sAnim_MarkingCombo_AllOn[] = +{ + ANIMCMD_FRAME(60, 5), + ANIMCMD_END, +}; + +static const union AnimCmd *const sAnims_MarkingCombo[] = +{ + sAnim_MarkingCombo_AllOff, + sAnim_MarkingCombo_Circle, + sAnim_MarkingCombo_Square, + sAnim_MarkingCombo_CircleSquare, + sAnim_MarkingCombo_Triangle, + sAnim_MarkingCombo_CircleTriangle, + sAnim_MarkingCombo_SquareTriangle, + sAnim_MarkingCombo_CircleSquareTriangle, + sAnim_MarkingCombo_Heart, + sAnim_MarkingCombo_CircleHeart, + sAnim_MarkingCombo_SquareHeart, + sAnim_MarkingCombo_CircleSquareHeart, + sAnim_MarkingCombo_TriangleHeart, + sAnim_MarkingCombo_CircleTriangleHeart, + sAnim_MarkingCombo_SquareTriangleHeart, + sAnim_MarkingCombo_AllOn, +}; + +static EWRAM_DATA struct MonMarkingsMenu *sMenu = NULL; + +void InitMonMarkingsMenu(struct MonMarkingsMenu *ptr) +{ + sMenu = ptr; } -static void GetUserFrameForMonMarkings(void) +static void BufferMenuWindowTiles(void) { - const struct TextWindowGraphics * frame = GetUserFrameGraphicsInfo(gSaveBlock2Ptr->optionsWindowFrameType); + const struct TextWindowGraphics *frame = GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType); sMenu->frameTiles = frame->tiles; sMenu->framePalette = frame->palette; sMenu->tileLoadState = 0; - CpuFill16(0, sMenu->menuWindowSpriteTiles, sizeof(sMenu->menuWindowSpriteTiles)); + CpuFill16(0, sMenu->windowSpriteTiles, sizeof(sMenu->windowSpriteTiles)); } -static bool8 DoLoadMonMarkingsFrameGfx(void) +static bool8 BufferMenuFrameTiles(void) { u16 i; - u8 *menuWindowSpriteTiles = &sMenu->menuWindowSpriteTiles[256 * sMenu->tileLoadState]; + u8 *dest = sMenu->windowSpriteTiles + sMenu->tileLoadState * 0x100; + switch (sMenu->tileLoadState) { case 0: - CpuFastCopy(sMenu->frameTiles + 0x00, menuWindowSpriteTiles, 0x20); + CpuFastCopy(sMenu->frameTiles, dest, TILE_SIZE_4BPP); for (i = 0; i < 6; i++) - CpuFastCopy(sMenu->frameTiles + 0x20, menuWindowSpriteTiles + 0x20 * (i + 1), 0x20); - CpuFastCopy(sMenu->frameTiles + 0x40, menuWindowSpriteTiles + 0x20 * 7, 0x20); + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP); + + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 2, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP); sMenu->tileLoadState++; break; default: - CpuFastCopy(sMenu->frameTiles + 0x60, menuWindowSpriteTiles + 0x00, 0x20); + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 3, dest, TILE_SIZE_4BPP); for (i = 0; i < 6; i++) - CpuFastCopy(sMenu->frameTiles + 0x80, menuWindowSpriteTiles + 0x20 * (i + 1), 0x20); - CpuFastCopy(sMenu->frameTiles + 0xA0, menuWindowSpriteTiles + 0x20 * 7, 0x20); + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 4, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP); + + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 5, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP); sMenu->tileLoadState++; break; case 13: - CpuFastCopy(sMenu->frameTiles + 0xC0, menuWindowSpriteTiles + 0x00, 0x20); + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 6, dest, TILE_SIZE_4BPP); for (i = 0; i < 6; i++) - CpuFastCopy(sMenu->frameTiles + 0xE0, menuWindowSpriteTiles + 0x20 * (i + 1), 0x20); - CpuFastCopy(sMenu->frameTiles + 0x100, menuWindowSpriteTiles + 0x20 * 7, 0x20); + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 7, dest + TILE_SIZE_4BPP * (i + 1), TILE_SIZE_4BPP); + + CpuFastCopy(sMenu->frameTiles + TILE_SIZE_4BPP * 8, dest + TILE_SIZE_4BPP * 7, TILE_SIZE_4BPP); sMenu->tileLoadState++; return FALSE; case 14: return FALSE; } + return TRUE; } -void LoadMonMarkingsFrameGfx(void) +void BufferMonMarkingsMenuTiles(void) { - GetUserFrameForMonMarkings(); - while (DoLoadMonMarkingsFrameGfx()) - {} + BufferMenuWindowTiles(); + while (BufferMenuFrameTiles()); } -void DrawMonMarkingsMenu(u8 markings, s16 x, s16 y) +void OpenMonMarkingsMenu(u8 markings, s16 x, s16 y) { u16 i; sMenu->cursorPos = 0; sMenu->markings = markings; - for (i = 0; i < 4; i++) - { + for (i = 0; i < NUM_MON_MARKINGS; i++) sMenu->markingsArray[i] = (sMenu->markings >> i) & 1; - } - CreateMonMarkingsMenuSprites(x, y, sMenu->baseTileTag, sMenu->basePaletteTag);; + CreateMonMarkingsMenuSprites(x, y, sMenu->baseTileTag, sMenu->basePaletteTag); } -void TeardownMonMarkingsMenu(void) +void FreeMonMarkingsMenu(void) { u16 i; + for (i = 0; i < 3; i++) + { FreeSpriteTilesByTag(sMenu->baseTileTag + i); + } FreeSpritePaletteByTag(sMenu->basePaletteTag); FreeSpritePaletteByTag(sMenu->basePaletteTag + 1); - for (i = 0; i < 2; i++) + for (i = 0; i < ARRAY_COUNT(sMenu->windowSprites); i++) { - if (sMenu->menuWindowSprites[i] == NULL) + if (sMenu->windowSprites[i] == NULL) return; // break; - DestroySprite(sMenu->menuWindowSprites[i]); + DestroySprite(sMenu->windowSprites[i]); } - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_MON_MARKINGS; i++) { - if (sMenu->menuMarkingSprites[i] == NULL) + if (sMenu->markingSprites[i] == NULL) return; // break; - DestroySprite(sMenu->menuMarkingSprites[i]); + DestroySprite(sMenu->markingSprites[i]); } - if (sMenu->unkSprite != NULL) - DestroySprite(sMenu->unkSprite); - if (sMenu->menuTextSprite != NULL) - DestroySprite(sMenu->menuTextSprite); + if (sMenu->cursorSprite != NULL) + DestroySprite(sMenu->cursorSprite); + if (sMenu->textSprite != NULL) + DestroySprite(sMenu->textSprite); } -bool8 MonMarkingsHandleInput(void) +bool8 HandleMonMarkingsMenuInput(void) { u16 i; + if (JOY_NEW(DPAD_UP)) { + s8 pos; PlaySE(SE_SELECT); - if (--sMenu->cursorPos < 0) - sMenu->cursorPos = 5; + pos = --sMenu->cursorPos; + if (pos < 0) + sMenu->cursorPos = SELECTION_CANCEL; return TRUE; } + if (JOY_NEW(DPAD_DOWN)) { + s8 pos; PlaySE(SE_SELECT); - if (++sMenu->cursorPos > 5) + pos = ++sMenu->cursorPos; + if (pos > SELECTION_CANCEL) sMenu->cursorPos = 0; return TRUE; } + if (JOY_NEW(A_BUTTON)) { PlaySE(SE_SELECT); + switch (sMenu->cursorPos) { - case 4: + case SELECTION_OK: sMenu->markings = 0; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_MON_MARKINGS; i++) sMenu->markings |= sMenu->markingsArray[i] << i; return FALSE; - case 5: + case SELECTION_CANCEL: return FALSE; } - sMenu->markingsArray[sMenu->cursorPos] = sMenu->markingsArray[sMenu->cursorPos] ? FALSE : TRUE; + + sMenu->markingsArray[sMenu->cursorPos] = !sMenu->markingsArray[sMenu->cursorPos]; return TRUE; } + if (JOY_NEW(B_BUTTON)) { PlaySE(SE_SELECT); return FALSE; } + return TRUE; } -static void CreateMonMarkingsMenuSprites(s16 x, s16 y, u16 tilesTag, u16 paletteTag) +#define sMarkingId data[0] +#define sCursorYOffset data[0] + +static void CreateMonMarkingsMenuSprites(s16 x, s16 y, u16 baseTileTag, u16 basePaletteTag) { u16 i; u8 spriteId; - struct SpriteSheet sheets[] = { - { - .data = sMenu->menuWindowSpriteTiles, - .size = 0x1000, - .tag = tilesTag - }, { - .data = gUnknown_8E9CBBC, - .size = 0x320, - .tag = tilesTag + 1 - }, {} + + struct SpriteSheet sheets[] = + { + { sMenu->windowSpriteTiles, 0x1000, baseTileTag }, + { gMonMarkingsMenu_Gfx, 0x320, baseTileTag + 1 }, + {} }; - struct SpritePalette palettes[] = { - { - .data = sMenu->framePalette, - .tag = paletteTag - }, { - .data = gUnknown_8E9CB9C, - .tag = paletteTag + 1 - }, {} + + struct SpritePalette palettes[] = + { + { sMenu->framePalette, basePaletteTag }, + { gMonMarkingsMenu_Pal, basePaletteTag + 1}, + {} }; - struct SpriteTemplate sprTemplate = { - .tileTag = tilesTag, - .paletteTag = paletteTag, - .oam = &sOamData_64x64, - .anims = sSpriteAnimTable_Frame, + + struct SpriteTemplate template = + { + .tileTag = baseTileTag, + .paletteTag = basePaletteTag, + .oam = &sOamData_MenuWindow, + .anims = sAnims_MenuWindow, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = nullsub_62 + .callback = SpriteCB_Dummy, }; + LoadSpriteSheets(sheets); LoadSpritePalettes(palettes); - for (i = 0; i < 2; i++) + // Create window sprites + for (i = 0; i < ARRAY_COUNT(sMenu->windowSprites); i++) { - spriteId = CreateSprite(&sprTemplate, x + 32, y + 32, 1); + spriteId = CreateSprite(&template, x + 32, y + 32, 1); if (spriteId != MAX_SPRITES) { - sMenu->menuWindowSprites[i] = &gSprites[spriteId]; + sMenu->windowSprites[i] = &gSprites[spriteId]; StartSpriteAnim(&gSprites[spriteId], i); } else { - sMenu->menuWindowSprites[i] = NULL; + sMenu->windowSprites[i] = NULL; return; } } + sMenu->windowSprites[1]->y = y + 96; - sMenu->menuWindowSprites[1]->y = y + 96; - - sprTemplate.tileTag++; - sprTemplate.paletteTag++; - sprTemplate.anims = sSpriteAnimTable_MenuMark; - sprTemplate.callback = SpriteCB_MarkingIcon; - sprTemplate.oam = &sOamData_8x8; - - for (i = 0; i < 4; i++) + // Create marking sprites + template.tileTag++; + template.paletteTag++; + template.anims = sAnims_MenuSprite; + template.callback = SpriteCB_Marking; + template.oam = &sOamData_8x8; + for (i = 0; i < NUM_MON_MARKINGS; i++) { - spriteId = CreateSprite(&sprTemplate, x + 32, y + 16 + 16 * i, 0); + spriteId = CreateSprite(&template, x + 32, y + 16 + 16 * i, 0); if (spriteId != MAX_SPRITES) { - sMenu->menuMarkingSprites[i] = &gSprites[spriteId]; - gSprites[spriteId].data[0] = i; + sMenu->markingSprites[i] = &gSprites[spriteId]; + gSprites[spriteId].sMarkingId = i; } else { - sMenu->menuMarkingSprites[i] = NULL; + sMenu->markingSprites[i] = NULL; return; } } - sprTemplate.callback = SpriteCallbackDummy; - - spriteId = CreateSprite(&sprTemplate, 0, 0, 0); - + // Create OK/Cancel text sprite + template.callback = SpriteCallbackDummy; + spriteId = CreateSprite(&template, 0, 0, 0); if (spriteId != MAX_SPRITES) { - sMenu->menuTextSprite = &gSprites[spriteId]; - sMenu->menuTextSprite->oam.shape = ST_OAM_SQUARE; - sMenu->menuTextSprite->oam.size = 2; - StartSpriteAnim(sMenu->menuTextSprite, 9); - sMenu->menuTextSprite->x = x + 32; - sMenu->menuTextSprite->y = y + 80; - CalcCenterToCornerVec(sMenu->menuTextSprite, 1, 2, 0); + sMenu->textSprite = &gSprites[spriteId]; + sMenu->textSprite->oam.shape = SPRITE_SHAPE(32x32); + sMenu->textSprite->oam.size = SPRITE_SIZE(32x32); + StartSpriteAnim(sMenu->textSprite, ANIM_TEXT); + sMenu->textSprite->x = x + 32; + sMenu->textSprite->y = y + 80; + CalcCenterToCornerVec(sMenu->textSprite, SPRITE_SHAPE(32x16), SPRITE_SIZE(32x16), ST_OAM_AFFINE_OFF); } else { - sMenu->menuTextSprite = NULL; + sMenu->textSprite = NULL; } - sprTemplate.callback = SpriteCB_Cursor; - - spriteId = CreateSprite(&sprTemplate, x + 12, 0, 0); - + // Create cursor sprite + template.callback = SpriteCB_Cursor; + spriteId = CreateSprite(&template, x + 12, 0, 0); if (spriteId != MAX_SPRITES) { - sMenu->unkSprite = &gSprites[spriteId]; - sMenu->unkSprite->data[0] = y + 16; - StartSpriteAnim(sMenu->unkSprite, 8); + sMenu->cursorSprite = &gSprites[spriteId]; + sMenu->cursorSprite->sCursorYOffset = y + 16; + StartSpriteAnim(sMenu->cursorSprite, ANIM_CURSOR); } else { - sMenu->unkSprite = NULL; + sMenu->cursorSprite = NULL; } } -static void nullsub_62(struct Sprite * sprite) -{} - -static void SpriteCB_MarkingIcon(struct Sprite * sprite) +static void SpriteCB_Dummy(struct Sprite *sprite) { - if (sMenu->markingsArray[sprite->data[0]]) - StartSpriteAnim(sprite, 2 * sprite->data[0] + 1); +} + +static void SpriteCB_Marking(struct Sprite *sprite) +{ + if (sMenu->markingsArray[sprite->sMarkingId]) + StartSpriteAnim(sprite, 2 * sprite->sMarkingId + 1); // Set marking 'on' else - StartSpriteAnim(sprite, 2 * sprite->data[0] + 0); + StartSpriteAnim(sprite, 2 * sprite->sMarkingId); // Set marking 'off' } -static void SpriteCB_Cursor(struct Sprite * sprite) +#undef sMarkingId + +static void SpriteCB_Cursor(struct Sprite *sprite) { - sprite->y = 16 * sMenu->cursorPos + sprite->data[0]; + sprite->y = (16 * sMenu->cursorPos) + sprite->sCursorYOffset; } -struct Sprite * CreateMonMarkingSprite_SelectCombo(u16 tileTag, u16 paletteTag, const u16 *palette) +#undef sCursorYOffset + +// Creates a mon marking combination sprite with a spritesheet that holds every possible combination, used by the summary screen / Pokénav +struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, const u16 *palette) { if (palette == NULL) palette = sMonMarkingsPal; - return CreateMonMarkingSprite(tileTag, paletteTag, palette, 16); + return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1 << NUM_MON_MARKINGS); } -struct Sprite * CreateMonMarkingSprite_AllOff(u16 tileTag, u16 paletteTag, const u16 *palette) +// Creates a mon marking combination sprite with a spritesheet that holds only one combination, used for the currently selected PC mon +struct Sprite *CreateMonMarkingComboSprite(u16 tileTag, u16 paletteTag, const u16 *palette) { if (palette == NULL) palette = sMonMarkingsPal; - return CreateMonMarkingSprite(tileTag, paletteTag, palette, 1); + return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1); } -static struct Sprite * CreateMonMarkingSprite(u16 tileTag, u16 paletteTag, const u16 *palette, u16 size) +static struct Sprite *CreateMarkingComboSprite(u16 tileTag, u16 paletteTag, const u16 *palette, u16 size) { u8 spriteId; - struct SpriteTemplate sprTemplate; - struct SpriteSheet sheet = { sMonMarkingsTiles, 0x80, tileTag }; + struct SpriteTemplate template; + struct SpriteSheet sheet = { sMonMarkings_Gfx, 0x80, tileTag }; struct SpritePalette sprPalette = { palette, paletteTag }; - sprTemplate.tileTag = tileTag; - sprTemplate.paletteTag = paletteTag; - sprTemplate.oam = &sOamData_32x8; - sprTemplate.anims = sSpriteAnimTable_MonMarkSet; - sprTemplate.images = NULL; - sprTemplate.affineAnims = gDummySpriteAffineAnimTable; - sprTemplate.callback = nullsub_62; + template.tileTag = tileTag; + template.paletteTag = paletteTag; + template.oam = &sOamData_MarkingCombo; + template.anims = sAnims_MarkingCombo; + template.images = NULL; + template.affineAnims = gDummySpriteAffineAnimTable; + template.callback = SpriteCB_Dummy; sheet.size = size * 0x80; LoadSpriteSheet(&sheet); LoadSpritePalette(&sprPalette); - spriteId = CreateSprite(&sprTemplate, 0, 0, 0); + spriteId = CreateSprite(&template, 0, 0, 0); if (spriteId != MAX_SPRITES) return &gSprites[spriteId]; else return NULL; } -void RequestDma3LoadMonMarking(u8 markings, void * dest) +// Update what combination is shown, used for sprites created with CreateMonMarkingComboSprite +void UpdateMonMarkingTiles(u8 markings, void *dest) { - RequestDma3Copy(&sMonMarkingsTiles[64 * markings], dest, 0x80, DMA3_32BIT); + RequestDma3Copy(&sMonMarkings_Gfx[64 * markings], dest, 0x80, DMA3_32BIT); } diff --git a/src/naming_screen.c b/src/naming_screen.c index a3d15126f..8e7165469 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -139,9 +139,9 @@ static void Task_809E58C(u8 taskId); static u16 sub_809E644(u8 tag); static void sub_809E6B8(u8 a0); static void sub_809E6E0(struct Task * task, u8 a1, u8 a2); -static void sub_809E700(struct Sprite * sprite); -static void sub_809E7F0(struct Sprite * sprite); -static void sub_809E83C(struct Sprite * sprite); +static void sub_809E700(struct Sprite *sprite); +static void sub_809E7F0(struct Sprite *sprite); +static void sub_809E83C(struct Sprite *sprite); static void sub_809E898(void); static void CursorInit(void); static void SetCursorPos(s16 x, s16 y); @@ -153,11 +153,11 @@ static bool8 IsCursorAnimFinished(void); static u8 GetCurrentPageColumnCount(void); static void CreatePageSwitcherSprites(void); static void sub_809EC20(void); -static bool8 PageSwapSpritesCB_Init(struct Sprite * sprite); -static bool8 PageSwapSpritesCB_Idle(struct Sprite * sprite); -static bool8 PageSwapSpritesCB_SwapHide(struct Sprite * sprite); -static bool8 PageSwapSpritesCB_SwapShow(struct Sprite * sprite); -static void sub_809ED88(u8 a0, struct Sprite * spr1, struct Sprite * spr2); +static bool8 PageSwapSpritesCB_Init(struct Sprite *sprite); +static bool8 PageSwapSpritesCB_Idle(struct Sprite *sprite); +static bool8 PageSwapSpritesCB_SwapHide(struct Sprite *sprite); +static bool8 PageSwapSpritesCB_SwapShow(struct Sprite *sprite); +static void sub_809ED88(u8 a0, struct Sprite *spr1, struct Sprite *spr2); static void CreateBackOkSprites(void); static void CreateUnderscoreSprites(void); static void CreateInputTargetIcon(void); @@ -1163,7 +1163,7 @@ static void sub_809EC20(void) sprite->data[1] = sNamingScreenData->currentPage; } -static bool8 (*const sPageSwapSpritesCBs[])(struct Sprite * sprite) = { +static bool8 (*const sPageSwapSpritesCBs[])(struct Sprite *sprite) = { PageSwapSpritesCB_Init, PageSwapSpritesCB_Idle, PageSwapSpritesCB_SwapHide, @@ -1230,7 +1230,7 @@ static bool8 PageSwapSpritesCB_SwapShow(struct Sprite *sprite) static const u16 gUnknown_83E2388[] = {1, 3, 2}; static const u16 gUnknown_83E238E[] = {4, 6, 5}; -static void sub_809ED88(u8 page, struct Sprite * sprite1, struct Sprite * sprite2) +static void sub_809ED88(u8 page, struct Sprite *sprite1, struct Sprite *sprite2) { sprite2->oam.paletteNum = IndexOfSpritePaletteTag(gUnknown_83E2388[page]); sprite1->sheetTileStart = GetSpriteTileStartByTag(gUnknown_83E238E[page]); diff --git a/src/oak_speech.c b/src/oak_speech.c index b0e3e1a6f..4d0d23841 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -19,9 +19,9 @@ struct OakSpeechResources { - void * solidColorsGfx; - void * trainerPicTilemapBuffer; - void * unk_0008; + void *solidColorsGfx; + void *trainerPicTilemapBuffer; + void *unk_0008; u8 filler_000C[4]; u16 hasPlayerBeenNamed; u16 unk_0012; @@ -1639,7 +1639,7 @@ static void CreateNidoranFSprite(u8 taskId) gTasks[taskId].data[4] = spriteId; } -static void SpriteCB_PikaSync(struct Sprite * sprite) +static void SpriteCB_PikaSync(struct Sprite *sprite) { sprite->y2 = gSprites[sprite->data[0]].animCmdIndex; } diff --git a/src/option_menu.c b/src/option_menu.c index aefae3f52..42002795d 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -286,7 +286,7 @@ static void SetOptionMenuTask(void) static void InitOptionMenuBg(void) { - void * dest = (void *)VRAM; + void *dest = (void *)VRAM; DmaClearLarge16(3, dest, VRAM_SIZE, 0x1000); DmaClear32(3, (void *)OAM, OAM_SIZE); DmaClear16(3, (void *)PLTT, PLTT_SIZE); @@ -337,10 +337,10 @@ static bool8 LoadOptionMenuPalette(void) switch (sOptionMenuPtr->loadPaletteState) { case 0: - LoadBgTiles(1, GetUserFrameGraphicsInfo(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA); + LoadBgTiles(1, GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA); break; case 1: - LoadPalette(GetUserFrameGraphicsInfo(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20); + LoadPalette(GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20); break; case 2: LoadPalette(sOptionMenuPalette, 0x10, 0x20); @@ -381,8 +381,8 @@ static void Task_OptionMenu(u8 taskId) sOptionMenuPtr->loadState++; break; case 2: - LoadBgTiles(1, GetUserFrameGraphicsInfo(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA); - LoadPalette(GetUserFrameGraphicsInfo(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20); + LoadBgTiles(1, GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA); + LoadPalette(GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20); BufferOptionMenuString(sOptionMenuPtr->cursorPos); break; case 3: diff --git a/src/overworld.c b/src/overworld.c index a1b169e1f..e010de6b1 100644 --- a/src/overworld.c +++ b/src/overworld.c @@ -210,7 +210,7 @@ static void MovementStatusHandler_EnterFreeMode(struct LinkPlayerObjectEvent *, static void MovementStatusHandler_TryAdvanceScript(struct LinkPlayerObjectEvent *, struct ObjectEvent *); static u8 FlipVerticalAndClearForced(u8 newFacing, u8 oldFacing); static u8 LinkPlayerDetectCollision(u8 selfObjEventId, u8 a2, s16 x, s16 y); -static void SpriteCB_LinkPlayer(struct Sprite * sprite); +static void SpriteCB_LinkPlayer(struct Sprite *sprite); extern const struct MapLayout * gMapLayouts[]; extern const struct MapHeader *const *gMapGroups[]; diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 1e5768f5a..4b1e2df8c 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -941,7 +941,7 @@ void CB2_OpenPokedexFromStartMenu(void) SetHelpContext(HELPCONTEXT_POKEDEX); } -#define FREE_IF_NOT_NULL(ptr0) ({ void * ptr = (ptr0); if (ptr) Free(ptr); }) +#define FREE_IF_NOT_NULL(ptr0) ({ void *ptr = (ptr0); if (ptr) Free(ptr); }) bool8 DoClosePokedex(void) { diff --git a/src/pokemon_icon.c b/src/pokemon_icon.c index d9d2c4b6f..6385fe420 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon_icon.c @@ -17,7 +17,7 @@ struct MonIconSpriteTemplate }; static u8 CreateMonIconSprite(const struct MonIconSpriteTemplate * template, s16 x, s16 y, u8 subpriority); -static void DestroyMonIconInternal(struct Sprite * sprite); +static void DestroyMonIconInternal(struct Sprite *sprite); const u16 gMonIconPalettes[][16] = { INCBIN_U16("graphics/pokemon/icon_palettes/icon_palette_0.gbapal"), @@ -1118,7 +1118,7 @@ const u8 *GetMonIconPtr(u16 species, u32 personality, bool32 extra) return GetMonIconTiles(GetIconSpecies(species, personality), extra); } -void DestroyMonIcon(struct Sprite * sprite) +void DestroyMonIcon(struct Sprite *sprite) { DestroyMonIconInternal(sprite); } @@ -1171,7 +1171,7 @@ void FreeMonIconPalette(u16 species) FreeSpritePaletteByTag(gMonIconPaletteTable[palIndex].tag); } -void SpriteCB_MonIcon(struct Sprite * sprite) +void SpriteCB_MonIcon(struct Sprite *sprite) { UpdateMonIconFrame(sprite); } @@ -1208,7 +1208,7 @@ u8 GetMonIconPaletteIndexFromSpecies(u16 species) return gMonIconPaletteIndices[species]; } -u8 UpdateMonIconFrame(struct Sprite * sprite) +u8 UpdateMonIconFrame(struct Sprite *sprite) { u8 result = 0; @@ -1268,14 +1268,14 @@ static u8 CreateMonIconSprite(const struct MonIconSpriteTemplate * iconTemplate, return spriteId; } -static void DestroyMonIconInternal(struct Sprite * sprite) +static void DestroyMonIconInternal(struct Sprite *sprite) { struct SpriteFrameImage image = { NULL, sSpriteImageSizes[sprite->oam.shape][sprite->oam.size] }; sprite->images = ℑ DestroySprite(sprite); } -void SetPartyHPBarSprite(struct Sprite * sprite, u8 animNum) +void SetPartyHPBarSprite(struct Sprite *sprite, u8 animNum) { sprite->animNum = animNum; sprite->animDelayCounter = 0; diff --git a/src/pokemon_special_anim_scene.c b/src/pokemon_special_anim_scene.c index 8da24dd06..51fd15416 100644 --- a/src/pokemon_special_anim_scene.c +++ b/src/pokemon_special_anim_scene.c @@ -15,38 +15,38 @@ static void LoadBgGfxByAnimType(u16 animType); static void Task_ZoomAnim(u8 taskId); -static void SetSpriteWithCloseness(struct Sprite * sprite, u8 closeness); -static bool8 IsZoomSpriteCBActive(struct Sprite * sprite); -static void MonSpriteZoom_UpdateYPos(struct Sprite * sprite, u8 closeness); -static void ItemSpriteZoom_UpdateYPos(struct Sprite * sprite, u8 closeness); +static void SetSpriteWithCloseness(struct Sprite *sprite, u8 closeness); +static bool8 IsZoomSpriteCBActive(struct Sprite *sprite); +static void MonSpriteZoom_UpdateYPos(struct Sprite *sprite, u8 closeness); +static void ItemSpriteZoom_UpdateYPos(struct Sprite *sprite, u8 closeness); static void StartMonWiggleAnim(struct PokemonSpecialAnimScene * scene, u8 frameLen, u8 niter, u8 amplitude); static void StopMonWiggleAnim(struct PokemonSpecialAnimScene * scene); -static void SpriteCallback_MonSpriteWiggle(struct Sprite * sprite); +static void SpriteCallback_MonSpriteWiggle(struct Sprite *sprite); static void LoadMonSpriteGraphics(u16 *tilees, u16 *palette); -static struct Sprite * PSA_CreateItemIconObject(u16 itemId); +static struct Sprite *PSA_CreateItemIconObject(u16 itemId); static u16 GetBlendColorByItemId(u16 itemId); static void Task_ItemUseOnMonAnim(u8 taskId); -static void CreateSprites_UseItem_OutwardSpiralDots(u8 taskId, s16 *data, struct Sprite * sprite); -static void SpriteCB_OutwardSpiralDots(struct Sprite * sprite); -static void InitItemIconSpriteState(struct PokemonSpecialAnimScene * scene, struct Sprite * sprite, u8 closeness); +static void CreateSprites_UseItem_OutwardSpiralDots(u8 taskId, s16 *data, struct Sprite *sprite); +static void SpriteCB_OutwardSpiralDots(struct Sprite *sprite); +static void InitItemIconSpriteState(struct PokemonSpecialAnimScene * scene, struct Sprite *sprite, u8 closeness); static void MachineSetWobbleInit(void); -static void MachineSetWobble_SetCB(struct Sprite * sprite); +static void MachineSetWobble_SetCB(struct Sprite *sprite); static bool8 MachineSetWobbleCBIsRunning(void); -static void SpriteCB_MachineSetWobble(struct Sprite * sprite); +static void SpriteCB_MachineSetWobble(struct Sprite *sprite); static void StartZoomOutAnimForUseTM(u8 closeness); static void CreateStarSprites(struct PokemonSpecialAnimScene * scene); static bool8 AnyStarSpritesActive(void); -static void SpriteCB_Star(struct Sprite * sprite); +static void SpriteCB_Star(struct Sprite *sprite); static void PSAScene_SeedRandomInTask(struct PokemonSpecialAnimScene * scene); static void StopMakingOutwardSpiralDots(void); static void Task_UseItem_OutwardSpiralDots(u8 taskId); static u16 PSAScene_RandomFromTask(u8 taskId); -static void SpriteCallback_UseItem_OutwardSpiralDots(struct Sprite * sprite); +static void SpriteCallback_UseItem_OutwardSpiralDots(struct Sprite *sprite); static void LoadOutwardSpiralDotsGfx(void); static bool32 IsOutwardSpiralDotsTaskRunning(void); static void Task_LevelUpVerticalSprites(u8 taskId); static void CreateLevelUpVerticalSprite(u8 taskId, s16 *data); -static void SpriteCB_LevelUpVertical(struct Sprite * sprite); +static void SpriteCB_LevelUpVertical(struct Sprite *sprite); static const u16 sBgPals_PSA_Any[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845963C.gbapal"); static const u16 sBgPals_PSA_Anim4[] = INCBIN_U16("graphics/pokemon_special_anim/unk_845965C.gbapal"); @@ -642,9 +642,9 @@ void PSA_CreateMonSpriteAtCloseness(u8 closeness) u16 species = GetMonData(pokemon, MON_DATA_SPECIES); u32 personality = GetMonData(pokemon, MON_DATA_PERSONALITY); u8 r1 = Menu2_GetMonSpriteAnchorCoord(species, personality, 2); - void * r6; - void * r9; - void * r4; + void *r6; + void *r9; + void *r4; u8 spriteId; if (r1 != 0xFF) @@ -717,7 +717,7 @@ bool8 PSA_IsZoomTaskActive(void) static void Task_ZoomAnim(u8 taskId) { s16 *data = gTasks[taskId].data; - struct Sprite * sprite = (void *)GetWordTaskArg(taskId, tOff_MonSprite); + struct Sprite *sprite = (void *)GetWordTaskArg(taskId, tOff_MonSprite); switch (tState) { case 0: @@ -754,14 +754,14 @@ static void Task_ZoomAnim(u8 taskId) } } -static void SetSpriteWithCloseness(struct Sprite * sprite, u8 closeness) +static void SetSpriteWithCloseness(struct Sprite *sprite, u8 closeness) { sprite->data[0] = 0; sprite->data[1] = 0; sprite->data[2] = closeness; } -static bool8 IsZoomSpriteCBActive(struct Sprite * sprite) +static bool8 IsZoomSpriteCBActive(struct Sprite *sprite) { return sprite->callback != SpriteCallbackDummy; } @@ -779,7 +779,7 @@ static u16 GetYPosByScale(u16 pos) return v += scene->monSpriteY1; } -static void MonSpriteZoom_UpdateYPos(struct Sprite * sprite, u8 closeness) +static void MonSpriteZoom_UpdateYPos(struct Sprite *sprite, u8 closeness) { if (closeness > 3) closeness = 3; @@ -788,7 +788,7 @@ static void MonSpriteZoom_UpdateYPos(struct Sprite * sprite, u8 closeness) sprite->y = GetYPosByScale(sAffineScales[closeness]); } -static void ItemSpriteZoom_UpdateYPos(struct Sprite * sprite, u8 closeness) +static void ItemSpriteZoom_UpdateYPos(struct Sprite *sprite, u8 closeness) { MonSpriteZoom_UpdateYPos(sprite, closeness); sprite->x2 = GetSpriteOffsetByScale(sprite->data[6] - 32, closeness); @@ -811,7 +811,7 @@ static void StopMonWiggleAnim(struct PokemonSpecialAnimScene * scene) scene->monSprite->callback = SpriteCallbackDummy; } -static void SpriteCallback_MonSpriteWiggle(struct Sprite * sprite) +static void SpriteCallback_MonSpriteWiggle(struct Sprite *sprite) { sprite->data[7]++; if (sprite->data[7] > sprite->data[0]) @@ -901,10 +901,10 @@ void CreateItemIconSpriteAtMaxCloseness(u16 itemId) } } -static struct Sprite * PSA_CreateItemIconObject(u16 itemId) +static struct Sprite *PSA_CreateItemIconObject(u16 itemId) { u8 spriteId; - struct Sprite * sprite; + struct Sprite *sprite; spriteId = AddItemIconObject(1, 1, itemId); if (spriteId == MAX_SPRITES) return NULL; @@ -925,7 +925,7 @@ bool8 PSA_IsItemUseOnMonAnimActive(void) static void Task_ItemUseOnMonAnim(u8 taskId) { s16 *data = gTasks[taskId].data; - struct Sprite * sprite = (void *)GetWordTaskArg(taskId, tOff_ItemSprite); + struct Sprite *sprite = (void *)GetWordTaskArg(taskId, tOff_ItemSprite); switch (tState) { case 0: @@ -987,7 +987,7 @@ static void Task_ItemUseOnMonAnim(u8 taskId) } } -static void CreateSprites_UseItem_OutwardSpiralDots(u8 taskId, s16 *data, struct Sprite * sprite) +static void CreateSprites_UseItem_OutwardSpiralDots(u8 taskId, s16 *data, struct Sprite *sprite) { int x = sprite->x + sprite->x2 - 4; int y = sprite->y + sprite->y2 - 4; @@ -1008,7 +1008,7 @@ static void CreateSprites_UseItem_OutwardSpiralDots(u8 taskId, s16 *data, struct } } -static void SpriteCB_OutwardSpiralDots(struct Sprite * sprite) +static void SpriteCB_OutwardSpiralDots(struct Sprite *sprite) { s16 *data = sprite->data; if (data[0] < 16) @@ -1036,7 +1036,7 @@ void PSA_UseItem_CleanUpForCancel(void) } } -static void InitItemIconSpriteState(struct PokemonSpecialAnimScene * scene, struct Sprite * sprite, u8 closeness) +static void InitItemIconSpriteState(struct PokemonSpecialAnimScene * scene, struct Sprite *sprite, u8 closeness) { u16 species, x, y; u32 personality; @@ -1103,7 +1103,7 @@ static void MachineSetWobbleInit(void) MachineSetWobble_SetCB(scene->itemIconSprite); } -static void MachineSetWobble_SetCB(struct Sprite * sprite) +static void MachineSetWobble_SetCB(struct Sprite *sprite) { sprite->data[0] = 0; sprite->data[1] = 0; @@ -1116,7 +1116,7 @@ static bool8 MachineSetWobbleCBIsRunning(void) return scene->monSprite->callback != SpriteCallbackDummy; } -static void SpriteCB_MachineSetWobble(struct Sprite * sprite) +static void SpriteCB_MachineSetWobble(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -1206,7 +1206,7 @@ static u8 AnyStarSpritesActive(void) return PSA_GetSceneWork()->field_0002; } -static void SpriteCB_Star(struct Sprite * sprite) +static void SpriteCB_Star(struct Sprite *sprite) { sprite->data[0]++; if (sprite->data[0] < 10) @@ -1266,7 +1266,7 @@ static void Task_UseItem_OutwardSpiralDots(u8 taskId) if (tTimer == 0) { u32 spriteId, x, y, x2, y2, ampl; - struct Sprite * sprite = PSA_GetSceneWork()->itemIconSprite; + struct Sprite *sprite = PSA_GetSceneWork()->itemIconSprite; x = sprite->x + sprite->x2; y = sprite->y + sprite->y2; ampl = (PSAScene_RandomFromTask(taskId) % 21) + 70; @@ -1308,7 +1308,7 @@ static u16 PSAScene_RandomFromTask(u8 taskId) return state >> 16; } -static void SpriteCallback_UseItem_OutwardSpiralDots(struct Sprite * sprite) +static void SpriteCallback_UseItem_OutwardSpiralDots(struct Sprite *sprite) { int x; int y; @@ -1448,7 +1448,7 @@ static void CreateLevelUpVerticalSprite(u8 taskId, s16 *data) } } -static void SpriteCB_LevelUpVertical(struct Sprite * sprite) +static void SpriteCB_LevelUpVertical(struct Sprite *sprite) { sprite->tsYsubpixel -= sprite->tsSpeed; sprite->y2 = sprite->tsYsubpixel >> 4; diff --git a/src/pokemon_storage_system_2.c b/src/pokemon_storage_system_2.c index 60c22aa3e..3bb940566 100644 --- a/src/pokemon_storage_system_2.c +++ b/src/pokemon_storage_system_2.c @@ -15,14 +15,18 @@ #include "constants/field_weather.h" #include "constants/help_system.h" -struct PSS_MenuStringPtrs -{ - const u8 *text; - const u8 *desc; +// PC main menu options +enum { + OPTION_WITHDRAW, + OPTION_DEPOSIT, + OPTION_MOVE_MONS, + OPTION_MOVE_ITEMS, + OPTION_EXIT, + OPTIONS_COUNT }; static EWRAM_DATA u8 sPreviousBoxOption = 0; -static EWRAM_DATA struct UnkPSSStruct_2002370 *sBoxSelectionPopupSpriteManager = NULL; +static EWRAM_DATA struct ChooseBoxMenu *sBoxSelectionPopupSpriteManager = NULL; static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr); static void sub_808C9C4(u8 curBox); @@ -31,7 +35,7 @@ static void UpdateBoxNameAndCountSprite_WraparoundRight(void); static void UpdateBoxNameAndCountSprite_WraparoundLeft(void); static void PrintBoxNameAndCountToSprite(void); static void PrintToSpriteWithTagUnk0240(const u8 *a0, u16 x, u16 y); -static void sub_808CD64(struct Sprite * sprite); +static void sub_808CD64(struct Sprite *sprite); // Forward declarations @@ -39,12 +43,15 @@ static const u16 sBoxSelectionPopupPalette[]; static const u16 sBoxSelectionPopupCenterTiles[]; static const u16 sBoxSelectionPopupSidesTiles[]; -static const struct PSS_MenuStringPtrs sUnknown_83CDA20[] = { - {gText_WithdrawPokemon, gText_WithdrawMonDescription}, - {gText_DepositPokemon, gText_DepositMonDescription }, - {gText_MovePokemon, gText_MoveMonDescription }, - {gText_MoveItems, gText_MoveItemsDescription }, - {gText_SeeYa, gText_SeeYaDescription } +struct { + const u8 *text; + const u8 *desc; +} static const sMainMenuTexts[OPTIONS_COUNT] = { + [OPTION_WITHDRAW] = {gText_WithdrawPokemon, gText_WithdrawMonDescription}, + [OPTION_DEPOSIT] = {gText_DepositPokemon, gText_DepositMonDescription}, + [OPTION_MOVE_MONS] = {gText_MovePokemon, gText_MoveMonDescription}, + [OPTION_MOVE_ITEMS] = {gText_MoveItems, gText_MoveItemsDescription}, + [OPTION_EXIT] = {gText_SeeYa, gText_SeeYaDescription} }; void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero2, u8 *buffer, s32 bytesToBuffer) @@ -60,7 +67,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero windowId = AddWindow(&winTemplate); FillWindowPixelBuffer(windowId, PIXEL_FILL(zero2)); tileData1 = (u8 *)GetWindowAttribute(windowId, WINDOW_TILE_DATA); - tileData2 = (winTemplate.width * 32) + tileData1; + tileData2 = (winTemplate.width * TILE_SIZE_4BPP) + tileData1; if (!zero1) txtColor[0] = TEXT_COLOR_TRANSPARENT; @@ -223,7 +230,8 @@ static void sub_808C25C(u16 *dest, u16 dest_left, u16 dest_top, const u16 *src, } } -static void sub_808C2D8(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 height) +// Unused +static void UnusedWriteRectDma(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 height) { u16 i; @@ -233,109 +241,138 @@ static void sub_808C2D8(u16 *dest, u16 dest_left, u16 dest_top, u16 width, u16 h Dma3FillLarge16_(0, dest, width); } -static void Task_PokemonStorageSystemPC(u8 taskId) + +//------------------------------------------------------------------------------ +// SECTION: Main menu +// +// The below functions generally handle the PC main menu where the main +// options can be selected (Withdraw, Deposit, etc.), as well as exiting +// Pokémon Storage back to this menu. +//------------------------------------------------------------------------------ + + +enum { + STATE_LOAD, + STATE_FADE_IN, + STATE_HANDLE_INPUT, + STATE_ERROR_MSG, + STATE_ENTER_PC, +}; + +#define tState data[0] +#define tSelectedOption data[1] +#define tInput data[2] +#define tNextOption data[3] +#define tWindowId data[15] + +static void Task_PCMainMenu(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { - case 0: + case STATE_LOAD: SetHelpContext(HELPCONTEXT_BILLS_PC); - PSS_CreatePCMenu(task->data[1], &task->data[15]); + PSS_CreatePCMenu(task->tSelectedOption, &task->tWindowId); LoadStdWindowFrameGfx(); - DrawDialogueFrame(0, 0); + DrawDialogueFrame(0, FALSE); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, TEXT_SKIP_DRAW, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); - CopyWindowToVram(task->data[15], COPYWIN_FULL); - task->data[0]++; + CopyWindowToVram(task->tWindowId, COPYWIN_FULL); + task->tState++; break; - case 1: + case STATE_FADE_IN: if (IsWeatherNotFadingIn()) { - task->data[0]++; + task->tState++; } break; - case 2: - task->data[2] = Menu_ProcessInput(); - switch(task->data[2]) + case STATE_HANDLE_INPUT: + task->tInput = Menu_ProcessInput(); + switch(task->tInput) { case MENU_NOTHING_CHOSEN: - task->data[3] = task->data[1]; - if (JOY_NEW(DPAD_UP) && --task->data[3] < 0) - task->data[3] = 4; + task->tNextOption = task->tSelectedOption; + if (JOY_NEW(DPAD_UP) && --task->tNextOption < 0) + task->tNextOption = OPTIONS_COUNT - 1; + if (JOY_NEW(DPAD_DOWN) && ++task->tNextOption > OPTIONS_COUNT - 1) + task->tNextOption = 0; - if (JOY_NEW(DPAD_DOWN) && ++task->data[3] > 4) - task->data[3] = 0; - if (task->data[1] != task->data[3]) + if (task->tSelectedOption != task->tNextOption) { - task->data[1] = task->data[3]; + task->tSelectedOption = task->tNextOption; FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } break; case MENU_B_PRESSED: - case 4: + case OPTION_EXIT: ClearStdWindowAndFrame(0, TRUE); - ClearStdWindowAndFrame(task->data[15], TRUE); + ClearStdWindowAndFrame(task->tWindowId, TRUE); ScriptContext2_Disable(); EnableBothScriptContexts(); DestroyTask(taskId); break; default: - if (task->data[2] == 0 && CountPartyMons() == PARTY_SIZE) + if (task->tInput == 0 && CountPartyMons() == PARTY_SIZE) { + // Can't withdraw FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 2, gText_PartyFull, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - task->data[0] = 3; + task->tState = 3; } - else if (task->data[2] == 1 && CountPartyMons() == 1) + else if (task->tInput == 1 && CountPartyMons() == 1) { + // Can't deposit FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, 2, gText_JustOnePkmn, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - task->data[0] = 3; + task->tState = STATE_ERROR_MSG; } else { + // Enter PC FadeScreen(FADE_TO_BLACK, 0); - task->data[0] = 4; + task->tState = STATE_ENTER_PC; } break; } break; - case 3: + case STATE_ERROR_MSG: + // Printed "can't do PC option message" + // Wait for new input after message if (JOY_NEW(A_BUTTON | B_BUTTON)) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - task->data[0] = 2; + AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_UP)) { - if (--task->data[1] < 0) - task->data[1] = 4; + if (--task->tSelectedOption < 0) + task->tSelectedOption = 4; Menu_MoveCursor(-1); - task->data[1] = Menu_GetCursorPos(); + task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - task->data[0] = 2; + AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_DOWN)) { - if (++task->data[1] > 3) - task->data[1] = 0; + if (++task->tSelectedOption > 3) + task->tSelectedOption = 0; Menu_MoveCursor(1); - task->data[1] = Menu_GetCursorPos(); + task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sUnknown_83CDA20[task->data[1]].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); - task->data[0] = 2; + AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + task->tState = STATE_HANDLE_INPUT; } break; - case 4: + case STATE_ENTER_PC: if (!gPaletteFade.active) { CleanupOverworldWindowsAndTilemaps(); - Cb2_EnterPSS(task->data[2]); + Cb2_EnterPSS(task->tInput); DestroyTask(taskId); } break; @@ -344,22 +381,22 @@ static void Task_PokemonStorageSystemPC(u8 taskId) void ShowPokemonStorageSystemPC(void) { - u8 taskId = CreateTask(Task_PokemonStorageSystemPC, 80); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = 0; + u8 taskId = CreateTask(Task_PCMainMenu, 80); + gTasks[taskId].tState = 0; + gTasks[taskId].tSelectedOption = 0; ScriptContext2_Enable(); } -static void FieldCb_ReturnToPcMenu(void) +static void FieldTask_ReturnToPcMenu(void) { u8 taskId; MainCallback vblankCb = gMain.vblankCallback; SetVBlankCallback(NULL); - taskId = CreateTask(Task_PokemonStorageSystemPC, 80); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = sPreviousBoxOption; - Task_PokemonStorageSystemPC(taskId); + taskId = CreateTask(Task_PCMainMenu, 80); + gTasks[taskId].tState = 0; + gTasks[taskId].tSelectedOption = sPreviousBoxOption; + Task_PCMainMenu(taskId); SetVBlankCallback(vblankCb); FadeInFromBlack(); } @@ -380,15 +417,15 @@ static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr) windowId = AddWindow(&sUnknown_83CDA48); DrawStdWindowFrame(windowId, FALSE); - PrintTextArray(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, NELEMS(sUnknown_83CDA20), (void *)sUnknown_83CDA20); - Menu_InitCursor(windowId, 2, 0, 2, 16, NELEMS(sUnknown_83CDA20), whichMenu); + PrintTextArray(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, NELEMS(sMainMenuTexts), (void *)sMainMenuTexts); + Menu_InitCursor(windowId, 2, 0, 2, 16, NELEMS(sMainMenuTexts), whichMenu); *windowIdPtr = windowId; } -void Cb2_ExitPSS(void) +void CB2_ExitPokeStorage(void) { sPreviousBoxOption = GetCurrentBoxOption(); - gFieldCallback = FieldCb_ReturnToPcMenu; + gFieldCallback = FieldTask_ReturnToPcMenu; SetMainCallback2(CB2_ReturnToField); } @@ -407,13 +444,22 @@ void ResetPokemonStorageSystem(void) u8 *dest = StringCopy(GetBoxNamePtr(boxId), gText_Box); ConvertIntToDecimalStringN(dest, boxId + 1, STR_CONV_MODE_LEFT_ALIGN, 2); } + for (boxId = 0; boxId < TOTAL_BOXES_COUNT; boxId++) - { - SetBoxWallpaper(boxId, boxId % 4); - } + SetBoxWallpaper(boxId, boxId % (MAX_DEFAULT_WALLPAPER + 1)); } -void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal) + +//------------------------------------------------------------------------------ +// SECTION: Choose Box menu +// +// The below functions handle the popup menu that allows the player to cycle +// through the boxes and select one. Used when storing Pokémon in Deposit mode +// and for the Jump feature. +//------------------------------------------------------------------------------ + + +void LoadChooseBoxMenuGfx(struct ChooseBoxMenu *a0, u16 tileTag, u16 palTag, u8 a3, bool32 loadPal) { struct SpritePalette palette = { sBoxSelectionPopupPalette, palTag @@ -429,18 +475,18 @@ void LoadBoxSelectionPopupSpriteGfx(struct UnkPSSStruct_2002370 *a0, u16 tileTag LoadSpriteSheets(sheets); sBoxSelectionPopupSpriteManager = a0; - a0->tilesTag = tileTag; + a0->tileTag = tileTag; a0->paletteTag = palTag; a0->subpriority = a3; - a0->loadPal = loadPal; + a0->loadedPalette = loadPal; } void FreeBoxSelectionPopupSpriteGfx(void) { - if (sBoxSelectionPopupSpriteManager->loadPal) + if (sBoxSelectionPopupSpriteManager->loadedPalette) FreeSpritePaletteByTag(sBoxSelectionPopupSpriteManager->paletteTag); - FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tilesTag); - FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tilesTag + 1); + FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tileTag); + FreeSpriteTilesByTag(sBoxSelectionPopupSpriteManager->tileTag + 1); } void sub_808C940(u8 curBox) @@ -529,43 +575,43 @@ static void sub_808C9C4(u8 curBox) const u8 gUnknown_83CDA94[] = _("/30"); sBoxSelectionPopupSpriteManager->curBox = curBox; - template.tileTag = sBoxSelectionPopupSpriteManager->tilesTag; + template.tileTag = sBoxSelectionPopupSpriteManager->tileTag; template.paletteTag = sBoxSelectionPopupSpriteManager->paletteTag; spriteId = CreateSprite(&template, 160, 96, 0); - sBoxSelectionPopupSpriteManager->unk_0000 = gSprites + spriteId; + sBoxSelectionPopupSpriteManager->menuSprite = gSprites + spriteId; // Manual subsprites oamData.shape = SPRITE_SHAPE(8x32); oamData.size = SPRITE_SIZE(8x32); - template.tileTag = sBoxSelectionPopupSpriteManager->tilesTag + 1; + template.tileTag = sBoxSelectionPopupSpriteManager->tileTag + 1; template.anims = gUnknown_83CDA70; for (i = 0; i < 4; i++) { u16 r5; spriteId = CreateSprite(&template, 124, 80, sBoxSelectionPopupSpriteManager->subpriority); - sBoxSelectionPopupSpriteManager->unk_0004[i] = gSprites + spriteId; + sBoxSelectionPopupSpriteManager->menuSideSprites[i] = gSprites + spriteId; r5 = 0; if (i & 2) { - sBoxSelectionPopupSpriteManager->unk_0004[i]->x = 196; + sBoxSelectionPopupSpriteManager->menuSideSprites[i]->x = 196; r5 = 2; } if (i & 1) { - sBoxSelectionPopupSpriteManager->unk_0004[i]->y = 112; - sBoxSelectionPopupSpriteManager->unk_0004[i]->oam.size = SPRITE_SIZE(8x16); + sBoxSelectionPopupSpriteManager->menuSideSprites[i]->y = 112; + sBoxSelectionPopupSpriteManager->menuSideSprites[i]->oam.size = SPRITE_SIZE(8x16); r5++; } - StartSpriteAnim(sBoxSelectionPopupSpriteManager->unk_0004[i], r5); + StartSpriteAnim(sBoxSelectionPopupSpriteManager->menuSideSprites[i], r5); } for (i = 0; i < 2; i++) { - sBoxSelectionPopupSpriteManager->unk_0020[i] = sub_809223C(72 * i + 0x7c, 0x58, i, 0, sBoxSelectionPopupSpriteManager->subpriority); - if (sBoxSelectionPopupSpriteManager->unk_0020[i]) + sBoxSelectionPopupSpriteManager->arrowSprites[i] = sub_809223C(72 * i + 0x7c, 0x58, i, 0, sBoxSelectionPopupSpriteManager->subpriority); + if (sBoxSelectionPopupSpriteManager->arrowSprites[i]) { - sBoxSelectionPopupSpriteManager->unk_0020[i]->data[0] = (i == 0 ? -1 : 1); - sBoxSelectionPopupSpriteManager->unk_0020[i]->callback = sub_808CD64; + sBoxSelectionPopupSpriteManager->arrowSprites[i]->data[0] = (i == 0 ? -1 : 1); + sBoxSelectionPopupSpriteManager->arrowSprites[i]->callback = sub_808CD64; } } PrintBoxNameAndCountToSprite(); @@ -576,23 +622,23 @@ static void sub_808C9C4(u8 curBox) static void sub_808CBA4(void) { u16 i; - if (sBoxSelectionPopupSpriteManager->unk_0000) + if (sBoxSelectionPopupSpriteManager->menuSprite) { - DestroySprite(sBoxSelectionPopupSpriteManager->unk_0000); - sBoxSelectionPopupSpriteManager->unk_0000 = NULL; + DestroySprite(sBoxSelectionPopupSpriteManager->menuSprite); + sBoxSelectionPopupSpriteManager->menuSprite = NULL; } for (i = 0; i < 4; i++) { - if (sBoxSelectionPopupSpriteManager->unk_0004[i]) + if (sBoxSelectionPopupSpriteManager->menuSideSprites[i]) { - DestroySprite(sBoxSelectionPopupSpriteManager->unk_0004[i]); - sBoxSelectionPopupSpriteManager->unk_0004[i] = NULL; + DestroySprite(sBoxSelectionPopupSpriteManager->menuSideSprites[i]); + sBoxSelectionPopupSpriteManager->menuSideSprites[i] = NULL; } } for (i = 0; i < 2; i++) { - if (sBoxSelectionPopupSpriteManager->unk_0020[i]) - DestroySprite(sBoxSelectionPopupSpriteManager->unk_0020[i]); + if (sBoxSelectionPopupSpriteManager->arrowSprites[i]) + DestroySprite(sBoxSelectionPopupSpriteManager->arrowSprites[i]); } } @@ -627,7 +673,7 @@ static void PrintBoxNameAndCountToSprite(void) static void PrintToSpriteWithTagUnk0240(const u8 *str, u16 x, u16 y) { - u16 tileStart = GetSpriteTileStartByTag(sBoxSelectionPopupSpriteManager->tilesTag); + u16 tileStart = GetSpriteTileStartByTag(sBoxSelectionPopupSpriteManager->tileTag); PrintStringToBufferCopyNow(str, (void *)(OBJ_VRAM0 + tileStart * 32 + 256 * y + 32 * x), 0x100, TEXT_COLOR_RED, TEXT_DYNAMIC_COLOR_6, TEXT_DYNAMIC_COLOR_5, sBoxSelectionPopupSpriteManager->buffer); } diff --git a/src/pokemon_storage_system_3.c b/src/pokemon_storage_system_3.c index 9c6543eae..fdcd726fb 100644 --- a/src/pokemon_storage_system_3.c +++ b/src/pokemon_storage_system_3.c @@ -76,7 +76,7 @@ static void PSS_CreateMonMarkingSprite(void); static void CreateWaveformSprites(void); static void RefreshCursorMonData(void); static void BoxSetMosaic(void); -static void SpriteCB_CursorMon_Mosaic(struct Sprite * sprite); +static void SpriteCB_CursorMon_Mosaic(struct Sprite *sprite); static bool8 BoxGetMosaic(void); static void LoadCursorMonSprite(void); static void LoadCursorMonGfx(u16 species, u32 pid); @@ -370,7 +370,7 @@ void Cb2_EnterPSS(u8 boxOption) sCurrentBoxOption = boxOption; gPSSData = Alloc(sizeof(struct PokemonStorageSystemData)); if (gPSSData == NULL) - SetMainCallback2(Cb2_ExitPSS); + SetMainCallback2(CB2_ExitPokeStorage); else { gPSSData->boxOption = boxOption; @@ -389,7 +389,7 @@ void Cb2_ReturnToPSS(void) ResetTasks(); gPSSData = Alloc(sizeof(struct PokemonStorageSystemData)); if (gPSSData == NULL) - SetMainCallback2(Cb2_ExitPSS); + SetMainCallback2(CB2_ExitPokeStorage); else { gPSSData->boxOption = sCurrentBoxOption; @@ -421,13 +421,13 @@ static void sub_808CF10(void) FreeAllSpritePalettes(); ClearDma3Requests(); gReservedSpriteTileCount = 0x280; - sub_8096BE4(&gPSSData->unk_0020, gPSSData->unk_0028, 8); + sub_8096BE4(&gPSSData->unkUtil, gPSSData->unkUtilData, 8); gKeyRepeatStartDelay = 20; ClearScheduledBgCopiesToVram(); AllocBoxPartyPokemonDropdowns(3); SetBoxPartyPokemonDropdownMap2(0, 1, gUnknown_83CE6F8, 8, 4); SetBoxPartyPokemonDropdownMap2Pos(0, 1, 0); - gPSSData->unk_02C7 = FALSE; + gPSSData->closeBoxFlashing = FALSE; } static void sub_808CF94(void) @@ -531,10 +531,10 @@ static void Cb_InitPSS(u8 taskId) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) { - gPSSData->field_DA4.baseTileTag = TAG_TILE_D; - gPSSData->field_DA4.basePaletteTag = TAG_PAL_DACE; - SetMonMarkingsMenuPointer(&gPSSData->field_DA4); - LoadMonMarkingsFrameGfx(); + gPSSData->markMenu.baseTileTag = TAG_TILE_D; + gPSSData->markMenu.basePaletteTag = TAG_PAL_DACE; + InitMonMarkingsMenu(&gPSSData->markMenu); + BufferMonMarkingsMenuTiles(); } else { @@ -622,7 +622,7 @@ static void Cb_MainPSS(u8 taskId) case 6: if (gPSSData->boxOption == BOX_OPTION_MOVE_MONS) { - if (IsMonBeingMoved() && ItemIsMail(gPSSData->cursorMonItem)) + if (IsMonBeingMoved() && ItemIsMail(gPSSData->displayMonItemId)) gPSSData->state = 5; else SetPSSCallback(Cb_HidePartyPokemon); @@ -680,7 +680,7 @@ static void Cb_MainPSS(u8 taskId) case 11: if (!CanMovePartyMon()) { - if (ItemIsMail(gPSSData->cursorMonItem)) + if (ItemIsMail(gPSSData->displayMonItemId)) { gPSSData->state = 5; } @@ -911,7 +911,7 @@ static void Cb_OnSelectedMon(u8 taskId) PlaySE(SE_SELECT); if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) PrintStorageActionText(PC_TEXT_IS_SELECTED); - else if (IsActiveItemMoving() || gPSSData->cursorMonItem != 0) + else if (IsActiveItemMoving() || gPSSData->displayMonItemId != 0) PrintStorageActionText(PC_TEXT_IS_SELECTED2); else PrintStorageActionText(PC_TEXT_GIVE_TO_MON); @@ -971,7 +971,7 @@ static void Cb_OnSelectedMon(u8 taskId) { gPSSData->state = 3; } - else if (ItemIsMail(gPSSData->cursorMonItem)) + else if (ItemIsMail(gPSSData->displayMonItemId)) { gPSSData->state = 4; } @@ -987,11 +987,11 @@ static void Cb_OnSelectedMon(u8 taskId) { gPSSData->state = 3; } - else if (gPSSData->cursorMonIsEgg) + else if (gPSSData->displayMonIsEgg) { gPSSData->state = 5; // Cannot release an Egg. } - else if (ItemIsMail(gPSSData->cursorMonItem)) + else if (ItemIsMail(gPSSData->displayMonItemId)) { gPSSData->state = 4; } @@ -1177,7 +1177,7 @@ static void Cb_DepositMenu(u8 taskId) { case 0: PrintStorageActionText(PC_TEXT_DEPOSIT_IN_WHICH_BOX); - LoadBoxSelectionPopupSpriteGfx(&gPSSData->field_1E5C, TAG_TILE_A, TAG_PAL_DAC7, 3, FALSE); + LoadChooseBoxMenuGfx(&gPSSData->field_1E5C, TAG_TILE_A, TAG_PAL_DAC7, 3, FALSE); sub_808C940(gUnknown_20397B6); gPSSData->state++; break; @@ -1372,16 +1372,16 @@ static void Cb_ShowMarkMenu(u8 taskId) { case 0: PrintStorageActionText(PC_TEXT_MARK_POKE); - gPSSData->field_DA4.markings = gPSSData->cursorMonMarkings; - DrawMonMarkingsMenu(gPSSData->cursorMonMarkings, 0xb0, 0x10); + gPSSData->markMenu.markings = gPSSData->displayMonMarkings; + OpenMonMarkingsMenu(gPSSData->displayMonMarkings, 0xb0, 0x10); gPSSData->state++; break; case 1: - if (!MonMarkingsHandleInput()) + if (!HandleMonMarkingsMenuInput()) { - TeardownMonMarkingsMenu(); + FreeMonMarkingsMenu(); ClearBottomWindow(); - SetMonMarkings(gPSSData->field_DA4.markings); + SetMonMarkings(gPSSData->markMenu.markings); RefreshCursorMonData(); SetPSSCallback(Cb_MainPSS); } @@ -1394,7 +1394,7 @@ static void Cb_TakeItemForMoving(u8 taskId) switch (gPSSData->state) { case 0: - if (!ItemIsMail(gPSSData->cursorMonItem)) + if (!ItemIsMail(gPSSData->displayMonItemId)) { ClearBottomWindow(); gPSSData->state++; @@ -1468,7 +1468,7 @@ static void Cb_ItemToBag(u8 taskId) switch (gPSSData->state) { case 0: - if (!AddBagItem(gPSSData->cursorMonItem, 1)) + if (!AddBagItem(gPSSData->displayMonItemId, 1)) { PlaySE(SE_FAILURE); PrintStorageActionText(PC_TEXT_BAG_FULL); @@ -1516,7 +1516,7 @@ static void Cb_SwitchSelectedItem(u8 taskId) switch (gPSSData->state) { case 0: - if (!ItemIsMail(gPSSData->cursorMonItem)) + if (!ItemIsMail(gPSSData->displayMonItemId)) { ClearBottomWindow(); gPSSData->state++; @@ -1814,7 +1814,7 @@ static void Cb_JumpBox(u8 taskId) { case 0: PrintStorageActionText(PC_TEXT_JUMP_TO_WHICH_BOX); - LoadBoxSelectionPopupSpriteGfx(&gPSSData->field_1E5C, TAG_TILE_A, TAG_PAL_DAC7, 3, FALSE); + LoadChooseBoxMenuGfx(&gPSSData->field_1E5C, TAG_TILE_A, TAG_PAL_DAC7, 3, FALSE); sub_808C940(StorageGetCurrentBox()); gPSSData->state++; break; @@ -2051,7 +2051,7 @@ static void Cb_ChangeScreen(u8 taskId) case SCREEN_CHANGE_EXIT_BOX: default: FreePSSData(); - SetMainCallback2(Cb2_ExitPSS); + SetMainCallback2(CB2_ExitPokeStorage); break; case SCREEN_CHANGE_SUMMARY_SCREEN: partyMon = gPSSData->field_218C.mon; @@ -2163,12 +2163,12 @@ static void sub_808F078(void) static void PSS_CreateMonMarkingSprite(void) { - gPSSData->monMarkingSprite = CreateMonMarkingSprite_AllOff(TAG_TILE_10, TAG_PAL_DAC8, NULL); - gPSSData->monMarkingSprite->oam.priority = 1; - gPSSData->monMarkingSprite->subpriority = 1; - gPSSData->monMarkingSprite->x = 40; - gPSSData->monMarkingSprite->y = 150; - gPSSData->monMarkingSpriteTileStart = (void *)OBJ_VRAM0 + 32 * GetSpriteTileStartByTag(TAG_TILE_10); + gPSSData->markingComboSprite = CreateMonMarkingComboSprite(TAG_TILE_10, TAG_PAL_DAC8, NULL); + gPSSData->markingComboSprite->oam.priority = 1; + gPSSData->markingComboSprite->subpriority = 1; + gPSSData->markingComboSprite->x = 40; + gPSSData->markingComboSprite->y = 150; + gPSSData->markingComboTilesPtr = (void *)OBJ_VRAM0 + 32 * GetSpriteTileStartByTag(TAG_TILE_10); } static void CreateWaveformSprites(void) @@ -2180,13 +2180,13 @@ static void CreateWaveformSprites(void) for (i = 0; i < 2; i++) { u8 spriteId = CreateSprite(&sSpriteTemplate_Waveform, i * 63 + 8, 9, 2); - gPSSData->field_D98[i] = &gSprites[spriteId]; + gPSSData->waveformSprites[i] = &gSprites[spriteId]; } } static void RefreshCursorMonData(void) { - LoadCursorMonGfx(gPSSData->cursorMonSpecies, gPSSData->cursorMonPersonality); + LoadCursorMonGfx(gPSSData->displayMonSpecies, gPSSData->displayMonPersonality); PrintCursorMonInfo(); sub_808F5E8(); ScheduleBgCopyTilemapToVram(0); @@ -2274,7 +2274,7 @@ static void LoadCursorMonGfx(u16 species, u32 pid) if (species != SPECIES_NONE) { HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gPSSData->field_22C4, species, pid); - LZ77UnCompWram(gPSSData->cursorMonPalette, gPSSData->field_2244); + LZ77UnCompWram(gPSSData->displayMonPalette, gPSSData->field_2244); CpuCopy32(gPSSData->field_22C4, gPSSData->field_223C, 0x800); LoadPalette(gPSSData->field_2244, gPSSData->field_223A, 0x20); gPSSData->cursorMonSprite->invisible = FALSE; @@ -2294,28 +2294,28 @@ static void PrintCursorMonInfo(void) { for (i = 0, y = 0; i < 3; i++, y += 14) { - AddTextPrinterParameterized(0, 2, gPSSData->cursorMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, 2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); } - AddTextPrinterParameterized(0, 0, gPSSData->cursorMonTexts[3], 6, y + 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, 0, gPSSData->displayMonTexts[3], 6, y + 2, TEXT_SKIP_DRAW, NULL); } else { - AddTextPrinterParameterized(0, 0, gPSSData->cursorMonTexts[3], 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, 0, gPSSData->displayMonTexts[3], 6, 0, TEXT_SKIP_DRAW, NULL); for (i = 0, y = 15; i < 3; i++, y += 14) { - AddTextPrinterParameterized(0, 2, gPSSData->cursorMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, 2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); } } CopyWindowToVram(0, COPYWIN_GFX); - if (gPSSData->cursorMonSpecies != SPECIES_NONE) + if (gPSSData->displayMonSpecies != SPECIES_NONE) { - RequestDma3LoadMonMarking(gPSSData->cursorMonMarkings, gPSSData->monMarkingSpriteTileStart); - gPSSData->monMarkingSprite->invisible = FALSE; + UpdateMonMarkingTiles(gPSSData->displayMonMarkings, gPSSData->markingComboTilesPtr); + gPSSData->markingComboSprite->invisible = FALSE; } else { - gPSSData->monMarkingSprite->invisible = TRUE; + gPSSData->markingComboSprite->invisible = TRUE; } } @@ -2323,17 +2323,17 @@ static void sub_808F5E8(void) { u16 i; - if (gPSSData->cursorMonSpecies != SPECIES_NONE) + if (gPSSData->displayMonSpecies != SPECIES_NONE) { SetBoxPartyPokemonDropdownMap2Rect(0, 0, 0, 8, 2); for (i = 0; i < 2; i++) - StartSpriteAnimIfDifferent(gPSSData->field_D98[i], i * 2 + 1); + StartSpriteAnimIfDifferent(gPSSData->waveformSprites[i], i * 2 + 1); } else { SetBoxPartyPokemonDropdownMap2Rect(0, 0, 2, 8, 2); for (i = 0; i < 2; i++) - StartSpriteAnim(gPSSData->field_D98[i], i * 2); + StartSpriteAnim(gPSSData->waveformSprites[i], i * 2); } CopyBoxPartyPokemonDropdownToBgTilemapBuffer(0); @@ -2342,9 +2342,9 @@ static void sub_808F5E8(void) static void sub_808F68C(void) { - LZ77UnCompWram(gUnknown_8E9CAEC, gPSSData->field_B0); + LZ77UnCompWram(gUnknown_8E9CAEC, gPSSData->partyMenuTilemapBuffer); LoadPalette(gPSSMenu_Pal, 0x10, 0x20); - SetBoxPartyPokemonDropdownMap2(1, 1, gPSSData->field_B0, 12, 22); + SetBoxPartyPokemonDropdownMap2(1, 1, gPSSData->partyMenuTilemapBuffer, 12, 22); SetBoxPartyPokemonDropdownMap2(2, 1, gUnknown_83CE778, 9, 4); SetBoxPartyPokemonDropdownMap2Pos(1, 10, 0); SetBoxPartyPokemonDropdownMap2Pos(2, 21, 0); @@ -2365,29 +2365,29 @@ static void sub_808F68C(void) } ScheduleBgCopyTilemapToVram(1); - gPSSData->unk_02C7 = FALSE; + gPSSData->closeBoxFlashing = FALSE; } static void SetUpShowPartyMenu(void) { - gPSSData->field_2C0 = 20; - gPSSData->field_2C2 = 2; - gPSSData->field_2C5 = 0; + gPSSData->partyMenuUnused1 = 20; + gPSSData->partyMenuY = 2; + gPSSData->partyMenuMoveTimer = 0; CreatePartyMonsSprites(FALSE); } static bool8 ShowPartyMenu(void) { - if (gPSSData->field_2C5 == 20) + if (gPSSData->partyMenuMoveTimer == 20) return FALSE; - gPSSData->field_2C0--; - gPSSData->field_2C2++; + gPSSData->partyMenuUnused1--; + gPSSData->partyMenuY++; AdjustBoxPartyPokemonDropdownPos(1, 3, 1); CopyBoxPartyPokemonDropdownToBgTilemapBuffer(1); ScheduleBgCopyTilemapToVram(1); sub_8090B98(8); - if (++gPSSData->field_2C5 == 20) + if (++gPSSData->partyMenuMoveTimer == 20) { sInPartyMenu = TRUE; return FALSE; @@ -2400,24 +2400,24 @@ static bool8 ShowPartyMenu(void) static void SetUpHidePartyMenu(void) { - gPSSData->field_2C0 = 0; - gPSSData->field_2C2 = 22; - gPSSData->field_2C5 = 0; + gPSSData->partyMenuUnused1 = 0; + gPSSData->partyMenuY = 22; + gPSSData->partyMenuMoveTimer = 0; if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) sub_80960C0(); } static bool8 HidePartyMenu(void) { - if (gPSSData->field_2C5 != 20) + if (gPSSData->partyMenuMoveTimer != 20) { - gPSSData->field_2C0++; - gPSSData->field_2C2--; + gPSSData->partyMenuUnused1++; + gPSSData->partyMenuY--; AdjustBoxPartyPokemonDropdownPos(1, 3, -1); CopyBoxPartyPokemonDropdownToBgTilemapBuffer(1); - FillBgTilemapBufferRect_Palette0(1, 0x100, 10, gPSSData->field_2C2, 12, 1); + FillBgTilemapBufferRect_Palette0(1, 0x100, 10, gPSSData->partyMenuY, 12, 1); sub_8090B98(-8); - if (++gPSSData->field_2C5 != 20) + if (++gPSSData->partyMenuMoveTimer != 20) { ScheduleBgCopyTilemapToVram(1); return TRUE; @@ -2450,27 +2450,27 @@ static void sub_808F90C(bool8 arg0) static void sub_808F948(void) { - gPSSData->unk_02C7 = TRUE; - gPSSData->unk_02C8 = 30; - gPSSData->unk_02C9 = TRUE; + gPSSData->closeBoxFlashing = TRUE; + gPSSData->closeBoxFlashTimer = 30; + gPSSData->closeBoxFlashState = TRUE; } static void sub_808F974(void) { - if (gPSSData->unk_02C7) + if (gPSSData->closeBoxFlashing) { - gPSSData->unk_02C7 = FALSE; + gPSSData->closeBoxFlashing = FALSE; sub_808F90C(TRUE); } } static void sub_808F99C(void) { - if (gPSSData->unk_02C7 && ++gPSSData->unk_02C8 > 30) + if (gPSSData->closeBoxFlashing && ++gPSSData->closeBoxFlashTimer > 30) { - gPSSData->unk_02C8 = 0; - gPSSData->unk_02C9 = (gPSSData->unk_02C9 == FALSE); - sub_808F90C(gPSSData->unk_02C9); + gPSSData->closeBoxFlashTimer = 0; + gPSSData->closeBoxFlashState = (gPSSData->closeBoxFlashState == FALSE); + sub_808F90C(gPSSData->closeBoxFlashState); } } @@ -2502,7 +2502,7 @@ static void sub_808FA30(u8 pos, bool8 isPartyMon) { for (j = 0; j < 4; j++) { - gPSSData->field_B0[index + j] = data[j]; + gPSSData->partyMenuTilemapBuffer[index + j] = data[j]; } data += 4; index += 12; @@ -2569,7 +2569,7 @@ static void PrintStorageActionText(u8 id) case PC_TEXT_FMT_MON_NAME_1: case PC_TEXT_FMT_MON_NAME_2: case PC_TEXT_FMT_MON_NAME_3: - DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gPSSData->cursorMonNick); + DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, gPSSData->displayMonName); break; case PC_TEXT_FMT_MON_NAME_4: case PC_TEXT_FMT_MON_NAME_5: @@ -2580,7 +2580,7 @@ static void PrintStorageActionText(u8 id) if (IsActiveItemMoving()) txtPtr = StringCopy(gPSSData->itemName, GetMovingItemName()); else - txtPtr = StringCopy(gPSSData->itemName, gPSSData->cursorMonTexts[3]); + txtPtr = StringCopy(gPSSData->itemName, gPSSData->displayMonTexts[3]); while (*(txtPtr - 1) == CHAR_SPACE) txtPtr--; @@ -2680,7 +2680,7 @@ static void sub_808FE54(u8 action) { u16 event; u8 fromBox = sub_8094D34(); - u16 species = gPSSData->cursorMonSpecies; + u16 species = gPSSData->displayMonSpecies; u16 species2; u8 toBox; struct PssQuestLogBuffer * qlogBuffer; diff --git a/src/pokemon_storage_system_4.c b/src/pokemon_storage_system_4.c index 4a1b99ece..9041c277a 100644 --- a/src/pokemon_storage_system_4.c +++ b/src/pokemon_storage_system_4.c @@ -9,12 +9,12 @@ #include "task.h" #include "trig.h" -static void sub_8090324(struct Sprite * sprite); +static void sub_8090324(struct Sprite *sprite); static void SetBoxSpeciesAndPersonalities(u8 boxId); -static void sub_8090A74(struct Sprite * sprite, u16 idx); -static void sub_8090AE0(struct Sprite * sprite); -static void DestroyBoxMonIcon(struct Sprite * sprite); -static void sub_80911B0(struct Sprite * sprite); +static void sub_8090A74(struct Sprite *sprite, u16 idx); +static void sub_8090AE0(struct Sprite *sprite); +static void DestroyBoxMonIcon(struct Sprite *sprite); +static void sub_80911B0(struct Sprite *sprite); static void sub_8091420(u8 taskId); static s8 sub_80916F4(u8 boxId); static void LoadWallpaperGfx(u8 wallpaperId, s8 direction); @@ -23,15 +23,15 @@ static void sub_8091984(void *buffer, const void *buffer2, s8 direction, u8 base static void sub_8091A24(void *buffer); static void sub_8091A94(u8 wallpaperId); static void sub_8091C48(u8 wallpaperId, s8 direction); -static void sub_8091E84(struct Sprite * sprite); -static void sub_8091EB8(struct Sprite * sprite); +static void sub_8091E84(struct Sprite *sprite); +static void sub_8091EB8(struct Sprite *sprite); static s16 sub_8091F60(const u8 *boxName); static void sub_8091E34(void); static void sub_8091EF0(void); static void sub_8091F80(void); static void sub_809200C(s8 direction); static void sub_80920AC(void); -static void sub_8092164(struct Sprite * sprite); +static void sub_8092164(struct Sprite *sprite); static const struct OamData gUnknown_83CEC08; @@ -259,16 +259,16 @@ void sub_808FFAC(void) LoadMonIconPalettes(); for (i = 0; i < MAX_MON_ICONS; i++) - gPSSData->field_B08[i] = 0; + gPSSData->numIconsPerSpecies[i] = 0; for (i = 0; i < MAX_MON_ICONS; i++) - gPSSData->field_B58[i] = 0; + gPSSData->iconSpeciesList[i] = 0; for (i = 0; i < PARTY_SIZE; i++) gPSSData->partySprites[i] = NULL; for (i = 0; i < IN_BOX_COUNT; i++) gPSSData->boxMonsSprites[i] = NULL; gPSSData->movingMonSprite = NULL; - gPSSData->field_78C = 0; + gPSSData->unkUnused1 = 0; } static u8 sub_8090058(void) @@ -364,7 +364,7 @@ static void sub_80902E0(struct Sprite *sprite) } else { - gPSSData->field_C66--; + gPSSData->iconScrollNumIncoming--; sprite->x = sprite->data[3]; sprite->callback = SpriteCallbackDummy; } @@ -448,7 +448,7 @@ static u8 sub_80903A4(u8 row, u16 times, s16 xDelta) gPSSData->boxMonsSprites[boxPosition]->data[2] = xDelta; gPSSData->boxMonsSprites[boxPosition]->data[3] = xDest; gPSSData->boxMonsSprites[boxPosition]->callback = sub_80902E0; - if (GetBoxMonDataAt(gPSSData->field_C5C, boxPosition, MON_DATA_HELD_ITEM) == 0) + if (GetBoxMonDataAt(gPSSData->incomingBoxId, boxPosition, MON_DATA_HELD_ITEM) == 0) gPSSData->boxMonsSprites[boxPosition]->oam.objMode = ST_OAM_OBJ_BLEND; count++; } @@ -463,56 +463,56 @@ static u8 sub_80903A4(u8 row, u16 times, s16 xDelta) static void sub_8090574(u8 boxId, s8 direction) { - gPSSData->field_C6A = 0; - gPSSData->field_C6B = boxId; - gPSSData->field_C69 = direction; - gPSSData->field_C60 = 32; - gPSSData->field_C64 = -(6 * direction); - gPSSData->field_C66 = 0; + gPSSData->iconScrollState = 0; + gPSSData->iconScrollToBoxId = boxId; + gPSSData->iconScrollDirection = direction; + gPSSData->iconScrollDistance = 32; + gPSSData->iconScrollSpeed = -(6 * direction); + gPSSData->iconScrollNumIncoming = 0; SetBoxSpeciesAndPersonalities(boxId); if (direction > 0) - gPSSData->field_C68 = 0; + gPSSData->iconScrollCurColumn = 0; else - gPSSData->field_C68 = IN_BOX_ROWS - 1; + gPSSData->iconScrollCurColumn = IN_BOX_ROWS - 1; - gPSSData->field_C62 = (24 * gPSSData->field_C68) + 100; - sub_809029C(gPSSData->field_C64); + gPSSData->iconScrollPos = (24 * gPSSData->iconScrollCurColumn) + 100; + sub_809029C(gPSSData->iconScrollSpeed); } static bool8 sub_809062C(void) { - if (gPSSData->field_C60 != 0) - gPSSData->field_C60--; + if (gPSSData->iconScrollDistance != 0) + gPSSData->iconScrollDistance--; - switch (gPSSData->field_C6A) + switch (gPSSData->iconScrollState) { case 0: - gPSSData->field_C62 += gPSSData->field_C64; - if (gPSSData->field_C62 <= 64 || gPSSData->field_C62 >= 252) + gPSSData->iconScrollPos += gPSSData->iconScrollSpeed; + if (gPSSData->iconScrollPos <= 64 || gPSSData->iconScrollPos >= 252) { - DestroyAllIconsInRow(gPSSData->field_C68); - gPSSData->field_C62 += gPSSData->field_C69 * 24; - gPSSData->field_C6A++; + DestroyAllIconsInRow(gPSSData->iconScrollCurColumn); + gPSSData->iconScrollPos += gPSSData->iconScrollDirection * 24; + gPSSData->iconScrollState++; } break; case 1: - gPSSData->field_C62 += gPSSData->field_C64; - gPSSData->field_C66 += sub_80903A4(gPSSData->field_C68, gPSSData->field_C60, gPSSData->field_C64); - if ((gPSSData->field_C69 > 0 && gPSSData->field_C68 == IN_BOX_ROWS - 1) - || (gPSSData->field_C69 < 0 && gPSSData->field_C68 == 0)) + gPSSData->iconScrollPos += gPSSData->iconScrollSpeed; + gPSSData->iconScrollNumIncoming += sub_80903A4(gPSSData->iconScrollCurColumn, gPSSData->iconScrollDistance, gPSSData->iconScrollSpeed); + if ((gPSSData->iconScrollDirection > 0 && gPSSData->iconScrollCurColumn == IN_BOX_ROWS - 1) + || (gPSSData->iconScrollDirection < 0 && gPSSData->iconScrollCurColumn == 0)) { - gPSSData->field_C6A++; + gPSSData->iconScrollState++; } else { - gPSSData->field_C68 += gPSSData->field_C69; - gPSSData->field_C6A = 0; + gPSSData->iconScrollCurColumn += gPSSData->iconScrollDirection; + gPSSData->iconScrollState = 0; } break; case 2: - if (gPSSData->field_C66 == 0) + if (gPSSData->iconScrollNumIncoming == 0) { - gPSSData->field_C60++; + gPSSData->iconScrollDistance++; return FALSE; } break; @@ -539,7 +539,7 @@ static void SetBoxSpeciesAndPersonalities(u8 boxId) } } - gPSSData->field_C5C = boxId; + gPSSData->incomingBoxId = boxId; } void DestroyBoxMonIconAtPosition(u8 boxPosition) @@ -605,7 +605,7 @@ void sub_80909F4(void) { u16 i, count; - gPSSData->field_C5E = 0; + gPSSData->numPartyToCompact = 0; for (i = 0, count = 0; i < PARTY_SIZE; i++) { if (gPSSData->partySprites[i] != NULL) @@ -614,7 +614,7 @@ void sub_80909F4(void) { sub_8090A74(gPSSData->partySprites[i], count); gPSSData->partySprites[i] = NULL; - gPSSData->field_C5E++; + gPSSData->numPartyToCompact++; } count++; } @@ -623,7 +623,7 @@ void sub_80909F4(void) u8 sub_8090A60(void) { - return gPSSData->field_C5E; + return gPSSData->numPartyToCompact; } static void sub_8090A74(struct Sprite *sprite, u16 partyId) @@ -668,7 +668,7 @@ static void sub_8090AE0(struct Sprite *sprite) } sprite->callback = SpriteCallbackDummy; gPSSData->partySprites[sprite->data[1]] = sprite; - gPSSData->field_C5E--; + gPSSData->numPartyToCompact--; } } @@ -774,44 +774,44 @@ void sub_8090D58(u8 boxId, u8 position) void sub_8090E08(u8 boxId, u8 position) { if (boxId == TOTAL_BOXES_COUNT) // party mon - gPSSData->field_B00 = &gPSSData->partySprites[position]; + gPSSData->shiftMonSpritePtr = &gPSSData->partySprites[position]; else - gPSSData->field_B00 = &gPSSData->boxMonsSprites[position]; + gPSSData->shiftMonSpritePtr = &gPSSData->boxMonsSprites[position]; gPSSData->movingMonSprite->callback = SpriteCallbackDummy; - gPSSData->field_C5D = 0; + gPSSData->shiftTimer = 0; } bool8 sub_8090E74(void) { - if (gPSSData->field_C5D == 16) + if (gPSSData->shiftTimer == 16) return FALSE; - gPSSData->field_C5D++; - if (gPSSData->field_C5D & 1) + gPSSData->shiftTimer++; + if (gPSSData->shiftTimer & 1) { - (*gPSSData->field_B00)->y--; + (*gPSSData->shiftMonSpritePtr)->y--; gPSSData->movingMonSprite->y++; } - (*gPSSData->field_B00)->x2 = gSineTable[gPSSData->field_C5D * 8] / 16; - gPSSData->movingMonSprite->x2 = -(gSineTable[gPSSData->field_C5D * 8] / 16); - if (gPSSData->field_C5D == 8) + (*gPSSData->shiftMonSpritePtr)->x2 = gSineTable[gPSSData->shiftTimer * 8] / 16; + gPSSData->movingMonSprite->x2 = -(gSineTable[gPSSData->shiftTimer * 8] / 16); + if (gPSSData->shiftTimer == 8) { - gPSSData->movingMonSprite->oam.priority = (*gPSSData->field_B00)->oam.priority; - gPSSData->movingMonSprite->subpriority = (*gPSSData->field_B00)->subpriority; - (*gPSSData->field_B00)->oam.priority = sub_8090058(); - (*gPSSData->field_B00)->subpriority = 7; + gPSSData->movingMonSprite->oam.priority = (*gPSSData->shiftMonSpritePtr)->oam.priority; + gPSSData->movingMonSprite->subpriority = (*gPSSData->shiftMonSpritePtr)->subpriority; + (*gPSSData->shiftMonSpritePtr)->oam.priority = sub_8090058(); + (*gPSSData->shiftMonSpritePtr)->subpriority = 7; } - if (gPSSData->field_C5D == 16) + if (gPSSData->shiftTimer == 16) { struct Sprite *sprite = gPSSData->movingMonSprite; - gPSSData->movingMonSprite = (*gPSSData->field_B00); - *gPSSData->field_B00 = sprite; + gPSSData->movingMonSprite = (*gPSSData->shiftMonSpritePtr); + *gPSSData->shiftMonSpritePtr = sprite; gPSSData->movingMonSprite->callback = sub_80911B0; - (*gPSSData->field_B00)->callback = SpriteCallbackDummy; + (*gPSSData->shiftMonSpritePtr)->callback = SpriteCallbackDummy; } return TRUE; @@ -822,64 +822,64 @@ void sub_8090FC4(u8 mode, u8 position) switch (mode) { case MODE_PARTY: - gPSSData->field_B04 = &gPSSData->partySprites[position]; + gPSSData->releaseMonSpritePtr = &gPSSData->partySprites[position]; break; case MODE_BOX: - gPSSData->field_B04 = &gPSSData->boxMonsSprites[position]; + gPSSData->releaseMonSpritePtr = &gPSSData->boxMonsSprites[position]; break; case MODE_2: - gPSSData->field_B04 = &gPSSData->movingMonSprite; + gPSSData->releaseMonSpritePtr = &gPSSData->movingMonSprite; break; default: return; } - if (*gPSSData->field_B04 != NULL) + if (*gPSSData->releaseMonSpritePtr != NULL) { - InitSpriteAffineAnim(*gPSSData->field_B04); - (*gPSSData->field_B04)->oam.affineMode = ST_OAM_AFFINE_NORMAL; - (*gPSSData->field_B04)->affineAnims = gUnknown_83CEC38; - StartSpriteAffineAnim(*gPSSData->field_B04, 0); + InitSpriteAffineAnim(*gPSSData->releaseMonSpritePtr); + (*gPSSData->releaseMonSpritePtr)->oam.affineMode = ST_OAM_AFFINE_NORMAL; + (*gPSSData->releaseMonSpritePtr)->affineAnims = gUnknown_83CEC38; + StartSpriteAffineAnim(*gPSSData->releaseMonSpritePtr, 0); } } bool8 sub_8091084(void) { - if (*gPSSData->field_B04 == NULL || (*gPSSData->field_B04)->invisible) + if (*gPSSData->releaseMonSpritePtr == NULL || (*gPSSData->releaseMonSpritePtr)->invisible) return FALSE; - if ((*gPSSData->field_B04)->affineAnimEnded) - (*gPSSData->field_B04)->invisible = TRUE; + if ((*gPSSData->releaseMonSpritePtr)->affineAnimEnded) + (*gPSSData->releaseMonSpritePtr)->invisible = TRUE; return TRUE; } void sub_80910CC(void) { - if (*gPSSData->field_B04 != NULL) + if (*gPSSData->releaseMonSpritePtr != NULL) { - FreeOamMatrix((*gPSSData->field_B04)->oam.matrixNum); - DestroyBoxMonIcon(*gPSSData->field_B04); - *gPSSData->field_B04 = NULL; + FreeOamMatrix((*gPSSData->releaseMonSpritePtr)->oam.matrixNum); + DestroyBoxMonIcon(*gPSSData->releaseMonSpritePtr); + *gPSSData->releaseMonSpritePtr = NULL; } } void sub_8091114(void) { - if (*gPSSData->field_B04 != NULL) + if (*gPSSData->releaseMonSpritePtr != NULL) { - (*gPSSData->field_B04)->invisible = FALSE; - StartSpriteAffineAnim(*gPSSData->field_B04, 1); + (*gPSSData->releaseMonSpritePtr)->invisible = FALSE; + StartSpriteAffineAnim(*gPSSData->releaseMonSpritePtr, 1); } } bool8 sub_8091150(void) { - if (gPSSData->field_B04 == NULL) + if (gPSSData->releaseMonSpritePtr == NULL) return FALSE; - if ((*gPSSData->field_B04)->affineAnimEnded) - gPSSData->field_B04 = NULL; + if ((*gPSSData->releaseMonSpritePtr)->affineAnimEnded) + gPSSData->releaseMonSpritePtr = NULL; return TRUE; } @@ -891,8 +891,8 @@ void SetMovingMonPriority(u8 priority) static void sub_80911B0(struct Sprite *sprite) { - sprite->x = gPSSData->field_CB4->x; - sprite->y = gPSSData->field_CB4->y + gPSSData->field_CB4->y2 + 4; + sprite->x = gPSSData->cursorSprite->x; + sprite->y = gPSSData->cursorSprite->y + gPSSData->cursorSprite->y2 + 4; } static u16 sub_80911D4(u16 species) @@ -902,7 +902,7 @@ static u16 sub_80911D4(u16 species) // Find the currently-allocated slot for (i = 0; i < MAX_MON_ICONS; i++) { - if (gPSSData->field_B58[i] == species) + if (gPSSData->iconSpeciesList[i] == species) break; } @@ -911,15 +911,15 @@ static u16 sub_80911D4(u16 species) // Find the first empty slot for (i = 0; i < MAX_MON_ICONS; i++) { - if (gPSSData->field_B58[i] == SPECIES_NONE) + if (gPSSData->iconSpeciesList[i] == SPECIES_NONE) break; } if (i == MAX_MON_ICONS) return 0xFFFF; } - gPSSData->field_B58[i] = species; - gPSSData->field_B08[i]++; + gPSSData->iconSpeciesList[i] = species; + gPSSData->numIconsPerSpecies[i]++; var = 16 * i; CpuCopy32(GetMonIconTiles(species, TRUE), (void *)(OBJ_VRAM0) + var * 32, 0x200); @@ -932,10 +932,10 @@ static void sub_8091290(u16 species) for (i = 0; i < MAX_MON_ICONS; i++) { - if (gPSSData->field_B58[i] == species) + if (gPSSData->iconSpeciesList[i] == species) { - if (--gPSSData->field_B08[i] == 0) - gPSSData->field_B58[i] = 0; + if (--gPSSData->numIconsPerSpecies[i] == 0) + gPSSData->iconSpeciesList[i] = 0; break; } } @@ -991,7 +991,7 @@ static void sub_8091420(u8 taskId) switch (task->data[0]) { case 0: - gPSSData->field_2D2 = 0; + gPSSData->wallpaperOffset = 0; gPSSData->bg2_X = 0; task->data[1] = RequestDma3Fill(0, gPSSData->field_4AC4, 0x1000, DMA3_32BIT); break; @@ -1029,44 +1029,44 @@ void SetUpScrollToBox(u8 boxId) { s8 direction = sub_80916F4(boxId); - gPSSData->field_2CE = (direction > 0) ? 6 : -6; - gPSSData->field_2D3 = (direction > 0) ? 1 : 2; - gPSSData->field_2D0 = 32; - gPSSData->field_2D4 = boxId; - gPSSData->field_2D6 = (direction <= 0) ? 5 : 0; - gPSSData->field_2D8 = direction; - gPSSData->field_2DA = (direction > 0) ? 264 : 56; - gPSSData->field_2DC = (direction <= 0) ? 5 : 0; - gPSSData->field_2DE = 0; - gPSSData->field_2E0 = 2; - gPSSData->field_A64 = boxId; - gPSSData->field_A65 = direction; - gPSSData->field_A63 = 0; + gPSSData->scrollSpeed = (direction > 0) ? 6 : -6; + gPSSData->scrollUnused1 = (direction > 0) ? 1 : 2; + gPSSData->scrollTimer = 32; + gPSSData->scrollToBoxIdUnused = boxId; + gPSSData->scrollUnused2 = (direction <= 0) ? 5 : 0; + gPSSData->scrollDirectionUnused = direction; + gPSSData->scrollUnused3 = (direction > 0) ? 264 : 56; + gPSSData->scrollUnused4 = (direction <= 0) ? 5 : 0; + gPSSData->scrollUnused5 = 0; + gPSSData->scrollUnused6 = 2; + gPSSData->scrollToBoxId = boxId; + gPSSData->scrollDirection = direction; + gPSSData->scrollState = 0; } bool8 ScrollToBox(void) { bool8 var; - switch (gPSSData->field_A63) + switch (gPSSData->scrollState) { case 0: - LoadWallpaperGfx(gPSSData->field_A64, gPSSData->field_A65); - gPSSData->field_A63++; + LoadWallpaperGfx(gPSSData->scrollToBoxId, gPSSData->scrollDirection); + gPSSData->scrollState++; case 1: if (!WaitForWallpaperGfxLoad()) return TRUE; - sub_8090574(gPSSData->field_A64, gPSSData->field_A65); - sub_8091C48(gPSSData->field_A64, gPSSData->field_A65); - sub_809200C(gPSSData->field_A65); + sub_8090574(gPSSData->scrollToBoxId, gPSSData->scrollDirection); + sub_8091C48(gPSSData->scrollToBoxId, gPSSData->scrollDirection); + sub_809200C(gPSSData->scrollDirection); break; case 2: var = sub_809062C(); - if (gPSSData->field_2D0 != 0) + if (gPSSData->scrollTimer != 0) { - gPSSData->bg2_X += gPSSData->field_2CE; - if (--gPSSData->field_2D0 != 0) + gPSSData->bg2_X += gPSSData->scrollSpeed; + if (--gPSSData->scrollTimer != 0) return TRUE; sub_8091E34(); sub_80920AC(); @@ -1074,7 +1074,7 @@ bool8 ScrollToBox(void) return var; } - gPSSData->field_A63++; + gPSSData->scrollState++; return TRUE; } @@ -1105,7 +1105,7 @@ bool8 DoWallpaperGfxChange(void) switch (gPSSData->wallpaperChangeState) { case 0: - BeginNormalPaletteFade(gPSSData->field_738, 1, 0, 16, RGB_WHITEALPHA); + BeginNormalPaletteFade(gPSSData->wallpaperPalBits, 1, 0, 16, RGB_WHITEALPHA); gPSSData->wallpaperChangeState++; break; case 1: @@ -1120,7 +1120,7 @@ bool8 DoWallpaperGfxChange(void) if (WaitForWallpaperGfxLoad() == TRUE) { sub_8091EF0(); - BeginNormalPaletteFade(gPSSData->field_738, 1, 16, 0, RGB_WHITEALPHA); + BeginNormalPaletteFade(gPSSData->wallpaperPalBits, 1, 16, 0, RGB_WHITEALPHA); gPSSData->wallpaperChangeState++; } break; @@ -1142,26 +1142,26 @@ static void LoadWallpaperGfx(u8 boxId, s8 direction) void *iconGfx; u32 size1, size2; - gPSSData->field_6F9 = 0; - gPSSData->field_6FA = boxId; - gPSSData->field_6FB = direction; - if (gPSSData->field_6FB != 0) + gPSSData->wallpaperLoadState = 0; + gPSSData->wallpaperLoadBoxId = boxId; + gPSSData->wallpaperLoadDir = direction; + if (gPSSData->wallpaperLoadDir != 0) { - gPSSData->field_2D2 = (gPSSData->field_2D2 == 0); + gPSSData->wallpaperOffset = (gPSSData->wallpaperOffset == 0); sub_8091A24(gPSSData->field_4AC4); } - wallpaperId = GetBoxWallpaper(gPSSData->field_6FA); + wallpaperId = GetBoxWallpaper(gPSSData->wallpaperLoadBoxId); wallpaperGfx = &sWallpaperTable[wallpaperId]; - LZ77UnCompWram(wallpaperGfx->tileMap, gPSSData->field_792); - sub_8091984(gPSSData->field_4AC4, gPSSData->field_792, gPSSData->field_6FB, gPSSData->field_2D2); + LZ77UnCompWram(wallpaperGfx->tileMap, gPSSData->wallpaperTilemap); + sub_8091984(gPSSData->field_4AC4, gPSSData->wallpaperTilemap, gPSSData->wallpaperLoadDir, gPSSData->wallpaperOffset); - if (gPSSData->field_6FB != 0) - LoadPalette(wallpaperGfx->palettes, (gPSSData->field_2D2 * 32) + 0x40, 0x40); + if (gPSSData->wallpaperLoadDir != 0) + LoadPalette(wallpaperGfx->palettes, (gPSSData->wallpaperOffset * 32) + 0x40, 0x40); else - CpuCopy16(wallpaperGfx->palettes, &gPlttBufferUnfaded[(gPSSData->field_2D2 * 32) + 0x40], 0x40); + CpuCopy16(wallpaperGfx->palettes, &gPlttBufferUnfaded[(gPSSData->wallpaperOffset * 32) + 0x40], 0x40); - DecompressAndLoadBgGfxUsingHeap(2, wallpaperGfx->tiles, 0, 256 * gPSSData->field_2D2, 0); + DecompressAndLoadBgGfxUsingHeap(2, wallpaperGfx->tiles, 0, 256 * gPSSData->wallpaperOffset, 0); CopyBgTilemapBufferToVram(2); } @@ -1221,24 +1221,24 @@ static void sub_8091A94(u8 boxId) struct SpriteSheet spriteSheet = {gPSSData->field_2F8, 0x200, TAG_TILE_3}; struct SpritePalette palettes[] = { - {gPSSData->field_6FC, TAG_PAL_DAC9}, + {gPSSData->boxTitlePal, TAG_PAL_DAC9}, {} }; u16 wallpaperId = GetBoxWallpaper(boxId); - gPSSData->field_6FC[14] = gUnknown_83D29D0[wallpaperId][0]; - gPSSData->field_6FC[15] = gUnknown_83D29D0[wallpaperId][1]; + gPSSData->boxTitlePal[14] = gUnknown_83D29D0[wallpaperId][0]; + gPSSData->boxTitlePal[15] = gUnknown_83D29D0[wallpaperId][1]; LoadSpritePalettes(palettes); - gPSSData->field_738 = 0x3f0; + gPSSData->wallpaperPalBits = 0x3f0; tagIndex = IndexOfSpritePaletteTag(TAG_PAL_DAC9); - gPSSData->field_71C = 0x10e + 16 * tagIndex; - gPSSData->field_738 |= 0x10000 << tagIndex; + gPSSData->boxTitlePalOffset = 0x10e + 16 * tagIndex; + gPSSData->wallpaperPalBits |= 0x10000 << tagIndex; tagIndex = IndexOfSpritePaletteTag(TAG_PAL_DAC9); - gPSSData->field_71E = 0x10e + 16 * tagIndex; - gPSSData->field_738 |= 0x10000 << tagIndex; + gPSSData->boxTitleAltPalOffset = 0x10e + 16 * tagIndex; + gPSSData->wallpaperPalBits |= 0x10000 << tagIndex; StringCopyPadded(gPSSData->field_21B8, GetBoxNamePtr(boxId), 0, 8); DrawTextWindowAndBufferTiles(gPSSData->field_21B8, gPSSData->field_2F8, 0, 0, gPSSData->field_4F8, 2); @@ -1248,10 +1248,10 @@ static void sub_8091A94(u8 boxId) for (i = 0; i < 2; i++) { u8 spriteId = CreateSprite(&gUnknown_83D2B7C, r6 + i * 32, 28, 24); - gPSSData->field_720[i] = &gSprites[spriteId]; - StartSpriteAnim(gPSSData->field_720[i], i); + gPSSData->curBoxTitleSprites[i] = &gSprites[spriteId]; + StartSpriteAnim(gPSSData->curBoxTitleSprites[i], i); } - gPSSData->field_6F8 = 0; + gPSSData->boxTitleCycleId = 0; } static void sub_8091C48(u8 boxId, s8 direction) @@ -1262,16 +1262,16 @@ static void sub_8091C48(u8 boxId, s8 direction) struct SpriteSheet spriteSheet = {gPSSData->field_2F8, 0x200, TAG_TILE_3}; struct SpriteTemplate template = gUnknown_83D2B7C; - gPSSData->field_6F8 = (gPSSData->field_6F8 == 0); - if (gPSSData->field_6F8 == 0) + gPSSData->boxTitleCycleId = (gPSSData->boxTitleCycleId == 0); + if (gPSSData->boxTitleCycleId == 0) { spriteSheet.tag = TAG_TILE_3; - r8 = gPSSData->field_71C; + r8 = gPSSData->boxTitlePalOffset; } else { spriteSheet.tag = TAG_TILE_4; - r8 = gPSSData->field_71C; + r8 = gPSSData->boxTitlePalOffset; template.tileTag = TAG_TILE_4; template.paletteTag = TAG_PAL_DAC9; } @@ -1288,28 +1288,28 @@ static void sub_8091C48(u8 boxId, s8 direction) { u8 spriteId = CreateSprite(&template, i * 32 + x2, 28, 24); - gPSSData->field_728[i] = &gSprites[spriteId]; - gPSSData->field_728[i]->data[0] = (-direction) * 6; - gPSSData->field_728[i]->data[1] = i * 32 + x; - gPSSData->field_728[i]->data[2] = 0; - gPSSData->field_728[i]->callback = sub_8091E84; - StartSpriteAnim(gPSSData->field_728[i], i); + gPSSData->nextBoxTitleSprites[i] = &gSprites[spriteId]; + gPSSData->nextBoxTitleSprites[i]->data[0] = (-direction) * 6; + gPSSData->nextBoxTitleSprites[i]->data[1] = i * 32 + x; + gPSSData->nextBoxTitleSprites[i]->data[2] = 0; + gPSSData->nextBoxTitleSprites[i]->callback = sub_8091E84; + StartSpriteAnim(gPSSData->nextBoxTitleSprites[i], i); - gPSSData->field_720[i]->data[0] = (-direction) * 6; - gPSSData->field_720[i]->data[1] = 1; - gPSSData->field_720[i]->callback = sub_8091EB8; + gPSSData->curBoxTitleSprites[i]->data[0] = (-direction) * 6; + gPSSData->curBoxTitleSprites[i]->data[1] = 1; + gPSSData->curBoxTitleSprites[i]->callback = sub_8091EB8; } } static void sub_8091E34(void) { - if (gPSSData->field_6F8 == 0) + if (gPSSData->boxTitleCycleId == 0) FreeSpriteTilesByTag(TAG_TILE_4); else FreeSpriteTilesByTag(TAG_TILE_3); - gPSSData->field_720[0] = gPSSData->field_728[0]; - gPSSData->field_720[1] = gPSSData->field_728[1]; + gPSSData->curBoxTitleSprites[0] = gPSSData->nextBoxTitleSprites[0]; + gPSSData->curBoxTitleSprites[1] = gPSSData->nextBoxTitleSprites[1]; } static void sub_8091E84(struct Sprite *sprite) @@ -1339,10 +1339,10 @@ static void sub_8091EF0(void) { u8 boxId = StorageGetCurrentBox(); u8 wallpaperId = GetBoxWallpaper(boxId); - if (gPSSData->field_6F8 == 0) - CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->field_71C, 4); + if (gPSSData->boxTitleCycleId == 0) + CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitlePalOffset, 4); else - CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->field_71E, 4); + CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitleAltPalOffset, 4); } static s16 sub_8091F60(const u8 *string) @@ -1363,7 +1363,7 @@ static void sub_8091F80(void) struct Sprite *sprite = &gSprites[spriteId]; StartSpriteAnim(sprite, i); sprite->data[3] = (i == 0) ? -1 : 1; - gPSSData->field_730[i] = sprite; + gPSSData->arrowSprites[i] = sprite; } } if (IsCursorOnBox()) @@ -1376,25 +1376,25 @@ static void sub_809200C(s8 direction) for (i = 0; i < 2; i++) { - gPSSData->field_730[i]->x2 = 0; - gPSSData->field_730[i]->data[0] = 2; + gPSSData->arrowSprites[i]->x2 = 0; + gPSSData->arrowSprites[i]->data[0] = 2; } if (direction < 0) { - gPSSData->field_730[0]->data[1] = 29; - gPSSData->field_730[1]->data[1] = 5; - gPSSData->field_730[0]->data[2] = 0x48; - gPSSData->field_730[1]->data[2] = 0x48; + gPSSData->arrowSprites[0]->data[1] = 29; + gPSSData->arrowSprites[1]->data[1] = 5; + gPSSData->arrowSprites[0]->data[2] = 0x48; + gPSSData->arrowSprites[1]->data[2] = 0x48; } else { - gPSSData->field_730[0]->data[1] = 5; - gPSSData->field_730[1]->data[1] = 29; - gPSSData->field_730[0]->data[2] = 0xF8; - gPSSData->field_730[1]->data[2] = 0xF8; + gPSSData->arrowSprites[0]->data[1] = 5; + gPSSData->arrowSprites[1]->data[1] = 29; + gPSSData->arrowSprites[0]->data[2] = 0xF8; + gPSSData->arrowSprites[1]->data[2] = 0xF8; } - gPSSData->field_730[0]->data[7] = 0; - gPSSData->field_730[1]->data[7] = 1; + gPSSData->arrowSprites[0]->data[7] = 0; + gPSSData->arrowSprites[1]->data[7] = 1; } static void sub_80920AC(void) @@ -1403,9 +1403,9 @@ static void sub_80920AC(void) for (i = 0; i < 2; i++) { - gPSSData->field_730[i]->x = 0x88 * i + 0x5c; - gPSSData->field_730[i]->x2 = 0; - gPSSData->field_730[i]->invisible = FALSE; + gPSSData->arrowSprites[i]->x = 0x88 * i + 0x5c; + gPSSData->arrowSprites[i]->x2 = 0; + gPSSData->arrowSprites[i]->invisible = FALSE; } sub_80920FC(TRUE); } @@ -1418,17 +1418,17 @@ void sub_80920FC(bool8 a0) { for (i = 0; i < 2; i++) { - gPSSData->field_730[i]->data[0] = 1; - gPSSData->field_730[i]->data[1] = 0; - gPSSData->field_730[i]->data[2] = 0; - gPSSData->field_730[i]->data[4] = 0; + gPSSData->arrowSprites[i]->data[0] = 1; + gPSSData->arrowSprites[i]->data[1] = 0; + gPSSData->arrowSprites[i]->data[2] = 0; + gPSSData->arrowSprites[i]->data[4] = 0; } } else { for (i = 0; i < 2; i++) { - gPSSData->field_730[i]->data[0] = 0; + gPSSData->arrowSprites[i]->data[0] = 0; } } } @@ -1456,7 +1456,7 @@ static void sub_8092164(struct Sprite *sprite) sprite->data[0] = 3; break; case 3: - sprite->x -= gPSSData->field_2CE; + sprite->x -= gPSSData->scrollSpeed; if (sprite->x < 73 || sprite->x > 247) sprite->invisible = TRUE; if (--sprite->data[1] == 0) @@ -1467,7 +1467,7 @@ static void sub_8092164(struct Sprite *sprite) } break; case 4: - sprite->x -= gPSSData->field_2CE; + sprite->x -= gPSSData->scrollSpeed; break; } } diff --git a/src/pokemon_storage_system_5.c b/src/pokemon_storage_system_5.c index 7d5da65e9..a994028d3 100644 --- a/src/pokemon_storage_system_5.c +++ b/src/pokemon_storage_system_5.c @@ -33,7 +33,7 @@ static void SetPlacedMonData(u8 boxId, u8 cursorPos); static void PurgeMonOrBoxMon(u8 boxId, u8 cursorPos); static void SetShiftedMonData(u8 boxId, u8 cursorPos); static void sub_8093A10(void); -static void SetCursorMonData(void * cursorMon, u8 mode); +static void SetCursorMonData(void *cursorMon, u8 mode); static void sub_8093AAC(void); static u8 InBoxInput_Normal(void); static u8 InBoxInput_GrabbingMultiple(void); @@ -63,7 +63,7 @@ void sub_80922C0(void) sCanOnlyMove = FALSE; sub_8092B50(); sub_8094AD8(); - gPSSData->field_CD6 = 1; + gPSSData->cursorPrevHorizPos = 1; gPSSData->inBoxMovingMode = 0; sub_8093A10(); } @@ -72,7 +72,7 @@ void sub_8092340(void) { sub_8094AD8(); sub_8093AAC(); - gPSSData->field_CD6 = 1; + gPSSData->cursorPrevHorizPos = 1; gPSSData->inBoxMovingMode = 0; if (sIsMonBeingMoved) { @@ -138,46 +138,46 @@ bool8 sub_80924A8(void) { s16 tmp; - if (gPSSData->field_CD0 == 0) + if (gPSSData->cursorMoveSteps == 0) { if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return FALSE; else return sub_809610C(); } - else if (--gPSSData->field_CD0 != 0) + else if (--gPSSData->cursorMoveSteps != 0) { - gPSSData->field_CBC += gPSSData->field_CC4; - gPSSData->field_CC0 += gPSSData->field_CC8; - gPSSData->field_CB4->x = gPSSData->field_CBC >> 8; - gPSSData->field_CB4->y = gPSSData->field_CC0 >> 8; - if (gPSSData->field_CB4->x > 0x100) + gPSSData->cursorNewX += gPSSData->cursorSpeedX; + gPSSData->cursorNewY += gPSSData->cursorSpeedY; + gPSSData->cursorSprite->x = gPSSData->cursorNewX >> 8; + gPSSData->cursorSprite->y = gPSSData->cursorNewY >> 8; + if (gPSSData->cursorSprite->x > 0x100) { - tmp = gPSSData->field_CB4->x - 0x100; - gPSSData->field_CB4->x = tmp + 0x40; + tmp = gPSSData->cursorSprite->x - 0x100; + gPSSData->cursorSprite->x = tmp + 0x40; } - if (gPSSData->field_CB4->x < 0x40) + if (gPSSData->cursorSprite->x < 0x40) { - tmp = 0x40 - gPSSData->field_CB4->x; - gPSSData->field_CB4->x = 0x100 - tmp; + tmp = 0x40 - gPSSData->cursorSprite->x; + gPSSData->cursorSprite->x = 0x100 - tmp; } - if (gPSSData->field_CB4->y > 0xb0) + if (gPSSData->cursorSprite->y > 0xb0) { - tmp = gPSSData->field_CB4->y - 0xb0; - gPSSData->field_CB4->y = tmp - 0x10; + tmp = gPSSData->cursorSprite->y - 0xb0; + gPSSData->cursorSprite->y = tmp - 0x10; } - if (gPSSData->field_CB4->y < -0x10) + if (gPSSData->cursorSprite->y < -0x10) { - tmp = -0x10 - gPSSData->field_CB4->y; - gPSSData->field_CB4->y = 0xb0 - tmp; + tmp = -0x10 - gPSSData->cursorSprite->y; + gPSSData->cursorSprite->y = 0xb0 - tmp; } - if (gPSSData->field_CD7 && --gPSSData->field_CD7 == 0) - gPSSData->field_CB4->vFlip = (gPSSData->field_CB4->vFlip == FALSE); + if (gPSSData->cursorFlipTimer && --gPSSData->cursorFlipTimer == 0) + gPSSData->cursorSprite->vFlip = (gPSSData->cursorSprite->vFlip == FALSE); } else { - gPSSData->field_CB4->x = gPSSData->field_CCC; - gPSSData->field_CB4->y = gPSSData->field_CCE; + gPSSData->cursorSprite->x = gPSSData->cursorTargetX; + gPSSData->cursorSprite->y = gPSSData->cursorTargetY; sub_80929B0(); } @@ -189,56 +189,56 @@ static void sub_8092604(u8 newCurosrArea, u8 newCursorPosition) u16 x, y; sub_8092398(newCurosrArea, newCursorPosition, &x, &y); - gPSSData->field_CD4 = newCurosrArea; - gPSSData->field_CD5 = newCursorPosition; - gPSSData->field_CCC = x; - gPSSData->field_CCE = y; + gPSSData->newCursorArea = newCurosrArea; + gPSSData->newCursorPosition = newCursorPosition; + gPSSData->cursorTargetX = x; + gPSSData->cursorTargetY = y; } static void sub_8092660(void) { int r7, r0; - if (gPSSData->field_CD2 != 0 || gPSSData->field_CD3 != 0) - gPSSData->field_CD0 = 12; + if (gPSSData->cursorVerticalWrap != 0 || gPSSData->cursorHorizontalWrap != 0) + gPSSData->cursorMoveSteps = 12; else - gPSSData->field_CD0 = 6; + gPSSData->cursorMoveSteps = 6; - if (gPSSData->field_CD7) - gPSSData->field_CD7 = gPSSData->field_CD0 >> 1; + if (gPSSData->cursorFlipTimer) + gPSSData->cursorFlipTimer = gPSSData->cursorMoveSteps >> 1; - switch (gPSSData->field_CD2) + switch (gPSSData->cursorVerticalWrap) { default: - r7 = gPSSData->field_CCE - gPSSData->field_CB4->y; + r7 = gPSSData->cursorTargetY - gPSSData->cursorSprite->y; break; case -1: - r7 = gPSSData->field_CCE - 0xc0 - gPSSData->field_CB4->y; + r7 = gPSSData->cursorTargetY - 0xc0 - gPSSData->cursorSprite->y; break; case 1: - r7 = gPSSData->field_CCE + 0xc0 - gPSSData->field_CB4->y; + r7 = gPSSData->cursorTargetY + 0xc0 - gPSSData->cursorSprite->y; break; } - switch (gPSSData->field_CD3) + switch (gPSSData->cursorHorizontalWrap) { default: - r0 = gPSSData->field_CCC - gPSSData->field_CB4->x; + r0 = gPSSData->cursorTargetX - gPSSData->cursorSprite->x; break; case -1: - r0 = gPSSData->field_CCC - 0xc0 - gPSSData->field_CB4->x; + r0 = gPSSData->cursorTargetX - 0xc0 - gPSSData->cursorSprite->x; break; case 1: - r0 = gPSSData->field_CCC + 0xc0 - gPSSData->field_CB4->x; + r0 = gPSSData->cursorTargetX + 0xc0 - gPSSData->cursorSprite->x; break; } r7 <<= 8; r0 <<= 8; - gPSSData->field_CC4 = r0 / gPSSData->field_CD0; - gPSSData->field_CC8 = r7 / gPSSData->field_CD0; - gPSSData->field_CBC = gPSSData->field_CB4->x << 8; - gPSSData->field_CC0 = gPSSData->field_CB4->y << 8; + gPSSData->cursorSpeedX = r0 / gPSSData->cursorMoveSteps; + gPSSData->cursorSpeedY = r7 / gPSSData->cursorMoveSteps; + gPSSData->cursorNewX = gPSSData->cursorSprite->x << 8; + gPSSData->cursorNewY = gPSSData->cursorSprite->y << 8; } static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) @@ -248,12 +248,12 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) { if (gPSSData->inBoxMovingMode == 0 && !sIsMonBeingMoved) - StartSpriteAnim(gPSSData->field_CB4, 1); + StartSpriteAnim(gPSSData->cursorSprite, 1); } else { if (!IsActiveItemMoving()) - StartSpriteAnim(gPSSData->field_CB4, 1); + StartSpriteAnim(gPSSData->cursorSprite, 1); } if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) @@ -271,8 +271,8 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) if (newCurosrArea == CURSOR_AREA_IN_PARTY && sBoxCursorArea != CURSOR_AREA_IN_PARTY) { - gPSSData->field_CD6 = newCurosrArea; - gPSSData->field_CB8->invisible = TRUE; + gPSSData->cursorPrevHorizPos = newCurosrArea; + gPSSData->cursorShadowSprite->invisible = TRUE; } switch (newCurosrArea) @@ -280,19 +280,19 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) case CURSOR_AREA_IN_PARTY: case CURSOR_AREA_BOX: case CURSOR_AREA_BUTTONS: - gPSSData->field_CB4->oam.priority = 1; - gPSSData->field_CB8->invisible = TRUE; - gPSSData->field_CB8->oam.priority = 1; + gPSSData->cursorSprite->oam.priority = 1; + gPSSData->cursorShadowSprite->invisible = TRUE; + gPSSData->cursorShadowSprite->oam.priority = 1; break; case CURSOR_AREA_IN_BOX: if (gPSSData->inBoxMovingMode != 0) { - gPSSData->field_CB4->oam.priority = 0; - gPSSData->field_CB8->invisible = TRUE; + gPSSData->cursorSprite->oam.priority = 0; + gPSSData->cursorShadowSprite->invisible = TRUE; } else { - gPSSData->field_CB4->oam.priority = 2; + gPSSData->cursorSprite->oam.priority = 2; if (sBoxCursorArea == CURSOR_AREA_IN_BOX && sIsMonBeingMoved) SetMovingMonPriority(2); } @@ -302,17 +302,17 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) static void sub_80929B0(void) { - sBoxCursorArea = gPSSData->field_CD4; - sBoxCursorPosition = gPSSData->field_CD5; + sBoxCursorArea = gPSSData->newCursorArea; + sBoxCursorPosition = gPSSData->newCursorPosition; if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) { if (gPSSData->inBoxMovingMode == 0 && !sIsMonBeingMoved) - StartSpriteAnim(gPSSData->field_CB4, 1); + StartSpriteAnim(gPSSData->cursorSprite, 1); } else { if (!IsActiveItemMoving()) - StartSpriteAnim(gPSSData->field_CB4, 1); + StartSpriteAnim(gPSSData->cursorSprite, 1); } sub_8093A10(); @@ -325,16 +325,16 @@ static void sub_80929B0(void) sub_80920FC(TRUE); break; case CURSOR_AREA_IN_PARTY: - gPSSData->field_CB8->subpriority = 13; + gPSSData->cursorShadowSprite->subpriority = 13; SetMovingMonPriority(1); break; case CURSOR_AREA_IN_BOX: if (gPSSData->inBoxMovingMode == 0) { - gPSSData->field_CB4->oam.priority = 1; - gPSSData->field_CB8->oam.priority = 2; - gPSSData->field_CB8->subpriority = 21; - gPSSData->field_CB8->invisible = FALSE; + gPSSData->cursorSprite->oam.priority = 1; + gPSSData->cursorShadowSprite->oam.priority = 2; + gPSSData->cursorShadowSprite->subpriority = 21; + gPSSData->cursorShadowSprite->invisible = FALSE; SetMovingMonPriority(2); } break; @@ -355,8 +355,8 @@ void sub_8092AE4(void) if (partyCount >= PARTY_SIZE) partyCount = PARTY_SIZE - 1; } - if (gPSSData->field_CB4->vFlip) - gPSSData->field_CD7 = 1; + if (gPSSData->cursorSprite->vFlip) + gPSSData->cursorFlipTimer = 1; sub_80927E8(CURSOR_AREA_IN_PARTY, partyCount); } @@ -414,13 +414,13 @@ static bool8 MonPlaceChange_Move(void) case 0: if (sIsMonBeingMoved) return FALSE; - StartSpriteAnim(gPSSData->field_CB4, 2); + StartSpriteAnim(gPSSData->cursorSprite, 2); gPSSData->monPlaceChangeState++; break; case 1: if (!sub_8092E20()) { - StartSpriteAnim(gPSSData->field_CB4, 3); + StartSpriteAnim(gPSSData->cursorSprite, 3); MoveMon(); gPSSData->monPlaceChangeState++; } @@ -443,7 +443,7 @@ static bool8 MonPlaceChange_Place(void) case 0: if (!sub_8092E20()) { - StartSpriteAnim(gPSSData->field_CB4, 2); + StartSpriteAnim(gPSSData->cursorSprite, 2); PlaceMon(); gPSSData->monPlaceChangeState++; } @@ -451,7 +451,7 @@ static bool8 MonPlaceChange_Place(void) case 1: if (!sub_8092E54()) { - StartSpriteAnim(gPSSData->field_CB4, 0); + StartSpriteAnim(gPSSData->cursorSprite, 0); gPSSData->monPlaceChangeState++; } break; @@ -470,23 +470,23 @@ static bool8 MonPlaceChange_Shift(void) switch (sBoxCursorArea) { case CURSOR_AREA_IN_PARTY: - gPSSData->field_D91 = TOTAL_BOXES_COUNT; + gPSSData->shiftBoxId = TOTAL_BOXES_COUNT; break; case CURSOR_AREA_IN_BOX: - gPSSData->field_D91 = StorageGetCurrentBox(); + gPSSData->shiftBoxId = StorageGetCurrentBox(); break; default: return FALSE; } - StartSpriteAnim(gPSSData->field_CB4, 2); - sub_8090E08(gPSSData->field_D91, sBoxCursorPosition); + StartSpriteAnim(gPSSData->cursorSprite, 2); + sub_8090E08(gPSSData->shiftBoxId, sBoxCursorPosition); gPSSData->monPlaceChangeState++; break; case 1: if (!sub_8090E74()) { - StartSpriteAnim(gPSSData->field_CB4, 3); - SetShiftedMonData(gPSSData->field_D91, sBoxCursorPosition); + StartSpriteAnim(gPSSData->cursorSprite, 3); + SetShiftedMonData(gPSSData->shiftBoxId, sBoxCursorPosition); gPSSData->monPlaceChangeState++; } break; @@ -509,13 +509,13 @@ static bool8 sub_8092E10(void) static bool8 sub_8092E20(void) { - switch (gPSSData->field_CB4->y2) + switch (gPSSData->cursorSprite->y2) { default: - gPSSData->field_CB4->y2++; + gPSSData->cursorSprite->y2++; break; case 0: - gPSSData->field_CB4->y2++; + gPSSData->cursorSprite->y2++; break; case 8: return FALSE; @@ -526,12 +526,12 @@ static bool8 sub_8092E20(void) static bool8 sub_8092E54(void) { - switch (gPSSData->field_CB4->y2) + switch (gPSSData->cursorSprite->y2) { case 0: return FALSE; default: - gPSSData->field_CB4->y2--; + gPSSData->cursorSprite->y2--; break; } @@ -656,13 +656,13 @@ bool8 TryStorePartyMonInBox(u8 boxId) if (boxId == StorageGetCurrentBox()) sub_80901EC(boxPosition); - StartSpriteAnim(gPSSData->field_CB4, 1); + StartSpriteAnim(gPSSData->cursorSprite, 1); return TRUE; } void sub_8093174(void) { - StartSpriteAnim(gPSSData->field_CB4, 0); + StartSpriteAnim(gPSSData->cursorSprite, 0); sub_8093A10(); } @@ -678,14 +678,14 @@ void sub_8093194(void) mode = MODE_BOX; sub_8090FC4(mode, sBoxCursorPosition); - StringCopy(gPSSData->field_21E0, gPSSData->cursorMonNick); + StringCopy(gPSSData->field_21E0, gPSSData->displayMonName); } bool8 sub_80931EC(void) { if (!sub_8091084()) { - StartSpriteAnim(gPSSData->field_CB4, 0); + StartSpriteAnim(gPSSData->cursorSprite, 0); return FALSE; } else @@ -718,7 +718,7 @@ void ReleaseMon(void) void sub_8093264(void) { if (sIsMonBeingMoved) - StartSpriteAnim(gPSSData->field_CB4, 3); + StartSpriteAnim(gPSSData->cursorSprite, 3); } void InitCanReleaseMonVars(void) @@ -914,7 +914,7 @@ s16 CompactPartySlots(void) void SetMonMarkings(u8 markings) { - gPSSData->cursorMonMarkings = markings; + gPSSData->displayMonMarkings = markings; if (sIsMonBeingMoved) { SetMonData(&gPSSData->movingMon, MON_DATA_MARKINGS, &markings); @@ -942,7 +942,7 @@ bool8 CanShiftMon(void) { if (sBoxCursorArea == CURSOR_AREA_IN_PARTY && CountPartyAliveNonEggMonsExcept(sBoxCursorPosition) == 0) { - if (gPSSData->cursorMonIsEgg || GetMonData(&gPSSData->movingMon, MON_DATA_HP) == 0) + if (gPSSData->displayMonIsEgg || GetMonData(&gPSSData->movingMon, MON_DATA_HP) == 0) return FALSE; } return TRUE; @@ -1009,94 +1009,94 @@ static void SetCursorMonData(void *pokemon, u8 mode) u16 gender; bool8 sanityIsBagEgg; - gPSSData->cursorMonItem = 0; + gPSSData->displayMonItemId = 0; gender = MON_MALE; sanityIsBagEgg = FALSE; if (mode == MODE_PARTY) { struct Pokemon *mon = (struct Pokemon *)pokemon; - gPSSData->cursorMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); - if (gPSSData->cursorMonSpecies != SPECIES_NONE) + gPSSData->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); + if (gPSSData->displayMonSpecies != SPECIES_NONE) { sanityIsBagEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); if (sanityIsBagEgg) - gPSSData->cursorMonIsEgg = TRUE; + gPSSData->displayMonIsEgg = TRUE; else - gPSSData->cursorMonIsEgg = GetMonData(mon, MON_DATA_IS_EGG); + gPSSData->displayMonIsEgg = GetMonData(mon, MON_DATA_IS_EGG); - GetMonData(mon, MON_DATA_NICKNAME, gPSSData->cursorMonNick); - StringGetEnd10(gPSSData->cursorMonNick); - gPSSData->cursorMonLevel = GetMonData(mon, MON_DATA_LEVEL); - gPSSData->cursorMonMarkings = GetMonData(mon, MON_DATA_MARKINGS); - gPSSData->cursorMonPersonality = GetMonData(mon, MON_DATA_PERSONALITY); - gPSSData->cursorMonPalette = GetMonFrontSpritePal(mon); + GetMonData(mon, MON_DATA_NICKNAME, gPSSData->displayMonName); + StringGetEnd10(gPSSData->displayMonName); + gPSSData->displayMonLevel = GetMonData(mon, MON_DATA_LEVEL); + gPSSData->displayMonMarkings = GetMonData(mon, MON_DATA_MARKINGS); + gPSSData->displayMonPersonality = GetMonData(mon, MON_DATA_PERSONALITY); + gPSSData->displayMonPalette = GetMonFrontSpritePal(mon); gender = GetMonGender(mon); - gPSSData->cursorMonItem = GetMonData(mon, MON_DATA_HELD_ITEM); + gPSSData->displayMonItemId = GetMonData(mon, MON_DATA_HELD_ITEM); } } else if (mode == MODE_BOX) { struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon; - gPSSData->cursorMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2); - if (gPSSData->cursorMonSpecies != SPECIES_NONE) + gPSSData->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2); + if (gPSSData->displayMonSpecies != SPECIES_NONE) { u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); sanityIsBagEgg = GetBoxMonData(boxMon, MON_DATA_SANITY_IS_BAD_EGG); if (sanityIsBagEgg) - gPSSData->cursorMonIsEgg = TRUE; + gPSSData->displayMonIsEgg = TRUE; else - gPSSData->cursorMonIsEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG); + gPSSData->displayMonIsEgg = GetBoxMonData(boxMon, MON_DATA_IS_EGG); - GetBoxMonData(boxMon, MON_DATA_NICKNAME, gPSSData->cursorMonNick); - StringGetEnd10(gPSSData->cursorMonNick); - gPSSData->cursorMonLevel = GetLevelFromBoxMonExp(boxMon); - gPSSData->cursorMonMarkings = GetBoxMonData(boxMon, MON_DATA_MARKINGS); - gPSSData->cursorMonPersonality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); - gPSSData->cursorMonPalette = GetMonSpritePalFromSpeciesAndPersonality(gPSSData->cursorMonSpecies, otId, gPSSData->cursorMonPersonality); - gender = GetGenderFromSpeciesAndPersonality(gPSSData->cursorMonSpecies, gPSSData->cursorMonPersonality); - gPSSData->cursorMonItem = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM); + GetBoxMonData(boxMon, MON_DATA_NICKNAME, gPSSData->displayMonName); + StringGetEnd10(gPSSData->displayMonName); + gPSSData->displayMonLevel = GetLevelFromBoxMonExp(boxMon); + gPSSData->displayMonMarkings = GetBoxMonData(boxMon, MON_DATA_MARKINGS); + gPSSData->displayMonPersonality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY); + gPSSData->displayMonPalette = GetMonSpritePalFromSpeciesAndPersonality(gPSSData->displayMonSpecies, otId, gPSSData->displayMonPersonality); + gender = GetGenderFromSpeciesAndPersonality(gPSSData->displayMonSpecies, gPSSData->displayMonPersonality); + gPSSData->displayMonItemId = GetBoxMonData(boxMon, MON_DATA_HELD_ITEM); } } else { - gPSSData->cursorMonSpecies = SPECIES_NONE; - gPSSData->cursorMonItem = 0; + gPSSData->displayMonSpecies = SPECIES_NONE; + gPSSData->displayMonItemId = 0; } - if (gPSSData->cursorMonSpecies == SPECIES_NONE) + if (gPSSData->displayMonSpecies == SPECIES_NONE) { - StringFill(gPSSData->cursorMonNick, CHAR_SPACE, 5); - StringFill(gPSSData->cursorMonTexts[0], CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[1], CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[2], CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[3], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonName, CHAR_SPACE, 5); + StringFill(gPSSData->displayMonTexts[0], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[1], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[2], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[3], CHAR_SPACE, 8); } - else if (gPSSData->cursorMonIsEgg) + else if (gPSSData->displayMonIsEgg) { if (sanityIsBagEgg) - StringCopyPadded(gPSSData->cursorMonTexts[0], gPSSData->cursorMonNick, CHAR_SPACE, 5); + StringCopyPadded(gPSSData->displayMonTexts[0], gPSSData->displayMonName, CHAR_SPACE, 5); else - StringCopyPadded(gPSSData->cursorMonTexts[0], gText_EggNickname, CHAR_SPACE, 8); + StringCopyPadded(gPSSData->displayMonTexts[0], gText_EggNickname, CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[1], CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[2], CHAR_SPACE, 8); - StringFill(gPSSData->cursorMonTexts[3], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[1], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[2], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[3], CHAR_SPACE, 8); } else { - if (gPSSData->cursorMonSpecies == SPECIES_NIDORAN_F || gPSSData->cursorMonSpecies == SPECIES_NIDORAN_M) + if (gPSSData->displayMonSpecies == SPECIES_NIDORAN_F || gPSSData->displayMonSpecies == SPECIES_NIDORAN_M) gender = MON_GENDERLESS; - StringCopyPadded(gPSSData->cursorMonTexts[0], gPSSData->cursorMonNick, CHAR_SPACE, 5); + StringCopyPadded(gPSSData->displayMonTexts[0], gPSSData->displayMonName, CHAR_SPACE, 5); - txtPtr = gPSSData->cursorMonTexts[1]; + txtPtr = gPSSData->displayMonTexts[1]; *(txtPtr)++ = CHAR_SLASH; - StringCopyPadded(txtPtr, gSpeciesNames[gPSSData->cursorMonSpecies], CHAR_SPACE, 5); + StringCopyPadded(txtPtr, gSpeciesNames[gPSSData->displayMonSpecies], CHAR_SPACE, 5); - txtPtr = gPSSData->cursorMonTexts[2]; + txtPtr = gPSSData->displayMonTexts[2]; *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; *(txtPtr)++ = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; switch (gender) @@ -1130,14 +1130,14 @@ static void SetCursorMonData(void *pokemon, u8 mode) *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = 5; // LV_2 - txtPtr = ConvertIntToDecimalStringN(txtPtr, gPSSData->cursorMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3); + txtPtr = ConvertIntToDecimalStringN(txtPtr, gPSSData->displayMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3); txtPtr[0] = CHAR_SPACE; txtPtr[1] = EOS; - if (gPSSData->cursorMonItem != 0) - StringCopyPadded(gPSSData->cursorMonTexts[3], ItemId_GetName(gPSSData->cursorMonItem), CHAR_SPACE, 8); + if (gPSSData->displayMonItemId != 0) + StringCopyPadded(gPSSData->displayMonTexts[3], ItemId_GetName(gPSSData->displayMonItemId), CHAR_SPACE, 8); else - StringFill(gPSSData->cursorMonTexts[3], CHAR_SPACE, 8); + StringFill(gPSSData->displayMonTexts[3], CHAR_SPACE, 8); } } @@ -1165,9 +1165,9 @@ static u8 InBoxInput_Normal(void) { cursorArea = sBoxCursorArea; cursorPosition = sBoxCursorPosition; - gPSSData->field_CD2 = 0; - gPSSData->field_CD3 = 0; - gPSSData->field_CD7 = 0; + gPSSData->cursorVerticalWrap = 0; + gPSSData->cursorHorizontalWrap = 0; + gPSSData->cursorFlipTimer = 0; if (JOY_REPT(DPAD_UP)) { retVal = TRUE; @@ -1191,8 +1191,8 @@ static u8 InBoxInput_Normal(void) cursorArea = CURSOR_AREA_BUTTONS; cursorPosition -= IN_BOX_COUNT; cursorPosition /= 3; - gPSSData->field_CD2 = 1; - gPSSData->field_CD7 = 1; + gPSSData->cursorVerticalWrap = 1; + gPSSData->cursorFlipTimer = 1; } break; } @@ -1205,7 +1205,7 @@ static u8 InBoxInput_Normal(void) } else { - gPSSData->field_CD3 = -1; + gPSSData->cursorHorizontalWrap = -1; cursorPosition += (IN_BOX_ROWS - 1); } break; @@ -1219,7 +1219,7 @@ static u8 InBoxInput_Normal(void) } else { - gPSSData->field_CD3 = 1; + gPSSData->cursorHorizontalWrap = 1; cursorPosition -= (IN_BOX_ROWS - 1); } break; @@ -1355,12 +1355,12 @@ static u8 InBoxInput_GrabbingMultiple(void) if (sub_8095AA0() == sBoxCursorPosition) { gPSSData->inBoxMovingMode = 0; - gPSSData->field_CB8->invisible = FALSE; + gPSSData->cursorShadowSprite->invisible = FALSE; return 22; } else { - sIsMonBeingMoved = (gPSSData->cursorMonSpecies != SPECIES_NONE); + sIsMonBeingMoved = (gPSSData->displayMonSpecies != SPECIES_NONE); gPSSData->inBoxMovingMode = 2; sMovingMonOrigBoxId = StorageGetCurrentBox(); return 23; @@ -1460,9 +1460,9 @@ static u8 HandleInput_InParty(void) { cursorArea = sBoxCursorArea; cursorPosition = sBoxCursorPosition; - gPSSData->field_CD3 = 0; - gPSSData->field_CD2 = 0; - gPSSData->field_CD7 = 0; + gPSSData->cursorHorizontalWrap = 0; + gPSSData->cursorVerticalWrap = 0; + gPSSData->cursorFlipTimer = 0; gotoBox = FALSE; retVal = 0; @@ -1485,7 +1485,7 @@ static u8 HandleInput_InParty(void) else if (JOY_REPT(DPAD_LEFT) && sBoxCursorPosition != 0) { retVal = 1; - gPSSData->field_CD6 = sBoxCursorPosition; + gPSSData->cursorPrevHorizPos = sBoxCursorPosition; cursorPosition = 0; break; } @@ -1494,7 +1494,7 @@ static u8 HandleInput_InParty(void) if (sBoxCursorPosition == 0) { retVal = 1; - cursorPosition = gPSSData->field_CD6; + cursorPosition = gPSSData->cursorPrevHorizPos; } else { @@ -1580,16 +1580,16 @@ static u8 HandleInput_OnBox(void) do { - gPSSData->field_CD3 = 0; - gPSSData->field_CD2 = 0; - gPSSData->field_CD7 = 0; + gPSSData->cursorHorizontalWrap = 0; + gPSSData->cursorVerticalWrap = 0; + gPSSData->cursorFlipTimer = 0; if (JOY_REPT(DPAD_UP)) { retVal = 1; cursorArea = CURSOR_AREA_BUTTONS; cursorPosition = 0; - gPSSData->field_CD7 = 1; + gPSSData->cursorFlipTimer = 1; break; } else if (JOY_REPT(DPAD_DOWN)) @@ -1654,20 +1654,20 @@ static u8 HandleInput_OnButtons(void) { cursorArea = sBoxCursorArea; cursorPosition = sBoxCursorPosition; - gPSSData->field_CD3 = 0; - gPSSData->field_CD2 = 0; - gPSSData->field_CD7 = 0; + gPSSData->cursorHorizontalWrap = 0; + gPSSData->cursorVerticalWrap = 0; + gPSSData->cursorFlipTimer = 0; if (JOY_REPT(DPAD_UP)) { retVal = 1; cursorArea = CURSOR_AREA_IN_BOX; - gPSSData->field_CD2 = -1; + gPSSData->cursorVerticalWrap = -1; if (sBoxCursorPosition == 0) cursorPosition = IN_BOX_COUNT - 1 - 5; else cursorPosition = IN_BOX_COUNT - 1; - gPSSData->field_CD7 = 1; + gPSSData->cursorFlipTimer = 1; break; } else if (JOY_REPT(DPAD_DOWN | START_BUTTON)) @@ -1675,7 +1675,7 @@ static u8 HandleInput_OnButtons(void) retVal = 1; cursorArea = CURSOR_AREA_BOX; cursorPosition = 0; - gPSSData->field_CD7 = 1; + gPSSData->cursorFlipTimer = 1; break; } @@ -1816,21 +1816,21 @@ static bool8 sub_809494C(void) static bool8 sub_8094A0C(void) { - if (gPSSData->cursorMonSpecies == SPECIES_EGG) + if (gPSSData->displayMonSpecies == SPECIES_EGG) return FALSE; if (!IsActiveItemMoving()) { - if (gPSSData->cursorMonItem == ITEM_NONE) + if (gPSSData->displayMonItemId == ITEM_NONE) { - if (gPSSData->cursorMonSpecies == SPECIES_NONE) + if (gPSSData->displayMonSpecies == SPECIES_NONE) return FALSE; SetMenuText(PC_TEXT_GIVE2); } else { - if (!ItemIsMail(gPSSData->cursorMonItem)) + if (!ItemIsMail(gPSSData->displayMonItemId)) { SetMenuText(PC_TEXT_TAKE); SetMenuText(PC_TEXT_BAG); @@ -1840,16 +1840,16 @@ static bool8 sub_8094A0C(void) } else { - if (gPSSData->cursorMonItem == ITEM_NONE) + if (gPSSData->displayMonItemId == ITEM_NONE) { - if (gPSSData->cursorMonSpecies == SPECIES_NONE) + if (gPSSData->displayMonSpecies == SPECIES_NONE) return FALSE; SetMenuText(PC_TEXT_GIVE); } else { - if (ItemIsMail(gPSSData->cursorMonItem) == TRUE) + if (ItemIsMail(gPSSData->displayMonItemId) == TRUE) return FALSE; SetMenuText(PC_TEXT_SWITCH); @@ -1862,8 +1862,8 @@ static bool8 sub_8094A0C(void) static void sub_8094AB8(struct Sprite *sprite) { - sprite->x = gPSSData->field_CB4->x; - sprite->y = gPSSData->field_CB4->y + 20; + sprite->x = gPSSData->cursorSprite->x; + sprite->y = gPSSData->cursorSprite->y + 20; } static void sub_8094AD8(void) @@ -1940,22 +1940,22 @@ static void sub_8094AD8(void) LoadSpriteSheets(spriteSheets); LoadSpritePalettes(spritePalettes); - gPSSData->field_CD8[0] = IndexOfSpritePaletteTag(TAG_PAL_WAVEFORM); - gPSSData->field_CD8[1] = IndexOfSpritePaletteTag(TAG_PAL_DAC7); + gPSSData->cursorPalNums[0] = IndexOfSpritePaletteTag(TAG_PAL_WAVEFORM); + gPSSData->cursorPalNums[1] = IndexOfSpritePaletteTag(TAG_PAL_DAC7); sub_8092398(sBoxCursorArea, sBoxCursorPosition, &x, &y); spriteId = CreateSprite(&gSpriteTemplate_857BA50, x, y, 6); if (spriteId != MAX_SPRITES) { - gPSSData->field_CB4 = &gSprites[spriteId]; - gPSSData->field_CB4->oam.paletteNum = gPSSData->field_CD8[sCanOnlyMove]; - gPSSData->field_CB4->oam.priority = 1; + gPSSData->cursorSprite = &gSprites[spriteId]; + gPSSData->cursorSprite->oam.paletteNum = gPSSData->cursorPalNums[sCanOnlyMove]; + gPSSData->cursorSprite->oam.priority = 1; if (sIsMonBeingMoved) - StartSpriteAnim(gPSSData->field_CB4, 3); + StartSpriteAnim(gPSSData->cursorSprite, 3); } else { - gPSSData->field_CB4 = NULL; + gPSSData->cursorSprite = NULL; } if (sBoxCursorArea == CURSOR_AREA_IN_PARTY) @@ -1972,21 +1972,21 @@ static void sub_8094AD8(void) spriteId = CreateSprite(&gSpriteTemplate_857BA68, 0, 0, subpriority); if (spriteId != MAX_SPRITES) { - gPSSData->field_CB8 = &gSprites[spriteId]; - gPSSData->field_CB8->oam.priority = priority; + gPSSData->cursorShadowSprite = &gSprites[spriteId]; + gPSSData->cursorShadowSprite->oam.priority = priority; if (sBoxCursorArea) - gPSSData->field_CB8->invisible = 1; + gPSSData->cursorShadowSprite->invisible = 1; } else { - gPSSData->field_CB8 = NULL; + gPSSData->cursorShadowSprite = NULL; } } static void sub_8094C84(void) { sCanOnlyMove = !sCanOnlyMove; - gPSSData->field_CB4->oam.paletteNum = gPSSData->field_CD8[sCanOnlyMove]; + gPSSData->cursorSprite->oam.paletteNum = gPSSData->cursorPalNums[sCanOnlyMove]; } u8 GetBoxCursorPosition(void) @@ -2010,7 +2010,7 @@ void sub_8094CD4(u8 *arg0, u8 *arg1) void sub_8094D14(u8 animNum) { - StartSpriteAnim(gPSSData->field_CB4, animNum); + StartSpriteAnim(gPSSData->cursorSprite, animNum); } u8 sub_8094D34(void) @@ -2020,7 +2020,7 @@ u8 sub_8094D34(void) void sub_8094D40(void) { - gPSSData->field_CB4->oam.priority = 1; + gPSSData->cursorSprite->oam.priority = 1; } void sub_8094D60(void) diff --git a/src/pokemon_storage_system_6.c b/src/pokemon_storage_system_6.c index 9f40adc06..ab4849ba4 100644 --- a/src/pokemon_storage_system_6.c +++ b/src/pokemon_storage_system_6.c @@ -87,13 +87,13 @@ void AddMenu(void) gPSSData->menuWindow.height = 2 * gPSSData->menuItemsCount; gPSSData->menuWindow.tilemapLeft = 29 - gPSSData->menuWindow.width; gPSSData->menuWindow.tilemapTop = 15 - gPSSData->menuWindow.height; - gPSSData->field_CB0 = AddWindow(&gPSSData->menuWindow); - ClearWindowTilemap(gPSSData->field_CB0); - DrawStdFrameWithCustomTileAndPalette(gPSSData->field_CB0, FALSE, 0x00b, 14); - PrintTextArray(gPSSData->field_CB0, 1, 8, 2, 16, gPSSData->menuItemsCount, (void *)gPSSData->menuItems); - Menu_InitCursor(gPSSData->field_CB0, 1, 0, 2, 16, gPSSData->menuItemsCount, 0); + gPSSData->menuWindowId = AddWindow(&gPSSData->menuWindow); + ClearWindowTilemap(gPSSData->menuWindowId); + DrawStdFrameWithCustomTileAndPalette(gPSSData->menuWindowId, FALSE, 0x00b, 14); + PrintTextArray(gPSSData->menuWindowId, 1, 8, 2, 16, gPSSData->menuItemsCount, (void *)gPSSData->menuItems); + Menu_InitCursor(gPSSData->menuWindowId, 1, 0, 2, 16, gPSSData->menuItemsCount, 0); ScheduleBgCopyTilemapToVram(0); - gPSSData->field_CAE = 0; + gPSSData->menuUnusedField = 0; } bool8 sub_8094F90(void) @@ -142,6 +142,6 @@ s16 sub_8094F94(void) void sub_8095024(void) { - ClearStdWindowAndFrameToTransparent(gPSSData->field_CB0, TRUE); - RemoveWindow(gPSSData->field_CB0); + ClearStdWindowAndFrameToTransparent(gPSSData->menuWindowId, TRUE); + RemoveWindow(gPSSData->menuWindowId); } diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index 52c172505..02be5a7d6 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -20,13 +20,13 @@ static void sub_8096624(u8 id, bool8 show); static const u32 *GetItemIconPic(u16 itemId); static const u32 *GetItemIconPalette(u16 itemId); static void sub_8096898(u32 x); -static void sub_809692C(struct Sprite * sprite); -static void sub_8096958(struct Sprite * sprite); -static void sub_80969BC(struct Sprite * sprite); -static void sub_80969F4(struct Sprite * sprite); -static void sub_8096A74(struct Sprite * sprite); -static void sub_8096B10(struct Sprite * sprite); -static void sub_8096BAC(struct Sprite * sprite); +static void sub_809692C(struct Sprite *sprite); +static void sub_8096958(struct Sprite *sprite); +static void sub_80969BC(struct Sprite *sprite); +static void sub_80969F4(struct Sprite *sprite); +static void sub_8096A74(struct Sprite *sprite); +static void sub_8096B10(struct Sprite *sprite); +static void sub_8096BAC(struct Sprite *sprite); static const u32 gUnknown_83D35DC[] = INCBIN_U32("graphics/interface/pss_unk_83D35DC.4bpp"); @@ -215,7 +215,7 @@ void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos) SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); } - gPSSData->movingItem = gPSSData->cursorMonItem; + gPSSData->movingItem = gPSSData->displayMonItemId; } void sub_8095E2C(u16 item) @@ -560,7 +560,7 @@ void PrintItemDescription(void) if (IsActiveItemMoving()) description = ItemId_GetDescription(gPSSData->movingItem); else - description = ItemId_GetDescription(gPSSData->cursorMonItem); + description = ItemId_GetDescription(gPSSData->displayMonItemId); FillWindowPixelBuffer(2, PIXEL_FILL(1)); AddTextPrinterParameterized5(2, 2, description, 2, 0, 0, NULL, 0, 0); @@ -660,9 +660,9 @@ static void sub_8096958(struct Sprite *sprite) static void sub_80969BC(struct Sprite *sprite) { - sprite->x = gPSSData->field_CB4->x + 4; - sprite->y = gPSSData->field_CB4->y + gPSSData->field_CB4->y2 + 8; - sprite->oam.priority = gPSSData->field_CB4->oam.priority; + sprite->x = gPSSData->cursorSprite->x + 4; + sprite->y = gPSSData->cursorSprite->y + gPSSData->cursorSprite->y2 + 8; + sprite->oam.priority = gPSSData->cursorSprite->oam.priority; } static void sub_80969F4(struct Sprite *sprite) diff --git a/src/pokemon_storage_system_9.c b/src/pokemon_storage_system_9.c index 42fecfd97..d5f648765 100644 --- a/src/pokemon_storage_system_9.c +++ b/src/pokemon_storage_system_9.c @@ -2,12 +2,12 @@ #include "gflib.h" #include "pokemon_storage_system_internal.h" -static EWRAM_DATA struct UnkStruct_2000020 *gUnknown_203982C = NULL; +static EWRAM_DATA struct UnkUtil *gUnknown_203982C = NULL; -static void sub_8096CDC(struct UnkStruct_2000028 *unkStruct); -static void sub_8096D70(struct UnkStruct_2000028 *unkStruct); +static void sub_8096CDC(struct UnkUtilData *unkStruct); +static void sub_8096D70(struct UnkUtilData *unkStruct); -void sub_8096BE4(struct UnkStruct_2000020 *arg0, struct UnkStruct_2000028 *arg1, u32 arg2) +void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2) { gUnknown_203982C = arg0; arg0->unk_00 = arg1; @@ -23,7 +23,7 @@ void sub_8096BF8(void) { for (i = 0; i < gUnknown_203982C->unk_04; i++) { - struct UnkStruct_2000028 *unkStruct = &gUnknown_203982C->unk_00[i]; + struct UnkUtilData *unkStruct = &gUnknown_203982C->unk_00[i]; unkStruct->unk_0c(unkStruct); } @@ -33,7 +33,7 @@ void sub_8096BF8(void) static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) { - struct UnkStruct_2000028 *unkStruct; + struct UnkUtilData *unkStruct; if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) return FALSE; @@ -48,7 +48,7 @@ static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft return TRUE; } -static void sub_8096CDC(struct UnkStruct_2000028 *unkStruct) +static void sub_8096CDC(struct UnkUtilData *unkStruct) { u16 i; @@ -62,7 +62,7 @@ static void sub_8096CDC(struct UnkStruct_2000028 *unkStruct) static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) { - struct UnkStruct_2000028 *unkStruct; + struct UnkUtilData *unkStruct; if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) return FALSE; @@ -75,7 +75,7 @@ static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) return TRUE; } -static void sub_8096D70(struct UnkStruct_2000028 *unkStruct) +static void sub_8096D70(struct UnkUtilData *unkStruct) { u16 i; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index da4df9eff..2c36f8057 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -129,7 +129,7 @@ static void SwapMonMoveSlots(void); static void SwapBoxMonMoveSlots(void); static void UpdateCurrentMonBufferFromPartyOrBox(struct Pokemon * mon); static void PokeSum_SetMonPicSpriteCallback(u16 spriteId); -static void SpriteCB_MoveSelectionCursor(struct Sprite * sprite); +static void SpriteCB_MoveSelectionCursor(struct Sprite *sprite); static void UpdateMonStatusIconObj(void); static void UpdateHpBarObjs(void); static void UpdateExpBarObjs(void); @@ -238,7 +238,7 @@ struct PokemonSummaryScreenData } monList; MainCallback savedCallback; - struct Sprite * markingSprite; + struct Sprite *markingSprite; u8 ALIGNED(4) lastPageFlipDirection; /* 0x3300 */ u8 ALIGNED(4) unk3304; /* 0x3304 */ @@ -264,7 +264,7 @@ struct Struct203B144 struct ExpBarObjs { - struct Sprite * sprites[11]; /* 0x00 */ + struct Sprite *sprites[11]; /* 0x00 */ u16 xpos[11]; /* 0x2c */ u16 tileTag; /* 0x42 */ u16 palTag; /* 0x44 */ @@ -272,7 +272,7 @@ struct ExpBarObjs struct HpBarObjs { - struct Sprite * sprites[10]; /* 0x00 */ + struct Sprite *sprites[10]; /* 0x00 */ u16 xpos[10]; /* 0x28 */ u16 tileTag; /* 0x3c */ u16 palTag; /* 0x3e */ @@ -287,7 +287,7 @@ struct MonPicBounceState struct MoveSelectionCursor { - struct Sprite * sprite; /* 0x00 */ + struct Sprite *sprite; /* 0x00 */ u16 whichSprite; /* 0x04 */ u16 tileTag; /* 0x06 */ u16 palTag; /* 0x08 */ @@ -295,21 +295,21 @@ struct MoveSelectionCursor struct MonStatusIconObj { - struct Sprite * sprite; /* 0x00 */ + struct Sprite *sprite; /* 0x00 */ u16 tileTag; /* 0x04 */ u16 palTag; /* 0x06 */ }; struct PokerusIconObj { - struct Sprite * sprite; /* 0x00 */ + struct Sprite *sprite; /* 0x00 */ u16 tileTag; /* 0x04 */ u16 palTag; /* 0x06 */ }; struct ShinyStarObjData { - struct Sprite * sprite; /* 0x00 */ + struct Sprite *sprite; /* 0x00 */ u16 tileTag; /* 0x04 */ u16 palTag; /* 0x06 */ }; @@ -3914,7 +3914,7 @@ static void Task_InputHandler_SelectOrForgetMove(u8 taskId) } } -static void SpriteCB_PokeSum_MonPicSprite(struct Sprite * sprite) +static void SpriteCB_PokeSum_MonPicSprite(struct Sprite *sprite) { if (sMonSummaryScreen->numMonPicBounces >= 2) return; @@ -3954,7 +3954,7 @@ static void SpriteCB_PokeSum_MonPicSprite(struct Sprite * sprite) } } -static void SpriteCB_PokeSum_EggPicShake(struct Sprite * sprite) +static void SpriteCB_PokeSum_EggPicShake(struct Sprite *sprite) { if (sMonSummaryScreen->numMonPicBounces >= 2) return; @@ -4001,7 +4001,7 @@ static void SpriteCB_PokeSum_EggPicShake(struct Sprite * sprite) } } -static void SpriteCB_MonPicDummy(struct Sprite * sprite) +static void SpriteCB_MonPicDummy(struct Sprite *sprite) { } @@ -4187,7 +4187,7 @@ static void CreateMoveSelectionCursorObjs(u16 tileTag, u16 palTag) { u8 i; u8 spriteId; - void * gfxBufferPtrs[2]; + void *gfxBufferPtrs[2]; gfxBufferPtrs[0] = AllocZeroed(0x20 * 64); gfxBufferPtrs[1] = AllocZeroed(0x20 * 64); @@ -4245,7 +4245,7 @@ static void ShoworHideMoveSelectionCursor(bool8 invisible) sMoveSelectionCursorObjs[i]->sprite->invisible = invisible; } -static void SpriteCB_MoveSelectionCursor(struct Sprite * sprite) +static void SpriteCB_MoveSelectionCursor(struct Sprite *sprite) { u8 i; @@ -4304,7 +4304,7 @@ static void DestroyMoveSelectionCursorObjs(void) static void CreateMonStatusIconObj(u16 tileTag, u16 palTag) { u16 spriteId; - void * gfxBufferPtr; + void *gfxBufferPtr; sStatusIcon = AllocZeroed(sizeof(struct MonStatusIconObj)); gfxBufferPtr = AllocZeroed(0x20 * 32); @@ -4394,7 +4394,7 @@ static void CreateHpBarObjs(u16 tileTag, u16 palTag) { u8 i; u8 spriteId; - void * gfxBufferPtr; + void *gfxBufferPtr; u32 curHp; u32 maxHp; u8 hpBarPalTagOffset = 0; @@ -4554,7 +4554,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag) { u8 i; u8 spriteId; - void * gfxBufferPtr; + void *gfxBufferPtr; sExpBarObjs = AllocZeroed(sizeof(struct ExpBarObjs)); gfxBufferPtr = AllocZeroed(0x20 * 12); @@ -4685,7 +4685,7 @@ static void ShowOrHideExpBarObjs(u8 invisible) static void CreatePokerusIconObj(u16 tileTag, u16 palTag) { u16 spriteId; - void * gfxBufferPtr; + void *gfxBufferPtr; sPokerusIconObj = AllocZeroed(sizeof(struct PokerusIconObj)); gfxBufferPtr = AllocZeroed(0x20 * 1); @@ -4770,7 +4770,7 @@ static void HideShowPokerusIcon(bool8 invisible) static void CreateShinyStarObj(u16 tileTag, u16 palTag) { u16 spriteId; - void * gfxBufferPtr; + void *gfxBufferPtr; sShinyStarObjData = AllocZeroed(sizeof(struct ShinyStarObjData)); gfxBufferPtr = AllocZeroed(0x20 * 2); @@ -4881,7 +4881,7 @@ static void PokeSum_CreateMonMarkingsSprite(void) u32 markings = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MARKINGS); DestroySpriteAndFreeResources(sMonSummaryScreen->markingSprite); - sMonSummaryScreen->markingSprite = CreateMonMarkingSprite_SelectCombo(TAG_PSS_UNK_8C, TAG_PSS_UNK_8C, sMonMarkingSpritePalette); + sMonSummaryScreen->markingSprite = CreateMonMarkingAllCombosSprite(TAG_PSS_UNK_8C, TAG_PSS_UNK_8C, sMonMarkingSpritePalette); if (sMonSummaryScreen->markingSprite != NULL) { diff --git a/src/psychic.c b/src/psychic.c index bd1427e83..1c31bfdca 100644 --- a/src/psychic.c +++ b/src/psychic.c @@ -1017,7 +1017,7 @@ static void sub_80B3D78(u8 taskId) break; case 1: task->data[1] -= 4; - task->data[2] = 256 - (gSineTable[task->data[1]] >> 1);; + task->data[2] = 256 - (gSineTable[task->data[1]] >> 1); SetSpriteRotScale(task->data[15], task->data[2], task->data[2], 0); SetBattlerSpriteYOffsetFromOtherYScale(task->data[15], task->data[13]); if (task->data[1] == 0) diff --git a/src/quest_log.c b/src/quest_log.c index a950b9014..5614f834a 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -153,7 +153,7 @@ static const u16 sUnknown_8456638[] = INCBIN_U16("graphics/unknown/unknown_84566 static const u8 sQuestLogTextLineYCoords[] = {17, 10, 3}; -void SetQuestLogRecordAndPlaybackPointers(void * oldPointer) +void SetQuestLogRecordAndPlaybackPointers(void *oldPointer) { ptrdiff_t offset = (void *)gSaveBlock1Ptr - oldPointer; if (gUnknown_203AE04) @@ -201,10 +201,10 @@ void RunQuestLogCB(void) sQuestLogCB(); } -bool8 sub_8110944(const void * a0, size_t cmdSize) +bool8 sub_8110944(const void *a0, size_t cmdSize) { - void * r2 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].script; - void * r0 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end; + void *r2 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].script; + void *r0 = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end; r0 -= cmdSize; if ((const void *)a0 < r2 || (const void *)a0 > r0) return FALSE; @@ -213,8 +213,8 @@ bool8 sub_8110944(const void * a0, size_t cmdSize) bool8 WillCommandOfSizeFitInSav1Record(u16 *cursor, size_t size) { - void * start = gSaveBlock1Ptr->questLog[sCurrentSceneNum].script; - void * end = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end; + void *start = gSaveBlock1Ptr->questLog[sCurrentSceneNum].script; + void *end = gSaveBlock1Ptr->questLog[sCurrentSceneNum].end; end -= size; if ((void *)cursor < start || (void *)cursor > end) return FALSE; @@ -1645,9 +1645,9 @@ static const struct FlagOrVarRecord sDummyFlagOrVarRecord = { 0x7FFF }; -void * QuestLogGetFlagOrVarPtr(bool8 isFlag, u16 idx) +void *QuestLogGetFlagOrVarPtr(bool8 isFlag, u16 idx) { - void * response; + void *response; if (sQuestLogCursor == 0) return NULL; if (sQuestLogCursor >= sNumEventsInLogEntry) diff --git a/src/region_map.c b/src/region_map.c index 2f73db580..e897d3de3 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -116,7 +116,7 @@ struct GpuWindowParams struct SwitchMapMenuCursorSubsprite { u8 tiles[0x400]; - struct Sprite * sprite; + struct Sprite *sprite; u16 tileTag; u16 palTag; s16 x; @@ -176,7 +176,7 @@ struct DungeonMapPreview struct MapEdge { u16 tiles[0x200]; - struct Sprite * sprite; + struct Sprite *sprite; s16 x; s16 y; u16 tileTag; @@ -210,7 +210,7 @@ struct MapCursor u16 selectedMapsec; u16 selectedMapsecType; u16 selectedDungeonType; - struct Sprite * sprite; + struct Sprite *sprite; u16 tileTag; u16 palTag; u16 tiles[0x80]; @@ -220,7 +220,7 @@ struct PlayerIcon { s16 x; s16 y; - struct Sprite * sprite; + struct Sprite *sprite; u16 tileTag; u16 palTag; u16 tiles[0x40]; @@ -230,7 +230,7 @@ struct MapIconSprite { u32 unused; u8 region; - struct Sprite * sprite; + struct Sprite *sprite; u16 tileTag; u16 palTag; }; @@ -2277,7 +2277,7 @@ static bool8 HandleSwitchMapInput(void) return FALSE; } -static void SpriteCB_SwitchMapCursor(struct Sprite * sprite) +static void SpriteCB_SwitchMapCursor(struct Sprite *sprite) { sprite->y = sSwitchMapMenu->highlight.top + 16; } @@ -2619,7 +2619,7 @@ static bool8 UpdateDungeonMapPreview(bool8 a0) return FALSE; } -static void SpriteCB_MapEdge(struct Sprite * sprite) +static void SpriteCB_MapEdge(struct Sprite *sprite) { } @@ -3112,7 +3112,7 @@ static bool8 MoveMapEdgesInward(void) return FALSE; } -static void SpriteCB_MapCursor(struct Sprite * sprite) +static void SpriteCB_MapCursor(struct Sprite *sprite) { if (sMapCursor->moveCounter != 0) { diff --git a/src/seagallop.c b/src/seagallop.c index 79f837df7..2f6377c8b 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -18,7 +18,7 @@ #define PALTAG_FERRY_WAKE 3000 -static EWRAM_DATA void * sBg3TilemapBuffer = NULL; +static EWRAM_DATA void *sBg3TilemapBuffer = NULL; static void CB2_SetUpSeagallopScene(void); static void VBlankCB_SeaGallop(void); @@ -34,9 +34,9 @@ static void ResetBGPos(void); static void LoadFerrySpriteResources(void); static void FreeFerrySpriteResources(void); static void CreateFerrySprite(void); -static void SpriteCB_Ferry(struct Sprite * sprite); +static void SpriteCB_Ferry(struct Sprite *sprite); static void CreateWakeSprite(s16 x); -static void SpriteCB_Wake(struct Sprite * sprite); +static void SpriteCB_Wake(struct Sprite *sprite); static bool8 GetDirectionOfTravel(void); static const u16 sWaterTiles[] = INCBIN_U16("graphics/seagallop/water.4bpp"); @@ -328,7 +328,7 @@ static void Task_Seagallop_3(void) static void ResetGPU(void) { - void * dest = (void *) VRAM; + void *dest = (void *) VRAM; DmaClearLarge16(3, dest, VRAM_SIZE, 0x1000); DmaClear32(3, (void *)OAM, OAM_SIZE); @@ -410,7 +410,7 @@ static void CreateFerrySprite(void) } } -static void SpriteCB_Ferry(struct Sprite * sprite) +static void SpriteCB_Ferry(struct Sprite *sprite) { sprite->data[1] += sprite->data[0]; sprite->x2 = sprite->data[1] >> 4; @@ -437,7 +437,7 @@ static void CreateWakeSprite(s16 x) } } -static void SpriteCB_Wake(struct Sprite * sprite) +static void SpriteCB_Wake(struct Sprite *sprite) { if (sprite->animEnded) { diff --git a/src/slot_machine.c b/src/slot_machine.c index 24a728046..7c8392c78 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -75,10 +75,10 @@ struct SlotMachineState struct SlotMachineGfxManager { u32 field_00[3]; - struct Sprite * reelIconSprites[3][5]; - struct Sprite * creditDigitSprites[4]; - struct Sprite * payoutDigitSprites[4]; - struct Sprite * clefairySprites[2]; + struct Sprite *reelIconSprites[3][5]; + struct Sprite *creditDigitSprites[4]; + struct Sprite *payoutDigitSprites[4]; + struct Sprite *clefairySprites[2]; vu16 * reelIconAffineParamPtr; }; @@ -1743,7 +1743,7 @@ static void InitGfxManager(struct SlotMachineGfxManager * manager) static void CreateReelIconSprites(void) { - struct Sprite * sprite; + struct Sprite *sprite; s32 i, j; s32 spriteId; s32 animId; @@ -1781,12 +1781,12 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) sSlotMachineGfxManager->reelIconSprites[i][j]->y2 = ypos; { s32 animId = sReelIconAnimByReelAndPos[i][reelPos]; - struct Sprite * sprite = sSlotMachineGfxManager->reelIconSprites[i][j]; + struct Sprite *sprite = sSlotMachineGfxManager->reelIconSprites[i][j]; StartSpriteAnim(sprite, animId); } { s32 animId = sReelIconAnimByReelAndPos[i][reelPos]; - struct Sprite * sprite = sSlotMachineGfxManager->reelIconSprites[i][j]; + struct Sprite *sprite = sSlotMachineGfxManager->reelIconSprites[i][j]; StartSpriteAnim(sprite, animId); } sSlotMachineGfxManager->reelIconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag(sReelIconPaletteTags[sReelIconAnimByReelAndPos[i][reelPos]]); diff --git a/src/smokescreen.c b/src/smokescreen.c index 2f269737e..c1d30a347 100644 --- a/src/smokescreen.c +++ b/src/smokescreen.c @@ -2,7 +2,7 @@ #include "decompress.h" #include "util.h" -static void SmokescreenImpact_Callback(struct Sprite * sprite); +static void SmokescreenImpact_Callback(struct Sprite *sprite); extern const struct CompressedSpriteSheet gSmokescreenImpactSpriteSheet; extern const struct CompressedSpritePalette gSmokescreenImpactSpritePalette; diff --git a/src/ss_anne.c b/src/ss_anne.c index ed7666fd3..78ed5b48b 100644 --- a/src/ss_anne.c +++ b/src/ss_anne.c @@ -14,9 +14,9 @@ static void Task_SSAnneInit(u8 taskId); static void Task_SSAnneRun(u8 taskId); static void Task_SSAnneFinish(u8 taskId); static void CreateWakeBehindBoat(void); -static void WakeSpriteCallback(struct Sprite * sprite); +static void WakeSpriteCallback(struct Sprite *sprite); static void CreateSmokeSprite(void); -static void SmokeSpriteCallback(struct Sprite * sprite); +static void SmokeSpriteCallback(struct Sprite *sprite); static const u16 sWakeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479838.4bpp"); static const u16 sSmokeTiles[] = INCBIN_U16("graphics/ss_anne/unk_8479A38.4bpp"); @@ -156,7 +156,7 @@ static void CreateWakeBehindBoat(void) gSprites[spriteId].oam.paletteNum = 10; } -static void WakeSpriteCallback(struct Sprite * sprite) +static void WakeSpriteCallback(struct Sprite *sprite) { u8 objectEventId; struct ObjectEvent * boatObject; @@ -191,7 +191,7 @@ static void CreateSmokeSprite(void) } } -static void SmokeSpriteCallback(struct Sprite * sprite) +static void SmokeSpriteCallback(struct Sprite *sprite) { sprite->data[0]++; sprite->x2 = sprite->data[0] / 4; diff --git a/src/teachy_tv.c b/src/teachy_tv.c index f18fe056d..75daa080b 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -781,7 +781,7 @@ static void TTVcmd_ClearBg2TeachyTvGraphic(u8 taskId) static void TTVcmd_NpcMoveAndSetupTextPrinter(u8 taskId) { s16 * data = gTasks[taskId].data; - struct Sprite * spriteAddr = &gSprites[data[1]]; + struct Sprite *spriteAddr = &gSprites[data[1]]; if (data[2] != 35) ++data[2]; else { @@ -1220,8 +1220,8 @@ static void TeachyTvLoadBg3Map(u16 *buffer) u8 * mapTilesRowBuffer; u16 i, j, k; u16 currentBlockIdx; - void * tilesetsBuffer; - void * palIndicesBuffer; + void *tilesetsBuffer; + void *palIndicesBuffer; u16 numMapTilesRows = 0; const struct MapLayout *layout = &Route1_Layout; u16 * blockIndicesBuffer = AllocZeroed(0x800); diff --git a/src/text_printer.c b/src/text_printer.c index a701bd671..329463859 100644 --- a/src/text_printer.c +++ b/src/text_printer.c @@ -275,7 +275,7 @@ void CopyGlyphToWindow(struct TextPrinter *textPrinter) } } -void sub_8003614(void * tileData, u16 currentX, u16 currentY, u16 width, u16 height) +void sub_8003614(void *tileData, u16 currentX, u16 currentY, u16 width, u16 height) { int r0, r1; u8 r2; diff --git a/src/text_window_graphics.c b/src/text_window_graphics.c index 0fb8b38f8..554c9e37a 100644 --- a/src/text_window_graphics.c +++ b/src/text_window_graphics.c @@ -51,7 +51,7 @@ const struct TextWindowGraphics gUserFrames[] = { {gUnknown_84717CC, gUnknown_8471A2C} }; // NELEMS = 10 -const struct TextWindowGraphics * GetUserFrameGraphicsInfo(u8 idx) +const struct TextWindowGraphics *GetWindowFrameTilesPal(u8 idx) { if (idx >= 20) // if (idx >= NELEMS(gUserFrames)) return &gUserFrames[0]; diff --git a/src/title_screen.c b/src/title_screen.c index 80c7ce193..86e0427cb 100644 --- a/src/title_screen.c +++ b/src/title_screen.c @@ -54,7 +54,7 @@ static void UpdateScanlineEffectRegBuffer(s16 a0); static void ScheduleStopScanlineEffect(void); static void LoadMainTitleScreenPalsAndResetBgs(void); static void CB2_FadeOutTransitionToSaveClearScreen(void); -static void SpriteCallback_TitleScreenFlameOrLeaf(struct Sprite * sprite); +static void SpriteCallback_TitleScreenFlameOrLeaf(struct Sprite *sprite); static void CB2_FadeOutTransitionToBerryFix(void); static void LoadSpriteGfxAndPals(void); static void Task_FlameOrLeafSpawner(u8 taskId); @@ -65,7 +65,7 @@ static void SetPalOnOrCreateBlankSprite(bool32 a0); static u8 CreateSlashSprite(void); static void ScheduleHideSlashSprite(u8 spriteId); static bool32 IsSlashSpriteHidden(u8 spriteId); -static void SpriteCallback_Slash(struct Sprite * sprite); +static void SpriteCallback_Slash(struct Sprite *sprite); // bg3 static const u8 sBorderBgTiles[] = INCBIN_U8("graphics/title_screen/border_bg.4bpp.lz"); @@ -909,7 +909,7 @@ static void LoadSpriteGfxAndPals(void) LoadSpritePalettes(sSpritePals); } -static void SpriteCallback_TitleScreenFlameOrLeaf(struct Sprite * sprite) +static void SpriteCallback_TitleScreenFlameOrLeaf(struct Sprite *sprite) { s16 * data = sprite->data; sprite->data[0] -= data[1]; @@ -1044,7 +1044,7 @@ static void CreateFlameOrLeafSprite(s32 y0, s32 x1, s32 y1) } } -static void SpriteCallback_LG_8079800(struct Sprite * sprite) +static void SpriteCallback_LG_8079800(struct Sprite *sprite) { sprite->x -= 7; if (sprite->x < -16) @@ -1170,7 +1170,7 @@ static bool32 IsSlashSpriteHidden(u8 spriteId) return FALSE; } -static void SpriteCallback_Slash(struct Sprite * sprite) +static void SpriteCallback_Slash(struct Sprite *sprite) { switch (sprite->data[0]) { diff --git a/src/tm_case.c b/src/tm_case.c index 3c0e31d60..d7ffee5a3 100644 --- a/src/tm_case.c +++ b/src/tm_case.c @@ -61,7 +61,7 @@ struct UnkStruct_203B11C static EWRAM_DATA struct UnkStruct_203B10C sTMCaseStaticResources = {}; static EWRAM_DATA struct UnkStruct_203B118 * sTMCaseDynamicResources = NULL; static EWRAM_DATA struct UnkStruct_203B11C * sPokedudePackBackup = NULL; -static EWRAM_DATA void * sTilemapBuffer = NULL; // tilemap buffer +static EWRAM_DATA void *sTilemapBuffer = NULL; // tilemap buffer static EWRAM_DATA struct ListMenuItem * sListMenuItemsBuffer = NULL; static EWRAM_DATA u8 (* sListMenuStringsBuffer)[29] = NULL; static EWRAM_DATA u16 * sTMSpritePaletteBuffer = NULL; @@ -121,11 +121,11 @@ static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable * ptrs) static u8 AddTMContextMenu(u8 * a0, u8 a1); static void RemoveTMContextMenu(u8 * a0); static u8 CreateTMSprite(u16 itemId); -static void SetTMSpriteAnim(struct Sprite * sprite, u8 var); +static void SetTMSpriteAnim(struct Sprite *sprite, u8 var); static void TintTMSpriteByType(u8 type); -static void UpdateTMSpritePosition(struct Sprite * sprite, u8 var); +static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var); static void InitSelectedTMSpriteData(u8 a0, u16 itemId); -static void SpriteCB_MoveTMSpriteInCase(struct Sprite * sprite); +static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite); static void LoadTMTypePalettes(void); static const struct BgTemplate sBGTemplates[] = { @@ -1439,7 +1439,7 @@ static u8 CreateTMSprite(u16 itemId) } } -static void SetTMSpriteAnim(struct Sprite * sprite, u8 idx) +static void SetTMSpriteAnim(struct Sprite *sprite, u8 idx) { if (idx >= 50) StartSpriteAnim(sprite, 1); @@ -1457,7 +1457,7 @@ static void TintTMSpriteByType(u8 type) } } -static void UpdateTMSpritePosition(struct Sprite * sprite, u8 var) +static void UpdateTMSpritePosition(struct Sprite *sprite, u8 var) { s32 x, y; if (var == 0xFF) @@ -1486,7 +1486,7 @@ static void InitSelectedTMSpriteData(u8 spriteId, u16 itemId) gSprites[spriteId].callback = SpriteCB_MoveTMSpriteInCase; } -static void SpriteCB_MoveTMSpriteInCase(struct Sprite * sprite) +static void SpriteCB_MoveTMSpriteInCase(struct Sprite *sprite) { switch (sprite->data[1]) { diff --git a/src/trade_scene.c b/src/trade_scene.c index 07edfe8c0..c4acdc38a 100644 --- a/src/trade_scene.c +++ b/src/trade_scene.c @@ -112,12 +112,12 @@ struct TradeAnimationResources { static EWRAM_DATA struct TradeAnimationResources * sTradeData = NULL; -static void SpriteCB_TradeGlowCable(struct Sprite * sprite); -static void SpriteCB_TradeGlowWireless(struct Sprite * sprite); -static void SpriteCB_TradeGlowCore(struct Sprite * sprite); -static void SpriteCB_GameLinkCableEnd_Outbound(struct Sprite * sprite); -static void SpriteCB_GameLinkCableEnd_Inbound(struct Sprite * sprite); -static void SpriteCB_TradeGBAScreen(struct Sprite * sprite); +static void SpriteCB_TradeGlowCable(struct Sprite *sprite); +static void SpriteCB_TradeGlowWireless(struct Sprite *sprite); +static void SpriteCB_TradeGlowCore(struct Sprite *sprite); +static void SpriteCB_GameLinkCableEnd_Outbound(struct Sprite *sprite); +static void SpriteCB_GameLinkCableEnd_Inbound(struct Sprite *sprite); +static void SpriteCB_TradeGBAScreen(struct Sprite *sprite); static void TradeAnimInit_LoadGfx(void); static void CB2_RunTradeAnim_InGameTrade(void); static void SetTradeSequenceBgGpuRegs(u8 idx); @@ -126,10 +126,10 @@ static void TradeBufferOTnameAndNicknames(void); static u8 DoTradeAnim(void); static u8 DoTradeAnim_Cable(void); static u8 DoTradeAnim_Wireless(void); -static void SpriteCB_TradePokeball_Default(struct Sprite * sprite); -static void SpriteCB_TradePokeball_Outbound(struct Sprite * sprite); -static void SpriteCB_TradePokeball_Outbound2(struct Sprite * sprite); -static void SpriteCB_TradePokeball_Inbound(struct Sprite * sprite); +static void SpriteCB_TradePokeball_Default(struct Sprite *sprite); +static void SpriteCB_TradePokeball_Outbound(struct Sprite *sprite); +static void SpriteCB_TradePokeball_Outbound2(struct Sprite *sprite); +static void SpriteCB_TradePokeball_Inbound(struct Sprite *sprite); static void BufferInGameTradeMonName(void); static void GetInGameTradeMail(struct Mail * mail, const struct InGameTrade * inGameTrade); static void CB2_RunTradeAnim_LinkTrade(void); @@ -591,7 +591,7 @@ static const u8 sWirelessSignalAnimParams[][2] = { }; // Sprite callback for link cable trade glow -static void SpriteCB_TradeGlowCable(struct Sprite * sprite) +static void SpriteCB_TradeGlowCable(struct Sprite *sprite) { sprite->data[0]++; if (sprite->data[0] == 10) @@ -602,7 +602,7 @@ static void SpriteCB_TradeGlowCable(struct Sprite * sprite) } // Sprite callback for wireless trade glow -static void SpriteCB_TradeGlowWireless(struct Sprite * sprite) +static void SpriteCB_TradeGlowWireless(struct Sprite *sprite) { if (!sprite->invisible) { @@ -616,7 +616,7 @@ static void SpriteCB_TradeGlowWireless(struct Sprite * sprite) } // Palette flash for trade glow core -static void SpriteCB_TradeGlowCore(struct Sprite * sprite) +static void SpriteCB_TradeGlowCore(struct Sprite *sprite) { if (sprite->data[1] == 0) { @@ -628,7 +628,7 @@ static void SpriteCB_TradeGlowCore(struct Sprite * sprite) } // Move down for 10 frames -static void SpriteCB_GameLinkCableEnd_Outbound(struct Sprite * sprite) +static void SpriteCB_GameLinkCableEnd_Outbound(struct Sprite *sprite) { sprite->data[0]++; sprite->y2++; @@ -637,7 +637,7 @@ static void SpriteCB_GameLinkCableEnd_Outbound(struct Sprite * sprite) } // Move up for 10 frames -static void SpriteCB_GameLinkCableEnd_Inbound(struct Sprite * sprite) +static void SpriteCB_GameLinkCableEnd_Inbound(struct Sprite *sprite) { sprite->data[0]++; sprite->y2--; @@ -646,7 +646,7 @@ static void SpriteCB_GameLinkCableEnd_Inbound(struct Sprite * sprite) } // Play a sound every 15 frames -static void SpriteCB_TradeGBAScreen(struct Sprite * sprite) +static void SpriteCB_TradeGBAScreen(struct Sprite *sprite) { sprite->data[0]++; if (sprite->data[0] == 15) @@ -2326,7 +2326,7 @@ static void HandleLinkDataReceive(void) } } -static void SpriteCB_TradePokeball_Default(struct Sprite * sprite) +static void SpriteCB_TradePokeball_Default(struct Sprite *sprite) { sprite->y += sprite->data[0] / 10; sprite->data[5] += sprite->data[1]; @@ -2347,7 +2347,7 @@ static void SpriteCB_TradePokeball_Default(struct Sprite * sprite) } } -static void SpriteCB_TradePokeball_Outbound(struct Sprite * sprite) +static void SpriteCB_TradePokeball_Outbound(struct Sprite *sprite) { sprite->y2 += sTradeBallVerticalVelocityTable[sprite->data[0]]; if (sprite->data[0] == 22) @@ -2362,7 +2362,7 @@ static void SpriteCB_TradePokeball_Outbound(struct Sprite * sprite) } } -static void SpriteCB_TradePokeball_Outbound2(struct Sprite * sprite) +static void SpriteCB_TradePokeball_Outbound2(struct Sprite *sprite) { if (sprite->data[1] == 20) StartSpriteAffineAnim(sprite, 1); @@ -2379,7 +2379,7 @@ static void SpriteCB_TradePokeball_Outbound2(struct Sprite * sprite) } } -static void SpriteCB_TradePokeball_Inbound(struct Sprite * sprite) +static void SpriteCB_TradePokeball_Inbound(struct Sprite *sprite) { if (sprite->data[2] == 0) { diff --git a/src/trainer_see.c b/src/trainer_see.c index e884d6104..82a35c2db 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -40,7 +40,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, stru static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); static void Task_DestroyTrainerApproachTask(u8 taskId); -static void SpriteCB_TrainerIcons(struct Sprite * sprite); +static void SpriteCB_TrainerIcons(struct Sprite *sprite); static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum); static const u16 sGfx_Emoticons[] = INCBIN_U16("graphics/misc/emoticons.4bpp"); diff --git a/src/union_room_chat_objects.c b/src/union_room_chat_objects.c index 51c1f2198..24590c67a 100644 --- a/src/union_room_chat_objects.c +++ b/src/union_room_chat_objects.c @@ -16,8 +16,8 @@ struct UnionRoomChat3 static EWRAM_DATA struct UnionRoomChat3 *sWork = NULL; -static void SpriteCB_TextEntryCursor(struct Sprite * sprite); -static void SpriteCB_CharacterSelectCursor(struct Sprite * sprite); +static void SpriteCB_TextEntryCursor(struct Sprite *sprite); +static void SpriteCB_CharacterSelectCursor(struct Sprite *sprite); static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/unk_845AC14.gbapal"); static const u32 sSelectorCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AC34.4bpp.lz"); diff --git a/tools/gbagfx/huff.c b/tools/gbagfx/huff.c index 143ed79be..c6c23cbb3 100644 --- a/tools/gbagfx/huff.c +++ b/tools/gbagfx/huff.c @@ -6,21 +6,21 @@ #include "global.h" #include "huff.h" -static int cmp_tree(const void * a0, const void * b0) { +static int cmp_tree(const void *a0, const void *b0) { return ((struct HuffData *)a0)->value - ((struct HuffData *)b0)->value; } typedef int (*cmpfun)(const void *, const void *); -int msort_r(void * data, size_t count, size_t size, cmpfun cmp, void * buffer) { +int msort_r(void *data, size_t count, size_t size, cmpfun cmp, void *buffer) { /* * Out-of-place mergesort (stable sort) * Returns 1 on success, 0 on failure */ - void * leftPtr; - void * rightPtr; - void * leftEnd; - void * rightEnd; + void *leftPtr; + void *rightPtr; + void *leftEnd; + void *rightEnd; int i; switch (count) { @@ -85,8 +85,8 @@ int msort_r(void * data, size_t count, size_t size, cmpfun cmp, void * buffer) { return 1; } -int msort(void * data, size_t count, size_t size, cmpfun cmp) { - void * buffer = malloc(count * size); +int msort(void *data, size_t count, size_t size, cmpfun cmp) { + void *buffer = malloc(count * size); if (buffer == NULL) return 0; int result = msort_r(data, count, size, cmp, buffer); free(buffer); From bcfebc7de4b84b149ccdef6cb025ed79a6578127 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sat, 30 Jul 2022 13:11:02 -0400 Subject: [PATCH 06/13] Review changes --- src/battle_records.c | 2 +- src/cable_club.c | 8 +- src/event_object_lock.c | 2 +- src/fame_checker.c | 4 +- src/field_effect.c | 338 +++++++++++++++++++------------------- src/field_player_avatar.c | 52 +++--- src/field_specials.c | 14 +- src/map_name_popup.c | 2 +- src/naming_screen.c | 18 +- src/script_menu.c | 6 +- src/seagallop.c | 2 +- src/trainer_see.c | 62 +++---- src/vs_seeker.c | 2 +- 13 files changed, 256 insertions(+), 256 deletions(-) diff --git a/src/battle_records.c b/src/battle_records.c index 991767140..740ede597 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -167,7 +167,7 @@ static void Task_WaitFadeIn(u8 taskId) static void Task_WaitButton(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON)) { diff --git a/src/cable_club.c b/src/cable_club.c index fabbaf00a..cf54d360e 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -580,7 +580,7 @@ void CableClub_AskSaveTheGame(void) static void Task_StartWiredCableClubBattle(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: @@ -772,7 +772,7 @@ void ExitLinkRoom(void) static void Task_EnterCableClubSeat(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: @@ -821,7 +821,7 @@ static void CreateEnterCableClubSeatTaskWithFollowupFunc(TaskFunc followUpFunc) static void Task_StartWiredCableClubTrade(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: @@ -936,7 +936,7 @@ bool32 GetSeeingLinkPlayerCardMsg(u8 who) void Task_WaitForReceivedRemoteLinkPlayers5SecondTimeout(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; task->data[0]++; if (task->data[0] > 300) { diff --git a/src/event_object_lock.c b/src/event_object_lock.c index c578905f3..073e243a1 100644 --- a/src/event_object_lock.c +++ b/src/event_object_lock.c @@ -42,7 +42,7 @@ void ScriptFreezeObjectEvents(void) void Task_WaitPlayerAndTargetNPCStopMoving(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; if (task->data[0] == 0 && walkrun_is_standing_still() == TRUE) { diff --git a/src/fame_checker.c b/src/fame_checker.c index 6bad8f81b..1f4be5af0 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -1503,7 +1503,7 @@ static void FC_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu *list static void Task_SwitchToPickMode(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; task->data[2] = CreatePersonPicSprite(sFameCheckerData->unlockedPersons[sLastMenuIdx]); gSprites[task->data[2]].data[0] = 0; GetPickModeText(); @@ -1642,7 +1642,7 @@ static void HandleFlavorTextModeSwitch(bool8 state) static void Task_FCOpenOrCloseInfoBox(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: diff --git a/src/field_effect.c b/src/field_effect.c index cbcc4b1d8..541ceba13 100644 --- a/src/field_effect.c +++ b/src/field_effect.c @@ -161,7 +161,7 @@ static const union AnimCmd *const sNewGameOakAnimTable[] = { static const struct SpriteTemplate sNewGameOakObjectTemplate = { .tileTag = TAG_NONE, - .paletteTag = 4102, + .paletteTag = 0x1006, .oam = &sNewGameOakOamAttributes, .anims = sNewGameOakAnimTable, .images = sNewGameOakObjectSpriteFrames, @@ -1133,15 +1133,15 @@ static void Task_FlyIntoMap(u8 taskId) } static void Task_FallWarpFieldEffect(u8 taskId); -static bool8 FallWarpEffect_1(struct Task * task); -static bool8 FallWarpEffect_2(struct Task * task); -static bool8 FallWarpEffect_3(struct Task * task); -static bool8 FallWarpEffect_4(struct Task * task); -static bool8 FallWarpEffect_5(struct Task * task); -static bool8 FallWarpEffect_6(struct Task * task); -static bool8 FallWarpEffect_7(struct Task * task); +static bool8 FallWarpEffect_1(struct Task *task); +static bool8 FallWarpEffect_2(struct Task *task); +static bool8 FallWarpEffect_3(struct Task *task); +static bool8 FallWarpEffect_4(struct Task *task); +static bool8 FallWarpEffect_5(struct Task *task); +static bool8 FallWarpEffect_6(struct Task *task); +static bool8 FallWarpEffect_7(struct Task *task); -static bool8 (*const sFallWarpEffectCBPtrs[])(struct Task * task) = { +static bool8 (*const sFallWarpEffectCBPtrs[])(struct Task *task) = { FallWarpEffect_1, FallWarpEffect_2, FallWarpEffect_3, @@ -1164,12 +1164,12 @@ void FieldCB_FallWarpExit(void) static void Task_FallWarpFieldEffect(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; while (sFallWarpEffectCBPtrs[task->data[0]](task)) ; } -static bool8 FallWarpEffect_1(struct Task * task) +static bool8 FallWarpEffect_1(struct Task *task) { struct ObjectEvent * playerObject; struct Sprite *playerSprite; @@ -1187,7 +1187,7 @@ static bool8 FallWarpEffect_1(struct Task * task) return TRUE; } -static bool8 FallWarpEffect_2(struct Task * task) +static bool8 FallWarpEffect_2(struct Task *task) { if (IsWeatherNotFadingIn()) { @@ -1196,7 +1196,7 @@ static bool8 FallWarpEffect_2(struct Task * task) return FALSE; } -static bool8 FallWarpEffect_3(struct Task * task) +static bool8 FallWarpEffect_3(struct Task *task) { struct Sprite *sprite; s16 centerToCornerVecY; @@ -1211,7 +1211,7 @@ static bool8 FallWarpEffect_3(struct Task * task) return FALSE; } -static bool8 FallWarpEffect_4(struct Task * task) +static bool8 FallWarpEffect_4(struct Task *task) { struct ObjectEvent * objectEvent; struct Sprite *sprite; @@ -1245,7 +1245,7 @@ static bool8 FallWarpEffect_4(struct Task * task) return FALSE; } -static bool8 FallWarpEffect_5(struct Task * task) +static bool8 FallWarpEffect_5(struct Task *task) { task->data[0]++; task->data[1] = 4; @@ -1254,7 +1254,7 @@ static bool8 FallWarpEffect_5(struct Task * task) return TRUE; } -static bool8 FallWarpEffect_6(struct Task * task) +static bool8 FallWarpEffect_6(struct Task *task) { SetCameraPanning(0, task->data[1]); task->data[1] = -task->data[1]; @@ -1270,7 +1270,7 @@ static bool8 FallWarpEffect_6(struct Task * task) return FALSE; } -static bool8 FallWarpEffect_7(struct Task * task) +static bool8 FallWarpEffect_7(struct Task *task) { s16 x, y; gPlayerAvatar.preventStep = FALSE; @@ -1290,27 +1290,27 @@ static bool8 FallWarpEffect_7(struct Task * task) } static void Task_EscalatorWarpFieldEffect(u8 taskId); -static bool8 EscalatorWarpEffect_1(struct Task * task); -static bool8 EscalatorWarpEffect_2(struct Task * task); -static bool8 EscalatorWarpEffect_3(struct Task * task); -static bool8 EscalatorWarpEffect_4(struct Task * task); -static bool8 EscalatorWarpEffect_5(struct Task * task); -static bool8 EscalatorWarpEffect_6(struct Task * task); -static void Escalator_AnimatePlayerGoingDown(struct Task * task); -static void Escalator_AnimatePlayerGoingUp(struct Task * task); +static bool8 EscalatorWarpEffect_1(struct Task *task); +static bool8 EscalatorWarpEffect_2(struct Task *task); +static bool8 EscalatorWarpEffect_3(struct Task *task); +static bool8 EscalatorWarpEffect_4(struct Task *task); +static bool8 EscalatorWarpEffect_5(struct Task *task); +static bool8 EscalatorWarpEffect_6(struct Task *task); +static void Escalator_AnimatePlayerGoingDown(struct Task *task); +static void Escalator_AnimatePlayerGoingUp(struct Task *task); static void Escalator_BeginFadeOutToNewMap(void); static void Escalator_TransitionToWarpInEffect(void); static void FieldCB_EscalatorWarpIn(void); static void Task_EscalatorWarpInFieldEffect(u8 taskId); -static bool8 EscalatorWarpInEffect_1(struct Task * task); -static bool8 EscalatorWarpInEffect_2(struct Task * task); -static bool8 EscalatorWarpInEffect_3(struct Task * task); -static bool8 EscalatorWarpInEffect_4(struct Task * task); -static bool8 EscalatorWarpInEffect_5(struct Task * task); -static bool8 EscalatorWarpInEffect_6(struct Task * task); -static bool8 EscalatorWarpInEffect_7(struct Task * task); +static bool8 EscalatorWarpInEffect_1(struct Task *task); +static bool8 EscalatorWarpInEffect_2(struct Task *task); +static bool8 EscalatorWarpInEffect_3(struct Task *task); +static bool8 EscalatorWarpInEffect_4(struct Task *task); +static bool8 EscalatorWarpInEffect_5(struct Task *task); +static bool8 EscalatorWarpInEffect_6(struct Task *task); +static bool8 EscalatorWarpInEffect_7(struct Task *task); -static bool8 (*const sEscalatorWarpFieldEffectFuncs[])(struct Task * task) = { +static bool8 (*const sEscalatorWarpFieldEffectFuncs[])(struct Task *task) = { EscalatorWarpEffect_1, EscalatorWarpEffect_2, EscalatorWarpEffect_3, @@ -1329,12 +1329,12 @@ void StartEscalatorWarp(u8 metatileBehavior, u8 priority) static void Task_EscalatorWarpFieldEffect(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; while (sEscalatorWarpFieldEffectFuncs[task->data[0]](task)) ; } -static bool8 EscalatorWarpEffect_1(struct Task * task) +static bool8 EscalatorWarpEffect_1(struct Task *task) { FreezeObjectEvents(); CameraObjectReset2(); @@ -1344,7 +1344,7 @@ static bool8 EscalatorWarpEffect_1(struct Task * task) return FALSE; } -static bool8 EscalatorWarpEffect_2(struct Task * task) +static bool8 EscalatorWarpEffect_2(struct Task *task) { struct ObjectEvent * objectEvent; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -1363,7 +1363,7 @@ static bool8 EscalatorWarpEffect_2(struct Task * task) return FALSE; } -static bool8 EscalatorWarpEffect_3(struct Task * task) +static bool8 EscalatorWarpEffect_3(struct Task *task) { Escalator_AnimatePlayerGoingDown(task); if (task->data[2] > 3) @@ -1374,14 +1374,14 @@ static bool8 EscalatorWarpEffect_3(struct Task * task) return FALSE; } -static bool8 EscalatorWarpEffect_4(struct Task * task) +static bool8 EscalatorWarpEffect_4(struct Task *task) { Escalator_AnimatePlayerGoingDown(task); Escalator_TransitionToWarpInEffect(); return FALSE; } -static bool8 EscalatorWarpEffect_5(struct Task * task) +static bool8 EscalatorWarpEffect_5(struct Task *task) { Escalator_AnimatePlayerGoingUp(task); if (task->data[2] > 3) @@ -1392,7 +1392,7 @@ static bool8 EscalatorWarpEffect_5(struct Task * task) return FALSE; } -static bool8 EscalatorWarpEffect_6(struct Task * task) +static bool8 EscalatorWarpEffect_6(struct Task *task) { Escalator_AnimatePlayerGoingUp(task); Escalator_TransitionToWarpInEffect(); @@ -1400,7 +1400,7 @@ static bool8 EscalatorWarpEffect_6(struct Task * task) } -static void Escalator_AnimatePlayerGoingDown(struct Task * task) +static void Escalator_AnimatePlayerGoingDown(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1413,7 +1413,7 @@ static void Escalator_AnimatePlayerGoingDown(struct Task * task) } } -static void Escalator_AnimatePlayerGoingUp(struct Task * task) +static void Escalator_AnimatePlayerGoingUp(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1444,7 +1444,7 @@ static void Escalator_TransitionToWarpInEffect(void) } } -static bool8 (*const sEscalatorWarpInFieldEffectFuncs[])(struct Task * task) = { +static bool8 (*const sEscalatorWarpInFieldEffectFuncs[])(struct Task *task) = { EscalatorWarpInEffect_1, EscalatorWarpInEffect_2, EscalatorWarpInEffect_3, @@ -1467,12 +1467,12 @@ static void FieldCB_EscalatorWarpIn(void) static void Task_EscalatorWarpInFieldEffect(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; while (sEscalatorWarpInFieldEffectFuncs[task->data[0]](task)) ; } -static bool8 EscalatorWarpInEffect_1(struct Task * task) +static bool8 EscalatorWarpInEffect_1(struct Task *task) { struct ObjectEvent * objectEvent; s16 x; @@ -1497,7 +1497,7 @@ static bool8 EscalatorWarpInEffect_1(struct Task * task) return TRUE; } -static bool8 EscalatorWarpInEffect_2(struct Task * task) +static bool8 EscalatorWarpInEffect_2(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1507,7 +1507,7 @@ static bool8 EscalatorWarpInEffect_2(struct Task * task) return FALSE; } -static bool8 EscalatorWarpInEffect_3(struct Task * task) +static bool8 EscalatorWarpInEffect_3(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1528,7 +1528,7 @@ static bool8 EscalatorWarpInEffect_3(struct Task * task) } -static bool8 EscalatorWarpInEffect_4(struct Task * task) +static bool8 EscalatorWarpInEffect_4(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1538,7 +1538,7 @@ static bool8 EscalatorWarpInEffect_4(struct Task * task) return FALSE; } -static bool8 EscalatorWarpInEffect_5(struct Task * task) +static bool8 EscalatorWarpInEffect_5(struct Task *task) { struct Sprite *sprite; sprite = &gSprites[gPlayerAvatar.spriteId]; @@ -1558,7 +1558,7 @@ static bool8 EscalatorWarpInEffect_5(struct Task * task) return FALSE; } -static bool8 EscalatorWarpInEffect_6(struct Task * task) +static bool8 EscalatorWarpInEffect_6(struct Task *task) { if (IsEscalatorMoving()) { @@ -1569,7 +1569,7 @@ static bool8 EscalatorWarpInEffect_6(struct Task * task) return TRUE; } -static bool8 EscalatorWarpInEffect_7(struct Task * task) +static bool8 EscalatorWarpInEffect_7(struct Task *task) { struct ObjectEvent * objectEvent; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -1587,13 +1587,13 @@ static bool8 EscalatorWarpInEffect_7(struct Task * task) static void Task_UseWaterfall(u8 taskId); -static bool8 waterfall_0_setup(struct Task * task, struct ObjectEvent * playerObj); -static bool8 waterfall_1_do_anim_probably(struct Task * task, struct ObjectEvent * playerObj); -static bool8 waterfall_2_wait_anim_finish_probably(struct Task * task, struct ObjectEvent * playerObj); -static bool8 waterfall_3_move_player_probably(struct Task * task, struct ObjectEvent * playerObj); -static bool8 waterfall_4_wait_player_move_probably(struct Task * task, struct ObjectEvent * playerObj); +static bool8 waterfall_0_setup(struct Task *task, struct ObjectEvent * playerObj); +static bool8 waterfall_1_do_anim_probably(struct Task *task, struct ObjectEvent * playerObj); +static bool8 waterfall_2_wait_anim_finish_probably(struct Task *task, struct ObjectEvent * playerObj); +static bool8 waterfall_3_move_player_probably(struct Task *task, struct ObjectEvent * playerObj); +static bool8 waterfall_4_wait_player_move_probably(struct Task *task, struct ObjectEvent * playerObj); -static bool8 (*const sUseWaterfallFieldEffectFuncs[])(struct Task * task, struct ObjectEvent * playerObj) = { +static bool8 (*const sUseWaterfallFieldEffectFuncs[])(struct Task *task, struct ObjectEvent * playerObj) = { waterfall_0_setup, waterfall_1_do_anim_probably, waterfall_2_wait_anim_finish_probably, @@ -1615,7 +1615,7 @@ static void Task_UseWaterfall(u8 taskId) ; } -static bool8 waterfall_0_setup(struct Task * task, struct ObjectEvent * playerObj) +static bool8 waterfall_0_setup(struct Task *task, struct ObjectEvent * playerObj) { ScriptContext2_Enable(); gPlayerAvatar.preventStep = TRUE; @@ -1623,7 +1623,7 @@ static bool8 waterfall_0_setup(struct Task * task, struct ObjectEvent * playerOb return FALSE; } -static bool8 waterfall_1_do_anim_probably(struct Task * task, struct ObjectEvent * playerObj) +static bool8 waterfall_1_do_anim_probably(struct Task *task, struct ObjectEvent * playerObj) { ScriptContext2_Enable(); if (!ObjectEventIsMovementOverridden(playerObj)) @@ -1636,7 +1636,7 @@ static bool8 waterfall_1_do_anim_probably(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 waterfall_2_wait_anim_finish_probably(struct Task * task, struct ObjectEvent * playerObj) +static bool8 waterfall_2_wait_anim_finish_probably(struct Task *task, struct ObjectEvent * playerObj) { if (FieldEffectActiveListContains(FLDEFF_FIELD_MOVE_SHOW_MON)) return FALSE; @@ -1644,14 +1644,14 @@ static bool8 waterfall_2_wait_anim_finish_probably(struct Task * task, struct Ob return TRUE; } -static bool8 waterfall_3_move_player_probably(struct Task * task, struct ObjectEvent * playerObj) +static bool8 waterfall_3_move_player_probably(struct Task *task, struct ObjectEvent * playerObj) { ObjectEventSetHeldMovement(playerObj, GetWalkSlowerMovementAction(DIR_NORTH)); task->data[0]++; return FALSE; } -static bool8 waterfall_4_wait_player_move_probably(struct Task * task, struct ObjectEvent * playerObj) +static bool8 waterfall_4_wait_player_move_probably(struct Task *task, struct ObjectEvent * playerObj) { if (!ObjectEventClearHeldMovementIfFinished(playerObj)) return FALSE; @@ -1723,20 +1723,20 @@ static bool8 DiveFieldEffect_TryWarp(struct Task *task) } static void Task_LavaridgeGymB1FWarp(u8 taskId); -static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); static void FieldCB_LavaridgeGymB1FWarpExit(void); static void Task_LavaridgeGymB1FWarpExit(u8 taskId); -static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 (*const sLavaridgeGymB1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { +static bool8 (*const sLavaridgeGymB1FWarpEffectFuncs[])(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGymB1FWarpEffect_1, LavaridgeGymB1FWarpEffect_2, LavaridgeGymB1FWarpEffect_3, @@ -1755,7 +1755,7 @@ static void Task_LavaridgeGymB1FWarp(u8 taskId) while (sLavaridgeGymB1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { FreezeObjectEvents(); CameraObjectReset2(); @@ -1767,7 +1767,7 @@ static bool8 LavaridgeGymB1FWarpEffect_1(struct Task * task, struct ObjectEvent return TRUE; } -static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { SetCameraPanning(0, task->data[1]); task->data[1] = -task->data[1]; @@ -1780,7 +1780,7 @@ static bool8 LavaridgeGymB1FWarpEffect_2(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { sprite->y2 = 0; task->data[3] = 1; @@ -1794,7 +1794,7 @@ static bool8 LavaridgeGymB1FWarpEffect_3(struct Task * task, struct ObjectEvent return TRUE; } -static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { s16 centerToCornerVecY; SetCameraPanning(0, task->data[1]); @@ -1837,7 +1837,7 @@ static bool8 LavaridgeGymB1FWarpEffect_4(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_5(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { TryFadeOutOldMapMusic(); WarpFadeOutScreen(); @@ -1845,7 +1845,7 @@ static bool8 LavaridgeGymB1FWarpEffect_5(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpEffect_6(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { @@ -1857,7 +1857,7 @@ static bool8 LavaridgeGymB1FWarpEffect_6(struct Task * task, struct ObjectEvent return FALSE; } -static bool8 (*const sLavaridgeGymB1FWarpExitEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { +static bool8 (*const sLavaridgeGymB1FWarpExitEffectFuncs[])(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGymB1FWarpExitEffect_1, LavaridgeGymB1FWarpExitEffect_2, LavaridgeGymB1FWarpExitEffect_3, @@ -1879,7 +1879,7 @@ static void Task_LavaridgeGymB1FWarpExit(u8 taskId) while (sLavaridgeGymB1FWarpExitEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { CameraObjectReset2(); FreezeObjectEvents(); @@ -1889,7 +1889,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_1(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (IsWeatherNotFadingIn()) { @@ -1903,7 +1903,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_2(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { sprite = &gSprites[task->data[1]]; if (sprite->animCmdIndex > 1) @@ -1917,7 +1917,7 @@ static bool8 LavaridgeGymB1FWarpExitEffect_3(struct Task * task, struct ObjectEv return FALSE; } -static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (ObjectEventClearHeldMovementIfFinished(objectEvent)) { @@ -1930,13 +1930,13 @@ static bool8 LavaridgeGymB1FWarpExitEffect_4(struct Task * task, struct ObjectEv } static void Task_LavaridgeGym1FWarp(u8 taskId); -static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); +static bool8 LavaridgeGym1FWarpEffect_5(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite); -static bool8 (*const sLavaridgeGym1FWarpEffectFuncs[])(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { +static bool8 (*const sLavaridgeGym1FWarpEffectFuncs[])(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) = { LavaridgeGym1FWarpEffect_1, LavaridgeGym1FWarpEffect_2, LavaridgeGym1FWarpEffect_3, @@ -1973,7 +1973,7 @@ static void Task_LavaridgeGym1FWarp(u8 taskId) while(sLavaridgeGym1FWarpEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId], &gObjectEvents[gPlayerAvatar.objectEventId], &gSprites[gPlayerAvatar.spriteId])); } -static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_1(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { FreezeObjectEvents(); CameraObjectReset2(); @@ -1983,7 +1983,7 @@ static bool8 LavaridgeGym1FWarpEffect_1(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_2(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (ObjectEventClearHeldMovementIfFinished(objectEvent)) { @@ -2005,7 +2005,7 @@ static bool8 LavaridgeGym1FWarpEffect_2(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_3(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (gSprites[task->data[1]].animCmdIndex == 2) { @@ -2015,7 +2015,7 @@ static bool8 LavaridgeGym1FWarpEffect_3(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_4(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!FieldEffectActiveListContains(FLDEFF_POP_OUT_OF_ASH)) { @@ -2026,7 +2026,7 @@ static bool8 LavaridgeGym1FWarpEffect_4(struct Task * task, struct ObjectEvent * return FALSE; } -static bool8 LavaridgeGym1FWarpEffect_5(struct Task * task, struct ObjectEvent * objectEvent, struct Sprite *sprite) +static bool8 LavaridgeGym1FWarpEffect_5(struct Task *task, struct ObjectEvent * objectEvent, struct Sprite *sprite) { if (!gPaletteFade.active && BGMusicStopped() == TRUE) { @@ -2331,17 +2331,17 @@ static void EscapeRopeWarpInEffect_Spin(struct Task *task) #undef tOriginalDir static void Task_DoTeleportFieldEffect(u8 taskId); -static void TeleportFieldEffectTask1(struct Task * task); -static void TeleportFieldEffectTask2(struct Task * task); -static void TeleportFieldEffectTask3(struct Task * task); -static void TeleportFieldEffectTask4(struct Task * task); +static void TeleportFieldEffectTask1(struct Task *task); +static void TeleportFieldEffectTask2(struct Task *task); +static void TeleportFieldEffectTask3(struct Task *task); +static void TeleportFieldEffectTask4(struct Task *task); static void FieldCallback_TeleportIn(void); static void Task_DoTeleportInFieldEffect(u8 taskId); -static void TeleportInFieldEffectTask1(struct Task * task); -static void TeleportInFieldEffectTask2(struct Task * task); -static void TeleportInFieldEffectTask3(struct Task * task); +static void TeleportInFieldEffectTask1(struct Task *task); +static void TeleportInFieldEffectTask2(struct Task *task); +static void TeleportInFieldEffectTask3(struct Task *task); -static void (*const sTeleportEffectFuncs[])(struct Task * ) = { +static void (*const sTeleportEffectFuncs[])(struct Task *) = { TeleportFieldEffectTask1, TeleportFieldEffectTask2, TeleportFieldEffectTask3, @@ -2358,7 +2358,7 @@ static void Task_DoTeleportFieldEffect(u8 taskId) sTeleportEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void TeleportFieldEffectTask1(struct Task * task) +static void TeleportFieldEffectTask1(struct Task *task) { ScriptContext2_Enable(); FreezeObjectEvents(); @@ -2367,7 +2367,7 @@ static void TeleportFieldEffectTask1(struct Task * task) task->data[0]++; } -static void TeleportFieldEffectTask2(struct Task * task) +static void TeleportFieldEffectTask2(struct Task *task) { u8 spinDirections[5] = { [DIR_NONE] = DIR_SOUTH, @@ -2393,7 +2393,7 @@ static void TeleportFieldEffectTask2(struct Task * task) } } -static void TeleportFieldEffectTask3(struct Task * task) +static void TeleportFieldEffectTask3(struct Task *task) { u8 spinDirections[5] = {DIR_SOUTH, DIR_WEST, DIR_EAST, DIR_NORTH, DIR_SOUTH}; struct ObjectEvent * objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -2421,7 +2421,7 @@ static void TeleportFieldEffectTask3(struct Task * task) } } -static void TeleportFieldEffectTask4(struct Task * task) +static void TeleportFieldEffectTask4(struct Task *task) { if (!gPaletteFade.active) { @@ -2436,7 +2436,7 @@ static void TeleportFieldEffectTask4(struct Task * task) } } -static void (*const sTeleportInEffectFuncs[])(struct Task * ) = { +static void (*const sTeleportInEffectFuncs[])(struct Task *) = { TeleportInFieldEffectTask1, TeleportInFieldEffectTask2, TeleportInFieldEffectTask3 @@ -2460,7 +2460,7 @@ static void Task_DoTeleportInFieldEffect(u8 taskId) sTeleportInEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void TeleportInFieldEffectTask1(struct Task * task) +static void TeleportInFieldEffectTask1(struct Task *task) { struct Sprite *sprite; s16 centerToCornerVecY; @@ -2479,7 +2479,7 @@ static void TeleportInFieldEffectTask1(struct Task * task) } } -static void TeleportInFieldEffectTask2(struct Task * task) +static void TeleportInFieldEffectTask2(struct Task *task) { u8 spinDirections[5] = {1, 3, 4, 2, 1}; struct ObjectEvent * objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -2518,7 +2518,7 @@ static void TeleportInFieldEffectTask2(struct Task * task) } } -static void TeleportInFieldEffectTask3(struct Task * task) +static void TeleportInFieldEffectTask3(struct Task *task) { u8 spinDirections[5] = {1, 3, 4, 2, 1}; struct ObjectEvent * objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -2537,33 +2537,33 @@ static void TeleportInFieldEffectTask3(struct Task * task) } static void Task_ShowMon_Outdoors(u8 taskId); -static void ShowMonEffect_Outdoors_1(struct Task * task); -static void ShowMonEffect_Outdoors_2(struct Task * task); -static void ShowMonEffect_Outdoors_3(struct Task * task); -static void ShowMonEffect_Outdoors_4(struct Task * task); -static void ShowMonEffect_Outdoors_5(struct Task * task); -static void ShowMonEffect_Outdoors_6(struct Task * task); -static void ShowMonEffect_Outdoors_7(struct Task * task); +static void ShowMonEffect_Outdoors_1(struct Task *task); +static void ShowMonEffect_Outdoors_2(struct Task *task); +static void ShowMonEffect_Outdoors_3(struct Task *task); +static void ShowMonEffect_Outdoors_4(struct Task *task); +static void ShowMonEffect_Outdoors_5(struct Task *task); +static void ShowMonEffect_Outdoors_6(struct Task *task); +static void ShowMonEffect_Outdoors_7(struct Task *task); static void VBlankCB_ShowMonEffect_Outdoors(void); static void LoadFieldMoveStreaksTilemapToVram(u16 screenbase); static void Task_ShowMon_Indoors(u8 taskId); -static void ShowMonEffect_Indoors_1(struct Task * task); -static void ShowMonEffect_Indoors_2(struct Task * task); -static void ShowMonEffect_Indoors_3(struct Task * task); -static void ShowMonEffect_Indoors_4(struct Task * task); -static void ShowMonEffect_Indoors_5(struct Task * task); -static void ShowMonEffect_Indoors_6(struct Task * task); -static void ShowMonEffect_Indoors_7(struct Task * task); +static void ShowMonEffect_Indoors_1(struct Task *task); +static void ShowMonEffect_Indoors_2(struct Task *task); +static void ShowMonEffect_Indoors_3(struct Task *task); +static void ShowMonEffect_Indoors_4(struct Task *task); +static void ShowMonEffect_Indoors_5(struct Task *task); +static void ShowMonEffect_Indoors_6(struct Task *task); +static void ShowMonEffect_Indoors_7(struct Task *task); static void VBlankCB_ShowMonEffect_Indoors(void); -static void AnimateIndoorShowMonBg(struct Task * task); -static bool8 SlideIndoorBannerOnscreen(struct Task * task); -static bool8 SlideIndoorBannerOffscreen(struct Task * task); +static void AnimateIndoorShowMonBg(struct Task *task); +static bool8 SlideIndoorBannerOnscreen(struct Task *task); +static bool8 SlideIndoorBannerOffscreen(struct Task *task); static u8 InitFieldMoveMonSprite(u32 species, u32 otId, u32 personality); static void SpriteCB_FieldMoveMonSlideOnscreen(struct Sprite *sprite); static void SpriteCB_FieldMoveMonWaitAfterCry(struct Sprite *sprite); static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite *sprite); -static void (*const sShowMonOutdoorsEffectFuncs[])(struct Task * task) = { +static void (*const sShowMonOutdoorsEffectFuncs[])(struct Task *task) = { ShowMonEffect_Outdoors_1, ShowMonEffect_Outdoors_2, ShowMonEffect_Outdoors_3, @@ -2602,7 +2602,7 @@ static void Task_ShowMon_Outdoors(u8 taskId) sShowMonOutdoorsEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void ShowMonEffect_Outdoors_1(struct Task * task) +static void ShowMonEffect_Outdoors_1(struct Task *task) { task->data[11] = GetGpuReg(REG_OFFSET_WININ); task->data[12] = GetGpuReg(REG_OFFSET_WINOUT); @@ -2619,7 +2619,7 @@ static void ShowMonEffect_Outdoors_1(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Outdoors_2(struct Task * task) +static void ShowMonEffect_Outdoors_2(struct Task *task) { u16 charbase = ((GetGpuReg(REG_OFFSET_BG0CNT) >> 2) << 14); u16 screenbase = ((GetGpuReg(REG_OFFSET_BG0CNT) >> 8) << 11); @@ -2630,7 +2630,7 @@ static void ShowMonEffect_Outdoors_2(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Outdoors_3(struct Task * task) +static void ShowMonEffect_Outdoors_3(struct Task *task) { s16 win0h_lo; s16 win0v_lo; @@ -2663,7 +2663,7 @@ static void ShowMonEffect_Outdoors_3(struct Task * task) } } -static void ShowMonEffect_Outdoors_4(struct Task * task) +static void ShowMonEffect_Outdoors_4(struct Task *task) { task->data[5] -= 16; if (gSprites[task->data[15]].data[7]) @@ -2672,7 +2672,7 @@ static void ShowMonEffect_Outdoors_4(struct Task * task) } } -static void ShowMonEffect_Outdoors_5(struct Task * task) +static void ShowMonEffect_Outdoors_5(struct Task *task) { s16 win0v_lo; s16 win0v_hi; @@ -2696,7 +2696,7 @@ static void ShowMonEffect_Outdoors_5(struct Task * task) } } -static void ShowMonEffect_Outdoors_6(struct Task * task) +static void ShowMonEffect_Outdoors_6(struct Task *task) { u16 bg0cnt = (GetGpuReg(REG_OFFSET_BG0CNT) >> 8) << 11; CpuFill32(0, (void *)VRAM + bg0cnt, 0x800); @@ -2707,7 +2707,7 @@ static void ShowMonEffect_Outdoors_6(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Outdoors_7(struct Task * task) +static void ShowMonEffect_Outdoors_7(struct Task *task) { IntrCallback callback; LoadWordFromTwoHalfwords((u16 *)&task->data[13], (uintptr_t *)&callback); @@ -2723,7 +2723,7 @@ static void ShowMonEffect_Outdoors_7(struct Task * task) static void VBlankCB_ShowMonEffect_Outdoors(void) { IntrCallback callback; - struct Task * task = &gTasks[FindTaskIdByFunc(Task_ShowMon_Outdoors)]; + struct Task *task = &gTasks[FindTaskIdByFunc(Task_ShowMon_Outdoors)]; LoadWordFromTwoHalfwords((u16 *)&task->data[13], (uintptr_t *)&callback); callback(); SetGpuReg(REG_OFFSET_WIN0H, task->data[1]); @@ -2745,7 +2745,7 @@ static void LoadFieldMoveStreaksTilemapToVram(u16 screenbase) } } -static void (*const sShowMonIndoorsEffectFuncs[])(struct Task * ) = { +static void (*const sShowMonIndoorsEffectFuncs[])(struct Task *) = { ShowMonEffect_Indoors_1, ShowMonEffect_Indoors_2, ShowMonEffect_Indoors_3, @@ -2760,7 +2760,7 @@ static void Task_ShowMon_Indoors(u8 taskId) sShowMonIndoorsEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void ShowMonEffect_Indoors_1(struct Task * task) +static void ShowMonEffect_Indoors_1(struct Task *task) { SetGpuReg(REG_OFFSET_BG0HOFS, task->data[1]); SetGpuReg(REG_OFFSET_BG0VOFS, task->data[2]); @@ -2769,7 +2769,7 @@ static void ShowMonEffect_Indoors_1(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Indoors_2(struct Task * task) +static void ShowMonEffect_Indoors_2(struct Task *task) { u16 charbase; u16 screenbase; @@ -2782,7 +2782,7 @@ static void ShowMonEffect_Indoors_2(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Indoors_3(struct Task * task) +static void ShowMonEffect_Indoors_3(struct Task *task) { if (SlideIndoorBannerOnscreen(task)) { @@ -2796,7 +2796,7 @@ static void ShowMonEffect_Indoors_3(struct Task * task) AnimateIndoorShowMonBg(task); } -static void ShowMonEffect_Indoors_4(struct Task * task) +static void ShowMonEffect_Indoors_4(struct Task *task) { AnimateIndoorShowMonBg(task); if (gSprites[task->data[15]].data[7]) @@ -2805,7 +2805,7 @@ static void ShowMonEffect_Indoors_4(struct Task * task) } } -static void ShowMonEffect_Indoors_5(struct Task * task) +static void ShowMonEffect_Indoors_5(struct Task *task) { AnimateIndoorShowMonBg(task); task->data[3] = task->data[1] & 7; @@ -2816,7 +2816,7 @@ static void ShowMonEffect_Indoors_5(struct Task * task) task->data[0]++; } -static void ShowMonEffect_Indoors_6(struct Task * task) +static void ShowMonEffect_Indoors_6(struct Task *task) { AnimateIndoorShowMonBg(task); if (SlideIndoorBannerOffscreen(task)) @@ -2825,7 +2825,7 @@ static void ShowMonEffect_Indoors_6(struct Task * task) } } -static void ShowMonEffect_Indoors_7(struct Task * task) +static void ShowMonEffect_Indoors_7(struct Task *task) { IntrCallback intrCallback; u16 charbase; @@ -2844,7 +2844,7 @@ static void ShowMonEffect_Indoors_7(struct Task * task) static void VBlankCB_ShowMonEffect_Indoors(void) { IntrCallback intrCallback; - struct Task * task; + struct Task *task; task = &gTasks[FindTaskIdByFunc(Task_ShowMon_Indoors)]; LoadWordFromTwoHalfwords((u16 *)&task->data[13], (uintptr_t *)&intrCallback); intrCallback(); @@ -2852,13 +2852,13 @@ static void VBlankCB_ShowMonEffect_Indoors(void) SetGpuReg(REG_OFFSET_BG0VOFS, task->data[2]); } -static void AnimateIndoorShowMonBg(struct Task * task) +static void AnimateIndoorShowMonBg(struct Task *task) { task->data[1] -= 16; task->data[3] += 16; } -static bool8 SlideIndoorBannerOnscreen(struct Task * task) +static bool8 SlideIndoorBannerOnscreen(struct Task *task) { u16 i; u16 srcOffs; @@ -2887,7 +2887,7 @@ static bool8 SlideIndoorBannerOnscreen(struct Task * task) return FALSE; } -static bool8 SlideIndoorBannerOffscreen(struct Task * task) +static bool8 SlideIndoorBannerOffscreen(struct Task *task) { u16 i; u16 dstOffs; @@ -2966,13 +2966,13 @@ static void SpriteCB_FieldMoveMonSlideOffscreen(struct Sprite *sprite) } static void Task_FldEffUseSurf(u8 taskId); -static void UseSurfEffect_1(struct Task * task); -static void UseSurfEffect_2(struct Task * task); -static void UseSurfEffect_3(struct Task * task); -static void UseSurfEffect_4(struct Task * task); -static void UseSurfEffect_5(struct Task * task); +static void UseSurfEffect_1(struct Task *task); +static void UseSurfEffect_2(struct Task *task); +static void UseSurfEffect_3(struct Task *task); +static void UseSurfEffect_4(struct Task *task); +static void UseSurfEffect_5(struct Task *task); -static void (*const sUseSurfEffectFuncs[])(struct Task * ) = { +static void (*const sUseSurfEffectFuncs[])(struct Task *) = { UseSurfEffect_1, UseSurfEffect_2, UseSurfEffect_3, @@ -2995,7 +2995,7 @@ static void Task_FldEffUseSurf(u8 taskId) sUseSurfEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void UseSurfEffect_1(struct Task * task) +static void UseSurfEffect_1(struct Task *task) { ScriptContext2_Enable(); FreezeObjectEvents(); @@ -3006,7 +3006,7 @@ static void UseSurfEffect_1(struct Task * task) task->data[0]++; } -static void UseSurfEffect_2(struct Task * task) +static void UseSurfEffect_2(struct Task *task) { struct ObjectEvent * objectEvent; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -3018,7 +3018,7 @@ static void UseSurfEffect_2(struct Task * task) } } -static void UseSurfEffect_3(struct Task * task) +static void UseSurfEffect_3(struct Task *task) { struct ObjectEvent * objectEvent; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -3030,7 +3030,7 @@ static void UseSurfEffect_3(struct Task * task) } } -static void UseSurfEffect_4(struct Task * task) +static void UseSurfEffect_4(struct Task *task) { struct ObjectEvent * objectEvent; if (!FieldEffectActiveListContains(FLDEFF_FIELD_MOVE_SHOW_MON)) @@ -3047,7 +3047,7 @@ static void UseSurfEffect_4(struct Task * task) } } -static void UseSurfEffect_5(struct Task * task) +static void UseSurfEffect_5(struct Task *task) { struct ObjectEvent * objectEvent; objectEvent = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -3066,12 +3066,12 @@ static void UseSurfEffect_5(struct Task * task) } static void Task_FldEffUseVsSeeker(u8 taskId); -static void UseVsSeekerEffect_1(struct Task * task); -static void UseVsSeekerEffect_2(struct Task * task); -static void UseVsSeekerEffect_3(struct Task * task); -static void UseVsSeekerEffect_4(struct Task * task); +static void UseVsSeekerEffect_1(struct Task *task); +static void UseVsSeekerEffect_2(struct Task *task); +static void UseVsSeekerEffect_3(struct Task *task); +static void UseVsSeekerEffect_4(struct Task *task); -static void (*const sUseVsSeekerEffectFuncs[])(struct Task * task) = { +static void (*const sUseVsSeekerEffectFuncs[])(struct Task *task) = { UseVsSeekerEffect_1, UseVsSeekerEffect_2, UseVsSeekerEffect_3, @@ -3091,7 +3091,7 @@ static void Task_FldEffUseVsSeeker(u8 taskId) sUseVsSeekerEffectFuncs[gTasks[taskId].data[0]](&gTasks[taskId]); } -static void UseVsSeekerEffect_1(struct Task * task) +static void UseVsSeekerEffect_1(struct Task *task) { ScriptContext2_Enable(); FreezeObjectEvents(); @@ -3099,7 +3099,7 @@ static void UseVsSeekerEffect_1(struct Task * task) task->data[0]++; } -static void UseVsSeekerEffect_2(struct Task * task) +static void UseVsSeekerEffect_2(struct Task *task) { struct ObjectEvent * playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; if (!ObjectEventIsMovementOverridden(playerObj) || ObjectEventClearHeldMovementIfFinished(playerObj)) @@ -3110,7 +3110,7 @@ static void UseVsSeekerEffect_2(struct Task * task) } } -static void UseVsSeekerEffect_3(struct Task * task) +static void UseVsSeekerEffect_3(struct Task *task) { struct ObjectEvent * playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; if (ObjectEventClearHeldMovementIfFinished(playerObj)) @@ -3126,7 +3126,7 @@ static void UseVsSeekerEffect_3(struct Task * task) } } -static void UseVsSeekerEffect_4(struct Task * task) +static void UseVsSeekerEffect_4(struct Task *task) { struct ObjectEvent * playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; if (ObjectEventClearHeldMovementIfFinished(playerObj)) diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index a5be40b5c..3de950fcc 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -87,38 +87,38 @@ static bool8 MetatileAtCoordsIsWaterTile(s16 x, s16 y); static void HandleWarpArrowSpriteHideShow(struct ObjectEvent * playerObjEvent); static void StartStrengthAnim(u8 objectEventId, u8 direction); static void Task_BumpBoulder(u8 taskId); -static bool8 DoBoulderInit(struct Task * task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); -static bool8 DoBoulderDust(struct Task * task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); -static bool8 DoBoulderFinish(struct Task * task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); +static bool8 DoBoulderInit(struct Task *task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); +static bool8 DoBoulderDust(struct Task *task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); +static bool8 DoBoulderFinish(struct Task *task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj); static void DoPlayerMatJump(void); static void DoPlayerAvatarSecretBaseMatJump(u8 taskId); -static bool8 PlayerAvatar_DoSecretBaseMatJump(struct Task * task, struct ObjectEvent * playerObj); +static bool8 PlayerAvatar_DoSecretBaseMatJump(struct Task *task, struct ObjectEvent * playerObj); static void DoPlayerMatSpin(void); static void PlayerAvatar_DoSecretBaseMatSpin(u8 taskId); -static bool8 PlayerAvatar_SecretBaseMatSpinStep0(struct Task * task, struct ObjectEvent * playerObj); -static bool8 PlayerAvatar_SecretBaseMatSpinStep1(struct Task * task, struct ObjectEvent * playerObj); -static bool8 PlayerAvatar_SecretBaseMatSpinStep2(struct Task * task, struct ObjectEvent * playerObj); -static bool8 PlayerAvatar_SecretBaseMatSpinStep3(struct Task * task, struct ObjectEvent * playerObj); +static bool8 PlayerAvatar_SecretBaseMatSpinStep0(struct Task *task, struct ObjectEvent * playerObj); +static bool8 PlayerAvatar_SecretBaseMatSpinStep1(struct Task *task, struct ObjectEvent * playerObj); +static bool8 PlayerAvatar_SecretBaseMatSpinStep2(struct Task *task, struct ObjectEvent * playerObj); +static bool8 PlayerAvatar_SecretBaseMatSpinStep3(struct Task *task, struct ObjectEvent * playerObj); static void CreateStopSurfingTask(u8 direction); static void Task_StopSurfingInit(u8 taskId); static void Task_WaitStopSurfing(u8 taskId); static void Task_Fishing(u8 taskId); -static bool8 Fishing1(struct Task * task); -static bool8 Fishing2(struct Task * task); -static bool8 Fishing3(struct Task * task); -static bool8 Fishing4(struct Task * task); -static bool8 Fishing5(struct Task * task); -static bool8 Fishing6(struct Task * task); -static bool8 Fishing7(struct Task * task); -static bool8 Fishing8(struct Task * task); -static bool8 Fishing9(struct Task * task); -static bool8 Fishing10(struct Task * task); -static bool8 Fishing11(struct Task * task); -static bool8 Fishing12(struct Task * task); -static bool8 Fishing13(struct Task * task); -static bool8 Fishing14(struct Task * task); -static bool8 Fishing15(struct Task * task); -static bool8 Fishing16(struct Task * task); +static bool8 Fishing1(struct Task *task); +static bool8 Fishing2(struct Task *task); +static bool8 Fishing3(struct Task *task); +static bool8 Fishing4(struct Task *task); +static bool8 Fishing5(struct Task *task); +static bool8 Fishing6(struct Task *task); +static bool8 Fishing7(struct Task *task); +static bool8 Fishing8(struct Task *task); +static bool8 Fishing9(struct Task *task); +static bool8 Fishing10(struct Task *task); +static bool8 Fishing11(struct Task *task); +static bool8 Fishing12(struct Task *task); +static bool8 Fishing13(struct Task *task); +static bool8 Fishing14(struct Task *task); +static bool8 Fishing15(struct Task *task); +static bool8 Fishing16(struct Task *task); static void Task_TeleportWarpOutPlayerAnim(u8 taskId); static void Task_TeleportWarpInPlayerAnim(u8 taskId); static u8 TeleportAnim_RotatePlayer(struct ObjectEvent * object, s16 *timer); @@ -1392,7 +1392,7 @@ static void HandleWarpArrowSpriteHideShow(struct ObjectEvent *objectEvent) SetSpriteInvisible(objectEvent->warpArrowSpriteId); } -static bool8 (*const sBoulderTaskSteps[])(struct Task * task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj) = { +static bool8 (*const sBoulderTaskSteps[])(struct Task *task, struct ObjectEvent * playerObj, struct ObjectEvent * boulderObj) = { DoBoulderInit, DoBoulderDust, DoBoulderFinish @@ -1493,7 +1493,7 @@ static bool8 PlayerAvatar_DoSecretBaseMatJump(struct Task *task, struct ObjectEv return FALSE; } -static bool8 (*const sPlayerAvatarSecretBaseMatSpin[])(struct Task * task, struct ObjectEvent * playerObj) = { +static bool8 (*const sPlayerAvatarSecretBaseMatSpin[])(struct Task *task, struct ObjectEvent * playerObj) = { PlayerAvatar_SecretBaseMatSpinStep0, PlayerAvatar_SecretBaseMatSpinStep1, PlayerAvatar_SecretBaseMatSpinStep2, diff --git a/src/field_specials.c b/src/field_specials.c index c8107febf..97f9808aa 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1165,7 +1165,7 @@ static void Task_AnimateElevatorWindowView(u8 taskId) void ListMenu(void) { u8 taskId; - struct Task * task; + struct Task *task; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { taskId = CreateTask(Task_CreateScriptListMenu, 8); @@ -1334,7 +1334,7 @@ static void Task_CreateScriptListMenu(u8 taskId) u8 i; s32 width; s32 mwidth; - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; u8 windowId; ScriptContext2_Enable(); if (gSpecialVar_0x8004 == LISTMENU_SILPHCO_FLOORS) @@ -1393,7 +1393,7 @@ static void CreateScriptListMenu(void) static void ScriptListMenuMoveCursorFunction(s32 nothing, bool8 is, struct ListMenu * used) { u8 taskId; - struct Task * task; + struct Task *task; PlaySE(SE_SELECT); taskId = FindTaskIdByFunc(Task_ListMenuHandleInput); if (taskId != 0xFF) @@ -1407,7 +1407,7 @@ static void ScriptListMenuMoveCursorFunction(s32 nothing, bool8 is, struct ListM static void Task_ListMenuHandleInput(u8 taskId) { s32 input; - struct Task * task; + struct Task *task; task = &gTasks[taskId]; task++;task--; @@ -1440,7 +1440,7 @@ static void Task_ListMenuHandleInput(u8 taskId) static void Task_DestroyListMenu(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; Task_ListMenuRemoveScrollIndicatorArrowPair(taskId); DestroyListMenuTask(task->data[14], NULL, NULL); Free(sListMenuItems); @@ -1484,7 +1484,7 @@ static void Task_RedrawScrollArrowsAndWaitInput(u8 taskId) static void Task_CreateMenuRemoveScrollIndicatorArrowPair(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; struct ScrollArrowsTemplate template = { .firstArrowType = 2, .secondArrowType = 3, @@ -1505,7 +1505,7 @@ static void Task_CreateMenuRemoveScrollIndicatorArrowPair(u8 taskId) static void Task_ListMenuRemoveScrollIndicatorArrowPair(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; if (task->data[0] != task->data[1]) RemoveScrollIndicatorArrowPair(task->data[12]); } diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 6a2918030..95042ea83 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -48,7 +48,7 @@ void ShowMapNamePopup(bool32 palIntoFadedBuffer) static void Task_MapNamePopup(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->tState) { case 0: diff --git a/src/naming_screen.c b/src/naming_screen.c index 8e7165469..b7d1d7d8f 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -130,15 +130,15 @@ static bool8 MainState_WaitPageSwap(void); static void StartPageSwapAnim(void); static void Task_HandlePageSwapAnim(u8 taskId); static bool8 IsPageSwapAnimNotInProgress(void); -static bool8 PageSwapAnimState_Init(struct Task * task); -static bool8 PageSwapAnimState_1(struct Task * task); -static bool8 PageSwapAnimState_2(struct Task * task); -static bool8 PageSwapAnimState_Done(struct Task * task); +static bool8 PageSwapAnimState_Init(struct Task *task); +static bool8 PageSwapAnimState_1(struct Task *task); +static bool8 PageSwapAnimState_2(struct Task *task); +static bool8 PageSwapAnimState_Done(struct Task *task); static void sub_809E518(u8 a0, u8 a1, u8 a2); static void Task_809E58C(u8 taskId); static u16 sub_809E644(u8 tag); static void sub_809E6B8(u8 a0); -static void sub_809E6E0(struct Task * task, u8 a1, u8 a2); +static void sub_809E6E0(struct Task *task, u8 a1, u8 a2); static void sub_809E700(struct Sprite *sprite); static void sub_809E7F0(struct Sprite *sprite); static void sub_809E83C(struct Sprite *sprite); @@ -175,9 +175,9 @@ static bool8 TriggerKeyboardChange(void); static u8 GetInputEvent(void); static void SetInputState(u8 state); static void Task_HandleInput(u8 taskId); -static void InputState_Disabled(struct Task * task); -static void InputState_Enabled(struct Task * task); -static void HandleDpadMovement(struct Task * task); +static void InputState_Disabled(struct Task *task); +static void InputState_Enabled(struct Task *task); +static void HandleDpadMovement(struct Task *task); static void PrintTitle(void); static void AddGenderIconFunc_No(void); static void AddGenderIconFunc_Yes(void); @@ -773,7 +773,7 @@ static bool8 MainState_WaitPageSwap(void) #define tState data[0] #define tFrameCount data[1] -static bool8 (*const sPageSwapAnimStateFuncs[])(struct Task * task) = { +static bool8 (*const sPageSwapAnimStateFuncs[])(struct Task *task) = { PageSwapAnimState_Init, PageSwapAnimState_1, PageSwapAnimState_2, diff --git a/src/script_menu.c b/src/script_menu.c index 0f17a2bd8..8b6b277f9 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -1008,7 +1008,7 @@ void ScriptMenu_DisplayPCStartupPrompt(void) static void Task_ScriptShowMonPic(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: @@ -1068,7 +1068,7 @@ static bool8 PicboxWait(void) void PicboxCancel(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); - struct Task * task; + struct Task *task; if (taskId != 0xFF) { task = &gTasks[taskId]; @@ -1091,7 +1091,7 @@ void PicboxCancel(void) void Task_WaitMuseumFossilPic(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; switch (task->data[0]) { case 0: diff --git a/src/seagallop.c b/src/seagallop.c index 2f6377c8b..0c8ab7500 100644 --- a/src/seagallop.c +++ b/src/seagallop.c @@ -284,7 +284,7 @@ static void ScrollBG(void) static void Task_Seagallop_1(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; ScrollBG(); if (++task->data[1] == 140) diff --git a/src/trainer_see.c b/src/trainer_see.c index 82a35c2db..f008cdb86 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -24,21 +24,21 @@ static u8 GetTrainerApproachDistanceEast(struct ObjectEvent * trainerObj, s16 ra static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent * trainerObj, u8 approachDistance, u8 facingDirection); static void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance); static void Task_RunTrainerSeeFuncList(u8 taskId); -static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_End(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_EndJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_OffscreenAboveTrainerCreateCameraObj(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); +static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj); static void Task_DestroyTrainerApproachTask(u8 taskId); static void SpriteCB_TrainerIcons(struct Sprite *sprite); static void SetIconSpriteData(struct Sprite *sprite, u16 fldEffId, u8 spriteAnimNum); @@ -57,7 +57,7 @@ static const TrainerApproachFunc sDirectionalApproachDistanceFuncs[] = { GetTrainerApproachDistanceEast }; -// bool8 func(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +// bool8 func(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) // Returns TRUE to run the next func immediately // Returns FALSE to delay the next func to the next frame static const TrainerSeeFunc sTrainerSeeFuncList[] = { @@ -246,7 +246,7 @@ static u8 CheckPathBetweenTrainerAndPlayer(struct ObjectEvent *trainerObj, u8 ap static void TrainerApproachPlayer(struct ObjectEvent * trainerObj, u8 approachDistance) { u8 taskId = CreateTask(Task_RunTrainerSeeFuncList, 80); - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; task->tTrainerObjHi = ((uintptr_t)trainerObj) >> 16; task->tTrainerObjLo = (uintptr_t)trainerObj; task->tTrainerRange = approachDistance; @@ -262,7 +262,7 @@ static void StartTrainerApproachWithFollowupTask(TaskFunc taskFunc) static void Task_RunTrainerSeeFuncList(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; struct ObjectEvent * trainerObj; TaskGetTrainerObj(trainerObj, task); @@ -279,12 +279,12 @@ static void Task_RunTrainerSeeFuncList(u8 taskId) // TrainerSeeFuncs -static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_Dummy(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { return FALSE; } -static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { u8 action; // FRLG introduces trainers who can see the player from offscreen above. @@ -304,7 +304,7 @@ static bool8 TrainerSeeFunc_StartExclMark(u8 taskId, struct Task * task, struct return TRUE; } -static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (FieldEffectActiveListContains(FLDEFF_EXCLAMATION_MARK_ICON)) { @@ -321,7 +321,7 @@ static bool8 TrainerSeeFunc_WaitExclMark(u8 taskId, struct Task * task, struct O } } -static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) { @@ -339,7 +339,7 @@ static bool8 TrainerSeeFunc_TrainerApproach(u8 taskId, struct Task * task, struc return FALSE; } -static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { struct ObjectEvent *playerObj; @@ -361,7 +361,7 @@ static bool8 TrainerSeeFunc_PrepareToEngage(u8 taskId, struct Task * task, struc return FALSE; } -static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_End(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { struct ObjectEvent *playerObj = &gObjectEvents[gPlayerAvatar.objectEventId]; @@ -372,7 +372,7 @@ static bool8 TrainerSeeFunc_End(u8 taskId, struct Task * task, struct ObjectEven } // Jumps here if disguised. Not used in FRLG. -static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) @@ -383,7 +383,7 @@ static bool8 TrainerSeeFunc_BeginRemoveDisguise(u8 taskId, struct Task * task, s return FALSE; } -static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (ObjectEventClearHeldMovementIfFinished(trainerObj)) task->tFuncId = 3; @@ -392,7 +392,7 @@ static bool8 TrainerSeeFunc_WaitRemoveDisguise(u8 taskId, struct Task * task, st } // Jump here if buried in ash. Not used in FRLG. -static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (!ObjectEventIsMovementOverridden(trainerObj) || ObjectEventClearHeldMovementIfFinished(trainerObj)) @@ -403,7 +403,7 @@ static bool8 TrainerSeeFunc_TrainerInAshFacesPlayer(u8 taskId, struct Task * tas return FALSE; } -static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { if (ObjectEventCheckHeldMovementStatus(trainerObj)) { @@ -417,7 +417,7 @@ static bool8 TrainerSeeFunc_BeginJumpOutOfAsh(u8 taskId, struct Task * task, str return FALSE; } -static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_WaitJumpOutOfAsh(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { struct Sprite *sprite; @@ -479,7 +479,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveUp(u8 taskId, stru return FALSE; } -static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task * task, struct ObjectEvent * trainerObj) +static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, struct Task *task, struct ObjectEvent * trainerObj) { u8 specialObjectId; TryGetObjectEventIdByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &specialObjectId); @@ -514,7 +514,7 @@ static bool8 TrainerSeeFunc_OffscreenAboveTrainerCameraObjMoveDown(u8 taskId, st static void Task_RevealTrainer_RunTrainerSeeFuncList(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; struct ObjectEvent * trainerObj; // another objEvent loaded into by loadword? diff --git a/src/vs_seeker.c b/src/vs_seeker.c index 1fd93b82b..53293825d 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -597,7 +597,7 @@ void VsSeekerFreezeObjectsAfterChargeComplete(void) static void Task_ResetObjectsRematchWantedState(u8 taskId) { - struct Task * task = &gTasks[taskId]; + struct Task *task = &gTasks[taskId]; u8 i; if (task->data[0] == 0 && walkrun_is_standing_still() == TRUE) From 95dd979f098d6edb78f45765c2a2745db7649882 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 31 Jul 2022 21:00:27 -0400 Subject: [PATCH 07/13] Font constants and slight PSS sync --- charmap.txt | 12 +- .../CeladonCity_DepartmentStore_Roof/text.inc | 2 +- .../text.inc | 2 +- data/maps/PalletTown_RivalsHouse/text.inc | 4 +- data/maps/PewterCity_Gym/text.inc | 4 +- data/maps/VermilionCity/text.inc | 8 +- data/text/fame_checker.inc | 172 +++--- data/text/pokedex_rating.inc | 2 +- include/help_system.h | 4 +- include/new_menu_helpers.h | 2 +- include/pokemon_storage_system_internal.h | 6 +- include/shop.h | 2 +- include/text.h | 14 +- src/bag.c | 12 +- src/battle_interface.c | 2 +- src/battle_message.c | 2 +- src/battle_records.c | 14 +- src/battle_script_commands.c | 2 +- src/berry_crush.c | 78 +-- src/berry_pouch.c | 44 +- src/berry_powder.c | 4 +- src/buy_menu_helpers.c | 4 +- src/cable_club.c | 2 +- src/clear_save_data_screen.c | 6 +- src/coins.c | 10 +- src/credits.c | 6 +- src/daycare.c | 10 +- src/diploma.c | 10 +- src/dodrio_berry_picking.c | 8 +- src/dodrio_berry_picking_2.c | 62 +-- src/easy_chat_3.c | 30 +- src/evolution_scene.c | 2 +- src/fame_checker.c | 30 +- src/field_player_avatar.c | 8 +- src/field_screen_effect.c | 2 +- src/field_specials.c | 12 +- src/hall_of_fame.c | 34 +- src/help_message.c | 2 +- src/help_system_util.c | 36 +- src/item_menu.c | 52 +- src/item_pc.c | 42 +- src/item_use.c | 48 +- src/itemfinder.c | 6 +- src/learn_move.c | 12 +- src/link.c | 10 +- src/mail.c | 8 +- src/mailbox_pc.c | 6 +- src/main_menu.c | 30 +- src/map_name_popup.c | 4 +- src/map_preview_screen.c | 4 +- src/menu.c | 14 +- src/menu2.c | 14 +- src/menu_helpers.c | 4 +- src/mevent_show_card.c | 24 +- src/mevent_show_news.c | 6 +- src/money.c | 6 +- src/mystery_gift_menu.c | 30 +- src/naming_screen.c | 16 +- src/new_menu_helpers.c | 18 +- src/oak_speech.c | 26 +- src/option_menu.c | 26 +- src/party_menu.c | 36 +- src/player_pc.c | 40 +- src/pokedex_screen.c | 82 +-- src/pokemon_jump.c | 32 +- src/pokemon_special_anim_scene.c | 16 +- src/pokemon_storage_system_2.c | 30 +- src/pokemon_storage_system_3.c | 22 +- src/pokemon_storage_system_4.c | 120 +++-- src/pokemon_storage_system_5.c | 8 +- src/pokemon_storage_system_6.c | 4 +- src/pokemon_storage_system_8.c | 2 +- src/pokemon_summary_screen.c | 76 +-- src/quest_log.c | 4 +- src/region_map.c | 12 +- src/scrcmd.c | 4 +- src/script_menu.c | 54 +- src/shop.c | 42 +- src/slot_machine.c | 8 +- src/start_menu.c | 28 +- src/strings.c | 86 +-- src/teachy_tv.c | 4 +- src/text.c | 495 +++++++++--------- src/tm_case.c | 50 +- src/trade.c | 28 +- src/trade_scene.c | 2 +- src/trainer_card.c | 12 +- src/trainer_tower.c | 14 +- src/union_room.c | 14 +- src/union_room_battle.c | 2 +- src/union_room_chat_display.c | 30 +- src/vs_seeker.c | 6 +- src/wireless_communication_status_screen.c | 14 +- 93 files changed, 1243 insertions(+), 1206 deletions(-) diff --git a/charmap.txt b/charmap.txt index febef44e9..150b4a156 100644 --- a/charmap.txt +++ b/charmap.txt @@ -427,7 +427,7 @@ HIGHLIGHT = FC 02 @ same as fc 01 SHADOW = FC 03 @ same as fc 01 COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes PALETTE = FC 05 @ used in credits -SIZE = FC 06 @ note that anything other than "SMALL" is invalid +FONT = FC 06 @ Given a font id, or use font constants below instead RESET_SIZE = FC 07 PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them PAUSE_UNTIL_PRESS = FC 09 @@ -447,10 +447,14 @@ ENG = FC 16 PAUSE_MUSIC = FC 17 RESUME_MUSIC = FC 18 -@ font sizes +@ fonts -SMALL = FC 06 00 -BIG = FC 06 04 +FONT_0 = FC 06 00 +FONT_1 = FC 06 01 +FONT_2 = FC 06 02 +FONT_3 = FC 06 03 +FONT_4 = FC 06 04 +FONT_5 = FC 06 05 @ colors diff --git a/data/maps/CeladonCity_DepartmentStore_Roof/text.inc b/data/maps/CeladonCity_DepartmentStore_Roof/text.inc index 23243f721..95e95feff 100644 --- a/data/maps/CeladonCity_DepartmentStore_Roof/text.inc +++ b/data/maps/CeladonCity_DepartmentStore_Roof/text.inc @@ -1,7 +1,7 @@ CeladonCity_DepartmentStore_Roof_Text_ImThirstyGiveHerDrink:: .string "I'm thirsty!\n" .string "I want something to drink!\p" - .string "{SIZE}ÁGive her a drink?$" + .string "{FONT_2}Give her a drink?$" CeladonCity_DepartmentStore_Roof_Text_GiveWhichDrink:: .string "Give her which drink?$" diff --git a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/text.inc b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/text.inc index 9cb7e1691..e9dca709d 100644 --- a/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/text.inc +++ b/data/maps/CinnabarIsland_PokemonLab_ExperimentRoom/text.inc @@ -64,7 +64,7 @@ CinnabarIsland_PokemonLab_ExperimentRoom_Text_ThatFossilIsOfMonMakeItLiveAgain:: CinnabarIsland_PokemonLab_ExperimentRoom_Text_HandedFossilToWeirdDoctor:: .string "So!\n" .string "You hurry and give me that!\p" - .string "{SIZE}Á{PLAYER} handed over the\n" + .string "{FONT_2}{PLAYER} handed over the\n" .string "{STR_VAR_2} to the weird doctor.$" CinnabarIsland_PokemonLab_ExperimentRoom_Text_TakesTimeGoForWalk:: diff --git a/data/maps/PalletTown_RivalsHouse/text.inc b/data/maps/PalletTown_RivalsHouse/text.inc index 95ba3c061..253f61236 100644 --- a/data/maps/PalletTown_RivalsHouse/text.inc +++ b/data/maps/PalletTown_RivalsHouse/text.inc @@ -62,8 +62,8 @@ PalletTown_RivalsHouse_Text_LookingNiceInNoTime:: .string "nice in no time.$" PalletTown_RivalsHouse_Text_ThereYouGoAllDone:: - .string "{SIZE}Á{STR_VAR_1} looks dreamily content…\p" - .string "{SIZE}ÈDAISY: There you go! All done.\n" + .string "{FONT_2}{STR_VAR_1} looks dreamily content…\p" + .string "{FONT_5}DAISY: There you go! All done.\n" .string "See? Doesn't it look nice?\p" .string "Giggle…\n" .string "It's such a cute POKéMON.$" diff --git a/data/maps/PewterCity_Gym/text.inc b/data/maps/PewterCity_Gym/text.inc index c93a8600c..0b12ccd6c 100644 --- a/data/maps/PewterCity_Gym/text.inc +++ b/data/maps/PewterCity_Gym/text.inc @@ -23,9 +23,9 @@ PewterCity_Gym_Text_BrockDefeat:: .string "As proof of your victory, I confer\n" .string "on you this…the official POKéMON\l" .string "LEAGUE BOULDERBADGE.\p" - .string "{SIZE}Á{PLAYER} received the BOULDERBADGE\n" + .string "{FONT_2}{PLAYER} received the BOULDERBADGE\n" .string "from BROCK!{PAUSE_MUSIC}{PLAY_BGM}{MUS_OBTAIN_BADGE}{PAUSE 0xFE}{PAUSE 0x56}{RESUME_MUSIC}\p" - .string "{SIZE}ÇJust having the BOULDERBADGE makes\n" + .string "{FONT_4}Just having the BOULDERBADGE makes\n" .string "your POKéMON more powerful.\p" .string "It also enables the use of the\n" .string "move FLASH outside of battle.\p" diff --git a/data/maps/VermilionCity/text.inc b/data/maps/VermilionCity/text.inc index 3674d5fe5..a7d41c462 100644 --- a/data/maps/VermilionCity/text.inc +++ b/data/maps/VermilionCity/text.inc @@ -61,14 +61,14 @@ VermilionCity_Text_DoYouHaveATicket:: .string "Excuse me, do you have a ticket?$" VermilionCity_Text_FlashedSSTicket:: - .string "{SIZE}Á{PLAYER} flashed the S.S. TICKET!\p" - .string "{SIZE}ÇGreat!\n" + .string "{FONT_2}{PLAYER} flashed the S.S. TICKET!\p" + .string "{FONT_4}Great!\n" .string "Welcome to the S.S. ANNE!$" VermilionCity_Text_DontHaveNeededSSTicket:: - .string "{SIZE}Á{PLAYER} doesn't have the needed\n" + .string "{FONT_2}{PLAYER} doesn't have the needed\n" .string "S.S. TICKET.\p" - .string "{SIZE}ÇSorry!\p" + .string "{FONT_4}Sorry!\p" .string "You need a ticket to get aboard.$" VermilionCity_Text_TheShipSetSail:: diff --git a/data/text/fame_checker.inc b/data/text/fame_checker.inc index 37a975411..a95d2abc8 100644 --- a/data/text/fame_checker.inc +++ b/data/text/fame_checker.inc @@ -4,13 +4,13 @@ gFameCheckerFlavorText_ProfOak0:: @ 0x81AD106 gFameCheckerFlavorText_ProfOak1:: @ 0x81AD145 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}To make a complete guide on all\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}To make a complete guide on all\n" .string "the POKéMON in the world…\p" .string "That was my dream!$" gFameCheckerFlavorText_ProfOak2:: @ 0x81AD1BB .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}PROF. OAK may not look like much,\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}PROF. OAK may not look like much,\n" .string "but he's the authority on POKéMON.\p" .string "Many POKéMON TRAINERS hold him in\n" .string "high regard.$" @@ -22,7 +22,7 @@ gFameCheckerFlavorText_ProfOak3:: @ 0x81AD258 gFameCheckerFlavorText_ProfOak4:: @ 0x81AD2B9 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear OAK's taken a lot of\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear OAK's taken a lot of\n" .string "interest in you, child.\p" .string "That old duff was once tough and\n" .string "handsome.\p" @@ -31,26 +31,26 @@ gFameCheckerFlavorText_ProfOak4:: @ 0x81AD2B9 gFameCheckerFlavorText_ProfOak5:: @ 0x81AD377 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}PROF. OAK is going to have his own\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}PROF. OAK is going to have his own\n" .string "radio show soon.\p" .string "The program will be called PROF.\n" .string "OAK'S POKéMON SEMINAR.$" gFameCheckerFlavorText_Daisy0:: @ 0x81AD40C .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}If you show DAISY your POKéMON,\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}If you show DAISY your POKéMON,\n" .string "she can tell how much it likes you.\p" .string "Occasionally, she will even groom\n" .string "a POKéMON for you.$" gFameCheckerFlavorText_Daisy1:: @ 0x81AD4AE .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}But the person who is most liked by\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}But the person who is most liked by\n" .string "POKéMON is DAISY, I think.$" gFameCheckerFlavorText_Daisy2:: @ 0x81AD516 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}She was gently grooming POKéMON…\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}She was gently grooming POKéMON…\n" .string "She was a little angel.\p" .string "That little girl's name…\n" .string "I think it was DAISY.$" @@ -62,7 +62,7 @@ gFameCheckerFlavorText_Daisy3:: @ 0x81AD5A7 gFameCheckerFlavorText_Daisy4:: @ 0x81AD608 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}A girl from PALLET TOWN, DAISY,\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}A girl from PALLET TOWN, DAISY,\n" .string "she enjoys TEA every day.\p" .string "She visits the CELADON DEPT. STORE\n" .string "to buy some TEA.$" @@ -81,7 +81,7 @@ gFameCheckerFlavorText_Brock0:: @ 0x81AD705 gFameCheckerFlavorText_Brock1:: @ 0x81AD771 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My rock-hard willpower is evident\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My rock-hard willpower is evident\n" .string "in even my POKéMON.\p" .string "My POKéMON are all rock hard and\n" .string "have true-grit determination.\p" @@ -90,7 +90,7 @@ gFameCheckerFlavorText_Brock1:: @ 0x81AD771 gFameCheckerFlavorText_Brock2:: @ 0x81AD840 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}There aren't many serious POKéMON\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}There aren't many serious POKéMON\n" .string "TRAINERS here.\p" .string "They're all like BUG CATCHERS,\n" .string "you know, just hobbyists.\p" @@ -99,14 +99,14 @@ gFameCheckerFlavorText_Brock2:: @ 0x81AD840 gFameCheckerFlavorText_Brock3:: @ 0x81AD908 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BROCK is cool. He's not just tough.\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BROCK is cool. He's not just tough.\n" .string "People like and respect him.\p" .string "I want to become a GYM LEADER\n" .string "like him.$" gFameCheckerFlavorText_Brock4:: @ 0x81AD99A .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hi, I'm excavating for fossils here\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hi, I'm excavating for fossils here\n" .string "under MT. MOON.\p" .string "Sometimes, BROCK of PEWTER GYM\n" .string "lends me a hand.$" @@ -124,25 +124,25 @@ gFameCheckerFlavorText_Misty0:: @ 0x81ADA91 gFameCheckerFlavorText_Misty1:: @ 0x81ADAF6 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My policy is an all-out offensive\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My policy is an all-out offensive\n" .string "with WATER-type POKéMON!$" gFameCheckerFlavorText_Misty2:: @ 0x81ADB5A .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}MISTY is a TRAINER who's going to\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}MISTY is a TRAINER who's going to\n" .string "keep improving.\p" .string "She won't lose to someone like you!$" gFameCheckerFlavorText_Misty3:: @ 0x81ADBD9 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Strong TRAINERS and WATER POKéMON\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Strong TRAINERS and WATER POKéMON\n" .string "are common sights in these parts.\p" .string "They say that MISTY of the\n" .string "CERULEAN GYM trains here.$" gFameCheckerFlavorText_Misty4:: @ 0x81ADC72 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}This cape is a famous date spot.\p" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}This cape is a famous date spot.\p" .string "MISTY, the GYM LEADER, has high\n" .string "hopes about this place.$" @@ -159,23 +159,23 @@ gFameCheckerFlavorText_LtSurge0:: @ 0x81ADD3C gFameCheckerFlavorText_LtSurge1:: @ 0x81ADDA7 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I tell you, kid, electric POKéMON\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I tell you, kid, electric POKéMON\n" .string "saved me during the war!$" gFameCheckerFlavorText_LtSurge2:: @ 0x81ADE0B .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}When I was in the Army, LT. SURGE\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}When I was in the Army, LT. SURGE\n" .string "was my strict CO.\p" .string "He was a hard taskmaster.$" gFameCheckerFlavorText_LtSurge3:: @ 0x81ADE82 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}LT. SURGE was always famous for\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}LT. SURGE was always famous for\n" .string "his cautious nature in the Army.$" gFameCheckerFlavorText_LtSurge4:: @ 0x81ADEEC .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}LT. SURGE installed the traps in\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}LT. SURGE installed the traps in\n" .string "the GYM himself.\p" .string "He set up double locks everywhere.$" @@ -194,26 +194,26 @@ gFameCheckerFlavorText_Erika0:: @ 0x81AE009 gFameCheckerFlavorText_Erika1:: @ 0x81AE072 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am a student of the art of\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am a student of the art of\n" .string "flower arranging.\p" .string "My POKéMON are solely of the\n" .string "GRASS type.$" gFameCheckerFlavorText_Erika2:: @ 0x81AE0F3 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Our LEADER ERIKA might be quiet,\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Our LEADER ERIKA might be quiet,\n" .string "but she's famous around here.$" gFameCheckerFlavorText_Erika3:: @ 0x81AE15B .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We only use GRASS-type POKéMON at\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We only use GRASS-type POKéMON at\n" .string "our GYM.\p" .string "Why? We also use them for making\n" .string "flower arrangements!$" gFameCheckerFlavorText_Erika4:: @ 0x81AE1E5 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I would never collect POKéMON if\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I would never collect POKéMON if\n" .string "they were unattractive.$" gFameCheckerFlavorText_Erika5:: @ 0x81AE247 @@ -230,18 +230,18 @@ gFameCheckerFlavorText_Koga0:: @ 0x81AE2B6 gFameCheckerFlavorText_Koga1:: @ 0x81AE31D .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Despair to the creeping horror of\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Despair to the creeping horror of\n" .string "POISON-type POKéMON!$" gFameCheckerFlavorText_Koga2:: @ 0x81AE37D .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Even though I've lost, I will keep\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Even though I've lost, I will keep\n" .string "training according to the teachings\l" .string "of KOGA, my ninja master.$" gFameCheckerFlavorText_Koga3:: @ 0x81AE407 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My father is the GYM LEADER of\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My father is the GYM LEADER of\n" .string "this town.\p" .string "I'm training to use POISON POKéMON\n" .string "as well as my father.$" @@ -255,7 +255,7 @@ gFameCheckerFlavorText_Koga4:: @ 0x81AE48D gFameCheckerFlavorText_Koga5:: @ 0x81AE51B .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The SAFARI ZONE's huge, wouldn't\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The SAFARI ZONE's huge, wouldn't\n" .string "you say?\p" .string "FUCHSIA's GYM LEADER, KOGA, \n" .string "patrols the grounds every so often.\p" @@ -270,21 +270,21 @@ gFameCheckerFlavorText_Sabrina0:: @ 0x81AE5E8 gFameCheckerFlavorText_Sabrina1:: @ 0x81AE656 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You know about a girl GYM LEADER\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You know about a girl GYM LEADER\n" .string "in SAFFRON CITY?\p" .string "She uses PSYCHIC-type POKéMON,\n" .string "right?$" gFameCheckerFlavorText_Sabrina2:: @ 0x81AE6D7 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I have had psychic powers since\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I have had psychic powers since\n" .string "I was a child.\p" .string "It started when a spoon I\n" .string "carelessly tossed, bent.$" gFameCheckerFlavorText_Sabrina3:: @ 0x81AE762 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I dislike battling, but if you wish,\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I dislike battling, but if you wish,\n" .string "I will show you my powers!$" gFameCheckerFlavorText_Sabrina4:: @ 0x81AE7CB @@ -295,7 +295,7 @@ gFameCheckerFlavorText_Sabrina4:: @ 0x81AE7CB gFameCheckerFlavorText_Sabrina5:: @ 0x81AE841 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}SABRINA just wiped out the KARATE\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}SABRINA just wiped out the KARATE\n" .string "MASTER next door.$" gFameCheckerFlavorText_Blaine0:: @ 0x81AE89E @@ -306,13 +306,13 @@ gFameCheckerFlavorText_Blaine0:: @ 0x81AE89E gFameCheckerFlavorText_Blaine1:: @ 0x81AE90A .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My fiery POKéMON are all rough\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My fiery POKéMON are all rough\n" .string "and ready with intense heat!\p" .string "They incinerate all challengers!$" gFameCheckerFlavorText_Blaine2:: @ 0x81AE990 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Our LEADER, BLAINE, became lost\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Our LEADER, BLAINE, became lost\n" .string "in the mountains but good.\p" .string "Night fell when a fiery bird\n" .string "POKéMON appeared.\p" @@ -321,7 +321,7 @@ gFameCheckerFlavorText_Blaine2:: @ 0x81AE990 gFameCheckerFlavorText_Blaine3:: @ 0x81AEA59 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}CINNABAR GYM's BLAINE is quite the\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}CINNABAR GYM's BLAINE is quite the\n" .string "odd fellow.\p" .string "He's lived on the island since way\n" .string "before the LAB was built.$" @@ -341,16 +341,16 @@ gFameCheckerFlavorText_Blaine5:: @ 0x81AEB69 gFameCheckerFlavorText_Lorelei0:: @ 0x81AEBDF .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am LORELEI of the ELITE FOUR.$" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am LORELEI of the ELITE FOUR.$" gFameCheckerFlavorText_Lorelei1:: @ 0x81AEC28 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}No one can best me when it comes\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}No one can best me when it comes\n" .string "to icy POKéMON.$" gFameCheckerFlavorText_Lorelei2:: @ 0x81AEC82 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Where was this person born?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We've had a great and powerful\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We've had a great and powerful\n" .string "TRAINER grow up on this island.\p" .string "I bet even you'd know her.\n" .string "It's LORELEI of the ELITE FOUR!$" @@ -363,14 +363,14 @@ gFameCheckerFlavorText_Lorelei3:: @ 0x81AED27 gFameCheckerFlavorText_Lorelei4:: @ 0x81AEDAA .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Did you know that LORELEI has lots\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Did you know that LORELEI has lots\n" .string "and lots of stuffed dolls?\p" .string "Every time she comes back to\n" .string "FOUR ISLAND, her collection grows!$" gFameCheckerFlavorText_Lorelei5:: @ 0x81AEE51 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The LAPRAS she has, I imagine it\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The LAPRAS she has, I imagine it\n" .string "to be the one she met as a child.\p" .string "I believe it was in ICEFALL CAVE\n" .string "that she caught it.\p" @@ -379,11 +379,11 @@ gFameCheckerFlavorText_Lorelei5:: @ 0x81AEE51 gFameCheckerFlavorText_Bruno0:: @ 0x81AEF25 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am BRUNO of the ELITE FOUR!$" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am BRUNO of the ELITE FOUR!$" gFameCheckerFlavorText_Bruno1:: @ 0x81AEF6C .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I've lived and trained with my\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I've lived and trained with my\n" .string "fighting POKéMON!$" gFameCheckerFlavorText_Bruno2:: @ 0x81AEFC6 @@ -394,14 +394,14 @@ gFameCheckerFlavorText_Bruno2:: @ 0x81AEFC6 gFameCheckerFlavorText_Bruno3:: @ 0x81AF04C .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BRUNO, who's a senior ahead of me,\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BRUNO, who's a senior ahead of me,\n" .string "visits the SPA on occasion.\p" .string "He comes to rehab injuries, both\n" .string "his own and his POKéMON's.$" gFameCheckerFlavorText_Bruno4:: @ 0x81AF0F0 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's one of the ELITE FOUR.\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's one of the ELITE FOUR.\n" .string "His name is BRUNO.\p" .string "He went away disappointed when he\n" .string "found out that they were all sold\l" @@ -409,22 +409,22 @@ gFameCheckerFlavorText_Bruno4:: @ 0x81AF0F0 gFameCheckerFlavorText_Bruno5:: @ 0x81AF19A .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Even BRUNO…\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Even BRUNO…\n" .string "He trained with a fellow by the\l" .string "name of BRAWLY before.$" gFameCheckerFlavorText_Agatha0:: @ 0x81AF200 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am AGATHA of the ELITE FOUR.$" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am AGATHA of the ELITE FOUR.$" gFameCheckerFlavorText_Agatha1:: @ 0x81AF248 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}AGATHA's GHOST-type POKéMON are\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}AGATHA's GHOST-type POKéMON are\n" .string "horrifically terrifying in toughness.$" gFameCheckerFlavorText_Agatha2:: @ 0x81AF2B7 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}That old lady's also got a really\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}That old lady's also got a really\n" .string "short fuse, too.\p" .string "It doesn't take anything to get\n" .string "that scary lady hollering.$" @@ -437,7 +437,7 @@ gFameCheckerFlavorText_Agatha3:: @ 0x81AF34E gFameCheckerFlavorText_Agatha4:: @ 0x81AF3BE .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear OAK's taken a lot of\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear OAK's taken a lot of\n" .string "interest in you, child.\p" .string "That old duff was once tough and\n" .string "handsome.\p" @@ -446,19 +446,19 @@ gFameCheckerFlavorText_Agatha4:: @ 0x81AF3BE gFameCheckerFlavorText_Agatha5:: @ 0x81AF47C .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Take AGATHA, for example.\p" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Take AGATHA, for example.\p" .string "She set a record for being the\n" .string "oldest-ever ELITE FOUR member.$" gFameCheckerFlavorText_Lance0:: @ 0x81AF4FD .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I lead the ELITE FOUR.\p" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I lead the ELITE FOUR.\p" .string "You can call me LANCE the dragon\n" .string "TRAINER.$" gFameCheckerFlavorText_Lance1:: @ 0x81AF567 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You know that dragons are\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You know that dragons are\n" .string "mythical POKéMON.\p" .string "They're hard to catch and raise,\n" .string "but their powers are superior.\p" @@ -467,13 +467,13 @@ gFameCheckerFlavorText_Lance1:: @ 0x81AF567 gFameCheckerFlavorText_Lance2:: @ 0x81AF641 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He stands for justice!\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He stands for justice!\n" .string "He's cool, and yet passionate!\l" .string "He's the greatest, LANCE!$" gFameCheckerFlavorText_Lance3:: @ 0x81AF6BA .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We have a customer, LANCE, who\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}We have a customer, LANCE, who\n" .string "occasionally comes.\p" .string "He always buys capes.\p" .string "I wonder… Does he have many\n" @@ -487,56 +487,56 @@ gFameCheckerFlavorText_Lance4:: @ 0x81AF758 gFameCheckerFlavorText_Lance5:: @ 0x81AF7CB .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}From what I've heard, LANCE has\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}From what I've heard, LANCE has\n" .string "a cousin who's a GYM LEADER\l" .string "somewhere far away.$" gFameCheckerFlavorText_Bill0:: @ 0x81AF83E .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}After all, BILL's world-famous as a\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}After all, BILL's world-famous as a\n" .string "POKéMANIAC.\p" .string "He invented the POKéMON Storage\n" .string "System on PC, too.$" gFameCheckerFlavorText_Bill1:: @ 0x81AF8CA .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL has lots of POKéMON!\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL has lots of POKéMON!\n" .string "He collects rare ones, too!$" gFameCheckerFlavorText_Bill2:: @ 0x81AF929 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's my grandson!\p" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's my grandson!\p" .string "He always liked collecting things,\n" .string "even as a child!$" gFameCheckerFlavorText_Bill3:: @ 0x81AF998 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL is a POKéMANIAC, so he loves\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL is a POKéMANIAC, so he loves\n" .string "every kind.\p" .string "Apparently, the first one he caught\n" .string "was an ABRA.$" gFameCheckerFlavorText_Bill4:: @ 0x81AFA20 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL's hometown is GOLDENROD CITY,\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}BILL's hometown is GOLDENROD CITY,\n" .string "where his folks still live.\p" .string "I've heard that it's quite the\n" .string "festive, bustling city.$" gFameCheckerFlavorText_Bill5:: @ 0x81AFAB9 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Apparently, BILL simply can't\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Apparently, BILL simply can't\n" .string "stomach milk at all.$" gFameCheckerFlavorText_MrFuji0:: @ 0x81AFB0C .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's really kind.\p" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}He's really kind.\p" .string "He looks after abandoned and\n" .string "orphaned POKéMON.$" gFameCheckerFlavorText_MrFuji1:: @ 0x81AFB76 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}This old guy marched right up to\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}This old guy marched right up to\n" .string "our HIDEOUT.\p" .string "Then, he starts ranting about how\n" .string "TEAM ROCKET's abusing POKéMON.\p" @@ -553,7 +553,7 @@ gFameCheckerFlavorText_MrFuji2:: @ 0x81AFC38 gFameCheckerFlavorText_MrFuji3:: @ 0x81AFCE9 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}There's a rumor…\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear that MR. FUJI's not from\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I hear that MR. FUJI's not from\n" .string "these parts originally, either.$" gFameCheckerFlavorText_MrFuji4:: @ 0x81AFD49 @@ -572,7 +572,7 @@ gFameCheckerFlavorText_MrFuji5:: @ 0x81AFDC4 gFameCheckerFlavorText_Giovanni0:: @ 0x81AFE68 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}TEAM ROCKET captures POKéMON from\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}TEAM ROCKET captures POKéMON from\n" .string "around the world.\p" .string "They're important tools for keeping\n" .string "our criminal enterprise going.\p" @@ -580,32 +580,32 @@ gFameCheckerFlavorText_Giovanni0:: @ 0x81AFE68 gFameCheckerFlavorText_Giovanni1:: @ 0x81AFF23 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Favorite kind of POKéMON?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Those thugs that took over our\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Those thugs that took over our\n" .string "building…\p" .string "Their BOSS said he was looking for\n" .string "strong POKéMON.$" gFameCheckerFlavorText_Giovanni2:: @ 0x81AFFA8 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What is this person like?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}TEAM ROCKET's BOSS is terribly\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}TEAM ROCKET's BOSS is terribly\n" .string "cruel!\p" .string "To him, POKéMON are just tools to\n" .string "be used.$" gFameCheckerFlavorText_Giovanni3:: @ 0x81B0022 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Welcome to my hideout!\p" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Welcome to my hideout!\p" .string "It shall be so until I can restore\n" .string "TEAM ROCKET to its former glory.$" gFameCheckerFlavorText_Giovanni4:: @ 0x81B00A6 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}What does this person do?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Blow me away! GIOVANNI was the\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Blow me away! GIOVANNI was the\n" .string "GYM LEADER of VIRIDIAN?$" gFameCheckerFlavorText_Giovanni5:: @ 0x81B0106 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}Family and friends?\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You… You're not GIOVANNI's kid,\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You… You're not GIOVANNI's kid,\n" .string "are you?\p" .string "No, that can't be right.\n" .string "GIOVANNI's kid has red hair.$" @@ -617,7 +617,7 @@ gFameCheckerPersonName_ProfOak:: @ 0x81B0188 gFameCheckerPersonQuote_ProfOak:: @ 0x81B0198 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: PROF. OAK\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Why do POKéMON compete and battle\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Why do POKéMON compete and battle\n" .string "so hard for you?\p" .string "They do so because they can see\n" .string "the love and trust you have\l" @@ -630,7 +630,7 @@ gFameCheckerPersonName_Daisy:: @ 0x81B0251 gFameCheckerPersonQuote_Daisy:: @ 0x81B025D .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: DAISY\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}While I was comfortably enjoying\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}While I was comfortably enjoying\n" .string "my tea breaks, you've grown very\l" .string "skilled and powerful.\p" .string "I hope you'll remain a good rival\n" @@ -642,7 +642,7 @@ gFameCheckerPersonName_Brock:: @ 0x81B030F gFameCheckerPersonQuote_Brock:: @ 0x81B031B .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: BROCK\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}In this big world of ours, there\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}In this big world of ours, there\n" .string "must be many tough TRAINERS.\p" .string "Let's both keep training and\n" .string "making ourselves stronger!$" @@ -653,7 +653,7 @@ gFameCheckerPersonName_Misty:: @ 0x81B03B3 gFameCheckerPersonQuote_Misty:: @ 0x81B03BF .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: MISTY\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I'm going to keep training here at\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I'm going to keep training here at\n" .string "this GYM.\p" .string "When I get better, I'd love to hit\n" .string "the road and travel.$" @@ -664,7 +664,7 @@ gFameCheckerPersonName_LtSurge:: @ 0x81B0446 gFameCheckerPersonQuote_LtSurge:: @ 0x81B0456 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: LT. SURGE\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hey, kid!\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hey, kid!\n" .string "You electrified me in our battle!\p" .string "I didn't know that there were\n" .string "gutsy TRAINERS like you.\p" @@ -677,7 +677,7 @@ gFameCheckerPersonName_Erika:: @ 0x81B0504 gFameCheckerPersonQuote_Erika:: @ 0x81B0510 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: ERIKA\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am so glad that there are strong\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I am so glad that there are strong\n" .string "TRAINERS like you.\p" .string "That awareness alone inspires and\n" .string "motivates me to try harder.\p" @@ -690,7 +690,7 @@ gFameCheckerPersonName_Koga:: @ 0x81B05C2 gFameCheckerPersonQuote_Koga:: @ 0x81B05CD .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: KOGA\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You and I, we must both set our\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}You and I, we must both set our\n" .string "sights higher and work towards\l" .string "meeting our challenges.\p" .string "Now, I must go train my daughter.$" @@ -701,7 +701,7 @@ gFameCheckerPersonName_Sabrina:: @ 0x81B0667 gFameCheckerPersonQuote_Sabrina:: @ 0x81B0675 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: SABRINA\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The love you have towards your\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The love you have towards your\n" .string "POKéMON…\p" .string "It was a power that was never\n" .string "bested by my psychic power.$" @@ -712,7 +712,7 @@ gFameCheckerPersonName_Blaine:: @ 0x81B06FB gFameCheckerPersonQuote_Blaine:: @ 0x81B0708 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: BLAINE\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My fire POKéMON!\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}My fire POKéMON!\n" .string "They'll become even more powerful!\p" .string "And now, a quiz. How many kinds of\n" .string "FIRE-type POKéMON are there?$" @@ -723,7 +723,7 @@ gFameCheckerPersonName_Lorelei:: @ 0x81B079F gFameCheckerPersonQuote_Lorelei:: @ 0x81B07AD .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: LORELEI\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I needed to thank you for your\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I needed to thank you for your\n" .string "help.\p" .string "But that has nothing to do with our\n" .string "battles.\p" @@ -735,7 +735,7 @@ gFameCheckerPersonName_Bruno:: @ 0x81B0845 gFameCheckerPersonQuote_Bruno:: @ 0x81B0851 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: BRUNO\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The super power of your POKéMON\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}The super power of your POKéMON\n" .string "and you I've experienced myself.\p" .string "Next time, maybe I should show you\n" .string "how to train yourself.$" @@ -746,7 +746,7 @@ gFameCheckerPersonName_Agatha:: @ 0x81B08EE gFameCheckerPersonQuote_Agatha:: @ 0x81B08FB .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: AGATHA\n" .string "To: {PLAYER}\p" - .string "{SIZE 05}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}When you grow older, don't you\n" + .string "{FONT_5}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}When you grow older, don't you\n" .string "dare go soft like that coot OAK!\p" .string "Be like me and keep battling on!$" @@ -756,7 +756,7 @@ gFameCheckerPersonName_Lance:: @ 0x81B097F gFameCheckerPersonQuote_Lance:: @ 0x81B098B .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: LANCE\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I'm considering going back to my\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}I'm considering going back to my\n" .string "hometown.\p" .string "I want to retrain my DRAGON-type\n" .string "POKéMON and strengthen them.\p" @@ -769,7 +769,7 @@ gFameCheckerPersonName_Bill:: @ 0x81B0A45 gFameCheckerPersonQuote_Bill:: @ 0x81B0A50 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: BILL\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hey, there! CELIO had nothing but\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Hey, there! CELIO had nothing but\n" .string "praise for you.\p" .string "Hearing that makes me happy.\p" .string "When you catch some rare POKéMON,\n" @@ -781,7 +781,7 @@ gFameCheckerPersonName_MrFuji:: @ 0x81B0AFF gFameCheckerPersonQuote_MrFuji:: @ 0x81B0B0E .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: MR. FUJI\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Instead of hoping for the happiness\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}Instead of hoping for the happiness\n" .string "of just your POKéMON…\p" .string "…Can I get you to wish for the\n" .string "happiness of all POKéMON?$" @@ -792,7 +792,7 @@ gFameCheckerPersonName_Giovanni:: @ 0x81B0BA6 gFameCheckerPersonQuote_Giovanni:: @ 0x81B0BB5 .string "{COLOR BLUE}{SHADOW LIGHT_BLUE}From: GIOVANNI\n" .string "To: {PLAYER}\p" - .string "{SIZE 04}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}There is nothing that I wish to say\n" + .string "{FONT_4}{COLOR DARK_GRAY}{SHADOW LIGHT_GRAY}There is nothing that I wish to say\n" .string "to you.\p" .string "I will concentrate solely on\n" .string "bettering myself, and none other.$" diff --git a/data/text/pokedex_rating.inc b/data/text/pokedex_rating.inc index 23d9496b9..dd93f2f9e 100644 --- a/data/text/pokedex_rating.inc +++ b/data/text/pokedex_rating.inc @@ -8,7 +8,7 @@ PokedexRating_Text_SeenXOwnedY:: .string "on your POKéDEX is:\p" .string "{STR_VAR_1} POKéMON seen and\n" .string "{STR_VAR_2} POKéMON owned.\p" - .string "{SIZE}ÁPROF. OAK's rating:$" + .string "{FONT_2}PROF. OAK's rating:$" PokedexRating_Text_LessThan10:: .string "You still have lots to do.\p" diff --git a/include/help_system.h b/include/help_system.h index 92e97731e..040c1891f 100644 --- a/include/help_system.h +++ b/include/help_system.h @@ -85,7 +85,7 @@ void HelpSystem_SetInputDelay(u8); s32 HelpSystem_GetMenuInput(void); void HS_UpdateMenuScrollArrows(void); -void DecompressAndRenderGlyph(u8 font, u16 glyph, struct Bitmap *srcBlit, struct Bitmap *destBlit, u8 *destBuffer, u8 x, u8 y, u8 width, u8 height); +void DecompressAndRenderGlyph(u8 fontId, u16 glyph, struct Bitmap *srcBlit, struct Bitmap *destBlit, u8 *destBuffer, u8 x, u8 y, u8 width, u8 height); void HelpSystem_PrintTextInTopLeftCorner(const u8 * str); void HelpSystem_FillPanel3(void); void PrintListMenuItems(void); @@ -93,7 +93,7 @@ void PlaceListMenuCursor(void); bool8 MoveCursor(u8 by, u8 dirn); void BackupHelpContext(void); void RestoreHelpContext(void); -void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 width, u8 height); +void HelpSystemRenderText(u8 fontId, u8 * dest, const u8 * src, u8 x, u8 y, u8 width, u8 height); void HelpSystem_DisableToggleWithRButton(void); #endif //GUARD_HELP_SYSTEM_H diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h index 3af2074ba..99a8e1400 100644 --- a/include/new_menu_helpers.h +++ b/include/new_menu_helpers.h @@ -36,7 +36,7 @@ void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram); void sub_80F7768(u8 windowId, bool8 copyToVram); void Menu_LoadStdPal(void); void Menu_LoadStdPalAt(u16 offset); -void DisplayItemMessageOnField(u8 taskId, u8 textSpeed, const u8 *src, TaskFunc callback); +void DisplayItemMessageOnField(u8 taskId, u8 fontId, const u8 *src, TaskFunc callback); void DisplayYesNoMenuDefaultYes(void); void DisplayYesNoMenuDefaultNo(void); u8 GetTextSpeedSetting(void); diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 2358347fb..e8b8aa7b8 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -393,7 +393,7 @@ extern struct PokemonStorageSystemData *gPSSData; void Cb2_EnterPSS(u8 a0); u8 GetCurrentBoxOption(void); -struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); +struct Sprite *CreateChooseBoxArrows(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority); void SetBoxWallpaper(u8 boxId, u8 wallpaperId); void SetCurrentBox(u8 boxId); void BoxMonAtToMon(u8 boxId, u8 boxPosition, struct Pokemon * dst); @@ -478,7 +478,7 @@ void SetMenuText(u8 textId); void sub_8095C84(u8 cursorArea, u8 cursorPos); void sub_8095E2C(u16 itemId); u8 GetBoxWallpaper(u8 boxId); -bool8 IsCursorOnBox(void); +bool8 IsCursorOnBoxTitle(void); bool8 IsCursorInBox(void); void sub_808FFAC(void); @@ -492,7 +492,7 @@ void sub_8091114(void); bool8 sub_8091150(void); void sub_80913DC(u8 box); bool8 sub_809140C(void); -void sub_80920FC(bool8 species); +void AnimateBoxScrollArrows(bool8 species); void CreateMovingMonIcon(void); void sub_8090E08(u8 boxId, u8 cursorPos); bool8 sub_8090E74(void); diff --git a/include/shop.h b/include/shop.h index 482c3ddaa..999c3b777 100644 --- a/include/shop.h +++ b/include/shop.h @@ -11,7 +11,7 @@ extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3]; void CreatePokemartMenu(const u16 *itemsForSale); void CreateDecorationShop1Menu(const u16 *); void CreateDecorationShop2Menu(const u16 *); -u8 GetMartUnk16_4(void); +u8 GetMartFontId(void); void RecordItemPurchase(u16 a0, u16 a1, u8 a2); // buy_menu_helper diff --git a/include/text.h b/include/text.h index 6d31b16c7..d0c7f8f54 100644 --- a/include/text.h +++ b/include/text.h @@ -157,8 +157,21 @@ #define NUM_TEXT_PRINTERS 32 #define TEXT_SPEED_INSTANT 0 + +// Given as a text speed when all the text should be +// loaded at once but not copied to vram yet. #define TEXT_SKIP_DRAW 0xFF +enum { + FONT_0, + FONT_1, + FONT_2, + FONT_3, + FONT_4, + FONT_5, + FONT_6, +}; + enum { FONTATTR_MAX_LETTER_WIDTH, @@ -302,7 +315,6 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); -s32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing); s32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32); s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing); u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str, int a3, int a4, int a5, int a6, int a7); diff --git a/src/bag.c b/src/bag.c index e790ce20e..416e007d3 100644 --- a/src/bag.c +++ b/src/bag.c @@ -225,16 +225,16 @@ void BagPrintTextOnWindow(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 void BagPrintTextOnWin1CenteredColor0(const u8 * str, u8 unused) { - u32 x = 0x48 - GetStringWidth(1, str, 0); - AddTextPrinterParameterized3(2, 1, x / 2, 1, sTextColors[0], 0, str); + u32 x = 0x48 - GetStringWidth(FONT_1, str, 0); + AddTextPrinterParameterized3(2, FONT_1, x / 2, 1, sTextColors[0], 0, str); } void BagDrawDepositItemTextBox(void) { u32 x; DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 0x0C); - x = 0x40 - GetStringWidth(0, gText_DepositItem, 0); - AddTextPrinterParameterized(2, 0, gText_DepositItem, x / 2, 1, 0, NULL); + x = 0x40 - GetStringWidth(FONT_0, gText_DepositItem, 0); + AddTextPrinterParameterized(2, FONT_0, gText_DepositItem, x / 2, 1, 0, NULL); } u8 ShowBagWindow(u8 whichWindow, u8 nItems) @@ -293,12 +293,12 @@ u8 GetBagWindow(u8 whichWindow) void BagCreateYesNoMenuBottomRight(u8 taskId, const struct YesNoFuncTable * ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], 2, 0, 2, 0x064, 0x0E, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], FONT_2, 0, 2, 0x064, 0x0E, ptrs); } void BagCreateYesNoMenuTopRight(u8 taskId, const struct YesNoFuncTable * ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], 2, 0, 2, 0x064, 0x0E, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], FONT_2, 0, 2, 0x064, 0x0E, ptrs); } void BagPrintMoneyAmount(void) diff --git a/src/battle_interface.c b/src/battle_interface.c index 2f7625f21..d0713bda1 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -2161,7 +2161,7 @@ static u8 *AddTextPrinterAndCreateWindowOnHealthbox(const u8 *str, u32 x, u32 y, color[1] = 1; color[2] = 3; - AddTextPrinterParameterized4(winId, 0, x, y, 0, 0, color, -1, str); + AddTextPrinterParameterized4(winId, FONT_0, x, y, 0, 0, color, -1, str); *windowId = winId; return (u8 *)(GetWindowAttribute(winId, WINDOW_TILE_DATA)); diff --git a/src/battle_message.c b/src/battle_message.c index 074073be1..436136069 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -1237,7 +1237,7 @@ const u8 gUnknown_83FE7BF[] = _("{RIGHT_ARROW_2}"); const u8 gUnknown_83FE7C2[] = _("{PLUS}"); const u8 gUnknown_83FE7C5[] = _("-"); -const u8 gUnknown_83FE7C7[] = _("{SIZE 0}Max{SIZE 2} HP"); +const u8 gUnknown_83FE7C7[] = _("{FONT_0}Max{FONT_2} HP"); const u8 gUnknown_83FE7D4[] = _("ATTACK "); const u8 gUnknown_83FE7DC[] = _("DEFENSE"); const u8 gUnknown_83FE7E4[] = _("SP. ATK"); diff --git a/src/battle_records.c b/src/battle_records.c index 740ede597..4bde6aec9 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -486,7 +486,7 @@ static void PrintTotalRecord(struct LinkBattleRecords * records) } StringExpandPlaceholders(gStringVar4, gString_BattleRecords_TotalRecord); - AddTextPrinterParameterized4(0, 2, 12, 24, 0, 2, sTextColor, 0, gStringVar4); + AddTextPrinterParameterized4(0, FONT_2, 12, 24, 0, 2, sTextColor, 0, gStringVar4); } static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) @@ -496,7 +496,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) if (record->wins == 0 && record->losses == 0 && record->draws == 0) { - AddTextPrinterParameterized4(0, 2, 0, y, 0, 2, sTextColor, 0, gString_BattleRecords_7Dashes); + AddTextPrinterParameterized4(0, FONT_2, 0, y, 0, 2, sTextColor, 0, gString_BattleRecords_7Dashes); for (i = 0; i < 3; i++) { if (i == 0) @@ -505,7 +505,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) x = 0x84; else x = 0xB4; - AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gString_BattleRecords_4Dashes); + AddTextPrinterParameterized4(0, FONT_2, x, y, 0, 2, sTextColor, 0, gString_BattleRecords_4Dashes); } } else @@ -533,7 +533,7 @@ static void PrintOpponentBattleRecord(struct LinkBattleRecord * record, u8 y) x = 0xB4; ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4); } - AddTextPrinterParameterized4(0, 2, x, y, 0, 2, sTextColor, 0, gStringVar1); + AddTextPrinterParameterized4(0, FONT_2, x, y, 0, 2, sTextColor, 0, gStringVar1); } } } @@ -545,10 +545,10 @@ static void PrintBattleRecords(void) FillWindowPixelRect(0, PIXEL_FILL(0), 0, 0, 0xD8, 0x90); StringExpandPlaceholders(gStringVar4, gString_BattleRecords_PlayersBattleResults); - left = 0xD0 - GetStringWidth(2, gStringVar4, -1); - AddTextPrinterParameterized4(0, 2, left / 2, 4, 0, 2, sTextColor, 0, gStringVar4); + left = 0xD0 - GetStringWidth(FONT_2, gStringVar4, -1); + AddTextPrinterParameterized4(0, FONT_2, left / 2, 4, 0, 2, sTextColor, 0, gStringVar4); PrintTotalRecord(&gSaveBlock2Ptr->linkBattleRecords); - AddTextPrinterParameterized4(0, 2, 0x54, 0x30, 0, 2, sTextColor, 0, gString_BattleRecords_ColumnHeaders); + AddTextPrinterParameterized4(0, FONT_2, 0x54, 0x30, 0, 2, sTextColor, 0, gString_BattleRecords_ColumnHeaders); for (i = 0; i < LINK_B_RECORDS_COUNT; i++) PrintOpponentBattleRecord(&gSaveBlock2Ptr->linkBattleRecords.entries[i], 0x3D + 14 * i); CommitWindow(0); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b42a51dea..92dc9ecf4 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -5825,7 +5825,7 @@ static void DrawLevelUpBannerText(void) printerTemplate.currentChar = gStringVar4; printerTemplate.windowId = B_WIN_LEVEL_UP_BANNER; - printerTemplate.fontId = 0; + printerTemplate.fontId = FONT_0; printerTemplate.x = 32; printerTemplate.y = 0; printerTemplate.currentX = 32; diff --git a/src/berry_crush.c b/src/berry_crush.c index 259b36a6f..2daca7913 100644 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -1268,11 +1268,11 @@ static u32 Cmd_PrintMessage(struct BerryCrushGame * game, u8 *args) if (bFlags & F_MSG_EXPAND) { StringExpandPlaceholders(gStringVar4, sMessages[bMsgId]); - AddTextPrinterParameterized2(0, 2, gStringVar4, game->textSpeed, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gStringVar4, game->textSpeed, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } else { - AddTextPrinterParameterized2(0, 2, sMessages[bMsgId], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMessages[bMsgId], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } CopyWindowToVram(0, COPYWIN_FULL); break; @@ -2222,7 +2222,7 @@ static u32 Cmd_SaveGame(struct BerryCrushGame * game, u8 *args) if (!IsLinkTaskFinished()) return 0; DrawDialogueFrame(0, FALSE); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); CreateTask(Task_LinkSave, 0); break; @@ -2367,9 +2367,9 @@ static u32 Cmd_StopGame(struct BerryCrushGame * game, UNUSED u8 *args) case 0: DrawDialogueFrame(0, FALSE); if (game->playAgainState == PLAY_AGAIN_NO_BERRIES) - AddTextPrinterParameterized2(0, 2, sMessages[MSG_NO_BERRIES], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMessages[MSG_NO_BERRIES], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else - AddTextPrinterParameterized2(0, 2, sMessages[MSG_DROPPED], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMessages[MSG_DROPPED], game->textSpeed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); break; case 1: @@ -2896,8 +2896,8 @@ static void FramesToMinSec(struct BerryCrushGame_Gfx * gfx, u16 frames) static void PrintTextCentered(u8 windowId, u8 left, u8 colorId, const u8 *string) { - left = (left * 4) - (GetStringWidth(2, string, -1) / 2u); - AddTextPrinterParameterized3(windowId, 2, left, 0, sBerryCrushTextColorTable[colorId], 0, string); + left = (left * 4) - (GetStringWidth(FONT_2, string, -1) / 2u); + AddTextPrinterParameterized3(windowId, FONT_2, left, 0, sBerryCrushTextColorTable[colorId], 0, string); } static void PrintResultsText(struct BerryCrushGame * game, u8 command, u8 x, u8 y) @@ -2922,9 +2922,9 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 command, u8 x, u8 if (i != 0 && bcPlayers->stats[command][i] != bcPlayers->stats[command][i - 1]) linkIdToPrint = i; ConvertIntToDecimalStringN(gStringVar1, bcPlayers->stats[command][i], STR_CONV_MODE_RIGHT_ALIGN, 4); - realX = x - GetStringWidth(2, sBCRankingHeaders[command], -1) - 4; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, realX, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, sBCRankingHeaders[command]); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, realX - 24, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar1); + realX = x - GetStringWidth(FONT_2, sBCRankingHeaders[command], -1) - 4; + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, realX, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, sBCRankingHeaders[command]); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, realX - 24, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar1); break; case RESULTS_PAGE_RANDOM: // Neatness @@ -2943,7 +2943,7 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 command, u8 x, u8 ConvertIntToDecimalStringN(gStringVar2, realX, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, sBCRankingHeaders[command]); realX2 = x - 4; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, realX2 - GetStringWidth(2, gStringVar4, 0), y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, realX2 - GetStringWidth(FONT_2, gStringVar4, 0), y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); break; case RESULTS_PAGE_CRUSHING: // Berry names @@ -2954,7 +2954,7 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 command, u8 x, u8 j = 0; StringCopy(gStringVar1, gBerries[j].name); StringExpandPlaceholders(gStringVar4, sBCRankingHeaders[command]); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x - GetStringWidth(2, gStringVar4, -1) - 4, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x - GetStringWidth(FONT_2, gStringVar4, -1) - 4, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); break; } if (linkPlayerId == game->localId) @@ -2964,7 +2964,7 @@ static void PrintResultsText(struct BerryCrushGame * game, u8 command, u8 x, u8 gStringVar3[0] = linkIdToPrint + CHAR_1; DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, game->players[linkPlayerId].name); DynamicPlaceholderTextUtil_ExpandPlaceholders(gStringVar4, gStringVar3); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 4, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, 4, y + 14 * i, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); } } @@ -2977,30 +2977,30 @@ static void printCrushingResults(struct BerryCrushGame * game) u8 y = GetWindowAttribute(game->gfx.resultsWindowId, WINDOW_HEIGHT) * 8 - 42; FramesToMinSec(&game->gfx, players->time); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_TimeColon); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_TimeColon); - x = 190 - (u8)GetStringWidth(2, gText_SpaceSec, 0); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_SpaceSec); + x = 190 - (u8)GetStringWidth(FONT_2, gText_SpaceSec, 0); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_SpaceSec); x -= 32; ConvertIntToDecimalStringN(gStringVar1, game->gfx.secondsInt, STR_CONV_MODE_LEADING_ZEROS, 2); ConvertIntToDecimalStringN(gStringVar2, game->gfx.secondsFrac, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_XDotY2); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); - x -= (u8)GetStringWidth(2, gText_SpaceMin, 0) + 3; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_SpaceMin); + x -= (u8)GetStringWidth(FONT_2, gText_SpaceMin, 0) + 3; + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_SpaceMin); x -= 9; ConvertIntToDecimalStringN(gStringVar1, game->gfx.minutes, STR_CONV_MODE_LEADING_ZEROS, 1); StringExpandPlaceholders(gStringVar4, gText_StrVar1); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); y += 14; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_PressingSpeed); - x = 190 - (u8)GetStringWidth(2, gText_TimesPerSec, 0); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 3, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); + x = 190 - (u8)GetStringWidth(FONT_2, gText_TimesPerSec, 0); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_3, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_TimesPerSec); for (i = 0; i < 8; ++i) if (((u8)game->pressingSpeed >> (7 - i)) & 1) @@ -3010,17 +3010,17 @@ static void printCrushingResults(struct BerryCrushGame * game) StringExpandPlaceholders(gStringVar4, gText_XDotY3); x -= 38; if (game->newRecord) - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_RED], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_RED], 0, gStringVar4); else - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); y += 14; - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_Silkiness); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, 2, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gText_Silkiness); ConvertIntToDecimalStringN(gStringVar1, players->silkiness, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_Var1Percent); - x = 190 - (u8)GetStringWidth(2, gStringVar4, 0); - AddTextPrinterParameterized3(game->gfx.resultsWindowId, 2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); + x = 190 - (u8)GetStringWidth(FONT_2, gStringVar4, 0); + AddTextPrinterParameterized3(game->gfx.resultsWindowId, FONT_2, x, y, sBerryCrushTextColorTable[COLORID_GRAY], 0, gStringVar4); } static bool32 OpenResultsWindow(struct BerryCrushGame * game, struct BerryCrushGame_Gfx * spriteManager) @@ -3109,20 +3109,20 @@ static void Task_ShowBerryCrushRankings(u8 taskId) DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 0x21D, 0xD); break; case 1: - xPos = 96 - GetStringWidth(2, gText_BerryCrush2, -1) / 2u; + xPos = 96 - GetStringWidth(FONT_2, gText_BerryCrush2, -1) / 2u; AddTextPrinterParameterized3( tWindowId, - 2, + FONT_2, xPos, 2, sBerryCrushTextColorTable[COLORID_BLUE], 0, gText_BerryCrush2 ); - xPos = 96 - GetStringWidth(2, gText_PressingSpeedRankings, -1) / 2u; + xPos = 96 - GetStringWidth(FONT_2, gText_PressingSpeedRankings, -1) / 2u; AddTextPrinterParameterized3( tWindowId, - 2, + FONT_2, xPos, 18, sBerryCrushTextColorTable[COLORID_BLUE], @@ -3136,7 +3136,7 @@ static void Task_ShowBerryCrushRankings(u8 taskId) StringExpandPlaceholders(gStringVar4, gText_Var1Players); AddTextPrinterParameterized3( tWindowId, - 2, + FONT_2, 4, yPos, sBerryCrushTextColorTable[COLORID_GRAY], @@ -3153,10 +3153,10 @@ static void Task_ShowBerryCrushRankings(u8 taskId) str = StringExpandPlaceholders(gStringVar4, gText_XDotY3); *str++ = CHAR_SPACE; StringCopy(str, gText_TimesPerSec); - xPos = 192 - (u8)GetStringWidth(3, gStringVar4, 0); + xPos = 192 - (u8)GetStringWidth(FONT_3, gStringVar4, 0); AddTextPrinterParameterized3( tWindowId, - 3, + FONT_3, xPos, yPos, sBerryCrushTextColorTable[COLORID_GRAY], @@ -3239,8 +3239,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame * game) { AddTextPrinterParameterized4( game->gfx.nameWindowIds[i], - 2, - 36 - GetStringWidth(2, game->players[i].name, 0) / 2u, + FONT_2, + 36 - GetStringWidth(FONT_2, game->players[i].name, 0) / 2u, 1, 0, 0, @@ -3253,8 +3253,8 @@ static void DrawPlayerNameWindows(struct BerryCrushGame * game) { AddTextPrinterParameterized4( game->gfx.nameWindowIds[i], - 2, - 36 - GetStringWidth(2, game->players[i].name, 0) / 2u, + FONT_2, + 36 - GetStringWidth(FONT_2, game->players[i].name, 0) / 2u, 1, 0, 0, diff --git a/src/berry_pouch.c b/src/berry_pouch.c index 875f37137..80fa333f7 100644 --- a/src/berry_pouch.c +++ b/src/berry_pouch.c @@ -672,7 +672,7 @@ static void SetUpListMenuTemplate(void) gMultiuseListMenuTemplate.itemVerticalPadding = 2; gMultiuseListMenuTemplate.upText_Y = 2; gMultiuseListMenuTemplate.maxShowed = sResources->listMenuMaxShowed; - gMultiuseListMenuTemplate.fontId = 2; + gMultiuseListMenuTemplate.fontId = FONT_2; gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; @@ -726,7 +726,7 @@ static void BerryPouchItemPrintFunc(u8 windowId, u32 itemId, u8 y) itemQuantity = BagGetQuantityByPocketPosition(POCKET_BERRY_POUCH, itemId); ConvertIntToDecimalStringN(gStringVar1, itemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BerryPouchPrint(windowId, 0, gStringVar4, 110, y, 0, 0, 0xFF, 1); + BerryPouchPrint(windowId, FONT_0, gStringVar4, 110, y, 0, 0, 0xFF, 1); } } @@ -741,14 +741,14 @@ static void BerryPouchSetArrowCursorAt(u8 y, u8 colorIdx) u8 height; if (colorIdx == 0xFF) { - width = GetMenuCursorDimensionByFont(2, 0); - height = GetMenuCursorDimensionByFont(2, 1); + width = GetMenuCursorDimensionByFont(FONT_2, 0); + height = GetMenuCursorDimensionByFont(FONT_2, 1); FillWindowPixelRect(0, 0, 1, y, width, height); CopyWindowToVram(0, COPYWIN_GFX); } else { - BerryPouchPrint(0, 2, gText_SelectorArrow2, 1, y, 0, 0, 0, colorIdx); + BerryPouchPrint(0, FONT_2, gText_SelectorArrow2, 1, y, 0, 0, 0, colorIdx); } } @@ -760,7 +760,7 @@ static void PrintSelectedBerryDescription(s32 itemIdx) else str = gText_TheBerryPouchWillBePutAway; FillWindowPixelBuffer(1, PIXEL_FILL(0)); - BerryPouchPrint(1, 2, str, 0, 2, 2, 0, 0, 0); + BerryPouchPrint(1, FONT_2, str, 0, 2, 2, 0, 0, 0); } static void SetDescriptionWindowBorderPalette(s32 pal) @@ -800,8 +800,8 @@ static void DestroyScrollIndicatorArrows(void) static void PrintBerryPouchHeaderCentered(void) { - u32 slack = 72 - GetStringWidth(1, gText_BerryPouch, 0); - BerryPouchPrint(2, 1, gText_BerryPouch, slack / 2, 1, 0, 0, 0, 0); + u32 slack = 72 - GetStringWidth(FONT_1, gText_BerryPouch, 0); + BerryPouchPrint(2, FONT_1, gText_BerryPouch, slack / 2, 1, 0, 0, 0, 0); } void BerryPouch_CursorResetToTop(void) @@ -914,11 +914,11 @@ void InitTossQuantitySelectUI(u8 taskId, const u8 * str) u8 windowId2; CopySelectedListMenuItemName(data[1], gStringVar1); StringExpandPlaceholders(gStringVar4, str); - BerryPouchPrint(windowId, 2, gStringVar4, 0, 2, 1, 2, 0, 1); + BerryPouchPrint(windowId, FONT_2, gStringVar4, 0, 2, 1, 2, 0, 1); windowId2 = GetOrCreateVariableWindow(0); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BerryPouchPrint(windowId2, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + BerryPouchPrint(windowId2, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); } static void PrintxQuantityOnWindow(u8 whichWindow, s16 quantity, u8 ndigits) @@ -927,7 +927,7 @@ static void PrintxQuantityOnWindow(u8 whichWindow, s16 quantity, u8 ndigits) FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, ndigits); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BerryPouchPrint(windowId, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + BerryPouchPrint(windowId, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); } static void Task_BerryPouchMain(u8 taskId) @@ -1023,12 +1023,12 @@ static void CreateNormalContextMenu(u8 taskId) sContextMenuNumOptions = 4; } windowId = GetOrCreateVariableWindow(sContextMenuNumOptions + 9); - AddItemMenuActionTextPrinters(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, GetFontAttribute(2, FONTATTR_LETTER_SPACING), GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumOptions, sContextMenuActions, sContextMenuOptions); - Menu_InitCursor(windowId, 2, 0, 2, GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumOptions, 0); + AddItemMenuActionTextPrinters(windowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumOptions, sContextMenuActions, sContextMenuOptions); + Menu_InitCursor(windowId, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumOptions, 0); windowId2 = GetOrCreateVariableWindow(6); CopySelectedListMenuItemName(data[1], gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); - BerryPouchPrint(windowId2, 2, gStringVar4, 0, 2, 1, 2, 0, 1); + BerryPouchPrint(windowId2, FONT_2, gStringVar4, 0, 2, 1, 2, 0, 1); } static void Task_NormalContextMenu(u8 taskId) @@ -1104,7 +1104,7 @@ static void Task_AskTossMultiple(u8 taskId) s16 * data = gTasks[taskId].data; ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_ThrowAwayStrVar2OfThisItemQM); - BerryPouchPrint(GetOrCreateVariableWindow(7), 2, gStringVar4, 0, 2, 1, 2, 0, 1); + BerryPouchPrint(GetOrCreateVariableWindow(7), FONT_2, gStringVar4, 0, 2, 1, 2, 0, 1); CreateYesNoMenuWin3(taskId, &sYesNoFuncs_Toss); } @@ -1158,7 +1158,7 @@ static void Task_TossYes(u8 taskId) CopySelectedListMenuItemName(data[1], gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayStrVar2StrVar1s); - BerryPouchPrint(GetOrCreateVariableWindow(9), 2, gStringVar4, 0, 2, 1, 2, 0, 1); + BerryPouchPrint(GetOrCreateVariableWindow(9), FONT_2, gStringVar4, 0, 2, 1, 2, 0, 1); gTasks[taskId].func = Task_WaitButtonThenTossBerries; } @@ -1201,7 +1201,7 @@ static void Task_BerryPouch_Give(u8 taskId) static void Task_Give_PrintThereIsNoPokemon(u8 taskId) { - DisplayItemMessageInBerryPouch(taskId, 2, gText_ThereIsNoPokemon, Task_WaitButtonBeforeDialogueWindowDestruction); + DisplayItemMessageInBerryPouch(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonBeforeDialogueWindowDestruction); } static void Task_WaitButtonBeforeDialogueWindowDestruction(u8 taskId) @@ -1247,7 +1247,7 @@ static void Task_ContextMenu_FromPartyGiveMenu(u8 taskId) { CopyItemName(itemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_TheStrVar1CantBeHeldHere); - DisplayItemMessageInBerryPouch(taskId, 2, gStringVar4, Task_WaitButtonBeforeDialogueWindowDestruction); + DisplayItemMessageInBerryPouch(taskId, FONT_2, gStringVar4, Task_WaitButtonBeforeDialogueWindowDestruction); } else { @@ -1322,7 +1322,7 @@ static void Task_Sell_PrintSelectMultipleUI(u8 taskId) u8 windowId = GetOrCreateVariableWindow(1); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BerryPouchPrint(windowId, 0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); + BerryPouchPrint(windowId, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); SellMultiple_UpdateSellPriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8]); PrintMoneyInWin2(); CreateScrollIndicatorArrows_SellQuantity(); @@ -1375,7 +1375,7 @@ static void Task_SellYes(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); - DisplayItemMessageInBerryPouch(taskId, 2, gStringVar4, Task_SellBerries_PlaySfxAndRemoveBerries); + DisplayItemMessageInBerryPouch(taskId, FONT_2, gStringVar4, Task_SellBerries_PlaySfxAndRemoveBerries); } static void Task_SellBerries_PlaySfxAndRemoveBerries(u8 taskId) @@ -1490,12 +1490,12 @@ void DisplayItemMessageInBerryPouch(u8 taskId, u8 fontId, const u8 * str, TaskFu static void CreateYesNoMenuWin3(u8 taskId, const struct YesNoFuncTable *ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates_Variable[3], 2, 0, 2, 0x001, 0xE, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates_Variable[3], FONT_2, 0, 2, 0x001, 0xE, ptrs); } static void CreateYesNoMenuWin4(u8 taskId, const struct YesNoFuncTable *ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates_Variable[4], 2, 0, 2, 0x001, 0xE, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates_Variable[4], FONT_2, 0, 2, 0x001, 0xE, ptrs); } static void PrintMoneyInWin2(void) diff --git a/src/berry_powder.c b/src/berry_powder.c index 3ebffed48..fdb94feae 100644 --- a/src/berry_powder.c +++ b/src/berry_powder.c @@ -94,13 +94,13 @@ u32 GetBerryPowder(void) static void PrintBerryPowderAmount(u8 windowId, u32 amount, u8 x, u8 y, u8 speed) { ConvertIntToDecimalStringN(gStringVar1, amount, STR_CONV_MODE_RIGHT_ALIGN, 5); - AddTextPrinterParameterized(windowId, 0, gStringVar1, x, y, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gStringVar1, x, y, speed, NULL); } static void DrawPlayerPowderAmount(u8 windowId, u16 baseBlock, u8 palette, u32 amount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, baseBlock, palette); - AddTextPrinterParameterized(windowId, 0, gOtherText_Powder, 0, 0, -1, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gOtherText_Powder, 0, 0, -1, NULL); PrintBerryPowderAmount(windowId, amount, 39, 12, 0); } diff --git a/src/buy_menu_helpers.c b/src/buy_menu_helpers.c index 1fd160576..c0fef9fd8 100644 --- a/src/buy_menu_helpers.c +++ b/src/buy_menu_helpers.c @@ -184,7 +184,7 @@ void BuyMenuPrint(u8 windowId, u8 font, const u8 *text, u8 x, u8 y, u8 letterSpa void BuyMenuDisplayMessage(u8 taskId, const u8 *text, TaskFunc callback) { - DisplayMessageAndContinueTask(taskId, 2, 0x13, 0xE, GetMartUnk16_4(), GetTextSpeedSetting(), text, callback); + DisplayMessageAndContinueTask(taskId, 2, 0x13, 0xE, GetMartFontId(), GetTextSpeedSetting(), text, callback); ScheduleBgCopyTilemapToVram(0); } @@ -200,5 +200,5 @@ void BuyMenuQuantityBoxThinBorder(u8 windowId, bool8 copyToVram) void BuyMenuConfirmPurchase(u8 taskId, const struct YesNoFuncTable *yesNo) { - CreateYesNoMenuWithCallbacks(taskId, &sShopBuyMenuYesNoWindowTemplate, 2, 0, 2, 1, 0xD, yesNo); + CreateYesNoMenuWithCallbacks(taskId, &sShopBuyMenuYesNoWindowTemplate, FONT_2, 0, 2, 1, 0xD, yesNo); } diff --git a/src/cable_club.c b/src/cable_club.c index cf54d360e..e4238bb40 100644 --- a/src/cable_club.c +++ b/src/cable_club.c @@ -79,7 +79,7 @@ static void PrintNewCountOnLinkPlayerCountDisplayWindow(u16 windowId, s32 num) ConvertIntToDecimalStringN(gStringVar1, num, STR_CONV_MODE_LEFT_ALIGN, 1); SetStdWindowBorderStyle(windowId, FALSE); StringExpandPlaceholders(gStringVar4, gUnknown_841DF82); - AddTextPrinterParameterized(windowId, 2, gStringVar4, 0, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gStringVar4, 0, 0, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(windowId, COPYWIN_FULL); } diff --git a/src/clear_save_data_screen.c b/src/clear_save_data_screen.c index 75e671445..6a09328ce 100644 --- a/src/clear_save_data_screen.c +++ b/src/clear_save_data_screen.c @@ -106,11 +106,11 @@ static void Task_DrawClearSaveDataScreen(u8 taskId) break; case 4: DrawStdFrameWithCustomTileAndPalette(1, TRUE, 0x001, 0xF); - AddTextPrinterParameterized4(1, 2, 0, 3, 1, 1, sTextColor, 0, gUnknown_841B69E); + AddTextPrinterParameterized4(1, FONT_2, 0, 3, 1, 1, sTextColor, 0, gUnknown_841B69E); CopyWindowToVram(1, COPYWIN_GFX); break; case 5: - CreateYesNoMenu(&sWindowTemplates[0], 2, 0, 2, 0x001, 0xF, 1); + CreateYesNoMenu(&sWindowTemplates[0], FONT_2, 0, 2, 0x001, 0xF, 1); CopyBgTilemapBufferToVram(0); break; default: @@ -138,7 +138,7 @@ static void Task_HandleYesNoMenu(u8 taskId) case 0: PlaySE(SE_SELECT); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - AddTextPrinterParameterized4(1, 2, 0, 3, 1, 1, sTextColor, 0, gUnknown_841B6B9); + AddTextPrinterParameterized4(1, FONT_2, 0, 3, 1, 1, sTextColor, 0, gUnknown_841B6B9); CopyWindowToVram(1, COPYWIN_FULL); ClearSaveData(); break; diff --git a/src/coins.c b/src/coins.c index 1b9c610c5..3a8019b75 100644 --- a/src/coins.c +++ b/src/coins.c @@ -53,13 +53,13 @@ void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 { ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_Coins); - AddTextPrinterParameterized(windowId, 0, gStringVar4, x, y, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, x, y, speed, NULL); } void sub_80D0674(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, palette); - AddTextPrinterParameterized(windowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(windowId, FONT_2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString_Parameterized(windowId, coinAmount, 0x10, 0xC, 0); } @@ -70,9 +70,9 @@ void PrintCoinsString(u32 coinAmount) ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, 4); StringExpandPlaceholders(gStringVar4, gText_Coins); - width = GetStringWidth(0, gStringVar4, 0); + width = GetStringWidth(FONT_0, gStringVar4, 0); windowId = sCoinsWindowId; - AddTextPrinterParameterized(windowId, 0, gStringVar4, 64 - width, 0xC, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, 64 - width, 0xC, 0, NULL); } void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) @@ -85,7 +85,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y) PutWindowTilemap(sCoinsWindowId); TextWindow_SetStdFrame0_WithPal(sCoinsWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized(sCoinsWindowId, 2, gText_Coins_2, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(sCoinsWindowId, FONT_2, gText_Coins_2, 0, 0, 0xFF, 0); PrintCoinsString(coinAmount); } diff --git a/src/credits.c b/src/credits.c index 5b92c9c99..af2ea3889 100644 --- a/src/credits.c +++ b/src/credits.c @@ -856,7 +856,7 @@ static s32 RollCredits(void) } sCreditsMgr->timer = 360; - AddTextPrinterParameterized4(sCreditsMgr->windowId, 1, 0x08, 0x29, 1, 2, sTextColor_Header, 0, TITLE_TEXT); + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_1, 0x08, 0x29, 1, 2, sTextColor_Header, 0, TITLE_TEXT); sCreditsMgr->mainseqno = CREDITSSCENE_WAIT_TITLE_STAFF; return 0; case CREDITSSCENE_WAIT_TITLE_STAFF: @@ -913,12 +913,12 @@ static s32 RollCredits(void) if (gPaletteFade.active) return sCreditsMgr->canSpeedThrough; win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; // unused - AddTextPrinterParameterized4(sCreditsMgr->windowId, 1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_0); + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_0); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_ADDPRINTER2; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_ADDPRINTER2: win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; - AddTextPrinterParameterized4(sCreditsMgr->windowId, 2, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_4); + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_2, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_4); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_DELAY; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_DELAY: diff --git a/src/daycare.c b/src/daycare.c index a7bd7f7ac..482fc413e 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -119,7 +119,7 @@ static const struct ListMenuTemplate sDaycareListMenuLevelTemplate = .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 3, + .fontId = FONT_3, .cursorKind = 0 }; @@ -1439,7 +1439,7 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y) printer.currentChar = text; printer.windowId = windowId; - printer.fontId = 3; + printer.fontId = FONT_3; printer.x = x; printer.y = y; printer.currentX = x; @@ -1479,7 +1479,7 @@ static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycare level = GetLevelAfterDaycareSteps(&daycare->mons[daycareSlotId].mon, daycare->mons[daycareSlotId].steps); ConvertIntToDecimalStringN(intText, level, STR_CONV_MODE_LEFT_ALIGN, 3); StringAppend(lvlText, intText); - x = 132 - GetStringWidth(3, lvlText, 0); + x = 132 - GetStringWidth(FONT_3, lvlText, 0); DaycareAddTextPrinter(windowId, lvlText, x, y); } @@ -1957,7 +1957,7 @@ static void CB2_EggHatch_1(void) if (!IsTextPrinterActive(sEggHatchData->windowId)) { LoadUserWindowBorderGfx(sEggHatchData->windowId, 0x140, 0xE0); - CreateYesNoMenu(&sYesNoWinTemplate, 3, 0, 2, 0x140, 0xE, 0); + CreateYesNoMenu(&sYesNoWinTemplate, FONT_3, 0, 2, 0x140, 0xE, 0); sEggHatchData->CB2_state++; } break; @@ -2159,5 +2159,5 @@ static void EggHatchPrintMessage(u8 windowId, u8 *string, u8 x, u8 y, u8 speed) sEggHatchData->textColor[0] = 0; sEggHatchData->textColor[1] = 5; sEggHatchData->textColor[2] = 6; - AddTextPrinterParameterized4(windowId, 3, x, y, 1, 1, sEggHatchData->textColor, speed, string); + AddTextPrinterParameterized4(windowId, FONT_3, x, y, 1, 1, sEggHatchData->textColor, speed, string); } diff --git a/src/diploma.c b/src/diploma.c index 0304c7ae3..21125d257 100644 --- a/src/diploma.c +++ b/src/diploma.c @@ -264,11 +264,11 @@ static void DiplomaPrintText(void) } FillWindowPixelBuffer(0, 0); DynamicPlaceholderTextUtil_ExpandPlaceholders(arr, gUnknown_841B60E); - width = GetStringWidth(2, arr, -1); - AddTextPrinterParameterized3(0, 2, 0x78 - (width / 2), 4, gUnknown_8415A04, -1, arr); + width = GetStringWidth(FONT_2, arr, -1); + AddTextPrinterParameterized3(0, FONT_2, 120 - (width / 2), 4, gUnknown_8415A04, -1, arr); DynamicPlaceholderTextUtil_ExpandPlaceholders(arr, gUnknown_841B619); - width = GetStringWidth(2, arr, -1); - AddTextPrinterParameterized3(0, 0x2, 0x78 - (width / 2), 0x1E, gUnknown_8415A04, -1, arr); - AddTextPrinterParameterized3(0, 0x2, 0x78, 0x69, gUnknown_8415A04, 0, gUnknown_841B684); + width = GetStringWidth(FONT_2, arr, -1); + AddTextPrinterParameterized3(0, FONT_2, 120 - (width / 2), 0x1E, gUnknown_8415A04, -1, arr); + AddTextPrinterParameterized3(0, FONT_2, 120, 105, gUnknown_8415A04, 0, gUnknown_841B684); PutWindowTilemap(0); } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 8ad1256f1..15bc18c2b 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2379,14 +2379,14 @@ static void sub_81538D0(u8 windowId) TextWindow_SetStdFrame0_WithPal(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, 2, sUnknown_84755E8[0], 1, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, sUnknown_84755E8[0], 1, 1, TEXT_SKIP_DRAW, NULL); for (i = 0; i < 3; i++) { ConvertIntToDecimalStringN(strbuf, results[i], STR_CONV_MODE_LEFT_ALIGN, sUnknown_84755F8[i]); - numWidth = GetStringWidth(2, strbuf, -1); - AddTextPrinterParameterized(windowId, 2, sUnknown_84755E8[i + 1], 1, sUnknown_84755FC[i][0], TEXT_SKIP_DRAW, NULL); + numWidth = GetStringWidth(FONT_2, strbuf, -1); + AddTextPrinterParameterized(windowId, FONT_2, sUnknown_84755E8[i + 1], 1, sUnknown_84755FC[i][0], TEXT_SKIP_DRAW, NULL); x = 224 - numWidth; - AddTextPrinterParameterized(windowId, 2, strbuf, x, sUnknown_8475602[i][0], TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, strbuf, x, sUnknown_8475602[i][0], TEXT_SKIP_DRAW, NULL); } PutWindowTilemap(windowId); } diff --git a/src/dodrio_berry_picking_2.c b/src/dodrio_berry_picking_2.c index 2fcc0a682..758524ba0 100644 --- a/src/dodrio_berry_picking_2.c +++ b/src/dodrio_berry_picking_2.c @@ -1045,7 +1045,7 @@ static void sub_8154B34(void) { colorsId = 0; id = sub_81537AC(i); - left = (56 - GetStringWidth(0, sub_81533C4(id), -1)) / 2u; + left = (56 - GetStringWidth(FONT_0, sub_81533C4(id), -1)) / 2u; window.tilemapLeft = ptr->left; window.tilemapTop = ptr->top; gUnknown_203F440->unk3008[i] = AddWindow(&window); @@ -1054,7 +1054,7 @@ static void sub_8154B34(void) if (id == GetMultiplayerId()) colorsId = 2; name = sub_81533C4(id); - AddTextPrinterParameterized3(gUnknown_203F440->unk3008[i], 0, left, 1, sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_203F440->unk3008[i], FONT_0, left, 1, sTextColorTable[colorsId], -1, name); CopyWindowToVram(gUnknown_203F440->unk3008[i], COPYWIN_GFX); window.baseBlock += 0xE; sub_8154868(&window); @@ -1127,22 +1127,22 @@ static void sub_8154D9C(u8 playersCount_) structArray[i].unk0 = playersCount - 1; } - x = 216 - GetStringWidth(0, gText_SpacePoints, 0); + x = 216 - GetStringWidth(FONT_0, gText_SpacePoints, 0); for (i = 0; i < playersCount; i++) { u8 colorsId = 0; u8 id = array[i]; u32 points = structArray[id].unk4; - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, sUnknown_8478E94[structArray[id].unk0], 8, sUnknown_8478EBA[i], -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, sUnknown_8478E94[structArray[id].unk0], 8, sUnknown_8478EBA[i], -1, NULL); if (id == GetMultiplayerId()) colorsId = 2; name = sub_81533C4(id); - AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], 0, 28, sUnknown_8478EBA[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], FONT_0, 28, sUnknown_8478EBA[i], sTextColorTable[colorsId], -1, name); ConvertIntToDecimalStringN(numString, points, STR_CONV_MODE_RIGHT_ALIGN, 7); - numWidth = GetStringWidth(0, numString, -1); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, numString, x - 35, sUnknown_8478EBA[i], -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, gText_SpacePoints, x, sUnknown_8478EBA[i], -1, NULL); + numWidth = GetStringWidth(FONT_0, numString, -1); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, numString, x - 35, sUnknown_8478EBA[i], -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, gText_SpacePoints, x, sUnknown_8478EBA[i], -1, NULL); } } @@ -1173,10 +1173,10 @@ static void sub_8154F80(void) case 2: FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); FillWindowPixelBuffer(gUnknown_203F440->unk3008[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(0, gText_BerryPickingResults, -1); + strWidth = GetStringWidth(FONT_0, gText_BerryPickingResults, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 0, gText_BerryPickingResults, x, 2, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, gText_10P30P50P50P, 68, 16, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_0, gText_BerryPickingResults, x, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, gText_10P30P50P50P, 68, 16, -1, NULL); for (i = 0; i < playersCount; i++) { u8 colorsId = 0; @@ -1184,7 +1184,7 @@ static void sub_8154F80(void) colorsId = 2; name = sub_81533C4(i); - AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], 0, 2, sUnknown_8478EB0[i], sTextColorTable[colorsId], -1, name); + AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], FONT_0, 2, sUnknown_8478EB0[i], sTextColorTable[colorsId], -1, name); for (j = 0; j < 4; j++) { u32 width; @@ -1192,11 +1192,11 @@ static void sub_8154F80(void) u16 result2 = Min(sub_81534F0(j), 9999); ConvertIntToDecimalStringN(sp0C, result1, STR_CONV_MODE_LEFT_ALIGN, 4); - width = GetStringWidth(0, sp0C, -1); + width = GetStringWidth(FONT_0, sp0C, -1); if (result2 == result1 && result2 != 0) - AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], 0, sUnknown_8478EA8[j] - width, sUnknown_8478EB0[i], sTextColorTable[1], -1, sp0C); + AddTextPrinterParameterized3(gUnknown_203F440->unk3008[1], FONT_0, sUnknown_8478EA8[j] - width, sUnknown_8478EB0[i], sTextColorTable[1], -1, sp0C); else - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, sp0C, sUnknown_8478EA8[j] - width, sUnknown_8478EB0[i], -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, sp0C, sUnknown_8478EA8[j] - width, sUnknown_8478EB0[i], -1, NULL); } } CopyWindowToVram(gUnknown_203F440->unk3008[0], COPYWIN_GFX); @@ -1225,9 +1225,9 @@ static void sub_8154F80(void) case 5: FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); FillWindowPixelBuffer(gUnknown_203F440->unk3008[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(0, gText_AnnouncingRankings, -1); + strWidth = GetStringWidth(FONT_0, gText_AnnouncingRankings, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 0, gText_AnnouncingRankings, x, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_0, gText_AnnouncingRankings, x, 2, -1, NULL); gUnknown_203F440->state++; break; case 6: @@ -1271,14 +1271,14 @@ static void sub_8154F80(void) PlayNewMapMusic(MUS_LEVEL_UP); FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); FillWindowPixelBuffer(gUnknown_203F440->unk3008[1], PIXEL_FILL(1)); - strWidth = GetStringWidth(0, gText_AnnouncingPrizes, -1); + strWidth = GetStringWidth(FONT_0, gText_AnnouncingPrizes, -1); x = (224 - strWidth) / 2; - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 0, gText_AnnouncingPrizes, x, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_0, gText_AnnouncingPrizes, x, 2, -1, NULL); DynamicPlaceholderTextUtil_Reset(); CopyItemName(sub_8153390(), sp70); DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sp70); DynamicPlaceholderTextUtil_ExpandPlaceholders(sp0C, gText_FirstPlacePrize); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, sp0C, 8, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, sp0C, 8, 2, -1, NULL); itemGiveRet = sub_815372C(); if (itemGiveRet != 0 && itemGiveRet != 3) { @@ -1289,7 +1289,7 @@ static void sub_8154F80(void) DynamicPlaceholderTextUtil_ExpandPlaceholders(sp0C, gText_CantHoldAnyMore); else if (itemGiveRet == 1) DynamicPlaceholderTextUtil_ExpandPlaceholders(sp0C, gText_FilledStorageSpace); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 0, sp0C, 8, 40, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_0, sp0C, 8, 40, -1, NULL); } CopyWindowToVram(gUnknown_203F440->unk3008[0], COPYWIN_GFX); CopyWindowToVram(gUnknown_203F440->unk3008[1], COPYWIN_GFX); @@ -1345,10 +1345,10 @@ static void sub_81556E0(void) case 1: FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); FillWindowPixelBuffer(gUnknown_203F440->unk3008[1], PIXEL_FILL(1)); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 2, gText_WantToPlayAgain, 0, 6, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_Yes, 8, 2, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_No, 8, 16, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_SelectorArrow2, 0, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_2, gText_WantToPlayAgain, 0, 6, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_Yes, 8, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_No, 8, 16, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_SelectorArrow2, 0, 2, -1, NULL); CopyWindowToVram(gUnknown_203F440->unk3008[0], COPYWIN_GFX); CopyWindowToVram(gUnknown_203F440->unk3008[1], COPYWIN_GFX); gUnknown_203F440->state++; @@ -1367,9 +1367,9 @@ static void sub_81556E0(void) if (y == 0) y = 1; FillWindowPixelBuffer(gUnknown_203F440->unk3008[1], PIXEL_FILL(1)); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_Yes, 8, 2, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_No, 8, 16, -1, NULL); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], 2, gText_SelectorArrow2, 0, y == 1 ? 2 : 16, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_Yes, 8, 2, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_No, 8, 16, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[1], FONT_2, gText_SelectorArrow2, 0, y == 1 ? 2 : 16, -1, NULL); CopyWindowToVram(gUnknown_203F440->unk3008[1], COPYWIN_FULL); // Increment state only if A or B button have been pressed. if (JOY_NEW(A_BUTTON)) @@ -1421,7 +1421,7 @@ static void sub_8155A78(void) { case 0: DrawDialogueFrame(0, FALSE); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); gUnknown_203F440->state++; break; case 1: @@ -1459,7 +1459,7 @@ static void sub_8155B4C(void) break; case 1: FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 2, gText_CommunicationStandby3, 0, 6, -1, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_2, gText_CommunicationStandby3, 0, 6, -1, NULL); CopyWindowToVram(gUnknown_203F440->unk3008[0], COPYWIN_GFX); gUnknown_203F440->state++; break; @@ -1499,7 +1499,7 @@ static void sub_8155C80(void) break; case 1: FillWindowPixelBuffer(gUnknown_203F440->unk3008[0], PIXEL_FILL(1)); - AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], 2, gText_SomeoneDroppedOut, 0, 6, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(gUnknown_203F440->unk3008[0], FONT_2, gText_SomeoneDroppedOut, 0, 6, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(gUnknown_203F440->unk3008[0], COPYWIN_GFX); gUnknown_203F440->state++; break; diff --git a/src/easy_chat_3.c b/src/easy_chat_3.c index 393020674..1660b0cb7 100644 --- a/src/easy_chat_3.c +++ b/src/easy_chat_3.c @@ -695,12 +695,12 @@ static bool8 ECInterfaceCmd_02(void) { if (*ecWord == 0xFFFF) { - stringWidth = GetStringWidth(1, gUnknown_843F8D8, 0) * 7; + stringWidth = GetStringWidth(FONT_1, gUnknown_843F8D8, 0) * 7; } else { CopyEasyChatWord(str, *ecWord); - stringWidth = GetStringWidth(1, str, 0); + stringWidth = GetStringWidth(FONT_1, str, 0); } trueStringWidth = stringWidth + 17; @@ -1319,23 +1319,25 @@ static void PrintTitleText(void) if (titleText == NULL) return; - xOffset = (128 - GetStringWidth(1, titleText, 0)) / 2u; + xOffset = (128 - GetStringWidth(FONT_1, titleText, 0)) / 2u; FillWindowPixelBuffer(0, PIXEL_FILL(0)); - EC_AddTextPrinterParameterized2(0, 1, titleText, xOffset, 0, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); + EC_AddTextPrinterParameterized2(0, FONT_1, titleText, xOffset, 0, TEXT_SKIP_DRAW, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); } static void EC_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16)) { - if (fontId == 1) y += 2; + if (fontId == FONT_1) + y += 2; AddTextPrinterParameterized(windowId, fontId, str, x, y, speed, callback); } static void EC_AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 x, u8 y, u8 speed, u8 bg, u8 fg, u8 shadow) { u8 color[3]; - if (fontId == 1) y += 2; + if (fontId == FONT_1) + y += 2; color[0] = bg; color[1] = fg; color[2] = shadow; @@ -1374,17 +1376,17 @@ static void PrintECInterfaceTextById(u8 direction) FillWindowPixelBuffer(1, PIXEL_FILL(1)); if (text1) - EC_AddTextPrinterParameterized(1, 1, text1, 0, 0, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(1, FONT_1, text1, 0, 0, TEXT_SKIP_DRAW, NULL); if (text2) - EC_AddTextPrinterParameterized(1, 1, text2, 0, 16, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(1, FONT_1, text2, 0, 16, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(1, COPYWIN_FULL); } static void EC_CreateYesNoMenuWithInitialCursorPos(u8 initialCursorPos) { - CreateYesNoMenu(&sEasyChatYesNoWindowTemplate, 1, 0, 2, 0x001, 14, initialCursorPos); + CreateYesNoMenu(&sEasyChatYesNoWindowTemplate, FONT_1, 0, 2, 0x001, 14, initialCursorPos); } static void CreatePhraseFrameWindow(void) @@ -1451,7 +1453,7 @@ static void PrintECFields(void) } *str = EOS; - EC_AddTextPrinterParameterized(sEasyChatGraphicsResources->windowId, 1, sEasyChatGraphicsResources->ecPrintBuffer, 0, i * 16, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(sEasyChatGraphicsResources->windowId, FONT_1, sEasyChatGraphicsResources->ecPrintBuffer, 0, i * 16, TEXT_SKIP_DRAW, NULL); } CopyWindowToVram(sEasyChatGraphicsResources->windowId, COPYWIN_FULL); @@ -1566,7 +1568,7 @@ static void PrintECGroupsMenu(void) return; } - EC_AddTextPrinterParameterized(2, 1, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(2, FONT_1, GetEasyChatWordGroupName(groupId), x * 84 + 10, y, TEXT_SKIP_DRAW, NULL); } y += 16; @@ -1578,7 +1580,7 @@ static void PrintEasyChatKeyboardText(void) u32 i; for (i = 0; i < NELEMS(sEasyChatKeyboardText); i++) - EC_AddTextPrinterParameterized(2, 1, sEasyChatKeyboardText[i], 10, 96 + i * 16, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(2, FONT_1, sEasyChatKeyboardText[i], 10, 96 + i * 16, TEXT_SKIP_DRAW, NULL); } static void PrintECWordsMenu(void) @@ -1652,7 +1654,7 @@ static void PrintECRowsWin2(u8 row, u8 remrow) CopyEasyChatWordPadded(sEasyChatGraphicsResources->ecPaddedWordBuffer, easyChatWord, 0); - EC_AddTextPrinterParameterized(2, 1, sEasyChatGraphicsResources->ecPaddedWordBuffer, (j * 13 + 3) * 8, y_, TEXT_SKIP_DRAW, NULL); + EC_AddTextPrinterParameterized(2, FONT_1, sEasyChatGraphicsResources->ecPaddedWordBuffer, (j * 13 + 3) * 8, y_, TEXT_SKIP_DRAW, NULL); } } y += 16; @@ -2293,6 +2295,6 @@ static void CreateFooterWindow(void) template.baseBlock = 0x030; windowId = AddWindow(&template); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - EC_AddTextPrinterParameterized(windowId, 1, gUnknown_841EE2B, 0, 0, 0, NULL); + EC_AddTextPrinterParameterized(windowId, FONT_1, gUnknown_841EE2B, 0, 0, 0, NULL); PutWindowTilemap(windowId); } diff --git a/src/evolution_scene.c b/src/evolution_scene.c index 67745b803..8ab93a353 100644 --- a/src/evolution_scene.c +++ b/src/evolution_scene.c @@ -1333,7 +1333,7 @@ static void Task_TradeEvolutionScene(u8 taskId) if (!IsTextPrinterActive(0) && !IsSEPlaying()) { LoadUserWindowBorderGfx(0, 0xA8, 0xE0); - CreateYesNoMenu(&gTradeEvolutionSceneYesNoWindowTemplate, 3, 0, 2, 0xA8, 0xE, 0); + CreateYesNoMenu(&gTradeEvolutionSceneYesNoWindowTemplate, FONT_3, 0, 2, 0xA8, 0xE, 0); sEvoCursorPos = 0; gTasks[taskId].tLearnMoveState++; sEvoCursorPos = 0; diff --git a/src/fame_checker.c b/src/fame_checker.c index 1f4be5af0..3d7b15f2d 100644 --- a/src/fame_checker.c +++ b/src/fame_checker.c @@ -822,7 +822,7 @@ static bool8 TryExitPickMode(u8 taskId) static void MessageBoxPrintEmptyText(void) { - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_ClearTextbox, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, FONT_2, gFameCheckerText_ClearTextbox, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void Task_EnterPickMode(u8 taskId) @@ -962,7 +962,7 @@ static void GetPickModeText(void) if (HasUnlockedAllFlavorTextsForCurrentPerson() == TRUE) whichText = NUM_FAMECHECKER_PERSONS; StringExpandPlaceholders(gStringVar4, sFameCheckerNameAndQuotesPointers[sFameCheckerData->unlockedPersons[who] + whichText]); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, FONT_2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } } @@ -973,7 +973,7 @@ static void PrintSelectedNameInBrightGreen(u8 taskId) u16 cursorPos = FameCheckerGetCursorY(); FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); StringExpandPlaceholders(gStringVar4, sFameCheckerFlavorTextPointers[sFameCheckerData->unlockedPersons[cursorPos] * 6 + data[1]]); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, FONT_2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } @@ -1081,9 +1081,9 @@ static void PrintUIHelp(u8 state) if (state == 1) src = gFameCheckerText_PickScreenUI; } - width = GetStringWidth(0, src, 0); + width = GetStringWidth(FONT_0, src, 0); FillWindowPixelRect(FCWINDOWID_UIHELP, PIXEL_FILL(0), 0, 0, 0xc0, 0x10); - AddTextPrinterParameterized4(FCWINDOWID_UIHELP, 0, 188 - width, 0, 0, 2, sTextColor_White, -1, src); + AddTextPrinterParameterized4(FCWINDOWID_UIHELP, FONT_0, 188 - width, 0, 0, 2, sTextColor_White, -1, src); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_UIHELP); } @@ -1395,11 +1395,11 @@ static void UpdateIconDescriptionBox(u8 whichText) HandleFlavorTextModeSwitch(TRUE); gIconDescriptionBoxIsOpen = 1; FillWindowPixelRect(FCWINDOWID_ICONDESC, PIXEL_FILL(0), 0, 0, 0x58, 0x20); - width = (0x54 - GetStringWidth(0, sFlavorTextOriginLocationTexts[idx], 0)) / 2; - AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 0, 0, 2, sTextColor_DkGrey, -1, sFlavorTextOriginLocationTexts[idx]); + width = (0x54 - GetStringWidth(FONT_0, sFlavorTextOriginLocationTexts[idx], 0)) / 2; + AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, FONT_0, width, 0, 0, 2, sTextColor_DkGrey, -1, sFlavorTextOriginLocationTexts[idx]); StringExpandPlaceholders(gStringVar1, sFlavorTextOriginObjectNameTexts[idx]); - width = (0x54 - GetStringWidth(0, gStringVar1, 0)) / 2; - AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, 0, width, 10, 0, 2, sTextColor_DkGrey, -1, gStringVar1); + width = (0x54 - GetStringWidth(FONT_0, gStringVar1, 0)) / 2; + AddTextPrinterParameterized4(FCWINDOWID_ICONDESC, FONT_0, width, 10, 0, 2, sTextColor_DkGrey, -1, gStringVar1); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_ICONDESC); } @@ -1435,7 +1435,7 @@ static void InitListMenuTemplate(void) gFameChecker_ListMenuTemplate.lettersSpacing = 0; gFameChecker_ListMenuTemplate.itemVerticalPadding = 0; gFameChecker_ListMenuTemplate.scrollMultiple = 0; - gFameChecker_ListMenuTemplate.fontId = 2; + gFameChecker_ListMenuTemplate.fontId = FONT_2; gFameChecker_ListMenuTemplate.cursorKind = 0; } @@ -1513,7 +1513,7 @@ static void Task_SwitchToPickMode(u8 taskId) static void PrintCancelDescription(void) { FillWindowPixelRect(FCWINDOWID_MSGBOX, PIXEL_FILL(1), 0, 0, 0xd0, 0x20); - AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, 2, gFameCheckerText_FameCheckerWillBeClosed, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(FCWINDOWID_MSGBOX, FONT_2, gFameCheckerText_FameCheckerWillBeClosed, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); FC_PutWindowTilemapAndCopyWindowToVramMode3(FCWINDOWID_MSGBOX); } @@ -1524,14 +1524,14 @@ static void FC_DoMoveCursor(s32 itemIndex, bool8 onInit) u16 who; ListMenuGetScrollAndRow(sFameCheckerData->listMenuTaskId, &listY, &cursorY); who = listY + cursorY; - AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * cursorY + 4, 0, 0, sTextColor_Green, 0, sListMenuItems[itemIndex].label); + AddTextPrinterParameterized4(FCWINDOWID_LIST, FONT_2, 8, 14 * cursorY + 4, 0, 0, sTextColor_Green, 0, sListMenuItems[itemIndex].label); if (!onInit) { if (listY < sFameCheckerData->listMenuTopIdx2) sFameCheckerData->listMenuDrawnSelIdx++; else if (listY > sFameCheckerData->listMenuTopIdx2 && who != sFameCheckerData->numUnlockedPersons - 1) sFameCheckerData->listMenuDrawnSelIdx--; - AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 8, 14 * sFameCheckerData->listMenuDrawnSelIdx + 4, 0, 0, sTextColor_DkGrey, 0, sListMenuItems[sFameCheckerData->listMenuCurIdx].label); + AddTextPrinterParameterized4(FCWINDOWID_LIST, FONT_2, 8, 14 * sFameCheckerData->listMenuDrawnSelIdx + 4, 0, 0, sTextColor_DkGrey, 0, sListMenuItems[sFameCheckerData->listMenuCurIdx].label); } sFameCheckerData->listMenuCurIdx = itemIndex; @@ -1729,7 +1729,7 @@ static void PlaceListMenuCursor(bool8 isActive) { u16 cursorY = ListMenuGetYCoordForPrintingArrowCursor(sFameCheckerData->listMenuTaskId); if (isActive == TRUE) - AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, sTextColor_DkGrey, 0, gText_SelectorArrow2); + AddTextPrinterParameterized4(FCWINDOWID_LIST, FONT_2, 0, cursorY, 0, 0, sTextColor_DkGrey, 0, gText_SelectorArrow2); else - AddTextPrinterParameterized4(FCWINDOWID_LIST, 2, 0, cursorY, 0, 0, sTextColor_White, 0, gText_SelectorArrow2); + AddTextPrinterParameterized4(FCWINDOWID_LIST, FONT_2, 0, cursorY, 0, 0, sTextColor_White, 0, gText_SelectorArrow2); } diff --git a/src/field_player_avatar.c b/src/field_player_avatar.c index 3de950fcc..3660f97a6 100644 --- a/src/field_player_avatar.c +++ b/src/field_player_avatar.c @@ -1767,7 +1767,7 @@ static bool8 Fishing5(struct Task *task) } else { - AddTextPrinterParameterized(0, 2, dot, task->tNumDots * 12, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_2, dot, task->tNumDots * 12, 1, 0, NULL); task->tNumDots++; } } @@ -1846,7 +1846,7 @@ static bool8 Fishing10(struct Task *task) { AlignFishingAnimationFrames(&gSprites[gPlayerAvatar.spriteId]); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_PokemonOnHook, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_PokemonOnHook, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep++; task->tFrameCounter = 0; return FALSE; @@ -1893,7 +1893,7 @@ static bool8 Fishing12(struct Task *task) AlignFishingAnimationFrames(&gSprites[gPlayerAvatar.spriteId]); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_NotEvenANibble, 1, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_NotEvenANibble, 1, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep = FISHING_SHOW_RESULT; return TRUE; } @@ -1903,7 +1903,7 @@ static bool8 Fishing13(struct Task *task) { AlignFishingAnimationFrames(&gSprites[gPlayerAvatar.spriteId]); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); - AddTextPrinterParameterized2(0, 2, gText_ItGotAway, 1, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_ItGotAway, 1, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep++; return TRUE; } diff --git a/src/field_screen_effect.c b/src/field_screen_effect.c index 4519bb27e..d827fc88e 100644 --- a/src/field_screen_effect.c +++ b/src/field_screen_effect.c @@ -367,7 +367,7 @@ static bool8 PrintWhiteOutRecoveryMessage(u8 taskId, const u8 *text, u8 x, u8 y) case 0: FillWindowPixelBuffer(windowId, PIXEL_FILL(0)); StringExpandPlaceholders(gStringVar4, text); - AddTextPrinterParameterized4(windowId, 2, x, y, 1, 0, gUnknown_83C68EC, 1, gStringVar4); + AddTextPrinterParameterized4(windowId, FONT_2, x, y, 1, 0, gUnknown_83C68EC, 1, gStringVar4); gTextFlags.canABSpeedUpPrint = FALSE; gTasks[taskId].data[2] = 1; break; diff --git a/src/field_specials.c b/src/field_specials.c index 97f9808aa..0f8093e8e 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -544,7 +544,7 @@ void NullFieldSpecial(void) void DoPicboxCancel(void) { u8 t = EOS; - AddTextPrinterParameterized(0, 2, &t, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_2, &t, 0, 1, 0, NULL); PicboxCancel(); } @@ -1098,10 +1098,10 @@ void DrawElevatorCurrentFloorWindow(void) sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate); TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sElevatorCurrentFloorWindowId, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, gText_NowOn, 0, 2, 0xFF, NULL); + AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, FONT_2, gText_NowOn, 0, 2, 0xFF, NULL); floorname = sFloorNamePointers[gSpecialVar_0x8005]; - strwidth = GetStringWidth(2, floorname, 0); - AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, 2, floorname, 56 - strwidth, 16, 0xFF, NULL); + strwidth = GetStringWidth(FONT_2, floorname, 0); + AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, FONT_2, floorname, 56 - strwidth, 16, 0xFF, NULL); PutWindowTilemap(sElevatorCurrentFloorWindowId); CopyWindowToVram(sElevatorCurrentFloorWindowId, COPYWIN_FULL); } @@ -1348,7 +1348,7 @@ static void Task_CreateScriptListMenu(u8 taskId) { sListMenuItems[i].label = sListMenuLabels[gSpecialVar_0x8004][i]; sListMenuItems[i].index = i; - width = GetStringWidth(2, sListMenuItems[i].label, 0); + width = GetStringWidth(FONT_2, sListMenuItems[i].label, 0); if (width > mwidth) mwidth = width; } @@ -1386,7 +1386,7 @@ static void CreateScriptListMenu(void) sFieldSpecialsListMenuTemplate.lettersSpacing = 1; sFieldSpecialsListMenuTemplate.itemVerticalPadding = 0; sFieldSpecialsListMenuTemplate.scrollMultiple = 0; - sFieldSpecialsListMenuTemplate.fontId = 2; + sFieldSpecialsListMenuTemplate.fontId = FONT_2; sFieldSpecialsListMenuTemplate.cursorKind = 0; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 9b7e1f7af..b1fd76876 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -452,7 +452,7 @@ static void Task_Hof_InitTeamSaveData(u8 taskId) *lastSavedTeam = *sHofMonPtr; DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_SavingDontTurnOffThePower2, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_TrySaveData; } @@ -638,7 +638,7 @@ static void Task_Hof_WaitAndPrintPlayerInfo(u8 taskId) FillBgTilemapBufferRect_Palette0(0, 0, 0, 0, 0x20, 0x20); HallOfFame_PrintPlayerInfo(1, 2); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_LeagueChamp, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_LeagueChamp, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_Hof_ExitOnKeyPressed; } @@ -968,7 +968,7 @@ static void Task_HofPC_PrintDataIsCorrupted(u8 taskId) { TopBarWindowPrintString(gText_ABUTTONExit, 8, TRUE); DrawDialogueFrame(0, 0); - AddTextPrinterParameterized2(0, 2, gText_HOFCorrupted, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_HOFCorrupted, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); gTasks[taskId].func = Task_HofPC_ExitOnButtonPress; } @@ -981,10 +981,10 @@ static void Task_HofPC_ExitOnButtonPress(u8 taskId) static void HallOfFame_PrintWelcomeText(u8 not, u8 used) { - u8 x = (0xD0 - GetStringWidth(2, gText_WelcomeToHOF, 0)) / 2; + u8 x = (0xD0 - GetStringWidth(FONT_2, gText_WelcomeToHOF, 0)) / 2; FillWindowPixelBuffer(0, PIXEL_FILL(0)); PutWindowTilemap(0); - AddTextPrinterParameterized3(0, 2, x, 1, sTextColors[0], 0, gText_WelcomeToHOF); + AddTextPrinterParameterized3(0, FONT_2, x, 1, sTextColors[0], 0, gText_WelcomeToHOF); CopyWindowToVram(0, COPYWIN_FULL); } @@ -1019,7 +1019,7 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } text[3] = EOS; StringAppend(text2, text); - AddTextPrinterParameterized3(0, 2, 0x10, 1, sTextColors[0], 0, text2); + AddTextPrinterParameterized3(0, FONT_2, 16, 1, sTextColors[0], 0, text2); } // nick, species names, gender and lvl @@ -1032,12 +1032,12 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } } text[i] = EOS; - width = GetStringWidth(2, text, GetFontAttribute(2, FONTATTR_LETTER_SPACING)); + width = GetStringWidth(FONT_2, text, GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING)); if (currMon->species == SPECIES_EGG) x = 0x80 - width / 2; else x = 0x80 - width; - AddTextPrinterParameterized3(0, 2, x, 1, sTextColors[0], 0, text); + AddTextPrinterParameterized3(0, FONT_2, x, 1, sTextColors[0], 0, text); if (currMon->species != SPECIES_EGG) { text[0] = CHAR_SLASH; @@ -1061,15 +1061,15 @@ static void HallOfFame_PrintMonInfo(struct HallofFameMon* currMon, u8 unused1, u } *stringPtr = EOS; - AddTextPrinterParameterized3(0, 2, 0x80, 1, sTextColors[0], 0, text); + AddTextPrinterParameterized3(0, FONT_2, 0x80, 1, sTextColors[0], 0, text); stringPtr = StringCopy(text, gText_Level); ConvertIntToDecimalStringN(stringPtr, currMon->lvl, STR_CONV_MODE_LEFT_ALIGN, 3); - AddTextPrinterParameterized3(0, 2, 0x20, 0x11, sTextColors[0], 0, text); + AddTextPrinterParameterized3(0, FONT_2, 0x20, 0x11, sTextColors[0], 0, text); stringPtr = StringCopy(text, gText_IDNumber); ConvertIntToDecimalStringN(stringPtr, (u16)(currMon->tid), STR_CONV_MODE_LEADING_ZEROS, 5); - AddTextPrinterParameterized3(0, 2, 0x60, 0x11, sTextColors[0], 0, text); + AddTextPrinterParameterized3(0, FONT_2, 0x60, 0x11, sTextColors[0], 0, text); } CopyWindowToVram(0, COPYWIN_FULL); @@ -1084,21 +1084,21 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) FillWindowPixelBuffer(1, PIXEL_FILL(1)); PutWindowTilemap(1); DrawStdFrameWithCustomTileAndPalette(1, FALSE, 0x21D, 0xD); - AddTextPrinterParameterized4(1, 2, 4, 3, 0, 0, sTextColors[1], 0, gText_Name); + AddTextPrinterParameterized4(1, FONT_2, 4, 3, 0, 0, sTextColors[1], 0, gText_Name); - AddTextPrinterParameterized3(1, 2, textWidth - GetStringWidth(2, gSaveBlock2Ptr->playerName, 0), 3, sTextColors[1], 0, gSaveBlock2Ptr->playerName); + AddTextPrinterParameterized3(1, FONT_2, textWidth - GetStringWidth(FONT_2, gSaveBlock2Ptr->playerName, 0), 3, sTextColors[1], 0, gSaveBlock2Ptr->playerName); trainerId = (gSaveBlock2Ptr->playerTrainerId[0]) | (gSaveBlock2Ptr->playerTrainerId[1] << 8); - AddTextPrinterParameterized3(1, 2, 4, 18, sTextColors[1], 0, gText_IDNumber); + AddTextPrinterParameterized3(1, FONT_2, 4, 18, sTextColors[1], 0, gText_IDNumber); text[0] = (trainerId % 100000) / 10000 + CHAR_0; text[1] = (trainerId % 10000) / 1000 + CHAR_0; text[2] = (trainerId % 1000) / 100 + CHAR_0; text[3] = (trainerId % 100) / 10 + CHAR_0; text[4] = (trainerId % 10) / 1 + CHAR_0; text[5] = EOS; - AddTextPrinterParameterized3(1, 2, textWidth - 30, 18, sTextColors[1], 0, text); + AddTextPrinterParameterized3(1, FONT_2, textWidth - 30, 18, sTextColors[1], 0, text); - AddTextPrinterParameterized3(1, 2, 4, 32, sTextColors[1], 0, gText_MainMenuTime); + AddTextPrinterParameterized3(1, FONT_2, 4, 32, sTextColors[1], 0, gText_MainMenuTime); text[0] = (gSaveBlock2Ptr->playTimeHours / 100) + CHAR_0; text[1] = (gSaveBlock2Ptr->playTimeHours % 100) / 10 + CHAR_0; text[2] = (gSaveBlock2Ptr->playTimeHours % 10) + CHAR_0; @@ -1113,7 +1113,7 @@ static void HallOfFame_PrintPlayerInfo(u8 unused1, u8 unused2) text[5] = (gSaveBlock2Ptr->playTimeMinutes % 10) + CHAR_0; text[6] = EOS; - AddTextPrinterParameterized3(1, 2, textWidth - 36, 32, sTextColors[1], 0, text); + AddTextPrinterParameterized3(1, FONT_2, textWidth - 36, 32, sTextColors[1], 0, text); CopyWindowToVram(1, COPYWIN_FULL); } diff --git a/src/help_message.c b/src/help_message.c index d59e9ea40..5f3af1668 100644 --- a/src/help_message.c +++ b/src/help_message.c @@ -93,7 +93,7 @@ static const u8 sHelpMessageTextColors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMI static void PrintHelpMessageText(const u8 *text) { - AddTextPrinterParameterized4(sHelpMessageWindowId, 2, 2, 5, 1, 1, sHelpMessageTextColors, -1, text); + AddTextPrinterParameterized4(sHelpMessageWindowId, FONT_2, 2, 5, 1, 1, sHelpMessageTextColors, -1, text); } void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode) diff --git a/src/help_system_util.c b/src/help_system_util.c index 49554acf8..c95e46003 100644 --- a/src/help_system_util.c +++ b/src/help_system_util.c @@ -370,9 +370,9 @@ void HS_ShowOrHideScrollArrows(u8 which, u8 mode) } } -void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 width, u8 height) +void HelpSystemRenderText(u8 fontId, u8 * dest, const u8 * src, u8 x, u8 y, u8 width, u8 height) { - // font -> sp+24 + // fontId -> sp+24 // dest -> sp+28 // src -> r9 // x -> sp+34 @@ -408,9 +408,9 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid { break; } - DecompressAndRenderGlyph(font, gSaveBlock2Ptr->playerName[i], &srcBlit, &destBlit, dest, x, y, width, height); + DecompressAndRenderGlyph(fontId, gSaveBlock2Ptr->playerName[i], &srcBlit, &destBlit, dest, x, y, width, height); // This is required to match a dummy [sp+#0x24] read here - if (font == 0) + if (fontId == FONT_0) { x += gGlyphInfo.width; } @@ -430,7 +430,7 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid { break; } - DecompressAndRenderGlyph(font, gString_Bill[i], &srcBlit, &destBlit, dest, x, y, width, height); + DecompressAndRenderGlyph(fontId, gString_Bill[i], &srcBlit, &destBlit, dest, x, y, width, height); } else { @@ -438,9 +438,9 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid { break; } - DecompressAndRenderGlyph(font, gString_Someone[i], &srcBlit, &destBlit, dest, x, y, width, height); + DecompressAndRenderGlyph(fontId, gString_Someone[i], &srcBlit, &destBlit, dest, x, y, width, height); } - if (font == 0) + if (fontId == FONT_0) { x += gGlyphInfo.width; } @@ -496,7 +496,7 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid destBlit.pixels = dest; destBlit.width = width * 8; destBlit.height = height * 8; - FillBitmapRect4Bit(&destBlit, x, y, clearPixels, GetFontAttribute(font, FONTATTR_MAX_LETTER_HEIGHT), 0); + FillBitmapRect4Bit(&destBlit, x, y, clearPixels, GetFontAttribute(fontId, FONTATTR_MAX_LETTER_HEIGHT), 0); x += clearPixels; } src++; @@ -529,7 +529,7 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid default: if (curChar == CHAR_SPACE) { - if (font == 0) + if (fontId == FONT_0) { x += 5; } @@ -540,8 +540,8 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid } else { - DecompressAndRenderGlyph(font, curChar, &srcBlit, &destBlit, dest, x, y, width, height); - if (font == 0) + DecompressAndRenderGlyph(fontId, curChar, &srcBlit, &destBlit, dest, x, y, width, height); + if (fontId == FONT_0) { x += gGlyphInfo.width; } @@ -555,11 +555,11 @@ void HelpSystemRenderText(u8 font, u8 * dest, const u8 * src, u8 x, u8 y, u8 wid } } -void DecompressAndRenderGlyph(u8 font, u16 glyph, struct Bitmap *srcBlit, struct Bitmap *destBlit, u8 *destBuffer, u8 x, u8 y, u8 width, u8 height) +void DecompressAndRenderGlyph(u8 fontId, u16 glyph, struct Bitmap *srcBlit, struct Bitmap *destBlit, u8 *destBuffer, u8 x, u8 y, u8 width, u8 height) { - if (font == 0) + if (fontId == FONT_0) DecompressGlyphFont0(glyph, FALSE); - else if (font == 5) + else if (fontId == FONT_5) DecompressGlyphFont5(glyph, FALSE); else DecompressGlyphFont2(glyph, FALSE); @@ -580,7 +580,7 @@ void HelpSystem_PrintTextInTopLeftCorner(const u8 * str) void HelpSystem_PrintTextRightAlign_Row52(const u8 * str) { - s32 left = 0x7C - GetStringWidth(0, str, 0); + s32 left = 0x7C - GetStringWidth(FONT_0, str, 0); GenerateFontHalfRowLookupTable(TEXT_COLOR_WHITE, TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_DARK_GRAY); HelpSystemRenderText(0, gDecompressionBuffer + 0x3400, str, left, 2, 16, 2); } @@ -713,7 +713,7 @@ void HS_UpdateMenuScrollArrows(void) void PrintListMenuItems(void) { - u8 glyphHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 1; + u8 glyphHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 1; s32 i; s32 r5 = gHelpSystemListMenu.itemsAbove; @@ -728,7 +728,7 @@ void PrintListMenuItems(void) void PlaceListMenuCursor(void) { - u8 glyphHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 1; + u8 glyphHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 1; u8 x = gHelpSystemListMenu.sub.left; u8 y = gHelpSystemListMenu.sub.top + glyphHeight * gHelpSystemListMenu.cursorPos; HelpSystem_PrintTextAt(gText_SelectorArrow2, x, y); @@ -736,7 +736,7 @@ void PlaceListMenuCursor(void) void HS_RemoveSelectionCursorAt(u8 i) { - u8 glyphHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 1; + u8 glyphHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 1; u8 x = gHelpSystemListMenu.sub.left; u8 y = gHelpSystemListMenu.sub.top + i * glyphHeight; HelpSystem_PrintTextAt(gString_HelpSystem_ClearTo8, x, y); diff --git a/src/item_menu.c b/src/item_menu.c index 88ebd1e17..ceddc9675 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -660,7 +660,7 @@ static void Bag_BuildListMenuTemplate(u8 pocket) gMultiuseListMenuTemplate.itemVerticalPadding = 2; gMultiuseListMenuTemplate.upText_Y = 2; gMultiuseListMenuTemplate.maxShowed = sBagMenuDisplay->maxShowed[pocket]; - gMultiuseListMenuTemplate.fontId = 2; + gMultiuseListMenuTemplate.fontId = FONT_2; gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; @@ -718,7 +718,7 @@ static void BagListMenuItemPrintFunc(u8 windowId, u32 itemId, u8 y) { ConvertIntToDecimalStringN(gStringVar1, bagItemQuantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BagPrintTextOnWindow(windowId, 0, gStringVar4, 0x6e, y, 0, 0, 0xFF, 1); + BagPrintTextOnWindow(windowId, FONT_0, gStringVar4, 0x6e, y, 0, 0, 0xFF, 1); } else if (gSaveBlock1Ptr->registeredItem != ITEM_NONE && gSaveBlock1Ptr->registeredItem == bagItemId) { @@ -736,11 +736,11 @@ static void bag_menu_print_cursor(u8 y, u8 colorIdx) { if (colorIdx == 0xFF) { - FillWindowPixelRect(0, PIXEL_FILL(0), 1, y, GetMenuCursorDimensionByFont(2, 0), GetMenuCursorDimensionByFont(2, 1)); + FillWindowPixelRect(0, PIXEL_FILL(0), 1, y, GetMenuCursorDimensionByFont(FONT_2, 0), GetMenuCursorDimensionByFont(FONT_2, 1)); } else { - BagPrintTextOnWindow(0, 2, gText_SelectorArrow2, 1, y, 0, 0, 0, colorIdx); + BagPrintTextOnWindow(0, FONT_2, gText_SelectorArrow2, 1, y, 0, 0, 0, colorIdx); } } @@ -758,7 +758,7 @@ static void PrintItemDescriptionOnMessageWindow(s32 itemIndex) else description = gText_CloseBag; FillWindowPixelBuffer(1, PIXEL_FILL(0)); - BagPrintTextOnWindow(1, 2, description, 0, 3, 2, 0, 0, 0); + BagPrintTextOnWindow(1, FONT_2, description, 0, 3, 2, 0, 0, 0); } static void CreatePocketScrollArrowPair(void) @@ -1230,7 +1230,7 @@ static void BeginMovingItemInPocket(u8 taskId, s16 itemIndex) StringCopy(gStringVar1, ItemId_GetName(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1]))); StringExpandPlaceholders(gStringVar4, gOtherText_WhereShouldTheStrVar1BePlaced); FillWindowPixelBuffer(1, PIXEL_FILL(0)); - BagPrintTextOnWindow(1, 2, gStringVar4, 0, 3, 2, 0, 0, 0); + BagPrintTextOnWindow(1, FONT_2, gStringVar4, 0, 3, 2, 0, 0, 0); ItemMenuIcons_MoveInsertIndicatorBar(0, ListMenuGetYCoordForPrintingArrowCursor(data[0])); ItemMenuIcons_ToggleInsertIndicatorBarVisibility(FALSE); BagDestroyPocketSwitchArrowPair(); @@ -1315,11 +1315,11 @@ static void InitQuantityToTossOrDeposit(u16 cursorPos, const u8 *str) u8 r5 = ShowBagWindow(6, 2); CopyItemName(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, cursorPos), gStringVar1); StringExpandPlaceholders(gStringVar4, str); - BagPrintTextOnWindow(r5, 2, gStringVar4, 0, 2, 1, 0, 0, 1); + BagPrintTextOnWindow(r5, FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); r4 = ShowBagWindow(0, 0); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BagPrintTextOnWindow(r4, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + BagPrintTextOnWindow(r4, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); CreateArrowPair_QuantitySelect(); } @@ -1329,7 +1329,7 @@ static void UpdateQuantityToTossOrDeposit(s16 value, u8 ndigits) FillWindowPixelBuffer(r6, PIXEL_FILL(1)); ConvertIntToDecimalStringN(gStringVar1, value, STR_CONV_MODE_LEADING_ZEROS, ndigits); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BagPrintTextOnWindow(r6, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + BagPrintTextOnWindow(r6, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); } static void CopyBagListBgTileRowToTilemapBuffer(u8 frame) @@ -1422,20 +1422,20 @@ static void OpenContextMenu(u8 taskId) r6 = ShowBagWindow(10, sContextMenuNumItems - 1); AddItemMenuActionTextPrinters( r6, + FONT_2, + GetMenuCursorDimensionByFont(FONT_2, 0), 2, - GetMenuCursorDimensionByFont(2, 0), - 2, - GetFontAttribute(2, FONTATTR_LETTER_SPACING), - GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, + GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING), + GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumItems, sItemMenuContextActions, sContextMenuItemsPtr ); - Menu_InitCursor(r6, 2, 0, 2, GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumItems, 0); + Menu_InitCursor(r6, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sContextMenuNumItems, 0); r4 = ShowBagWindow(6, 0); CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); - BagPrintTextOnWindow(r4, 2, gStringVar4, 0, 2, 1, 0, 0, 1); + BagPrintTextOnWindow(r4, FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); } static void Task_ItemContext_FieldOrBattle(u8 taskId) @@ -1507,7 +1507,7 @@ static void Task_ConfirmTossItems(u8 taskId) s16 *data = gTasks[taskId].data; ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_ThrowAwayStrVar2OfThisItemQM); - BagPrintTextOnWindow(ShowBagWindow(6, 1), 2, gStringVar4, 0, 2, 1, 0, 0, 1); + BagPrintTextOnWindow(ShowBagWindow(6, 1), FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); BagCreateYesNoMenuBottomRight(taskId, &sYesNoMenu_Toss); } @@ -1559,7 +1559,7 @@ static void Task_TossItem_Yes(u8 taskId) CopyItemName(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1]), gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_ThrewAwayStrVar2StrVar1s); - BagPrintTextOnWindow(ShowBagWindow(6, 3), 2, gStringVar4, 0, 2, 1, 0, 0, 1); + BagPrintTextOnWindow(ShowBagWindow(6, 3), FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); gTasks[taskId].func = Task_WaitAB_RedrawAndReturnToBag; } @@ -1610,7 +1610,7 @@ static void Task_ItemMenuAction_Give(u8 taskId) PutWindowTilemap(1); CopyWindowToVram(0, COPYWIN_MAP); if (!CanWriteMailHere(itemId)) - DisplayItemMessageInBag(taskId, 2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); else if (!itemid_is_unique(itemId)) { if (CalculatePlayerPartyCount() == 0) @@ -1629,14 +1629,14 @@ static void Task_ItemMenuAction_Give(u8 taskId) static void Task_PrintThereIsNoPokemon(u8 taskId) { - DisplayItemMessageInBag(taskId, 2, gText_ThereIsNoPokemon, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitAButtonAndCloseContextMenu); } static void Task_PrintItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ItemCantBeHeld); - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_WaitAButtonAndCloseContextMenu); } static void Task_WaitAButtonAndCloseContextMenu(u8 taskId) @@ -1705,7 +1705,7 @@ static void Task_ItemContext_FieldGive(u8 taskId) u16 itemId = BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1]); if (!CanWriteMailHere(itemId)) { - DisplayItemMessageInBag(taskId, 2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); } else if (itemId == ITEM_TM_CASE) { @@ -1749,7 +1749,7 @@ static void Task_ItemContext_PcBoxGive(u8 taskId) u16 itemId = BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1]); if (ItemIsMail(itemId) == TRUE) { - DisplayItemMessageInBag(taskId, 2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_CantWriteMailHere, Task_WaitAButtonAndCloseContextMenu); } else if (itemId == ITEM_TM_CASE) { @@ -1872,7 +1872,7 @@ static void Task_InitSaleQuantitySelectInterface(u8 taskId) u8 r4 = ShowBagWindow(0, 1); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BagPrintTextOnWindow(r4, 0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); + BagPrintTextOnWindow(r4, FONT_0, gStringVar4, 4, 10, 1, 0, 0xFF, 1); UpdateSalePriceDisplay(itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8]); BagPrintMoneyAmount(); CreatePocketScrollArrowPair_SellQuantity(); @@ -1925,7 +1925,7 @@ static void Task_SellItem_Yes(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(gBagMenuState.pocket + 1, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_FinalizeSaleToShop); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_FinalizeSaleToShop); } static void Task_FinalizeSaleToShop(u8 taskId) @@ -2013,12 +2013,12 @@ static void Task_TryDoItemDeposit(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_DepositedStrVar2StrVar1s); - BagPrintTextOnWindow(ShowBagWindow(6, 3), 2, gStringVar4, 0, 2, 1, 0, 0, 1); + BagPrintTextOnWindow(ShowBagWindow(6, 3), FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); gTasks[taskId].func = Task_WaitAB_RedrawAndReturnToBag; } else { - DisplayItemMessageInBag(taskId, 2, gText_NoRoomToStoreItems, Task_WaitAButtonAndCloseContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_NoRoomToStoreItems, Task_WaitAButtonAndCloseContextMenu); } } diff --git a/src/item_pc.c b/src/item_pc.c index 68290ef4a..e6d65d9c8 100644 --- a/src/item_pc.c +++ b/src/item_pc.c @@ -498,7 +498,7 @@ static void ItemPc_BuildListMenuTemplate(void) gMultiuseListMenuTemplate.itemVerticalPadding = 2; gMultiuseListMenuTemplate.upText_Y = 2; gMultiuseListMenuTemplate.maxShowed = sStateDataPtr->maxShowed; - gMultiuseListMenuTemplate.fontId = 2; + gMultiuseListMenuTemplate.fontId = FONT_2; gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; @@ -534,7 +534,7 @@ static void ItemPc_MoveCursorFunc(s32 itemIndex, bool8 onInit, struct ListMenu * } sStateDataPtr->itemMenuIconSlot ^= 1; FillWindowPixelBuffer(1, 0); - ItemPc_AddTextPrinterParameterized(1, 2, desc, 0, 3, 2, 0, 0, 3); + ItemPc_AddTextPrinterParameterized(1, FONT_2, desc, 0, 3, 2, 0, 0, 3); } } @@ -552,7 +552,7 @@ static void ItemPc_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) u16 quantity = ItemPc_GetItemQuantityBySlotId(itemId); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - ItemPc_AddTextPrinterParameterized(windowId, 0, gStringVar4, 110, y, 0, 0, 0xFF, 1); + ItemPc_AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, 110, y, 0, 0, 0xFF, 1); } } @@ -565,19 +565,19 @@ static void ItemPc_PrintOrRemoveCursorAt(u8 y, u8 colorIdx) { if (colorIdx == 0xFF) { - u8 maxWidth = GetFontAttribute(2, FONTATTR_MAX_LETTER_WIDTH); - u8 maxHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + u8 maxWidth = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH); + u8 maxHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT); FillWindowPixelRect(0, 0, 0, y, maxWidth, maxHeight); } else { - ItemPc_AddTextPrinterParameterized(0, 2, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIdx); + ItemPc_AddTextPrinterParameterized(0, FONT_2, gText_SelectorArrow2, 0, y, 0, 0, 0, colorIdx); } } static void ItemPc_PrintWithdrawItem(void) { - ItemPc_AddTextPrinterParameterized(2, 0, gText_WithdrawItem, 0, 1, 0, 1, 0, 0); + ItemPc_AddTextPrinterParameterized(2, FONT_0, gText_WithdrawItem, 0, 1, 0, 1, 0, 0); } static void ItemPc_PlaceTopMenuScrollIndicatorArrows(void) @@ -773,7 +773,7 @@ static void ItemPc_MoveItemModeInit(u8 taskId, s16 pos) StringCopy(gStringVar1, ItemId_GetName(ItemPc_GetItemIdBySlotId(data[1]))); StringExpandPlaceholders(gStringVar4, gOtherText_WhereShouldTheStrVar1BePlaced); FillWindowPixelBuffer(1, 0x00); - ItemPc_AddTextPrinterParameterized(1, 2, gStringVar4, 0, 3, 2, 3, 0, 0); + ItemPc_AddTextPrinterParameterized(1, FONT_2, gStringVar4, 0, 3, 2, 3, 0, 0); ItemMenuIcons_MoveInsertIndicatorBar(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0])); ItemMenuIcons_ToggleInsertIndicatorBarVisibility(FALSE); ItemPc_PrintOrRemoveCursor(data[0], 2); @@ -839,11 +839,11 @@ static void Task_ItemPcSubmenuInit(u8 taskId) ItemPc_SetBorderStyleOnWindow(4); windowId = ItemPc_GetOrCreateSubwindow(0); - PrintTextArray(4, 2, 8, 2, GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, 3, sItemPcSubmenuOptions); - Menu_InitCursor(4, 2, 0, 2, GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) + 2, 3, 0); + PrintTextArray(4, FONT_2, 8, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, 3, sItemPcSubmenuOptions); + Menu_InitCursor(4, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, 3, 0); CopyItemName(ItemPc_GetItemIdBySlotId(data[1]), gStringVar1); StringExpandPlaceholders(gStringVar4, gText_Var1IsSelected); - ItemPc_AddTextPrinterParameterized(windowId, 2, gStringVar4, 0, 2, 1, 0, 0, 1); + ItemPc_AddTextPrinterParameterized(windowId, FONT_2, gStringVar4, 0, 2, 1, 0, 0, 1); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Task_ItemPcSubmenuRun; } @@ -901,13 +901,13 @@ static void ItemPc_DoWithdraw(u8 taskId) ConvertIntToDecimalStringN(gStringVar2, data[8], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_WithdrewQuantItem); windowId = ItemPc_GetOrCreateSubwindow(2); - AddTextPrinterParameterized(windowId, 2, gStringVar4, 0, 2, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gStringVar4, 0, 2, 0, NULL); gTasks[taskId].func = Task_ItemPcWaitButtonAndFinishWithdrawMultiple; } else { windowId = ItemPc_GetOrCreateSubwindow(2); - AddTextPrinterParameterized(windowId, 2, gText_NoMoreRoomInBag, 0, 2, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_NoMoreRoomInBag, 0, 2, 0, NULL); gTasks[taskId].func = Task_ItemPcWaitButtonWithdrawMultipleFailed; } } @@ -957,11 +957,11 @@ static void ItemPc_WithdrawMultipleInitWindow(u16 slotId) CopyItemName(itemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_WithdrawHowMany); - AddTextPrinterParameterized(ItemPc_GetOrCreateSubwindow(1), 2, gStringVar4, 0, 2, 0, NULL); + AddTextPrinterParameterized(ItemPc_GetOrCreateSubwindow(1), FONT_2, gStringVar4, 0, 2, 0, NULL); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); ItemPc_SetBorderStyleOnWindow(3); - ItemPc_AddTextPrinterParameterized(3, 0, gStringVar4, 8, 10, 1, 0, 0, 1); + ItemPc_AddTextPrinterParameterized(3, FONT_0, gStringVar4, 8, 10, 1, 0, 0, 1); ScheduleBgCopyTilemapToVram(0); } @@ -970,7 +970,7 @@ static void UpdateWithdrawQuantityDisplay(s16 quantity) FillWindowPixelRect(3, PIXEL_FILL(1), 10, 10, 28, 12); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - ItemPc_AddTextPrinterParameterized(3, 0, gStringVar4, 8, 10, 1, 0, 0, 1); + ItemPc_AddTextPrinterParameterized(3, FONT_0, gStringVar4, 8, 10, 1, 0, 0, 1); } static void Task_ItemPcHandleWithdrawMultiple(u8 taskId) @@ -1090,7 +1090,7 @@ static void unused_ItemPc_AddTextPrinterParameterized(u8 windowId, const u8 * st template.currentChar = string; template.windowId = windowId; - template.fontId = 3; + template.fontId = FONT_3; template.x = x; template.y = y; template.currentX = x; @@ -1098,9 +1098,9 @@ static void unused_ItemPc_AddTextPrinterParameterized(u8 windowId, const u8 * st template.fgColor = 2; template.bgColor = 0; template.shadowColor = 3; - template.unk = GetFontAttribute(3, FONTATTR_UNKNOWN); - template.letterSpacing = letterSpacing + GetFontAttribute(3, FONTATTR_LETTER_SPACING); - template.lineSpacing = lineSpacing + GetFontAttribute(3, FONTATTR_LINE_SPACING); + template.unk = GetFontAttribute(FONT_3, FONTATTR_UNKNOWN); + template.letterSpacing = letterSpacing + GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING); + template.lineSpacing = lineSpacing + GetFontAttribute(FONT_3, FONTATTR_LINE_SPACING); AddTextPrinter(&template, speed, NULL); } @@ -1140,6 +1140,6 @@ static u8 ItemPc_GetSubwindow(u8 idx) static void ItemPc_PrintOnWindow5WithContinueTask(u8 taskId, const u8 * str, TaskFunc taskFunc) { - DisplayMessageAndContinueTask(taskId, 5, 0x3AC, 0x0B, 2, GetTextSpeedSetting(), str, taskFunc); + DisplayMessageAndContinueTask(taskId, 5, 0x3AC, 0x0B, FONT_2, GetTextSpeedSetting(), str, taskFunc); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/item_use.c b/src/item_use.c index cdafef34f..716d42b9a 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -178,18 +178,18 @@ static void Task_WaitFadeIn_CallItemUseOnFieldCB(u8 taskId) } } -static void DisplayItemMessageInCurrentContext(u8 taskId, bool8 inField, u8 textSpeed, const u8 * str) +static void DisplayItemMessageInCurrentContext(u8 taskId, bool8 inField, u8 fontId, const u8 * str) { StringExpandPlaceholders(gStringVar4, str); if (inField == FALSE) - DisplayItemMessageInBag(taskId, textSpeed, gStringVar4, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, fontId, gStringVar4, Task_ReturnToBagFromContextMenu); else - DisplayItemMessageOnField(taskId, textSpeed, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); + DisplayItemMessageOnField(taskId, fontId, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); } static void PrintNotTheTimeToUseThat(u8 taskId, bool8 inField) { - DisplayItemMessageInCurrentContext(taskId, inField, 4, gText_OakForbidsUseOfItemHere); + DisplayItemMessageInCurrentContext(taskId, inField, FONT_4, gText_OakForbidsUseOfItemHere); } static void Task_ItemUse_CloseMessageBoxAndReturnToField(u8 taskId) @@ -262,7 +262,7 @@ void FieldUseFunc_MachBike(u8 taskId) || MetatileBehavior_IsHorizontalRail(behavior) == TRUE || MetatileBehavior_IsIsolatedVerticalRail(behavior) == TRUE || MetatileBehavior_IsIsolatedHorizontalRail(behavior) == TRUE) - DisplayItemMessageInCurrentContext(taskId, gTasks[taskId].data[3], 2, gUnknown_8416451); + DisplayItemMessageInCurrentContext(taskId, gTasks[taskId].data[3], FONT_2, gUnknown_8416451); else if (Overworld_IsBikingAllowed() == TRUE && !IsBikingDisallowedByPlayer()) { sItemUseOnFieldCB = ItemUseOnFieldCB_Bicycle; @@ -339,9 +339,9 @@ void FieldUseFunc_CoinCase(u8 taskId) StringExpandPlaceholders(gStringVar4, gUnknown_8416537); ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF); if (gTasks[taskId].data[3] == 0) - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_ReturnToBagFromContextMenu); else - DisplayItemMessageOnField(taskId, 2, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); + DisplayItemMessageOnField(taskId, FONT_2, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); } void FieldUseFunc_PowderJar(u8 taskId) @@ -350,9 +350,9 @@ void FieldUseFunc_PowderJar(u8 taskId) StringExpandPlaceholders(gStringVar4, gUnknown_8416644); ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF); if (gTasks[taskId].data[3] == 0) - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_ReturnToBagFromContextMenu); else - DisplayItemMessageOnField(taskId, 2, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); + DisplayItemMessageOnField(taskId, FONT_2, gStringVar4, Task_ItemUse_CloseMessageBoxAndReturnToField); } void FieldUseFunc_PokeFlute(u8 taskId) @@ -370,17 +370,17 @@ void FieldUseFunc_PokeFlute(u8 taskId) { ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF); if (gTasks[taskId].data[3] == 0) - DisplayItemMessageInBag(taskId, 2, gUnknown_8416690, sub_80A1648); + DisplayItemMessageInBag(taskId, FONT_2, gUnknown_8416690, sub_80A1648); else - DisplayItemMessageOnField(taskId, 2, gUnknown_8416690, sub_80A1648); + DisplayItemMessageOnField(taskId, FONT_2, gUnknown_8416690, sub_80A1648); } else { // Now that's a catchy tune! if (gTasks[taskId].data[3] == 0) - DisplayItemMessageInBag(taskId, 2, gUnknown_841665C, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gUnknown_841665C, Task_ReturnToBagFromContextMenu); else - DisplayItemMessageOnField(taskId, 2, gUnknown_841665C, Task_ItemUse_CloseMessageBoxAndReturnToField); + DisplayItemMessageOnField(taskId, FONT_2, gUnknown_841665C, Task_ItemUse_CloseMessageBoxAndReturnToField); } } @@ -395,9 +395,9 @@ static void sub_80A1674(u8 taskId) if (WaitFanfare(FALSE)) { if (gTasks[taskId].data[3] == 0) - DisplayItemMessageInBag(taskId, 2, gUnknown_84166A7, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gUnknown_84166A7, Task_ReturnToBagFromContextMenu); else - DisplayItemMessageOnField(taskId, 2, gUnknown_84166A7, Task_ItemUse_CloseMessageBoxAndReturnToField); + DisplayItemMessageOnField(taskId, FONT_2, gUnknown_84166A7, Task_ItemUse_CloseMessageBoxAndReturnToField); } } @@ -556,7 +556,7 @@ void FieldUseFunc_SuperRepel(u8 taskId) } else // An earlier repel is still in effect - DisplayItemMessageInBag(taskId, 2, gUnknown_841659E, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gUnknown_841659E, Task_ReturnToBagFromContextMenu); } static void sub_80A19E8(u8 taskId) @@ -566,7 +566,7 @@ static void sub_80A19E8(u8 taskId) ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF); VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId)); sub_80A1A44(); - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_ReturnToBagFromContextMenu); } } @@ -607,7 +607,7 @@ static void sub_80A1B48(u8 taskId) if (++gTasks[taskId].data[8] > 7) { PlaySE(SE_GLASS_FLUTE); - DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, Task_ReturnToBagFromContextMenu); } } @@ -636,7 +636,7 @@ static void sub_80A1C08(u8 taskId) Overworld_ResetStateAfterDigEscRope(); sub_80A1A44(); gTasks[taskId].data[0] = 0; - DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A1C44); + DisplayItemMessageOnField(taskId, FONT_2, gStringVar4, sub_80A1C44); } void sub_80A1C44(u8 taskId) @@ -744,7 +744,7 @@ void BattleUseFunc_PokeBallEtc(u8 taskId) } else { - DisplayItemMessageInBag(taskId, 2, gUnknown_8416631, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gUnknown_8416631, Task_ReturnToBagFromContextMenu); } } @@ -758,7 +758,7 @@ void BattleUseFunc_GuardSpec(u8 taskId) { if (ExecuteTableBasedItemEffect(&gPlayerParty[gBattlerPartyIndexes[gBattlerInMenuId]], gSpecialVar_ItemId, gBattlerPartyIndexes[gBattlerInMenuId], 0)) { - DisplayItemMessageInBag(taskId, 2, gText_WontHaveEffect, Task_ReturnToBagFromContextMenu); + DisplayItemMessageInBag(taskId, FONT_2, gText_WontHaveEffect, Task_ReturnToBagFromContextMenu); } else { @@ -776,7 +776,7 @@ static void Task_BattleUse_StatBooster_DelayAndPrint(u8 taskId) u16 itemId = gSpecialVar_ItemId; PlaySE(SE_USE_ITEM); RemoveBagItem(itemId, 1); - DisplayItemMessageInBag(taskId, 2, Battle_PrintStatBoosterEffectMessage(itemId), Task_BattleUse_StatBooster_WaitButton_ReturnToBattle); + DisplayItemMessageInBag(taskId, FONT_2, Battle_PrintStatBoosterEffectMessage(itemId), Task_BattleUse_StatBooster_WaitButton_ReturnToBattle); } } @@ -827,7 +827,7 @@ void BattleUseFunc_PokeDoll(u8 taskId) { sub_80A1A44(); ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, 0, gSpecialVar_ItemId, 0xFFFF); - DisplayItemMessageInBag(taskId, 2, gStringVar4, ItemMenu_StartFadeToExitCallback); + DisplayItemMessageInBag(taskId, FONT_2, gStringVar4, ItemMenu_StartFadeToExitCallback); } else PrintNotTheTimeToUseThat(taskId, 0); @@ -907,7 +907,7 @@ void FieldUseFunc_OakStopsYou(u8 taskId) if (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_BERRY_POUCH) { StringExpandPlaceholders(gStringVar4, gText_OakForbidsUseOfItemHere); - DisplayItemMessageInBerryPouch(taskId, 4, gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu); + DisplayItemMessageInBerryPouch(taskId, FONT_4, gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu); } else PrintNotTheTimeToUseThat(taskId, gTasks[taskId].data[3]); diff --git a/src/itemfinder.c b/src/itemfinder.c index 8e8736bf1..95887985f 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -143,7 +143,7 @@ void ItemUseOnFieldCB_Itemfinder(u8 taskId) } else { - DisplayItemMessageOnField(taskId, 2, gText_NopeTheresNoResponse, Task_NoResponse_CleanUp); + DisplayItemMessageOnField(taskId, FONT_2, gText_NopeTheresNoResponse, Task_NoResponse_CleanUp); } } @@ -479,7 +479,7 @@ static u8 GetPlayerDirectionTowardsHiddenItem(s16 itemX, s16 itemY) static void Task_ItemfinderResponsePrintMessage(u8 taskId) { - DisplayItemMessageOnField(taskId, 2, gText_ItemfinderResponding, Task_ItemfinderResponseCleanUp); + DisplayItemMessageOnField(taskId, FONT_2, gText_ItemfinderResponding, Task_ItemfinderResponseCleanUp); } static void Task_ItemfinderResponseCleanUp(u8 taskId) @@ -493,7 +493,7 @@ static void Task_ItemfinderResponseCleanUp(u8 taskId) static void Task_ItemfinderUnderfootPrintMessage(u8 taskId) { - DisplayItemMessageOnField(taskId, 2, gText_ItemfinderShakingWildly, Task_ItemfinderUnderfootDigUpItem); + DisplayItemMessageOnField(taskId, FONT_2, gText_ItemfinderShakingWildly, Task_ItemfinderUnderfootDigUpItem); } static void Task_ItemfinderUnderfootDigUpItem(u8 taskId) diff --git a/src/learn_move.c b/src/learn_move.c index 12fa40b65..314125c9e 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -353,7 +353,7 @@ static const struct ListMenuTemplate sMoveRelearnerListMenuTemplate = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0, }; @@ -506,7 +506,7 @@ static void MoveRelearnerStateMachine(void) MoveRelearnerMenuHandleInput(); break; case MENU_STATE_PRINT_TEACH_MOVE_PROMPT: - CreateYesNoMenu(&gUnknown_83FFA8C, 3, 0, 2, 0x001, 0xE, 0); + CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0); sMoveRelearner->state++; break; case MENU_STATE_TEACH_MOVE_CONFIRM : @@ -531,7 +531,7 @@ static void MoveRelearnerStateMachine(void) } break; case MENU_STATE_PRINT_GIVE_UP_PROMPT: - CreateYesNoMenu(&gUnknown_83FFA8C, 3, 0, 2, 0x001, 0xE, 0); + CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0); sMoveRelearner->state++; break; case MENU_STATE_GIVE_UP_CONFIRM: @@ -552,7 +552,7 @@ static void MoveRelearnerStateMachine(void) sMoveRelearner->state++; break; case MENU_STATE_WAIT_FOR_TRYING_TO_LEARN: - CreateYesNoMenu(&gUnknown_83FFA8C, 3, 0, 2, 0x001, 0xE, 0); + CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0); sMoveRelearner->state = 18; break; case MENU_STATE_CONFIRM_DELETE_OLD_MOVE: @@ -573,7 +573,7 @@ static void MoveRelearnerStateMachine(void) sMoveRelearner->state++; break; case MENU_STATE_WAIT_FOR_STOP_TEACHING: - CreateYesNoMenu(&gUnknown_83FFA8C, 3, 0, 2, 0x001, 0xE, 0); + CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0); sMoveRelearner->state = 26; break; case MENU_STATE_CONFIRM_STOP_TEACHING: @@ -928,5 +928,5 @@ static void PrintTextOnWindow(u8 windowId, const u8 *str, u8 x, u8 y, s32 speed, } if (colorIdx != 1) FillWindowPixelBuffer(windowId, PIXEL_FILL(sMoveRelearner->textColor[0])); - AddTextPrinterParameterized4(windowId, 3, x, y, letterSpacing, lineSpacing, sMoveRelearner->textColor, speed, str); + AddTextPrinterParameterized4(windowId, FONT_3, x, y, letterSpacing, lineSpacing, sMoveRelearner->textColor, speed, str); } diff --git a/src/link.c b/src/link.c index 0b85e2f35..b5167198e 100644 --- a/src/link.c +++ b/src/link.c @@ -1508,8 +1508,8 @@ void sub_800AE1C(void) LoadPalette(sWirelessLinkDisplayPal, 0, 0x20); FillWindowPixelBuffer(0, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(0, 3, 2, 5, sLinkErrorTextColor, 0, gText_CommErrorEllipsis); - AddTextPrinterParameterized3(2, 3, 2, 2, sLinkErrorTextColor, 0, gText_MoveCloserToLinkPartner); + AddTextPrinterParameterized3(0, FONT_3, 2, 5, sLinkErrorTextColor, 0, gText_CommErrorEllipsis); + AddTextPrinterParameterized3(2, FONT_3, 2, 2, sLinkErrorTextColor, 0, gText_MoveCloserToLinkPartner); PutWindowTilemap(0); PutWindowTilemap(2); CopyWindowToVram(0, 0); @@ -1522,7 +1522,7 @@ void sub_800AED0(void) { FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - AddTextPrinterParameterized3(1, 3, 2, 0, sLinkErrorTextColor, 0, gText_CommErrorCheckConnections); + AddTextPrinterParameterized3(1, FONT_3, 2, 0, sLinkErrorTextColor, 0, gText_CommErrorCheckConnections); PutWindowTilemap(1); PutWindowTilemap(2); CopyWindowToVram(1, 0); @@ -1556,11 +1556,11 @@ static void CB2_PrintErrorMessage(void) case 130: if (gWirelessCommType == 2) { - AddTextPrinterParameterized3(0, 3, 2, 20, sLinkErrorTextColor, 0, gText_ABtnTitleScreen); + AddTextPrinterParameterized3(0, FONT_3, 2, 20, sLinkErrorTextColor, 0, gText_ABtnTitleScreen); } else if (gWirelessCommType == 1) { - AddTextPrinterParameterized3(0, 3, 2, 20, sLinkErrorTextColor, 0, gText_ABtnRegistrationCounter); + AddTextPrinterParameterized3(0, FONT_3, 2, 20, sLinkErrorTextColor, 0, gText_ABtnRegistrationCounter); } break; } diff --git a/src/mail.c b/src/mail.c index aae5b93a5..ebe5e0312 100644 --- a/src/mail.c +++ b/src/mail.c @@ -669,13 +669,13 @@ static void AddMailMessagePrinters(void) { if (sMailViewResources->messageLinesBuffer[i][0] != EOS && sMailViewResources->messageLinesBuffer[i][0] != CHAR_SPACE) { - AddTextPrinterParameterized3(0, 1, sMailViewResources->messageLayout->linesLayout[i].lineXoffset + sMailViewResources->messageLayout->messageLeft, y + sMailViewResources->messageLayout->messageTop, sTextColor, 0, sMailViewResources->messageLinesBuffer[i]); + AddTextPrinterParameterized3(0, FONT_1, sMailViewResources->messageLayout->linesLayout[i].lineXoffset + sMailViewResources->messageLayout->messageLeft, y + sMailViewResources->messageLayout->messageTop, sTextColor, 0, sMailViewResources->messageLinesBuffer[i]); y += sMailViewResources->messageLayout->linesLayout[i].lineHeight; } } - width = GetStringWidth(1, gText_From, 0); - AddTextPrinterParameterized3(1, 1, sMailViewResources->nameX, sMailViewResources->messageLayout->nameY, sTextColor, 0, gText_From); - AddTextPrinterParameterized3(1, 1, sMailViewResources->nameX + width, sMailViewResources->messageLayout->nameY, sTextColor, 0, sMailViewResources->authorNameBuffer); + width = GetStringWidth(FONT_1, gText_From, 0); + AddTextPrinterParameterized3(1, FONT_1, sMailViewResources->nameX, sMailViewResources->messageLayout->nameY, sTextColor, 0, gText_From); + AddTextPrinterParameterized3(1, FONT_1, sMailViewResources->nameX + width, sMailViewResources->messageLayout->nameY, sTextColor, 0, sMailViewResources->authorNameBuffer); CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(1, COPYWIN_FULL); } diff --git a/src/mailbox_pc.c b/src/mailbox_pc.c index 107e2fd36..8ceafeb26 100644 --- a/src/mailbox_pc.c +++ b/src/mailbox_pc.c @@ -87,7 +87,7 @@ static void ItemPrintFunc(u8 windowId, u32 itemId, u8 y) StringCopy(strbuf, gSaveBlock1Ptr->mail[itemId + PARTY_SIZE].playerName); if (StringLength(strbuf) <= 5) ConvertInternationalString(strbuf, LANGUAGE_JAPANESE); - AddTextPrinterParameterized4(windowId, 2, 8, y, 0, 0, sTextColor, -1, strbuf); + AddTextPrinterParameterized4(windowId, FONT_2, 8, y, 0, 0, sTextColor, -1, strbuf); } } @@ -106,12 +106,12 @@ u8 MailboxPC_InitListMenu(struct PlayerPCItemPageStruct * playerPcStruct) gMultiuseListMenuTemplate.totalItems = playerPcStruct->count + 1; gMultiuseListMenuTemplate.windowId = sWindowIds[1]; gMultiuseListMenuTemplate.header_X = 0; - gMultiuseListMenuTemplate.item_X = GetMenuCursorDimensionByFont(2, 0); + gMultiuseListMenuTemplate.item_X = GetMenuCursorDimensionByFont(FONT_2, 0); gMultiuseListMenuTemplate.cursor_X = 0; gMultiuseListMenuTemplate.lettersSpacing = 0; gMultiuseListMenuTemplate.itemVerticalPadding = 2; gMultiuseListMenuTemplate.maxShowed = 8; - gMultiuseListMenuTemplate.fontId = 2; + gMultiuseListMenuTemplate.fontId = FONT_2; gMultiuseListMenuTemplate.upText_Y = 10; gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 1; diff --git a/src/main_menu.c b/src/main_menu.c index 5c3b888a2..67ad7546e 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -349,7 +349,7 @@ static void Task_PrintMainMenuText(u8 taskId) case MAIN_MENU_NEWGAME: default: FillWindowPixelBuffer(MAIN_MENU_WINDOW_NEWGAME_ONLY, PIXEL_FILL(10)); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME_ONLY, 2, 2, 2, sTextColor1, -1, gText_NewGame); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME_ONLY, FONT_2, 2, 2, sTextColor1, -1, gText_NewGame); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_NEWGAME_ONLY]); PutWindowTilemap(MAIN_MENU_WINDOW_NEWGAME_ONLY); CopyWindowToVram(MAIN_MENU_WINDOW_NEWGAME_ONLY, COPYWIN_FULL); @@ -357,8 +357,8 @@ static void Task_PrintMainMenuText(u8 taskId) case MAIN_MENU_CONTINUE: FillWindowPixelBuffer(MAIN_MENU_WINDOW_CONTINUE, PIXEL_FILL(10)); FillWindowPixelBuffer(MAIN_MENU_WINDOW_NEWGAME, PIXEL_FILL(10)); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 2, sTextColor1, -1, gText_Continue); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME, 2, 2, 2, sTextColor1, -1, gText_NewGame); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 2, sTextColor1, -1, gText_Continue); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME, FONT_2, 2, 2, sTextColor1, -1, gText_NewGame); PrintContinueStats(); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_CONTINUE]); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_NEWGAME]); @@ -371,10 +371,10 @@ static void Task_PrintMainMenuText(u8 taskId) FillWindowPixelBuffer(MAIN_MENU_WINDOW_CONTINUE, PIXEL_FILL(10)); FillWindowPixelBuffer(MAIN_MENU_WINDOW_NEWGAME, PIXEL_FILL(10)); FillWindowPixelBuffer(MAIN_MENU_WINDOW_MYSTERYGIFT, PIXEL_FILL(10)); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 2, sTextColor1, -1, gText_Continue); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME, 2, 2, 2, sTextColor1, -1, gText_NewGame); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 2, sTextColor1, -1, gText_Continue); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_NEWGAME, FONT_2, 2, 2, sTextColor1, -1, gText_NewGame); gTasks[taskId].tMGErrorType = 1; - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_MYSTERYGIFT, 2, 2, 2, sTextColor1, -1, gText_MysteryGift); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_MYSTERYGIFT, FONT_2, 2, 2, sTextColor1, -1, gText_MysteryGift); PrintContinueStats(); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_CONTINUE]); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_NEWGAME]); @@ -600,7 +600,7 @@ static void PrintMessageOnWindow4(const u8 *str) { FillWindowPixelBuffer(MAIN_MENU_WINDOW_ERROR, PIXEL_FILL(10)); MainMenu_DrawWindow(&sWindowTemplate[MAIN_MENU_WINDOW_ERROR]); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_ERROR, 2, 0, 2, sTextColor1, 2, str); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_ERROR, FONT_2, 0, 2, sTextColor1, 2, str); PutWindowTilemap(MAIN_MENU_WINDOW_ERROR); CopyWindowToVram(MAIN_MENU_WINDOW_ERROR, COPYWIN_GFX); SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE( 19, 221)); @@ -620,12 +620,12 @@ static void PrintPlayerName(void) s32 i; u8 name[PLAYER_NAME_LENGTH + 1]; u8 *ptr; - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 18, sTextColor2, -1, gText_Player); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 18, sTextColor2, -1, gText_Player); ptr = name; for (i = 0; i < PLAYER_NAME_LENGTH; i++) *ptr++ = gSaveBlock2Ptr->playerName[i]; *ptr = EOS; - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 62, 18, sTextColor2, -1, name); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 62, 18, sTextColor2, -1, name); } static void PrintPlayTime(void) @@ -633,11 +633,11 @@ static void PrintPlayTime(void) u8 strbuf[30]; u8 *ptr; - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 34, sTextColor2, -1, gText_Time); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 34, sTextColor2, -1, gText_Time); ptr = ConvertIntToDecimalStringN(strbuf, gSaveBlock2Ptr->playTimeHours, STR_CONV_MODE_LEFT_ALIGN, 3); *ptr++ = CHAR_COLON; ConvertIntToDecimalStringN(ptr, gSaveBlock2Ptr->playTimeMinutes, STR_CONV_MODE_LEADING_ZEROS, 2); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 62, 34, sTextColor2, -1, strbuf); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 62, 34, sTextColor2, -1, strbuf); } static void PrintDexCount(void) @@ -651,10 +651,10 @@ static void PrintDexCount(void) dexcount = GetNationalPokedexCount(FLAG_GET_CAUGHT); else dexcount = GetKantoPokedexCount(FLAG_GET_CAUGHT); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 50, sTextColor2, -1, gText_Pokedex); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 50, sTextColor2, -1, gText_Pokedex); ptr = ConvertIntToDecimalStringN(strbuf, dexcount, STR_CONV_MODE_LEFT_ALIGN, 3); StringAppend(ptr, gTextJPDummy_Hiki); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 62, 50, sTextColor2, -1, strbuf); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 62, 50, sTextColor2, -1, strbuf); } } @@ -669,10 +669,10 @@ static void PrintBadgeCount(void) if (FlagGet(flagId)) nbadges++; } - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 2, 66, sTextColor2, -1, gText_Badges); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 2, 66, sTextColor2, -1, gText_Badges); ptr = ConvertIntToDecimalStringN(strbuf, nbadges, STR_CONV_MODE_LEADING_ZEROS, 1); StringAppend(ptr, gTextJPDummy_Ko); - AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, 2, 62, 66, sTextColor2, -1, strbuf); + AddTextPrinterParameterized3(MAIN_MENU_WINDOW_CONTINUE, FONT_2, 62, 66, sTextColor2, -1, strbuf); } static void LoadUserFrameToBg(u8 bgId) diff --git a/src/map_name_popup.c b/src/map_name_popup.c index 95042ea83..8d6219858 100644 --- a/src/map_name_popup.c +++ b/src/map_name_popup.c @@ -197,9 +197,9 @@ static void MapNamePopupPrintMapNameOnWindow(u16 windowId) ptr = MapNamePopupAppendFloorNum(ptr, gMapHeader.floorNum); maxWidth = gMapHeader.floorNum != 0x7F ? 152 : 176; } - xpos = (maxWidth - GetStringWidth(2, mapName, -1)) / 2; + xpos = (maxWidth - GetStringWidth(FONT_2, mapName, -1)) / 2; FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized(windowId, 2, mapName, xpos, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, mapName, xpos, 2, TEXT_SKIP_DRAW, NULL); } static u8 *MapNamePopupAppendFloorNum(u8 *dest, s8 floorNum) diff --git a/src/map_preview_screen.c b/src/map_preview_screen.c index 100db712a..65b8ba793 100644 --- a/src/map_preview_screen.c +++ b/src/map_preview_screen.c @@ -457,8 +457,8 @@ u16 MapPreview_CreateMapNameWindow(u8 mapsec) color[1] = TEXT_COLOR_RED; // Access violation color[2] = TEXT_COLOR_LIGHT_GRAY; // Access violation GetMapName(gStringVar4, mapsec, 0); - xctr = 104 - GetStringWidth(2, gStringVar4, 0); - AddTextPrinterParameterized4(windowId, 2, xctr / 2, 2, 0, 0, color/* Access violation */, -1, gStringVar4); + xctr = 104 - GetStringWidth(FONT_2, gStringVar4, 0); + AddTextPrinterParameterized4(windowId, FONT_2, xctr / 2, 2, 0, 0, color/* Access violation */, -1, gStringVar4); return windowId; } diff --git a/src/menu.c b/src/menu.c index 328497259..3aedd0574 100644 --- a/src/menu.c +++ b/src/menu.c @@ -192,8 +192,8 @@ void TopBarWindowPrintString(const u8 *string, u8 unused, bool8 copyToVram) { PutWindowTilemap(sTopBarWindowId); FillWindowPixelBuffer(sTopBarWindowId, PIXEL_FILL(15)); - width = GetStringWidth(0, string, 0); - AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, gUnknown_8456618, 0, string); + width = GetStringWidth(FONT_0, string, 0); + AddTextPrinterParameterized3(sTopBarWindowId, FONT_0, -20 - width, 1, gUnknown_8456618, 0, string); if (copyToVram) CopyWindowToVram(sTopBarWindowId, COPYWIN_FULL); } @@ -223,10 +223,10 @@ void TopBarWindowPrintTwoStrings(const u8 *string, const u8 *string2, bool8 fgCo FillWindowPixelBuffer(sTopBarWindowId, PIXEL_FILL(15)); if (string2) { - width = GetStringWidth(0, string2, 0); - AddTextPrinterParameterized3(sTopBarWindowId, 0, -20 - width, 1, color, 0, string2); + width = GetStringWidth(FONT_0, string2, 0); + AddTextPrinterParameterized3(sTopBarWindowId, FONT_0, -20 - width, 1, color, 0, string2); } - AddTextPrinterParameterized4(sTopBarWindowId, 1, 4, 1, 0, 0, color, 0, string); + AddTextPrinterParameterized4(sTopBarWindowId, FONT_1, 4, 1, 0, 0, color, 0, string); if (copyToVram) CopyWindowToVram(sTopBarWindowId, COPYWIN_FULL); } @@ -552,9 +552,9 @@ void CreateYesNoMenu(const struct WindowTemplate *window, u8 fontId, u8 left, u8 } // not used -static void CreateYesNoMenu2(const struct WindowTemplate *window, u8 paletteNum, u16 baseTileNum, u8 initialCursorPos) +static void CreateYesNoMenu2(const struct WindowTemplate *window, u8 fontId, u16 baseTileNum, u8 initialCursorPos) { - CreateYesNoMenu(window, paletteNum, 0, 0, baseTileNum, initialCursorPos, 0); + CreateYesNoMenu(window, fontId, 0, 0, baseTileNum, initialCursorPos, 0); } s8 Menu_ProcessInputNoWrapClearOnChoose(void) diff --git a/src/menu2.c b/src/menu2.c index fdf482fe8..0ee315b55 100644 --- a/src/menu2.c +++ b/src/menu2.c @@ -436,8 +436,8 @@ void AddTextPrinterParameterized3(u8 windowId, u8 fontId, u8 x, u8 y, const u8 * printer.y = y; printer.currentX = printer.x; printer.currentY = printer.y; - printer.letterSpacing = GetFontAttribute(fontId, 2); - printer.lineSpacing = GetFontAttribute(fontId, 3); + printer.letterSpacing = GetFontAttribute(fontId, FONTATTR_LETTER_SPACING); + printer.lineSpacing = GetFontAttribute(fontId, FONTATTR_LINE_SPACING); printer.unk = 0; printer.fgColor = color[1]; printer.bgColor = color[0]; @@ -479,9 +479,9 @@ void AddTextPrinterParameterized5(u8 windowId, u8 fontId, const u8 *str, u8 x, u printer.letterSpacing = letterSpacing; printer.lineSpacing = lineSpacing; printer.unk = 0; - printer.fgColor = GetFontAttribute(fontId, 5); - printer.bgColor = GetFontAttribute(fontId, 6); - printer.shadowColor = GetFontAttribute(fontId, 7); + printer.fgColor = GetFontAttribute(fontId, FONTATTR_COLOR_FOREGROUND); + printer.bgColor = GetFontAttribute(fontId, FONTATTR_COLOR_BACKGROUND); + printer.shadowColor = GetFontAttribute(fontId, FONTATTR_COLOR_SHADOW); AddTextPrinter(&printer, speed, callback); } @@ -495,11 +495,11 @@ void Menu_PrintFormatIntlPlayerName(u8 windowId, const u8 * src, u16 x, u16 y) StringExpandPlaceholders(gStringVar4, src); if (i != 5) { - AddTextPrinterParameterized(windowId, 2, gStringVar4, x, y, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gStringVar4, x, y, 0xFF, NULL); } else { - AddTextPrinterParameterized5(windowId, 2, gStringVar4, x, y, 0xFF, NULL, 0, 0); + AddTextPrinterParameterized5(windowId, FONT_2, gStringVar4, x, y, 0xFF, NULL, 0, 0); } } diff --git a/src/menu_helpers.c b/src/menu_helpers.c index 5e4e39763..9b8bbda21 100644 --- a/src/menu_helpers.c +++ b/src/menu_helpers.c @@ -242,7 +242,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *quantity_p, u16 qmax) u8 GetDialogBoxFontId(void) { if (!ContextNpcGetTextColor()) - return 4; + return FONT_4; else - return 5; + return FONT_5; } diff --git a/src/mevent_show_card.c b/src/mevent_show_card.c index bf2fe23b5..8d3ce4895 100644 --- a/src/mevent_show_card.c +++ b/src/mevent_show_card.c @@ -355,42 +355,42 @@ static void sub_8145D18(u8 whichWindow) case 0: { s32 x; - AddTextPrinterParameterized3(windowId, 3, 0, 1, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->title); - x = 160 - GetStringWidth(3, sMEventScreenData->subtitle, GetFontAttribute(3, 2)); + AddTextPrinterParameterized3(windowId, FONT_3, 0, 1, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->title); + x = 160 - GetStringWidth(FONT_3, sMEventScreenData->subtitle, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING)); if (x < 0) x = 0; - AddTextPrinterParameterized3(windowId, 3, x, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->subtitle); + AddTextPrinterParameterized3(windowId, FONT_3, x, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->subtitle); if (sMEventScreenData->wonderCard.idNumber != 0) { - AddTextPrinterParameterized3(windowId, 2, 166, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->unk_01DD); + AddTextPrinterParameterized3(windowId, FONT_2, 166, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->unk_01DD); } break; } case 1: for (; sp0C < 4; sp0C++) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 * sp0C + 2, gUnknown_8467068[sMEventScreenData->bgSpec->textPal2], 0, sMEventScreenData->mainMessageLines[sp0C]); + AddTextPrinterParameterized3(windowId, FONT_3, 0, 16 * sp0C + 2, gUnknown_8467068[sMEventScreenData->bgSpec->textPal2], 0, sMEventScreenData->mainMessageLines[sp0C]); } break; case 2: - AddTextPrinterParameterized3(windowId, 3, 0, sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine1); + AddTextPrinterParameterized3(windowId, FONT_3, 0, sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine1); if (sMEventScreenData->wonderCard.type != 2) { - AddTextPrinterParameterized3(windowId, 3, 0, 16 + sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine2); + AddTextPrinterParameterized3(windowId, FONT_3, 0, 16 + sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine2); } else { s32 x = 0; s32 y = sTextYCoords[sMEventScreenData->wonderCard.type] + 16; - s32 spacing = GetFontAttribute(3, 2); + s32 spacing = GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING); for (; sp0C < sMEventScreenData->recordIdx; sp0C++) { - AddTextPrinterParameterized3(windowId, 3, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].nameTxt); + AddTextPrinterParameterized3(windowId, FONT_3, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].nameTxt); if (sMEventScreenData->recordStrings[sp0C].numberTxt[0] != EOS) { - x += GetStringWidth(3, sMEventScreenData->recordStrings[sp0C].nameTxt, spacing); - AddTextPrinterParameterized3(windowId, 2, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].numberTxt); - x += GetStringWidth(3, sMEventScreenData->recordStrings[sp0C].numberTxt, spacing) + sMEventScreenData->recordStrings[sp0C].nDigits; + x += GetStringWidth(FONT_3, sMEventScreenData->recordStrings[sp0C].nameTxt, spacing); + AddTextPrinterParameterized3(windowId, FONT_2, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].numberTxt); + x += GetStringWidth(FONT_3, sMEventScreenData->recordStrings[sp0C].numberTxt, spacing) + sMEventScreenData->recordStrings[sp0C].nDigits; } } } diff --git a/src/mevent_show_news.c b/src/mevent_show_news.c index e874a93c2..088f00f11 100644 --- a/src/mevent_show_news.c +++ b/src/mevent_show_news.c @@ -318,13 +318,13 @@ static void sub_8146A30(void) PutWindowTilemap(sWork->windowIds[1]); FillWindowPixelBuffer(sWork->windowIds[0], 0); FillWindowPixelBuffer(sWork->windowIds[1], 0); - x = (0xe0 - GetStringWidth(3, sWork->title, GetFontAttribute(3, 2))) / 2; + x = (0xe0 - GetStringWidth(FONT_3, sWork->title, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING))) / 2; if (x < 0) x = 0; - AddTextPrinterParameterized3(sWork->windowIds[0], 3, x, 6, sTextPals[sWork->bgSpec->textPal1], 0, sWork->title); + AddTextPrinterParameterized3(sWork->windowIds[0], FONT_3, x, 6, sTextPals[sWork->bgSpec->textPal1], 0, sWork->title); for (; i < 10; ++i) { - AddTextPrinterParameterized3(sWork->windowIds[1], 3, 0, 16 * i + 2, sTextPals[sWork->bgSpec->textPal2], 0, sWork->messages[i]); + AddTextPrinterParameterized3(sWork->windowIds[1], FONT_3, 0, 16 * i + 2, sTextPals[sWork->bgSpec->textPal2], 0, sWork->messages[i]); } CopyWindowToVram(sWork->windowIds[0], COPYWIN_FULL); CopyWindowToVram(sWork->windowIds[1], COPYWIN_FULL); diff --git a/src/money.c b/src/money.c index 2fb151709..cff3d8d46 100644 --- a/src/money.c +++ b/src/money.c @@ -84,7 +84,7 @@ void PrintMoneyAmountInMoneyBox(u8 windowId, int amount, u8 speed) *(txtPtr++) = 0; StringExpandPlaceholders(txtPtr, gText_PokedollarVar1); - AddTextPrinterParameterized(windowId, 0, gStringVar4, 64 - GetStringWidth(0, gStringVar4, 0), 0xC, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, 64 - GetStringWidth(FONT_0, gStringVar4, 0), 0xC, speed, NULL); } void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) @@ -101,13 +101,13 @@ void PrintMoneyAmount(u8 windowId, u8 x, u8 y, int amount, u8 speed) *(txtPtr++) = 0; StringExpandPlaceholders(txtPtr, gText_PokedollarVar1); - AddTextPrinterParameterized(windowId, 0, gStringVar4, x, y, speed, NULL); + AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, x, y, speed, NULL); } void PrintMoneyAmountInMoneyBoxWithBorder(u8 windowId, u16 tileStart, u8 pallete, int amount) { DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, pallete); - AddTextPrinterParameterized(windowId, 2, gText_TrainerCardMoney, 0, 0, 0xFF, 0); + AddTextPrinterParameterized(windowId, FONT_2, gText_TrainerCardMoney, 0, 0, 0xFF, 0); PrintMoneyAmountInMoneyBox(windowId, amount, 0); } diff --git a/src/mystery_gift_menu.c b/src/mystery_gift_menu.c index 4db94d60a..8ed6e80d4 100644 --- a/src/mystery_gift_menu.c +++ b/src/mystery_gift_menu.c @@ -221,7 +221,7 @@ const struct ListMenuTemplate sListMenuTemplate_ThreeOptions = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -266,7 +266,7 @@ const struct ListMenuTemplate sListMenu_ReceiveSendToss = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -287,7 +287,7 @@ const struct ListMenuTemplate sListMenu_ReceiveToss = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -308,7 +308,7 @@ const struct ListMenuTemplate sListMenu_ReceiveSend = { .lettersSpacing = 0, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -329,7 +329,7 @@ const struct ListMenuTemplate sListMenu_Receive = { .lettersSpacing = 0, .itemVerticalPadding = 2, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -469,14 +469,14 @@ void PrintMysteryGiftOrEReaderTopMenu(bool8 mg_or_ereader, bool32 usePickOkCance if (!mg_or_ereader) { src = usePickOkCancel == TRUE ? gText_PickOKExit : gText_PickOKCancel; - AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gText_MysteryGift2); - width = 222 - GetStringWidth(0, src, 0); - AddTextPrinterParameterized4(0, 0, width, 2, 0, 0, sMG_Ereader_TextColor_1, 0, src); + AddTextPrinterParameterized4(0, FONT_2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gText_MysteryGift2); + width = 222 - GetStringWidth(FONT_0, src, 0); + AddTextPrinterParameterized4(0, FONT_0, width, 2, 0, 0, sMG_Ereader_TextColor_1, 0, src); } else { - AddTextPrinterParameterized4(0, 2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_MysteryGift); - AddTextPrinterParameterized4(0, 0, 0x78, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_DecideStop); + AddTextPrinterParameterized4(0, FONT_2, 2, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_MysteryGift); + AddTextPrinterParameterized4(0, FONT_0, 0x78, 2, 0, 0, sMG_Ereader_TextColor_1, 0, gJPText_DecideStop); } CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(0); @@ -527,7 +527,7 @@ void AddTextPrinterToWindow1(const u8 *str) { StringExpandPlaceholders(gStringVar4, str); FillWindowPixelBuffer(1, 0x11); - AddTextPrinterParameterized4(1, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(1, FONT_2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(1, 0x001, 0xF); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); @@ -634,7 +634,7 @@ u32 MysteryGift_HandleThreeOptionMenu(u8 * unused0, u16 * unused1, u8 whichMenu) width = 0; for (i = 0; i < listMenuTemplate.totalItems; i++) { - u32 curWidth = GetStringWidth(2, listMenuTemplate.items[i].label, listMenuTemplate.lettersSpacing); + u32 curWidth = GetStringWidth(FONT_2, listMenuTemplate.items[i].label, listMenuTemplate.lettersSpacing); if (curWidth > width) width = curWidth; } @@ -668,7 +668,7 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 *windowId = AddWindow(&sWindowTemplate_PromptYesOrNo_Width20); } FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(*windowId, FONT_2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); CopyWindowToVram(*windowId, COPYWIN_GFX); PutWindowTilemap(*windowId); @@ -684,7 +684,7 @@ s8 mevent_message_print_and_prompt_yes_no(u8 * textState, u16 * windowId, bool8 { windowTemplate.tilemapTop = 15; } - CreateYesNoMenu(&windowTemplate, 2, 0, 2, 10, 14, 0); + CreateYesNoMenu(&windowTemplate, FONT_2, 0, 2, 10, 14, 0); (*textState)++; break; case 2: @@ -729,7 +729,7 @@ s32 HandleMysteryGiftListMenu(u8 * textState, u16 * windowId, bool32 cannotToss, } *windowId = AddWindow(&sMysteryGiftMenuWindowTemplate); FillWindowPixelBuffer(*windowId, 0x11); - AddTextPrinterParameterized4(*windowId, 2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); + AddTextPrinterParameterized4(*windowId, FONT_2, 0, 2, 0, 2, sMG_Ereader_TextColor_2, 0, gStringVar4); DrawTextBorderOuter(*windowId, 0x001, 0x0F); CopyWindowToVram(*windowId, COPYWIN_GFX); PutWindowTilemap(*windowId); diff --git a/src/naming_screen.c b/src/naming_screen.c index b7d1d7d8f..1749e33e9 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -706,7 +706,7 @@ static void pokemon_transfer_to_pc_with_message(void) StringExpandPlaceholders(gStringVar4, sTransferredToPCMessages[stringToDisplay]); DrawDialogueFrame(0, FALSE); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); } @@ -1604,7 +1604,7 @@ static void HandleDpadMovement(struct Task *task) static void PrintTitleFunction_NoMon(void) { FillWindowPixelBuffer(sNamingScreenData->windows[3], PIXEL_FILL(1)); - AddTextPrinterParameterized(sNamingScreenData->windows[3], 1, sNamingScreenData->template->title, 1, 1, 0, NULL); + AddTextPrinterParameterized(sNamingScreenData->windows[3], FONT_1, sNamingScreenData->template->title, 1, 1, 0, NULL); PutWindowTilemap(sNamingScreenData->windows[3]); } @@ -1615,7 +1615,7 @@ static void PrintTitleFunction_WithMon(void) StringCopy(buffer, gSpeciesNames[sNamingScreenData->monSpecies]); StringAppendN(buffer, sNamingScreenData->template->title, 15); FillWindowPixelBuffer(sNamingScreenData->windows[3], PIXEL_FILL(1)); - AddTextPrinterParameterized(sNamingScreenData->windows[3], 1, buffer, 1, 1, 0, NULL); + AddTextPrinterParameterized(sNamingScreenData->windows[3], FONT_1, buffer, 1, 1, 0, NULL); PutWindowTilemap(sNamingScreenData->windows[3]); } @@ -1666,7 +1666,7 @@ static void AddGenderIconFunc_Yes(void) StringCopy(genderSymbol, gText_FemaleSymbol); gender = FEMALE; } - AddTextPrinterParameterized3(sNamingScreenData->windows[2], 2, 0x68, 1, sGenderColors[gender], TEXT_SKIP_DRAW, genderSymbol); + AddTextPrinterParameterized3(sNamingScreenData->windows[2], FONT_2, 0x68, 1, sGenderColors[gender], TEXT_SKIP_DRAW, genderSymbol); } } @@ -1799,7 +1799,7 @@ static void PrintBufferCharactersOnScreen(void) temp[1] = gExpandedPlaceholder_Empty[0]; xoff = (IsLetter(temp[0]) == TRUE) ? 2 : 0; - AddTextPrinterParameterized(sNamingScreenData->windows[2], 2, temp, i * 8 + xpos + xoff, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sNamingScreenData->windows[2], FONT_2, temp, i * 8 + xpos + xoff, 1, TEXT_SKIP_DRAW, NULL); } CallAddGenderIconFunc(); @@ -1840,7 +1840,7 @@ static void sub_809F9E8(u8 window, u8 page) for (i = 0; i < KBROW_COUNT; i++) { - AddTextPrinterParameterized3(window, 1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); + AddTextPrinterParameterized3(window, FONT_1, 0, i * 16 + 1, sKeyboardTextColors[page], 0, sNamingScreenKeyboardText[page][i]); } PutWindowTilemap(window); @@ -1881,10 +1881,10 @@ static void sub_809FA60(void) static void sub_809FAE4(void) { const u8 color[3] = { TEXT_DYNAMIC_COLOR_6, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY }; - int strwidth = GetStringWidth(0, gText_MoveOkBack, 0); + int strwidth = GetStringWidth(FONT_0, gText_MoveOkBack, 0); FillWindowPixelBuffer(sNamingScreenData->windows[4], PIXEL_FILL(15)); - AddTextPrinterParameterized3(sNamingScreenData->windows[4], 0, 236 - strwidth, 0, color, 0, gText_MoveOkBack); + AddTextPrinterParameterized3(sNamingScreenData->windows[4], FONT_0, 236 - strwidth, 0, color, 0, gText_MoveOkBack); PutWindowTilemap(sNamingScreenData->windows[4]); CopyWindowToVram(sNamingScreenData->windows[4], COPYWIN_FULL); } diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 0dfeffa46..39b86e132 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -431,23 +431,23 @@ void AddTextPrinterDiffStyle(bool8 allowSkippingDelayWithButtonPress) gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; result = ContextNpcGetTextColor(); if (result == 0) - AddTextPrinterParameterized2(0, 4, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_4, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_BLUE, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else if (result == 1) - AddTextPrinterParameterized2(0, 5, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_5, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_RED, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); else - AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), nptr, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void AddTextPrinterForMessage(bool8 allowSkippingDelayWithButtonPress) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void AddTextPrinterWithCustomSpeedForMessage(bool8 allowSkippingDelayWithButtonPress, u8 speed) { gTextFlags.canABSpeedUpPrint = allowSkippingDelayWithButtonPress; - AddTextPrinterParameterized2(0, 2, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } void LoadStdWindowFrameGfx(void) @@ -640,21 +640,21 @@ static u16 GetStdPalColor(u8 colorNum) return gTMCaseMainWindowPalette[colorNum]; } -void DisplayItemMessageOnField(u8 taskId, u8 textSpeed, const u8 *string, TaskFunc callback) +void DisplayItemMessageOnField(u8 taskId, u8 fontId, const u8 *string, TaskFunc callback) { LoadStdWindowFrameGfx(); - DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, textSpeed, GetTextSpeedSetting(), string, callback); + DisplayMessageAndContinueTask(taskId, 0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM, fontId, GetTextSpeedSetting(), string, callback); CopyWindowToVram(0, COPYWIN_FULL); } void DisplayYesNoMenuDefaultYes(void) { - CreateYesNoMenu(&sYesNo_WindowTemplate, 2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0); + CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 0); } void DisplayYesNoMenuDefaultNo(void) { - CreateYesNoMenu(&sYesNo_WindowTemplate, 2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 1); + CreateYesNoMenu(&sYesNo_WindowTemplate, FONT_2, 0, 2, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM, 1); } u8 GetTextSpeedSetting(void) diff --git a/src/oak_speech.c b/src/oak_speech.c index 4d0d23841..9dd2d5175 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -593,7 +593,7 @@ static void CreateHelpDocsPage1(void) sOakSpeechResources->unk_0014[0] = AddWindow(sHelpDocsWindowTemplatePtrs[sOakSpeechResources->unk_0012]); PutWindowTilemap(sOakSpeechResources->unk_0014[0]); FillWindowPixelBuffer(sOakSpeechResources->unk_0014[0], 0x00); - AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[0], 2, 2, 0, 1, 1, sTextColor_HelpSystem, 0, gNewGame_HelpDocs1); + AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[0], FONT_2, 2, 0, 1, 1, sTextColor_HelpSystem, 0, gNewGame_HelpDocs1); CopyWindowToVram(sOakSpeechResources->unk_0014[0], COPYWIN_FULL); FillBgTilemapBufferRect_Palette0(1, 0x3000, 1, 3, 5, 16); CopyBgTilemapBufferToVram(1); @@ -615,7 +615,7 @@ static void Task_OakSpeech4(u8 taskId) sOakSpeechResources->unk_0014[i] = AddWindow(&sHelpDocsWindowTemplatePtrs[sOakSpeechResources->unk_0012][i]); PutWindowTilemap(sOakSpeechResources->unk_0014[i]); FillWindowPixelBuffer(sOakSpeechResources->unk_0014[i], 0x00); - AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[i], 2, 6, 0, 1, 1, sTextColor_HelpSystem, 0, sHelpDocsPtrs[i + r7 * 3]); + AddTextPrinterParameterized4(sOakSpeechResources->unk_0014[i], FONT_2, 6, 0, 1, 1, sTextColor_HelpSystem, 0, sHelpDocsPtrs[i + r7 * 3]); CopyWindowToVram(sOakSpeechResources->unk_0014[i], COPYWIN_FULL); } @@ -747,7 +747,7 @@ static void Task_OakSpeech6(u8 taskId) sOakSpeechResources->unk_0012 = 0; gMain.state = 0; data[15] = 16; - AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[0]); + AddTextPrinterParameterized4(data[14], FONT_2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[0]); data[5] = CreateTextCursorSpriteForOakSpeech(0, 0xe2, 0x91, 0, 0); gSprites[data[5]].oam.objMode = ST_OAM_OBJ_BLEND; gSprites[data[5]].oam.priority = 0; @@ -807,7 +807,7 @@ static void Task_OakSpeech7(u8 taskId) if (data[15] <= 0) { FillWindowPixelBuffer(data[14], 0x00); - AddTextPrinterParameterized4(data[14], 2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[sOakSpeechResources->unk_0012]); + AddTextPrinterParameterized4(data[14], FONT_2, 3, 5, 1, 0, sTextColor_OakSpeech, 0, sNewGameAdventureIntroTextPointers[sOakSpeechResources->unk_0012]); if (sOakSpeechResources->unk_0012 == 0) { ClearTopBarWindow(); @@ -906,11 +906,11 @@ static void Task_OakSpeech9(u8 taskId) if (str != gStringVar4) \ { \ StringExpandPlaceholders(gStringVar4, str); \ - AddTextPrinterParameterized2(0, 4, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ + AddTextPrinterParameterized2(0, FONT_4, gStringVar4, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ } \ else \ { \ - AddTextPrinterParameterized2(0, 4, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ + AddTextPrinterParameterized2(0, FONT_4, str, speed, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); \ } \ CopyWindowToVram(0, COPYWIN_FULL); \ }) @@ -1076,12 +1076,12 @@ static void Task_OakSpeech19(u8 taskId) sOakSpeechResources->textColor[0] = 1; sOakSpeechResources->textColor[1] = 2; sOakSpeechResources->textColor[2] = 3; - AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 1, sOakSpeechResources->textColor, 0, gText_Boy); + AddTextPrinterParameterized3(gTasks[taskId].data[13], FONT_2, 8, 1, sOakSpeechResources->textColor, 0, gText_Boy); sOakSpeechResources->textColor[0] = 1; sOakSpeechResources->textColor[1] = 2; sOakSpeechResources->textColor[2] = 3; - AddTextPrinterParameterized3(gTasks[taskId].data[13], 2, 8, 17, sOakSpeechResources->textColor, 0, gText_Girl); - Menu_InitCursor(gTasks[taskId].data[13], 2, 0, 1, GetFontAttribute(2, 1) + 2, 2, 0); + AddTextPrinterParameterized3(gTasks[taskId].data[13], FONT_2, 8, 17, sOakSpeechResources->textColor, 0, gText_Girl); + Menu_InitCursor(gTasks[taskId].data[13], FONT_2, 0, 1, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, 2, 0); CopyWindowToVram(gTasks[taskId].data[13], COPYWIN_FULL); gTasks[taskId].func = Task_OakSpeech20; } @@ -1263,7 +1263,7 @@ static void Task_OakSpeech26(u8 taskId) data[3]--; else { - CreateYesNoMenu(&sNewGameAdventureIntroWindowTemplates[2], 2, 0, 2, GetStdWindowBaseTileNum(), 14, 0); + CreateYesNoMenu(&sNewGameAdventureIntroWindowTemplates[2], FONT_2, 0, 2, GetStdWindowBaseTileNum(), 14, 0); gTasks[taskId].func = Task_OakSpeech27; } } @@ -1871,16 +1871,16 @@ static void PrintNameChoiceOptions(u8 taskId, u8 hasPlayerBeenNamed) PutWindowTilemap(data[13]); DrawStdFrameWithCustomTileAndPalette(data[13], 1, GetStdWindowBaseTileNum(), 14); FillWindowPixelBuffer(gTasks[taskId].data[13], 0x11); - AddTextPrinterParameterized(data[13], 2, gOtherText_NewName, 8, 1, 0, NULL); + AddTextPrinterParameterized(data[13], FONT_2, gOtherText_NewName, 8, 1, 0, NULL); if (hasPlayerBeenNamed == FALSE) textPtrs = gSaveBlock2Ptr->playerGender == MALE ? sMaleNameChoices : sFemaleNameChoices; else textPtrs = sRivalNameChoices; for (i = 0; i < 4; i++) { - AddTextPrinterParameterized(data[13], 2, textPtrs[i], 8, 16 * (i + 1) + 1, 0, NULL); + AddTextPrinterParameterized(data[13], FONT_2, textPtrs[i], 8, 16 * (i + 1) + 1, 0, NULL); } - Menu_InitCursor(data[13], 2, 0, 1, 16, 5, 0); + Menu_InitCursor(data[13], FONT_2, 0, 1, 16, 5, 0); CopyWindowToVram(data[13], COPYWIN_FULL); } diff --git a/src/option_menu.c b/src/option_menu.c index 42002795d..477178ada 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -316,9 +316,9 @@ static void InitOptionMenuBg(void) static void OptionMenu_PickSwitchCancel(void) { s32 x; - x = 0xE4 - GetStringWidth(0, gText_PickSwitchCancel, 0); + x = 0xE4 - GetStringWidth(FONT_0, gText_PickSwitchCancel, 0); FillWindowPixelBuffer(2, PIXEL_FILL(15)); - AddTextPrinterParameterized3(2, 0, x, 0, sOptionMenuPickSwitchCancelTextColor, 0, gText_PickSwitchCancel); + AddTextPrinterParameterized3(2, FONT_0, x, 0, sOptionMenuPickSwitchCancelTextColor, 0, gText_PickSwitchCancel); PutWindowTilemap(2); CopyWindowToVram(2, COPYWIN_FULL); } @@ -472,31 +472,31 @@ static void BufferOptionMenuString(u8 selection) memcpy(dst, sOptionMenuTextColor, 3); x = 0x82; - y = ((GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT) - 1) * selection) + 2; - FillWindowPixelRect(1, 1, x, y, 0x46, GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT)); + y = ((GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) - 1) * selection) + 2; + FillWindowPixelRect(1, 1, x, y, 0x46, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); switch (selection) { case MENUITEM_TEXTSPEED: - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, sTextSpeedOptions[sOptionMenuPtr->option[selection]]); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, sTextSpeedOptions[sOptionMenuPtr->option[selection]]); break; case MENUITEM_BATTLESCENE: - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, sBattleSceneOptions[sOptionMenuPtr->option[selection]]); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, sBattleSceneOptions[sOptionMenuPtr->option[selection]]); break; case MENUITEM_BATTLESTYLE: - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, sBattleStyleOptions[sOptionMenuPtr->option[selection]]); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, sBattleStyleOptions[sOptionMenuPtr->option[selection]]); break; case MENUITEM_SOUND: - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, sSoundOptions[sOptionMenuPtr->option[selection]]); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, sSoundOptions[sOptionMenuPtr->option[selection]]); break; case MENUITEM_BUTTONMODE: - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, sButtonTypeOptions[sOptionMenuPtr->option[selection]]); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, sButtonTypeOptions[sOptionMenuPtr->option[selection]]); break; case MENUITEM_FRAMETYPE: StringCopy(str, gText_FrameType); ConvertIntToDecimalStringN(buf, sOptionMenuPtr->option[selection] + 1, 1, 2); StringAppendN(str, buf, 3); - AddTextPrinterParameterized3(1, 2, x, y, dst, -1, str); + AddTextPrinterParameterized3(1, FONT_2, x, y, dst, -1, str); break; default: break; @@ -524,7 +524,7 @@ static void CloseAndSaveOptionMenu(u8 taskId) static void PrintOptionMenuHeader(void) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(WIN_TEXT_OPTION, 2, gText_MenuOption, 8, 1, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_TEXT_OPTION, FONT_2, gText_MenuOption, 8, 1, TEXT_SKIP_DRAW, NULL); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); } @@ -560,7 +560,7 @@ static void LoadOptionMenuItemNames(void) FillWindowPixelBuffer(1, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) { - AddTextPrinterParameterized(WIN_OPTIONS, 2, sOptionMenuItemsNames[i], 8, (u8)((i * (GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT))) + 2) - i, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(WIN_OPTIONS, FONT_2, sOptionMenuItemsNames[i], 8, (u8)((i * (GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT))) + 2) - i, TEXT_SKIP_DRAW, NULL); } } @@ -568,7 +568,7 @@ static void UpdateSettingSelectionDisplay(u16 selection) { u16 maxLetterHeight, y; - maxLetterHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + maxLetterHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT); y = selection * (maxLetterHeight - 1) + 0x3A; SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(y, y + maxLetterHeight)); SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0x10, 0xE0)); diff --git a/src/party_menu.c b/src/party_menu.c index d1679b695..ee2800801 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2160,7 +2160,7 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) { confirmWindowId = AddWindow(&sConfirmButtonWindowTemplate); FillWindowPixelBuffer(confirmWindowId, PIXEL_FILL(0)); - AddTextPrinterParameterized4(confirmWindowId, 0, (48 - GetStringWidth(0, gMenuText_Confirm, 0)) / 2u, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); + AddTextPrinterParameterized4(confirmWindowId, FONT_0, (48 - GetStringWidth(FONT_0, gMenuText_Confirm, 0)) / 2u, 1, 0, 0, sFontColorTable[0], -1, gMenuText_Confirm); PutWindowTilemap(confirmWindowId); CopyWindowToVram(confirmWindowId, COPYWIN_GFX); cancelWindowId = AddWindow(&sMultiCancelButtonWindowTemplate); @@ -2175,13 +2175,13 @@ static void CreateCancelConfirmWindows(bool8 chooseHalf) // Branches are functionally identical. Second branch is never reached, Spin Trade wasnt fully implemented if (gPartyMenu.menuType != PARTY_MENU_TYPE_SPIN_TRADE) { - offset += (48 - GetStringWidth(0, gFameCheckerText_Cancel, 0)) / 2; - AddTextPrinterParameterized3(cancelWindowId, 0, offset, 1, sFontColorTable[0], -1, gFameCheckerText_Cancel); + offset += (48 - GetStringWidth(FONT_0, gFameCheckerText_Cancel, 0)) / 2; + AddTextPrinterParameterized3(cancelWindowId, FONT_0, offset, 1, sFontColorTable[0], -1, gFameCheckerText_Cancel); } else { - offset += (48 - GetStringWidth(0, gOtherText_Exit, 0)) / 2; - AddTextPrinterParameterized3(cancelWindowId, 0, offset, 1, sFontColorTable[0], -1, gOtherText_Exit); + offset += (48 - GetStringWidth(FONT_0, gOtherText_Exit, 0)) / 2; + AddTextPrinterParameterized3(cancelWindowId, FONT_0, offset, 1, sFontColorTable[0], -1, gOtherText_Exit); } PutWindowTilemap(cancelWindowId); CopyWindowToVram(cancelWindowId, COPYWIN_GFX); @@ -2322,7 +2322,7 @@ static void LoadPartyBoxPalette(struct PartyMenuBox *menuBox, u8 palFlags) static void DisplayPartyPokemonBarDetail(u8 windowId, const u8 *str, u8 color, const u8 *align) { - AddTextPrinterParameterized3(windowId, 0, align[0], align[1], sFontColorTable[color], 0, str); + AddTextPrinterParameterized3(windowId, FONT_0, align[0], align[1], sFontColorTable[color], 0, str); } static void DisplayPartyPokemonNickname(struct Pokemon *mon, struct PartyMenuBox *menuBox, u8 c) @@ -2478,7 +2478,7 @@ static void DisplayPartyPokemonDescriptionText(u8 stringId, struct PartyMenuBox if (c != 0) menuBox->infoRects->blitFunc(menuBox->windowId, menuBox->infoRects->descTextLeft >> 3, menuBox->infoRects->descTextTop >> 3, menuBox->infoRects->descTextWidth >> 3, menuBox->infoRects->descTextHeight >> 3, TRUE); if (c != 2) - AddTextPrinterParameterized3(menuBox->windowId, 1, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringId]); + AddTextPrinterParameterized3(menuBox->windowId, FONT_1, menuBox->infoRects->descTextLeft, menuBox->infoRects->descTextTop, sFontColorTable[0], 0, sDescriptionStringTable[stringId]); } static void PartyMenuRemoveWindow(u8 *ptr) @@ -2530,7 +2530,7 @@ void DisplayPartyMenuStdMessage(u32 stringId) } DrawStdFrameWithCustomTileAndPalette(*windowPtr, FALSE, 0x58, 0xF); StringExpandPlaceholders(gStringVar4, sActionStringTable[stringId]); - AddTextPrinterParameterized(*windowPtr, 2, gStringVar4, 0, 2, 0, 0); + AddTextPrinterParameterized(*windowPtr, FONT_2, gStringVar4, 0, 2, 0, 0); ScheduleBgCopyTilemapToVram(2); } } @@ -2579,15 +2579,15 @@ static u8 DisplaySelectionWindow(u8 windowType) DrawStdFrameWithCustomTileAndPalette(sPartyMenuInternal->windowId[0], FALSE, 0x4F, 13); if (windowType == SELECTWINDOW_MOVES) return sPartyMenuInternal->windowId[0]; - cursorDimension = GetMenuCursorDimensionByFont(2, 0); - fontAttribute = GetFontAttribute(2, FONTATTR_LETTER_SPACING); + cursorDimension = GetMenuCursorDimensionByFont(FONT_2, 0); + fontAttribute = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING); for (i = 0; i < sPartyMenuInternal->numActions; ++i) { u8 fontColorsId = (sPartyMenuInternal->actions[i] >= MENU_FIELD_MOVES) ? 4 : 3; - AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], 2, cursorDimension, (i * 16) + 2, fontAttribute, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); + AddTextPrinterParameterized4(sPartyMenuInternal->windowId[0], FONT_2, cursorDimension, (i * 16) + 2, fontAttribute, 0, sFontColorTable[fontColorsId], 0, sCursorOptions[sPartyMenuInternal->actions[i]].text); } - Menu_InitCursorInternal(sPartyMenuInternal->windowId[0], 2, 0, 2, 16, sPartyMenuInternal->numActions, 0, 1); + Menu_InitCursorInternal(sPartyMenuInternal->windowId[0], FONT_2, 0, 2, 16, sPartyMenuInternal->numActions, 0, 1); ScheduleBgCopyTilemapToVram(2); return sPartyMenuInternal->windowId[0]; } @@ -2596,12 +2596,12 @@ static void PartyMenuPrintText(const u8 *text) { DrawStdFrameWithCustomTileAndPalette(6, FALSE, 0x4F, 13); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(6, 2, text, GetTextSpeedSetting(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(6, FONT_2, text, GetTextSpeedSetting(), 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void PartyMenuDisplayYesNoMenu(void) { - CreateYesNoMenu(&sPartyMenuYesNoWindowTemplate, 2, 0, 2, 0x4F, 13, 0); + CreateYesNoMenu(&sPartyMenuYesNoWindowTemplate, FONT_2, 0, 2, 0x4F, 13, 0); } static u8 CreateLevelUpStatsWindow(void) @@ -2621,7 +2621,7 @@ static void PartyMenu_Oak_PrintText(u8 windowId, const u8 *str) { StringExpandPlaceholders(gStringVar4, str); gTextFlags.canABSpeedUpPrint = TRUE; - AddTextPrinterParameterized2(windowId, 4, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(windowId, FONT_4, gStringVar4, GetTextSpeedSetting(), NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static bool8 FirstBattleEnterParty_CreateWindowAndMsg1Printer(void) @@ -2662,8 +2662,8 @@ static void sub_8122138(u8 action) if (ptr->windowId[2] == 0xFF) ptr->windowId[2] = AddWindow(&gUnknown_845A178); sub_8112F18(ptr->windowId[2]); - attr = GetFontAttribute(2, FONTATTR_LETTER_SPACING); - AddTextPrinterParameterized4(ptr->windowId[2], 2, 3, 6, attr, 0, sFontColorTable[5], 0, sHMDescriptionTable[action - MENU_FIELD_MOVES]); + attr = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING); + AddTextPrinterParameterized4(ptr->windowId[2], FONT_2, 3, 6, attr, 0, sFontColorTable[5], 0, sHMDescriptionTable[action - MENU_FIELD_MOVES]); PutWindowTilemap(ptr->windowId[2]); ScheduleBgCopyTilemapToVram(2); } @@ -4584,7 +4584,7 @@ static void ShowMoveSelectWindow(u8 slot) { u8 i; u8 moveCount = 0; - u8 fontId = 2; + u8 fontId = FONT_2; u8 windowId = DisplaySelectionWindow(SELECTWINDOW_MOVES); u16 move; diff --git a/src/player_pc.c b/src/player_pc.c index 3f5b4dbe6..a150828b3 100644 --- a/src/player_pc.c +++ b/src/player_pc.c @@ -157,7 +157,7 @@ void BedroomPC(void) sItemOrder = gUnknown_8402200; sTopMenuItemCount = 3; taskId = CreateTask(TaskDummy, 0); - DisplayItemMessageOnField(taskId, 2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); } void PlayerPC(void) @@ -169,7 +169,7 @@ void PlayerPC(void) sItemOrder = gUnknown_8402203; sTopMenuItemCount = 3; taskId = CreateTask(TaskDummy, 0); - DisplayItemMessageOnField(taskId, 2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); } static void Task_DrawPlayerPcTopMenu(u8 taskId) @@ -180,8 +180,8 @@ static void Task_DrawPlayerPcTopMenu(u8 taskId) else tWindowId = AddWindow(&sWindowTemplate_TopMenu_4Items); SetStdWindowBorderStyle(tWindowId, 0); - AddItemMenuActionTextPrinters(tWindowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, GetFontAttribute(2, FONTATTR_LETTER_SPACING), 16, sTopMenuItemCount, sMenuActions_TopMenu, sItemOrder); - Menu_InitCursor(tWindowId, 2, 0, 2, 16, sTopMenuItemCount, 0); + AddItemMenuActionTextPrinters(tWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING), 16, sTopMenuItemCount, sMenuActions_TopMenu, sItemOrder); + Menu_InitCursor(tWindowId, FONT_2, 0, 2, 16, sTopMenuItemCount, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Task_TopMenuHandleInput; } @@ -215,7 +215,7 @@ static void Task_TopMenuHandleInput(u8 taskId) static void Task_ReturnToTopMenu(u8 taskId) { RestoreHelpContext(); - DisplayItemMessageOnField(taskId, 2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu); } static void Task_PlayerPcItemStorage(u8 taskId) @@ -229,7 +229,7 @@ static void Task_PlayerPcMailbox(u8 taskId) gPlayerPcMenuManager.count = CountPCMail(); if (gPlayerPcMenuManager.count == 0) { - DisplayItemMessageOnField(taskId, 2, gText_TheresNoMailHere, Task_ReturnToTopMenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_TheresNoMailHere, Task_ReturnToTopMenu); } else { @@ -249,7 +249,7 @@ static void Task_PlayerPcMailbox(u8 taskId) } else { - DisplayItemMessageOnField(taskId, 2, gText_TheresNoMailHere, Task_ReturnToTopMenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_TheresNoMailHere, Task_ReturnToTopMenu); } } } @@ -272,8 +272,8 @@ static void Task_CreateItemStorageSubmenu(u8 taskId, u8 cursorPos) SetHelpContext(HELPCONTEXT_PLAYERS_PC_ITEMS); tWindowId = AddWindow(&sWindowTemplate_ItemStorageSubmenu); SetStdWindowBorderStyle(tWindowId, FALSE); - PrintTextArray(tWindowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, 3, sMenuActions_ItemPc); - Menu_InitCursor(tWindowId, 2, 0, 2, 16, 3, cursorPos); + PrintTextArray(tWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 16, 3, sMenuActions_ItemPc); + Menu_InitCursor(tWindowId, FONT_2, 0, 2, 16, 3, cursorPos); ScheduleBgCopyTilemapToVram(0); PrintStringOnWindow0WithDialogueFrame(sItemStorageActionDescriptionPtrs[cursorPos]); } @@ -281,7 +281,7 @@ static void Task_CreateItemStorageSubmenu(u8 taskId, u8 cursorPos) static void PrintStringOnWindow0WithDialogueFrame(const u8 *str) { DrawDialogueFrame(0, FALSE); - AddTextPrinterParameterized(0, 2, str, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_2, str, 0, 1, 0, NULL); } static void Task_TopMenu_ItemStorageSubmenu_HandleInput(u8 taskId) @@ -364,7 +364,7 @@ static void Task_PlayerPcWithdrawItem(u8 taskId) ClearStdWindowAndFrameToTransparent(tWindowId, FALSE); ClearWindowTilemap(tWindowId); RemoveWindow(tWindowId); - DisplayItemMessageOnField(taskId, 2, gText_ThereAreNoItems, Task_PlayerPcItemStorage); + DisplayItemMessageOnField(taskId, FONT_2, gText_ThereAreNoItems, Task_PlayerPcItemStorage); } } @@ -453,9 +453,9 @@ static void PCMailCompaction(void) static void Task_DrawMailboxPcMenu(u8 taskId) { u8 windowId = MailboxPC_GetAddWindow(0); - s32 width = GetStringWidth(2, gText_Mailbox, 0); + s32 width = GetStringWidth(FONT_2, gText_Mailbox, 0); MailboxPC_GetAddWindow(1); - AddTextPrinterParameterized(windowId, 2, gText_Mailbox, (80 - width) / 2, 2, 0, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_Mailbox, (80 - width) / 2, 2, 0, NULL); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].tListMenuTaskId = MailboxPC_InitListMenu(&gPlayerPcMenuManager); MailboxPC_AddScrollIndicatorArrows(&gPlayerPcMenuManager); @@ -512,7 +512,7 @@ static void Task_PrintWhatToDoWithSelectedMail(u8 taskId) ConvertInternationalString(gStringVar1, LANGUAGE_JAPANESE); } StringExpandPlaceholders(gStringVar4, gText_WhatWouldYouLikeToDoWithPlayersMail); - DisplayItemMessageOnField(taskId, 2, gStringVar4, Task_DrawMailSubmenu); + DisplayItemMessageOnField(taskId, FONT_2, gStringVar4, Task_DrawMailSubmenu); } static void Task_DestroyMailboxPcViewAndCancel(u8 taskId) @@ -529,8 +529,8 @@ static void Task_DestroyMailboxPcViewAndCancel(u8 taskId) static void Task_DrawMailSubmenu(u8 taskId) { u8 windowId = MailboxPC_GetAddWindow(2); - PrintTextArray(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, 4, sMenuActions_MailSubmenu); - Menu_InitCursor(windowId, 2, 0, 2, 16, 4, 0); + PrintTextArray(windowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 16, 4, sMenuActions_MailSubmenu); + Menu_InitCursor(windowId, FONT_2, 0, 2, 16, 4, 0); ScheduleBgCopyTilemapToVram(0); gTasks[taskId].func = Task_MailSubmenuHandleInput; } @@ -600,7 +600,7 @@ static void CB2_SetCbToReturnToMailbox(void) static void Task_PlayerPcMoveMailToBag(u8 taskId) { - DisplayItemMessageOnField(taskId, 2, gText_MessageWillBeLost, Task_DrawYesNoMenuToConfirmMoveToBag); + DisplayItemMessageOnField(taskId, FONT_2, gText_MessageWillBeLost, Task_DrawYesNoMenuToConfirmMoveToBag); } static void Task_DrawYesNoMenuToConfirmMoveToBag(u8 taskId) @@ -632,11 +632,11 @@ static void Task_TryPutMailInBag_DestroyMsgIfSuccessful(u8 taskId) struct Mail * mail = &SELECTED_MAIL; if (!AddBagItem(mail->itemId, 1)) { - DisplayItemMessageOnField(taskId, 2, gText_BagIsFull, Task_PlayerPcExitMailSubmenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_BagIsFull, Task_PlayerPcExitMailSubmenu); } else { - DisplayItemMessageOnField(taskId, 2, gText_MailReturnedToBagMessageErased, Task_PlayerPcExitMailSubmenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_MailReturnedToBagMessageErased, Task_PlayerPcExitMailSubmenu); ClearMailStruct(mail); PCMailCompaction(); gPlayerPcMenuManager.count--; @@ -715,7 +715,7 @@ void Mailbox_ReturnToMailListAfterDeposit(void) static void Task_Error_NoPokemon(u8 taskId) { - DisplayItemMessageOnField(taskId, 2, gText_ThereIsNoPokemon, Task_PlayerPcExitMailSubmenu); + DisplayItemMessageOnField(taskId, FONT_2, gText_ThereIsNoPokemon, Task_PlayerPcExitMailSubmenu); } static void Task_RedrawPlayerPcMailboxAndSetUpInputHandler(u8 taskId) diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 4b1e2df8c..764d3c770 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -353,7 +353,7 @@ static const struct ListMenuTemplate sListMenuTemplate_KantoDexModeSelect = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0, }; @@ -397,7 +397,7 @@ static const struct ListMenuTemplate sListMenuTemplate_NatDexModeSelect = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = 0, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0, }; @@ -520,7 +520,7 @@ static const struct ListMenuTemplate sListMenuTemplate_OrderedListMenu = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = 1, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0, }; @@ -1133,15 +1133,15 @@ static void DexScreen_InitGfxForTopMenu(void) listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId; sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove); FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0)); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Seen, 0, 2, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 13, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Seen, 0, 2, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Kanto, 8, 13, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenKanto, 52, 13, 2); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 24, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_National, 8, 24, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numSeenNational, 52, 24, 2); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Owned, 0, 37, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_Kanto, 8, 48, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Owned, 0, 37, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_Kanto, 8, 48, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedKanto, 52, 48, 2); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 0, gText_National, 8, 59, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_0, gText_National, 8, 59, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 0, sPokedexScreenData->numOwnedNational, 52, 59, 2); } else @@ -1150,9 +1150,9 @@ static void DexScreen_InitGfxForTopMenu(void) listMenuTemplate.windowId = sPokedexScreenData->modeSelectWindowId; sPokedexScreenData->modeSelectListMenuId = ListMenuInit(&listMenuTemplate, sPokedexScreenData->modeSelectCursorPos, sPokedexScreenData->modeSelectItemsAbove); FillWindowPixelBuffer(sPokedexScreenData->dexCountsWindowId, PIXEL_FILL(0)); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Seen, 0, 9, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_1, gText_Seen, 0, 9, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numSeenKanto, 32, 21, 2); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, 1, gText_Owned, 0, 37, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->dexCountsWindowId, FONT_1, gText_Owned, 0, 37, 0); DexScreen_PrintNum3RightAlign(sPokedexScreenData->dexCountsWindowId, 1, sPokedexScreenData->numOwnedKanto, 32, 49, 2); } FillWindowPixelBuffer(0, PIXEL_FILL(15)); @@ -1548,7 +1548,7 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y) bool8 seen = (itemId >> 16) & 1; // not used but required to match bool8 caught = (itemId >> 17) & 1; u8 type1; - DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, 0, species, 12, y); + DexScreen_PrintMonDexNo(sPokedexScreenData->numericalOrderWindowId, FONT_0, species, 12, y); if (caught) { BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y); @@ -2161,10 +2161,10 @@ static void DexScreen_AddTextPrinterParameterized(u8 windowId, u8 fontId, const textColor[2] = 2; break; } - AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str); + AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == FONT_0 ? 0 : 1, 0, textColor, -1, str); } -void DexScreen_PrintNum3LeadingZeroes(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) +static void DexScreen_PrintNum3LeadingZeroes(u8 windowId, u8 fontId, u16 num, u8 x, u8 y, u8 colorIdx) { u8 buff[4]; buff[0] = (num / 100) + CHAR_0; @@ -2293,7 +2293,7 @@ static u16 DexScreen_GetDexCount(u8 caseId, bool8 whichDex) static void DexScreen_PrintControlInfo(const u8 *src) { - DexScreen_AddTextPrinterParameterized(1, 0, src, 236 - GetStringWidth(0, src, 0), 2, 4); + DexScreen_AddTextPrinterParameterized(1, FONT_0, src, 236 - GetStringWidth(FONT_0, src, 0), 2, 4); } bool8 DexScreen_DrawMonPicInCategoryPage(u16 species, u8 slot, u8 numSlots) @@ -2327,8 +2327,8 @@ bool8 DexScreen_DrawMonPicInCategoryPage(u16 species, u8 slot, u8 numSlots) template.baseBlock = slot * 40 + 0x108; sPokedexScreenData->categoryMonInfoWindowIds[slot] = AddWindow(&template); CopyToWindowPixelBuffer(sPokedexScreenData->categoryMonInfoWindowIds[slot], sCategoryMonInfoBgTiles, 0, 0); - DexScreen_PrintMonDexNo(sPokedexScreenData->categoryMonInfoWindowIds[slot], 0, species, 12, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->categoryMonInfoWindowIds[slot], 2, gSpeciesNames[species], 2, 13, 0); + DexScreen_PrintMonDexNo(sPokedexScreenData->categoryMonInfoWindowIds[slot], FONT_0, species, 12, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->categoryMonInfoWindowIds[slot], FONT_2, gSpeciesNames[species], 2, 13, 0); if (DexScreen_GetSetPokedexFlag(species, FLAG_GET_CAUGHT, TRUE)) BlitBitmapRectToWindow(sPokedexScreenData->categoryMonInfoWindowIds[slot], sDexScreen_CaughtIcon, 0, 0, 8, 8, 2, 3, 8, 8); PutWindowTilemap(sPokedexScreenData->categoryMonInfoWindowIds[slot]); @@ -2695,9 +2695,9 @@ void DexScreen_PrintMonCategory(u8 windowId, u16 species, u8 x, u8 y) categoryStr[index] = EOS; - DexScreen_AddTextPrinterParameterized(windowId, 0, categoryStr, x, y, 0); - x += GetStringWidth(0, categoryStr, 0); - DexScreen_AddTextPrinterParameterized(windowId, 0, gText_PokedexPokemon, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, categoryStr, x, y, 0); + x += GetStringWidth(FONT_0, categoryStr, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, gText_PokedexPokemon, x, y, 0); } void DexScreen_PrintMonHeight(u8 windowId, u16 species, u8 x, u8 y) @@ -2752,9 +2752,9 @@ void DexScreen_PrintMonHeight(u8 windowId, u16 species, u8 x, u8 y) } buffer[i++] = EOS; - DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, labelText, x, y, 0); x += 30; - DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, buffer, x, y, 0); } void DexScreen_PrintMonWeight(u8 windowId, u16 species, u8 x, u8 y) @@ -2844,9 +2844,9 @@ void DexScreen_PrintMonWeight(u8 windowId, u16 species, u8 x, u8 y) buffer[i + j] = lbsText[j]; buffer[i + j] = EOS; - DexScreen_AddTextPrinterParameterized(windowId, 0, labelText, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, labelText, x, y, 0); x += 30; - DexScreen_AddTextPrinterParameterized(windowId, 0, buffer, x, y, 0); + DexScreen_AddTextPrinterParameterized(windowId, FONT_0, buffer, x, y, 0); } void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y) @@ -2861,7 +2861,7 @@ void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y) { printerTemplate.currentChar = gPokedexEntries[species].description; printerTemplate.windowId = windowId; - printerTemplate.fontId = 2; + printerTemplate.fontId = FONT_2; printerTemplate.letterSpacing = 1; printerTemplate.lineSpacing = 0; printerTemplate.unk = 0; @@ -2869,7 +2869,7 @@ void DexScreen_PrintMonFlavorText(u8 windowId, u16 species, u8 x, u8 y) printerTemplate.bgColor = 0; printerTemplate.shadowColor = 2; - length = GetStringWidth(2, gPokedexEntries[species].description, 0); + length = GetStringWidth(FONT_2, gPokedexEntries[species].description, 0); xCenter = x + (240 - length) / 2; if (xCenter > 0) @@ -2937,8 +2937,8 @@ static u8 DexScreen_DrawMonDexPage(bool8 justRegistered) // Species stats FillWindowPixelBuffer(sPokedexScreenData->windowIds[1], PIXEL_FILL(0)); - DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[1], 0, sPokedexScreenData->dexSpecies, 0, 8); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[1], 2, gSpeciesNames[sPokedexScreenData->dexSpecies], 28, 8, 0); + DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[1], FONT_0, sPokedexScreenData->dexSpecies, 0, 8); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[1], FONT_2, gSpeciesNames[sPokedexScreenData->dexSpecies], 28, 8, 0); DexScreen_PrintMonCategory(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 24); DexScreen_PrintMonHeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 36); DexScreen_PrintMonWeight(sPokedexScreenData->windowIds[1], sPokedexScreenData->dexSpecies, 0, 48); @@ -2956,7 +2956,7 @@ static u8 DexScreen_DrawMonDexPage(bool8 justRegistered) FillWindowPixelBuffer(1, PIXEL_FILL(15)); if (justRegistered == FALSE) { - DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4); + DexScreen_AddTextPrinterParameterized(1, FONT_0, gText_Cry, 8, 2, 4); DexScreen_PrintControlInfo(gText_NextDataCancel); } else @@ -3059,8 +3059,8 @@ u8 DexScreen_DrawMonAreaPage(void) // Print "Size" FillWindowPixelBuffer(sPokedexScreenData->windowIds[9], PIXEL_FILL(0)); { - s32 strWidth = GetStringWidth(0, gText_Size, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[9], 0, gText_Size, (sWindowTemplate_AreaMap_Size.width * 8 - strWidth) / 2, 4, 0); + s32 strWidth = GetStringWidth(FONT_0, gText_Size, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[9], FONT_0, gText_Size, (sWindowTemplate_AreaMap_Size.width * 8 - strWidth) / 2, 4, 0); } PutWindowTilemap(sPokedexScreenData->windowIds[9]); CopyWindowToVram(sPokedexScreenData->windowIds[9], COPYWIN_GFX); @@ -3068,8 +3068,8 @@ u8 DexScreen_DrawMonAreaPage(void) // Print "Area" FillWindowPixelBuffer(sPokedexScreenData->windowIds[10], PIXEL_FILL(0)); { - s32 strWidth = GetStringWidth(0, gText_Area, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[10], 0, gText_Area, (sWindowTemplate_AreaMap_Area.width * 8 - strWidth) / 2, 4, 0); + s32 strWidth = GetStringWidth(FONT_0, gText_Area, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[10], FONT_0, gText_Area, (sWindowTemplate_AreaMap_Area.width * 8 - strWidth) / 2, 4, 0); } SetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP, GetWindowAttribute(sPokedexScreenData->windowIds[10], WINDOW_TILEMAP_TOP) + kantoMapVoff); PutWindowTilemap(sPokedexScreenData->windowIds[10]); @@ -3077,8 +3077,8 @@ u8 DexScreen_DrawMonAreaPage(void) // Print species name FillWindowPixelBuffer(sPokedexScreenData->windowIds[8], PIXEL_FILL(0)); - DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[8], 0, species, 0, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[8], 2, gSpeciesNames[species], 3, 12, 0); + DexScreen_PrintMonDexNo(sPokedexScreenData->windowIds[8], FONT_0, species, 0, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[8], FONT_2, gSpeciesNames[species], 3, 12, 0); PutWindowTilemap(sPokedexScreenData->windowIds[8]); CopyWindowToVram(sPokedexScreenData->windowIds[8], COPYWIN_GFX); @@ -3128,15 +3128,15 @@ u8 DexScreen_DrawMonAreaPage(void) { BlitBitmapRectToWindow(sPokedexScreenData->windowIds[0], (void *)sBlitTiles_WideEllipse, 0, 0, 88, 16, 4, 28, 88, 16); { - s32 strWidth = GetStringWidth(0, gText_AreaUnknown, 0); - DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[0], 0, gText_AreaUnknown, (96 - strWidth) / 2, 29, 0); + s32 strWidth = GetStringWidth(FONT_0, gText_AreaUnknown, 0); + DexScreen_AddTextPrinterParameterized(sPokedexScreenData->windowIds[0], FONT_0, gText_AreaUnknown, (96 - strWidth) / 2, 29, 0); } } CopyWindowToVram(sPokedexScreenData->windowIds[0], COPYWIN_GFX); // Draw the control info FillWindowPixelBuffer(1, PIXEL_FILL(15)); - DexScreen_AddTextPrinterParameterized(1, 0, gText_Cry, 8, 2, 4); + DexScreen_AddTextPrinterParameterized(1, FONT_0, gText_Cry, 8, 2, 4); DexScreen_PrintControlInfo(gText_CancelPreviousData); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_GFX); @@ -3436,13 +3436,13 @@ void DexScreen_PrintStringWithAlignment(const u8 * str, s32 mode) x = 8; break; case TEXT_CENTER: - x = (u32)(240 - GetStringWidth(2, str, 0)) / 2; + x = (u32)(240 - GetStringWidth(FONT_2, str, 0)) / 2; break; case TEXT_RIGHT: default: - x = 232 - GetStringWidth(2, str, 0); + x = 232 - GetStringWidth(FONT_2, str, 0); break; } - DexScreen_AddTextPrinterParameterized(0, 2, str, x, 2, 4); + DexScreen_AddTextPrinterParameterized(0, FONT_2, str, x, 2, 4); } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index b345de9bf..6bfea1553 100644 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -3169,7 +3169,7 @@ static void Msg_WantToPlayAgain(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(1, 8, 20, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_WantToPlayAgain2, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_WantToPlayAgain2, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3196,7 +3196,7 @@ static void Msg_SavingDontTurnOff(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 7, 26, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_SavingDontTurnOffPower, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_SavingDontTurnOffPower, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3239,7 +3239,7 @@ static void Msg_SomeoneDroppedOut(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(2, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_SomeoneDroppedOut2, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_SomeoneDroppedOut2, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3265,7 +3265,7 @@ static void Msg_CommunicationStandby(void) { case 0: sPokemonJumpGfx->msgWindowId = AddMessageWindow(7, 10, 16, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, gText_CommunicationStandby4, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, gText_CommunicationStandby4, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->mainState++; break; @@ -3358,7 +3358,7 @@ static void PrintPrizeMessage(u16 itemId, u16 quantity) DynamicPlaceholderTextUtil_SetPlaceholderPtr(1, sPokemonJumpGfx->itemQuantityStr); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_AwesomeWonF701F700); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_LEVEL_UP; sPokemonJumpGfx->msgWindowState = 0; @@ -3371,7 +3371,7 @@ static void PrintPrizeFilledBagMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_FilledStorageSpace2); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 8, 22, 4); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3384,7 +3384,7 @@ static void PrintNoRoomForPrizeMessage(u16 itemId) DynamicPlaceholderTextUtil_SetPlaceholderPtr(0, sPokemonJumpGfx->itemName); DynamicPlaceholderTextUtil_ExpandPlaceholders(sPokemonJumpGfx->prizeMsg, gText_CantHoldMore); sPokemonJumpGfx->msgWindowId = AddMessageWindow(4, 9, 22, 2); - AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, 2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sPokemonJumpGfx->msgWindowId, FONT_2, sPokemonJumpGfx->prizeMsg, 0, 2, TEXT_SKIP_DRAW, NULL); CopyWindowToVram(sPokemonJumpGfx->msgWindowId, COPYWIN_GFX); sPokemonJumpGfx->fanfare = MUS_DUMMY; sPokemonJumpGfx->msgWindowState = 0; @@ -3493,7 +3493,7 @@ static void CreatePokeJumpYesNoMenu(u16 left, u16 top, u8 cursorPos) window.paletteNum = 2; window.baseBlock = 0x2B; - CreateYesNoMenu(&window, 2, 0, 2, 0x00a, 0xD, a); + CreateYesNoMenu(&window, FONT_2, 0, 2, 0x00a, 0xD, a); } // "Points" for jump score and "times" for number of jumps in a row @@ -3505,8 +3505,8 @@ static void PrintScoreSuffixes(void) PutWindowTilemap(WIN_TIMES); FillWindowPixelBuffer(WIN_POINTS, PIXEL_FILL(0)); FillWindowPixelBuffer(WIN_TIMES, PIXEL_FILL(0)); - AddTextPrinterParameterized3(WIN_POINTS, 0, 0, 2, color, 0, gText_SpacePoints2); - AddTextPrinterParameterized3(WIN_TIMES, 0, 0, 2, color, 0, gText_SpaceTimes3); + AddTextPrinterParameterized3(WIN_POINTS, FONT_0, 0, 2, color, 0, gText_SpacePoints2); + AddTextPrinterParameterized3(WIN_TIMES, FONT_0, 0, 2, color, 0, gText_SpaceTimes3); } // The venusaurs in the background are actually an empty 256x512 bg with 3 pairs of venusaurs on it. @@ -3726,9 +3726,9 @@ static void PrintPokeJumpPlayerName(int multiplayerId, u8 bgColor, u8 fgColor, u u8 colors[3] = {bgColor, fgColor, shadow}; FillWindowPixelBuffer(sPokemonJumpGfx->nameWindowIds[multiplayerId], PIXEL_FILL(0)); - x = 64 - GetStringWidth(0, GetPokeJumpPlayerName(multiplayerId), -1); + x = 64 - GetStringWidth(FONT_0, GetPokeJumpPlayerName(multiplayerId), -1); x /= 2; - AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], 0, x, 2, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId)); + AddTextPrinterParameterized3(sPokemonJumpGfx->nameWindowIds[multiplayerId], FONT_0, x, 2, colors, TEXT_SKIP_DRAW, GetPokeJumpPlayerName(multiplayerId)); CopyWindowToVram(sPokemonJumpGfx->nameWindowIds[multiplayerId], COPYWIN_GFX); } @@ -4557,14 +4557,14 @@ static void PrintRecordsText(u16 windowId) TextWindow_SetStdFrame0_WithPal(windowId, 0x21D, 0xD0); DrawTextBorderOuter(windowId, 0x21D, 0xD); FillWindowPixelBuffer(windowId, PIXEL_FILL(1)); - AddTextPrinterParameterized5(windowId, 2, gText_PkmnJumpRecords, 0, 0, TEXT_SKIP_DRAW, NULL, 1, 0); + AddTextPrinterParameterized5(windowId, FONT_2, gText_PkmnJumpRecords, 0, 0, TEXT_SKIP_DRAW, NULL, 1, 0); for (i = 0; i < ARRAY_COUNT(sRecordsTexts); i++) { - AddTextPrinterParameterized5(windowId, 2, sRecordsTexts[i], 0, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 1, 0); + AddTextPrinterParameterized5(windowId, FONT_2, sRecordsTexts[i], 0, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 1, 0); ConvertIntToDecimalStringN(strbuf, recordNums[i], STR_CONV_MODE_LEFT_ALIGN, 5); TruncateToFirstWordOnly(strbuf); - x = 0xDE - GetStringWidth(2, strbuf, 0); - AddTextPrinterParameterized5(windowId, 2, strbuf, x, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 0, 0); + x = 0xDE - GetStringWidth(FONT_2, strbuf, 0); + AddTextPrinterParameterized5(windowId, FONT_2, strbuf, x, 20 + (i * 14), TEXT_SKIP_DRAW, NULL, 0, 0); } PutWindowTilemap(windowId); } diff --git a/src/pokemon_special_anim_scene.c b/src/pokemon_special_anim_scene.c index 51fd15416..0b1277113 100644 --- a/src/pokemon_special_anim_scene.c +++ b/src/pokemon_special_anim_scene.c @@ -414,10 +414,10 @@ void PSA_PrintMessage(u8 messageId) DynamicPlaceholderTextUtil_ExpandPlaceholders(scene->textBuf, gUnknown_841B32E); break; case 4: // poof! - strWidth += GetStringWidth(2, gUnknown_841B2F1, -1); + strWidth += GetStringWidth(FONT_2, gUnknown_841B2F1, -1); // fallthrough case 3: // 2 and... - strWidth += GetStringWidth(2, gUnknown_841B2ED, -1); + strWidth += GetStringWidth(FONT_2, gUnknown_841B2ED, -1); // fallthrough case 2: // 1 StringCopy(scene->textBuf, s1_2_and_Poof_textPtrs[messageId - 2]); @@ -442,7 +442,7 @@ void PSA_PrintMessage(u8 messageId) return; } - AddTextPrinterParameterized5(0, 2, scene->textBuf, strWidth, 0, textSpeed, NULL, 0, 4); + AddTextPrinterParameterized5(0, FONT_2, scene->textBuf, strWidth, 0, textSpeed, NULL, 0, 4); } void PSA_AfterPoof_ClearMessageWindow(void) @@ -1508,13 +1508,13 @@ void DrawLevelUpWindowPg1(u16 windowId, u16 *beforeStats, u16 *afterStats, u8 bg for (i = 0; i < 6; i++) { - AddTextPrinterParameterized3(windowId, 2, 0, i * 15, textColor, TEXT_SKIP_DRAW, sLevelUpWindowStatNames[i]); + AddTextPrinterParameterized3(windowId, FONT_2, 0, i * 15, textColor, TEXT_SKIP_DRAW, sLevelUpWindowStatNames[i]); StringCopy(textbuf, diffStats[i] >= 0 ? gUnknown_841B2DC : gUnknown_841B2E5); - AddTextPrinterParameterized3(windowId, 2, 56, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); + AddTextPrinterParameterized3(windowId, FONT_2, 56, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); textbuf[0] = CHAR_SPACE; x = abs(diffStats[i]) < 10 ? 12 : 6; ConvertIntToDecimalStringN(textbuf + 1, abs(diffStats[i]), STR_CONV_MODE_LEFT_ALIGN, 2); - AddTextPrinterParameterized3(windowId, 2, x + 56, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); + AddTextPrinterParameterized3(windowId, FONT_2, x + 56, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); } } @@ -1550,7 +1550,7 @@ void DrawLevelUpWindowPg2(u16 windowId, u16 *currStats, u8 bgColor, u8 fgColor, ndigits = 1; ConvertIntToDecimalStringN(textbuf, statsRearrange[i], STR_CONV_MODE_LEFT_ALIGN, ndigits); x = 6 * (4 - ndigits); - AddTextPrinterParameterized3(windowId, 2, 0, i * 15, textColor, TEXT_SKIP_DRAW, sLevelUpWindowStatNames[i]); - AddTextPrinterParameterized3(windowId, 2, 56 + x, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); + AddTextPrinterParameterized3(windowId, FONT_2, 0, i * 15, textColor, TEXT_SKIP_DRAW, sLevelUpWindowStatNames[i]); + AddTextPrinterParameterized3(windowId, FONT_2, 56 + x, i * 15, textColor, TEXT_SKIP_DRAW, textbuf); } } diff --git a/src/pokemon_storage_system_2.c b/src/pokemon_storage_system_2.c index 3bb940566..d835fb50c 100644 --- a/src/pokemon_storage_system_2.c +++ b/src/pokemon_storage_system_2.c @@ -29,7 +29,7 @@ static EWRAM_DATA u8 sPreviousBoxOption = 0; static EWRAM_DATA struct ChooseBoxMenu *sBoxSelectionPopupSpriteManager = NULL; static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr); -static void sub_808C9C4(u8 curBox); +static void ChooseBoxMenu_CreateSprites(u8 curBox); static void sub_808CBA4(void); static void UpdateBoxNameAndCountSprite_WraparoundRight(void); static void UpdateBoxNameAndCountSprite_WraparoundLeft(void); @@ -75,7 +75,7 @@ void DrawTextWindowAndBufferTiles(const u8 *string, void *dst, u8 zero1, u8 zero txtColor[0] = zero2; txtColor[1] = TEXT_DYNAMIC_COLOR_6; txtColor[2] = TEXT_DYNAMIC_COLOR_5; - AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_1, 0, 2, 0, 0, txtColor, -1, string); tileBytesToBuffer = bytesToBuffer; if (tileBytesToBuffer > 6) @@ -118,7 +118,7 @@ static void PrintStringToBufferCopyNow(const u8 *string, void *dst, u16 rise, u8 txtColor[0] = bgClr; txtColor[1] = fgClr; txtColor[2] = shClr; - AddTextPrinterParameterized4(windowId, 1, 0, 2, 0, 0, txtColor, -1, string); + AddTextPrinterParameterized4(windowId, FONT_1, 0, 2, 0, 0, txtColor, -1, string); CpuCopy16(tileData1, dst, var); CpuCopy16(tileData2, dst + rise, var); RemoveWindow(windowId); @@ -277,7 +277,7 @@ static void Task_PCMainMenu(u8 taskId) LoadStdWindowFrameGfx(); DrawDialogueFrame(0, FALSE); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMainMenuTexts[task->tSelectedOption].desc, TEXT_SKIP_DRAW, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); CopyWindowToVram(0, COPYWIN_FULL); CopyWindowToVram(task->tWindowId, COPYWIN_FULL); task->tState++; @@ -303,7 +303,7 @@ static void Task_PCMainMenu(u8 taskId) { task->tSelectedOption = task->tNextOption; FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } break; case MENU_B_PRESSED: @@ -319,14 +319,14 @@ static void Task_PCMainMenu(u8 taskId) { // Can't withdraw FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_PartyFull, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_PartyFull, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tState = 3; } else if (task->tInput == 1 && CountPartyMons() == 1) { // Can't deposit FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_JustOnePkmn, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_JustOnePkmn, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tState = STATE_ERROR_MSG; } else @@ -344,7 +344,7 @@ static void Task_PCMainMenu(u8 taskId) if (JOY_NEW(A_BUTTON | B_BUTTON)) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_UP)) @@ -354,7 +354,7 @@ static void Task_PCMainMenu(u8 taskId) Menu_MoveCursor(-1); task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tState = STATE_HANDLE_INPUT; } else if (JOY_NEW(DPAD_DOWN)) @@ -364,7 +364,7 @@ static void Task_PCMainMenu(u8 taskId) Menu_MoveCursor(1); task->tSelectedOption = Menu_GetCursorPos(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sMainMenuTexts[task->tSelectedOption].desc, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tState = STATE_HANDLE_INPUT; } break; @@ -417,8 +417,8 @@ static void PSS_CreatePCMenu(u8 whichMenu, s16 *windowIdPtr) windowId = AddWindow(&sUnknown_83CDA48); DrawStdWindowFrame(windowId, FALSE); - PrintTextArray(windowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, NELEMS(sMainMenuTexts), (void *)sMainMenuTexts); - Menu_InitCursor(windowId, 2, 0, 2, 16, NELEMS(sMainMenuTexts), whichMenu); + PrintTextArray(windowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 16, NELEMS(sMainMenuTexts), (void *)sMainMenuTexts); + Menu_InitCursor(windowId, FONT_2, 0, 2, 16, NELEMS(sMainMenuTexts), whichMenu); *windowIdPtr = windowId; } @@ -491,7 +491,7 @@ void FreeBoxSelectionPopupSpriteGfx(void) void sub_808C940(u8 curBox) { - sub_808C9C4(curBox); + ChooseBoxMenu_CreateSprites(curBox); } void sub_808C950(void) @@ -560,7 +560,7 @@ static const union AffineAnimCmd *const gUnknown_83CDA90[] = { gUnknown_83CDA80 }; -static void sub_808C9C4(u8 curBox) +static void ChooseBoxMenu_CreateSprites(u8 curBox) { u16 i; u8 spriteId; @@ -607,7 +607,7 @@ static void sub_808C9C4(u8 curBox) } for (i = 0; i < 2; i++) { - sBoxSelectionPopupSpriteManager->arrowSprites[i] = sub_809223C(72 * i + 0x7c, 0x58, i, 0, sBoxSelectionPopupSpriteManager->subpriority); + sBoxSelectionPopupSpriteManager->arrowSprites[i] = CreateChooseBoxArrows(72 * i + 0x7c, 0x58, i, 0, sBoxSelectionPopupSpriteManager->subpriority); if (sBoxSelectionPopupSpriteManager->arrowSprites[i]) { sBoxSelectionPopupSpriteManager->arrowSprites[i]->data[0] = (i == 0 ? -1 : 1); diff --git a/src/pokemon_storage_system_3.c b/src/pokemon_storage_system_3.c index fdcd726fb..a08b2a920 100644 --- a/src/pokemon_storage_system_3.c +++ b/src/pokemon_storage_system_3.c @@ -1718,7 +1718,7 @@ static void Cb_HandleBoxOptions(u8 taskId) { case -1: case 0: - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); ClearBottomWindow(); SetPSSCallback(Cb_MainPSS); break; @@ -1759,7 +1759,7 @@ static void Cb_HandleWallpapers(u8 taskId) switch (gPSSData->wallpaperSetId) { case -1: - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); ClearBottomWindow(); SetPSSCallback(Cb_MainPSS); break; @@ -1801,7 +1801,7 @@ static void Cb_HandleWallpapers(u8 taskId) case 5: if (!DoWallpaperGfxChange()) { - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); SetPSSCallback(Cb_MainPSS); } break; @@ -1830,7 +1830,7 @@ static void Cb_JumpBox(u8 taskId) FreeBoxSelectionPopupSpriteGfx(); if (gPSSData->newCurrBoxId == 201 || gPSSData->newCurrBoxId == StorageGetCurrentBox()) { - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); SetPSSCallback(Cb_MainPSS); } else @@ -2294,16 +2294,16 @@ static void PrintCursorMonInfo(void) { for (i = 0, y = 0; i < 3; i++, y += 14) { - AddTextPrinterParameterized(0, 2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); } - AddTextPrinterParameterized(0, 0, gPSSData->displayMonTexts[3], 6, y + 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_0, gPSSData->displayMonTexts[3], 6, y + 2, TEXT_SKIP_DRAW, NULL); } else { - AddTextPrinterParameterized(0, 0, gPSSData->displayMonTexts[3], 6, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_0, gPSSData->displayMonTexts[3], 6, 0, TEXT_SKIP_DRAW, NULL); for (i = 0, y = 15; i < 3; i++, y += 14) { - AddTextPrinterParameterized(0, 2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(0, FONT_2, gPSSData->displayMonTexts[i], i == 2 ? 10 : 6, y, TEXT_SKIP_DRAW, NULL); } } @@ -2592,7 +2592,7 @@ static void PrintStorageActionText(u8 id) DynamicPlaceholderTextUtil_ExpandPlaceholders(gPSSData->field_2190, sPCStorageActionTexts[id].text); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - AddTextPrinterParameterized(1, 1, gPSSData->field_2190, 0, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(1, FONT_1, gPSSData->field_2190, 0, 2, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(1, 2, 13); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_GFX); @@ -2601,7 +2601,7 @@ static void PrintStorageActionText(u8 id) static void ShowYesNoWindow(s8 cursorPos) { - CreateYesNoMenu(&sYesNoWindowTemplate, 1, 0, 2, 0x00b, 14, 1); + CreateYesNoMenu(&sYesNoWindowTemplate, FONT_1, 0, 2, 0x00b, 14, 1); Menu_MoveCursorNoWrapAround(cursorPos); } @@ -2661,7 +2661,7 @@ u8 GetCurrentBoxOption(void) static void sub_808FDFC(void) { - if (!IsCursorOnBox()) + if (!IsCursorOnBoxTitle()) { if (sInPartyMenu) sub_8095C84(CURSOR_AREA_IN_PARTY, GetBoxCursorPosition()); diff --git a/src/pokemon_storage_system_4.c b/src/pokemon_storage_system_4.c index 9041c277a..1c1567106 100644 --- a/src/pokemon_storage_system_4.c +++ b/src/pokemon_storage_system_4.c @@ -25,13 +25,13 @@ static void sub_8091A94(u8 wallpaperId); static void sub_8091C48(u8 wallpaperId, s8 direction); static void sub_8091E84(struct Sprite *sprite); static void sub_8091EB8(struct Sprite *sprite); -static s16 sub_8091F60(const u8 *boxName); +static s16 GetBoxTitleBaseX(const u8 *boxName); static void sub_8091E34(void); static void sub_8091EF0(void); -static void sub_8091F80(void); -static void sub_809200C(s8 direction); -static void sub_80920AC(void); -static void sub_8092164(struct Sprite *sprite); +static void CreateBoxScrollArrows(void); +static void StartBoxScrollArrowsSlide(s8 direction); +static void StopBoxScrollArrowsSlide(void); +static void SpriteCB_Arrow(struct Sprite *sprite); static const struct OamData gUnknown_83CEC08; @@ -169,7 +169,7 @@ static const struct WallpaperTable sWallpaperTable[] = { static const u16 gUnknown_83D2AD0[] = INCBIN_U16("graphics/interface/pss_unk_83D2AD0.4bpp"); static const u8 sUnref_83D2B50[] = {0xba, 0x23}; -static const struct SpriteSheet gUnknown_83D2B54 = { +static const struct SpriteSheet sSpriteSheet_Arrow = { gUnknown_83D2AD0, 0x0080, TAG_TILE_6 }; @@ -243,14 +243,14 @@ static const union AnimCmd *const gUnknown_83D2BAC[] = { gUnknown_83D2BA4 }; -static const struct SpriteTemplate gUnknown_83D2BB4 = { +static const struct SpriteTemplate sSpriteTemplate_Arrow = { .tileTag = TAG_TILE_6, .paletteTag = TAG_PAL_WAVEFORM, .oam = &gUnknown_83D2B94, .anims = gUnknown_83D2BAC, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, - .callback = sub_8092164 + .callback = SpriteCB_Arrow }; void sub_808FFAC(void) @@ -1010,7 +1010,7 @@ static void sub_8091420(u8 taskId) return; sub_8091A94(task->data[2]); - sub_8091F80(); + CreateBoxScrollArrows(); sub_80900D4(task->data[2]); SetGpuReg(REG_OFFSET_BG2CNT, BGCNT_PRIORITY(2) | BGCNT_CHARBASE(2) | BGCNT_SCREENBASE(27) | BGCNT_TXT512x256); break; @@ -1059,7 +1059,7 @@ bool8 ScrollToBox(void) sub_8090574(gPSSData->scrollToBoxId, gPSSData->scrollDirection); sub_8091C48(gPSSData->scrollToBoxId, gPSSData->scrollDirection); - sub_809200C(gPSSData->scrollDirection); + StartBoxScrollArrowsSlide(gPSSData->scrollDirection); break; case 2: var = sub_809062C(); @@ -1069,7 +1069,7 @@ bool8 ScrollToBox(void) if (--gPSSData->scrollTimer != 0) return TRUE; sub_8091E34(); - sub_80920AC(); + StopBoxScrollArrowsSlide(); } return var; } @@ -1243,7 +1243,7 @@ static void sub_8091A94(u8 boxId) StringCopyPadded(gPSSData->field_21B8, GetBoxNamePtr(boxId), 0, 8); DrawTextWindowAndBufferTiles(gPSSData->field_21B8, gPSSData->field_2F8, 0, 0, gPSSData->field_4F8, 2); LoadSpriteSheet(&spriteSheet); - r6 = sub_8091F60(GetBoxNamePtr(boxId)); + r6 = GetBoxTitleBaseX(GetBoxNamePtr(boxId)); for (i = 0; i < 2; i++) { @@ -1280,7 +1280,7 @@ static void sub_8091C48(u8 boxId, s8 direction) DrawTextWindowAndBufferTiles(gPSSData->field_21B8, gPSSData->field_2F8, 0, 0, gPSSData->field_4F8, 2); LoadSpriteSheet(&spriteSheet); LoadPalette(gUnknown_83D29D0[GetBoxWallpaper(boxId)], r8, 4); - x = sub_8091F60(GetBoxNamePtr(boxId)); + x = GetBoxTitleBaseX(GetBoxNamePtr(boxId)); x2 = x; x2 += direction * 192; @@ -1345,19 +1345,30 @@ static void sub_8091EF0(void) CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitleAltPalOffset, 4); } -static s16 sub_8091F60(const u8 *string) +static s16 GetBoxTitleBaseX(const u8 *string) { - return 0xB0 - GetStringWidth(1, string, 0) / 2; + return DISPLAY_WIDTH - 64 - GetStringWidth(FONT_1, string, 0) / 2; } -static void sub_8091F80(void) + +//------------------------------------------------------------------------------ +// SECTION: Scroll arrows +//------------------------------------------------------------------------------ + + +// Sprite data for box scroll arrows +#define sState data[0] +#define sTimer data[1] +#define sSpeed data[3] + +static void CreateBoxScrollArrows(void) { u16 i; - LoadSpriteSheet(&gUnknown_83D2B54); + LoadSpriteSheet(&sSpriteSheet_Arrow); for (i = 0; i < 2; i++) { - u8 spriteId = CreateSprite(&gUnknown_83D2BB4, 0x5c + i * 0x88, 28, 22); + u8 spriteId = CreateSprite(&sSpriteTemplate_Arrow, 92 + i * 136, 28, 22); if (spriteId != MAX_SPRITES) { struct Sprite *sprite = &gSprites[spriteId]; @@ -1366,85 +1377,88 @@ static void sub_8091F80(void) gPSSData->arrowSprites[i] = sprite; } } - if (IsCursorOnBox()) - sub_80920FC(TRUE); + if (IsCursorOnBoxTitle()) + AnimateBoxScrollArrows(TRUE); } -static void sub_809200C(s8 direction) +// Slide box scroll arrows horizontally for box change +static void StartBoxScrollArrowsSlide(s8 direction) { u16 i; for (i = 0; i < 2; i++) { gPSSData->arrowSprites[i]->x2 = 0; - gPSSData->arrowSprites[i]->data[0] = 2; + gPSSData->arrowSprites[i]->sState = 2; } if (direction < 0) { - gPSSData->arrowSprites[0]->data[1] = 29; - gPSSData->arrowSprites[1]->data[1] = 5; - gPSSData->arrowSprites[0]->data[2] = 0x48; - gPSSData->arrowSprites[1]->data[2] = 0x48; + gPSSData->arrowSprites[0]->sTimer = 29; + gPSSData->arrowSprites[1]->sTimer = 5; + gPSSData->arrowSprites[0]->data[2] = 72; + gPSSData->arrowSprites[1]->data[2] = 72; } else { - gPSSData->arrowSprites[0]->data[1] = 5; - gPSSData->arrowSprites[1]->data[1] = 29; - gPSSData->arrowSprites[0]->data[2] = 0xF8; - gPSSData->arrowSprites[1]->data[2] = 0xF8; + gPSSData->arrowSprites[0]->sTimer = 5; + gPSSData->arrowSprites[1]->sTimer = 29; + gPSSData->arrowSprites[0]->data[2] = DISPLAY_WIDTH + 8; + gPSSData->arrowSprites[1]->data[2] = DISPLAY_WIDTH + 8; } gPSSData->arrowSprites[0]->data[7] = 0; gPSSData->arrowSprites[1]->data[7] = 1; } -static void sub_80920AC(void) +// New box's scroll arrows have entered, stop sliding and set their position +static void StopBoxScrollArrowsSlide(void) { u16 i; for (i = 0; i < 2; i++) { - gPSSData->arrowSprites[i]->x = 0x88 * i + 0x5c; + gPSSData->arrowSprites[i]->x = 136 * i + 92; gPSSData->arrowSprites[i]->x2 = 0; gPSSData->arrowSprites[i]->invisible = FALSE; } - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); } -void sub_80920FC(bool8 a0) +// Bounce scroll arrows while title is selected +void AnimateBoxScrollArrows(bool8 animate) { u16 i; - if (a0) + if (animate) { + // Start arrows moving for (i = 0; i < 2; i++) { - gPSSData->arrowSprites[i]->data[0] = 1; - gPSSData->arrowSprites[i]->data[1] = 0; + gPSSData->arrowSprites[i]->sState = 1; + gPSSData->arrowSprites[i]->sTimer = 0; gPSSData->arrowSprites[i]->data[2] = 0; gPSSData->arrowSprites[i]->data[4] = 0; } } else { + // Stop arrows moving for (i = 0; i < 2; i++) - { - gPSSData->arrowSprites[i]->data[0] = 0; - } + gPSSData->arrowSprites[i]->sState = 0; } } -static void sub_8092164(struct Sprite *sprite) +static void SpriteCB_Arrow(struct Sprite *sprite) { - switch (sprite->data[0]) + switch (sprite->sState) { case 0: sprite->x2 = 0; break; case 1: - if (++sprite->data[1] > 3) + if (++sprite->sTimer > 3) { - sprite->data[1] = 0; - sprite->x2 += sprite->data[3]; + sprite->sTimer = 0; + sprite->x2 += sprite->sSpeed; if (++sprite->data[2] > 5) { sprite->data[2] = 0; @@ -1453,17 +1467,17 @@ static void sub_8092164(struct Sprite *sprite) } break; case 2: - sprite->data[0] = 3; + sprite->sState = 3; break; case 3: sprite->x -= gPSSData->scrollSpeed; - if (sprite->x < 73 || sprite->x > 247) + if (sprite->x <= 72 || sprite->x >= DISPLAY_WIDTH + 8) sprite->invisible = TRUE; - if (--sprite->data[1] == 0) + if (--sprite->sTimer == 0) { sprite->x = sprite->data[2]; sprite->invisible = FALSE; - sprite->data[0] = 4; + sprite->sState = 4; } break; case 4: @@ -1472,9 +1486,13 @@ static void sub_8092164(struct Sprite *sprite) } } -struct Sprite *sub_809223C(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority) +#undef sState +#undef sSpeed + +// Arrows for Deposit/Jump Box selection +struct Sprite *CreateChooseBoxArrows(u16 x, u16 y, u8 animId, u8 priority, u8 subpriority) { - u8 spriteId = CreateSprite(&gUnknown_83D2BB4, x, y, subpriority); + u8 spriteId = CreateSprite(&sSpriteTemplate_Arrow, x, y, subpriority); if (spriteId == MAX_SPRITES) return NULL; diff --git a/src/pokemon_storage_system_5.c b/src/pokemon_storage_system_5.c index a994028d3..68a23b053 100644 --- a/src/pokemon_storage_system_5.c +++ b/src/pokemon_storage_system_5.c @@ -322,7 +322,7 @@ static void sub_80929B0(void) SetMovingMonPriority(1); break; case CURSOR_AREA_BOX: - sub_80920FC(TRUE); + AnimateBoxScrollArrows(TRUE); break; case CURSOR_AREA_IN_PARTY: gPSSData->cursorShadowSprite->subpriority = 13; @@ -955,7 +955,7 @@ bool8 IsMonBeingMoved(void) return sIsMonBeingMoved; } -bool8 IsCursorOnBox(void) +bool8 IsCursorOnBoxTitle(void) { return (sBoxCursorArea == CURSOR_AREA_BOX); } @@ -1615,7 +1615,7 @@ static u8 HandleInput_OnBox(void) if (JOY_NEW(A_BUTTON)) { - sub_80920FC(FALSE); + AnimateBoxScrollArrows(FALSE); AddBoxMenu(); return 7; } @@ -1636,7 +1636,7 @@ static u8 HandleInput_OnBox(void) if (retVal) { if (cursorArea != CURSOR_AREA_BOX) - sub_80920FC(FALSE); + AnimateBoxScrollArrows(FALSE); sub_80927E8(cursorArea, cursorPosition); } diff --git a/src/pokemon_storage_system_6.c b/src/pokemon_storage_system_6.c index ab4849ba4..773c0f8aa 100644 --- a/src/pokemon_storage_system_6.c +++ b/src/pokemon_storage_system_6.c @@ -90,8 +90,8 @@ void AddMenu(void) gPSSData->menuWindowId = AddWindow(&gPSSData->menuWindow); ClearWindowTilemap(gPSSData->menuWindowId); DrawStdFrameWithCustomTileAndPalette(gPSSData->menuWindowId, FALSE, 0x00b, 14); - PrintTextArray(gPSSData->menuWindowId, 1, 8, 2, 16, gPSSData->menuItemsCount, (void *)gPSSData->menuItems); - Menu_InitCursor(gPSSData->menuWindowId, 1, 0, 2, 16, gPSSData->menuItemsCount, 0); + PrintTextArray(gPSSData->menuWindowId, FONT_1, 8, 2, 16, gPSSData->menuItemsCount, (void *)gPSSData->menuItems); + Menu_InitCursor(gPSSData->menuWindowId, FONT_1, 0, 2, 16, gPSSData->menuItemsCount, 0); ScheduleBgCopyTilemapToVram(0); gPSSData->menuUnusedField = 0; } diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index 02be5a7d6..8a2cf84c8 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -563,7 +563,7 @@ void PrintItemDescription(void) description = ItemId_GetDescription(gPSSData->displayMonItemId); FillWindowPixelBuffer(2, PIXEL_FILL(1)); - AddTextPrinterParameterized5(2, 2, description, 2, 0, 0, NULL, 0, 0); + AddTextPrinterParameterized5(2, FONT_2, description, 2, 0, 0, NULL, 0, 0); } void sub_80966F4(void) diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 2c36f8057..fa3731083 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2405,7 +2405,7 @@ static void PokeSum_FinishSetup(void) static void PokeSum_PrintPageName(const u8 * str) { FillWindowPixelBuffer(sMonSummaryScreen->windowIds[POKESUM_WIN_PAGE_NAME], 0); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_PAGE_NAME], 2, 4, 1, sLevelNickTextColors[1], 0, str); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_PAGE_NAME], FONT_2, 4, 1, sLevelNickTextColors[1], 0, str); PutWindowTilemap(sMonSummaryScreen->windowIds[POKESUM_WIN_PAGE_NAME]); } @@ -2416,9 +2416,9 @@ static void PokeSum_PrintControlsString(const u8 * str) u8 r1; FillWindowPixelBuffer(sMonSummaryScreen->windowIds[POKESUM_WIN_CONTROLS], 0); - width = GetStringWidth(0, str, 0); + width = GetStringWidth(FONT_0, str, 0); r1 = sMonSummaryScreen->windowIds[POKESUM_WIN_CONTROLS]; - AddTextPrinterParameterized3(r1, 0, 0x54 - width, 0, sLevelNickTextColors[1], 0, str); + AddTextPrinterParameterized3(r1, FONT_0, 0x54 - width, 0, sLevelNickTextColors[1], 0, str); PutWindowTilemap(sMonSummaryScreen->windowIds[POKESUM_WIN_CONTROLS]); } @@ -2431,12 +2431,12 @@ static void PrintMonLevelNickOnWindow2(const u8 * str) if (sMonSummaryScreen->curPageIndex != PSS_PAGE_MOVES_INFO) AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], 2, 4, 2, sLevelNickTextColors[1], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.levelStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], 2, 40, 2, sLevelNickTextColors[1], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.nicknameStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], FONT_2, 40, 2, sLevelNickTextColors[1], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.nicknameStrBuf); if (GetMonGender(&sMonSummaryScreen->currentMon) == MON_FEMALE) - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], 2, 105, 2, sLevelNickTextColors[3], 0, sMonSummaryScreen->summary.genderSymbolStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], FONT_2, 105, 2, sLevelNickTextColors[3], 0, sMonSummaryScreen->summary.genderSymbolStrBuf); else - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], 2, 105, 2, sLevelNickTextColors[2], 0, sMonSummaryScreen->summary.genderSymbolStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK], FONT_2, 105, 2, sLevelNickTextColors[2], 0, sMonSummaryScreen->summary.genderSymbolStrBuf); } PutWindowTilemap(sMonSummaryScreen->windowIds[POKESUM_WIN_LVL_NICK]); @@ -2465,14 +2465,14 @@ static void PokeSum_PrintRightPaneText(void) static void PrintInfoPage(void) { - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 47, 19, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.speciesNameStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 47, 19, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.speciesNameStrBuf); if (!sMonSummaryScreen->isEgg) { - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 47 + sMonSkillsPrinterXpos->unk00, 5, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.dexNumStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 47, 49, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.otNameStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 47, 64, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.unk306C); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 47, 79, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.itemNameStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 47 + sMonSkillsPrinterXpos->unk00, 5, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.dexNumStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 47, 49, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.otNameStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 47, 64, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.unk306C); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 47, 79, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.itemNameStrBuf); } else { @@ -2493,20 +2493,20 @@ static void PrintInfoPage(void) if (sMonSummaryScreen->isBadEgg) hatchMsgIndex = 0; - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 7, 45, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sEggHatchTimeTexts[hatchMsgIndex]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 7, 45, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sEggHatchTimeTexts[hatchMsgIndex]); } } static void PrintSkillsPage(void) { - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 14 + sMonSkillsPrinterXpos->curHpStr, 4, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.curHpStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 50 + sMonSkillsPrinterXpos->atkStr, 22, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_ATK]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 50 + sMonSkillsPrinterXpos->defStr, 35, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_DEF]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 50 + sMonSkillsPrinterXpos->spAStr, 48, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPA]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 50 + sMonSkillsPrinterXpos->spDStr, 61, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPD]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 50 + sMonSkillsPrinterXpos->speStr, 74, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPE]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 15 + sMonSkillsPrinterXpos->expStr, 87, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.expPointsStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 15 + sMonSkillsPrinterXpos->toNextLevel, 100, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.expToNextLevelStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 14 + sMonSkillsPrinterXpos->curHpStr, 4, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.curHpStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 50 + sMonSkillsPrinterXpos->atkStr, 22, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_ATK]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 50 + sMonSkillsPrinterXpos->defStr, 35, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_DEF]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 50 + sMonSkillsPrinterXpos->spAStr, 48, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPA]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 50 + sMonSkillsPrinterXpos->spDStr, 61, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPD]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 50 + sMonSkillsPrinterXpos->speStr, 74, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.statValueStrBufs[PSS_STAT_SPE]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 15 + sMonSkillsPrinterXpos->expStr, 87, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.expPointsStrBuf); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 15 + sMonSkillsPrinterXpos->toNextLevel, 100, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.expToNextLevelStrBuf); } #define GetMoveNamePrinterYpos(x) ((x) * 28 + 5) @@ -2524,7 +2524,7 @@ static void PrintMovesPage(void) if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE) PokeSum_PrintMoveName(4); else - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 3, GetMoveNamePrinterYpos(4), sPrintMoveTextColors[0], TEXT_SKIP_DRAW, gFameCheckerText_Cancel); } @@ -2541,7 +2541,7 @@ static void PokeSum_PrintMoveName(u8 i) if (i == 4) curPP = maxPP; - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 3, GetMoveNamePrinterYpos(i), sPrintMoveTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveNameStrBufs[i]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 3, GetMoveNamePrinterYpos(i), sPrintMoveTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveNameStrBufs[i]); if (sMonSummaryScreen->moveIds[i] == 0 || (curPP == maxPP)) colorIdx = 0; @@ -2567,14 +2567,14 @@ static void PokeSum_PrintMoveName(u8 i) colorIdx = 1; } - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 36, GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 36, GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, gText_PokeSum_PP); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 46 + sMonSkillsPrinterXpos->curPp[i], GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveCurPpStrBufs[i]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 46 + sMonSkillsPrinterXpos->curPp[i], GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveCurPpStrBufs[i]); if (sMonSummaryScreen->moveIds[i] != MOVE_NONE) { - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 58, GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, gText_Slash); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], 2, 64 + sMonSkillsPrinterXpos->maxPp[i], GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveMaxPpStrBufs[i]); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 58, GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, gText_Slash); + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_RIGHT_PANE], FONT_2, 64 + sMonSkillsPrinterXpos->maxPp[i], GetMovePpPinterYpos(i), sPrintMoveTextColors[colorIdx], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveMaxPpStrBufs[i]); } } @@ -2679,7 +2679,7 @@ static void PokeSum_PrintTrainerMemo_Mon_HeldByOT(void) } } - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); } static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void) @@ -2728,7 +2728,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void) DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_MetInATrade); } - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); return; } @@ -2776,7 +2776,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void) } } - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, natureMetOrHatchedAtLevelStr); } static void PokeSum_PrintTrainerMemo_Mon(void) @@ -2837,17 +2837,17 @@ static void PokeSum_PrintTrainerMemo_Egg(void) if (sMonSummaryScreen->isBadEgg) chosenStrIndex = 0; - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sEggOriginTexts[chosenStrIndex]); + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 0, 3, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sEggOriginTexts[chosenStrIndex]); } static void PokeSum_PrintExpPoints_NextLv(void) { - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 26, 7, sLevelNickTextColors[0], TEXT_SKIP_DRAW, gText_PokeSum_ExpPoints); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 26, 20, sLevelNickTextColors[0], TEXT_SKIP_DRAW, gText_PokeSum_NextLv); @@ -2860,17 +2860,17 @@ static void PokeSum_PrintSelectedMoveStats(void) if (sMonSummaryScreen->mode != PSS_MODE_SELECT_MOVE && sMoveSelectionCursorPos == 4) return; - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 57, 1, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.movePowerStrBufs[sMoveSelectionCursorPos]); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 57, 15, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.moveAccuracyStrBufs[sMoveSelectionCursorPos]); - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 7, 42, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, @@ -2900,10 +2900,10 @@ static void PokeSum_PrintAbilityNameAndDesc(void) { FillWindowPixelBuffer(sMonSummaryScreen->windowIds[5], 0); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[5], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[5], FONT_2, 66, 1, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.abilityNameStrBuf); - AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[5], 2, + AddTextPrinterParameterized3(sMonSummaryScreen->windowIds[5], FONT_2, 2, 15, sLevelNickTextColors[0], TEXT_SKIP_DRAW, sMonSummaryScreen->summary.abilityDescStrBuf); @@ -3893,7 +3893,7 @@ static void Task_InputHandler_SelectOrForgetMove(u8 taskId) break; case 5: FillWindowPixelBuffer(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 0); - AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], 2, + AddTextPrinterParameterized4(sMonSummaryScreen->windowIds[POKESUM_WIN_TRAINER_MEMO], FONT_2, 7, 42, 0, 0, sLevelNickTextColors[0], TEXT_SKIP_DRAW, diff --git a/src/quest_log.c b/src/quest_log.c index 5614f834a..1e3ba901d 100644 --- a/src/quest_log.c +++ b/src/quest_log.c @@ -496,7 +496,7 @@ void DrawPreviouslyOnQuestHeader(u8 sceneNum) StringAppend(gStringVar4, gStringVar1); } - AddTextPrinterParameterized4(sQuestLogHeaderWindowIds[0], 2, 2, 2, 1, 2, sTextColors, 0, gStringVar4); + AddTextPrinterParameterized4(sQuestLogHeaderWindowIds[0], FONT_2, 2, 2, 1, 2, sTextColors, 0, gStringVar4); PutWindowTilemap(sQuestLogHeaderWindowIds[0]); PutWindowTilemap(sQuestLogHeaderWindowIds[1]); CopyWindowToVram(sQuestLogHeaderWindowIds[0], COPYWIN_GFX); @@ -991,7 +991,7 @@ static void DrawQuestLogSceneDescription(void) PutWindowTilemap(sQuestLogHeaderWindowIds[2]); sub_8111D90(sQuestLogHeaderWindowIds[2]); - AddTextPrinterParameterized4(sQuestLogHeaderWindowIds[2], 2, 2, sQuestLogTextLineYCoords[numLines], 1, 0, sTextColors, 0, gStringVar4); + AddTextPrinterParameterized4(sQuestLogHeaderWindowIds[2], FONT_2, 2, sQuestLogTextLineYCoords[numLines], 1, 0, sTextColors, 0, gStringVar4); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/region_map.c b/src/region_map.c index e897d3de3..1c7a74590 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -1886,7 +1886,7 @@ static void DisplayCurrentMapName(void) else { GetMapName(sRegionMap->mapName, GetMapsecUnderCursor(), 0); - AddTextPrinterParameterized3(WIN_MAP_NAME, 2, 2, 2, sTextColor_White, 0, sRegionMap->mapName); + AddTextPrinterParameterized3(WIN_MAP_NAME, FONT_2, 2, 2, sTextColor_White, 0, sRegionMap->mapName); PutWindowTilemap(WIN_MAP_NAME); CopyWindowToVram(WIN_MAP_NAME, COPYWIN_GFX); SetGpuWindowDims(WIN_MAP_NAME, &sMapsecNameWindowDims[WIN_MAP_NAME]); @@ -1918,7 +1918,7 @@ static void DisplayCurrentDungeonName(void) sRegionMap->dungeonWinBottom = 48; FillWindowPixelBuffer(WIN_DUNGEON_NAME, PIXEL_FILL(0)); StringCopy(sRegionMap->dungeonName, sMapNames[descOffset]); - AddTextPrinterParameterized3(WIN_DUNGEON_NAME, 2, 12, 2, sTextColorTable[GetSelectedMapsecType(LAYER_DUNGEON) - 2], 0, sRegionMap->dungeonName); + AddTextPrinterParameterized3(WIN_DUNGEON_NAME, FONT_2, 12, 2, sTextColorTable[GetSelectedMapsecType(LAYER_DUNGEON) - 2], 0, sRegionMap->dungeonName); PutWindowTilemap(WIN_DUNGEON_NAME); CopyWindowToVram(WIN_DUNGEON_NAME, COPYWIN_FULL); } @@ -2500,8 +2500,8 @@ static void Task_DrawDungeonMapPreviewFlavorText(u8 taskId) // Draw text if (sDungeonMapPreview->timer > 25) { - AddTextPrinterParameterized3(WIN_MAP_PREVIEW, 2, 4, 0, sTextColor_Green, -1, GetDungeonName(GetDungeonMapsecUnderCursor())); - AddTextPrinterParameterized3(WIN_MAP_PREVIEW, 2, 2, 14, sTextColor_White, -1, GetDungeonFlavorText(GetDungeonMapsecUnderCursor())); + AddTextPrinterParameterized3(WIN_MAP_PREVIEW, FONT_2, 4, 0, sTextColor_Green, -1, GetDungeonName(GetDungeonMapsecUnderCursor())); + AddTextPrinterParameterized3(WIN_MAP_PREVIEW, FONT_2, 2, 14, sTextColor_White, -1, GetDungeonFlavorText(GetDungeonMapsecUnderCursor())); CopyWindowToVram(WIN_MAP_PREVIEW, COPYWIN_FULL); sDungeonMapPreview->drawState++; } @@ -4283,7 +4283,7 @@ static void PrintTopBarTextLeft(const u8 *str) FillWindowPixelBuffer(WIN_TOPBAR_LEFT, PIXEL_FILL(0)); else FillWindowPixelBuffer(WIN_TOPBAR_LEFT, PIXEL_FILL(15)); - AddTextPrinterParameterized3(WIN_TOPBAR_LEFT, 0, 0, 0, sTextColors, 0, str); + AddTextPrinterParameterized3(WIN_TOPBAR_LEFT, FONT_0, 0, 0, sTextColors, 0, str); CopyWindowToVram(WIN_TOPBAR_LEFT, COPYWIN_GFX); } @@ -4293,7 +4293,7 @@ static void PrintTopBarTextRight(const u8 *str) FillWindowPixelBuffer(WIN_TOPBAR_RIGHT, PIXEL_FILL(0)); else FillWindowPixelBuffer(WIN_TOPBAR_RIGHT, PIXEL_FILL(15)); - AddTextPrinterParameterized3(WIN_TOPBAR_RIGHT, 0, 0, 0, sTextColors, 0, str); + AddTextPrinterParameterized3(WIN_TOPBAR_RIGHT, FONT_0, 0, 0, sTextColors, 0, str); CopyWindowToVram(WIN_TOPBAR_RIGHT, COPYWIN_FULL); } diff --git a/src/scrcmd.c b/src/scrcmd.c index 523523548..823593623 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1561,7 +1561,7 @@ bool8 ScrCmd_braillemessage(struct ScriptContext * ctx) LoadStdWindowFrameGfx(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, 6, ptr, 0, 1, 0, NULL); + AddTextPrinterParameterized(0, FONT_6, ptr, 0, 1, 0, NULL); return FALSE; } @@ -1571,7 +1571,7 @@ bool8 ScrCmd_getbraillestringwidth(struct ScriptContext * ctx) if (ptr == NULL) ptr = (u8 *)ctx->data[0]; - gSpecialVar_0x8004 = GetStringWidth(6, ptr, -1); + gSpecialVar_0x8004 = GetStringWidth(FONT_6, ptr, -1); return FALSE; } diff --git a/src/script_menu.c b/src/script_menu.c index 8b6b277f9..384881982 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -664,7 +664,7 @@ static const u8 *const sSeagallopDestStrings[] = { static u16 GetStringTilesWide(const u8 *str) { - return (GetStringWidth(1, str, 0) + 7) / 8; + return (GetStringWidth(FONT_1, str, 0) + 7) / 8; } static u8 GetMenuWidthFromList(const struct MenuAction * items, u8 count) @@ -719,7 +719,7 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres strWidth = 0; for (i = 0; i < count; i++) { - tmp = GetStringWidth(2, list[i].text, 0); + tmp = GetStringWidth(FONT_2, list[i].text, 0); if (tmp > strWidth) strWidth = tmp; } @@ -730,10 +730,10 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres windowId = CreateWindowFromRect(left, top, width, height); SetStdWindowBorderStyle(windowId, FALSE); if (mcId == 30 || mcId == 13 || mcId == 41) - MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); + MultichoiceList_PrintItems(windowId, FONT_2, 8, 2, 14, count, list, 0, 2); else - MultichoiceList_PrintItems(windowId, 2, 8, 2, 14, count, list, 0, 2); - Menu_InitCursor(windowId, 2, 0, 2, 14, count, initPos); + MultichoiceList_PrintItems(windowId, FONT_2, 8, 2, 14, count, list, 0, 2); + Menu_InitCursor(windowId, FONT_2, 0, 2, 14, count, initPos); CreateMCMenuInputHandlerTask(ignoreBpress, count, windowId, mcId); ScheduleBgCopyTilemapToVram(0); } @@ -827,15 +827,15 @@ static void MultiChoicePrintHelpDescription(u8 mcId) { case 39: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; case 47: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; case 50: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; } } @@ -909,8 +909,8 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co gTasks[taskId].data[4] = a4; gTasks[taskId].data[6] = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); SetStdWindowBorderStyle(gTasks[taskId].data[6], FALSE); - MultichoiceGrid_PrintItems(gTasks[taskId].data[6], 1, width * 8, 16, columnCount, rowCount, list); - MultichoiceGrid_InitCursor(gTasks[taskId].data[6], 1, 0, 1, width * 8, columnCount, rowCount, 0); + MultichoiceGrid_PrintItems(gTasks[taskId].data[6], FONT_1, width * 8, 16, columnCount, rowCount, list); + MultichoiceGrid_InitCursor(gTasks[taskId].data[6], FONT_1, 0, 1, width * 8, columnCount, rowCount, 0); ScheduleBgCopyTilemapToVram(0); } return TRUE; @@ -950,8 +950,8 @@ bool8 CreatePCMenu(void) static void CreatePCMenuWindow(void) { - u8 cursorWidth = GetMenuCursorDimensionByFont(2, 0); - u8 height = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + u8 cursorWidth = GetMenuCursorDimensionByFont(FONT_2, 0); + u8 height = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT); u8 windowWidth; u8 nitems; u8 windowId; @@ -973,9 +973,9 @@ static void CreatePCMenuWindow(void) nitems = 5; windowId = CreateWindowFromRect(0, 0, windowWidth, 10); SetStdWindowBorderStyle(windowId, FALSE); - AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 66, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_LogOff, cursorWidth, 66, 0xFF, NULL); } else { @@ -986,16 +986,16 @@ static void CreatePCMenuWindow(void) windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); SetStdWindowBorderStyle(windowId, FALSE); if (FlagGet(FLAG_SYS_POKEDEX_GET)) - AddTextPrinterParameterized(windowId, 2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, 2, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); } if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) - AddTextPrinterParameterized(windowId, 2, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); else - AddTextPrinterParameterized(windowId, 2, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); StringExpandPlaceholders(gStringVar4, gText_SPc); Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); - Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + Menu_InitCursor(windowId, FONT_2, 0, 2, 16, nitems, 0); CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); ScheduleBgCopyTilemapToVram(0); } @@ -1003,7 +1003,7 @@ static void CreatePCMenuWindow(void) void ScriptMenu_DisplayPCStartupPrompt(void) { sub_80F7768(0, TRUE); - AddTextPrinterParameterized2(0, 2, Text_AccessWhichPC, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, Text_AccessWhichPC, 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); } static void Task_ScriptShowMonPic(u8 taskId) @@ -1221,24 +1221,24 @@ void DrawSeagallopDestinationMenu(void) nitems = 6; top = 0; } - cursorWidth = GetMenuCursorDimensionByFont(2, 0); - fontHeight = GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT); + cursorWidth = GetMenuCursorDimensionByFont(FONT_2, 0); + fontHeight = GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT); windowId = CreateWindowFromRect(17, top, 11, nitems * 2); SetStdWindowBorderStyle(windowId, FALSE); for (i = 0; i < nitems - 2; i++) { if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, 2, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); else i--; r4++; if (r4 == SEAGALLOP_CINNABAR_ISLAND) r4 = SEAGALLOP_VERMILION_CITY; } - AddTextPrinterParameterized(windowId, 2, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); i++; - AddTextPrinterParameterized(windowId, 2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); - Menu_InitCursor(windowId, 2, 0, 2, 16, nitems, 0); + AddTextPrinterParameterized(windowId, FONT_2, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); + Menu_InitCursor(windowId, FONT_2, 0, 2, 16, nitems, 0); CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); ScheduleBgCopyTilemapToVram(0); } diff --git a/src/shop.c b/src/shop.c index f9c190a49..e9eb7097f 100644 --- a/src/shop.c +++ b/src/shop.c @@ -63,7 +63,7 @@ struct ShopData /*0x12*/ u16 field12; /*0x14*/ u16 maxQuantity; /*0x16*/ u16 martType:4; // 0x1 if tm list - u16 unk16_4:5; + u16 fontId:5; u16 itemSlot:2; u16 unk16_11:5; /*0x18*/ u16 unk18; @@ -218,14 +218,14 @@ static u8 CreateShopMenu(u8 a0) gShopData.martType = GetMartTypeFromItemList(a0); gShopData.selectedRow = 0; if (ContextNpcGetTextColor() == 0) - gShopData.unk16_4 = 4; + gShopData.fontId = FONT_4; else - gShopData.unk16_4 = 5; + gShopData.fontId = FONT_5; sShopMenuWindowId = AddWindow(&sShopMenuWindowTemplate); SetStdWindowBorderStyle(sShopMenuWindowId, 0); - PrintTextArray(sShopMenuWindowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 16, 3, sShopMenuActions_BuySellQuit); - Menu_InitCursor(sShopMenuWindowId, 2, 0, 2, 16, 3, 0); + PrintTextArray(sShopMenuWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 16, 3, sShopMenuActions_BuySellQuit); + Menu_InitCursor(sShopMenuWindowId, FONT_2, 0, 2, 16, 3, 0); PutWindowTilemap(sShopMenuWindowId); CopyWindowToVram(sShopMenuWindowId, COPYWIN_MAP); return CreateTask(Task_ShopMenu, 8); @@ -338,7 +338,7 @@ static void Task_ReturnToShopMenu(u8 taskId) if (IsWeatherNotFadingIn() != TRUE) return; - DisplayItemMessageOnField(taskId, GetMartUnk16_4(), gText_CanIHelpWithAnythingElse, ShowShopMenuAfterExitingBuyOrSellMenu); + DisplayItemMessageOnField(taskId, GetMartFontId(), gText_CanIHelpWithAnythingElse, ShowShopMenuAfterExitingBuyOrSellMenu); } static void ShowShopMenuAfterExitingBuyOrSellMenu(u8 taskId) @@ -547,8 +547,8 @@ bool8 BuyMenuBuildListMenuTemplate(void) gMultiuseListMenuTemplate.upText_Y = 2; gMultiuseListMenuTemplate.fontId = 2; gMultiuseListMenuTemplate.fillValue = 0; - gMultiuseListMenuTemplate.cursorPal = GetFontAttribute(2, FONTATTR_COLOR_FOREGROUND); - gMultiuseListMenuTemplate.cursorShadowPal = GetFontAttribute(2, FONTATTR_COLOR_SHADOW); + gMultiuseListMenuTemplate.cursorPal = GetFontAttribute(FONT_2, FONTATTR_COLOR_FOREGROUND); + gMultiuseListMenuTemplate.cursorShadowPal = GetFontAttribute(FONT_2, FONTATTR_COLOR_SHADOW); gMultiuseListMenuTemplate.moveCursorFunc = BuyMenuPrintItemDescriptionAndShowItemIcon; gMultiuseListMenuTemplate.itemPrintFunc = BuyMenuPrintPriceInList; gMultiuseListMenuTemplate.scrollMultiple = 0; @@ -597,13 +597,13 @@ static void BuyMenuPrintItemDescriptionAndShowItemIcon(s32 item, bool8 onInit, s CreateItemMenuIcon(ITEM_N_A, gShopData.itemSlot); gShopData.itemSlot ^= 1; - BuyMenuPrint(5, 2, description, 0, 3, 2, 1, 0, 0); + BuyMenuPrint(5, FONT_2, description, 0, 3, 2, 1, 0, 0); } else //TM Mart { FillWindowPixelBuffer(6, PIXEL_FILL(0)); LoadTmHmNameInMart(item); - BuyMenuPrint(5, 2, description, 2, 3, 1, 0, 0, 0); + BuyMenuPrint(5, FONT_2, description, 2, 3, 1, 0, 0, 0); } } @@ -620,7 +620,7 @@ static void BuyMenuPrintPriceInList(u8 windowId, u32 item, u8 y) while (x-- != 0) *loc++ = 0; StringExpandPlaceholders(loc, gText_PokedollarVar1); - BuyMenuPrint(windowId, 0, gStringVar4, 0x69, y, 0, 0, TEXT_SKIP_DRAW, 1); + BuyMenuPrint(windowId, FONT_0, gStringVar4, 0x69, y, 0, 0, TEXT_SKIP_DRAW, 1); } } @@ -631,20 +631,20 @@ static void LoadTmHmNameInMart(s32 item) ConvertIntToDecimalStringN(gStringVar1, item - ITEM_DEVON_SCOPE, 2, 2); StringCopy(gStringVar4, gOtherText_UnkF9_08_Clear_01); StringAppend(gStringVar4, gStringVar1); - BuyMenuPrint(6, 0, gStringVar4, 0, 0, 0, 0, TEXT_SKIP_DRAW, 1); + BuyMenuPrint(6, FONT_0, gStringVar4, 0, 0, 0, 0, TEXT_SKIP_DRAW, 1); StringCopy(gStringVar4, gMoveNames[ItemIdToBattleMoveId(item)]); - BuyMenuPrint(6, 2, gStringVar4, 0, 0x10, 0, 0, 0, 1); + BuyMenuPrint(6, FONT_2, gStringVar4, 0, 0x10, 0, 0, 0, 1); } else { - BuyMenuPrint(6, 0, gText_ThreeHyphens, 0, 0, 0, 0, TEXT_SKIP_DRAW, 1); - BuyMenuPrint(6, 2, gText_SevenHyphens, 0, 0x10, 0, 0, 0, 1); + BuyMenuPrint(6, FONT_0, gText_ThreeHyphens, 0, 0, 0, 0, TEXT_SKIP_DRAW, 1); + BuyMenuPrint(6, FONT_2, gText_SevenHyphens, 0, 0x10, 0, 0, 0, 1); } } -u8 GetMartUnk16_4(void) +u8 GetMartFontId(void) { - return gShopData.unk16_4; + return gShopData.fontId; } static void BuyMenuPrintCursor(u8 listTaskId, u8 a1) @@ -656,12 +656,12 @@ static void BuyMenuPrintCursorAtYPosition(u8 y, u8 a1) { if (a1 == 0xFF) { - FillWindowPixelRect(4, 0, 1, y, GetFontAttribute(2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(2, FONTATTR_MAX_LETTER_HEIGHT)); + FillWindowPixelRect(4, 0, 1, y, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); CopyWindowToVram(4, COPYWIN_GFX); } else { - BuyMenuPrint(4, 2, gText_SelectorArrow2, 1, y, 0, 0, 0, a1); + BuyMenuPrint(4, FONT_2, gText_SelectorArrow2, 1, y, 0, 0, 0, a1); } } @@ -880,7 +880,7 @@ static void BuyMenuPrintItemQuantityAndPrice(u8 taskId) PrintMoneyAmount(3, 0x36, 0xA, gShopData.itemPrice, TEXT_SKIP_DRAW); ConvertIntToDecimalStringN(gStringVar1, tItemCount, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - BuyMenuPrint(3, 0, gStringVar4, 2, 0xA, 0, 0, 0, 1); + BuyMenuPrint(3, FONT_0, gStringVar4, 2, 0xA, 0, 0, 0, 1); } static void Task_BuyMenu(u8 taskId) @@ -930,7 +930,7 @@ static void Task_BuyHowManyDialogueInit(u8 taskId) BuyMenuQuantityBoxThinBorder(1, 0); ConvertIntToDecimalStringN(gStringVar1, quantityInBag, STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_InBagVar1); - BuyMenuPrint(1, 2, gStringVar4, 0, 2, 0, 0, 0, 1); + BuyMenuPrint(1, FONT_2, gStringVar4, 0, 2, 0, 0, 0, 1); tItemCount = 1; BuyMenuQuantityBoxNormalBorder(3, 0); BuyMenuPrintItemQuantityAndPrice(taskId); diff --git a/src/slot_machine.c b/src/slot_machine.c index 7c8392c78..8ec307ea0 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -1988,11 +1988,11 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData FillWindowPixelBuffer(1, 0xFF); PutWindowTilemap(1); - x = 236 - GetStringWidth(0, gString_SlotMachineControls, 0); + x = 236 - GetStringWidth(FONT_0, gString_SlotMachineControls, 0); textColor[0] = TEXT_DYNAMIC_COLOR_6; textColor[1] = TEXT_COLOR_WHITE; textColor[2] = TEXT_COLOR_DARK_GRAY; - AddTextPrinterParameterized3(1, 0, x, 0, textColor, 0, gString_SlotMachineControls); + AddTextPrinterParameterized3(1, FONT_0, x, 0, textColor, 0, gString_SlotMachineControls); CopyBgTilemapBufferToVram(0); SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_MODE_0 | 0x20 | DISPCNT_OBJ_1D_MAP | DISPCNT_OBJ_ON); @@ -2265,7 +2265,7 @@ static void Slot_PrintOnWindow0(const u8 * str) FillWindowPixelBuffer(0, PIXEL_FILL(1)); PutWindowTilemap(0); DrawTextBorderOuter(0, 0x001, 15); - AddTextPrinterParameterized5(0, 2, str, 1, 2, TEXT_SKIP_DRAW, NULL, 1, 2); + AddTextPrinterParameterized5(0, FONT_2, str, 1, 2, TEXT_SKIP_DRAW, NULL, 1, 2); } static void Slot_ClearWindow0(void) @@ -2387,7 +2387,7 @@ static void SignalStopWinningLineFlashTask(void) static void Slot_CreateYesNoMenu(u8 cursorPos) { - CreateYesNoMenu(&sYesNoWindowTemplate, 2, 0, 2, 10, 13, cursorPos); + CreateYesNoMenu(&sYesNoWindowTemplate, FONT_2, 0, 2, 10, 13, cursorPos); Menu_MoveCursorNoWrapAround(cursorPos); GetSlotMachineSetupTaskDataPtr()->yesNoMenuActive = TRUE; } diff --git a/src/start_menu.c b/src/start_menu.c index 4dba3ce92..f4e1e825f 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -253,7 +253,7 @@ static void DrawSafariZoneStatsWindow(void) ConvertIntToDecimalStringN(gStringVar2, 600, STR_CONV_MODE_RIGHT_ALIGN, 3); ConvertIntToDecimalStringN(gStringVar3, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); StringExpandPlaceholders(gStringVar4, gUnknown_84162A9); - AddTextPrinterParameterized(sSafariZoneStatsWindowId,2, gStringVar4, 4, 3, 0xFF, NULL); + AddTextPrinterParameterized(sSafariZoneStatsWindowId, FONT_2, gStringVar4, 4, 3, 0xFF, NULL); CopyWindowToVram(sSafariZoneStatsWindowId, COPYWIN_GFX); } @@ -279,7 +279,7 @@ static s8 PrintStartMenuItems(s8 *cursor_p, u8 nitems) else { StringExpandPlaceholders(gStringVar4, sStartMenuActionTable[sStartMenuOrder[i]].text); - AddTextPrinterParameterized(GetStartMenuWindowId(), 2, gStringVar4, 8, i * 15, 0xFF, NULL); + AddTextPrinterParameterized(GetStartMenuWindowId(), FONT_2, gStringVar4, 8, i * 15, 0xFF, NULL); } i++; if (i >= sNumStartMenuItems) @@ -318,7 +318,7 @@ static s8 DoDrawStartMenu(void) sDrawStartMenuState[0]++; break; case 5: - sStartMenuCursorPos = Menu_InitCursor(GetStartMenuWindowId(), 2, 0, 0, 15, sNumStartMenuItems, sStartMenuCursorPos); + sStartMenuCursorPos = Menu_InitCursor(GetStartMenuWindowId(), FONT_2, 0, 0, 15, sNumStartMenuItems, sStartMenuCursorPos); if (!MenuHelpers_LinkSomething() && InUnionRoom() != TRUE && gSaveBlock2Ptr->optionsButtonMode == OPTIONS_BUTTON_MODE_HELP) { DrawHelpMessageWindowWithText(sStartMenuDescPointers[sStartMenuOrder[sStartMenuCursorPos]]); @@ -909,7 +909,7 @@ static void task50_after_link_battle_save(u8 taskId) { case 0: FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, 2, gText_SavingDontTurnOffThePower2, 0xFF, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_2, gText_SavingDontTurnOffThePower2, 0xFF, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); DrawTextBorderOuter(0, 0x008, 0x0F); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); @@ -960,26 +960,26 @@ static void PrintSaveStats(void) TextWindow_SetStdFrame0_WithPal(sSaveStatsWindowId, 0x21D, 0xD0); DrawStdFrameWithCustomTileAndPalette(sSaveStatsWindowId, FALSE, 0x21D, 0x0D); SaveStatToString(SAVE_STAT_LOCATION, gStringVar4, 8); - x = (u32)(112 - GetStringWidth(2, gStringVar4, -1)) / 2; - AddTextPrinterParameterized3(sSaveStatsWindowId, 2, x, 0, sTextColor_LocationHeader, -1, gStringVar4); - x = (u32)(112 - GetStringWidth(2, gStringVar4, -1)) / 2; - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 2, 14, sTextColor_StatName, -1, gSaveStatName_Player); + x = (u32)(112 - GetStringWidth(FONT_2, gStringVar4, -1)) / 2; + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_2, x, 0, sTextColor_LocationHeader, -1, gStringVar4); + x = (u32)(112 - GetStringWidth(FONT_2, gStringVar4, -1)) / 2; + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 2, 14, sTextColor_StatName, -1, gSaveStatName_Player); SaveStatToString(SAVE_STAT_NAME, gStringVar4, 2); Menu_PrintFormatIntlPlayerName(sSaveStatsWindowId, gStringVar4, 60, 14); - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 2, 28, sTextColor_StatName, -1, gSaveStatName_Badges); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 2, 28, sTextColor_StatName, -1, gSaveStatName_Badges); SaveStatToString(SAVE_STAT_BADGES, gStringVar4, 2); - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 60, 28, sTextColor_StatValue, -1, gStringVar4); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 60, 28, sTextColor_StatValue, -1, gStringVar4); y = 42; if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) { - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 2, 42, sTextColor_StatName, -1, gSaveStatName_Pokedex); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 2, 42, sTextColor_StatName, -1, gSaveStatName_Pokedex); SaveStatToString(SAVE_STAT_POKEDEX, gStringVar4, 2); - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 60, 42, sTextColor_StatValue, -1, gStringVar4); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 60, 42, sTextColor_StatValue, -1, gStringVar4); y = 56; } - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 2, y, sTextColor_StatName, -1, gSaveStatName_Time); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 2, y, sTextColor_StatName, -1, gSaveStatName_Time); SaveStatToString(SAVE_STAT_TIME, gStringVar4, 2); - AddTextPrinterParameterized3(sSaveStatsWindowId, 0, 60, y, sTextColor_StatValue, -1, gStringVar4); + AddTextPrinterParameterized3(sSaveStatsWindowId, FONT_0, 60, y, sTextColor_StatValue, -1, gStringVar4); CopyWindowToVram(sSaveStatsWindowId, COPYWIN_GFX); } diff --git a/src/strings.c b/src/strings.c index 0855152f5..abbcded06 100644 --- a/src/strings.c +++ b/src/strings.c @@ -207,15 +207,15 @@ const u8 gUnknown_84166A7[] = _("The POKé FLUTE awakened sleeping\nPOKéMON.{PA const u8 gText_TMCase[] = _("TM CASE"); const u8 gText_Close[] = _("CLOSE"); const u8 gText_TMCaseWillBePutAway[] = _("The TM CASE will be\nput away."); -const u8 gText_FontSize0[] = _("{SIZE 0}"); -const u8 gText_FontSize2[] = _("{SIZE 2}"); +const u8 gText_FontSize0[] = _("{FONT_0}"); +const u8 gText_FontSize2[] = _("{FONT_2}"); const u8 gUnknown_8416707[] = _(" "); const u8 gText_BerryPouch[] = _("BERRY POUCH"); const u8 gText_TheBerryPouchWillBePutAway[] = _("The BERRY POUCH will be\nput away."); const u8 gText_ShopBuy[] = _("BUY"); const u8 gText_ShopSell[] = _("SELL"); const u8 gText_ShopQuit[] = _("SEE YA!"); -const u8 gText_InBagVar1[] = _("IN BAG:{SMALL} {STR_VAR_1}"); +const u8 gText_InBagVar1[] = _("IN BAG:{FONT_0} {STR_VAR_1}"); const u8 gText_QuitShopping[] = _("Quit shopping."); const u8 gText_Var1CertainlyHowMany[] = _("{STR_VAR_1}? Certainly.\nHow many would you like?"); const u8 gText_Var1AndYouWantedVar2[] = _("{STR_VAR_1}, and you want {STR_VAR_2}.\nThat will be ¥{STR_VAR_3}. Okay?"); @@ -419,11 +419,11 @@ const u8 gText_DoubleBattle[] = _("DOUBLE BATTLE"); const u8 gText_MultiBattle[] = _("MULTI BATTLE"); const u8 gText_MakeAChallenge[] = _("Make a challenge."); const u8 gText_Info_2[] = _("INFO"); -const u8 gText_FreshWater_200[] = _("FRESH WATER{CLEAR_TO 0x57}{SMALL}¥200"); -const u8 gText_SodaPop_300[] = _("SODA POP{CLEAR_TO 0x57}{SMALL}¥300"); -const u8 gText_Lemonade_350[] = _("LEMONADE{CLEAR_TO 0x57}{SMALL}¥350"); -const u8 gText_50Coins_1000[] = _("{SMALL} 50 COINS{CLEAR_TO 0x45}¥1,000"); -const u8 gText_500Coins_10000[] = _("{SMALL}500 COINS{CLEAR_TO 0x40}¥10,000"); +const u8 gText_FreshWater_200[] = _("FRESH WATER{CLEAR_TO 0x57}{FONT_0}¥200"); +const u8 gText_SodaPop_300[] = _("SODA POP{CLEAR_TO 0x57}{FONT_0}¥300"); +const u8 gText_Lemonade_350[] = _("LEMONADE{CLEAR_TO 0x57}{FONT_0}¥350"); +const u8 gText_50Coins_1000[] = _("{FONT_0} 50 COINS{CLEAR_TO 0x45}¥1,000"); +const u8 gText_500Coins_10000[] = _("{FONT_0}500 COINS{CLEAR_TO 0x40}¥10,000"); const u8 gText_Excellent[] = _("Excellent"); const u8 gText_NotSoBad[] = _("Not so bad"); const u8 gText_RedShard[] = _("RED SHARD"); @@ -433,11 +433,11 @@ const u8 gText_GreenShard[] = _("GREEN SHARD"); const u8 gUnknown_8417A30[] = _("バトルタワ-"); const u8 gText_Right[] = _("Right"); const u8 gText_Left[] = _("Left"); -const u8 gText_Tm13_4000Coins[] = _("TM13{CLEAR_TO 0x48}{SMALL}4,000 COINS"); -const u8 gText_Tm23_3500Coins[] = _("TM23{CLEAR_TO 0x48}{SMALL}3,500 COINS"); -const u8 gText_Tm24_4000Coins[] = _("TM24{CLEAR_TO 0x48}{SMALL}4,000 COINS"); -const u8 gText_Tm30_4500Coins[] = _("TM30{CLEAR_TO 0x48}{SMALL}4,500 COINS"); -const u8 gText_Tm35_4000Coins[] = _("TM35{CLEAR_TO 0x48}{SMALL}4,000 COINS"); +const u8 gText_Tm13_4000Coins[] = _("TM13{CLEAR_TO 0x48}{FONT_0}4,000 COINS"); +const u8 gText_Tm23_3500Coins[] = _("TM23{CLEAR_TO 0x48}{FONT_0}3,500 COINS"); +const u8 gText_Tm24_4000Coins[] = _("TM24{CLEAR_TO 0x48}{FONT_0}4,000 COINS"); +const u8 gText_Tm30_4500Coins[] = _("TM30{CLEAR_TO 0x48}{FONT_0}4,500 COINS"); +const u8 gText_Tm35_4000Coins[] = _("TM35{CLEAR_TO 0x48}{FONT_0}4,000 COINS"); const u8 gText_1F_2[] = _("1F"); const u8 gText_2F_2[] = _("2F"); const u8 gText_3F_2[] = _("3F"); @@ -485,18 +485,18 @@ const u8 gText_FreshWater[] = _("FRESH WATER"); const u8 gText_SodaPop[] = _("SODA POP"); const u8 gText_Lemonade[] = _("LEMONADE"); const u8 gText_Coins_2[] = _("COINS"); -const u8 gText_Bicycle_1000000[] = _("BICYCLE{CLEAR_TO 0x49}{SMALL}¥1,000,000"); +const u8 gText_Bicycle_1000000[] = _("BICYCLE{CLEAR_TO 0x49}{FONT_0}¥1,000,000"); const u8 gText_NoThanks[] = _("NO THANKS"); -const u8 gText_Abra_180Coins[] = _("ABRA{CLEAR_TO 0x55}{SMALL} 180 COINS"); -const u8 gText_Clefairy_500Coins[] = _("CLEFAIRY{CLEAR_TO 0x55}{SMALL} 500 COINS"); -const u8 gText_Dratini_2800Coins[] = _("DRATINI{CLEAR_TO 0x4B}{SMALL} 2,800 COINS"); -const u8 gText_Scyther_5500Coins[] = _("SCYTHER{CLEAR_TO 0x4B}{SMALL} 5,500 COINS"); -const u8 gText_Porygon_9999Coins[] = _("PORYGON{CLEAR_TO 0x4B}{SMALL} 9,999 COINS"); -const u8 gText_Abra_120Coins[] = _("ABRA{CLEAR_TO 0x55}{SMALL} 120 COINS"); -const u8 gText_Clefairy_750Coins[] = _("CLEFAIRY{CLEAR_TO 0x55}{SMALL} 750 COINS"); -const u8 gText_Pinsir_2500Coins[] = _("PINSIR{CLEAR_TO 0x4B}{SMALL} 2,500 COINS"); -const u8 gText_Dratini_4600Coins[] = _("DRATINI{CLEAR_TO 0x4B}{SMALL} 4,600 COINS"); -const u8 gText_Porygon_6500Coins[] = _("PORYGON{CLEAR_TO 0x4B}{SMALL} 6,500 COINS"); +const u8 gText_Abra_180Coins[] = _("ABRA{CLEAR_TO 0x55}{FONT_0} 180 COINS"); +const u8 gText_Clefairy_500Coins[] = _("CLEFAIRY{CLEAR_TO 0x55}{FONT_0} 500 COINS"); +const u8 gText_Dratini_2800Coins[] = _("DRATINI{CLEAR_TO 0x4B}{FONT_0} 2,800 COINS"); +const u8 gText_Scyther_5500Coins[] = _("SCYTHER{CLEAR_TO 0x4B}{FONT_0} 5,500 COINS"); +const u8 gText_Porygon_9999Coins[] = _("PORYGON{CLEAR_TO 0x4B}{FONT_0} 9,999 COINS"); +const u8 gText_Abra_120Coins[] = _("ABRA{CLEAR_TO 0x55}{FONT_0} 120 COINS"); +const u8 gText_Clefairy_750Coins[] = _("CLEFAIRY{CLEAR_TO 0x55}{FONT_0} 750 COINS"); +const u8 gText_Pinsir_2500Coins[] = _("PINSIR{CLEAR_TO 0x4B}{FONT_0} 2,500 COINS"); +const u8 gText_Dratini_4600Coins[] = _("DRATINI{CLEAR_TO 0x4B}{FONT_0} 4,600 COINS"); +const u8 gText_Porygon_6500Coins[] = _("PORYGON{CLEAR_TO 0x4B}{FONT_0} 6,500 COINS"); const u8 gText_NoThanks_2[] = _("NO THANKS"); const u8 gText_HelixFossil[] = _("HELIX FOSSIL"); const u8 gText_DomeFossil[] = _("DOME FOSSIL"); @@ -532,11 +532,11 @@ const u8 gText_1BigMushroom[] = _("1 BIG MUSHROOM"); const u8 gText_SeviiIslands[] = _("SEVII ISLANDS"); const u8 gText_NavelRock[] = _("NAVEL ROCK"); const u8 gText_BirthIsland[] = _("BIRTH ISLAND"); -const u8 gText_MiracleSeed_1000Coins[] = _("MIRACLE SEED{CLEAR_TO 0x50}{SMALL}1,000 COINS"); -const u8 gText_Charcoal_1000Coins[] = _("CHARCOAL{CLEAR_TO 0x50}{SMALL}1,000 COINS"); -const u8 gText_MysticWater_1000Coins[] = _("MYSTIC WATER{CLEAR_TO 0x50}{SMALL}1,000 COINS"); -const u8 gText_YellowFlute_1600Coins[] = _("YELLOW FLUTE{CLEAR_TO 0x50}{SMALL}1,600 COINS"); -const u8 gText_SmokeBall_800Coins[] = _("SMOKE BALL{CLEAR_TO 0x5A}{SMALL}800 COINS"); +const u8 gText_MiracleSeed_1000Coins[] = _("MIRACLE SEED{CLEAR_TO 0x50}{FONT_0}1,000 COINS"); +const u8 gText_Charcoal_1000Coins[] = _("CHARCOAL{CLEAR_TO 0x50}{FONT_0}1,000 COINS"); +const u8 gText_MysticWater_1000Coins[] = _("MYSTIC WATER{CLEAR_TO 0x50}{FONT_0}1,000 COINS"); +const u8 gText_YellowFlute_1600Coins[] = _("YELLOW FLUTE{CLEAR_TO 0x50}{FONT_0}1,600 COINS"); +const u8 gText_SmokeBall_800Coins[] = _("SMOKE BALL{CLEAR_TO 0x5A}{FONT_0}800 COINS"); const u8 gText_Dummy_8417F67[] = _(""); const u8 gText_Dummy_8417F68[] = _(""); const u8 gText_BecomeLeader[] = _("BECOME LEADER"); @@ -582,17 +582,17 @@ const u8 gText_NowOn[] = _("Now on:"); const u8 gText_LinkedGamePlay[] = _("LINKED GAME PLAY"); const u8 gText_DirectCorner[] = _("DIRECT CORNER"); const u8 gText_UnionRoom[] = _("UNION ROOM"); -const u8 gText_Energypowder_50[] = _("ENERGYPOWDER{CLEAR_TO 0x74}{SMALL}50"); -const u8 gText_EnergyRoot_80[] = _("ENERGY ROOT{CLEAR_TO 0x74}{SMALL}80"); -const u8 gText_HealPowder_50[] = _("HEAL POWDER{CLEAR_TO 0x74}{SMALL}50"); -const u8 gText_RevivalHerb_300[] = _("REVIVAL HERB{CLEAR_TO 0x6F}{SMALL}300"); -const u8 gText_Protein_1000[] = _("PROTEIN{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_Iron_1000[] = _("IRON{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_Carbos_1000[] = _("CARBOS{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_Calcium_1000[] = _("CALCIUM{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_Zinc_1000[] = _("ZINC{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_HpUp_1000[] = _("HP UP{CLEAR_TO 0x65}{SMALL}1,000"); -const u8 gText_PpUp_3000[] = _("PP UP{CLEAR_TO 0x65}{SMALL}3,000"); +const u8 gText_Energypowder_50[] = _("ENERGYPOWDER{CLEAR_TO 0x74}{FONT_0}50"); +const u8 gText_EnergyRoot_80[] = _("ENERGY ROOT{CLEAR_TO 0x74}{FONT_0}80"); +const u8 gText_HealPowder_50[] = _("HEAL POWDER{CLEAR_TO 0x74}{FONT_0}50"); +const u8 gText_RevivalHerb_300[] = _("REVIVAL HERB{CLEAR_TO 0x6F}{FONT_0}300"); +const u8 gText_Protein_1000[] = _("PROTEIN{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_Iron_1000[] = _("IRON{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_Carbos_1000[] = _("CARBOS{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_Calcium_1000[] = _("CALCIUM{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_Zinc_1000[] = _("ZINC{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_HpUp_1000[] = _("HP UP{CLEAR_TO 0x65}{FONT_0}1,000"); +const u8 gText_PpUp_3000[] = _("PP UP{CLEAR_TO 0x65}{FONT_0}3,000"); const u8 gString_BattleRecords_PlayersBattleResults[] = _("{PLAYER}'s BATTLE RESULTS"); const u8 gString_BattleRecords_TotalRecord[] = _("TOTAL RECORD W:{STR_VAR_1} L:{STR_VAR_2} D:{STR_VAR_3}"); const u8 gString_BattleRecords_ColumnHeaders[] = _("WIN{CLEAR_TO 0x30}LOSE{CLEAR_TO 0x60}DRAW"); @@ -911,14 +911,14 @@ const u8 gUnknown_841B285[] = _(" was used on\n"); const u8 gUnknown_841B293[] = _("."); const u8 gUnknown_841B295[] = _("'s level rose to\n"); const u8 gUnknown_841B2A7[] = _("."); -const u8 gUnknown_841B2A9[] = _("{SMALL}MAX.{SIZE 0x02} HP"); +const u8 gUnknown_841B2A9[] = _("{FONT_0}MAX.{FONT_2} HP"); const u8 gUnknown_841B2B7[] = _("ATTACK"); const u8 gUnknown_841B2BE[] = _("DEFENSE"); const u8 gUnknown_841B2C6[] = _("SPEED"); const u8 gUnknown_841B2CC[] = _("SP. ATK"); const u8 gUnknown_841B2D4[] = _("SP. DEF"); -const u8 gUnknown_841B2DC[] = _("{SMALL}{PLUS}{SIZE 0x02}"); -const u8 gUnknown_841B2E5[] = _("{SMALL}-{SIZE 0x02}"); +const u8 gUnknown_841B2DC[] = _("{FONT_0}{PLUS}{FONT_2}"); +const u8 gUnknown_841B2E5[] = _("{FONT_0}-{FONT_2}"); const u8 gUnknown_841B2ED[] = _("1, "); const u8 gUnknown_841B2F1[] = _("2, and ‥ ‥ ‥ "); const u8 gUnknown_841B2FF[] = _("Poof!\p"); diff --git a/src/teachy_tv.c b/src/teachy_tv.c index 75daa080b..b3985d676 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -239,7 +239,7 @@ static const struct ListMenuTemplate sListMenuTemplate = .lettersSpacing = 0x0, .itemVerticalPadding = 0x0, .scrollMultiple = 0x1, - .fontId = 0x2, + .fontId = FONT_2, .cursorKind = 0x0, }; @@ -675,7 +675,7 @@ static void TeachyTvSetupPostBattleWindowAndObj(u8 taskId) static void TeachyTvInitTextPrinter(const u8 *text) { gTextFlags.autoScroll = 0; - AddTextPrinterParameterized2(0, 4, text, GetTextSpeedSetting(), 0, 1, 0xC, 3); + AddTextPrinterParameterized2(0, FONT_4, text, GetTextSpeedSetting(), 0, 1, 0xC, 3); } static void TeachyTvFree(void) diff --git a/src/text.c b/src/text.c index a29906052..15487a889 100644 --- a/src/text.c +++ b/src/text.c @@ -79,43 +79,43 @@ const u8 gKeypadIconTiles[] = INCBIN_U8("graphics/fonts/keypad_icons.4bpp"); static const u16 sFont0LatinGlyphs[] = INCBIN_U16("graphics/fonts/font0_latin.latfont"); static const u8 sFont0LatinGlyphWidths[] = { - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x04, 0x04, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x04, 0x05, 0x04, 0x04, 0x05, 0x05, 0x05, 0x06, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x08, 0x07, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x07, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x07, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x08, 0x05, 0x08, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, 0x05, - 0x05, 0x04, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x04, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x08, 0x07, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x05, 0x05, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x05 + 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 4, 4, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 4, 5, 4, 4, 5, 5, 5, 6, 5, 5, 5, 5, + 5, 5, 8, 7, 8, 5, 5, 5, 5, 5, 8, 8, 7, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, + 8, 8, 8, 8, 8, 8, 4, 7, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 8, 8, 8, 5, + 5, 5, 5, 5, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 8, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 8, 5, 8, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, + 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 8, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 5 }; static const u16 sFont0JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font0_jap.fwjpnfont"); @@ -123,43 +123,43 @@ static const u16 sFont0JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font0_jap.f static const u16 sFont1LatinGlyphs[] = INCBIN_U16("graphics/fonts/font1_latin.latfont"); static const u8 sFont1LatinGlyphWidths[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06, - 0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05, - 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06 + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, + 6, 6, 9, 8, 8, 6, 6, 6, 6, 6, 10, 8, 5, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, + 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 6, + 6, 6, 6, 6, 6, 6, 8, 8, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 3, 3, 6, + 6, 8, 5, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5, + 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, + 6, 8, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 6 }; static const u16 sFont1JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font1_jap.fwjpnfont"); @@ -167,201 +167,201 @@ static const u16 sFont1JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font1_jap.f static const u16 sFont2LatinGlyphs[] = INCBIN_U16("graphics/fonts/font2_latin.latfont"); static const u8 sFont2LatinGlyphWidths[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06, - 0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05, - 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06 + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, + 6, 6, 9, 8, 8, 6, 6, 6, 6, 6, 10, 8, 5, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, + 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 6, + 6, 6, 6, 6, 6, 6, 8, 8, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 3, 3, 6, + 6, 8, 5, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5, + 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, + 6, 8, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 6 }; static const u16 sFont2JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font2_jap.fwjpnfont"); static const u8 sFont2JapaneseGlyphWidths[] = { - 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x08, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x05, 0x09, 0x0A, 0x0A, 0x0A, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x08, - 0x08, 0x08, 0x0A, 0x0A, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06, - 0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 5, 9, 10, 10, 10, 8, 10, 10, 10, 10, 8, + 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0 }; // Font 4 static const u16 sFont4LatinGlyphs[] = INCBIN_U16("graphics/fonts/font4_latin.latfont"); static const u8 sFont4LatinGlyphWidths[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06, - 0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05, - 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06 + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, + 6, 6, 9, 8, 8, 6, 6, 6, 6, 6, 10, 8, 5, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, + 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 6, + 6, 6, 6, 6, 6, 6, 8, 8, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 3, 3, 6, + 6, 8, 5, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5, + 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, + 6, 8, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 6 }; static const u16 sFont4JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font4_jap.fwjpnfont"); static const u8 sFont4JapaneseGlyphWidths[] = { - 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x08, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x05, 0x09, 0x0A, 0x0A, 0x0A, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x08, - 0x08, 0x08, 0x0A, 0x0A, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06, - 0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 5, 9, 10, 10, 10, 8, 10, 10, 10, 10, 8, + 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0 }; // Font 5 static const u16 sFont5LatinGlyphs[] = INCBIN_U16("graphics/fonts/font5_latin.latfont"); static const u8 sFont5LatinGlyphWidths[] = { - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x09, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0A, 0x08, 0x05, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x04, 0x06, 0x08, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x08, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x03, 0x03, 0x06, - 0x06, 0x08, 0x05, 0x09, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x04, 0x06, 0x05, - 0x05, 0x06, 0x05, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x08, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x0C, 0x0C, 0x0C, 0x0C, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06 + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, + 6, 6, 9, 8, 8, 6, 6, 6, 6, 6, 10, 8, 5, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, + 8, 8, 8, 8, 8, 4, 6, 8, 5, 5, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 12, 12, 12, 12, 6, + 6, 6, 6, 6, 6, 6, 8, 8, 8, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 5, 6, 5, 6, 6, 6, 3, 3, 6, + 6, 8, 5, 9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 4, 6, 5, + 5, 6, 5, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, + 6, 8, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 12, 12, 12, 12, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 6 }; static const u16 sFont5JapaneseGlyphs[] = INCBIN_U16("graphics/fonts/font5_jap.fwjpnfont"); static const u8 sFont5JapaneseGlyphWidths[] = { - 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x09, 0x08, 0x07, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x08, 0x08, 0x05, 0x09, 0x0A, 0x0A, 0x0A, 0x08, 0x0A, 0x0A, 0x0A, 0x0A, 0x08, - 0x08, 0x08, 0x0A, 0x0A, 0x08, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x05, 0x06, 0x06, 0x02, 0x04, 0x06, - 0x03, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x05, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, - 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x00 + 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 9, 9, 9, 9, 9, 9, 9, 8, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 9, 8, 7, 8, 8, 8, 8, 8, + 8, 8, 8, 5, 9, 10, 10, 10, 8, 10, 10, 10, 10, 8, + 8, 8, 10, 10, 8, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 2, 4, 6, + 3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 5, 6, 6, 6, 6, 6, 6, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0 }; // Font 9 @@ -897,7 +897,8 @@ u16 RenderText(struct TextPrinter *textPrinter) return 1; } -s32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) +// Unused +static s32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) { int i; u8 width; @@ -985,7 +986,7 @@ s32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing) width = lineWidths[strPos]; } - return (u8)(GetFontAttribute(fontId, 0) + letterSpacing) * width; + return (u8)(GetFontAttribute(fontId, FONTATTR_MAX_LETTER_WIDTH) + letterSpacing) * width; } s32 (*GetFontWidthFunc(u8 glyphId))(u16 _glyphId, bool32 _isJapanese) diff --git a/src/tm_case.c b/src/tm_case.c index d7ffee5a3..43d590c40 100644 --- a/src/tm_case.c +++ b/src/tm_case.c @@ -111,7 +111,7 @@ static void InitWindowTemplatesAndPals(void); static void AddTextPrinterParameterized_ColorByIndex(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx); static void TMCase_SetWindowBorder1(u8 windowId); static void TMCase_SetWindowBorder2(u8 windowId); -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 windowId, const u8 * str, TaskFunc func); +static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func); static void PrintStringTMCaseOnWindow3(void); static void DrawMoveInfoUIMarkers(void); static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId); @@ -504,7 +504,7 @@ static void InitTMCaseListMenuItems(void) gMultiuseListMenuTemplate.itemVerticalPadding = 2; gMultiuseListMenuTemplate.upText_Y = 2; gMultiuseListMenuTemplate.maxShowed = sTMCaseDynamicResources->maxTMsShown; - gMultiuseListMenuTemplate.fontId = 2; + gMultiuseListMenuTemplate.fontId = FONT_2; gMultiuseListMenuTemplate.cursorPal = 2; gMultiuseListMenuTemplate.fillValue = 0; gMultiuseListMenuTemplate.cursorShadowPal = 3; @@ -562,7 +562,7 @@ static void TMCase_ItemPrintFunc(u8 windowId, u32 itemId, u8 y) { ConvertIntToDecimalStringN(gStringVar1, BagGetQuantityByPocketPosition(POCKET_TM_CASE, itemId), STR_CONV_MODE_RIGHT_ALIGN, 3); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(windowId, 0, gStringVar4, 0x7E, y, 0, 0, 0xFF, 1); + AddTextPrinterParameterized_ColorByIndex(windowId, FONT_0, gStringVar4, 0x7E, y, 0, 0, 0xFF, 1); } else { @@ -583,7 +583,7 @@ static void TMCase_MoveCursor_UpdatePrintedDescription(s32 itemIndex) str = gText_TMCaseWillBePutAway; } FillWindowPixelBuffer(1, 0); - AddTextPrinterParameterized_ColorByIndex(1, 2, str, 2, 3, 1, 0, 0, 0); + AddTextPrinterParameterized_ColorByIndex(1, FONT_2, str, 2, 3, 1, 0, 0, 0); } static void FillBG2RowWithPalette_2timesNplus1(s32 a0) @@ -601,12 +601,12 @@ static void PrintListMenuCursorAt_WithColorIdx(u8 a0, u8 a1) { if (a1 == 0xFF) { - FillWindowPixelRect(0, 0, 0, a0, GetFontAttribute(2, 0), GetFontAttribute(2, 1)); + FillWindowPixelRect(0, 0, 0, a0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_WIDTH), GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT)); CopyWindowToVram(0, COPYWIN_GFX); } else { - AddTextPrinterParameterized_ColorByIndex(0, 2, gText_SelectorArrow2, 0, a0, 0, 0, 0, a1); + AddTextPrinterParameterized_ColorByIndex(0, FONT_2, gText_SelectorArrow2, 0, a0, 0, 0, 0, a1); } } @@ -787,12 +787,12 @@ static void Task_SelectTMAction_FromFieldBag(u8 taskId) sTMCaseDynamicResources->menuActionIndices = sMenuActionIndices_UnionRoom; sTMCaseDynamicResources->numMenuActions = NELEMS(sMenuActionIndices_UnionRoom); } - AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, 2, GetMenuCursorDimensionByFont(2, 0), 2, 0, GetFontAttribute(2, 1) + 2, sTMCaseDynamicResources->numMenuActions, sMenuActions_UseGiveExit, sTMCaseDynamicResources->menuActionIndices); - Menu_InitCursor(sTMCaseDynamicResources->contextMenuWindowId, 2, 0, 2, GetFontAttribute(2, 1) + 2, sTMCaseDynamicResources->numMenuActions, 0); + AddItemMenuActionTextPrinters(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, GetMenuCursorDimensionByFont(FONT_2, 0), 2, 0, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, sMenuActions_UseGiveExit, sTMCaseDynamicResources->menuActionIndices); + Menu_InitCursor(sTMCaseDynamicResources->contextMenuWindowId, FONT_2, 0, 2, GetFontAttribute(FONT_2, FONTATTR_MAX_LETTER_HEIGHT) + 2, sTMCaseDynamicResources->numMenuActions, 0); strbuf = Alloc(256); GetTMNumberAndMoveString(strbuf, gSpecialVar_ItemId); StringAppend(strbuf, gText_Var1IsSelected + 2); // +2 skips over the stringvar - AddTextPrinterParameterized_ColorByIndex(2, 2, strbuf, 0, 2, 1, 0, 0, 1); + AddTextPrinterParameterized_ColorByIndex(2, FONT_2, strbuf, 0, 2, 1, 0, 0, 1); Free(strbuf); if (itemid_is_unique(gSpecialVar_ItemId)) { @@ -879,14 +879,14 @@ static void TMHMContextMenuAction_Give(u8 taskId) static void PrintError_ThereIsNoPokemon(u8 taskId) { - TMCase_PrintMessageWithFollowupTask(taskId, 2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); + TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gText_ThereIsNoPokemon, Task_WaitButtonAfterErrorPrint); } static void PrintError_ItemCantBeHeld(u8 taskId) { CopyItemName(gSpecialVar_ItemId, gStringVar1); StringExpandPlaceholders(gStringVar4, gText_ItemCantBeHeld); - TMCase_PrintMessageWithFollowupTask(taskId, 2, gStringVar4, Task_WaitButtonAfterErrorPrint); + TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_WaitButtonAfterErrorPrint); } static void Task_WaitButtonAfterErrorPrint(u8 taskId) @@ -1029,7 +1029,7 @@ static void Task_InitQuantitySelectUI(u8 taskId) TMCase_SetWindowBorder1(7); ConvertIntToDecimalStringN(gStringVar1, 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); SellTM_PrintQuantityAndSalePrice(1, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8]); HandlePrintMoneyOnHand(); CreateTMCaseScrollIndicatorArrowPair_SellQuantitySelect(); @@ -1043,7 +1043,7 @@ static void SellTM_PrintQuantityAndSalePrice(s16 quantity, s32 amount) FillWindowPixelBuffer(7, 0x11); ConvertIntToDecimalStringN(gStringVar1, quantity, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar4, gText_TimesStrVar1); - AddTextPrinterParameterized_ColorByIndex(7, 0, gStringVar4, 4, 10, 1, 0, 0, 1); + AddTextPrinterParameterized_ColorByIndex(7, FONT_0, gStringVar4, 4, 10, 1, 0, 0, 1); PrintMoneyAmount(7, 0x38, 0x0A, amount, 0); } @@ -1090,7 +1090,7 @@ static void Task_PrintSaleConfirmedText(u8 taskId) CopyItemName(gSpecialVar_ItemId, gStringVar1); ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6); StringExpandPlaceholders(gStringVar4, gText_TurnedOverItemsWorthYen); - TMCase_PrintMessageWithFollowupTask(taskId, 2, gStringVar4, Task_DoSaleOfTMs); + TMCase_PrintMessageWithFollowupTask(taskId, FONT_2, gStringVar4, Task_DoSaleOfTMs); } static void Task_DoSaleOfTMs(u8 taskId) @@ -1227,7 +1227,7 @@ static void Task_TMCaseDude_Playback(u8 taskId) break; case 8: FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokedudeText_TMTypes, 0); + TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_TMTypes, 0); gTasks[taskId].func = Task_TMCaseDude_Playback; data[8]++; break; @@ -1249,7 +1249,7 @@ static void Task_TMCaseDude_Playback(u8 taskId) break; case 18: FillBG2RowWithPalette_2timesNplus1(1); - TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokedudeText_ReadTMDescription, NULL); + TMCase_PrintMessageWithFollowupTask(taskId, FONT_4, gPokedudeText_ReadTMDescription, NULL); gTasks[taskId].func = Task_TMCaseDude_Playback; // this function data[8]++; break; @@ -1323,16 +1323,16 @@ static void TMCase_SetWindowBorder2(u8 windowId) DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, 0x78, 0x0D); } -static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 windowId, const u8 * str, TaskFunc func) +static void TMCase_PrintMessageWithFollowupTask(u8 taskId, u8 fontId, const u8 * str, TaskFunc func) { - DisplayMessageAndContinueTask(taskId, 6, 0x64, 0x0B, windowId, GetTextSpeedSetting(), str, func); + DisplayMessageAndContinueTask(taskId, 6, 0x64, 0x0B, fontId, GetTextSpeedSetting(), str, func); ScheduleBgCopyTilemapToVram(1); } static void PrintStringTMCaseOnWindow3(void) { - u32 distance = 72 - GetStringWidth(1, gText_TMCase, 0); - AddTextPrinterParameterized3(3, 1, distance / 2, 1, sTextColors[0], 0, gText_TMCase); + u32 distance = 72 - GetStringWidth(FONT_1, gText_TMCase, 0); + AddTextPrinterParameterized3(3, FONT_1, distance / 2, 1, sTextColors[0], 0, gText_TMCase); } static void DrawMoveInfoUIMarkers(void) @@ -1355,7 +1355,7 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) { for (i = 0; i < 4; i++) { - AddTextPrinterParameterized_ColorByIndex(5, 3, gText_ThreeHyphens, 7, 12 * i, 0, 0, 0xFF, 3); + AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gText_ThreeHyphens, 7, 12 * i, 0, 0, 0xFF, 3); } CopyWindowToVram(5, COPYWIN_GFX); } @@ -1370,7 +1370,7 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].power, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, 3, str, 7, 12, 0, 0, 0xFF, 3); + AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 12, 0, 0, 0xFF, 3); if (gBattleMoves[move].accuracy == 0) str = gText_ThreeHyphens; else @@ -1378,9 +1378,9 @@ static void TMCase_MoveCursor_UpdatePrintedTMInfo(u16 itemId) ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].accuracy, STR_CONV_MODE_RIGHT_ALIGN, 3); str = gStringVar1; } - AddTextPrinterParameterized_ColorByIndex(5, 3, str, 7, 24, 0, 0, 0xFF, 3); + AddTextPrinterParameterized_ColorByIndex(5, FONT_3, str, 7, 24, 0, 0, 0xFF, 3); ConvertIntToDecimalStringN(gStringVar1, gBattleMoves[move].pp, STR_CONV_MODE_RIGHT_ALIGN, 3); - AddTextPrinterParameterized_ColorByIndex(5, 3, gStringVar1, 7, 36, 0, 0, 0xFF, 3); + AddTextPrinterParameterized_ColorByIndex(5, FONT_3, gStringVar1, 7, 36, 0, 0, 0xFF, 3); CopyWindowToVram(5, COPYWIN_GFX); } } @@ -1397,7 +1397,7 @@ static void HandlePrintMoneyOnHand(void) static void HandleCreateYesNoMenu(u8 taskId, const struct YesNoFuncTable *ptrs) { - CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, 2, 0, 2, 0x5B, 0x0E, ptrs); + CreateYesNoMenuWithCallbacks(taskId, &sYesNoWindowTemplate, FONT_2, 0, 2, 0x5B, 0x0E, ptrs); } static u8 AddTMContextMenu(u8 * a0, u8 a1) diff --git a/src/trade.c b/src/trade.c index 96aae81c1..392a23061 100644 --- a/src/trade.c +++ b/src/trade.c @@ -891,7 +891,7 @@ static void CB2_ReturnFromLinkTrade2(void) break; case 12: name = gSaveBlock2Ptr->playerName; - width = GetStringWidth(1, name, 0); + width = GetStringWidth(FONT_1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -901,7 +901,7 @@ static void CB2_ReturnFromLinkTrade2(void) } id = GetMultiplayerId(); name = gLinkPlayers[id ^ 1].name; - width = GetStringWidth(1, name, 0); + width = GetStringWidth(FONT_1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -1086,7 +1086,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) break; case 12: name = gSaveBlock2Ptr->playerName; - width = GetStringWidth(1, name, 0); + width = GetStringWidth(FONT_1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -1096,7 +1096,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) } id = GetMultiplayerId(); name = gLinkPlayers[id ^ 1].name; - width = GetStringWidth(1, name, 0); + width = GetStringWidth(FONT_1, name, 0); xPos = (56 - width) / 2; for (i = 0; i < 3; i++) { @@ -1729,8 +1729,8 @@ static void TradeMenuCB_0(void) { DrawTextBorderOuter(1, 1, 14); FillWindowPixelBuffer(1, PIXEL_FILL(1)); - UnionRoomAndTradeMenuPrintOptions(1, 3, 16, 2, sMenuAction_SummaryTrade); - Menu_InitCursor(1, 3, 0, 0, 16, 2, 0); + UnionRoomAndTradeMenuPrintOptions(1, FONT_3, 16, 2, sMenuAction_SummaryTrade); + Menu_InitCursor(1, FONT_3, 0, 0, 16, 2, 0); PutWindowTilemap(1); CopyWindowToVram(1, COPYWIN_FULL); sTradeMenuResourcesPtr->tradeMenuCBnum = 1; @@ -1742,7 +1742,7 @@ static void TradeMenuCB_0(void) } else if (sTradeMenuResourcesPtr->tradeMenuCursorPosition == 12) { - CreateYesNoMenu(&sWindowTemplate_YesNo, 3, 0, 2, 0x001, 14, 0); + CreateYesNoMenu(&sWindowTemplate_YesNo, FONT_3, 0, 2, 0x001, 14, 0); sTradeMenuResourcesPtr->tradeMenuCBnum = 4; RenderTextToVramViaBuffer(sTradeUITextPtrs[TRADEUITEXT_ASKCANCEL], (void *)OBJ_VRAM0 + sTradeMenuResourcesPtr->cursorStartTile * 32, 24); } @@ -1956,7 +1956,7 @@ static void TradeMenuCB_14(void) if (sTradeMenuResourcesPtr->loadUISpritesState > 120) { - CreateYesNoMenu(&sWindowTemplate_YesNo, 3, 0, 2, 1, 14, 0); + CreateYesNoMenu(&sWindowTemplate_YesNo, FONT_3, 0, 2, 1, 14, 0); sTradeMenuResourcesPtr->loadUISpritesState = 0; sTradeMenuResourcesPtr->tradeMenuCBnum = 3; } @@ -2160,9 +2160,9 @@ static void HandleRedrawTradeMenuOnSide(u8 side) gSprites[sTradeMenuResourcesPtr->partyIcons[0][partyIdx + (whichParty * PARTY_SIZE)]].x2 = 0; gSprites[sTradeMenuResourcesPtr->partyIcons[0][partyIdx + (whichParty * PARTY_SIZE)]].y2 = 0; nameStringWidth = GetNicknameStringWidthByPartyAndMonIdx(nickname, whichParty, partyIdx); - AddTextPrinterParameterized3((side * 2) + 14, 0, (80 - nameStringWidth) / 2, 4, sTextColor_PartyMonNickname, 0, nickname); + AddTextPrinterParameterized3((side * 2) + 14, FONT_0, (80 - nameStringWidth) / 2, 4, sTextColor_PartyMonNickname, 0, nickname); BuildMovesString(movesString, whichParty, partyIdx); - AddTextPrinterParameterized4((side * 2) + 15, 1, 0, 0, 0, 0, sTextColor_PartyMonNickname, 0, movesString); + AddTextPrinterParameterized4((side * 2) + 15, FONT_1, 0, 0, 0, 0, sTextColor_PartyMonNickname, 0, movesString); PutWindowTilemap((side * 2) + 14); CopyWindowToVram((side * 2) + 14, COPYWIN_FULL); PutWindowTilemap((side * 2) + 15); @@ -2184,7 +2184,7 @@ static u8 GetNicknameStringWidthByPartyAndMonIdx(u8 *dest, u8 whichParty, u8 par else GetMonData(&gEnemyParty[partyIdx], MON_DATA_NICKNAME, nickname); StringCopy_Nickname(dest, nickname); - return GetStringWidth(0, dest, GetFontAttribute(0, FONTATTR_LETTER_SPACING)); + return GetStringWidth(FONT_0, dest, GetFontAttribute(FONT_0, FONTATTR_LETTER_SPACING)); } static void BuildMovesString(u8 *movesString, u8 whichParty, u8 whichMon) @@ -2231,8 +2231,8 @@ static void PrintPartyMonNickname(u8 whichParty, u8 windowId, const u8 *str) s8 speed; windowId += (whichParty * PARTY_SIZE) + 2; speed = 0; - xPos = (64u - GetStringWidth(0, str, GetFontAttribute(0, FONTATTR_LETTER_SPACING))) / 2; - AddTextPrinterParameterized3(windowId, 0, xPos, 4, sTextColor_PartyMonNickname, speed, str); + xPos = (64u - GetStringWidth(FONT_0, str, GetFontAttribute(FONT_0, FONTATTR_LETTER_SPACING))) / 2; + AddTextPrinterParameterized3(windowId, FONT_0, xPos, 4, sTextColor_PartyMonNickname, speed, str); PutWindowTilemap(windowId); CopyWindowToVram(windowId, COPYWIN_FULL); } @@ -2442,7 +2442,7 @@ static void RunScheduledLinkTasks(void) static void PrintTradeErrorOrStatusMessage(u8 idx) { FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized(0, 3, sTradeErrorOrStatusMessagePtrs[idx], 0, 2, 0xFF, NULL); + AddTextPrinterParameterized(0, FONT_3, sTradeErrorOrStatusMessagePtrs[idx], 0, 2, 0xFF, NULL); DrawTextBorderOuter(0, 0x014, 12); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/trade_scene.c b/src/trade_scene.c index c4acdc38a..096731023 100644 --- a/src/trade_scene.c +++ b/src/trade_scene.c @@ -2767,7 +2767,7 @@ void DrawTextOnTradeWindow(u8 windowId, const u8 *str, s8 speed) sTradeData->textColor[0] = 15; sTradeData->textColor[1] = 1; sTradeData->textColor[2] = 6; - AddTextPrinterParameterized4(windowId, 2, 0, 2, 0, 2, sTradeData->textColor, speed, str); + AddTextPrinterParameterized4(windowId, FONT_2, 0, 2, 0, 2, sTradeData->textColor, speed, str); CopyWindowToVram(windowId, COPYWIN_FULL); } diff --git a/src/trainer_card.c b/src/trainer_card.c index 401a6366d..4a9b99361 100644 --- a/src/trainer_card.c +++ b/src/trainer_card.c @@ -274,7 +274,7 @@ static const u16 *const sKantoTrainerCardStarPals[] = static const u8 sTrainerCardTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_LIGHT_GRAY}; static const u8 sTrainerCardStatColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_RED, TEXT_COLOR_LIGHT_RED}; static const u8 sTimeColonInvisibleTextColors[] = {TEXT_COLOR_TRANSPARENT, TEXT_COLOR_TRANSPARENT, TEXT_COLOR_TRANSPARENT}; -static const u8 sTrainerCardFontIds[] = {0, 2, 0}; +static const u8 sTrainerCardFontIds[] = {FONT_0, FONT_2, FONT_0}; static const u8 sTrainerPicOffsets[2][GENDER_COUNT][2] = { @@ -620,7 +620,7 @@ static void Task_TrainerCard(u8 taskId) case STATE_WAIT_LINK_PARTNER: SetCloseLinkCallback(); DrawDialogueFrame(0, 1); - AddTextPrinterParameterized(0, 2, gText_WaitingTrainerFinishReading, 0, 1, TEXT_SKIP_DRAW, 0); + AddTextPrinterParameterized(0, FONT_2, gText_WaitingTrainerFinishReading, 0, 1, TEXT_SKIP_DRAW, 0); CopyWindowToVram(0, COPYWIN_FULL); sTrainerCardDataPtr->mainState = STATE_CLOSE_CARD_LINK; break; @@ -1237,16 +1237,16 @@ static void PrintProfilePhraseOnCard(void) { if (sTrainerCardDataPtr->isLink) { - AddTextPrinterParameterized3(1, 2, 10, sTrainerCardProfilePhraseXPositions[sTrainerCardDataPtr->cardType], + AddTextPrinterParameterized3(1, FONT_2, 10, sTrainerCardProfilePhraseXPositions[sTrainerCardDataPtr->cardType], sTrainerCardTextColors, TEXT_SKIP_DRAW, sTrainerCardDataPtr->easyChatProfile[0]); - AddTextPrinterParameterized3(1, 2, GetStringWidth(2, sTrainerCardDataPtr->easyChatProfile[0], 0) + 16, sTrainerCardProfilePhraseXPositions[sTrainerCardDataPtr->cardType], + AddTextPrinterParameterized3(1, FONT_2, GetStringWidth(FONT_2, sTrainerCardDataPtr->easyChatProfile[0], 0) + 16, sTrainerCardProfilePhraseXPositions[sTrainerCardDataPtr->cardType], sTrainerCardTextColors, TEXT_SKIP_DRAW, sTrainerCardDataPtr->easyChatProfile[1]); - AddTextPrinterParameterized3(1, 2, 10, sTrainerCardProfilePhraseYPositions[sTrainerCardDataPtr->cardType], + AddTextPrinterParameterized3(1, FONT_2, 10, sTrainerCardProfilePhraseYPositions[sTrainerCardDataPtr->cardType], sTrainerCardTextColors, TEXT_SKIP_DRAW, sTrainerCardDataPtr->easyChatProfile[2]); - AddTextPrinterParameterized3(1, 2, GetStringWidth(2, sTrainerCardDataPtr->easyChatProfile[2], 0) + 16, sTrainerCardProfilePhraseYPositions[sTrainerCardDataPtr->cardType], + AddTextPrinterParameterized3(1, FONT_2, GetStringWidth(FONT_2, sTrainerCardDataPtr->easyChatProfile[2], 0) + 16, sTrainerCardProfilePhraseYPositions[sTrainerCardDataPtr->cardType], sTrainerCardTextColors, TEXT_SKIP_DRAW, sTrainerCardDataPtr->easyChatProfile[3]); } } diff --git a/src/trainer_tower.c b/src/trainer_tower.c index a589dcbef..9bc2090f1 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -632,7 +632,7 @@ static void TT_ConvertEasyChatMessageToString(u16 *ecWords, u8 *dest) { s32 i; ConvertEasyChatWordsToString(dest, ecWords, 3, 2); - if ((unsigned)GetStringWidth(2, dest, -1) > 196) + if ((unsigned)GetStringWidth(FONT_2, dest, -1) > 196) { // Has to be printed 2x3 ConvertEasyChatWordsToString(dest, ecWords, 2, 3); @@ -905,15 +905,15 @@ static void ShowResultsBoard(void) windowId = AddWindow(sTimeBoardWindowTemplate); LoadStdWindowFrameGfx(); DrawStdWindowFrame(windowId, FALSE); - AddTextPrinterParameterized(windowId, 2, gText_TimeBoard, 74, 0, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gText_TimeBoard, 74, 0, TEXT_SKIP_DRAW, NULL); for (i = 0; i < NUM_TOWER_CHALLENGE_TYPES; i++) { PRINT_TOWER_TIME(GetTrainerTowerRecordTime(&TRAINER_TOWER.bestTime)); StringExpandPlaceholders(gStringVar4, gText_XMinYZSec); - AddTextPrinterParameterized(windowId, 2, gTrainerTowerChallengeTypeTexts[i - 1], 24, 36 + 20 * i, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(windowId, 2, gStringVar4, 96, 46 + 20 * i, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gTrainerTowerChallengeTypeTexts[i - 1], 24, 36 + 20 * i, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_2, gStringVar4, 96, 46 + 20 * i, TEXT_SKIP_DRAW, NULL); } PutWindowTilemap(windowId); @@ -1059,14 +1059,14 @@ void PrintTrainerTowerRecords(void) SetUpTrainerTowerDataStruct(); FillWindowPixelRect(0, PIXEL_FILL(0), 0, 0, 216, 144); ValidateOrResetCurTrainerTowerRecord(); - AddTextPrinterParameterized3(0, 2, 0x4a, 0, sTextColors, 0, gText_TimeBoard); + AddTextPrinterParameterized3(0, FONT_2, 0x4a, 0, sTextColors, 0, gText_TimeBoard); for (i = 0; i < NUM_TOWER_CHALLENGE_TYPES; i++) { PRINT_TOWER_TIME(GetTrainerTowerRecordTime(&gSaveBlock1Ptr->trainerTower[i].bestTime)); StringExpandPlaceholders(gStringVar4, gText_XMinYZSec); - AddTextPrinterParameterized3(windowId, 2, 0x18, 0x24 + 0x14 * i, sTextColors, 0, gTrainerTowerChallengeTypeTexts[i]); - AddTextPrinterParameterized3(windowId, 2, 0x60, 0x24 + 0x14 * i, sTextColors, 0, gStringVar4); + AddTextPrinterParameterized3(windowId, FONT_2, 0x18, 0x24 + 0x14 * i, sTextColors, 0, gTrainerTowerChallengeTypeTexts[i]); + AddTextPrinterParameterized3(windowId, FONT_2, 0x60, 0x24 + 0x14 * i, sTextColors, 0, gStringVar4); } PutWindowTilemap(windowId); diff --git a/src/union_room.c b/src/union_room.c index 0477cc9fd..cadc00181 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -225,7 +225,7 @@ static const struct ListMenuTemplate sListMenuTemplate_PossibleGroupMembers = { .lettersSpacing = 0, .itemVerticalPadding = 2, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 1 }; @@ -285,7 +285,7 @@ static const struct ListMenuTemplate sListMenuTemplate_UnionRoomGroups = { .lettersSpacing = 0, .itemVerticalPadding = 2, .scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -323,7 +323,7 @@ static const struct ListMenuTemplate sListMenuTemplate_InviteToActivity = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -360,7 +360,7 @@ static const struct ListMenuTemplate sListMenuTemplate_TradeBoardRegisterInfoExi .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -412,7 +412,7 @@ static const struct ListMenuTemplate sListMenuTemplate_TypeNames = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -466,7 +466,7 @@ static const struct ListMenuTemplate sTradeBoardListMenuTemplate = { .lettersSpacing = 1, .itemVerticalPadding = 1, .scrollMultiple = LIST_NO_MULTIPLE_SCROLL, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; @@ -516,7 +516,7 @@ static const struct ListMenuTemplate gUnknown_845701C = { .lettersSpacing = 1, .itemVerticalPadding = 0, .scrollMultiple = LIST_MULTIPLE_SCROLL_DPAD, - .fontId = 2, + .fontId = FONT_2, .cursorKind = 0 }; diff --git a/src/union_room_battle.c b/src/union_room_battle.c index 11307891c..56676ab7b 100644 --- a/src/union_room_battle.c +++ b/src/union_room_battle.c @@ -67,7 +67,7 @@ static void UnionRoomBattle_CreateTextPrinter(u8 windowId, const u8 * str, u8 x, s32 letterSpacing = 1; s32 lineSpacing = 1; FillWindowPixelBuffer(windowId, PIXEL_FILL(gUnknown_84571A8[0])); - AddTextPrinterParameterized4(windowId, 3, x, y, letterSpacing, lineSpacing, gUnknown_84571A8, speed, str); + AddTextPrinterParameterized4(windowId, FONT_3, x, y, letterSpacing, lineSpacing, gUnknown_84571A8, speed, str); } static bool32 UnionRoomBattle_PrintTextOnWindow0(s16 * state, const u8 * str, s32 speed) diff --git a/src/union_room_chat_display.c b/src/union_room_chat_display.c index e06bd8aa0..0c9c56c41 100644 --- a/src/union_room_chat_display.c +++ b/src/union_room_chat_display.c @@ -952,10 +952,10 @@ static void PlaceYesNoMenuAt(u8 left, u8 top, u8 initialCursorPos) { FillWindowPixelBuffer(sWork->yesNoMenuWinId, PIXEL_FILL(1)); PutWindowTilemap(sWork->yesNoMenuWinId); - AddTextPrinterParameterized(sWork->yesNoMenuWinId, 2, gText_Yes, 8, 2, TEXT_SKIP_DRAW, NULL); - AddTextPrinterParameterized(sWork->yesNoMenuWinId, 2, gText_No, 8, 16, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sWork->yesNoMenuWinId, FONT_2, gText_Yes, 8, 2, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(sWork->yesNoMenuWinId, FONT_2, gText_No, 8, 16, TEXT_SKIP_DRAW, NULL); DrawTextBorderOuter(sWork->yesNoMenuWinId, 1, 13); - Menu_InitCursor(sWork->yesNoMenuWinId, 2, 0, 2, 14, 2, initialCursorPos); + Menu_InitCursor(sWork->yesNoMenuWinId, FONT_2, 0, 2, 14, 2, initialCursorPos); } } @@ -1023,7 +1023,7 @@ static void PlaceStdMessageWindow(int id, u16 bg0vofs) DrawTextBorderInner(windowId, 0xA, 2); AddTextPrinterParameterized5( windowId, - 2, + FONT_2, str, sMessageWindowInfo[id].x + 8, sMessageWindowInfo[id].y + 8, @@ -1037,7 +1037,7 @@ static void PlaceStdMessageWindow(int id, u16 bg0vofs) DrawTextBorderOuter(windowId, 0xA, 2); AddTextPrinterParameterized5( windowId, - 2, + FONT_2, str, sMessageWindowInfo[id].x, sMessageWindowInfo[id].y, @@ -1090,7 +1090,7 @@ static void PrintOnWin1Parameterized(u16 x, u8 *str, u8 bgColor, u8 fgColor, u8 strbuf[1] = EXT_CTRL_CODE_MIN_LETTER_SPACING; strbuf[2] = 8; StringCopy(&strbuf[3], str); - AddTextPrinterParameterized3(1, 2, x * 8, 1, color, TEXT_SKIP_DRAW, strbuf); + AddTextPrinterParameterized3(1, FONT_2, x * 8, 1, color, TEXT_SKIP_DRAW, strbuf); } static void PrintCurrentKeyboardPage(void) @@ -1124,7 +1124,7 @@ static void PrintCurrentKeyboardPage(void) return; StringCopy(&str[3], gUnionRoomKeyboardText[page][i]); - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(2, FONT_0, left, top, color, TEXT_SKIP_DRAW, str); } } else @@ -1133,9 +1133,9 @@ static void PrintCurrentKeyboardPage(void) for (i = 0, top = 0; i < 10; i++, top += 12) { str2 = UnionRoomChat_GetWorkRegisteredText(i); - if (GetStringWidth(0, str2, 0) <= 40) + if (GetStringWidth(FONT_0, str2, 0) <= 40) { - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SKIP_DRAW, str2); + AddTextPrinterParameterized3(2, FONT_0, left, top, color, TEXT_SKIP_DRAW, str2); } else { @@ -1144,10 +1144,10 @@ static void PrintCurrentKeyboardPage(void) { length--; StringCopyN_Multibyte(str, str2, length); - } while (GetStringWidth(0, str, 0) > 35); + } while (GetStringWidth(FONT_0, str, 0) > 35); - AddTextPrinterParameterized3(2, 0, left, top, color, TEXT_SKIP_DRAW, str); - AddTextPrinterParameterized3(2, 0, left + 35, top, color, TEXT_SKIP_DRAW, gText_Ellipsis); + AddTextPrinterParameterized3(2, FONT_0, left, top, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(2, FONT_0, left + 35, top, color, TEXT_SKIP_DRAW, gText_Ellipsis); } } } @@ -1195,8 +1195,8 @@ static void PrintKeyboardSwapTextsOnWin3(void) { FillWindowPixelBuffer(3, PIXEL_FILL(1)); DrawTextBorderOuter(3, 1, 13); - UnionRoomAndTradeMenuPrintOptions(3, 2, 14, 5, sKeyboardSwapTexts); - Menu_InitCursor(3, 2, 0, 0, 14, 5, GetCurrentKeyboardPage()); + UnionRoomAndTradeMenuPrintOptions(3, FONT_2, 14, 5, sKeyboardSwapTexts); + Menu_InitCursor(3, FONT_2, 0, 0, 14, 5, GetCurrentKeyboardPage()); PutWindowTilemap(3); } @@ -1214,7 +1214,7 @@ static void PrintTextOnWin0Colorized(u16 row, u8 *str, u8 colorIdx) color[1] = colorIdx * 2 + 2; color[2] = colorIdx * 2 + 3; FillWindowPixelRect(0, PIXEL_FILL(1), 0, row * 15, 168, 15); - AddTextPrinterParameterized3(0, 2, 0, row * 15, color, TEXT_SKIP_DRAW, str); + AddTextPrinterParameterized3(0, FONT_2, 0, row * 15, color, TEXT_SKIP_DRAW, str); } static void ResetGpuBgState(void) diff --git a/src/vs_seeker.c b/src/vs_seeker.c index 53293825d..c95c0da52 100644 --- a/src/vs_seeker.c +++ b/src/vs_seeker.c @@ -749,12 +749,12 @@ void Task_VsSeeker_0(u8 taskId) if (respval == VSSEEKER_NOT_CHARGED) { Free(sVsSeeker); - DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_BatteryNotChargedNeedXSteps, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); + DisplayItemMessageOnField(taskId, FONT_2, VSSeeker_Text_BatteryNotChargedNeedXSteps, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); } else if (respval == VSSEEKER_NO_ONE_IN_RANGE) { Free(sVsSeeker); - DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_NoTrainersWithinRange, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); + DisplayItemMessageOnField(taskId, FONT_2, VSSeeker_Text_NoTrainersWithinRange, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); } else if (respval == VSSEEKER_CAN_USE) { @@ -827,7 +827,7 @@ static void Task_VsSeeker_3(u8 taskId) { if (sVsSeeker->responseCode == VSSEEKER_RESPONSE_NO_RESPONSE) { - DisplayItemMessageOnField(taskId, 2, VSSeeker_Text_TrainersNotReady, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); + DisplayItemMessageOnField(taskId, FONT_2, VSSeeker_Text_TrainersNotReady, Task_ItemUse_CloseMessageBoxAndReturnToField_VsSeeker); } else { diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 026654e81..ec70c5dfe 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -246,13 +246,13 @@ static void PrintHeaderTexts(void) FillWindowPixelBuffer(0, PIXEL_FILL(0)); FillWindowPixelBuffer(1, PIXEL_FILL(0)); FillWindowPixelBuffer(2, PIXEL_FILL(0)); - width = 0xC0 - GetStringWidth(3, sHeaderTextPtrs[0], 0); - WCSS_AddTextPrinterParameterized(0, 3, sHeaderTextPtrs[0], width / 2, 6, 3); + width = 0xC0 - GetStringWidth(FONT_3, sHeaderTextPtrs[0], 0); + WCSS_AddTextPrinterParameterized(0, FONT_3, sHeaderTextPtrs[0], width / 2, 6, 3); for (i = 0; i < 3; i++) { - WCSS_AddTextPrinterParameterized(1, 3, sHeaderTextPtrs[i + 1], 0, 30 * i + 10, 1); + WCSS_AddTextPrinterParameterized(1, FONT_3, sHeaderTextPtrs[i + 1], 0, 30 * i + 10, 1); } - WCSS_AddTextPrinterParameterized(1, 3, sHeaderTextPtrs[i + 1], 0, 30 * i + 10, 2); + WCSS_AddTextPrinterParameterized(1, FONT_3, sHeaderTextPtrs[i + 1], 0, 30 * i + 10, 2); PutWindowTilemap(0); CopyWindowToVram(0, COPYWIN_GFX); PutWindowTilemap(1); @@ -287,9 +287,9 @@ static void Task_WirelessCommunicationScreen(u8 taskId) { ConvertIntToDecimalStringN(gStringVar4, sWCSS->counts[i], STR_CONV_MODE_RIGHT_ALIGN, 2); if (i != 3) - WCSS_AddTextPrinterParameterized(2, 3, gStringVar4, 4, 30 * i + 10, 1); + WCSS_AddTextPrinterParameterized(2, FONT_3, gStringVar4, 4, 30 * i + 10, 1); else - WCSS_AddTextPrinterParameterized(2, 3, gStringVar4, 4, 100, 2); + WCSS_AddTextPrinterParameterized(2, FONT_3, gStringVar4, 4, 100, 2); } PutWindowTilemap(2); CopyWindowToVram(2, COPYWIN_FULL); @@ -348,7 +348,7 @@ static void WCSS_AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 * break; // default: UB } - AddTextPrinterParameterized4(windowId, fontId,x, y, fontId == 0 ? 0 : 1, 0, textColor, -1, str); + AddTextPrinterParameterized4(windowId, fontId, x, y, fontId == FONT_0 ? 0 : 1, 0, textColor, -1, str); } static u32 CountMembersInGroup(struct UnkStruct_x20 * unk20, u32 * counts) From 2d2d17dde3c6ba903e0dc2884234211945bad8e8 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 31 Jul 2022 21:41:39 -0400 Subject: [PATCH 08/13] Sync pokemon_storage_system_8.c --- include/pokemon_storage_system_internal.h | 14 +- src/pokemon_storage_system_3.c | 8 +- src/pokemon_storage_system_4.c | 18 +- src/pokemon_storage_system_8.c | 379 ++++++++++++---------- 4 files changed, 222 insertions(+), 197 deletions(-) diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index e8b8aa7b8..c53b5ff86 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -373,9 +373,9 @@ struct PokemonStorageSystemData /* 21db */ u8 itemName[20]; /* 21ef */ u8 inBoxMovingMode; /* 21f0 */ u16 field_2200; - /* 21f4 */ struct PSS_ItemIconSprite itemIconSprites[MAX_ITEM_ICONS]; - /* 2224 */ u16 movingItem; - /* 2226 */ u16 field_2236; + /* 21f4 */ struct PSS_ItemIconSprite itemIcons[MAX_ITEM_ICONS]; + /* 2224 */ u16 movingItemId; + /* 2226 */ u16 itemInfoWindowOffset; /* 2228 */ struct PssQuestLogBuffer qlogBuffer; /* 2230 */ u16 field_2238; /* 2232 */ u16 field_223A; @@ -384,7 +384,7 @@ struct PokemonStorageSystemData /* 223c */ u16 field_2244[0x40]; /* 22bc */ u8 field_22C4[0x800]; /* 2abc */ u8 field_2AC4[0x1800]; - /* 42bc */ u8 field_42C4[0x800]; + /* 42bc */ u8 itemIconBuffer[0x800]; /* 4abc */ u8 field_4AC4[0x1000]; /* 5abc */ u8 field_5AC4[0x800]; }; // size=62bc @@ -442,9 +442,9 @@ void sub_8096088(void); void sub_80960C0(void); bool8 sub_809610C(void); const u8 *GetMovingItemName(void); -void sub_80966F4(void); -bool8 sub_8096728(void); -bool8 sub_80967C0(void); +void InitItemInfoWindow(void); +bool8 UpdateItemInfoWindowSlideIn(void); +bool8 UpdateItemInfoWindowSlideOut(void); void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2); void sub_8096BF8(void); void AddMenu(void); diff --git a/src/pokemon_storage_system_3.c b/src/pokemon_storage_system_3.c index a08b2a920..d68aaafdc 100644 --- a/src/pokemon_storage_system_3.c +++ b/src/pokemon_storage_system_3.c @@ -1568,12 +1568,12 @@ static void Cb_ShowItemInfo(u8 taskId) { PlaySE(SE_WIN_OPEN); PrintItemDescription(); - sub_80966F4(); + InitItemInfoWindow(); gPSSData->state++; } break; case 2: - if (!sub_8096728()) + if (!UpdateItemInfoWindowSlideIn()) gPSSData->state++; break; case 3: @@ -1588,7 +1588,7 @@ static void Cb_ShowItemInfo(u8 taskId) } break; case 5: - if (!sub_80967C0()) + if (!UpdateItemInfoWindowSlideOut()) gPSSData->state++; break; case 6: @@ -1617,7 +1617,7 @@ static void Cb_CloseBoxWhileHoldingItem(u8 taskId) SetPSSCallback(Cb_MainPSS); break; case 0: - if (AddBagItem(gPSSData->movingItem, 1) == TRUE) + if (AddBagItem(gPSSData->movingItemId, 1) == TRUE) { ClearBottomWindow(); gPSSData->state = 3; diff --git a/src/pokemon_storage_system_4.c b/src/pokemon_storage_system_4.c index 1c1567106..349a9b7b1 100644 --- a/src/pokemon_storage_system_4.c +++ b/src/pokemon_storage_system_4.c @@ -27,7 +27,7 @@ static void sub_8091E84(struct Sprite *sprite); static void sub_8091EB8(struct Sprite *sprite); static s16 GetBoxTitleBaseX(const u8 *boxName); static void sub_8091E34(void); -static void sub_8091EF0(void); +static void CycleBoxTitleColor(void); static void CreateBoxScrollArrows(void); static void StartBoxScrollArrowsSlide(s8 direction); static void StopBoxScrollArrowsSlide(void); @@ -128,7 +128,7 @@ static const u32 gUnknown_83D2654[] = INCBIN_U32("graphics/interface/pss_unk_83D static const u32 gUnknown_83D277C[] = INCBIN_U32("graphics/interface/pss_unk_83D277C.bin.lz"); static const u16 gUnknown_83D2820[] = INCBIN_U16("graphics/interface/pss_unk_83D2820.bin"); -static const u16 gUnknown_83D29D0[][2] = { +static const u16 sBoxTitleColors[][2] = { {RGB( 7, 7, 7), RGB(31, 31, 31)}, {RGB( 7, 7, 7), RGB(31, 31, 31)}, {RGB( 7, 7, 7), RGB(31, 31, 31)}, @@ -1119,7 +1119,7 @@ bool8 DoWallpaperGfxChange(void) case 2: if (WaitForWallpaperGfxLoad() == TRUE) { - sub_8091EF0(); + CycleBoxTitleColor(); BeginNormalPaletteFade(gPSSData->wallpaperPalBits, 1, 16, 0, RGB_WHITEALPHA); gPSSData->wallpaperChangeState++; } @@ -1227,8 +1227,8 @@ static void sub_8091A94(u8 boxId) u16 wallpaperId = GetBoxWallpaper(boxId); - gPSSData->boxTitlePal[14] = gUnknown_83D29D0[wallpaperId][0]; - gPSSData->boxTitlePal[15] = gUnknown_83D29D0[wallpaperId][1]; + gPSSData->boxTitlePal[14] = sBoxTitleColors[wallpaperId][0]; + gPSSData->boxTitlePal[15] = sBoxTitleColors[wallpaperId][1]; LoadSpritePalettes(palettes); gPSSData->wallpaperPalBits = 0x3f0; @@ -1279,7 +1279,7 @@ static void sub_8091C48(u8 boxId, s8 direction) StringCopyPadded(gPSSData->field_21B8, GetBoxNamePtr(boxId), 0, 8); DrawTextWindowAndBufferTiles(gPSSData->field_21B8, gPSSData->field_2F8, 0, 0, gPSSData->field_4F8, 2); LoadSpriteSheet(&spriteSheet); - LoadPalette(gUnknown_83D29D0[GetBoxWallpaper(boxId)], r8, 4); + LoadPalette(sBoxTitleColors[GetBoxWallpaper(boxId)], r8, 4); x = GetBoxTitleBaseX(GetBoxNamePtr(boxId)); x2 = x; x2 += direction * 192; @@ -1335,14 +1335,14 @@ static void sub_8091EB8(struct Sprite *sprite) } } -static void sub_8091EF0(void) +static void CycleBoxTitleColor(void) { u8 boxId = StorageGetCurrentBox(); u8 wallpaperId = GetBoxWallpaper(boxId); if (gPSSData->boxTitleCycleId == 0) - CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitlePalOffset, 4); + CpuCopy16(sBoxTitleColors[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitlePalOffset, 4); else - CpuCopy16(gUnknown_83D29D0[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitleAltPalOffset, 4); + CpuCopy16(sBoxTitleColors[wallpaperId], gPlttBufferUnfaded + gPSSData->boxTitleAltPalOffset, 4); } static s16 GetBoxTitleBaseX(const u8 *string) diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index 8a2cf84c8..7b8670e36 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -9,26 +9,38 @@ #include "trig.h" #include "constants/items.h" -static u8 sub_80961D8(void); -static bool32 sub_8096210(u8 cursorArea, u8 cursorPos); -static u8 sub_8096258(u8 cursorArea, u8 cursorPos); -static void sub_80962F0(u8 id, u8 cursorArea, u8 cursorPos); -static void sub_8096408(u8 id, const u32 * tiles, const u32 * pal); -static void sub_80964B8(u8 id, u8 affineAnimNo); -static void sub_80964E8(u8 id, u8 command, u8 cursorArea, u8 cursorPos); -static void sub_8096624(u8 id, bool8 show); +// IDs for the item icon sprite callbacks +enum { + ITEM_CB_WAIT_ANIM, + ITEM_CB_TO_HAND, + ITEM_CB_TO_MON, + ITEM_CB_SWAP_TO_HAND, + ITEM_CB_SWAP_TO_MON, + ITEM_CB_UNUSED_1, + ITEM_CB_UNUSED_2, + ITEM_CB_HIDE_PARTY, +}; + +static u8 GetNewItemIconIdx(void); +static bool32 IsItemIconAtPosition(u8 cursorArea, u8 cursorPos); +static u8 GetItemIconIdxByPosition(u8 cursorArea, u8 cursorPos); +static void SetItemIconPosition(u8 id, u8 cursorArea, u8 cursorPos); +static void LoadItemIconGfx(u8 id, const u32 * tiles, const u32 * pal); +static void SetItemIconAffineAnim(u8 id, u8 affineAnimNo); +static void SetItemIconCallback(u8 id, u8 command, u8 cursorArea, u8 cursorPos); +static void SetItemIconActive(u8 id, bool8 show); static const u32 *GetItemIconPic(u16 itemId); static const u32 *GetItemIconPalette(u16 itemId); -static void sub_8096898(u32 x); -static void sub_809692C(struct Sprite *sprite); -static void sub_8096958(struct Sprite *sprite); -static void sub_80969BC(struct Sprite *sprite); -static void sub_80969F4(struct Sprite *sprite); -static void sub_8096A74(struct Sprite *sprite); -static void sub_8096B10(struct Sprite *sprite); -static void sub_8096BAC(struct Sprite *sprite); +static void DrawItemInfoWindow(u32 x); +static void SpriteCB_ItemIcon_WaitAnim(struct Sprite *sprite); +static void SpriteCB_ItemIcon_ToHand(struct Sprite *sprite); +static void SpriteCB_ItemIcon_SetPosToCursor(struct Sprite *sprite); +static void SpriteCB_ItemIcon_ToMon(struct Sprite *sprite); +static void SpriteCB_ItemIcon_SwapToHand(struct Sprite *sprite); +static void SpriteCB_ItemIcon_SwapToMon(struct Sprite *sprite); +static void SpriteCB_ItemIcon_HideParty(struct Sprite *sprite); -static const u32 gUnknown_83D35DC[] = INCBIN_U32("graphics/interface/pss_unk_83D35DC.4bpp"); +static const u32 sItemInfoFrame_Gfx[] = INCBIN_U32("graphics/interface/pss_unk_83D35DC.4bpp"); static const struct OamData gUnknown_83D365C = { .y = 0, @@ -126,19 +138,19 @@ void sub_8095B5C(void) { spriteSheet.tag = TAG_TILE_7 + i; LoadCompressedSpriteSheet(&spriteSheet); - gPSSData->itemIconSprites[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * 32 + (void *)(OBJ_VRAM0); - gPSSData->itemIconSprites[i].palIndex = AllocSpritePalette(TAG_PAL_DACB + i); - gPSSData->itemIconSprites[i].palIndex *= 16; - gPSSData->itemIconSprites[i].palIndex += 0x100; + gPSSData->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * 32 + (void *)(OBJ_VRAM0); + gPSSData->itemIcons[i].palIndex = AllocSpritePalette(TAG_PAL_DACB + i); + gPSSData->itemIcons[i].palIndex *= 16; + gPSSData->itemIcons[i].palIndex += 0x100; spriteTemplate.tileTag = TAG_TILE_7 + i; spriteTemplate.paletteTag = TAG_PAL_DACB + i; spriteId = CreateSprite(&spriteTemplate, 0, 0, 11); - gPSSData->itemIconSprites[i].sprite = &gSprites[spriteId]; - gPSSData->itemIconSprites[i].sprite->invisible = TRUE; - gPSSData->itemIconSprites[i].active = 0; + gPSSData->itemIcons[i].sprite = &gSprites[spriteId]; + gPSSData->itemIcons[i].sprite->invisible = TRUE; + gPSSData->itemIcons[i].active = 0; } } - gPSSData->movingItem = ITEM_NONE; + gPSSData->movingItemId = ITEM_NONE; } void sub_8095C84(u8 cursorArea, u8 cursorPos) @@ -147,7 +159,7 @@ void sub_8095C84(u8 cursorArea, u8 cursorPos) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return; - if (sub_8096210(cursorArea, cursorPos)) + if (IsItemIconAtPosition(cursorArea, cursorPos)) return; switch (cursorArea) @@ -170,12 +182,12 @@ void sub_8095C84(u8 cursorArea, u8 cursorPos) { const u32 *tiles = GetItemIconPic(heldItem); const u32 *pal = GetItemIconPalette(heldItem); - u8 id = sub_80961D8(); + u8 id = GetNewItemIconIdx(); - sub_80962F0(id, cursorArea, cursorPos); - sub_8096408(id, tiles, pal); - sub_80964B8(id, 1); - sub_8096624(id, TRUE); + SetItemIconPosition(id, cursorArea, cursorPos); + LoadItemIconGfx(id, tiles, pal); + SetItemIconAffineAnim(id, 1); + SetItemIconActive(id, TRUE); } } @@ -186,9 +198,9 @@ void sub_8095D44(u8 cursorArea, u8 cursorPos) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return; - id = sub_8096258(cursorArea, cursorPos); - sub_80964B8(id, 2); - sub_80964E8(id, 0, cursorArea, cursorPos); + id = GetItemIconIdxByPosition(cursorArea, cursorPos); + SetItemIconAffineAnim(id, 2); + SetItemIconCallback(id, 0, cursorArea, cursorPos); } void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos) @@ -199,11 +211,11 @@ void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return; - id = sub_8096258(cursorArea, cursorPos); + id = GetItemIconIdxByPosition(cursorArea, cursorPos); item = 0; - sub_80964B8(id, 3); - sub_80964E8(id, 1, cursorArea, cursorPos); - sub_80962F0(id, 2, 0); + SetItemIconAffineAnim(id, 3); + SetItemIconCallback(id, 1, cursorArea, cursorPos); + SetItemIconPosition(id, 2, 0); if (cursorArea == CURSOR_AREA_IN_BOX) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &item); @@ -215,21 +227,21 @@ void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos) SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_BLEND); } - gPSSData->movingItem = gPSSData->displayMonItemId; + gPSSData->movingItemId = gPSSData->displayMonItemId; } void sub_8095E2C(u16 item) { const u32 *tiles = GetItemIconPic(item); const u32 *pal = GetItemIconPalette(item); - u8 id = sub_80961D8(); + u8 id = GetNewItemIconIdx(); - sub_8096408(id, tiles, pal); - sub_80964B8(id, 6); - sub_80964E8(id, 1, CURSOR_AREA_IN_BOX, 0); - sub_80962F0(id, CURSOR_AREA_BOX, 0); - sub_8096624(id, TRUE); - gPSSData->movingItem = item; + LoadItemIconGfx(id, tiles, pal); + SetItemIconAffineAnim(id, 6); + SetItemIconCallback(id, 1, CURSOR_AREA_IN_BOX, 0); + SetItemIconPosition(id, CURSOR_AREA_BOX, 0); + SetItemIconActive(id, TRUE); + gPSSData->movingItemId = item; } void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos) @@ -240,25 +252,25 @@ void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return; - id = sub_8096258(cursorArea, cursorPos); - sub_80964B8(id, 3); - sub_80964E8(id, 3, CURSOR_AREA_BOX, 0); + id = GetItemIconIdxByPosition(cursorArea, cursorPos); + SetItemIconAffineAnim(id, 3); + SetItemIconCallback(id, 3, CURSOR_AREA_BOX, 0); if (cursorArea == CURSOR_AREA_IN_BOX) { item = GetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM); - SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItem); - gPSSData->movingItem = item; + SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItemId); + gPSSData->movingItemId = item; } else { item = GetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM); - SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItem); - gPSSData->movingItem = item; + SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItemId); + gPSSData->movingItemId = item; } - id = sub_8096258(2, 0); - sub_80964B8(id, 4); - sub_80964E8(id, 4, cursorArea, cursorPos); + id = GetItemIconIdxByPosition(2, 0); + SetItemIconAffineAnim(id, 4); + SetItemIconCallback(id, 4, cursorArea, cursorPos); } void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos) @@ -268,17 +280,17 @@ void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos) if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) return; - id = sub_8096258(2, 0); - sub_80964B8(id, 4); - sub_80964E8(id, 2, cursorArea, cursorPos); + id = GetItemIconIdxByPosition(2, 0); + SetItemIconAffineAnim(id, 4); + SetItemIconCallback(id, 2, cursorArea, cursorPos); if (cursorArea == CURSOR_AREA_IN_BOX) { - SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItem); + SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &gPSSData->movingItemId); SetBoxMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL); } else { - SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItem); + SetMonData(&gPlayerParty[cursorPos], MON_DATA_HELD_ITEM, &gPSSData->movingItemId); SetPartyMonIconObjMode(cursorPos, ST_OAM_OBJ_NORMAL); } } @@ -292,9 +304,9 @@ void Item_TakeMons(u8 cursorArea, u8 cursorPos) return; item = 0; - id = sub_8096258(cursorArea, cursorPos); - sub_80964B8(id, 2); - sub_80964E8(id, 0, cursorArea, cursorPos); + id = GetItemIconIdxByPosition(cursorArea, cursorPos); + SetItemIconAffineAnim(id, 2); + SetItemIconCallback(id, 0, cursorArea, cursorPos); if (cursorArea == CURSOR_AREA_IN_BOX) { SetCurrentBoxMonData(cursorPos, MON_DATA_HELD_ITEM, &item); @@ -311,9 +323,9 @@ void sub_8096088(void) { if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) { - u8 id = sub_8096258(2, 0); - sub_80964B8(id, 5); - sub_80964E8(id, 0, CURSOR_AREA_BOX, 0); + u8 id = GetItemIconIdxByPosition(2, 0); + SetItemIconAffineAnim(id, 5); + SetItemIconCallback(id, 0, CURSOR_AREA_BOX, 0); } } @@ -326,8 +338,8 @@ void sub_80960C0(void) for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active && gPSSData->itemIconSprites[i].cursorArea == CURSOR_AREA_IN_PARTY) - sub_80964E8(i, 7, CURSOR_AREA_BOX, 0); + if (gPSSData->itemIcons[i].active && gPSSData->itemIcons[i].cursorArea == CURSOR_AREA_IN_PARTY) + SetItemIconCallback(i, 7, CURSOR_AREA_BOX, 0); } } @@ -337,11 +349,11 @@ bool8 sub_809610C(void) for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active) + if (gPSSData->itemIcons[i].active) { - if (!gPSSData->itemIconSprites[i].sprite->affineAnimEnded && gPSSData->itemIconSprites[i].sprite->affineAnimBeginning) + if (!gPSSData->itemIcons[i].sprite->affineAnimEnded && gPSSData->itemIcons[i].sprite->affineAnimBeginning) return TRUE; - if (gPSSData->itemIconSprites[i].sprite->callback != SpriteCallbackDummy && gPSSData->itemIconSprites[i].sprite->callback != sub_80969BC) + if (gPSSData->itemIcons[i].sprite->callback != SpriteCallbackDummy && gPSSData->itemIcons[i].sprite->callback != SpriteCB_ItemIcon_SetPosToCursor) return TRUE; } } @@ -357,7 +369,7 @@ bool8 IsActiveItemMoving(void) { for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active && gPSSData->itemIconSprites[i].cursorArea == CURSOR_AREA_BOX) + if (gPSSData->itemIcons[i].active && gPSSData->itemIcons[i].cursorArea == CURSOR_AREA_BOX) return TRUE; } } @@ -367,23 +379,23 @@ bool8 IsActiveItemMoving(void) const u8 *GetMovingItemName(void) { - return ItemId_GetName(gPSSData->movingItem); + return ItemId_GetName(gPSSData->movingItemId); } u16 GetMovingItem(void) { - return gPSSData->movingItem; + return gPSSData->movingItemId; } -static u8 sub_80961D8(void) +static u8 GetNewItemIconIdx(void) { u8 i; for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (!gPSSData->itemIconSprites[i].active) + if (!gPSSData->itemIcons[i].active) { - gPSSData->itemIconSprites[i].active = TRUE; + gPSSData->itemIcons[i].active = TRUE; return i; } } @@ -391,51 +403,51 @@ static u8 sub_80961D8(void) return MAX_ITEM_ICONS; } -static bool32 sub_8096210(u8 cursorArea, u8 cursorPos) +static bool32 IsItemIconAtPosition(u8 cursorArea, u8 cursorPos) { s32 i; for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active - && gPSSData->itemIconSprites[i].cursorArea == cursorArea - && gPSSData->itemIconSprites[i].cursorPos == cursorPos) + if (gPSSData->itemIcons[i].active + && gPSSData->itemIcons[i].cursorArea == cursorArea + && gPSSData->itemIcons[i].cursorPos == cursorPos) return TRUE; } return FALSE; } -static u8 sub_8096258(u8 cursorArea, u8 cursorPos) +static u8 GetItemIconIdxByPosition(u8 cursorArea, u8 cursorPos) { u8 i; for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active - && gPSSData->itemIconSprites[i].cursorArea == cursorArea - && gPSSData->itemIconSprites[i].cursorPos == cursorPos) + if (gPSSData->itemIcons[i].active + && gPSSData->itemIcons[i].cursorArea == cursorArea + && gPSSData->itemIcons[i].cursorPos == cursorPos) return i; } return MAX_ITEM_ICONS; } -static u8 sub_80962A8(struct Sprite *sprite) +static u8 GetItemIconIdxBySprite(struct Sprite *sprite) { u8 i; for (i = 0; i < MAX_ITEM_ICONS; i++) { - if (gPSSData->itemIconSprites[i].active - && gPSSData->itemIconSprites[i].sprite == sprite) + if (gPSSData->itemIcons[i].active + && gPSSData->itemIcons[i].sprite == sprite) return i; } return MAX_ITEM_ICONS; } -static void sub_80962F0(u8 id, u8 cursorArea, u8 cursorPos) +static void SetItemIconPosition(u8 id, u8 cursorArea, u8 cursorPos) { u8 row, column; @@ -447,100 +459,108 @@ static void sub_80962F0(u8 id, u8 cursorArea, u8 cursorPos) case CURSOR_AREA_IN_BOX: row = cursorPos % IN_BOX_ROWS; column = cursorPos / IN_BOX_ROWS; - gPSSData->itemIconSprites[id].sprite->x = (24 * row) + 112; - gPSSData->itemIconSprites[id].sprite->y = (24 * column) + 56; - gPSSData->itemIconSprites[id].sprite->oam.priority = 2; + gPSSData->itemIcons[id].sprite->x = (24 * row) + 112; + gPSSData->itemIcons[id].sprite->y = (24 * column) + 56; + gPSSData->itemIcons[id].sprite->oam.priority = 2; break; case CURSOR_AREA_IN_PARTY: if (cursorPos == 0) { - gPSSData->itemIconSprites[id].sprite->x = 116; - gPSSData->itemIconSprites[id].sprite->y = 76; + gPSSData->itemIcons[id].sprite->x = 116; + gPSSData->itemIcons[id].sprite->y = 76; } else { - gPSSData->itemIconSprites[id].sprite->x = 164; - gPSSData->itemIconSprites[id].sprite->y = 24 * (cursorPos - 1) + 28; + gPSSData->itemIcons[id].sprite->x = 164; + gPSSData->itemIcons[id].sprite->y = 24 * (cursorPos - 1) + 28; } - gPSSData->itemIconSprites[id].sprite->oam.priority = 1; + gPSSData->itemIcons[id].sprite->oam.priority = 1; break; } - gPSSData->itemIconSprites[id].cursorArea = cursorArea; - gPSSData->itemIconSprites[id].cursorPos = cursorPos; + gPSSData->itemIcons[id].cursorArea = cursorArea; + gPSSData->itemIcons[id].cursorPos = cursorPos; } -static void sub_8096408(u8 id, const u32 *itemTiles, const u32 *itemPal) +static void LoadItemIconGfx(u8 id, const u32 *itemTiles, const u32 *itemPal) { s32 i; if (id >= MAX_ITEM_ICONS) return; - CpuFastFill(0, gPSSData->field_42C4, 0x200); + CpuFastFill(0, gPSSData->itemIconBuffer, 0x200); LZ77UnCompWram(itemTiles, gPSSData->field_22C4); for (i = 0; i < 3; i++) - CpuFastCopy(gPSSData->field_22C4 + (i * 0x60), gPSSData->field_42C4 + (i * 0x80), 0x60); + CpuFastCopy(gPSSData->field_22C4 + (i * 0x60), gPSSData->itemIconBuffer + (i * 0x80), 0x60); - CpuFastCopy(gPSSData->field_42C4, gPSSData->itemIconSprites[id].tiles, 0x200); - LZ77UnCompWram(itemPal, gPSSData->field_42C4); - LoadPalette(gPSSData->field_42C4, gPSSData->itemIconSprites[id].palIndex, 0x20); + CpuFastCopy(gPSSData->itemIconBuffer, gPSSData->itemIcons[id].tiles, 0x200); + LZ77UnCompWram(itemPal, gPSSData->itemIconBuffer); + LoadPalette(gPSSData->itemIconBuffer, gPSSData->itemIcons[id].palIndex, 0x20); } -static void sub_80964B8(u8 id, u8 animNum) +static void SetItemIconAffineAnim(u8 id, u8 animNum) { if (id >= MAX_ITEM_ICONS) return; - StartSpriteAffineAnim(gPSSData->itemIconSprites[id].sprite, animNum); + StartSpriteAffineAnim(gPSSData->itemIcons[id].sprite, animNum); } -static void sub_80964E8(u8 id, u8 command, u8 cursorArea, u8 cursorPos) +#define sItemIconId data[0] +#define sState data[0] +#define sCursorArea data[6] +#define sCursorPos data[7] + +static void SetItemIconCallback(u8 id, u8 callbackId, u8 cursorArea, u8 cursorPos) { if (id >= MAX_ITEM_ICONS) return; - switch (command) + switch (callbackId) { - case 0: - gPSSData->itemIconSprites[id].sprite->data[0] = id; - gPSSData->itemIconSprites[id].sprite->callback = sub_809692C; + case ITEM_CB_WAIT_ANIM: + gPSSData->itemIcons[id].sprite->sItemIconId = id; + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_WaitAnim; break; - case 1: - gPSSData->itemIconSprites[id].sprite->data[0] = 0; - gPSSData->itemIconSprites[id].sprite->callback = sub_8096958; + case ITEM_CB_TO_HAND: + gPSSData->itemIcons[id].sprite->sState = 0; + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_ToHand; break; - case 2: - gPSSData->itemIconSprites[id].sprite->data[0] = 0; - gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea; - gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos; - gPSSData->itemIconSprites[id].sprite->callback = sub_80969F4; + case ITEM_CB_TO_MON: + gPSSData->itemIcons[id].sprite->sState = 0; + gPSSData->itemIcons[id].sprite->sCursorArea = cursorArea; + gPSSData->itemIcons[id].sprite->sCursorPos = cursorPos; + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_ToMon; break; - case 3: - gPSSData->itemIconSprites[id].sprite->data[0] = 0; - gPSSData->itemIconSprites[id].sprite->callback = sub_8096A74; - gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea; - gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos; + case ITEM_CB_SWAP_TO_HAND: + gPSSData->itemIcons[id].sprite->sState = 0; + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_SwapToHand; + gPSSData->itemIcons[id].sprite->sCursorArea = cursorArea; + gPSSData->itemIcons[id].sprite->sCursorPos = cursorPos; break; - case 4: - gPSSData->itemIconSprites[id].sprite->data[0] = 0; - gPSSData->itemIconSprites[id].sprite->data[6] = cursorArea; - gPSSData->itemIconSprites[id].sprite->data[7] = cursorPos; - gPSSData->itemIconSprites[id].sprite->callback = sub_8096B10; + case ITEM_CB_SWAP_TO_MON: + gPSSData->itemIcons[id].sprite->sState = 0; + gPSSData->itemIcons[id].sprite->sCursorArea = cursorArea; + gPSSData->itemIcons[id].sprite->sCursorPos = cursorPos; + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_SwapToMon; break; - case 7: - gPSSData->itemIconSprites[id].sprite->callback = sub_8096BAC; + case ITEM_CB_HIDE_PARTY: + // If cursor is on a Pokémon with a held item and + // the player closes the party menu, have the held + // item follow the Pokémon as the menu slides out + gPSSData->itemIcons[id].sprite->callback = SpriteCB_ItemIcon_HideParty; break; } } -static void sub_8096624(u8 id, bool8 show) +static void SetItemIconActive(u8 id, bool8 show) { if (id >= MAX_ITEM_ICONS) return; - gPSSData->itemIconSprites[id].active = show; - gPSSData->itemIconSprites[id].sprite->invisible = (show == FALSE); + gPSSData->itemIcons[id].active = show; + gPSSData->itemIcons[id].sprite->invisible = (show == FALSE); } static const u32 *GetItemIconPic(u16 itemId) @@ -558,7 +578,7 @@ void PrintItemDescription(void) const u8 *description; if (IsActiveItemMoving()) - description = ItemId_GetDescription(gPSSData->movingItem); + description = ItemId_GetDescription(gPSSData->movingItemId); else description = ItemId_GetDescription(gPSSData->displayMonItemId); @@ -566,77 +586,77 @@ void PrintItemDescription(void) AddTextPrinterParameterized5(2, FONT_2, description, 2, 0, 0, NULL, 0, 0); } -void sub_80966F4(void) +void InitItemInfoWindow(void) { - gPSSData->field_2236 = 25; - LoadBgTiles(0, gUnknown_83D35DC, 0x80, 0x1A4); - sub_8096898(0); + gPSSData->itemInfoWindowOffset = 25; + LoadBgTiles(0, sItemInfoFrame_Gfx, 0x80, 0x1A4); + DrawItemInfoWindow(0); } -bool8 sub_8096728(void) +bool8 UpdateItemInfoWindowSlideIn(void) { s32 i, var; - if (gPSSData->field_2236 == 0) + if (gPSSData->itemInfoWindowOffset == 0) return FALSE; - gPSSData->field_2236--; - var = 25 - gPSSData->field_2236; + gPSSData->itemInfoWindowOffset--; + var = 25 - gPSSData->itemInfoWindowOffset; for (i = 0; i < var; i++) { - WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->field_2236 + i, i, 12, 1, 8, 15, 25); + WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->itemInfoWindowOffset + i, i, 12, 1, 8, 15, 25); } - sub_8096898(var); - return (gPSSData->field_2236 != 0); + DrawItemInfoWindow(var); + return (gPSSData->itemInfoWindowOffset != 0); } -bool8 sub_80967C0(void) +bool8 UpdateItemInfoWindowSlideOut(void) { s32 i, var; - if (gPSSData->field_2236 == 25) + if (gPSSData->itemInfoWindowOffset == 25) return FALSE; - if (gPSSData->field_2236 == 0) + if (gPSSData->itemInfoWindowOffset == 0) FillBgTilemapBufferRect(0, 0, 25, 11, 1, 10, 17); - gPSSData->field_2236++; - var = 25 - gPSSData->field_2236; + gPSSData->itemInfoWindowOffset++; + var = 25 - gPSSData->itemInfoWindowOffset; for (i = 0; i < var; i++) { - WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->field_2236 + i, i, 12, 1, 8, 15, 25); + WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->itemInfoWindowOffset + i, i, 12, 1, 8, 15, 25); } - sub_8096898(var); + DrawItemInfoWindow(var); FillBgTilemapBufferRect(0, 0, var, 11, 1, 10, 0x11); - return (gPSSData->field_2236 != 25); + return (gPSSData->itemInfoWindowOffset != 25); } -static void sub_8096898(u32 x) +static void DrawItemInfoWindow(u32 pos) { - if (x != 0) + if (pos != 0) { - FillBgTilemapBufferRect(0, 0x1A4, 0, 0xB, x, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x9A4, 0, 0x14, x, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A4, 0, 0xB, pos, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x9A4, 0, 0x14, pos, 1, 0xFu); } - FillBgTilemapBufferRect(0, 0x1A5, x, 0xC, 1, 8, 0xFu); - FillBgTilemapBufferRect(0, 0x1A6, x, 0xB, 1, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x1A7, x, 0x14, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A5, pos, 0xC, 1, 8, 0xFu); + FillBgTilemapBufferRect(0, 0x1A6, pos, 0xB, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A7, pos, 0x14, 1, 1, 0xFu); ScheduleBgCopyTilemapToVram(0); } -static void sub_809692C(struct Sprite *sprite) +static void SpriteCB_ItemIcon_WaitAnim(struct Sprite *sprite) { if (sprite->affineAnimEnded) { - sub_8096624(sprite->data[0], FALSE); + SetItemIconActive(sprite->data[0], FALSE); sprite->callback = SpriteCallbackDummy; } } -static void sub_8096958(struct Sprite *sprite) +static void SpriteCB_ItemIcon_ToHand(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -653,19 +673,19 @@ static void sub_8096958(struct Sprite *sprite) sprite->x = sprite->data[1] >> 4; sprite->y = sprite->data[2] >> 4; if (++sprite->data[5] > 11) - sprite->callback = sub_80969BC; + sprite->callback = SpriteCB_ItemIcon_SetPosToCursor; break; } } -static void sub_80969BC(struct Sprite *sprite) +static void SpriteCB_ItemIcon_SetPosToCursor(struct Sprite *sprite) { sprite->x = gPSSData->cursorSprite->x + 4; sprite->y = gPSSData->cursorSprite->y + gPSSData->cursorSprite->y2 + 8; sprite->oam.priority = gPSSData->cursorSprite->oam.priority; } -static void sub_80969F4(struct Sprite *sprite) +static void SpriteCB_ItemIcon_ToMon(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -683,14 +703,14 @@ static void sub_80969F4(struct Sprite *sprite) sprite->y = sprite->data[2] >> 4; if (++sprite->data[5] > 11) { - sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]); + SetItemIconPosition(GetItemIconIdxBySprite(sprite), sprite->data[6], sprite->data[7]); sprite->callback = SpriteCallbackDummy; } break; } } -static void sub_8096A74(struct Sprite *sprite) +static void SpriteCB_ItemIcon_SwapToHand(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -709,15 +729,15 @@ static void sub_8096A74(struct Sprite *sprite) sprite->x2 = gSineTable[sprite->data[5] * 8] >> 4; if (++sprite->data[5] > 11) { - sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]); + SetItemIconPosition(GetItemIconIdxBySprite(sprite), sprite->data[6], sprite->data[7]); sprite->x2 = 0; - sprite->callback = sub_80969BC; + sprite->callback = SpriteCB_ItemIcon_SetPosToCursor; } break; } } -static void sub_8096B10(struct Sprite *sprite) +static void SpriteCB_ItemIcon_SwapToMon(struct Sprite *sprite) { switch (sprite->data[0]) { @@ -736,7 +756,7 @@ static void sub_8096B10(struct Sprite *sprite) sprite->x2 = -(gSineTable[sprite->data[5] * 8] >> 4); if (++sprite->data[5] > 11) { - sub_80962F0(sub_80962A8(sprite), sprite->data[6], sprite->data[7]); + SetItemIconPosition(GetItemIconIdxBySprite(sprite), sprite->data[6], sprite->data[7]); sprite->callback = SpriteCallbackDummy; sprite->x2 = 0; } @@ -744,12 +764,17 @@ static void sub_8096B10(struct Sprite *sprite) } } -static void sub_8096BAC(struct Sprite *sprite) +static void SpriteCB_ItemIcon_HideParty(struct Sprite *sprite) { sprite->y -= 8; if (sprite->y + sprite->y2 < -16) { sprite->callback = SpriteCallbackDummy; - sub_8096624(sub_80962A8(sprite), FALSE); + SetItemIconActive(GetItemIconIdxBySprite(sprite), FALSE); } } + +#undef sState +#undef sItemIconId +#undef sCursorArea +#undef sCursorPos From 9d9c2a9667d12fb0177f5c84b2ca5ccf28e13dce Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 31 Jul 2022 22:02:44 -0400 Subject: [PATCH 09/13] Combining pss 8 and 9 --- include/pokemon_storage_system_internal.h | 12 ++-- ld_script.txt | 1 - src/pokemon_storage_system_8.c | 84 ++++++++++++++++++++++ src/pokemon_storage_system_9.c | 87 ----------------------- sym_ewram.txt | 2 +- 5 files changed, 91 insertions(+), 95 deletions(-) delete mode 100644 src/pokemon_storage_system_9.c diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index c53b5ff86..1376c7396 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -198,12 +198,12 @@ struct StorageMenu struct UnkUtilData { - const u8 *unk_00; - u8 *unk_04; - u16 unk_08; - u16 unk_0a; - u16 newField; - void (*unk_0c)(struct UnkUtilData *data); + const u8 *src; + u8 *dest; + u16 size; + u16 unk; + u16 height; + void (*func)(struct UnkUtilData *data); }; struct UnkUtil diff --git a/ld_script.txt b/ld_script.txt index ab1ba9d61..2ea2d0cfd 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -137,7 +137,6 @@ SECTIONS { src/pokemon_storage_system_6.o(.text); src/pokemon_storage_system_7.o(.text); src/pokemon_storage_system_8.o(.text); - src/pokemon_storage_system_9.o(.text); src/pokemon_icon.o(.text); src/script_movement.o(.text); src/fldeff_cut.o(.text); diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index 7b8670e36..327ceb541 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -778,3 +778,87 @@ static void SpriteCB_ItemIcon_HideParty(struct Sprite *sprite) #undef sItemIconId #undef sCursorArea #undef sCursorPos + +static EWRAM_DATA struct UnkUtil *gUnknown_203982C = NULL; + +static void sub_8096CDC(struct UnkUtilData *unkStruct); +static void sub_8096D70(struct UnkUtilData *unkStruct); + +void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2) +{ + gUnknown_203982C = arg0; + arg0->unk_00 = arg1; + arg0->unk_05 = arg2; + arg0->unk_04 = 0; +} + +void sub_8096BF8(void) +{ + u16 i; + + if (gUnknown_203982C->unk_04) + { + for (i = 0; i < gUnknown_203982C->unk_04; i++) + { + struct UnkUtilData *unkStruct = &gUnknown_203982C->unk_00[i]; + unkStruct->func(unkStruct); + } + + gUnknown_203982C->unk_04 = 0; + } +} + +static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) +{ + struct UnkUtilData *unkStruct; + + if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) + return FALSE; + + unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; + unkStruct->size = width * 2; + unkStruct->dest = dest + 2 * (dTop * 32 + dLeft); + unkStruct->src = src + 2 * (sTop * unkArg + sLeft); + unkStruct->height = height; + unkStruct->unk = unkArg; + unkStruct->func = sub_8096CDC; + return TRUE; +} + +static void sub_8096CDC(struct UnkUtilData *unkStruct) +{ + u16 i; + + for (i = 0; i < unkStruct->height; i++) + { + CpuCopy16(unkStruct->src, unkStruct->dest, unkStruct->size); + unkStruct->dest += 64; + unkStruct->src += (unkStruct->unk * 2); + } +} + +static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) +{ + struct UnkUtilData *unkStruct; + + if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) + return FALSE; + + unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; + unkStruct->size = width * 2; + unkStruct->dest = dest + ((dTop * 32) + dLeft) * 2; + unkStruct->height = height; + unkStruct->func = sub_8096D70; + return TRUE; +} + +static void sub_8096D70(struct UnkUtilData *data) +{ + u16 i; + + for (i = 0; i < data->height; i++) + { + Dma3FillLarge_(0, data->dest, data->size, 16); + data->dest += 64; + } +} diff --git a/src/pokemon_storage_system_9.c b/src/pokemon_storage_system_9.c deleted file mode 100644 index d5f648765..000000000 --- a/src/pokemon_storage_system_9.c +++ /dev/null @@ -1,87 +0,0 @@ -#include "global.h" -#include "gflib.h" -#include "pokemon_storage_system_internal.h" - -static EWRAM_DATA struct UnkUtil *gUnknown_203982C = NULL; - -static void sub_8096CDC(struct UnkUtilData *unkStruct); -static void sub_8096D70(struct UnkUtilData *unkStruct); - -void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2) -{ - gUnknown_203982C = arg0; - arg0->unk_00 = arg1; - arg0->unk_05 = arg2; - arg0->unk_04 = 0; -} - -void sub_8096BF8(void) -{ - u16 i; - - if (gUnknown_203982C->unk_04) - { - for (i = 0; i < gUnknown_203982C->unk_04; i++) - { - struct UnkUtilData *unkStruct = &gUnknown_203982C->unk_00[i]; - unkStruct->unk_0c(unkStruct); - } - - gUnknown_203982C->unk_04 = 0; - } -} - -static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) -{ - struct UnkUtilData *unkStruct; - - if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) - return FALSE; - - unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; - unkStruct->unk_08 = width * 2; - unkStruct->unk_04 = dest + 2 * (dTop * 32 + dLeft); - unkStruct->unk_00 = src + 2 * (sTop * unkArg + sLeft); - unkStruct->newField = height; - unkStruct->unk_0a = unkArg; - unkStruct->unk_0c = sub_8096CDC; - return TRUE; -} - -static void sub_8096CDC(struct UnkUtilData *unkStruct) -{ - u16 i; - - for (i = 0; i < unkStruct->newField; i++) - { - CpuCopy16(unkStruct->unk_00, unkStruct->unk_04, unkStruct->unk_08); - unkStruct->unk_04 += 64; - unkStruct->unk_00 += (unkStruct->unk_0a * 2); - } -} - -static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) -{ - struct UnkUtilData *unkStruct; - - if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) - return FALSE; - - unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; - unkStruct->unk_08 = width * 2; - unkStruct->unk_04 = dest + ((dTop * 32) + dLeft) * 2; - unkStruct->newField = height; - unkStruct->unk_0c = sub_8096D70; - return TRUE; -} - -static void sub_8096D70(struct UnkUtilData *unkStruct) -{ - u16 i; - - for (i = 0; i < unkStruct->newField; i++) - { - Dma3FillLarge_(0, unkStruct->unk_04, unkStruct->unk_08, 16); - unkStruct->unk_04 += 64; - } -} diff --git a/sym_ewram.txt b/sym_ewram.txt index b426b2ddf..9fe766a2b 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -42,7 +42,7 @@ .include "src/pokemon_storage_system_3.o" .include "src/pokemon_storage_system_5.o" .include "src/pokemon_storage_system_7.o" - .include "src/pokemon_storage_system_9.o" + .include "src/pokemon_storage_system_8.o" .include "src/script_movement.o" .include "src/fldeff_cut.o" .include "src/item_menu_icons.o" From 36a5761d360fc46a350a3491ff8b57f4c2e30f2b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Sun, 31 Jul 2022 22:39:59 -0400 Subject: [PATCH 10/13] PSS sync --- include/pokemon_storage_system_internal.h | 23 ++-- src/pokemon_storage_system_2.c | 10 -- src/pokemon_storage_system_3.c | 34 +++--- src/pokemon_storage_system_4.c | 8 +- src/pokemon_storage_system_5.c | 28 ++--- src/pokemon_storage_system_8.c | 127 ++++++++++++---------- 6 files changed, 117 insertions(+), 113 deletions(-) diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 1376c7396..3890928e4 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -27,11 +27,12 @@ enum enum { - BOX_OPTION_WITHDRAW, - BOX_OPTION_DEPOSIT, - BOX_OPTION_MOVE_MONS, - BOX_OPTION_MOVE_ITEMS, - BOX_OPTION_EXIT, + OPTION_WITHDRAW, + OPTION_DEPOSIT, + OPTION_MOVE_MONS, + OPTION_MOVE_ITEMS, + OPTION_EXIT, + OPTIONS_COUNT }; enum @@ -208,9 +209,9 @@ struct UnkUtilData struct UnkUtil { - struct UnkUtilData *unk_00; - u8 unk_04; - u8 unk_05; + struct UnkUtilData *data; + u8 numActive; + u8 max; }; struct PSS_ItemIconSprite @@ -437,7 +438,7 @@ bool8 sub_8095050(void); void sub_80950A4(void); void sub_80950BC(u8 a0); bool8 sub_80950D0(void); -void sub_8095B5C(void); +void CreateItemIconSprites(void); void sub_8096088(void); void sub_80960C0(void); bool8 sub_809610C(void); @@ -445,8 +446,8 @@ const u8 *GetMovingItemName(void); void InitItemInfoWindow(void); bool8 UpdateItemInfoWindowSlideIn(void); bool8 UpdateItemInfoWindowSlideOut(void); -void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2); -void sub_8096BF8(void); +void UnkUtil_Init(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2); +void UnkUtil_Run(void); void AddMenu(void); bool8 CanMovePartyMon(void); bool8 CanShiftMon(void); diff --git a/src/pokemon_storage_system_2.c b/src/pokemon_storage_system_2.c index d835fb50c..918ffaf7d 100644 --- a/src/pokemon_storage_system_2.c +++ b/src/pokemon_storage_system_2.c @@ -15,16 +15,6 @@ #include "constants/field_weather.h" #include "constants/help_system.h" -// PC main menu options -enum { - OPTION_WITHDRAW, - OPTION_DEPOSIT, - OPTION_MOVE_MONS, - OPTION_MOVE_ITEMS, - OPTION_EXIT, - OPTIONS_COUNT -}; - static EWRAM_DATA u8 sPreviousBoxOption = 0; static EWRAM_DATA struct ChooseBoxMenu *sBoxSelectionPopupSpriteManager = NULL; diff --git a/src/pokemon_storage_system_3.c b/src/pokemon_storage_system_3.c index d68aaafdc..46212d06c 100644 --- a/src/pokemon_storage_system_3.c +++ b/src/pokemon_storage_system_3.c @@ -349,7 +349,7 @@ static void VblankCb_PSS(void) { LoadOam(); ProcessSpriteCopyRequests(); - sub_8096BF8(); + UnkUtil_Run(); TransferPlttBuffer(); SetGpuReg(REG_OFFSET_BG2HOFS, gPSSData->bg2_X); } @@ -421,7 +421,7 @@ static void sub_808CF10(void) FreeAllSpritePalettes(); ClearDma3Requests(); gReservedSpriteTileCount = 0x280; - sub_8096BE4(&gPSSData->unkUtil, gPSSData->unkUtilData, 8); + UnkUtil_Init(&gPSSData->unkUtil, gPSSData->unkUtilData, 8); gKeyRepeatStartDelay = 20; ClearScheduledBgCopiesToVram(); AllocBoxPartyPokemonDropdowns(3); @@ -433,13 +433,13 @@ static void sub_808CF10(void) static void sub_808CF94(void) { sub_8092B50(); - sInPartyMenu = gPSSData->boxOption == BOX_OPTION_DEPOSIT; + sInPartyMenu = gPSSData->boxOption == OPTION_DEPOSIT; gUnknown_20397B6 = 0; } static void sub_808CFC4(void) { - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT2_ALL); SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(7, 11)); @@ -529,7 +529,7 @@ static void Cb_InitPSS(u8 taskId) if (sub_809140C()) return; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { gPSSData->markMenu.baseTileTag = TAG_TILE_D; gPSSData->markMenu.basePaletteTag = TAG_PAL_DACE; @@ -538,7 +538,7 @@ static void Cb_InitPSS(u8 taskId) } else { - sub_8095B5C(); + CreateItemIconSprites(); sub_808FDFC(); } break; @@ -608,7 +608,7 @@ static void Cb_MainPSS(u8 taskId) gPSSData->state = 1; break; case 5: - if (gPSSData->boxOption != BOX_OPTION_MOVE_MONS && gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_MONS && gPSSData->boxOption != OPTION_MOVE_ITEMS) { PrintStorageActionText(PC_TEXT_WHICH_ONE_WILL_TAKE); gPSSData->state = 3; @@ -620,14 +620,14 @@ static void Cb_MainPSS(u8 taskId) } break; case 6: - if (gPSSData->boxOption == BOX_OPTION_MOVE_MONS) + if (gPSSData->boxOption == OPTION_MOVE_MONS) { if (IsMonBeingMoved() && ItemIsMail(gPSSData->displayMonItemId)) gPSSData->state = 5; else SetPSSCallback(Cb_HidePartyPokemon); } - else if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + else if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { SetPSSCallback(Cb_HidePartyPokemon); } @@ -650,7 +650,7 @@ static void Cb_MainPSS(u8 taskId) gPSSData->newCurrBoxId = StorageGetCurrentBox() + 1; if (gPSSData->newCurrBoxId >= TOTAL_BOXES_COUNT) gPSSData->newCurrBoxId = 0; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { SetUpScrollToBox(gPSSData->newCurrBoxId); gPSSData->state = 2; @@ -666,7 +666,7 @@ static void Cb_MainPSS(u8 taskId) gPSSData->newCurrBoxId = StorageGetCurrentBox() - 1; if (gPSSData->newCurrBoxId < 0) gPSSData->newCurrBoxId = TOTAL_BOXES_COUNT - 1; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { SetUpScrollToBox(gPSSData->newCurrBoxId); gPSSData->state = 2; @@ -794,7 +794,7 @@ static void Cb_MainPSS(u8 taskId) BoxSetMosaic(); } - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { sub_8094D84(); gPSSData->state = 11; @@ -909,7 +909,7 @@ static void Cb_OnSelectedMon(u8 taskId) if (!BoxGetMosaic()) { PlaySE(SE_SELECT); - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) PrintStorageActionText(PC_TEXT_IS_SELECTED); else if (IsActiveItemMoving() || gPSSData->displayMonItemId != 0) PrintStorageActionText(PC_TEXT_IS_SELECTED2); @@ -2041,7 +2041,7 @@ static void Cb_ChangeScreen(u8 taskId) u8 mode, monIndex, maxMonIndex; u8 screenChangeType = gPSSData->screenChangeType; - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS && IsActiveItemMoving() == TRUE) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS && IsActiveItemMoving() == TRUE) gUnknown_20397BA = GetMovingItem(); else gUnknown_20397BA = ITEM_NONE; @@ -2149,7 +2149,7 @@ static void sub_808F078(void) LoadPalette(gUnknown_8E9C3F8, 0, 0x20); LoadPalette(gUnknown_8E9C418, 0x20, 0x20); LoadPalette(gUnknown_83CEA10, 0xF0, 0x20); - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) LoadPalette(gUnknown_83CE738, 0x30, 0x20); else LoadPalette(gUnknown_83CE758, 0x30, 0x20); @@ -2290,7 +2290,7 @@ static void PrintCursorMonInfo(void) u16 i; u16 y; FillWindowPixelBuffer(0, PIXEL_FILL(1)); - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { for (i = 0, y = 0; i < 3; i++, y += 14) { @@ -2403,7 +2403,7 @@ static void SetUpHidePartyMenu(void) gPSSData->partyMenuUnused1 = 0; gPSSData->partyMenuY = 22; gPSSData->partyMenuMoveTimer = 0; - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) sub_80960C0(); } diff --git a/src/pokemon_storage_system_4.c b/src/pokemon_storage_system_4.c index 349a9b7b1..cbd2f1b9c 100644 --- a/src/pokemon_storage_system_4.c +++ b/src/pokemon_storage_system_4.c @@ -314,7 +314,7 @@ static void sub_80900D4(u8 boxId) } } - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { for (boxPosition = 0; boxPosition < IN_BOX_COUNT; boxPosition++) { @@ -335,7 +335,7 @@ void sub_80901EC(u8 boxPosition) u32 personality = GetCurrentBoxMonData(boxPosition, MON_DATA_PERSONALITY); gPSSData->boxMonsSprites[boxPosition] = CreateMonIconSprite(species, personality, x, y, 2, 19 - (boxPosition % IN_BOX_ROWS)); - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) gPSSData->boxMonsSprites[boxPosition]->oam.objMode = ST_OAM_OBJ_BLEND; } } @@ -411,7 +411,7 @@ static u8 sub_80903A4(u8 row, u16 times, s16 xDelta) u8 count = 0; u8 boxPosition = row; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { for (i = 0; i < IN_BOX_COLUMNS; i++) { @@ -591,7 +591,7 @@ void CreatePartyMonsSprites(bool8 arg0) } } - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { for (i = 0; i < PARTY_SIZE; i++) { diff --git a/src/pokemon_storage_system_5.c b/src/pokemon_storage_system_5.c index 68a23b053..f01a1551b 100644 --- a/src/pokemon_storage_system_5.c +++ b/src/pokemon_storage_system_5.c @@ -51,7 +51,7 @@ static const u16 sHandCursorShadowTiles[] = INCBIN_U16("graphics/interface/pss_u void sub_80922C0(void) { - if (gPSSData->boxOption != BOX_OPTION_DEPOSIT) + if (gPSSData->boxOption != OPTION_DEPOSIT) sBoxCursorArea = CURSOR_AREA_IN_BOX; else sBoxCursorArea = CURSOR_AREA_IN_PARTY; @@ -140,7 +140,7 @@ bool8 sub_80924A8(void) if (gPSSData->cursorMoveSteps == 0) { - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return FALSE; else return sub_809610C(); @@ -245,7 +245,7 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) { sub_8092604(newCurosrArea, newCursorPosition); sub_8092660(); - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { if (gPSSData->inBoxMovingMode == 0 && !sIsMonBeingMoved) StartSpriteAnim(gPSSData->cursorSprite, 1); @@ -256,7 +256,7 @@ static void sub_80927E8(u8 newCurosrArea, u8 newCursorPosition) StartSpriteAnim(gPSSData->cursorSprite, 1); } - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { if (sBoxCursorArea == CURSOR_AREA_IN_BOX) sub_8095D44(CURSOR_AREA_IN_BOX, sBoxCursorPosition); @@ -304,7 +304,7 @@ static void sub_80929B0(void) { sBoxCursorArea = gPSSData->newCursorArea; sBoxCursorPosition = gPSSData->newCursorPosition; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) { if (gPSSData->inBoxMovingMode == 0 && !sIsMonBeingMoved) StartSpriteAnim(gPSSData->cursorSprite, 1); @@ -1237,7 +1237,7 @@ static u8 InBoxInput_Normal(void) if (!sCanOnlyMove) return 8; - if (gPSSData->boxOption != BOX_OPTION_MOVE_MONS || sIsMonBeingMoved == TRUE) + if (gPSSData->boxOption != OPTION_MOVE_MONS || sIsMonBeingMoved == TRUE) { switch (sub_8094E50(0)) { @@ -1509,7 +1509,7 @@ static u8 HandleInput_InParty(void) { if (sBoxCursorPosition == PARTY_SIZE) { - if (gPSSData->boxOption == BOX_OPTION_DEPOSIT) + if (gPSSData->boxOption == OPTION_DEPOSIT) return 4; gotoBox = TRUE; @@ -1543,7 +1543,7 @@ static u8 HandleInput_InParty(void) if (JOY_NEW(B_BUTTON)) { - if (gPSSData->boxOption == BOX_OPTION_DEPOSIT) + if (gPSSData->boxOption == OPTION_DEPOSIT) return 19; gotoBox = TRUE; @@ -1754,7 +1754,7 @@ static void AddBoxMenu(void) static bool8 sub_8094924(void) { InitMenu(); - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return sub_809494C(); else return sub_8094A0C(); @@ -1766,19 +1766,19 @@ static bool8 sub_809494C(void) switch (gPSSData->boxOption) { - case BOX_OPTION_DEPOSIT: + case OPTION_DEPOSIT: if (var0) SetMenuText(PC_TEXT_STORE); else return FALSE; break; - case BOX_OPTION_WITHDRAW: + case OPTION_WITHDRAW: if (var0) SetMenuText(PC_TEXT_WITHDRAW); else return FALSE; break; - case BOX_OPTION_MOVE_MONS: + case OPTION_MOVE_MONS: if (sIsMonBeingMoved) { if (var0) @@ -1794,13 +1794,13 @@ static bool8 sub_809494C(void) return FALSE; } break; - case BOX_OPTION_MOVE_ITEMS: + case OPTION_MOVE_ITEMS: default: return FALSE; } SetMenuText(PC_TEXT_SUMMARY); - if (gPSSData->boxOption == BOX_OPTION_MOVE_MONS) + if (gPSSData->boxOption == OPTION_MOVE_MONS) { if (!sBoxCursorArea) SetMenuText(PC_TEXT_WITHDRAW); diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index 327ceb541..b14eb9844 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -110,7 +110,7 @@ static const union AffineAnimCmd *const gUnknown_83D370C[] = { gUnknown_83D36FC }; -static const struct SpriteTemplate gUnknown_83D3728 = { +static const struct SpriteTemplate sSpriteTemplate_ItemIcon = { .tileTag = TAG_TILE_7, .paletteTag = TAG_PAL_DACB, .oam = &gUnknown_83D365C, @@ -120,25 +120,25 @@ static const struct SpriteTemplate gUnknown_83D3728 = { .callback = SpriteCallbackDummy, }; -void sub_8095B5C(void) +void CreateItemIconSprites(void) { s32 i; u8 spriteId; struct CompressedSpriteSheet spriteSheet; struct SpriteTemplate spriteTemplate; - static u32 gUnknown_3000FE8[0x61]; + static u32 sItemIconGfxBuffer[0x61]; - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { - spriteSheet.data = gUnknown_3000FE8; + spriteSheet.data = sItemIconGfxBuffer; spriteSheet.size = 0x200; - spriteTemplate = gUnknown_83D3728; + spriteTemplate = sSpriteTemplate_ItemIcon; for (i = 0; i < MAX_ITEM_ICONS; i++) { spriteSheet.tag = TAG_TILE_7 + i; LoadCompressedSpriteSheet(&spriteSheet); - gPSSData->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * 32 + (void *)(OBJ_VRAM0); + gPSSData->itemIcons[i].tiles = GetSpriteTileStartByTag(spriteSheet.tag) * TILE_SIZE_4BPP + (void *)(OBJ_VRAM0); gPSSData->itemIcons[i].palIndex = AllocSpritePalette(TAG_PAL_DACB + i); gPSSData->itemIcons[i].palIndex *= 16; gPSSData->itemIcons[i].palIndex += 0x100; @@ -147,7 +147,7 @@ void sub_8095B5C(void) spriteId = CreateSprite(&spriteTemplate, 0, 0, 11); gPSSData->itemIcons[i].sprite = &gSprites[spriteId]; gPSSData->itemIcons[i].sprite->invisible = TRUE; - gPSSData->itemIcons[i].active = 0; + gPSSData->itemIcons[i].active = FALSE; } } gPSSData->movingItemId = ITEM_NONE; @@ -157,7 +157,7 @@ void sub_8095C84(u8 cursorArea, u8 cursorPos) { u16 heldItem; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; if (IsItemIconAtPosition(cursorArea, cursorPos)) return; @@ -195,7 +195,7 @@ void sub_8095D44(u8 cursorArea, u8 cursorPos) { u8 id; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; id = GetItemIconIdxByPosition(cursorArea, cursorPos); @@ -208,7 +208,7 @@ void Item_FromMonToMoving(u8 cursorArea, u8 cursorPos) u8 id; u16 item; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; id = GetItemIconIdxByPosition(cursorArea, cursorPos); @@ -249,7 +249,7 @@ void Item_SwitchMonsWithMoving(u8 cursorArea, u8 cursorPos) u8 id; u16 item; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; id = GetItemIconIdxByPosition(cursorArea, cursorPos); @@ -277,7 +277,7 @@ void Item_GiveMovingToMon(u8 cursorArea, u8 cursorPos) { u8 id; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; id = GetItemIconIdxByPosition(2, 0); @@ -300,7 +300,7 @@ void Item_TakeMons(u8 cursorArea, u8 cursorPos) u8 id; u16 item; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; item = 0; @@ -321,7 +321,7 @@ void Item_TakeMons(u8 cursorArea, u8 cursorPos) void sub_8096088(void) { - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { u8 id = GetItemIconIdxByPosition(2, 0); SetItemIconAffineAnim(id, 5); @@ -333,7 +333,7 @@ void sub_80960C0(void) { s32 i; - if (gPSSData->boxOption != BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption != OPTION_MOVE_ITEMS) return; for (i = 0; i < MAX_ITEM_ICONS; i++) @@ -365,7 +365,7 @@ bool8 IsActiveItemMoving(void) { s32 i; - if (gPSSData->boxOption == BOX_OPTION_MOVE_ITEMS) + if (gPSSData->boxOption == OPTION_MOVE_ITEMS) { for (i = 0; i < MAX_ITEM_ICONS; i++) { @@ -779,80 +779,93 @@ static void SpriteCB_ItemIcon_HideParty(struct Sprite *sprite) #undef sCursorArea #undef sCursorPos -static EWRAM_DATA struct UnkUtil *gUnknown_203982C = NULL; -static void sub_8096CDC(struct UnkUtilData *unkStruct); -static void sub_8096D70(struct UnkUtilData *unkStruct); +//------------------------------------------------------------------------------ +// SECTION: UnkUtil +// +// Some data transfer utility that goes functionally unused. +// It gets initialized with UnkUtil_Init, and run every vblank in Pokémon +// Storage with UnkUtil_Run, but neither of the Add functions are ever used, +// so UnkUtil_Run performs no actions. +//------------------------------------------------------------------------------ -void sub_8096BE4(struct UnkUtil *arg0, struct UnkUtilData *arg1, u32 arg2) + +static EWRAM_DATA struct UnkUtil *sUnkUtil = NULL; + +static void UnkUtil_CpuRun(struct UnkUtilData *unkStruct); +static void UnkUtil_DmaRun(struct UnkUtilData *unkStruct); + +void UnkUtil_Init(struct UnkUtil *util, struct UnkUtilData *data, u32 max) { - gUnknown_203982C = arg0; - arg0->unk_00 = arg1; - arg0->unk_05 = arg2; - arg0->unk_04 = 0; + sUnkUtil = util; + util->data = data; + util->max = max; + util->numActive = 0; } -void sub_8096BF8(void) +void UnkUtil_Run(void) { u16 i; - - if (gUnknown_203982C->unk_04) + if (sUnkUtil->numActive) { - for (i = 0; i < gUnknown_203982C->unk_04; i++) + for (i = 0; i < sUnkUtil->numActive; i++) { - struct UnkUtilData *unkStruct = &gUnknown_203982C->unk_00[i]; - unkStruct->func(unkStruct); + struct UnkUtilData *data = &sUnkUtil->data[i]; + data->func(data); } - - gUnknown_203982C->unk_04 = 0; + sUnkUtil->numActive = 0; } } -static bool8 sub_8096C40(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) +// Unused +static bool8 UnkUtil_CpuAdd(u8 *dest, u16 dLeft, u16 dTop, const u8 *src, u16 sLeft, u16 sTop, u16 width, u16 height, u16 unkArg) { - struct UnkUtilData *unkStruct; + struct UnkUtilData *data; - if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) + if (sUnkUtil->numActive >= sUnkUtil->max) return FALSE; - unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; - unkStruct->size = width * 2; - unkStruct->dest = dest + 2 * (dTop * 32 + dLeft); - unkStruct->src = src + 2 * (sTop * unkArg + sLeft); - unkStruct->height = height; - unkStruct->unk = unkArg; - unkStruct->func = sub_8096CDC; + data = &sUnkUtil->data[sUnkUtil->numActive++]; + data->size = width * 2; + data->dest = dest + 2 * (dTop * 32 + dLeft); + data->src = src + 2 * (sTop * unkArg + sLeft); + data->height = height; + data->unk = unkArg; + data->func = UnkUtil_CpuRun; return TRUE; } -static void sub_8096CDC(struct UnkUtilData *unkStruct) +// Functionally unused +static void UnkUtil_CpuRun(struct UnkUtilData *data) { u16 i; - for (i = 0; i < unkStruct->height; i++) + for (i = 0; i < data->height; i++) { - CpuCopy16(unkStruct->src, unkStruct->dest, unkStruct->size); - unkStruct->dest += 64; - unkStruct->src += (unkStruct->unk * 2); + CpuCopy16(data->src, data->dest, data->size); + data->dest += 64; + data->src += (data->unk * 2); } } -static bool8 sub_8096D14(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) +// Unused +static bool8 UnkUtil_DmaAdd(void *dest, u16 dLeft, u16 dTop, u16 width, u16 height) { - struct UnkUtilData *unkStruct; + struct UnkUtilData *data; - if (gUnknown_203982C->unk_04 >= gUnknown_203982C->unk_05) + if (sUnkUtil->numActive >= sUnkUtil->max) return FALSE; - unkStruct = &gUnknown_203982C->unk_00[gUnknown_203982C->unk_04++]; - unkStruct->size = width * 2; - unkStruct->dest = dest + ((dTop * 32) + dLeft) * 2; - unkStruct->height = height; - unkStruct->func = sub_8096D70; + data = &sUnkUtil->data[sUnkUtil->numActive++]; + data->size = width * 2; + data->dest = dest + ((dTop * 32) + dLeft) * 2; + data->height = height; + data->func = UnkUtil_DmaRun; return TRUE; } -static void sub_8096D70(struct UnkUtilData *data) +// Functionally unused +static void UnkUtil_DmaRun(struct UnkUtilData *data) { u16 i; From 19a521fe335cff0caebcf839a9820eb263492393 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 1 Aug 2022 01:05:18 -0400 Subject: [PATCH 11/13] Almost complete battle_scripts_1.s sync --- asm/macros/battle_script.inc | 37 +- data/battle_scripts_1.s | 1820 +++++++++++++++---------------- data/battle_scripts_2.s | 62 +- include/battle_string_ids.h | 2 +- include/constants/battle.h | 4 + include/constants/battle_anim.h | 4 +- src/battle_message.c | 754 ++++++------- 7 files changed, 1338 insertions(+), 1345 deletions(-) diff --git a/asm/macros/battle_script.inc b/asm/macros/battle_script.inc index 678324275..d9a55bbcd 100644 --- a/asm/macros/battle_script.inc +++ b/asm/macros/battle_script.inc @@ -109,10 +109,17 @@ .byte \battler .endm - .macro tryfaintmon battler:req, fromMove:req, ptr:req + .macro tryfaintmon battler:req .byte 0x19 .byte \battler - .byte \fromMove + .byte FALSE + .4byte NULL + .endm + + .macro tryfaintmon_spikes battler:req, ptr:req + .byte 0x19 + .byte \battler + .byte TRUE .4byte \ptr .endm @@ -373,18 +380,18 @@ .byte 0x44 .endm - .macro playanimation battler:req, param1:req, param2:req + .macro playanimation battler:req, animType:req, arg=NULL .byte 0x45 .byte \battler - .byte \param1 - .4byte \param2 + .byte \animType + .4byte \arg .endm - .macro playanimation2 battler:req, param1:req, param2:req + .macro playanimation_var battler:req, animType:req, arg=NULL .byte 0x46 .byte \battler - .4byte \param1 - .4byte \param2 + .4byte \animType + .4byte \arg .endm .macro setgraphicalstatchangevalues @@ -662,7 +669,7 @@ .byte 0x77 .endm - .macro faintifabilitynotdamp + .macro tryexplosion .byte 0x78 .endm @@ -942,7 +949,7 @@ .byte 0xb5 .endm - .macro happinesstodamagecalculation + .macro friendshiptodamagecalculation .byte 0xb6 .endm @@ -1025,7 +1032,7 @@ .byte 0xc8 .endm - .macro jumpifattackandspecialattackcannotfall ptr:req + .macro trymemento ptr:req .byte 0xc9 .4byte \ptr .endm @@ -1271,8 +1278,8 @@ various \battler, VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP .endm - .macro resetplayerfainted battler:req - various \battler, VARIOUS_RESET_PLAYER_FAINTED + .macro resetplayerfainted + various BS_ATTACKER, VARIOUS_RESET_PLAYER_FAINTED .endm .macro various8 battler:req @@ -1305,11 +1312,11 @@ .endm .macro chosenstatus1animation battler:req, status:req - chosenstatusanimation \battler 0x0 \status + chosenstatusanimation \battler, 0x0, \status .endm .macro chosenstatus2animation battler:req, status:req - chosenstatusanimation \battler 0x1 \status + chosenstatusanimation \battler, 0x1, \status .endm .macro sethword dst:req, value:req diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index cec621275..d469bb95d 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -1,3 +1,4 @@ +#include "constants/global.h" #include "constants/moves.h" #include "constants/battle.h" #include "constants/battle_move_effects.h" @@ -20,220 +21,220 @@ .align 2 gBattleScriptsForMoveEffects:: - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSleep - .4byte BattleScript_EffectPoisonHit - .4byte BattleScript_EffectAbsorb - .4byte BattleScript_EffectBurnHit - .4byte BattleScript_EffectFreezeHit - .4byte BattleScript_EffectParalyzeHit - .4byte BattleScript_EffectExplosion - .4byte BattleScript_EffectDreamEater - .4byte BattleScript_EffectMirrorMove - .4byte BattleScript_EffectAttackUp - .4byte BattleScript_EffectDefenseUp - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSpecialAttackUp - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectEvasionUp - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectAttackDown - .4byte BattleScript_EffectDefenseDown - .4byte BattleScript_EffectSpeedDown - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectAccuracyDown - .4byte BattleScript_EffectEvasionDown - .4byte BattleScript_EffectHaze - .4byte BattleScript_EffectBide - .4byte BattleScript_EffectRampage - .4byte BattleScript_EffectRoar - .4byte BattleScript_EffectMultiHit - .4byte BattleScript_EffectConversion - .4byte BattleScript_EffectFlinchHit - .4byte BattleScript_EffectRestoreHp - .4byte BattleScript_EffectToxic - .4byte BattleScript_EffectPayDay - .4byte BattleScript_EffectLightScreen - .4byte BattleScript_EffectTriAttack - .4byte BattleScript_EffectRest - .4byte BattleScript_EffectOHKO - .4byte BattleScript_EffectRazorWind - .4byte BattleScript_EffectSuperFang - .4byte BattleScript_EffectDragonRage - .4byte BattleScript_EffectTrap - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectDoubleHit - .4byte BattleScript_EffectRecoilIfMiss - .4byte BattleScript_EffectMist - .4byte BattleScript_EffectFocusEnergy - .4byte BattleScript_EffectRecoil - .4byte BattleScript_EffectConfuse - .4byte BattleScript_EffectAttackUp2 - .4byte BattleScript_EffectDefenseUp2 - .4byte BattleScript_EffectSpeedUp2 - .4byte BattleScript_EffectSpecialAttackUp2 - .4byte BattleScript_EffectSpecialDefenseUp2 - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectTransform - .4byte BattleScript_EffectAttackDown2 - .4byte BattleScript_EffectDefenseDown2 - .4byte BattleScript_EffectSpeedDown2 - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSpecialDefenseDown2 - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectReflect - .4byte BattleScript_EffectPoison - .4byte BattleScript_EffectParalyze - .4byte BattleScript_EffectAttackDownHit - .4byte BattleScript_EffectDefenseDownHit - .4byte BattleScript_EffectSpeedDownHit - .4byte BattleScript_EffectSpecialAttackDownHit - .4byte BattleScript_EffectSpecialDefenseDownHit - .4byte BattleScript_EffectAccuracyDownHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSkyAttack - .4byte BattleScript_EffectConfuseHit - .4byte BattleScript_EffectTwineedle - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSubstitute - .4byte BattleScript_EffectRecharge - .4byte BattleScript_EffectRage - .4byte BattleScript_EffectMimic - .4byte BattleScript_EffectMetronome - .4byte BattleScript_EffectLeechSeed - .4byte BattleScript_EffectSplash - .4byte BattleScript_EffectDisable - .4byte BattleScript_EffectLevelDamage - .4byte BattleScript_EffectPsywave - .4byte BattleScript_EffectCounter - .4byte BattleScript_EffectEncore - .4byte BattleScript_EffectPainSplit - .4byte BattleScript_EffectSnore - .4byte BattleScript_EffectConversion2 - .4byte BattleScript_EffectLockOn - .4byte BattleScript_EffectSketch - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectSleepTalk - .4byte BattleScript_EffectDestinyBond - .4byte BattleScript_EffectFlail - .4byte BattleScript_EffectSpite - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHealBell - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectTripleKick - .4byte BattleScript_EffectThief - .4byte BattleScript_EffectMeanLook - .4byte BattleScript_EffectNightmare - .4byte BattleScript_EffectMinimize - .4byte BattleScript_EffectCurse - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectProtect - .4byte BattleScript_EffectSpikes - .4byte BattleScript_EffectForesight - .4byte BattleScript_EffectPerishSong - .4byte BattleScript_EffectSandstorm - .4byte BattleScript_EffectProtect - .4byte BattleScript_EffectRollout - .4byte BattleScript_EffectSwagger - .4byte BattleScript_EffectFuryCutter - .4byte BattleScript_EffectAttract - .4byte BattleScript_EffectReturn - .4byte BattleScript_EffectPresent - .4byte BattleScript_EffectReturn - .4byte BattleScript_EffectSafeguard - .4byte BattleScript_EffectThawHit - .4byte BattleScript_EffectMagnitude - .4byte BattleScript_EffectBatonPass - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectRapidSpin - .4byte BattleScript_EffectSonicboom - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectMorningSun - .4byte BattleScript_EffectMorningSun - .4byte BattleScript_EffectMorningSun - .4byte BattleScript_EffectHiddenPower - .4byte BattleScript_EffectRainDance - .4byte BattleScript_EffectSunnyDay - .4byte BattleScript_EffectDefenseUpHit - .4byte BattleScript_EffectAttackUpHit - .4byte BattleScript_EffectAllStatsUpHit - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectBellyDrum - .4byte BattleScript_EffectPsychUp - .4byte BattleScript_EffectMirrorCoat - .4byte BattleScript_EffectSkullBash - .4byte BattleScript_EffectTwister - .4byte BattleScript_EffectEarthquake - .4byte BattleScript_EffectFutureSight - .4byte BattleScript_EffectGust - .4byte BattleScript_EffectFlinchMinimizeHit - .4byte BattleScript_EffectSolarBeam - .4byte BattleScript_EffectThunder - .4byte BattleScript_EffectTeleport - .4byte BattleScript_EffectBeatUp - .4byte BattleScript_EffectSemiInvulnerable - .4byte BattleScript_EffectDefenseCurl - .4byte BattleScript_EffectSoftboiled - .4byte BattleScript_EffectFakeOut - .4byte BattleScript_EffectUproar - .4byte BattleScript_EffectStockpile - .4byte BattleScript_EffectSpitUp - .4byte BattleScript_EffectSwallow - .4byte BattleScript_EffectHit - .4byte BattleScript_EffectHail - .4byte BattleScript_EffectTorment - .4byte BattleScript_EffectFlatter - .4byte BattleScript_EffectWillOWisp - .4byte BattleScript_EffectMemento - .4byte BattleScript_EffectFacade - .4byte BattleScript_EffectFocusPunch - .4byte BattleScript_EffectSmellingsalt - .4byte BattleScript_EffectFollowMe - .4byte BattleScript_EffectNaturePower - .4byte BattleScript_EffectCharge - .4byte BattleScript_EffectTaunt - .4byte BattleScript_EffectHelpingHand - .4byte BattleScript_EffectTrick - .4byte BattleScript_EffectRolePlay - .4byte BattleScript_EffectWish - .4byte BattleScript_EffectAssist - .4byte BattleScript_EffectIngrain - .4byte BattleScript_EffectSuperpower - .4byte BattleScript_EffectMagicCoat - .4byte BattleScript_EffectRecycle - .4byte BattleScript_EffectRevenge - .4byte BattleScript_EffectBrickBreak - .4byte BattleScript_EffectYawn - .4byte BattleScript_EffectKnockOff - .4byte BattleScript_EffectEndeavor - .4byte BattleScript_EffectEruption - .4byte BattleScript_EffectSkillSwap - .4byte BattleScript_EffectImprison - .4byte BattleScript_EffectRefresh - .4byte BattleScript_EffectGrudge - .4byte BattleScript_EffectSnatch - .4byte BattleScript_EffectLowKick - .4byte BattleScript_EffectSecretPower - .4byte BattleScript_EffectDoubleEdge - .4byte BattleScript_EffectTeeterDance - .4byte BattleScript_EffectBurnHit - .4byte BattleScript_EffectMudSport - .4byte BattleScript_EffectPoisonFang - .4byte BattleScript_EffectWeatherBall - .4byte BattleScript_EffectOverheat - .4byte BattleScript_EffectTickle - .4byte BattleScript_EffectCosmicPower - .4byte BattleScript_EffectSkyUppercut - .4byte BattleScript_EffectBulkUp - .4byte BattleScript_EffectPoisonHit - .4byte BattleScript_EffectMudSport - .4byte BattleScript_EffectCalmMind - .4byte BattleScript_EffectDragonDance - .4byte BattleScript_EffectCamouflage + .4byte BattleScript_EffectHit @ EFFECT_HIT + .4byte BattleScript_EffectSleep @ EFFECT_SLEEP + .4byte BattleScript_EffectPoisonHit @ EFFECT_POISON_HIT + .4byte BattleScript_EffectAbsorb @ EFFECT_ABSORB + .4byte BattleScript_EffectBurnHit @ EFFECT_BURN_HIT + .4byte BattleScript_EffectFreezeHit @ EFFECT_FREEZE_HIT + .4byte BattleScript_EffectParalyzeHit @ EFFECT_PARALYZE_HIT + .4byte BattleScript_EffectExplosion @ EFFECT_EXPLOSION + .4byte BattleScript_EffectDreamEater @ EFFECT_DREAM_EATER + .4byte BattleScript_EffectMirrorMove @ EFFECT_MIRROR_MOVE + .4byte BattleScript_EffectAttackUp @ EFFECT_ATTACK_UP + .4byte BattleScript_EffectDefenseUp @ EFFECT_DEFENSE_UP + .4byte BattleScript_EffectHit @ EFFECT_SPEED_UP + .4byte BattleScript_EffectSpecialAttackUp @ EFFECT_SPECIAL_ATTACK_UP + .4byte BattleScript_EffectHit @ EFFECT_SPECIAL_DEFENSE_UP + .4byte BattleScript_EffectHit @ EFFECT_ACCURACY_UP + .4byte BattleScript_EffectEvasionUp @ EFFECT_EVASION_UP + .4byte BattleScript_EffectHit @ EFFECT_ALWAYS_HIT + .4byte BattleScript_EffectAttackDown @ EFFECT_ATTACK_DOWN + .4byte BattleScript_EffectDefenseDown @ EFFECT_DEFENSE_DOWN + .4byte BattleScript_EffectSpeedDown @ EFFECT_SPEED_DOWN + .4byte BattleScript_EffectHit @ EFFECT_SPECIAL_ATTACK_DOWN + .4byte BattleScript_EffectHit @ EFFECT_SPECIAL_DEFENSE_DOWN + .4byte BattleScript_EffectAccuracyDown @ EFFECT_ACCURACY_DOWN + .4byte BattleScript_EffectEvasionDown @ EFFECT_EVASION_DOWN + .4byte BattleScript_EffectHaze @ EFFECT_HAZE + .4byte BattleScript_EffectBide @ EFFECT_BIDE + .4byte BattleScript_EffectRampage @ EFFECT_RAMPAGE + .4byte BattleScript_EffectRoar @ EFFECT_ROAR + .4byte BattleScript_EffectMultiHit @ EFFECT_MULTI_HIT + .4byte BattleScript_EffectConversion @ EFFECT_CONVERSION + .4byte BattleScript_EffectFlinchHit @ EFFECT_FLINCH_HIT + .4byte BattleScript_EffectRestoreHp @ EFFECT_RESTORE_HP + .4byte BattleScript_EffectToxic @ EFFECT_TOXIC + .4byte BattleScript_EffectPayDay @ EFFECT_PAY_DAY + .4byte BattleScript_EffectLightScreen @ EFFECT_LIGHT_SCREEN + .4byte BattleScript_EffectTriAttack @ EFFECT_TRI_ATTACK + .4byte BattleScript_EffectRest @ EFFECT_REST + .4byte BattleScript_EffectOHKO @ EFFECT_OHKO + .4byte BattleScript_EffectRazorWind @ EFFECT_RAZOR_WIND + .4byte BattleScript_EffectSuperFang @ EFFECT_SUPER_FANG + .4byte BattleScript_EffectDragonRage @ EFFECT_DRAGON_RAGE + .4byte BattleScript_EffectTrap @ EFFECT_TRAP + .4byte BattleScript_EffectHit @ EFFECT_HIGH_CRITICAL + .4byte BattleScript_EffectDoubleHit @ EFFECT_DOUBLE_HIT + .4byte BattleScript_EffectRecoilIfMiss @ EFFECT_RECOIL_IF_MISS + .4byte BattleScript_EffectMist @ EFFECT_MIST + .4byte BattleScript_EffectFocusEnergy @ EFFECT_FOCUS_ENERGY + .4byte BattleScript_EffectRecoil @ EFFECT_RECOIL + .4byte BattleScript_EffectConfuse @ EFFECT_CONFUSE + .4byte BattleScript_EffectAttackUp2 @ EFFECT_ATTACK_UP_2 + .4byte BattleScript_EffectDefenseUp2 @ EFFECT_DEFENSE_UP_2 + .4byte BattleScript_EffectSpeedUp2 @ EFFECT_SPEED_UP_2 + .4byte BattleScript_EffectSpecialAttackUp2 @ EFFECT_SPECIAL_ATTACK_UP_2 + .4byte BattleScript_EffectSpecialDefenseUp2 @ EFFECT_SPECIAL_DEFENSE_UP_2 + .4byte BattleScript_EffectHit @ EFFECT_ACCURACY_UP_2 + .4byte BattleScript_EffectHit @ EFFECT_EVASION_UP_2 + .4byte BattleScript_EffectTransform @ EFFECT_TRANSFORM + .4byte BattleScript_EffectAttackDown2 @ EFFECT_ATTACK_DOWN_2 + .4byte BattleScript_EffectDefenseDown2 @ EFFECT_DEFENSE_DOWN_2 + .4byte BattleScript_EffectSpeedDown2 @ EFFECT_SPEED_DOWN_2 + .4byte BattleScript_EffectHit @ EFFECT_SPECIAL_ATTACK_DOWN_2 + .4byte BattleScript_EffectSpecialDefenseDown2 @ EFFECT_SPECIAL_DEFENSE_DOWN_2 + .4byte BattleScript_EffectHit @ EFFECT_ACCURACY_DOWN_2 + .4byte BattleScript_EffectHit @ EFFECT_EVASION_DOWN_2 + .4byte BattleScript_EffectReflect @ EFFECT_REFLECT + .4byte BattleScript_EffectPoison @ EFFECT_POISON + .4byte BattleScript_EffectParalyze @ EFFECT_PARALYZE + .4byte BattleScript_EffectAttackDownHit @ EFFECT_ATTACK_DOWN_HIT + .4byte BattleScript_EffectDefenseDownHit @ EFFECT_DEFENSE_DOWN_HIT + .4byte BattleScript_EffectSpeedDownHit @ EFFECT_SPEED_DOWN_HIT + .4byte BattleScript_EffectSpecialAttackDownHit @ EFFECT_SPECIAL_ATTACK_DOWN_HIT + .4byte BattleScript_EffectSpecialDefenseDownHit @ EFFECT_SPECIAL_DEFENSE_DOWN_HIT + .4byte BattleScript_EffectAccuracyDownHit @ EFFECT_ACCURACY_DOWN_HIT + .4byte BattleScript_EffectHit @ EFFECT_EVASION_DOWN_HIT + .4byte BattleScript_EffectSkyAttack @ EFFECT_SKY_ATTACK + .4byte BattleScript_EffectConfuseHit @ EFFECT_CONFUSE_HIT + .4byte BattleScript_EffectTwineedle @ EFFECT_TWINEEDLE + .4byte BattleScript_EffectHit @ EFFECT_VITAL_THROW + .4byte BattleScript_EffectSubstitute @ EFFECT_SUBSTITUTE + .4byte BattleScript_EffectRecharge @ EFFECT_RECHARGE + .4byte BattleScript_EffectRage @ EFFECT_RAGE + .4byte BattleScript_EffectMimic @ EFFECT_MIMIC + .4byte BattleScript_EffectMetronome @ EFFECT_METRONOME + .4byte BattleScript_EffectLeechSeed @ EFFECT_LEECH_SEED + .4byte BattleScript_EffectSplash @ EFFECT_SPLASH + .4byte BattleScript_EffectDisable @ EFFECT_DISABLE + .4byte BattleScript_EffectLevelDamage @ EFFECT_LEVEL_DAMAGE + .4byte BattleScript_EffectPsywave @ EFFECT_PSYWAVE + .4byte BattleScript_EffectCounter @ EFFECT_COUNTER + .4byte BattleScript_EffectEncore @ EFFECT_ENCORE + .4byte BattleScript_EffectPainSplit @ EFFECT_PAIN_SPLIT + .4byte BattleScript_EffectSnore @ EFFECT_SNORE + .4byte BattleScript_EffectConversion2 @ EFFECT_CONVERSION_2 + .4byte BattleScript_EffectLockOn @ EFFECT_LOCK_ON + .4byte BattleScript_EffectSketch @ EFFECT_SKETCH + .4byte BattleScript_EffectHit @ EFFECT_UNUSED_60 + .4byte BattleScript_EffectSleepTalk @ EFFECT_SLEEP_TALK + .4byte BattleScript_EffectDestinyBond @ EFFECT_DESTINY_BOND + .4byte BattleScript_EffectFlail @ EFFECT_FLAIL + .4byte BattleScript_EffectSpite @ EFFECT_SPITE + .4byte BattleScript_EffectHit @ EFFECT_FALSE_SWIPE + .4byte BattleScript_EffectHealBell @ EFFECT_HEAL_BELL + .4byte BattleScript_EffectHit @ EFFECT_QUICK_ATTACK + .4byte BattleScript_EffectTripleKick @ EFFECT_TRIPLE_KICK + .4byte BattleScript_EffectThief @ EFFECT_THIEF + .4byte BattleScript_EffectMeanLook @ EFFECT_MEAN_LOOK + .4byte BattleScript_EffectNightmare @ EFFECT_NIGHTMARE + .4byte BattleScript_EffectMinimize @ EFFECT_MINIMIZE + .4byte BattleScript_EffectCurse @ EFFECT_CURSE + .4byte BattleScript_EffectHit @ EFFECT_UNUSED_6E + .4byte BattleScript_EffectProtect @ EFFECT_PROTECT + .4byte BattleScript_EffectSpikes @ EFFECT_SPIKES + .4byte BattleScript_EffectForesight @ EFFECT_FORESIGHT + .4byte BattleScript_EffectPerishSong @ EFFECT_PERISH_SONG + .4byte BattleScript_EffectSandstorm @ EFFECT_SANDSTORM + .4byte BattleScript_EffectEndure @ EFFECT_ENDURE + .4byte BattleScript_EffectRollout @ EFFECT_ROLLOUT + .4byte BattleScript_EffectSwagger @ EFFECT_SWAGGER + .4byte BattleScript_EffectFuryCutter @ EFFECT_FURY_CUTTER + .4byte BattleScript_EffectAttract @ EFFECT_ATTRACT + .4byte BattleScript_EffectReturn @ EFFECT_RETURN + .4byte BattleScript_EffectPresent @ EFFECT_PRESENT + .4byte BattleScript_EffectFrustration @ EFFECT_FRUSTRATION + .4byte BattleScript_EffectSafeguard @ EFFECT_SAFEGUARD + .4byte BattleScript_EffectThawHit @ EFFECT_THAW_HIT + .4byte BattleScript_EffectMagnitude @ EFFECT_MAGNITUDE + .4byte BattleScript_EffectBatonPass @ EFFECT_BATON_PASS + .4byte BattleScript_EffectHit @ EFFECT_PURSUIT + .4byte BattleScript_EffectRapidSpin @ EFFECT_RAPID_SPIN + .4byte BattleScript_EffectSonicboom @ EFFECT_SONICBOOM + .4byte BattleScript_EffectHit @ EFFECT_UNUSED_83 + .4byte BattleScript_EffectMorningSun @ EFFECT_MORNING_SUN + .4byte BattleScript_EffectSynthesis @ EFFECT_SYNTHESIS + .4byte BattleScript_EffectMoonlight @ EFFECT_MOONLIGHT + .4byte BattleScript_EffectHiddenPower @ EFFECT_HIDDEN_POWER + .4byte BattleScript_EffectRainDance @ EFFECT_RAIN_DANCE + .4byte BattleScript_EffectSunnyDay @ EFFECT_SUNNY_DAY + .4byte BattleScript_EffectDefenseUpHit @ EFFECT_DEFENSE_UP_HIT + .4byte BattleScript_EffectAttackUpHit @ EFFECT_ATTACK_UP_HIT + .4byte BattleScript_EffectAllStatsUpHit @ EFFECT_ALL_STATS_UP_HIT + .4byte BattleScript_EffectHit @ EFFECT_UNUSED_8D + .4byte BattleScript_EffectBellyDrum @ EFFECT_BELLY_DRUM + .4byte BattleScript_EffectPsychUp @ EFFECT_PSYCH_UP + .4byte BattleScript_EffectMirrorCoat @ EFFECT_MIRROR_COAT + .4byte BattleScript_EffectSkullBash @ EFFECT_SKULL_BASH + .4byte BattleScript_EffectTwister @ EFFECT_TWISTER + .4byte BattleScript_EffectEarthquake @ EFFECT_EARTHQUAKE + .4byte BattleScript_EffectFutureSight @ EFFECT_FUTURE_SIGHT + .4byte BattleScript_EffectGust @ EFFECT_GUST + .4byte BattleScript_EffectStomp @ EFFECT_FLINCH_MINIMIZE_HIT + .4byte BattleScript_EffectSolarBeam @ EFFECT_SOLAR_BEAM + .4byte BattleScript_EffectThunder @ EFFECT_THUNDER + .4byte BattleScript_EffectTeleport @ EFFECT_TELEPORT + .4byte BattleScript_EffectBeatUp @ EFFECT_BEAT_UP + .4byte BattleScript_EffectSemiInvulnerable @ EFFECT_SEMI_INVULNERABLE + .4byte BattleScript_EffectDefenseCurl @ EFFECT_DEFENSE_CURL + .4byte BattleScript_EffectSoftboiled @ EFFECT_SOFTBOILED + .4byte BattleScript_EffectFakeOut @ EFFECT_FAKE_OUT + .4byte BattleScript_EffectUproar @ EFFECT_UPROAR + .4byte BattleScript_EffectStockpile @ EFFECT_STOCKPILE + .4byte BattleScript_EffectSpitUp @ EFFECT_SPIT_UP + .4byte BattleScript_EffectSwallow @ EFFECT_SWALLOW + .4byte BattleScript_EffectHit @ EFFECT_UNUSED_A3 + .4byte BattleScript_EffectHail @ EFFECT_HAIL + .4byte BattleScript_EffectTorment @ EFFECT_TORMENT + .4byte BattleScript_EffectFlatter @ EFFECT_FLATTER + .4byte BattleScript_EffectWillOWisp @ EFFECT_WILL_O_WISP + .4byte BattleScript_EffectMemento @ EFFECT_MEMENTO + .4byte BattleScript_EffectFacade @ EFFECT_FACADE + .4byte BattleScript_EffectFocusPunch @ EFFECT_FOCUS_PUNCH + .4byte BattleScript_EffectSmellingsalt @ EFFECT_SMELLINGSALT + .4byte BattleScript_EffectFollowMe @ EFFECT_FOLLOW_ME + .4byte BattleScript_EffectNaturePower @ EFFECT_NATURE_POWER + .4byte BattleScript_EffectCharge @ EFFECT_CHARGE + .4byte BattleScript_EffectTaunt @ EFFECT_TAUNT + .4byte BattleScript_EffectHelpingHand @ EFFECT_HELPING_HAND + .4byte BattleScript_EffectTrick @ EFFECT_TRICK + .4byte BattleScript_EffectRolePlay @ EFFECT_ROLE_PLAY + .4byte BattleScript_EffectWish @ EFFECT_WISH + .4byte BattleScript_EffectAssist @ EFFECT_ASSIST + .4byte BattleScript_EffectIngrain @ EFFECT_INGRAIN + .4byte BattleScript_EffectSuperpower @ EFFECT_SUPERPOWER + .4byte BattleScript_EffectMagicCoat @ EFFECT_MAGIC_COAT + .4byte BattleScript_EffectRecycle @ EFFECT_RECYCLE + .4byte BattleScript_EffectRevenge @ EFFECT_REVENGE + .4byte BattleScript_EffectBrickBreak @ EFFECT_BRICK_BREAK + .4byte BattleScript_EffectYawn @ EFFECT_YAWN + .4byte BattleScript_EffectKnockOff @ EFFECT_KNOCK_OFF + .4byte BattleScript_EffectEndeavor @ EFFECT_ENDEAVOR + .4byte BattleScript_EffectEruption @ EFFECT_ERUPTION + .4byte BattleScript_EffectSkillSwap @ EFFECT_SKILL_SWAP + .4byte BattleScript_EffectImprison @ EFFECT_IMPRISON + .4byte BattleScript_EffectRefresh @ EFFECT_REFRESH + .4byte BattleScript_EffectGrudge @ EFFECT_GRUDGE + .4byte BattleScript_EffectSnatch @ EFFECT_SNATCH + .4byte BattleScript_EffectLowKick @ EFFECT_LOW_KICK + .4byte BattleScript_EffectSecretPower @ EFFECT_SECRET_POWER + .4byte BattleScript_EffectDoubleEdge @ EFFECT_DOUBLE_EDGE + .4byte BattleScript_EffectTeeterDance @ EFFECT_TEETER_DANCE + .4byte BattleScript_EffectBurnHit @ EFFECT_BLAZE_KICK + .4byte BattleScript_EffectMudSport @ EFFECT_MUD_SPORT + .4byte BattleScript_EffectPoisonFang @ EFFECT_POISON_FANG + .4byte BattleScript_EffectWeatherBall @ EFFECT_WEATHER_BALL + .4byte BattleScript_EffectOverheat @ EFFECT_OVERHEAT + .4byte BattleScript_EffectTickle @ EFFECT_TICKLE + .4byte BattleScript_EffectCosmicPower @ EFFECT_COSMIC_POWER + .4byte BattleScript_EffectSkyUppercut @ EFFECT_SKY_UPPERCUT + .4byte BattleScript_EffectBulkUp @ EFFECT_BULK_UP + .4byte BattleScript_EffectPoisonHit @ EFFECT_POISON_TAIL + .4byte BattleScript_EffectWaterSport @ EFFECT_WATER_SPORT + .4byte BattleScript_EffectCalmMind @ EFFECT_CALM_MIND + .4byte BattleScript_EffectDragonDance @ EFFECT_DRAGON_DANCE + .4byte BattleScript_EffectCamouflage @ EFFECT_CAMOUFLAGE BattleScript_EffectHit:: jumpifnotmove MOVE_SURF, BattleScript_HitFromAtkCanceler @@ -261,11 +262,11 @@ BattleScript_HitFromAtkAnimation:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG seteffectwithchance - tryfaintmon BS_TARGET, 0, NULL + tryfaintmon BS_TARGET BattleScript_MoveEnd:: moveendall end @@ -276,11 +277,11 @@ BattleScript_PrintMoveMissed:: attackstring ppreduce BattleScript_MoveMissedPause:: - pause 0x20 + pause B_WAIT_TIME_SHORT BattleScript_MoveMissed:: effectivenesssound resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSleep:: @@ -300,21 +301,21 @@ BattleScript_EffectSleep:: goto BattleScript_MoveEnd BattleScript_AlreadyAsleep:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYASLEEP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_WasntAffected:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNWASNTAFFECTED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_CantMakeAsleep:: - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gUproarAwakeStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoisonHit:: @@ -338,27 +339,26 @@ BattleScript_EffectAbsorb:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG negativedamage orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_AbsorbLiquidOoze - setbyte cMULTISTRING_CHOOSER, 0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB goto BattleScript_AbsorbUpdateHp - BattleScript_AbsorbLiquidOoze:: - manipulatedamage 0 - setbyte cMULTISTRING_CHOOSER, 1 + manipulatedamage DMG_CHANGE_SIGN + setbyte cMULTISTRING_CHOOSER, B_MSG_ABSORB_OOZE BattleScript_AbsorbUpdateHp:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER jumpifmovehadnoeffect BattleScript_AbsorbTryFainting - printfromtable gLeechSeedDrainStringIds - waitmessage 0x40 + printfromtable gAbsorbDrainStringIds + waitmessage B_WAIT_TIME_LONG BattleScript_AbsorbTryFainting:: - tryfaintmon BS_ATTACKER, 0, NULL - tryfaintmon BS_TARGET, 0, NULL + tryfaintmon BS_ATTACKER + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectBurnHit:: @@ -377,17 +377,17 @@ BattleScript_EffectExplosion:: attackcanceler attackstring ppreduce - faintifabilitynotdamp +@ Below jumps to BattleScript_DampStopsExplosion if it fails (only way it can) + tryexplosion setatkhptozero waitstate jumpifbyte CMP_NO_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_MISSED, BattleScript_ExplosionDoAnimStartLoop call BattleScript_PreserveMissedBitDoMoveAnim goto BattleScript_ExplosionLoop - -BattleScript_ExplosionDoAnimStartLoop:: +BattleScript_ExplosionDoAnimStartLoop: attackanimation waitanimation -BattleScript_ExplosionLoop:: +BattleScript_ExplosionLoop: movevaluescleanup critcalc damagecalc @@ -400,25 +400,24 @@ BattleScript_ExplosionLoop:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 - tryfaintmon BS_TARGET, 0, NULL - moveendto 16 + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_TARGET + moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER end - -BattleScript_ExplosionMissed:: +BattleScript_ExplosionMissed: effectivenesssound resultmessage - waitmessage 0x40 - moveendto 16 + waitmessage B_WAIT_TIME_LONG + moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_ExplosionLoop - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER end -BattleScript_PreserveMissedBitDoMoveAnim:: +BattleScript_PreserveMissedBitDoMoveAnim: bicbyte gMoveResultFlags, MOVE_RESULT_MISSED attackanimation waitanimation @@ -429,13 +428,12 @@ BattleScript_EffectDreamEater:: attackcanceler jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_DreamEaterNoEffect jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_DreamEaterWorked -BattleScript_DreamEaterNoEffect:: +BattleScript_DreamEaterNoEffect: attackstring ppreduce - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_WasntAffected - -BattleScript_DreamEaterWorked:: +BattleScript_DreamEaterWorked: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring ppreduce @@ -451,29 +449,29 @@ BattleScript_DreamEaterWorked:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG negativedamage orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER jumpifmovehadnoeffect BattleScript_DreamEaterTryFaintEnd printstring STRINGID_PKMNDREAMEATEN - waitmessage 0x40 -BattleScript_DreamEaterTryFaintEnd:: - tryfaintmon BS_TARGET, 0, NULL + waitmessage B_WAIT_TIME_LONG +BattleScript_DreamEaterTryFaintEnd: + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectMirrorMove:: attackcanceler attackstring - pause 0x40 + pause B_WAIT_TIME_LONG trymirrormove ppreduce orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_MIRRORMOVEFAILED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackUp:: @@ -495,11 +493,10 @@ BattleScript_EffectStatUp:: BattleScript_EffectStatUpAfterAtkCanceler:: attackstring ppreduce - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_StatUpEnd - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_StatUpAttackAnim - pause 0x20 + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_StatUpEnd + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim + pause B_WAIT_TIME_SHORT goto BattleScript_StatUpPrintString - BattleScript_StatUpAttackAnim:: attackanimation waitanimation @@ -508,14 +505,14 @@ BattleScript_StatUpDoAnim:: playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 BattleScript_StatUpPrintString:: printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_StatUpEnd:: goto BattleScript_MoveEnd BattleScript_StatUp:: playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectAttackDown:: @@ -543,11 +540,10 @@ BattleScript_EffectStatDown:: attackstring ppreduce statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_StatDownEnd - jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, 2, BattleScript_StatDownDoAnim - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 3, BattleScript_StatDownEnd - pause 0x20 + jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd + pause B_WAIT_TIME_SHORT goto BattleScript_StatDownPrintString - BattleScript_StatDownDoAnim:: attackanimation waitanimation @@ -555,14 +551,14 @@ BattleScript_StatDownDoAnim:: playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 BattleScript_StatDownPrintString:: printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_StatDownEnd:: goto BattleScript_MoveEnd BattleScript_StatDown:: playanimation BS_EFFECT_BATTLER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectHaze:: @@ -573,7 +569,7 @@ BattleScript_EffectHaze:: waitanimation normalisebuffs printstring STRINGID_STATCHANGESGONE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectBide:: @@ -592,7 +588,7 @@ BattleScript_EffectRampage:: attackstring jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_EffectRampage2 ppreduce -BattleScript_EffectRampage2:: +BattleScript_EffectRampage2: confuseifrepeatingattackends goto BattleScript_HitFromCritCalc @@ -635,29 +631,28 @@ BattleScript_DoMultiHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 - addbyte gBattleScripting + 12, 1 - moveendto 16 + addbyte sMULTIHIT_STRING + 4, 1 + moveendto MOVEEND_NEXT_TARGET jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_MultiHitPrintStrings decrementmultihit BattleScript_MultiHitLoop goto BattleScript_MultiHitPrintStrings - BattleScript_MultiHitNoMoreHits:: - pause 0x20 + pause B_WAIT_TIME_SHORT BattleScript_MultiHitPrintStrings:: resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG jumpifmovehadnoeffect BattleScript_MultiHitEnd copyarray gBattleTextBuff1, sMULTIHIT_STRING, 6 printstring STRINGID_HITXTIMES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_MultiHitEnd:: seteffectwithchance - tryfaintmon BS_TARGET, 0, NULL - moveendcase 2 - moveendfrom 4 + tryfaintmon BS_TARGET + moveendcase MOVEEND_SYNCHRONIZE_TARGET + moveendfrom MOVEEND_IMMUNITY_ABILITIES end BattleScript_EffectConversion:: @@ -668,7 +663,7 @@ BattleScript_EffectConversion:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlinchHit:: @@ -686,7 +681,7 @@ BattleScript_EffectRestoreHp:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectToxic:: @@ -707,18 +702,18 @@ BattleScript_EffectToxic:: setmoveeffect MOVE_EFFECT_TOXIC seteffectprimary resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyPoisoned:: - pause 0x40 + pause B_WAIT_TIME_LONG printstring STRINGID_PKMNALREADYPOISONED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_ImmunityProtected:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_PSNPrevention goto BattleScript_MoveEnd @@ -744,23 +739,23 @@ BattleScript_EffectRest:: jumpifstatus BS_ATTACKER, STATUS1_SLEEP, BattleScript_RestIsAlreadyAsleep jumpifcantmakeasleep BattleScript_RestCantSleep trysetrest BattleScript_AlreadyAtFullHp - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gRestUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER waitstate goto BattleScript_PresentHealTarget BattleScript_RestCantSleep:: - pause 0x40 + pause B_WAIT_TIME_LONG printfromtable gUproarAwakeStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_RestIsAlreadyAsleep:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYASLEEP2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectOHKO:: @@ -773,17 +768,16 @@ BattleScript_EffectOHKO:: tryKO BattleScript_KOFail trysetdestinybondtohappen goto BattleScript_HitFromAtkAnimation - BattleScript_KOFail:: - pause 0x40 + pause B_WAIT_TIME_LONG printfromtable gKOFailedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRazorWind:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 0 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_RAZOR_WIND call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd @@ -808,7 +802,7 @@ BattleScriptFirstChargingTurn:: seteffectprimary copybyte cMULTISTRING_CHOOSER, sTWOTURN_STRINGID printfromtable gFirstTurnOfTwoStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectSuperFang:: @@ -855,25 +849,24 @@ BattleScript_EffectRecoilIfMiss:: attackcanceler accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE goto BattleScript_HitFromAtkString - BattleScript_MoveMissedDoDamage:: attackstring ppreduce - pause 0x40 + pause B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd printstring STRINGID_PKMNCRASHED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG damagecalc typecalc adjustnormaldamage - manipulatedamage 1 + manipulatedamage DMG_RECOIL_FROM_MISS bicbyte gMoveResultFlags, MOVE_RESULT_MISSED orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER orbyte gMoveResultFlags, MOVE_RESULT_MISSED goto BattleScript_MoveEnd @@ -885,7 +878,7 @@ BattleScript_EffectMist:: attackanimation waitanimation printfromtable gMistUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFocusEnergy:: @@ -897,7 +890,7 @@ BattleScript_EffectFocusEnergy:: attackanimation waitanimation printfromtable gFocusEnergyUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecoil:: @@ -920,13 +913,13 @@ BattleScript_EffectConfuse:: setmoveeffect MOVE_EFFECT_CONFUSION seteffectprimary resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyConfused:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYCONFUSED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackUp2:: @@ -957,7 +950,7 @@ BattleScript_EffectTransform:: attackanimation waitanimation printfromtable gTransformUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectAttackDown2:: @@ -985,7 +978,7 @@ BattleScript_PrintReflectLightScreenSafeguardString:: attackanimation waitanimation printfromtable gReflectLightScreenSafeguardStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoison:: @@ -1006,7 +999,7 @@ BattleScript_EffectPoison:: setmoveeffect MOVE_EFFECT_POISON seteffectprimary resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectParalyze:: @@ -1026,18 +1019,18 @@ BattleScript_EffectParalyze:: setmoveeffect MOVE_EFFECT_PARALYSIS seteffectprimary resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyParalyzed:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNISALREADYPARALYZED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_LimberProtected:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_PRLZPrevention goto BattleScript_MoveEnd @@ -1068,7 +1061,7 @@ BattleScript_EffectAccuracyDownHit:: BattleScript_EffectSkyAttack:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 3 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKY_ATTACK call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd @@ -1093,24 +1086,22 @@ BattleScript_EffectSubstitute:: waitstate jumpifstatus2 BS_ATTACKER, STATUS2_SUBSTITUTE, BattleScript_AlreadyHasSubstitute setsubstitute - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 1, BattleScript_SubstituteAnim - pause 0x20 + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_SUBSTITUTE_FAILED, BattleScript_SubstituteAnim + pause B_WAIT_TIME_SHORT goto BattleScript_SubstituteString - BattleScript_SubstituteAnim:: attackanimation waitanimation healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER BattleScript_SubstituteString:: - printfromtable gSubsituteUsedStringIds - waitmessage 0x40 + printfromtable gSubstituteUsedStringIds + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd - BattleScript_AlreadyHasSubstitute:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHASSUBSTITUTE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecharge:: @@ -1121,7 +1112,7 @@ BattleScript_EffectRecharge:: BattleScript_MoveUsedMustRecharge:: printstring STRINGID_PKMNMUSTRECHARGE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRage:: @@ -1131,7 +1122,6 @@ BattleScript_EffectRage:: seteffectprimary setmoveeffect 0 goto BattleScript_HitFromAtkString - BattleScript_RageMiss:: setmoveeffect MOVE_EFFECT_RAGE clearstatusfromeffect BS_ATTACKER @@ -1147,22 +1137,23 @@ BattleScript_EffectMimic:: attackanimation waitanimation printstring STRINGID_PKMNLEARNEDMOVE2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMetronome:: attackcanceler attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT attackanimation waitanimation setbyte sB_ANIM_TURN, 0 setbyte sB_ANIM_TARGETS_HIT, 0 metronome + BattleScript_EffectLeechSeed:: attackcanceler attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT ppreduce jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailed accuracycheck BattleScript_DoLeechSeed, ACC_CURR_MOVE @@ -1171,7 +1162,7 @@ BattleScript_DoLeechSeed:: attackanimation waitanimation printfromtable gLeechSeedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSplash:: @@ -1182,7 +1173,7 @@ BattleScript_EffectSplash:: waitanimation incrementgamestat GAME_STAT_USED_SPLASH printstring STRINGID_BUTNOTHINGHAPPENED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectDisable:: @@ -1194,7 +1185,7 @@ BattleScript_EffectDisable:: attackanimation waitanimation printstring STRINGID_PKMNMOVEWASDISABLED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLevelDamage:: @@ -1238,7 +1229,7 @@ BattleScript_EffectEncore:: attackanimation waitanimation printstring STRINGID_PKMNGOTENCORE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPainSplit:: @@ -1256,7 +1247,7 @@ BattleScript_EffectPainSplit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_SHAREDPAIN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSnore:: @@ -1265,11 +1256,10 @@ BattleScript_EffectSnore:: attackstring ppreduce goto BattleScript_ButItFailed - BattleScript_SnoreIsAsleep:: jumpifhalfword CMP_EQUAL, gChosenMove, MOVE_SLEEP_TALK, BattleScript_DoSnore printstring STRINGID_PKMNFASTASLEEP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER BattleScript_DoSnore:: attackstring @@ -1286,7 +1276,7 @@ BattleScript_EffectConversion2:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLockOn:: @@ -1299,7 +1289,7 @@ BattleScript_EffectLockOn:: attackanimation waitanimation printstring STRINGID_PKMNTOOKAIM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSketch:: @@ -1311,7 +1301,7 @@ BattleScript_EffectSketch:: attackanimation waitanimation printstring STRINGID_PKMNSKETCHEDMOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSleepTalk:: @@ -1320,24 +1310,23 @@ BattleScript_EffectSleepTalk:: attackstring ppreduce goto BattleScript_ButItFailed - BattleScript_SleepTalkIsAsleep:: printstring STRINGID_PKMNFASTASLEEP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER attackstring ppreduce orword gHitMarker, HITMARKER_NO_PPDEDUCT trychoosesleeptalkmove BattleScript_SleepTalkUsingMove - pause 0x40 + pause B_WAIT_TIME_LONG goto BattleScript_ButItFailed - BattleScript_SleepTalkUsingMove:: attackanimation waitanimation setbyte sB_ANIM_TURN, 0 setbyte sB_ANIM_TARGETS_HIT, 0 - jumptocalledmove 1 + jumptocalledmove TRUE + BattleScript_EffectDestinyBond:: attackcanceler attackstring @@ -1346,7 +1335,7 @@ BattleScript_EffectDestinyBond:: attackanimation waitanimation printstring STRINGID_PKMNTRYINGTOTAKEFOE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlail:: @@ -1362,7 +1351,7 @@ BattleScript_EffectSpite:: attackanimation waitanimation printstring STRINGID_PKMNREDUCEDPP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHealBell:: @@ -1374,15 +1363,15 @@ BattleScript_EffectHealBell:: attackanimation waitanimation printfromtable gPartyStatusHealStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG jumpifnotmove MOVE_HEAL_BELL, BattleScript_PartyHealEnd - jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 1, BattleScript_CheckHealBellMon2Unaffected + jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, B_MSG_BELL_SOUNDPROOF_ATTACKER, BattleScript_CheckHealBellMon2Unaffected printstring STRINGID_PKMNSXBLOCKSY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CheckHealBellMon2Unaffected:: - jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, 2, BattleScript_PartyHealEnd + jumpifbyte CMP_NO_COMMON_BITS, cMULTISTRING_CHOOSER, B_MSG_BELL_SOUNDPROOF_PARTNER, BattleScript_PartyHealEnd printstring STRINGID_PKMNSXBLOCKSY2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_PartyHealEnd:: updatestatusicon BS_ATTACKER_WITH_PARTNER waitstate @@ -1392,8 +1381,7 @@ BattleScript_EffectTripleKick:: attackcanceler attackstring ppreduce - setbyte sTRIPLE_KICK_POWER, 0 - setbyte gBattleScripting + 19, 0 + sethword sTRIPLE_KICK_POWER, 0 initmultihitstring setmultihit 3 BattleScript_TripleKickLoop:: @@ -1405,7 +1393,7 @@ BattleScript_DoTripleKickAttack:: accuracycheck BattleScript_TripleKickNoMoreHits, ACC_CURR_MOVE movevaluescleanup addbyte sTRIPLE_KICK_POWER, 10 - addbyte gBattleScripting + 12, 1 + addbyte sMULTIHIT_STRING + 4, 1 copyhword gDynamicBasePower, sTRIPLE_KICK_POWER critcalc damagecalc @@ -1420,30 +1408,29 @@ BattleScript_DoTripleKickAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 - moveendto 16 + moveendto MOVEEND_NEXT_TARGET jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_FOE_ENDURED, BattleScript_TripleKickPrintStrings decrementmultihit BattleScript_TripleKickLoop goto BattleScript_TripleKickPrintStrings - BattleScript_TripleKickNoMoreHits:: - pause 0x20 - jumpifbyte CMP_EQUAL, gBattleScripting + 12, 0, BattleScript_TripleKickPrintStrings + pause B_WAIT_TIME_SHORT + jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0, BattleScript_TripleKickPrintStrings bicbyte gMoveResultFlags, MOVE_RESULT_MISSED BattleScript_TripleKickPrintStrings:: resultmessage - waitmessage 0x40 - jumpifbyte CMP_EQUAL, gBattleScripting + 12, 0, BattleScript_TripleKickEnd + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, sMULTIHIT_STRING + 4, 0, BattleScript_TripleKickEnd jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_TripleKickEnd copyarray gBattleTextBuff1, sMULTIHIT_STRING, 6 printstring STRINGID_HITXTIMES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_TripleKickEnd:: seteffectwithchance - tryfaintmon BS_TARGET, 0, NULL - moveendfrom 14 + tryfaintmon BS_TARGET + moveendfrom MOVEEND_UPDATE_LAST_MOVES end BattleScript_EffectThief:: @@ -1462,7 +1449,7 @@ BattleScript_EffectMeanLook:: setmoveeffect MOVE_EFFECT_PREVENT_ESCAPE seteffectprimary printstring STRINGID_TARGETCANTESCAPENOW - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectNightmare:: @@ -1473,14 +1460,13 @@ BattleScript_EffectNightmare:: jumpifstatus2 BS_TARGET, STATUS2_NIGHTMARE, BattleScript_ButItFailed jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_NightmareWorked goto BattleScript_ButItFailed - BattleScript_NightmareWorked:: attackanimation waitanimation setmoveeffect MOVE_EFFECT_NIGHTMARE seteffectprimary printstring STRINGID_PKMNFELLINTONIGHTMARE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMinimize:: @@ -1494,31 +1480,30 @@ BattleScript_EffectCurse:: attackcanceler attackstring ppreduce - jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, 0, BattleScript_CurseTrySpeed - jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, 12, BattleScript_CurseTrySpeed - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 12, BattleScript_ButItFailed + jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_SPEED, MIN_STAT_STAGE, BattleScript_CurseTrySpeed + jumpifstat BS_ATTACKER, CMP_NOT_EQUAL, STAT_ATK, MAX_STAT_STAGE, BattleScript_CurseTrySpeed + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, MAX_STAT_STAGE, BattleScript_ButItFailed BattleScript_CurseTrySpeed:: copybyte gBattlerTarget, gBattlerAttacker setbyte sB_ANIM_TURN, 1 attackanimation waitanimation setstatchanger STAT_SPEED, 1, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CurseTryAttack + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryAttack printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CurseTryAttack:: setstatchanger STAT_ATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CurseTryDefence + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryDefense printfromtable gStatUpStringIds - waitmessage 0x40 -BattleScript_CurseTryDefence:: + waitmessage B_WAIT_TIME_LONG +BattleScript_CurseTryDefense:: setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CurseEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseEnd printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CurseEnd:: goto BattleScript_MoveEnd - BattleScript_GhostCurse:: jumpifbytenotequal gBattlerAttacker, gBattlerTarget, BattleScript_DoGhostCurse getmovetarget BS_ATTACKER @@ -1536,11 +1521,12 @@ BattleScript_DoGhostCurse:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNLAIDCURSE - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectProtect:: +BattleScript_EffectEndure:: attackcanceler attackstring ppreduce @@ -1548,7 +1534,7 @@ BattleScript_EffectProtect:: attackanimation waitanimation printfromtable gProtectLikeUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSpikes:: @@ -1559,7 +1545,7 @@ BattleScript_EffectSpikes:: attackanimation waitanimation printstring STRINGID_SPIKESSCATTERED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectForesight:: @@ -1571,7 +1557,7 @@ BattleScript_EffectForesight:: attackanimation waitanimation printstring STRINGID_PKMNIDENTIFIED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPerishSong:: @@ -1582,7 +1568,7 @@ BattleScript_EffectPerishSong:: attackanimation waitanimation printstring STRINGID_FAINTINTHREE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte sBATTLER, 0 BattleScript_PerishSongLoop:: jumpifability BS_SCRIPTING, ABILITY_SOUNDPROOF, BattleScript_PerishSongNotAffected @@ -1593,7 +1579,7 @@ BattleScript_PerishSongLoopIncrement:: BattleScript_PerishSongNotAffected:: printstring STRINGID_PKMNSXBLOCKSY2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_PerishSongLoopIncrement BattleScript_EffectSandstorm:: @@ -1621,16 +1607,16 @@ BattleScript_EffectSwagger:: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring ppreduce - jumpifconfusedandstatmaxed 1, BattleScript_ButItFailed + jumpifconfusedandstatmaxed STAT_ATK, BattleScript_ButItFailed attackanimation waitanimation setstatchanger STAT_ATK, 2, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_SwaggerTryConfuse - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_SwaggerTryConfuse + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SwaggerTryConfuse setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_SwaggerTryConfuse:: jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected @@ -1661,13 +1647,14 @@ BattleScript_EffectAttract:: attackanimation waitanimation printstring STRINGID_PKMNFELLINLOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectReturn:: +BattleScript_EffectFrustration:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE - happinesstodamagecalculation + friendshiptodamagecalculation goto BattleScript_HitFromAtkString BattleScript_EffectPresent:: @@ -1677,6 +1664,7 @@ BattleScript_EffectPresent:: ppreduce typecalc presentdamagecalculation + BattleScript_EffectSafeguard:: attackcanceler attackstring @@ -1694,16 +1682,16 @@ BattleScript_EffectMagnitude:: ppreduce selectfirstvalidtarget magnitudedamagecalculation - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_MAGNITUDESTRENGTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_HitsAllWithUndergroundBonusLoop BattleScript_EffectBatonPass:: attackcanceler attackstring ppreduce - jumpifcantswitch BS_ATTACKER | SWITCH_IGNORE_ESCAPE_PREVENTION, BattleScript_ButItFailed + jumpifcantswitch SWITCH_IGNORE_ESCAPE_PREVENTION | BS_ATTACKER, BattleScript_ButItFailed attackanimation waitanimation openpartyscreen BS_ATTACKER, BattleScript_ButItFailed @@ -1715,7 +1703,7 @@ BattleScript_EffectBatonPass:: switchindataupdate BS_ATTACKER hpthresholds BS_ATTACKER printstring STRINGID_SWITCHINMON - switchinanim BS_ATTACKER, 1 + switchinanim BS_ATTACKER, TRUE waitstate switchineffects BS_ATTACKER goto BattleScript_MoveEnd @@ -1736,6 +1724,8 @@ BattleScript_EffectSonicboom:: goto BattleScript_HitFromAtkAnimation BattleScript_EffectMorningSun:: +BattleScript_EffectSynthesis:: +BattleScript_EffectMoonlight:: attackcanceler attackstring ppreduce @@ -1756,8 +1746,8 @@ BattleScript_MoveWeatherChange:: attackanimation waitanimation printfromtable gMoveWeatherChangeStringIds - waitmessage 0x40 - call BattleScript_HandleWeatherFormChanges + waitmessage B_WAIT_TIME_LONG + call BattleScript_WeatherFormChanges goto BattleScript_MoveEnd BattleScript_EffectSunnyDay:: @@ -1790,7 +1780,7 @@ BattleScript_EffectBellyDrum:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNCUTHPMAXEDATTACK - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPsychUp:: @@ -1801,7 +1791,7 @@ BattleScript_EffectPsychUp:: attackanimation waitanimation printstring STRINGID_PKMNCOPIEDSTATCHANGES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMirrorCoat:: @@ -1817,15 +1807,15 @@ BattleScript_EffectMirrorCoat:: BattleScript_EffectSkullBash:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 2 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKULL_BASH call BattleScriptFirstChargingTurn setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_SkullBashEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_SkullBashEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SkullBashEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SkullBashEnd setgraphicalstatchangevalues playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_SkullBashEnd:: goto BattleScript_MoveEnd @@ -1848,7 +1838,6 @@ BattleScript_HitsAllWithUndergroundBonusLoop:: orword gHitMarker, HITMARKER_IGNORE_UNDERGROUND setbyte sDMG_MULTIPLIER, 2 goto BattleScript_DoHitAllWithUndergroundBonus - BattleScript_HitsAllNoUndergroundBonus:: bicword gHitMarker, HITMARKER_IGNORE_UNDERGROUND setbyte sDMG_MULTIPLIER, 1 @@ -1866,23 +1855,22 @@ BattleScript_DoHitAllWithUndergroundBonus:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_EMPTYSTRING3 waitmessage 1 - tryfaintmon BS_TARGET, 0, NULL - moveendto 16 + tryfaintmon BS_TARGET + moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop end - BattleScript_HitAllWithUndergroundBonusMissed:: - pause 0x20 + pause B_WAIT_TIME_SHORT typecalc effectivenesssound resultmessage - waitmessage 0x40 - moveendto 16 + waitmessage B_WAIT_TIME_LONG + moveendto MOVEEND_NEXT_TARGET jumpifnexttargetvalid BattleScript_HitsAllWithUndergroundBonusLoop end @@ -1894,7 +1882,7 @@ BattleScript_EffectFutureSight:: attackanimation waitanimation printfromtable gFutureMoveUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectGust:: @@ -1903,7 +1891,7 @@ BattleScript_EffectGust:: setbyte sDMG_MULTIPLIER, 2 goto BattleScript_EffectHit -BattleScript_EffectFlinchMinimizeHit:: +BattleScript_EffectStomp:: jumpifnostatus3 BS_TARGET, STATUS3_MINIMIZED, BattleScript_FlinchEffect setbyte sDMG_MULTIPLIER, 2 goto BattleScript_FlinchEffect @@ -1911,14 +1899,13 @@ BattleScript_EffectFlinchMinimizeHit:: BattleScript_EffectSolarBeam:: jumpifabilitypresent ABILITY_CLOUD_NINE, BattleScript_SolarBeamDecideTurn jumpifabilitypresent ABILITY_AIR_LOCK, BattleScript_SolarBeamDecideTurn - jumpifhalfword CMP_COMMON_BITS, gBattleWeather, 96, BattleScript_SolarBeamOnFirstTurn + jumpifhalfword CMP_COMMON_BITS, gBattleWeather, B_WEATHER_SUN, BattleScript_SolarBeamOnFirstTurn BattleScript_SolarBeamDecideTurn:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn - setbyte sTWOTURN_STRINGID, 1 + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SOLAR_BEAM call BattleScriptFirstChargingTurn goto BattleScript_MoveEnd - BattleScript_SolarBeamOnFirstTurn:: orword gHitMarker, HITMARKER_CHARGING setmoveeffect MOVE_EFFECT_CHARGING | MOVE_EFFECT_AFFECTS_USER @@ -1942,7 +1929,7 @@ BattleScript_EffectTeleport:: attackanimation waitanimation printstring STRINGID_PKMNFLEDFROMBATTLE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte gBattleOutcome, B_OUTCOME_PLAYER_TELEPORTED goto BattleScript_MoveEnd @@ -1950,7 +1937,7 @@ BattleScript_EffectBeatUp:: attackcanceler accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT ppreduce setbyte gBattleCommunication, 0 BattleScript_BeatUpLoop:: @@ -1959,7 +1946,7 @@ BattleScript_BeatUpLoop:: printstring STRINGID_PKMNATTACK critcalc jumpifbyte CMP_NOT_EQUAL, gCritMultiplier, 2, BattleScript_BeatUpAttack - manipulatedamage 2 + manipulatedamage DMG_DOUBLED BattleScript_BeatUpAttack:: adjustnormaldamage attackanimation @@ -1970,36 +1957,34 @@ BattleScript_BeatUpAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 - tryfaintmon BS_TARGET, 0, NULL - moveendto 16 + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_TARGET + moveendto MOVEEND_NEXT_TARGET goto BattleScript_BeatUpLoop - BattleScript_BeatUpEnd:: end BattleScript_EffectSemiInvulnerable:: jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_SecondTurnSemiInvulnerable jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_SecondTurnSemiInvulnerable - jumpifmove MOVE_FLY, BattleScript_FlyFirstTurn - jumpifmove MOVE_DIVE, BattleScript_DiveFirstTurn - jumpifmove MOVE_BOUNCE, BattleScript_BounceFirstTurn - @ MOVE_DIG - setbyte sTWOTURN_STRINGID, 5 + jumpifmove MOVE_FLY, BattleScript_FirstTurnFly + jumpifmove MOVE_DIVE, BattleScript_FirstTurnDive + jumpifmove MOVE_BOUNCE, BattleScript_FirstTurnBounce + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_DIG goto BattleScript_FirstTurnSemiInvulnerable -BattleScript_BounceFirstTurn:: - setbyte sTWOTURN_STRINGID, 7 +BattleScript_FirstTurnBounce:: + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_BOUNCE goto BattleScript_FirstTurnSemiInvulnerable -BattleScript_DiveFirstTurn:: - setbyte sTWOTURN_STRINGID, 6 +BattleScript_FirstTurnDive:: + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_DIVE goto BattleScript_FirstTurnSemiInvulnerable -BattleScript_FlyFirstTurn:: - setbyte sTWOTURN_STRINGID, 4 +BattleScript_FirstTurnFly:: + setbyte sTWOTURN_STRINGID, B_MSG_TURN1_FLY BattleScript_FirstTurnSemiInvulnerable:: call BattleScriptFirstChargingTurn setsemiinvulnerablebit @@ -2028,8 +2013,8 @@ BattleScript_EffectDefenseCurl:: ppreduce setdefensecurlbit setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_DefenseCurlDoStatUpAnim - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_StatUpPrintString + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpPrintString attackanimation waitanimation BattleScript_DefenseCurlDoStatUpAnim:: @@ -2047,13 +2032,13 @@ BattleScript_PresentHealTarget:: healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AlreadyAtFullHp:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHPFULL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFakeOut:: @@ -2067,17 +2052,17 @@ BattleScript_ButItFailedAtkStringPpReduce:: BattleScript_ButItFailedPpReduce:: ppreduce BattleScript_ButItFailed:: - pause 0x20 + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_NotAffected:: - pause 0x20 + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectUproar:: @@ -2099,12 +2084,12 @@ BattleScript_EffectStockpile:: attackanimation waitanimation printfromtable gStockpileUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSpitUp:: attackcanceler - jumpifbyte CMP_EQUAL, gBattleCommunication + 6, 1, BattleScript_SpitUpNoDamage + jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_SpitUpFailProtect attackstring ppreduce accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE @@ -2112,20 +2097,19 @@ BattleScript_EffectSpitUp:: typecalc adjustsetdamage goto BattleScript_HitFromAtkAnimation - BattleScript_SpitUpFail:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_FAILEDTOSPITUP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd -BattleScript_SpitUpNoDamage:: +BattleScript_SpitUpFailProtect:: attackstring ppreduce - pause 0x40 + pause B_WAIT_TIME_LONG stockpiletobasedamage BattleScript_SpitUpFail resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSwallow:: @@ -2136,9 +2120,9 @@ BattleScript_EffectSwallow:: goto BattleScript_PresentHealTarget BattleScript_SwallowFail:: - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gSwallowFailStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHail:: @@ -2157,7 +2141,7 @@ BattleScript_EffectTorment:: attackanimation waitanimation printstring STRINGID_PKMNSUBJECTEDTOTORMENT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectFlatter:: @@ -2166,16 +2150,16 @@ BattleScript_EffectFlatter:: accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE attackstring ppreduce - jumpifconfusedandstatmaxed 4, BattleScript_ButItFailed + jumpifconfusedandstatmaxed STAT_SPATK, BattleScript_ButItFailed attackanimation waitanimation setstatchanger STAT_SPATK, 1, FALSE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_FlatterTryConfuse - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_FlatterTryConfuse + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_FlatterTryConfuse setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_FlatterTryConfuse:: jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_OwnTempoPrevents jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected @@ -2202,65 +2186,66 @@ BattleScript_EffectWillOWisp:: BattleScript_WaterVeilPrevents:: copybyte gEffectBattler, gBattlerTarget - setbyte cMULTISTRING_CHOOSER, 0 + setbyte cMULTISTRING_CHOOSER, B_MSG_ABILITY_PREVENTS_MOVE_STATUS call BattleScript_BRNPrevention goto BattleScript_MoveEnd BattleScript_AlreadyBurned:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYHASBURN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectMemento:: attackcanceler - jumpifbyte CMP_EQUAL, gBattleCommunication + 6, 1, BattleScript_MementoNoReduceStats + jumpifbyte CMP_EQUAL, cMISS_TYPE, B_MSG_PROTECTED, BattleScript_MementoTargetProtect attackstring ppreduce - jumpifattackandspecialattackcannotfall BattleScript_ButItFailed + trymemento BattleScript_ButItFailed setatkhptozero attackanimation waitanimation - jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_MementoSubstituteInvulnerable - setbyte sSTAT_ANIM_PLAYED, 0 + jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectMementoPrintNoEffect + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_MULTIPLE_STATS playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO setstatchanger STAT_ATK, 2, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MementoSkipStatDown1 - jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_MementoSkipStatDown1 + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk +@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease + jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk printfromtable gStatDownStringIds - waitmessage 0x40 -BattleScript_MementoSkipStatDown1:: + waitmessage B_WAIT_TIME_LONG +BattleScript_EffectMementoTrySpAtk: playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO setstatchanger STAT_SPATK, 2, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MementoSkipStatDown2 - jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_MementoSkipStatDown2 + statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTryFaint +@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease + jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint printfromtable gStatDownStringIds - waitmessage 0x40 -BattleScript_MementoSkipStatDown2:: - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG +BattleScript_EffectMementoTryFaint: + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd - -BattleScript_MementoSubstituteInvulnerable:: +BattleScript_EffectMementoPrintNoEffect: printstring STRINGID_BUTNOEFFECT - waitmessage 0x40 - goto BattleScript_MementoSkipStatDown2 - -BattleScript_MementoNoReduceStats:: + waitmessage B_WAIT_TIME_LONG + goto BattleScript_EffectMementoTryFaint +@ If the target is protected there's no need to check the target's stats or animate, the user will just faint +BattleScript_MementoTargetProtect: attackstring ppreduce - jumpifattackandspecialattackcannotfall BattleScript_MementoNoReduceStatsEnd -BattleScript_MementoNoReduceStatsEnd:: + trymemento BattleScript_MementoTargetProtectEnd +BattleScript_MementoTargetProtectEnd: setatkhptozero - pause 0x40 + pause B_WAIT_TIME_LONG effectivenesssound resultmessage - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd BattleScript_EffectFacade:: - jumpifstatus BS_ATTACKER, STATUS1_POISON | STATUS1_PARALYSIS | STATUS1_BURN | STATUS1_TOXIC_POISON, BattleScript_FacadeDoubleDmg + jumpifstatus BS_ATTACKER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, BattleScript_FacadeDoubleDmg goto BattleScript_EffectHit BattleScript_FacadeDoubleDmg:: @@ -2272,16 +2257,15 @@ BattleScript_EffectFocusPunch:: jumpifnodamage BattleScript_HitFromAccCheck ppreduce printstring STRINGID_PKMNLOSTFOCUS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSmellingsalt:: jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_EffectHit setmoveeffect MOVE_EFFECT_REMOVE_PARALYSIS | MOVE_EFFECT_CERTAIN - jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_SmellingSaltBuff + jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_SmellingsaltDoubleDmg goto BattleScript_EffectHit - -BattleScript_SmellingSaltBuff:: +BattleScript_SmellingsaltDoubleDmg:: setbyte sDMG_MULTIPLIER, 2 goto BattleScript_EffectHit @@ -2293,16 +2277,16 @@ BattleScript_EffectFollowMe:: attackanimation waitanimation printstring STRINGID_PKMNCENTERATTENTION - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectNaturePower:: attackcanceler attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT callterrainattack printstring STRINGID_NATUREPOWERTURNEDINTO - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_EffectCharge:: @@ -2313,7 +2297,7 @@ BattleScript_EffectCharge:: attackanimation waitanimation printstring STRINGID_PKMNCHARGINGPOWER - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectTaunt:: @@ -2325,7 +2309,7 @@ BattleScript_EffectTaunt:: attackanimation waitanimation printstring STRINGID_PKMNFELLFORTAUNT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectHelpingHand:: @@ -2336,7 +2320,7 @@ BattleScript_EffectHelpingHand:: attackanimation waitanimation printstring STRINGID_PKMNREADYTOHELP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectTrick:: @@ -2349,9 +2333,9 @@ BattleScript_EffectTrick:: attackanimation waitanimation printstring STRINGID_PKMNSWITCHEDITEMS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG printfromtable gItemSwapStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRolePlay:: @@ -2363,7 +2347,7 @@ BattleScript_EffectRolePlay:: attackanimation waitanimation printstring STRINGID_PKMNCOPIEDFOE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectWish:: @@ -2383,7 +2367,8 @@ BattleScript_EffectAssist:: waitanimation setbyte sB_ANIM_TURN, 0 setbyte sB_ANIM_TARGETS_HIT, 0 - jumptocalledmove 1 + jumptocalledmove TRUE + BattleScript_EffectIngrain:: attackcanceler attackstring @@ -2392,7 +2377,7 @@ BattleScript_EffectIngrain:: attackanimation waitanimation printstring STRINGID_PKMNPLANTEDROOTS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSuperpower:: @@ -2407,7 +2392,7 @@ BattleScript_EffectMagicCoat:: attackanimation waitanimation printstring STRINGID_PKMNSHROUDEDITSELF - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRecycle:: @@ -2418,7 +2403,7 @@ BattleScript_EffectRecycle:: attackanimation waitanimation printstring STRINGID_XFOUNDONEY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRevenge:: @@ -2442,7 +2427,7 @@ BattleScript_BrickBreakAnim:: waitanimation jumpifbyte CMP_LESS_THAN, sB_ANIM_TURN, 2, BattleScript_BrickBreakDoHit printstring STRINGID_THEWALLSHATTERED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_BrickBreakDoHit:: typecalc2 effectivenesssound @@ -2451,11 +2436,11 @@ BattleScript_BrickBreakDoHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG seteffectwithchance - tryfaintmon BS_TARGET, 0, NULL + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_EffectYawn:: @@ -2472,15 +2457,14 @@ BattleScript_EffectYawn:: attackanimation waitanimation printstring STRINGID_PKMNWASMADEDROWSY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd - BattleScript_PrintBankAbilityMadeIneffective:: copybyte sBATTLER, sBATTLER_WITH_ABILITY BattleScript_PrintAbilityMadeIneffective:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEITINEFFECTIVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectKnockOff:: @@ -2514,7 +2498,7 @@ BattleScript_EffectSkillSwap:: attackanimation waitanimation printstring STRINGID_PKMNSWAPPEDABILITIES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectImprison:: @@ -2525,7 +2509,7 @@ BattleScript_EffectImprison:: attackanimation waitanimation printstring STRINGID_PKMNSEALEDOPPONENTMOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectRefresh:: @@ -2536,7 +2520,7 @@ BattleScript_EffectRefresh:: attackanimation waitanimation printstring STRINGID_PKMNSTATUSNORMAL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER goto BattleScript_MoveEnd @@ -2548,7 +2532,7 @@ BattleScript_EffectGrudge:: attackanimation waitanimation printstring STRINGID_PKMNWANTSGRUDGE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectSnatch:: @@ -2558,9 +2542,9 @@ BattleScript_EffectSnatch:: ppreduce attackanimation waitanimation - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNWAITSFORTARGET - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectLowKick:: @@ -2597,43 +2581,44 @@ BattleScript_TeeterDanceLoop:: waitanimation seteffectprimary resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_TeeterDanceLoopIncrement:: - moveendto 16 + moveendto MOVEEND_NEXT_TARGET addbyte gBattlerTarget, 1 jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TeeterDanceLoop end BattleScript_TeeterDanceOwnTempoPrevents:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSCONFUSIONWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceLoopIncrement BattleScript_TeeterDanceSafeguardProtected:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNUSEDSAFEGUARD - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceLoopIncrement BattleScript_TeeterDanceSubstitutePrevents:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_BUTITFAILED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceLoopIncrement BattleScript_TeeterDanceAlreadyConfused:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNALREADYCONFUSED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceLoopIncrement BattleScript_TeeterDanceMissed:: resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_TeeterDanceLoopIncrement BattleScript_EffectMudSport:: +BattleScript_EffectWaterSport:: attackcanceler attackstring ppreduce @@ -2641,7 +2626,7 @@ BattleScript_EffectMudSport:: attackanimation waitanimation printfromtable gSportsUsedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectPoisonFang:: @@ -2660,59 +2645,59 @@ BattleScript_EffectTickle:: attackcanceler attackstring ppreduce - jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, 0, BattleScript_TickleDoMoveAnim - jumpifstat BS_TARGET, CMP_EQUAL, STAT_DEF, 0, BattleScript_CantLowerMultipleStats + jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_ATK, MIN_STAT_STAGE, BattleScript_TickleDoMoveAnim + jumpifstat BS_TARGET, CMP_EQUAL, STAT_DEF, MIN_STAT_STAGE, BattleScript_CantLowerMultipleStats BattleScript_TickleDoMoveAnim:: accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE attackanimation waitanimation - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE setstatchanger STAT_ATK, 1, TRUE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleTryLowerDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_TickleTryLowerDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleTryLowerDef printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_TickleTryLowerDef:: playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE setstatchanger STAT_DEF, 1, TRUE statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_TickleEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleEnd printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_TickleEnd:: goto BattleScript_MoveEnd BattleScript_CantLowerMultipleStats:: - pause 0x20 + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_STATSWONTDECREASE2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectCosmicPower:: attackcanceler attackstring ppreduce - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 12, BattleScript_CosmicPowerDoMoveAnim - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 12, BattleScript_CantRaiseMultipleStats + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_CosmicPowerDoMoveAnim + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats BattleScript_CosmicPowerDoMoveAnim:: attackanimation waitanimation - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0 setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CosmicPowerTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_CosmicPowerTrySpDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerTrySpDef printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CosmicPowerTrySpDef:: setstatchanger STAT_SPDEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CosmicPowerEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_CosmicPowerEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerEnd printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CosmicPowerEnd:: goto BattleScript_MoveEnd @@ -2724,24 +2709,24 @@ BattleScript_EffectBulkUp:: attackcanceler attackstring ppreduce - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 12, BattleScript_BulkUpDoMoveAnim - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, 12, BattleScript_CantRaiseMultipleStats + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_BulkUpDoMoveAnim + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_DEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats BattleScript_BulkUpDoMoveAnim:: attackanimation waitanimation - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BulkUpTryDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_BulkUpTryDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpTryDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpTryDef printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_BulkUpTryDef:: setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BulkUpEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_BulkUpEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpEnd printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_BulkUpEnd:: goto BattleScript_MoveEnd @@ -2749,56 +2734,56 @@ BattleScript_EffectCalmMind:: attackcanceler attackstring ppreduce - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 12, BattleScript_CalmMindDoMoveAnim - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 12, BattleScript_CantRaiseMultipleStats + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_CalmMindDoMoveAnim + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats BattleScript_CalmMindDoMoveAnim:: attackanimation waitanimation - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0 setstatchanger STAT_SPATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CalmMindTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_CalmMindTrySpDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindTrySpDef + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindTrySpDef printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CalmMindTrySpDef:: setstatchanger STAT_SPDEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_CalmMindEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_CalmMindEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindEnd printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_CalmMindEnd:: goto BattleScript_MoveEnd BattleScript_CantRaiseMultipleStats:: - pause 0x20 + pause B_WAIT_TIME_SHORT orbyte gMoveResultFlags, MOVE_RESULT_FAILED printstring STRINGID_STATSWONTINCREASE2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_EffectDragonDance:: attackcanceler attackstring ppreduce - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 12, BattleScript_DragonDanceDoMoveAnim - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, 12, BattleScript_CantRaiseMultipleStats + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_DragonDanceDoMoveAnim + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats BattleScript_DragonDanceDoMoveAnim:: attackanimation waitanimation - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_DragonDanceTrySpeed - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_DragonDanceTrySpeed + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceTrySpeed + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceTrySpeed printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_DragonDanceTrySpeed:: setstatchanger STAT_SPEED, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_DragonDanceEnd - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_DragonDanceEnd + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceEnd + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceEnd printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_DragonDanceEnd:: goto BattleScript_MoveEnd @@ -2810,12 +2795,12 @@ BattleScript_EffectCamouflage:: attackanimation waitanimation printstring STRINGID_PKMNCHANGEDTYPE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_FaintAttacker:: playfaintcry BS_ATTACKER - pause 0x40 + pause B_WAIT_TIME_LONG dofaintanimation BS_ATTACKER cleareffectsonfaint BS_ATTACKER printstring STRINGID_ATTACKERFAINTED @@ -2824,7 +2809,7 @@ BattleScript_FaintAttacker:: BattleScript_FaintTarget:: playfaintcry BS_TARGET - pause 0x40 + pause B_WAIT_TIME_LONG dofaintanimation BS_TARGET cleareffectsonfaint BS_TARGET printstring STRINGID_TARGETFAINTED @@ -2837,34 +2822,37 @@ BattleScript_GiveExp:: end2 BattleScript_HandleFaintedMon:: - checkteamslost BattleScript_LinkBattleHandleFaint + checkteamslost BattleScript_LinkHandleFaintedMonMultiple jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd - jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChooseAnother - jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChooseAnother + jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonTryChoose + jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChoose printstring STRINGID_USENEXTPKMN setbyte gBattleCommunication, 0 yesnobox - jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0, BattleScript_FaintedMonTryChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 0, BattleScript_FaintedMonTryChoose jumpifplayerran BattleScript_FaintedMonEnd printstring STRINGID_CANTESCAPE2 -BattleScript_FaintedMonTryChooseAnother:: +BattleScript_FaintedMonTryChoose:: openpartyscreen BS_FAINTED, BattleScript_FaintedMonEnd switchhandleorder BS_FAINTED, 2 - jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_BATTLE_TOWER, BattleScript_FaintedMonChooseAnother - jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonChooseAnother - jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonChooseAnother - jumpifbyte CMP_EQUAL, sBATTLE_STYLE, 1, BattleScript_FaintedMonChooseAnother - jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonChooseAnother + jumpifnotbattletype BATTLE_TYPE_TRAINER, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_LINK, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_BATTLE_TOWER, BattleScript_FaintedMonSendOutNew + jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonSendOutNew + jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonSendOutNew + jumpifbyte CMP_EQUAL, sBATTLE_STYLE, OPTIONS_BATTLE_STYLE_SET, BattleScript_FaintedMonSendOutNew + jumpifcantswitch BS_PLAYER1, BattleScript_FaintedMonSendOutNew +@ Yes/No for sending out a new Pokémon when the opponent is switching printstring STRINGID_ENEMYABOUTTOSWITCHPKMN setbyte gBattleCommunication, 0 yesnobox - jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 1, BattleScript_FaintedMonChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication + 1, 1, BattleScript_FaintedMonSendOutNew +@ Player said yes, go to party screen (note optional flag, player may exit the menu instead) setatktoplayer0 - openpartyscreen BS_ATTACKER | PARTY_SCREEN_OPTIONAL, BattleScript_FaintedMonChooseAnother + openpartyscreen BS_ATTACKER | PARTY_SCREEN_OPTIONAL, BattleScript_FaintedMonSendOutNew switchhandleorder BS_ATTACKER, 2 - jumpifbyte CMP_EQUAL, gBattleCommunication, 6, BattleScript_FaintedMonChooseAnother + jumpifbyte CMP_EQUAL, gBattleCommunication, PARTY_SIZE, BattleScript_FaintedMonSendOutNew +@ Switch Pokémon before opponent atknameinbuff1 resetintimidatetracebits BS_ATTACKER hpthresholds2 BS_ATTACKER @@ -2883,29 +2871,29 @@ BattleScript_FaintedMonTryChooseAnother:: waitstate switchineffects BS_ATTACKER resetsentmonsvalue -BattleScript_FaintedMonChooseAnother:: +BattleScript_FaintedMonSendOutNew:: drawpartystatussummary BS_FAINTED getswitchedmondata BS_FAINTED switchindataupdate BS_FAINTED hpthresholds BS_FAINTED printstring STRINGID_SWITCHINMON hidepartystatussummary BS_FAINTED - switchinanim BS_FAINTED, 0 + switchinanim BS_FAINTED, FALSE waitstate - resetplayerfainted BS_ATTACKER + resetplayerfainted switchineffects BS_FAINTED jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonEnd cancelallactions BattleScript_FaintedMonEnd:: end2 -BattleScript_LinkBattleHandleFaint:: - openpartyscreen BS_FAINTED_LINK_MULTIPLE_1, BattleScript_LinkBattleHandleFaintStart -BattleScript_LinkBattleHandleFaintStart:: +BattleScript_LinkHandleFaintedMonMultiple:: + openpartyscreen BS_FAINTED_LINK_MULTIPLE_1, BattleScript_LinkHandleFaintedMonMultipleStart +BattleScript_LinkHandleFaintedMonMultipleStart:: switchhandleorder BS_FAINTED, 0 - openpartyscreen BS_FAINTED_LINK_MULTIPLE_2, BattleScript_LinkBattleFaintedMonEnd + openpartyscreen BS_FAINTED_LINK_MULTIPLE_2, BattleScript_LinkHandleFaintedMonMultipleEnd switchhandleorder BS_FAINTED, 0 -BattleScript_LinkBattleFaintedMonLoop:: +BattleScript_LinkHandleFaintedMonLoop:: switchhandleorder BS_FAINTED, 2 drawpartystatussummary BS_FAINTED getswitchedmondata BS_FAINTED @@ -2913,11 +2901,11 @@ BattleScript_LinkBattleFaintedMonLoop:: hpthresholds BS_FAINTED printstring STRINGID_SWITCHINMON hidepartystatussummary BS_FAINTED - switchinanim BS_FAINTED, 0 + switchinanim BS_FAINTED, FALSE waitstate - switchineffects 5 - jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_LinkBattleFaintedMonLoop -BattleScript_LinkBattleFaintedMonEnd:: + switchineffects BS_FAINTED_LINK_MULTIPLE_1 + jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_LinkHandleFaintedMonLoop +BattleScript_LinkHandleFaintedMonMultipleEnd:: end2 BattleScript_LocalTrainerBattleWon:: @@ -2928,7 +2916,7 @@ BattleScript_LocalTrainerBattleWon:: getmoneyreward BattleScript_LocalTrainerBattleWonGotMoney BattleScript_LocalTrainerBattleWonGotMoney:: printstring STRINGID_PLAYERGOTMONEY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_PayDayMoneyAndPickUpItems:: givepaydaymoney pickup @@ -2942,30 +2930,30 @@ BattleScript_LocalBattleLost:: BattleScript_LocalBattleLostPrintWhiteOut:: jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_LocalBattleLostEnd printstring STRINGID_PLAYERWHITEOUT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG getmoneyreward BattleScript_LocalBattleLostPrintTrainersWinText printstring STRINGID_PLAYERWHITEOUT2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_EReaderOrSecretBaseTrainerEnd BattleScript_LocalBattleLostEnd:: printstring STRINGID_PLAYERLOSTAGAINSTENEMYTRAINER - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG getmoneyreward BattleScript_LocalBattleLostPrintTrainersWinText printstring STRINGID_PLAYERPAIDPRIZEMONEY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_EReaderOrSecretBaseTrainerEnd:: end2 BattleScript_LocalBattleLostPrintTrainersWinText:: printstring STRINGID_PLAYERWHITEDOUT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_RivalBattleLost:: jumpifhasnohp BS_ATTACKER, BattleScript_RivalBattleLostSkipMonRecall printstring STRINGID_TRAINER1MON1COMEBACK - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG returnatktoball waitstate BattleScript_RivalBattleLostSkipMonRecall:: @@ -2979,7 +2967,7 @@ BattleScript_BattleTowerLost:: various8 BS_ATTACKER jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_BattleTowerLostLostSkipMonRecall printfromtable gDoubleBattleRecallStrings - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG returnopponentmon1toball BS_ATTACKER waitstate returnopponentmon2toball BS_ATTACKER @@ -2995,9 +2983,9 @@ BattleScript_BattleTowerLostLostSkipDouble:: BattleScript_LinkBattleWonOrLost:: printstring STRINGID_BATTLEEND - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG endlinkbattle - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_BattleTowerTrainerBattleWon:: @@ -3013,24 +3001,24 @@ BattleScript_BattleTowerEtcTrainerBattleWonSkipText:: end2 BattleScript_SmokeBallEscape:: - playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE, NULL + playanimation BS_ATTACKER, B_ANIM_SMOKEBALL_ESCAPE printstring STRINGID_PKMNFLEDUSINGITS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_RanAwayUsingMonAbility:: printstring STRINGID_PKMNFLEDUSING - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_GotAwaySafely:: printstring STRINGID_GOTAWAYSAFELY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_WildMonFled:: printstring STRINGID_WILDPKMNFLED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_PrintCantRunFromTrainer:: @@ -3044,7 +3032,7 @@ BattleScript_LeftoverBirchString:: BattleScript_PrintFailedToRunString:: printfromtable gNoEscapeStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_PrintCantEscapeFromBattle:: @@ -3059,20 +3047,19 @@ BattleScript_ActionSwitch:: hpthresholds2 BS_ATTACKER printstring STRINGID_RETURNMON setbyte sDMG_MULTIPLIER, 2 - jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchCheckTwice + jumpifbattletype BATTLE_TYPE_DOUBLE, BattleScript_PursuitSwitchDmgSetMultihit setmultihit 1 - goto BattleScript_PursuitSwitchLoop - -BattleScript_PursuitSwitchCheckTwice:: + goto BattleScript_PursuitSwitchDmgLoop +BattleScript_PursuitSwitchDmgSetMultihit:: setmultihit 2 -BattleScript_PursuitSwitchLoop:: +BattleScript_PursuitSwitchDmgLoop:: jumpifnopursuitswitchdmg BattleScript_DoSwitchOut swapattackerwithtarget trysetdestinybondtohappen call BattleScript_PursuitDmgOnSwitchOut swapattackerwithtarget BattleScript_DoSwitchOut:: - decrementmultihit BattleScript_PursuitSwitchLoop + decrementmultihit BattleScript_PursuitSwitchDmgLoop switchoutabilities BS_ATTACKER waitstate returnatktoball @@ -3084,15 +3071,15 @@ BattleScript_DoSwitchOut:: hpthresholds BS_ATTACKER printstring STRINGID_SWITCHINMON hidepartystatussummary BS_ATTACKER - switchinanim BS_ATTACKER, 0 + switchinanim BS_ATTACKER, FALSE waitstate switchineffects BS_ATTACKER - moveendcase 4 - moveendcase 15 + moveendcase MOVEEND_IMMUNITY_ABILITIES + moveendcase MOVEEND_MIRROR_MOVE end2 BattleScript_PursuitDmgOnSwitchOut:: - pause 0x20 + pause B_WAIT_TIME_SHORT attackstring ppreduce critcalc @@ -3107,20 +3094,20 @@ BattleScript_PursuitDmgOnSwitchOut:: healthbarupdate BS_TARGET datahpupdate BS_TARGET critmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG resultmessage - waitmessage 0x40 - tryfaintmon BS_TARGET, 0, NULL - moveendfromto 3, 6 + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_TARGET + moveendfromto MOVEEND_ON_DAMAGE_ABILITIES, MOVEEND_CHOICE_MOVE getbattlerfainted BS_TARGET - jumpifbyte CMP_EQUAL, gBattleCommunication, 0, BattleScript_PursuitSwitchRivalSkip + jumpifbyte CMP_EQUAL, gBattleCommunication, FALSE, BattleScript_PursuitDmgOnSwitchOutRet setbyte sGIVEEXP_STATE, 0 getexp BS_TARGET -BattleScript_PursuitSwitchRivalSkip:: +BattleScript_PursuitDmgOnSwitchOutRet: return BattleScript_Pausex20:: - pause 0x20 + pause B_WAIT_TIME_SHORT return BattleScript_LevelUp:: @@ -3128,11 +3115,10 @@ BattleScript_LevelUp:: printstring STRINGID_PKMNGREWTOLV setbyte sLVLBOX_STATE, 0 drawlvlupbox - handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, 1 + handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, TRUE goto BattleScript_AskToLearnMove - -BattleScript_LearnMoveLoop:: - handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, 0 +BattleScript_TryLearnMoveLoop:: + handlelearnnewmove BattleScript_LearnedNewMove, BattleScript_LearnMoveReturn, FALSE BattleScript_AskToLearnMove:: buffermovetolearn printstring STRINGID_TRYTOLEARNMOVE1 @@ -3146,8 +3132,7 @@ BattleScript_AskToLearnMove:: setbyte sLEARNMOVE_STATE, 0 yesnoboxstoplearningmove BattleScript_AskToLearnMove printstring STRINGID_DIDNOTLEARNMOVE - goto BattleScript_LearnMoveLoop - + goto BattleScript_TryLearnMoveLoop BattleScript_ForgotAndLearnedNewMove:: printstring STRINGID_123POOF printstring STRINGID_PKMNFORGOTMOVE @@ -3156,38 +3141,37 @@ BattleScript_LearnedNewMove:: buffermovetolearn fanfare MUS_LEVEL_UP printstring STRINGID_PKMNLEARNEDMOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatechoicemoveonlvlup BS_ATTACKER - goto BattleScript_LearnMoveLoop - + goto BattleScript_TryLearnMoveLoop BattleScript_LearnMoveReturn:: return BattleScript_RainContinuesOrEnds:: printfromtable gRainContinuesStringIds - waitmessage 0x40 - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_RainContinuesOrEndsEnd - playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES, NULL + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_RAIN_STOPPED, BattleScript_RainContinuesOrEndsEnd + playanimation BS_ATTACKER, B_ANIM_RAIN_CONTINUES BattleScript_RainContinuesOrEndsEnd:: end2 BattleScript_DamagingWeatherContinues:: printfromtable gSandstormHailContinuesStringIds - waitmessage 0x40 - playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL + waitmessage B_WAIT_TIME_LONG + playanimation_var BS_ATTACKER, sB_ANIM_ARG1 setbyte gBattleCommunication, 0 BattleScript_DamagingWeatherLoop:: copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1 weatherdamage jumpifword CMP_EQUAL, gBattleMoveDamage, NULL, BattleScript_DamagingWeatherContinuesEnd printfromtable gSandstormHailDmgStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE effectivenesssound hitanimation BS_ATTACKER healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER checkteamslost BattleScript_DamagingWeatherContinuesEnd BattleScript_DamagingWeatherContinuesEnd:: jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_WeatherDamageEndedBattle @@ -3199,41 +3183,41 @@ BattleScript_WeatherDamageEndedBattle:: BattleScript_SandStormHailEnds:: printfromtable gSandstormHailEndStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SunlightContinues:: printstring STRINGID_SUNLIGHTSTRONG - waitmessage 0x40 - playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES, NULL + waitmessage B_WAIT_TIME_LONG + playanimation BS_ATTACKER, B_ANIM_SUN_CONTINUES end2 BattleScript_SunlightFaded:: printstring STRINGID_SUNLIGHTFADED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_OverworldWeatherStarts:: - printfromtable gWeatherContinuesStringIds - waitmessage 0x40 - playanimation2 BS_ATTACKER, sB_ANIM_ARG1, NULL + printfromtable gWeatherStartsStringIds + waitmessage B_WAIT_TIME_LONG + playanimation_var BS_ATTACKER, sB_ANIM_ARG1 end3 BattleScript_SideStatusWoreOff:: printstring STRINGID_PKMNSXWOREOFF - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SafeguardProtected:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNUSEDSAFEGUARD - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_SafeguardEnds:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSAFEGUARDEXPIRED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_LeechSeedTurnDrain:: @@ -3254,14 +3238,14 @@ BattleScript_LeechSeedTurnPrintAndUpdateHp:: healthbarupdate BS_TARGET datahpupdate BS_TARGET printfromtable gLeechSeedStringIds - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL - tryfaintmon BS_TARGET, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER + tryfaintmon BS_TARGET end2 BattleScript_BideStoringEnergy:: printstring STRINGID_PKMNSTORINGENERGY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_BideAttack:: @@ -3269,7 +3253,7 @@ BattleScript_BideAttack:: setmoveeffect MOVE_EFFECT_CHARGING clearstatusfromeffect BS_ATTACKER printstring STRINGID_PKMNUNLEASHEDENERGY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG accuracycheck BattleScript_MoveMissed, ACC_CURR_MOVE typecalc bicbyte gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE @@ -3284,8 +3268,8 @@ BattleScript_BideAttack:: healthbarupdate BS_TARGET datahpupdate BS_TARGET resultmessage - waitmessage 0x40 - tryfaintmon BS_TARGET, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_TARGET goto BattleScript_MoveEnd BattleScript_BideNoEnergyToAttack:: @@ -3293,7 +3277,7 @@ BattleScript_BideNoEnergyToAttack:: setmoveeffect MOVE_EFFECT_CHARGING clearstatusfromeffect BS_ATTACKER printstring STRINGID_PKMNUNLEASHEDENERGY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_ButItFailed BattleScript_SuccessForceOut:: @@ -3305,29 +3289,30 @@ BattleScript_SuccessForceOut:: jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_TrainerBattleForceOut setbyte gBattleOutcome, B_OUTCOME_PLAYER_TELEPORTED finishaction + BattleScript_TrainerBattleForceOut:: getswitchedmondata BS_TARGET switchindataupdate BS_TARGET - switchinanim BS_TARGET, 0 + switchinanim BS_TARGET, FALSE waitstate printstring STRINGID_PKMNWASDRAGGEDOUT switchineffects BS_TARGET goto BattleScript_MoveEnd BattleScript_MistProtected:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPROTECTEDBYMIST - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_RageIsBuilding:: printstring STRINGID_PKMNRAGEBUILDING - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveUsedIsDisabled:: printstring STRINGID_PKMNMOVEISDISABLED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingDisabledMove:: @@ -3336,21 +3321,21 @@ BattleScript_SelectingDisabledMove:: BattleScript_DisabledNoMore:: printstring STRINGID_PKMNMOVEDISABLEDNOMORE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_EncoredNoMore:: printstring STRINGID_PKMNENCOREENDED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_DestinyBondTakesLife:: printstring STRINGID_PKMNTOOKFOE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER return BattleScript_SpikesOnAttacker:: @@ -3358,8 +3343,8 @@ BattleScript_SpikesOnAttacker:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER call BattleScript_PrintHurtBySpikes - tryfaintmon BS_ATTACKER, 0, NULL - tryfaintmon BS_ATTACKER, 1, BattleScript_SpikesOnAttackerFainted + tryfaintmon BS_ATTACKER + tryfaintmon_spikes BS_ATTACKER, BattleScript_SpikesOnAttackerFainted return BattleScript_SpikesOnAttackerFainted:: @@ -3373,8 +3358,8 @@ BattleScript_SpikesOnTarget:: healthbarupdate BS_TARGET datahpupdate BS_TARGET call BattleScript_PrintHurtBySpikes - tryfaintmon BS_TARGET, 0, NULL - tryfaintmon BS_TARGET, 1, BattleScript_SpikesOnTargetFainted + tryfaintmon BS_TARGET + tryfaintmon_spikes BS_TARGET, BattleScript_SpikesOnTargetFainted return BattleScript_SpikesOnTargetFainted:: @@ -3388,8 +3373,8 @@ BattleScript_SpikesOnFaintedBattler:: healthbarupdate BS_FAINTED datahpupdate BS_FAINTED call BattleScript_PrintHurtBySpikes - tryfaintmon BS_FAINTED, 0, NULL - tryfaintmon BS_FAINTED, 1, BattleScript_SpikesOnFaintedBattlerFainted + tryfaintmon BS_FAINTED + tryfaintmon_spikes BS_FAINTED, BattleScript_SpikesOnFaintedBattlerFainted return BattleScript_SpikesOnFaintedBattlerFainted:: @@ -3400,56 +3385,56 @@ BattleScript_SpikesOnFaintedBattlerFainted:: BattleScript_PrintHurtBySpikes:: printstring STRINGID_PKMNHURTBYSPIKES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_PerishSongTakesLife:: printstring STRINGID_PKMNPERISHCOUNTFELL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER end2 BattleScript_PerishSongCountGoesDown:: printstring STRINGID_PKMNPERISHCOUNTFELL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_AllStatsUp:: - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 12, BattleScript_AllStatsUpAtk - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, 12, BattleScript_AllStatsUpAtk - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, 12, BattleScript_AllStatsUpAtk - jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, 12, BattleScript_AllStatsUpAtk - jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, 12, BattleScript_AllStatsUpRet + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk + jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk + jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPDEF, MAX_STAT_STAGE, BattleScript_AllStatsUpRet BattleScript_AllStatsUpAtk:: - setbyte sSTAT_ANIM_PLAYED, 0 + setbyte sSTAT_ANIM_PLAYED, FALSE playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_AllStatsUpDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpDef printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpDef:: setstatchanger STAT_DEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_AllStatsUpSpeed + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpeed printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpeed:: setstatchanger STAT_SPEED, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_AllStatsUpSpAtk + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpAtk printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpAtk:: setstatchanger STAT_SPATK, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_AllStatsUpSpDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpDef printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpSpDef:: setstatchanger STAT_SPDEF, 1, FALSE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_AllStatsUpRet + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpRet printfromtable gStatUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AllStatsUpRet:: return @@ -3459,37 +3444,35 @@ BattleScript_RapidSpinAway:: BattleScript_WrapFree:: printstring STRINGID_PKMNGOTFREE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG copybyte gBattlerTarget, sBATTLER return BattleScript_LeechSeedFree:: printstring STRINGID_PKMNSHEDLEECHSEED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_SpikesFree:: printstring STRINGID_PKMNBLEWAWAYSPIKES - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MonTookFutureAttack:: printstring STRINGID_PKMNTOOKATTACK - waitmessage 0x40 - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_CheckDoomDesireMiss + waitmessage B_WAIT_TIME_LONG + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_CheckDoomDesireMiss accuracycheck BattleScript_FutureAttackMiss, MOVE_FUTURE_SIGHT goto BattleScript_FutureAttackAnimate - BattleScript_CheckDoomDesireMiss:: accuracycheck BattleScript_FutureAttackMiss, MOVE_DOOM_DESIRE BattleScript_FutureAttackAnimate:: adjustnormaldamage2 - jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_FutureHitAnimDoomDesire - playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT, NULL + jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_FUTURE_SIGHT, BattleScript_FutureHitAnimDoomDesire + playanimation BS_ATTACKER, B_ANIM_FUTURE_SIGHT_HIT goto BattleScript_DoFutureAttackHit - BattleScript_FutureHitAnimDoomDesire:: - playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT, NULL + playanimation BS_ATTACKER, B_ANIM_DOOM_DESIRE_HIT BattleScript_DoFutureAttackHit:: effectivenesssound hitanimation BS_TARGET @@ -3497,21 +3480,21 @@ BattleScript_DoFutureAttackHit:: healthbarupdate BS_TARGET datahpupdate BS_TARGET resultmessage - waitmessage 0x40 - tryfaintmon BS_TARGET, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_TARGET checkteamslost BattleScript_FutureAttackEnd BattleScript_FutureAttackEnd:: - moveendcase 0 - moveendfromto 11, 14 + moveendcase MOVEEND_RAGE + moveendfromto MOVEEND_ITEM_EFFECTS_ALL, MOVEEND_UPDATE_LAST_MOVES setbyte gMoveResultFlags, 0 end2 BattleScript_FutureAttackMiss:: - pause 0x20 + pause B_WAIT_TIME_SHORT setbyte gMoveResultFlags, 0 orbyte gMoveResultFlags, MOVE_RESULT_FAILED resultmessage - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte gMoveResultFlags, 0 end2 @@ -3525,9 +3508,9 @@ BattleScript_SelectingMoveWithNoPP:: BattleScript_NoPPForMove:: attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_BUTNOPPLEFT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingTormentedMove:: @@ -3535,7 +3518,7 @@ BattleScript_SelectingTormentedMove:: endselectionscript printstring STRINGID_PKMNCANTUSEMOVETORMENT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingNotAllowedMoveTaunt:: @@ -3544,72 +3527,72 @@ BattleScript_SelectingNotAllowedMoveTaunt:: BattleScript_MoveUsedIsTaunted:: printstring STRINGID_PKMNCANTUSEMOVETAUNT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_WishComesTrue:: trywish 1, BattleScript_WishButFullHp - playanimation BS_TARGET, B_ANIM_WISH_HEAL, NULL + playanimation BS_TARGET, B_ANIM_WISH_HEAL printstring STRINGID_PKMNWISHCAMETRUE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNREGAINEDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_WishButFullHp:: printstring STRINGID_PKMNWISHCAMETRUE - waitmessage 0x40 - pause 0x20 + waitmessage B_WAIT_TIME_LONG + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNHPFULL - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_IngrainTurnHeal:: - playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL, NULL + playanimation BS_ATTACKER, B_ANIM_INGRAIN_HEAL printstring STRINGID_PKMNABSORBEDNUTRIENTS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER end2 BattleScript_PrintMonIsRooted:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNANCHOREDITSELF - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AtkDefDown:: - setbyte sSTAT_ANIM_PLAYED, 0 - playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS | STAT_CHANGE_CANT_PREVENT - playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_CANT_PREVENT + setbyte sSTAT_ANIM_PLAYED, FALSE + playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS + playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE setstatchanger STAT_ATK, 1, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_AtkDefDownAtkFail + statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_AtkDefDownAtkFail jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_AtkDefDownAtkFail printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AtkDefDownAtkFail:: playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_CANT_PREVENT setstatchanger STAT_DEF, 1, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_AtkDefDownDefFail + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_AtkDefDownDefFail jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_AtkDefDownDefFail printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_AtkDefDownDefFail:: return BattleScript_KnockedOff:: - playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL + playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF printstring STRINGID_PKMNKNOCKEDOFF - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveUsedIsImprisoned:: printstring STRINGID_PKMNCANTUSEMOVESEALED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SelectingImprisonedMove:: @@ -3618,15 +3601,15 @@ BattleScript_SelectingImprisonedMove:: BattleScript_GrudgeTakesPp:: printstring STRINGID_PKMNLOSTPPGRUDGE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MagicCoatBounce:: attackstring ppreduce - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMOVEBOUNCED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP setmagiccoattarget BS_ATTACKER return @@ -3635,131 +3618,131 @@ BattleScript_SnatchedMove:: attackstring ppreduce snatchsetbattlers - playanimation BS_TARGET, B_ANIM_SNATCH_MOVE, NULL + playanimation BS_TARGET, B_ANIM_SNATCH_MOVE printstring STRINGID_PKMNSNATCHEDMOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED | HITMARKER_NO_PPDEDUCT | HITMARKER_ALLOW_NO_PP swapattackerwithtarget return BattleScript_EnduredMsg:: printstring STRINGID_PKMNENDUREDHIT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_OneHitKOMsg:: printstring STRINGID_ONEHITKO - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_SAtkDown2:: setbyte sSTAT_ANIM_PLAYED, 0 playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_CANT_PREVENT setstatchanger STAT_SPATK, 2, TRUE - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_SAtkDown2End + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_SAtkDown2End jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 2, BattleScript_SAtkDown2End printfromtable gStatDownStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_SAtkDown2End:: return BattleScript_FocusPunchSetUp:: printstring STRINGID_EMPTYSTRING3 waitmessage 1 - playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP, NULL + playanimation BS_ATTACKER, B_ANIM_FOCUS_PUNCH_SETUP printstring STRINGID_PKMNTIGHTENINGFOCUS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsAsleep:: printstring STRINGID_PKMNFASTASLEEP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedWokeUp:: bicword gHitMarker, HITMARKER_WAKE_UP_CLEAR printfromtable gWokeUpStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER return BattleScript_MonWokeUpInUproar:: printstring STRINGID_PKMNWOKEUPINUPROAR - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER end2 BattleScript_PoisonTurnDmg:: printstring STRINGID_PKMNHURTBYPOISON - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_DoStatusTurnDmg:: statusanimation BS_ATTACKER BattleScript_DoTurnDmg:: orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER - tryfaintmon BS_ATTACKER, 0, NULL + tryfaintmon BS_ATTACKER checkteamslost BattleScript_DoTurnDmgEnd BattleScript_DoTurnDmgEnd:: end2 BattleScript_BurnTurnDmg:: printstring STRINGID_PKMNHURTBYBURN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoStatusTurnDmg BattleScript_MoveUsedIsFrozen:: printstring STRINGID_PKMNISFROZEN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedUnfroze:: printfromtable gGotDefrostedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER return BattleScript_DefrostedViaFireMove:: printstring STRINGID_PKMNWASDEFROSTED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_TARGET return BattleScript_MoveUsedIsParalyzed:: printstring STRINGID_PKMNISPARALYZED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG statusanimation BS_ATTACKER cancelmultiturnmoves BS_ATTACKER goto BattleScript_MoveEnd BattleScript_MoveUsedFlinched:: printstring STRINGID_PKMNFLINCHED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_PrintUproarOverTurns:: printfromtable gUproarOverTurnStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_ThrashConfuses:: - chosenstatusanimation BS_ATTACKER, 1, STATUS2_CONFUSION + chosenstatus2animation BS_ATTACKER, STATUS2_CONFUSION printstring STRINGID_PKMNFATIGUECONFUSION - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsConfused:: printstring STRINGID_PKMNISCONFUSED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_CONFUSION - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0, BattleScript_MoveUsedIsConfusedRet + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, FALSE, BattleScript_MoveUsedIsConfusedRet BattleScript_DoSelfConfusionDmg:: cancelmultiturnmoves BS_ATTACKER adjustnormaldamage2 printstring STRINGID_ITHURTCONFUSION - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG effectivenesssound hitanimation BS_ATTACKER waitstate @@ -3767,88 +3750,87 @@ BattleScript_DoSelfConfusionDmg:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER resultmessage - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER goto BattleScript_MoveEnd - BattleScript_MoveUsedIsConfusedRet:: return BattleScript_MoveUsedIsConfusedNoMore:: printstring STRINGID_PKMNHEALEDCONFUSION - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_PrintPayDayMoneyString:: - printstring STRINGID_PKMNPICKEDUPITEM - waitmessage 0x40 + printstring STRINGID_PLAYERPICKEDUPMONEY + waitmessage B_WAIT_TIME_LONG return BattleScript_WrapTurnDmg:: playanimation BS_ATTACKER, B_ANIM_TURN_TRAP, sB_ANIM_ARG1 printstring STRINGID_PKMNHURTBY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoTurnDmg BattleScript_WrapEnds:: printstring STRINGID_PKMNFREEDFROM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveUsedIsInLove:: printstring STRINGID_PKMNINLOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_INFATUATION return BattleScript_MoveUsedIsInLoveCantAttack:: printstring STRINGID_PKMNIMMOBILIZEDBYLOVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_NightmareTurnDmg:: printstring STRINGID_PKMNLOCKEDINNIGHTMARE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_NIGHTMARE goto BattleScript_DoTurnDmg BattleScript_CurseTurnDmg:: printstring STRINGID_PKMNAFFLICTEDBYCURSE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG status2animation BS_ATTACKER, STATUS2_CURSED goto BattleScript_DoTurnDmg BattleScript_TargetPRLZHeal:: printstring STRINGID_PKMNHEALEDPARALYSIS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_TARGET return BattleScript_TooScaredToMove:: printstring STRINGID_MONTOOSCAREDTOMOVE - waitmessage 0x40 - playanimation BS_ATTACKER, B_ANIM_MON_SCARED, NULL + waitmessage B_WAIT_TIME_LONG + playanimation BS_ATTACKER, B_ANIM_MON_SCARED goto BattleScript_MoveEnd BattleScript_GhostGetOutGetOut:: printstring STRINGID_GHOSTGETOUTGETOUT - playanimation BS_ATTACKER, B_ANIM_GHOST_GET_OUT, NULL + playanimation BS_ATTACKER, B_ANIM_GHOST_GET_OUT goto BattleScript_MoveEnd BattleScript_SilphScopeUnveiled:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_SILPHSCOPEUNVEILED waitstate - playanimation BS_OPPONENT1, B_ANIM_SILPH_SCOPED, NULL - pause 0x20 + playanimation BS_OPPONENT1, B_ANIM_SILPH_SCOPED + pause B_WAIT_TIME_SHORT printstring STRINGID_GHOSTWASMAROWAK - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end2 BattleScript_MoveEffectSleep:: statusanimation BS_EFFECT_BATTLER printfromtable gFellAsleepStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_UpdateEffectStatusIconRet:: updatestatusicon BS_EFFECT_BATTLER waitstate @@ -3857,7 +3839,7 @@ BattleScript_UpdateEffectStatusIconRet:: BattleScript_YawnMakesAsleep:: statusanimation BS_EFFECT_BATTLER printstring STRINGID_PKMNFELLASLEEP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_EFFECT_BATTLER waitstate makevisible BS_EFFECT_BATTLER @@ -3866,52 +3848,52 @@ BattleScript_YawnMakesAsleep:: BattleScript_MoveEffectPoison:: statusanimation BS_EFFECT_BATTLER printfromtable gGotPoisonedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectBurn:: statusanimation BS_EFFECT_BATTLER printfromtable gGotBurnedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectFreeze:: statusanimation BS_EFFECT_BATTLER printfromtable gGotFrozenStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectParalysis:: statusanimation BS_EFFECT_BATTLER printfromtable gGotParalyzedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectUproar:: printstring STRINGID_PKMNCAUSEDUPROAR - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectToxic:: statusanimation BS_EFFECT_BATTLER printstring STRINGID_PKMNBADLYPOISONED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_UpdateEffectStatusIconRet BattleScript_MoveEffectPayDay:: printstring STRINGID_COINSSCATTERED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectWrap:: printfromtable gWrappedStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectConfusion:: - chosenstatusanimation BS_EFFECT_BATTLER, 1, STATUS2_CONFUSION + chosenstatus2animation BS_EFFECT_BATTLER, STATUS2_CONFUSION printstring STRINGID_PKMNWASCONFUSED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_MoveEffectRecoil:: @@ -3922,60 +3904,60 @@ BattleScript_DoRecoil:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHITWITHRECOIL - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER BattleScript_RecoilEnd:: return BattleScript_ItemSteal:: - playanimation BS_TARGET, B_ANIM_ITEM_STEAL, NULL + playanimation BS_TARGET, B_ANIM_ITEM_STEAL printstring STRINGID_PKMNSTOLEITEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_DrizzleActivates:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNMADEITRAIN waitstate - playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES, NULL - call BattleScript_HandleWeatherFormChanges + playanimation BS_BATTLER_0, B_ANIM_RAIN_CONTINUES + call BattleScript_WeatherFormChanges end3 BattleScript_SpeedBoostActivates:: playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNRAISEDSPEED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end3 BattleScript_TraceActivates:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNTRACED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG end3 BattleScript_RainDishActivates:: printstring STRINGID_PKMNSXRESTOREDHPALITTLE2 - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER end3 BattleScript_SandstreamActivates:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXWHIPPEDUPSANDSTORM waitstate - playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL - call BattleScript_HandleWeatherFormChanges + playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES + call BattleScript_WeatherFormChanges end3 BattleScript_ShedSkinActivates:: printstring STRINGID_PKMNSXCUREDYPROBLEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER end3 -BattleScript_HandleWeatherFormChanges:: +BattleScript_WeatherFormChanges:: setbyte sBATTLER, 0 BattleScript_WeatherFormChangesLoop:: trycastformdatachange @@ -3991,7 +3973,7 @@ BattleScript_DoCastformChangeAnim:: docastformchangeanimation waitstate printstring STRINGID_PKMNTRANSFORMED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_IntimidateActivatesEnd3:: @@ -3999,7 +3981,7 @@ BattleScript_IntimidateActivatesEnd3:: end3 BattleScript_DoIntimidateActivationAnim:: - pause 0x20 + pause B_WAIT_TIME_SHORT BattleScript_IntimidateActivates:: setbyte gBattlerTarget, 0 setstatchanger STAT_ATK, 1, TRUE @@ -4014,7 +3996,7 @@ BattleScript_IntimidateActivationAnimLoop:: setgraphicalstatchangevalues playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printstring STRINGID_PKMNCUTSATTACKWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG BattleScript_IntimidateFail:: addbyte gBattlerTarget, 1 goto BattleScript_IntimidateActivationAnimLoop @@ -4023,49 +4005,49 @@ BattleScript_IntimidateEnd:: return BattleScript_IntimidateAbilityFail:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PREVENTEDFROMWORKING - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_IntimidateFail BattleScript_DroughtActivates:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXINTENSIFIEDSUN waitstate - playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES, NULL - call BattleScript_HandleWeatherFormChanges + playanimation BS_BATTLER_0, B_ANIM_SUN_CONTINUES + call BattleScript_WeatherFormChanges end3 BattleScript_TookAttack:: attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXTOOKATTACK - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_ATTACKSTRING_PRINTED return BattleScript_SturdyPreventsOHKO:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPROTECTEDBY - pause 0x40 + pause B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_DampStopsExplosion:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSUSAGE - pause 0x40 + pause B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_MoveHPDrain_PPLoss:: ppreduce BattleScript_MoveHPDrain:: attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_TARGET datahpupdate BS_TARGET printstring STRINGID_PKMNRESTOREDHPUSING - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE goto BattleScript_MoveEnd @@ -4073,9 +4055,9 @@ BattleScript_MonMadeMoveUseless_PPLoss:: ppreduce BattleScript_MonMadeMoveUseless:: attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEYUSELESS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orbyte gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE goto BattleScript_MoveEnd @@ -4083,83 +4065,83 @@ BattleScript_FlashFireBoost_PPLoss:: ppreduce BattleScript_FlashFireBoost:: attackstring - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gFlashFireStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityPreventsPhasingOut:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNANCHORSITSELFWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityNoStatLoss:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSSTATLOSSWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_BRNPrevention:: - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gBRNPreventionStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_PRLZPrevention:: - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gPRLZPreventionStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_PSNPrevention:: - pause 0x20 + pause B_WAIT_TIME_SHORT printfromtable gPSNPreventionStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_ObliviousPreventsAttraction:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSROMANCEWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_FlinchPrevention:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXPREVENTSFLINCHING - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_OwnTempoPrevents:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNPREVENTSCONFUSIONWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_SoundproofProtected:: attackstring ppreduce - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXBLOCKSY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_AbilityNoSpecificStatLoss:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXPREVENTSYLOSS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setbyte cMULTISTRING_CHOOSER, 3 return BattleScript_StickyHoldActivates:: - pause 0x20 + pause B_WAIT_TIME_SHORT printstring STRINGID_PKMNSXMADEYINEFFECTIVE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_MoveEnd BattleScript_ColorChangeActivates:: printstring STRINGID_PKMNCHANGEDTYPEWITH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_RoughSkinActivates:: @@ -4167,14 +4149,14 @@ BattleScript_RoughSkinActivates:: healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNHURTSWITH - waitmessage 0x40 - tryfaintmon BS_ATTACKER, 0, NULL + waitmessage B_WAIT_TIME_LONG + tryfaintmon BS_ATTACKER return BattleScript_CuteCharmActivates:: status2animation BS_ATTACKER, STATUS2_INFATUATION printstring STRINGID_PKMNSXINFATUATEDY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_ApplySecondaryEffect:: @@ -4189,41 +4171,41 @@ BattleScript_SynchronizeActivates:: BattleScript_AbilityCuredStatus:: printstring STRINGID_PKMNSXCUREDITSYPROBLEM - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING return BattleScript_IgnoresWhileAsleep:: printstring STRINGID_PKMNIGNORESASLEEP - waitmessage 0x40 - moveendto 16 + waitmessage B_WAIT_TIME_LONG + moveendto MOVEEND_NEXT_TARGET end BattleScript_IgnoresAndUsesRandomMove:: printstring STRINGID_PKMNIGNOREDORDERS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG jumptocalledmove 0 BattleScript_MoveUsedLoafingAround:: printfromtable gInobedientStringIds - waitmessage 0x40 - moveendto 16 + waitmessage B_WAIT_TIME_LONG + moveendto MOVEEND_NEXT_TARGET end BattleScript_IgnoresAndFallsAsleep:: printstring STRINGID_PKMNBEGANTONAP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setmoveeffect MOVE_EFFECT_SLEEP | MOVE_EFFECT_AFFECTS_USER seteffectprimary - moveendto 16 + moveendto MOVEEND_NEXT_TARGET end BattleScript_IgnoresAndHitsItself:: printstring STRINGID_PKMNWONTOBEY - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG goto BattleScript_DoSelfConfusionDmg BattleScript_SubstituteFade:: - playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE, NULL + playanimation BS_TARGET, B_ANIM_SUBSTITUTE_FADE printstring STRINGID_PKMNSUBSTITUTEFADED return @@ -4232,9 +4214,9 @@ BattleScript_BerryCurePrlzEnd2:: end2 BattleScript_BerryCureParRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMCUREDPARALYSIS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4244,9 +4226,9 @@ BattleScript_BerryCurePsnEnd2:: end2 BattleScript_BerryCurePsnRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMCUREDPOISON - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4256,9 +4238,9 @@ BattleScript_BerryCureBrnEnd2:: end2 BattleScript_BerryCureBrnRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMHEALEDBURN - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4268,9 +4250,9 @@ BattleScript_BerryCureFrzEnd2:: end2 BattleScript_BerryCureFrzRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMDEFROSTEDIT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4280,9 +4262,9 @@ BattleScript_BerryCureSlpEnd2:: end2 BattleScript_BerryCureSlpRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMWOKEIT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4292,9 +4274,9 @@ BattleScript_BerryCureConfusionEnd2:: end2 BattleScript_BerryCureConfusionRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMSNAPPEDOUT - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING return @@ -4303,9 +4285,9 @@ BattleScript_BerryCureChosenStatusEnd2:: end2 BattleScript_BerryCureChosenStatusRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printfromtable gBerryEffectStringIds - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_SCRIPTING removeitem BS_SCRIPTING return @@ -4315,16 +4297,16 @@ BattleScript_WhiteHerbEnd2:: end2 BattleScript_WhiteHerbRet:: - playanimation BS_SCRIPTING, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDSTATUS - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG removeitem BS_SCRIPTING return BattleScript_ItemHealHP_RemoveItem:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -4332,9 +4314,9 @@ BattleScript_ItemHealHP_RemoveItem:: end2 BattleScript_BerryPPHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDPP - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER end2 @@ -4343,9 +4325,9 @@ BattleScript_ItemHealHP_End2:: end2 BattleScript_ItemHealHP_Ret:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER @@ -4356,38 +4338,38 @@ BattleScript_SelectingNotAllowedMoveChoiceItem:: endselectionscript BattleScript_FocusBandActivates:: - playanimation BS_TARGET, B_ANIM_HANGED_ON, NULL + playanimation BS_TARGET, B_ANIM_FOCUS_BAND printstring STRINGID_PKMNHUNGONWITHX - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG return BattleScript_BerryConfuseHealEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_FORXCOMMAYZ - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG setmoveeffect MOVE_EFFECT_CONFUSION | MOVE_EFFECT_AFFECTS_USER seteffectprimary removeitem BS_ATTACKER end2 BattleScript_BerryStatRaiseEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL - statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BerryStatRaiseDoStatUp + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp BattleScript_BerryStatRaiseDoStatUp:: - setbyte cMULTISTRING_CHOOSER, 4 + setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM call BattleScript_StatUp removeitem BS_ATTACKER end2 BattleScript_BerryFocusEnergyEnd2:: - playanimation BS_ATTACKER, B_ANIM_ITEM_EFFECT, NULL + playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT printstring STRINGID_PKMNUSEDXTOGETPUMPED - waitmessage 0x40 + waitmessage B_WAIT_TIME_LONG removeitem BS_ATTACKER end2 diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index 3794f2f7a..7a69b2320 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -87,7 +87,7 @@ BattleScript_CaughtPokemonSkipNewDex:: trygivecaughtmonnick BattleScript_CaughtPokemonSkipNickname givecaughtmon printfromtable gCaughtMonStringIds - waitmessage 64 + waitmessage B_WAIT_TIME_LONG goto BattleScript_CaughtPokemonDone BattleScript_CaughtPokemonSkipNickname:: @@ -104,27 +104,27 @@ BattleScript_OldMan_Pokedude_CaughtMessage:: BattleScript_ShakeBallThrow:: printfromtable gBallEscapeStringIds - waitmessage 64 + waitmessage B_WAIT_TIME_LONG jumpifnotbattletype BATTLE_TYPE_SAFARI, BattleScript_CatchFailEnd jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0, BattleScript_CatchFailEnd printstring STRINGID_OUTOFSAFARIBALLS - waitmessage 64 + waitmessage B_WAIT_TIME_LONG setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS BattleScript_CatchFailEnd:: finishaction BattleScript_TrainerBallBlock:: - waitmessage 64 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_TRAINERBLOCKEDBALL - waitmessage 64 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_DONTBEATHIEF - waitmessage 64 + waitmessage B_WAIT_TIME_LONG finishaction BattleScript_GhostBallDodge:: - waitmessage 64 + waitmessage B_WAIT_TIME_LONG printstring STRINGID_ITDODGEDBALL - waitmessage 64 + waitmessage B_WAIT_TIME_LONG finishaction BattleScript_PlayerUseItem:: @@ -133,54 +133,54 @@ BattleScript_PlayerUseItem:: BattleScript_AIUseFullRestoreOrHpHeal:: printstring STRINGID_EMPTYSTRING3 - pause 48 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 64 + waitmessage B_WAIT_TIME_LONG useitemonopponent orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE healthbarupdate BS_ATTACKER datahpupdate BS_ATTACKER printstring STRINGID_PKMNSITEMRESTOREDHEALTH - waitmessage 64 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER moveendcase 15 finishaction BattleScript_AIUseStatRestore:: printstring STRINGID_EMPTYSTRING3 - pause 48 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 64 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gTrainerItemCuredStatusStringIds - waitmessage 64 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_ATTACKER moveendcase 15 finishaction BattleScript_AIUseXstat:: printstring STRINGID_EMPTYSTRING3 - pause 48 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 64 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gStatUpStringIds - waitmessage 64 + waitmessage B_WAIT_TIME_LONG moveendcase 15 finishaction BattleScript_AIUseGuardSpec:: printstring STRINGID_EMPTYSTRING3 - pause 48 + pause B_WAIT_TIME_MED playse SE_USE_ITEM printstring STRINGID_TRAINER1USEDITEM - waitmessage 64 + waitmessage B_WAIT_TIME_LONG useitemonopponent printfromtable gMistUsedStringIds - waitmessage 64 + waitmessage B_WAIT_TIME_LONG moveendcase 15 finishaction @@ -193,16 +193,16 @@ BattleScript_UsePokeFlute:: checkpokeflute BS_ATTACKER jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 1, BattleScript_PokeFluteWakeUp printstring STRINGID_POKEFLUTECATCHY - waitmessage 64 + waitmessage B_WAIT_TIME_LONG goto BattleScript_PokeFluteEnd BattleScript_PokeFluteWakeUp:: printstring STRINGID_POKEFLUTE - waitmessage 64 + waitmessage B_WAIT_TIME_LONG fanfare MUS_POKE_FLUTE waitfanfare BS_ATTACKER printstring STRINGID_MONHEARINGFLUTEAWOKE - waitmessage 64 + waitmessage B_WAIT_TIME_LONG updatestatusicon BS_PLAYER2 waitstate BattleScript_PokeFluteEnd:: @@ -210,29 +210,29 @@ BattleScript_PokeFluteEnd:: BattleScript_WatchesCarefully:: printfromtable gSafariPokeblockResultStringIds - waitmessage 64 - playanimation BS_OPPONENT1, B_ANIM_SAFARI_REACTION, NULL + waitmessage B_WAIT_TIME_LONG + playanimation BS_OPPONENT1, B_ANIM_SAFARI_REACTION end2 BattleScript_ThrowRock:: printstring STRINGID_THREWROCK - waitmessage 64 - playanimation BS_ATTACKER, B_ANIM_ROCK_THROW, NULL + waitmessage B_WAIT_TIME_LONG + playanimation BS_ATTACKER, B_ANIM_ROCK_THROW end2 BattleScript_ThrowBait:: printstring STRINGID_THREWBAIT - waitmessage 64 - playanimation BS_ATTACKER, B_ANIM_BAIT_THROW, NULL + waitmessage B_WAIT_TIME_LONG + playanimation BS_ATTACKER, B_ANIM_BAIT_THROW end2 BattleScript_LeftoverWallyPrepToThrow:: printstring STRINGID_RETURNMON - waitmessage 64 + waitmessage B_WAIT_TIME_LONG returnatktoball waitstate trainerslidein BS_TARGET waitstate printstring STRINGID_YOUTHROWABALLNOWRIGHT - waitmessage 64 + waitmessage B_WAIT_TIME_LONG end2 diff --git a/include/battle_string_ids.h b/include/battle_string_ids.h index 76b0194fe..69086a626 100644 --- a/include/battle_string_ids.h +++ b/include/battle_string_ids.h @@ -121,7 +121,7 @@ #define STRINGID_PKMNSTORINGENERGY 120 #define STRINGID_PKMNUNLEASHEDENERGY 121 #define STRINGID_PKMNFATIGUECONFUSION 122 -#define STRINGID_PKMNPICKEDUPITEM 123 +#define STRINGID_PLAYERPICKEDUPMONEY 123 #define STRINGID_PKMNUNAFFECTED 124 #define STRINGID_PKMNTRANSFORMEDINTO 125 #define STRINGID_PKMNMADESUBSTITUTE 126 diff --git a/include/constants/battle.h b/include/constants/battle.h index 822675837..0b4c372a2 100644 --- a/include/constants/battle.h +++ b/include/constants/battle.h @@ -305,6 +305,10 @@ #define BATTLE_TERRAIN_LANCE 18 #define BATTLE_TERRAIN_CHAMPION 19 +#define B_WAIT_TIME_LONG 64 +#define B_WAIT_TIME_MED 48 +#define B_WAIT_TIME_SHORT 32 + #define CASTFORM_NORMAL 0 #define CASTFORM_FIRE 1 #define CASTFORM_WATER 2 diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index f8972ce31..1e946dd1a 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -354,9 +354,9 @@ #define B_ANIM_BAIT_THROW 0x4 #define B_ANIM_ITEM_KNOCKOFF 0x5 #define B_ANIM_TURN_TRAP 0x6 -#define B_ANIM_ITEM_EFFECT 0x7 +#define B_ANIM_HELD_ITEM_EFFECT 0x7 #define B_ANIM_SMOKEBALL_ESCAPE 0x8 -#define B_ANIM_HANGED_ON 0x9 +#define B_ANIM_FOCUS_BAND 0x9 #define B_ANIM_RAIN_CONTINUES 0xA #define B_ANIM_SUN_CONTINUES 0xB #define B_ANIM_SANDSTORM_CONTINUES 0xC diff --git a/src/battle_message.c b/src/battle_message.c index 436136069..12369f063 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -514,380 +514,380 @@ const u8 gText_WinEarnsPrizeMoney[] = _("OAK: Hm! Excellent!\pIf you win, you ea const u8 gText_HowDissapointing[] = _("OAK: Hm…\nHow disappointing…\pIf you win, you earn prize money,\nand your POKéMON grow.\pBut if you lose, {B_PLAYER_NAME}, you end\nup paying prize money…\pHowever, since you had no warning\nthis time, I'll pay for you.\pBut things won't be this way once\nyou step outside these doors.\pThat's why you must strengthen your\nPOKéMON by battling wild POKéMON.\p"); const u8 *const gBattleStringsTable[] = { - [STRINGID_TRAINER1LOSETEXT - 12] = sText_Trainer1LoseText, - [STRINGID_PKMNGAINEDEXP - 12] = sText_PkmnGainedEXP, - [STRINGID_PKMNGREWTOLV - 12] = sText_PkmnGrewToLv, - [STRINGID_PKMNLEARNEDMOVE - 12] = sText_PkmnLearnedMove, - [STRINGID_TRYTOLEARNMOVE1 - 12] = sText_TryToLearnMove1, - [STRINGID_TRYTOLEARNMOVE2 - 12] = sText_TryToLearnMove2, - [STRINGID_TRYTOLEARNMOVE3 - 12] = sText_TryToLearnMove3, - [STRINGID_PKMNFORGOTMOVE - 12] = sText_PkmnForgotMove, - [STRINGID_STOPLEARNINGMOVE - 12] = sText_StopLearningMove, - [STRINGID_DIDNOTLEARNMOVE - 12] = sText_DidNotLearnMove, - [STRINGID_PKMNLEARNEDMOVE2 - 12] = sText_PkmnLearnedMove2, - [STRINGID_ATTACKMISSED - 12] = sText_AttackMissed, - [STRINGID_PKMNPROTECTEDITSELF - 12] = sText_PkmnProtectedItself, - [STRINGID_STATSWONTINCREASE2 - 12] = sText_StatsWontIncrease2, - [STRINGID_AVOIDEDDAMAGE - 12] = sText_AvoidedDamage, - [STRINGID_ITDOESNTAFFECT - 12] = sText_ItDoesntAffect, - [STRINGID_ATTACKERFAINTED - 12] = sText_AttackerFainted, - [STRINGID_TARGETFAINTED - 12] = sText_TargetFainted, - [STRINGID_PLAYERGOTMONEY - 12] = sText_PlayerGotMoney, - [STRINGID_PLAYERWHITEOUT - 12] = sText_PlayerWhiteout, - [STRINGID_PLAYERWHITEOUT2 - 12] = sText_PlayerPanicked, - [STRINGID_PREVENTSESCAPE - 12] = sText_PreventsEscape, - [STRINGID_HITXTIMES - 12] = sText_HitXTimes, - [STRINGID_PKMNFELLASLEEP - 12] = sText_PkmnFellAsleep, - [STRINGID_PKMNMADESLEEP - 12] = sText_PkmnMadeSleep, - [STRINGID_PKMNALREADYASLEEP - 12] = sText_PkmnAlreadyAsleep, - [STRINGID_PKMNALREADYASLEEP2 - 12] = sText_PkmnAlreadyAsleep2, - [STRINGID_PKMNWASNTAFFECTED - 12] = sText_PkmnWasntAffected, - [STRINGID_PKMNWASPOISONED - 12] = sText_PkmnWasPoisoned, - [STRINGID_PKMNPOISONEDBY - 12] = sText_PkmnPoisonedBy, - [STRINGID_PKMNHURTBYPOISON - 12] = sText_PkmnHurtByPoison, - [STRINGID_PKMNALREADYPOISONED - 12] = sText_PkmnAlreadyPoisoned, - [STRINGID_PKMNBADLYPOISONED - 12] = sText_PkmnBadlyPoisoned, - [STRINGID_PKMNENERGYDRAINED - 12] = sText_PkmnEnergyDrained, - [STRINGID_PKMNWASBURNED - 12] = sText_PkmnWasBurned, - [STRINGID_PKMNBURNEDBY - 12] = sText_PkmnBurnedBy, - [STRINGID_PKMNHURTBYBURN - 12] = sText_PkmnHurtByBurn, - [STRINGID_PKMNWASFROZEN - 12] = sText_PkmnWasFrozen, - [STRINGID_PKMNFROZENBY - 12] = sText_PkmnFrozenBy, - [STRINGID_PKMNISFROZEN - 12] = sText_PkmnIsFrozen, - [STRINGID_PKMNWASDEFROSTED - 12] = sText_PkmnWasDefrosted, - [STRINGID_PKMNWASDEFROSTED2 - 12] = sText_PkmnWasDefrosted2, - [STRINGID_PKMNWASDEFROSTEDBY - 12] = sText_PkmnWasDefrostedBy, - [STRINGID_PKMNWASPARALYZED - 12] = sText_PkmnWasParalyzed, - [STRINGID_PKMNWASPARALYZEDBY - 12] = sText_PkmnWasParalyzedBy, - [STRINGID_PKMNISPARALYZED - 12] = sText_PkmnIsParalyzed, - [STRINGID_PKMNISALREADYPARALYZED - 12] = sText_PkmnIsAlreadyParalyzed, - [STRINGID_PKMNHEALEDPARALYSIS - 12] = sText_PkmnHealedParalysis, - [STRINGID_PKMNDREAMEATEN - 12] = sText_PkmnDreamEaten, - [STRINGID_STATSWONTINCREASE - 12] = sText_StatsWontIncrease, - [STRINGID_STATSWONTDECREASE - 12] = sText_StatsWontDecrease, - [STRINGID_TEAMSTOPPEDWORKING - 12] = sText_TeamStoppedWorking, - [STRINGID_FOESTOPPEDWORKING - 12] = sText_FoeStoppedWorking, - [STRINGID_PKMNISCONFUSED - 12] = sText_PkmnIsConfused, - [STRINGID_PKMNHEALEDCONFUSION - 12] = sText_PkmnHealedConfusion, - [STRINGID_PKMNWASCONFUSED - 12] = sText_PkmnWasConfused, - [STRINGID_PKMNALREADYCONFUSED - 12] = sText_PkmnAlreadyConfused, - [STRINGID_PKMNFELLINLOVE - 12] = sText_PkmnFellInLove, - [STRINGID_PKMNINLOVE - 12] = sText_PkmnInLove, - [STRINGID_PKMNIMMOBILIZEDBYLOVE - 12] = sText_PkmnImmobilizedByLove, - [STRINGID_PKMNBLOWNAWAY - 12] = sText_PkmnBlownAway, - [STRINGID_PKMNCHANGEDTYPE - 12] = sText_PkmnChangedType, - [STRINGID_PKMNFLINCHED - 12] = sText_PkmnFlinched, - [STRINGID_PKMNREGAINEDHEALTH - 12] = sText_PkmnRegainedHealth, - [STRINGID_PKMNHPFULL - 12] = sText_PkmnHPFull, - [STRINGID_PKMNRAISEDSPDEF - 12] = sText_PkmnRaisedSpDef, - [STRINGID_PKMNRAISEDDEF - 12] = sText_PkmnRaisedDef, - [STRINGID_PKMNCOVEREDBYVEIL - 12] = sText_PkmnCoveredByVeil, - [STRINGID_PKMNUSEDSAFEGUARD - 12] = sText_PkmnUsedSafeguard, - [STRINGID_PKMNSAFEGUARDEXPIRED - 12] = sText_PkmnSafeguardExpired, - [STRINGID_PKMNWENTTOSLEEP - 12] = sText_PkmnWentToSleep, - [STRINGID_PKMNSLEPTHEALTHY - 12] = sText_PkmnSleptHealthy, - [STRINGID_PKMNWHIPPEDWHIRLWIND - 12] = sText_PkmnWhippedWhirlwind, - [STRINGID_PKMNTOOKSUNLIGHT - 12] = sText_PkmnTookSunlight, - [STRINGID_PKMNLOWEREDHEAD - 12] = sText_PkmnLoweredHead, - [STRINGID_PKMNISGLOWING - 12] = sText_PkmnIsGlowing, - [STRINGID_PKMNFLEWHIGH - 12] = sText_PkmnFlewHigh, - [STRINGID_PKMNDUGHOLE - 12] = sText_PkmnDugHole, - [STRINGID_PKMNSQUEEZEDBYBIND - 12] = sText_PkmnSqueezedByBind, - [STRINGID_PKMNTRAPPEDINVORTEX - 12] = sText_PkmnTrappedInVortex, - [STRINGID_PKMNWRAPPEDBY - 12] = sText_PkmnWrappedBy, - [STRINGID_PKMNCLAMPED - 12] = sText_PkmnClamped, - [STRINGID_PKMNHURTBY - 12] = sText_PkmnHurtBy, - [STRINGID_PKMNFREEDFROM - 12] = sText_PkmnFreedFrom, - [STRINGID_PKMNCRASHED - 12] = sText_PkmnCrashed, - [STRINGID_PKMNSHROUDEDINMIST - 12] = gBattleText_MistShroud, - [STRINGID_PKMNPROTECTEDBYMIST - 12] = sText_PkmnProtectedByMist, - [STRINGID_PKMNGETTINGPUMPED - 12] = gBattleText_GetPumped, - [STRINGID_PKMNHITWITHRECOIL - 12] = sText_PkmnHitWithRecoil, - [STRINGID_PKMNPROTECTEDITSELF2 - 12] = sText_PkmnProtectedItself2, - [STRINGID_PKMNBUFFETEDBYSANDSTORM - 12] = sText_PkmnBuffetedBySandstorm, - [STRINGID_PKMNPELTEDBYHAIL - 12] = sText_PkmnPeltedByHail, - [STRINGID_PKMNSEEDED - 12] = sText_PkmnSeeded, - [STRINGID_PKMNEVADEDATTACK - 12] = sText_PkmnEvadedAttack, - [STRINGID_PKMNSAPPEDBYLEECHSEED - 12] = sText_PkmnSappedByLeechSeed, - [STRINGID_PKMNFASTASLEEP - 12] = sText_PkmnFastAsleep, - [STRINGID_PKMNWOKEUP - 12] = sText_PkmnWokeUp, - [STRINGID_PKMNUPROARKEPTAWAKE - 12] = sText_PkmnUproarKeptAwake, - [STRINGID_PKMNWOKEUPINUPROAR - 12] = sText_PkmnWokeUpInUproar, - [STRINGID_PKMNCAUSEDUPROAR - 12] = sText_PkmnCausedUproar, - [STRINGID_PKMNMAKINGUPROAR - 12] = sText_PkmnMakingUproar, - [STRINGID_PKMNCALMEDDOWN - 12] = sText_PkmnCalmedDown, - [STRINGID_PKMNCANTSLEEPINUPROAR - 12] = sText_PkmnCantSleepInUproar, - [STRINGID_PKMNSTOCKPILED - 12] = sText_PkmnStockpiled, - [STRINGID_PKMNCANTSTOCKPILE - 12] = sText_PkmnCantStockpile, - [STRINGID_PKMNCANTSLEEPINUPROAR2 - 12] = sText_PkmnCantSleepInUproar2, - [STRINGID_UPROARKEPTPKMNAWAKE - 12] = sText_UproarKeptPkmnAwake, - [STRINGID_PKMNSTAYEDAWAKEUSING - 12] = sText_PkmnStayedAwakeUsing, - [STRINGID_PKMNSTORINGENERGY - 12] = sText_PkmnStoringEnergy, - [STRINGID_PKMNUNLEASHEDENERGY - 12] = sText_PkmnUnleashedEnergy, - [STRINGID_PKMNFATIGUECONFUSION - 12] = sText_PkmnFatigueConfusion, - [STRINGID_PKMNPICKEDUPITEM - 12] = sText_PkmnPickedUpItem, - [STRINGID_PKMNUNAFFECTED - 12] = sText_PkmnUnaffected, - [STRINGID_PKMNTRANSFORMEDINTO - 12] = sText_PkmnTransformedInto, - [STRINGID_PKMNMADESUBSTITUTE - 12] = sText_PkmnMadeSubstitute, - [STRINGID_PKMNHASSUBSTITUTE - 12] = sText_PkmnHasSubstitute, - [STRINGID_SUBSTITUTEDAMAGED - 12] = sText_SubstituteDamaged, - [STRINGID_PKMNSUBSTITUTEFADED - 12] = sText_PkmnSubstituteFaded, - [STRINGID_PKMNMUSTRECHARGE - 12] = sText_PkmnMustRecharge, - [STRINGID_PKMNRAGEBUILDING - 12] = sText_PkmnRageBuilding, - [STRINGID_PKMNMOVEWASDISABLED - 12] = sText_PkmnMoveWasDisabled, - [STRINGID_PKMNMOVEISDISABLED - 12] = sText_PkmnMoveIsDisabled, - [STRINGID_PKMNMOVEDISABLEDNOMORE - 12] = sText_PkmnMoveDisabledNoMore, - [STRINGID_PKMNGOTENCORE - 12] = sText_PkmnGotEncore, - [STRINGID_PKMNENCOREENDED - 12] = sText_PkmnEncoreEnded, - [STRINGID_PKMNTOOKAIM - 12] = sText_PkmnTookAim, - [STRINGID_PKMNSKETCHEDMOVE - 12] = sText_PkmnSketchedMove, - [STRINGID_PKMNTRYINGTOTAKEFOE - 12] = sText_PkmnTryingToTakeFoe, - [STRINGID_PKMNTOOKFOE - 12] = sText_PkmnTookFoe, - [STRINGID_PKMNREDUCEDPP - 12] = sText_PkmnReducedPP, - [STRINGID_PKMNSTOLEITEM - 12] = sText_PkmnStoleItem, - [STRINGID_TARGETCANTESCAPENOW - 12] = sText_TargetCantEscapeNow, - [STRINGID_PKMNFELLINTONIGHTMARE - 12] = sText_PkmnFellIntoNightmare, - [STRINGID_PKMNLOCKEDINNIGHTMARE - 12] = sText_PkmnLockedInNightmare, - [STRINGID_PKMNLAIDCURSE - 12] = sText_PkmnLaidCurse, - [STRINGID_PKMNAFFLICTEDBYCURSE - 12] = sText_PkmnAfflictedByCurse, - [STRINGID_SPIKESSCATTERED - 12] = sText_SpikesScattered, - [STRINGID_PKMNHURTBYSPIKES - 12] = sText_PkmnHurtBySpikes, - [STRINGID_PKMNIDENTIFIED - 12] = sText_PkmnIdentified, - [STRINGID_PKMNPERISHCOUNTFELL - 12] = sText_PkmnPerishCountFell, - [STRINGID_PKMNBRACEDITSELF - 12] = sText_PkmnBracedItself, - [STRINGID_PKMNENDUREDHIT - 12] = sText_PkmnEnduredHit, - [STRINGID_MAGNITUDESTRENGTH - 12] = sText_MagnitudeStrength, - [STRINGID_PKMNCUTHPMAXEDATTACK - 12] = sText_PkmnCutHPMaxedAttack, - [STRINGID_PKMNCOPIEDSTATCHANGES - 12] = sText_PkmnCopiedStatChanges, - [STRINGID_PKMNGOTFREE - 12] = sText_PkmnGotFree, - [STRINGID_PKMNSHEDLEECHSEED - 12] = sText_PkmnShedLeechSeed, - [STRINGID_PKMNBLEWAWAYSPIKES - 12] = sText_PkmnBlewAwaySpikes, - [STRINGID_PKMNFLEDFROMBATTLE - 12] = sText_PkmnFledFromBattle, - [STRINGID_PKMNFORESAWATTACK - 12] = sText_PkmnForesawAttack, - [STRINGID_PKMNTOOKATTACK - 12] = sText_PkmnTookAttack, - [STRINGID_PKMNATTACK - 12] = sText_PkmnAttack, - [STRINGID_PKMNCENTERATTENTION - 12] = sText_PkmnCenterAttention, - [STRINGID_PKMNCHARGINGPOWER - 12] = sText_PkmnChargingPower, - [STRINGID_NATUREPOWERTURNEDINTO - 12] = sText_NaturePowerTurnedInto, - [STRINGID_PKMNSTATUSNORMAL - 12] = sText_PkmnStatusNormal, - [STRINGID_PKMNHASNOMOVESLEFT - 12] = sText_PkmnHasNoMovesLeft, - [STRINGID_PKMNSUBJECTEDTOTORMENT - 12] = sText_PkmnSubjectedToTorment, - [STRINGID_PKMNCANTUSEMOVETORMENT - 12] = sText_PkmnCantUseMoveTorment, - [STRINGID_PKMNTIGHTENINGFOCUS - 12] = sText_PkmnTighteningFocus, - [STRINGID_PKMNFELLFORTAUNT - 12] = sText_PkmnFellForTaunt, - [STRINGID_PKMNCANTUSEMOVETAUNT - 12] = sText_PkmnCantUseMoveTaunt, - [STRINGID_PKMNREADYTOHELP - 12] = sText_PkmnReadyToHelp, - [STRINGID_PKMNSWITCHEDITEMS - 12] = sText_PkmnSwitchedItems, - [STRINGID_PKMNCOPIEDFOE - 12] = sText_PkmnCopiedFoe, - [STRINGID_PKMNMADEWISH - 12] = sText_PkmnMadeWish, - [STRINGID_PKMNWISHCAMETRUE - 12] = sText_PkmnWishCameTrue, - [STRINGID_PKMNPLANTEDROOTS - 12] = sText_PkmnPlantedRoots, - [STRINGID_PKMNABSORBEDNUTRIENTS - 12] = sText_PkmnAbsorbedNutrients, - [STRINGID_PKMNANCHOREDITSELF - 12] = sText_PkmnAnchoredItself, - [STRINGID_PKMNWASMADEDROWSY - 12] = sText_PkmnWasMadeDrowsy, - [STRINGID_PKMNKNOCKEDOFF - 12] = sText_PkmnKnockedOff, - [STRINGID_PKMNSWAPPEDABILITIES - 12] = sText_PkmnSwappedAbilities, - [STRINGID_PKMNSEALEDOPPONENTMOVE - 12] = sText_PkmnSealedOpponentMove, - [STRINGID_PKMNCANTUSEMOVESEALED - 12] = sText_PkmnCantUseMoveSealed, - [STRINGID_PKMNWANTSGRUDGE - 12] = sText_PkmnWantsGrudge, - [STRINGID_PKMNLOSTPPGRUDGE - 12] = sText_PkmnLostPPGrudge, - [STRINGID_PKMNSHROUDEDITSELF - 12] = sText_PkmnShroudedItself, - [STRINGID_PKMNMOVEBOUNCED - 12] = sText_PkmnMoveBounced, - [STRINGID_PKMNWAITSFORTARGET - 12] = sText_PkmnWaitsForTarget, - [STRINGID_PKMNSNATCHEDMOVE - 12] = sText_PkmnSnatchedMove, - [STRINGID_PKMNMADEITRAIN - 12] = sText_PkmnMadeItRain, - [STRINGID_PKMNRAISEDSPEED - 12] = sText_PkmnRaisedSpeed, - [STRINGID_PKMNPROTECTEDBY - 12] = sText_PkmnProtectedBy, - [STRINGID_PKMNPREVENTSUSAGE - 12] = sText_PkmnPreventsUsage, - [STRINGID_PKMNRESTOREDHPUSING - 12] = sText_PkmnRestoredHPUsing, - [STRINGID_PKMNCHANGEDTYPEWITH - 12] = sText_PkmnChangedTypeWith, - [STRINGID_PKMNPREVENTSPARALYSISWITH - 12] = sText_PkmnPreventsParalysisWith, - [STRINGID_PKMNPREVENTSROMANCEWITH - 12] = sText_PkmnPreventsRomanceWith, - [STRINGID_PKMNPREVENTSPOISONINGWITH - 12] = sText_PkmnPreventsPoisoningWith, - [STRINGID_PKMNPREVENTSCONFUSIONWITH - 12] = sText_PkmnPreventsConfusionWith, - [STRINGID_PKMNRAISEDFIREPOWERWITH - 12] = sText_PkmnRaisedFirePowerWith, - [STRINGID_PKMNANCHORSITSELFWITH - 12] = sText_PkmnAnchorsItselfWith, - [STRINGID_PKMNCUTSATTACKWITH - 12] = sText_PkmnCutsAttackWith, - [STRINGID_PKMNPREVENTSSTATLOSSWITH - 12] = sText_PkmnPreventsStatLossWith, - [STRINGID_PKMNHURTSWITH - 12] = sText_PkmnHurtsWith, - [STRINGID_PKMNTRACED - 12] = sText_PkmnTraced, - [STRINGID_STATSHARPLY - 12] = sText_StatSharply, - [STRINGID_STATROSE - 12] = gBattleText_Rose, - [STRINGID_STATHARSHLY - 12] = sText_StatHarshly, - [STRINGID_STATFELL - 12] = sText_StatFell, - [STRINGID_ATTACKERSSTATROSE - 12] = sText_AttackersStatRose, - [STRINGID_DEFENDERSSTATROSE - 12] = gText_DefendersStatRose, - [STRINGID_ATTACKERSSTATFELL - 12] = sText_AttackersStatFell, - [STRINGID_DEFENDERSSTATFELL - 12] = sText_DefendersStatFell, - [STRINGID_CRITICALHIT - 12] = sText_CriticalHit, - [STRINGID_ONEHITKO - 12] = sText_OneHitKO, - [STRINGID_123POOF - 12] = sText_123Poof, - [STRINGID_ANDELLIPSIS - 12] = sText_AndEllipsis, - [STRINGID_NOTVERYEFFECTIVE - 12] = sText_NotVeryEffective, - [STRINGID_SUPEREFFECTIVE - 12] = sText_SuperEffective, - [STRINGID_GOTAWAYSAFELY - 12] = sText_GotAwaySafely, - [STRINGID_WILDPKMNFLED - 12] = sText_WildPkmnFled, - [STRINGID_NORUNNINGFROMTRAINERS - 12] = sText_NoRunningFromTrainers, - [STRINGID_CANTESCAPE - 12] = sText_CantEscape, - [STRINGID_DONTLEAVEBIRCH - 12] = sText_EmptyString5, - [STRINGID_BUTNOTHINGHAPPENED - 12] = sText_ButNothingHappened, - [STRINGID_BUTITFAILED - 12] = sText_ButItFailed, - [STRINGID_ITHURTCONFUSION - 12] = sText_ItHurtConfusion, - [STRINGID_MIRRORMOVEFAILED - 12] = sText_MirrorMoveFailed, - [STRINGID_STARTEDTORAIN - 12] = sText_StartedToRain, - [STRINGID_DOWNPOURSTARTED - 12] = sText_DownpourStarted, - [STRINGID_RAINCONTINUES - 12] = sText_RainContinues, - [STRINGID_DOWNPOURCONTINUES - 12] = sText_DownpourContinues, - [STRINGID_RAINSTOPPED - 12] = sText_RainStopped, - [STRINGID_SANDSTORMBREWED - 12] = sText_SandstormBrewed, - [STRINGID_SANDSTORMRAGES - 12] = sText_SandstormRages, - [STRINGID_SANDSTORMSUBSIDED - 12] = sText_SandstormSubsided, - [STRINGID_SUNLIGHTGOTBRIGHT - 12] = sText_SunlightGotBright, - [STRINGID_SUNLIGHTSTRONG - 12] = sText_SunlightStrong, - [STRINGID_SUNLIGHTFADED - 12] = sText_SunlightFaded, - [STRINGID_STARTEDHAIL - 12] = sText_StartedHail, - [STRINGID_HAILCONTINUES - 12] = sText_HailContinues, - [STRINGID_HAILSTOPPED - 12] = sText_HailStopped, - [STRINGID_FAILEDTOSPITUP - 12] = sText_FailedToSpitUp, - [STRINGID_FAILEDTOSWALLOW - 12] = sText_FailedToSwallow, - [STRINGID_WINDBECAMEHEATWAVE - 12] = sText_WindBecameHeatWave, - [STRINGID_STATCHANGESGONE - 12] = sText_StatChangesGone, - [STRINGID_COINSSCATTERED - 12] = sText_CoinsScattered, - [STRINGID_TOOWEAKFORSUBSTITUTE - 12] = sText_TooWeakForSubstitute, - [STRINGID_SHAREDPAIN - 12] = sText_SharedPain, - [STRINGID_BELLCHIMED - 12] = sText_BellChimed, - [STRINGID_FAINTINTHREE - 12] = sText_FaintInThree, - [STRINGID_NOPPLEFT - 12] = sText_NoPPLeft, - [STRINGID_BUTNOPPLEFT - 12] = sText_ButNoPPLeft, - [STRINGID_PLAYERUSEDITEM - 12] = sText_PlayerUsedItem, - [STRINGID_OLDMANUSEDITEM - 12] = sText_OldManUsedItem, - [STRINGID_TRAINERBLOCKEDBALL - 12] = sText_TrainerBlockedBall, - [STRINGID_DONTBEATHIEF - 12] = sText_DontBeAThief, - [STRINGID_ITDODGEDBALL - 12] = sText_ItDodgedBall, - [STRINGID_YOUMISSEDPKMN - 12] = sText_YouMissedPkmn, - [STRINGID_PKMNBROKEFREE - 12] = sText_PkmnBrokeFree, - [STRINGID_ITAPPEAREDCAUGHT - 12] = sText_ItAppearedCaught, - [STRINGID_AARGHALMOSTHADIT - 12] = sText_AarghAlmostHadIt, - [STRINGID_SHOOTSOCLOSE - 12] = sText_ShootSoClose, - [STRINGID_GOTCHAPKMNCAUGHT - 12] = sText_GotchaPkmnCaught, - [STRINGID_GOTCHAPKMNCAUGHT2 - 12] = sText_GotchaPkmnCaught2, - [STRINGID_GIVENICKNAMECAPTURED - 12] = sText_GiveNicknameCaptured, - [STRINGID_PKMNSENTTOPC - 12] = sText_PkmnSentToPC, - [STRINGID_PKMNDATAADDEDTODEX - 12] = sText_PkmnDataAddedToDex, - [STRINGID_ITISRAINING - 12] = sText_ItIsRaining, - [STRINGID_SANDSTORMISRAGING - 12] = sText_SandstormIsRaging, - [STRINGID_CANTESCAPE2 - 12] = sText_CantEscape2, - [STRINGID_PKMNIGNORESASLEEP - 12] = sText_PkmnIgnoresAsleep, - [STRINGID_PKMNIGNOREDORDERS - 12] = sText_PkmnIgnoredOrders, - [STRINGID_PKMNBEGANTONAP - 12] = sText_PkmnBeganToNap, - [STRINGID_PKMNLOAFING - 12] = sText_PkmnLoafing, - [STRINGID_PKMNWONTOBEY - 12] = sText_PkmnWontObey, - [STRINGID_PKMNTURNEDAWAY - 12] = sText_PkmnTurnedAway, - [STRINGID_PKMNPRETENDNOTNOTICE - 12] = sText_PkmnPretendNotNotice, - [STRINGID_ENEMYABOUTTOSWITCHPKMN - 12] = sText_EnemyAboutToSwitchPkmn, - [STRINGID_THREWROCK - 12] = sText_ThrewARock, - [STRINGID_THREWBAIT - 12] = sText_ThrewSomeBait, - [STRINGID_PKMNWATCHINGCAREFULLY - 12] = sText_PkmnWatchingCarefully, - [STRINGID_PKMNANGRY - 12] = sText_PkmnIsAngry, - [STRINGID_PKMNEATING - 12] = sText_PkmnIsEating, - [STRINGID_DUMMY288 - 12] = sText_Empty1, - [STRINGID_DUMMY289 - 12] = sText_Empty1, - [STRINGID_OUTOFSAFARIBALLS - 12] = sText_OutOfSafariBalls, - [STRINGID_PKMNSITEMCUREDPARALYSIS - 12] = sText_PkmnsItemCuredParalysis, - [STRINGID_PKMNSITEMCUREDPOISON - 12] = sText_PkmnsItemCuredPoison, - [STRINGID_PKMNSITEMHEALEDBURN - 12] = sText_PkmnsItemHealedBurn, - [STRINGID_PKMNSITEMDEFROSTEDIT - 12] = sText_PkmnsItemDefrostedIt, - [STRINGID_PKMNSITEMWOKEIT - 12] = sText_PkmnsItemWokeIt, - [STRINGID_PKMNSITEMSNAPPEDOUT - 12] = sText_PkmnsItemSnappedOut, - [STRINGID_PKMNSITEMCUREDPROBLEM - 12] = sText_PkmnsItemCuredProblem, - [STRINGID_PKMNSITEMRESTOREDHEALTH - 12] = sText_PkmnsItemRestoredHealth, - [STRINGID_PKMNSITEMRESTOREDPP - 12] = sText_PkmnsItemRestoredPP, - [STRINGID_PKMNSITEMRESTOREDSTATUS - 12] = sText_PkmnsItemRestoredStatus, - [STRINGID_PKMNSITEMRESTOREDHPALITTLE - 12] = sText_PkmnsItemRestoredHPALittle, - [STRINGID_ITEMALLOWSONLYYMOVE - 12] = sText_ItemAllowsOnlyYMove, - [STRINGID_PKMNHUNGONWITHX - 12] = sText_PkmnHungOnWithX, - [STRINGID_EMPTYSTRING3 - 12] = gText_EmptyString3, - [STRINGID_PKMNSXPREVENTSBURNS - 12] = sText_PkmnsXPreventsBurns, - [STRINGID_PKMNSXBLOCKSY - 12] = sText_PkmnsXBlocksY, - [STRINGID_PKMNSXRESTOREDHPALITTLE2 - 12] = sText_PkmnsXRestoredHPALittle2, - [STRINGID_PKMNSXWHIPPEDUPSANDSTORM - 12] = sText_PkmnsXWhippedUpSandstorm, - [STRINGID_PKMNSXPREVENTSYLOSS - 12] = sText_PkmnsXPreventsYLoss, - [STRINGID_PKMNSXINFATUATEDY - 12] = sText_PkmnsXInfatuatedY, - [STRINGID_PKMNSXMADEYINEFFECTIVE - 12] = sText_PkmnsXMadeYIneffective, - [STRINGID_PKMNSXCUREDYPROBLEM - 12] = sText_PkmnsXCuredYProblem, - [STRINGID_ITSUCKEDLIQUIDOOZE - 12] = sText_ItSuckedLiquidOoze, - [STRINGID_PKMNTRANSFORMED - 12] = sText_PkmnTransformed, - [STRINGID_ELECTRICITYWEAKENED - 12] = sText_ElectricityWeakened, - [STRINGID_FIREWEAKENED - 12] = sText_FireWeakened, - [STRINGID_PKMNHIDUNDERWATER - 12] = sText_PkmnHidUnderwater, - [STRINGID_PKMNSPRANGUP - 12] = sText_PkmnSprangUp, - [STRINGID_HMMOVESCANTBEFORGOTTEN - 12] = sText_HMMovesCantBeForgotten, - [STRINGID_XFOUNDONEY - 12] = sText_XFoundOneY, - [STRINGID_PLAYERDEFEATEDTRAINER1 - 12] = sText_PlayerDefeatedLinkTrainerTrainer1, - [STRINGID_SOOTHINGAROMA - 12] = sText_SoothingAroma, - [STRINGID_ITEMSCANTBEUSEDNOW - 12] = sText_ItemsCantBeUsedNow, - [STRINGID_FORXCOMMAYZ - 12] = sText_ForXCommaYZ, - [STRINGID_USINGITEMSTATOFPKMNROSE - 12] = sText_UsingItemTheStatOfPkmnRose, - [STRINGID_PKMNUSEDXTOGETPUMPED - 12] = sText_PkmnUsedXToGetPumped, - [STRINGID_PKMNSXMADEYUSELESS - 12] = sText_PkmnsXMadeYUseless, - [STRINGID_PKMNTRAPPEDBYSANDTOMB - 12] = sText_PkmnTrappedBySandTomb, - [STRINGID_EMPTYSTRING4 - 12] = sText_EmptyString4, - [STRINGID_ABOOSTED - 12] = sText_ABoosted, - [STRINGID_PKMNSXINTENSIFIEDSUN - 12] = sText_PkmnsXIntensifiedSun, - [STRINGID_PKMNMAKESGROUNDMISS - 12] = sText_PkmnMakesGroundMiss, - [STRINGID_YOUTHROWABALLNOWRIGHT - 12] = sText_YouThrowABallNowRight, - [STRINGID_PKMNSXTOOKATTACK - 12] = sText_PkmnsXTookAttack, - [STRINGID_PKMNCHOSEXASDESTINY - 12] = sText_PkmnChoseXAsDestiny, - [STRINGID_PKMNLOSTFOCUS - 12] = sText_PkmnLostFocus, - [STRINGID_USENEXTPKMN - 12] = sText_UseNextPkmn, - [STRINGID_PKMNFLEDUSINGITS - 12] = sText_PkmnFledUsingIts, - [STRINGID_PKMNFLEDUSING - 12] = sText_PkmnFledUsing, - [STRINGID_PKMNWASDRAGGEDOUT - 12] = sText_PkmnWasDraggedOut, - [STRINGID_PREVENTEDFROMWORKING - 12] = sText_PreventedFromWorking, - [STRINGID_PKMNSITEMNORMALIZEDSTATUS - 12] = sText_PkmnsItemNormalizedStatus, - [STRINGID_TRAINER1USEDITEM - 12] = sText_Trainer1UsedItem, - [STRINGID_BOXISFULL - 12] = sText_BoxIsFull, - [STRINGID_PKMNAVOIDEDATTACK - 12] = sText_PkmnAvoidedAttack, - [STRINGID_PKMNSXMADEITINEFFECTIVE - 12] = sText_PkmnsXMadeItIneffective, - [STRINGID_PKMNSXPREVENTSFLINCHING - 12] = sText_PkmnsXPreventsFlinching, - [STRINGID_PKMNALREADYHASBURN - 12] = sText_PkmnAlreadyHasBurn, - [STRINGID_STATSWONTDECREASE2 - 12] = sText_StatsWontDecrease2, - [STRINGID_PKMNSXBLOCKSY2 - 12] = sText_PkmnsXBlocksY2, - [STRINGID_PKMNSXWOREOFF - 12] = sText_PkmnsXWoreOff, - [STRINGID_PKMNRAISEDDEFALITTLE - 12] = sText_PkmnRaisedDefALittle, - [STRINGID_PKMNRAISEDSPDEFALITTLE - 12] = sText_PkmnRaisedSpDefALittle, - [STRINGID_THEWALLSHATTERED - 12] = sText_TheWallShattered, - [STRINGID_PKMNSXPREVENTSYSZ - 12] = sText_PkmnsXPreventsYsZ, - [STRINGID_PKMNSXCUREDITSYPROBLEM - 12] = sText_PkmnsXCuredItsYProblem, - [STRINGID_ATTACKERCANTESCAPE - 12] = sText_AttackerCantEscape, - [STRINGID_PKMNOBTAINEDX - 12] = sText_PkmnObtainedX, - [STRINGID_PKMNOBTAINEDX2 - 12] = sText_PkmnObtainedX2, - [STRINGID_PKMNOBTAINEDXYOBTAINEDZ - 12] = sText_PkmnObtainedXYObtainedZ, - [STRINGID_BUTNOEFFECT - 12] = sText_ButNoEffect, - [STRINGID_PKMNSXHADNOEFFECTONY - 12] = sText_PkmnsXHadNoEffectOnY, - [STRINGID_OAKPLAYERWON - 12] = gText_WinEarnsPrizeMoney, - [STRINGID_OAKPLAYERLOST - 12] = gText_HowDissapointing, - [STRINGID_PLAYERLOSTAGAINSTENEMYTRAINER - 12] = sText_PlayerWhiteoutAgainstTrainer, - [STRINGID_PLAYERPAIDPRIZEMONEY - 12] = sText_PlayerPaidAsPrizeMoney, - [STRINGID_PKMNTRANSFERREDSOMEONESPC - 12] = Text_MonSentToBoxInSomeonesPC, - [STRINGID_PKMNTRANSFERREDBILLSPC - 12] = Text_MonSentToBoxInBillsPC, - [STRINGID_PKMNBOXSOMEONESPCFULL - 12] = Text_MonSentToBoxSomeonesBoxFull, - [STRINGID_PKMNBOXBILLSPCFULL - 12] = Text_MonSentToBoxBillsBoxFull, - [STRINGID_POKEDUDEUSED - 12] = sText_PokedudeUsedItem, - [STRINGID_POKEFLUTECATCHY - 12] = sText_PlayedFluteCatchyTune, - [STRINGID_POKEFLUTE - 12] = sText_PlayedThe, - [STRINGID_MONHEARINGFLUTEAWOKE - 12] = sText_PkmnHearingFluteAwoke, - [STRINGID_TRAINER2CLASS - 12] = sText_Trainer2Class, - [STRINGID_TRAINER2NAME - 12] = sText_Trainer2Name, - [STRINGID_PLAYERWHITEDOUT - 12] = sText_PlayerWhiteout2, - [STRINGID_MONTOOSCAREDTOMOVE - 12] = sText_TooScaredToMove, - [STRINGID_GHOSTGETOUTGETOUT - 12] = sText_GetOutGetOut, - [STRINGID_SILPHSCOPEUNVEILED - 12] = sText_SilphScopeUnveil, - [STRINGID_GHOSTWASMAROWAK - 12] = sText_TheGhostWas, - [STRINGID_TRAINER1MON1COMEBACK - 12] = sText_Trainer1RecallPkmn1, - [STRINGID_TRAINER1WINTEXT - 12] = sText_Trainer1WinText, - [STRINGID_TRAINER1MON2COMEBACK - 12] = sText_Trainer1RecallPkmn2, - [STRINGID_TRAINER1MON1AND2COMEBACK - 12] = sText_Trainer1RecallBoth + [STRINGID_TRAINER1LOSETEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer1LoseText, + [STRINGID_PKMNGAINEDEXP - BATTLESTRINGS_TABLE_START] = sText_PkmnGainedEXP, + [STRINGID_PKMNGREWTOLV - BATTLESTRINGS_TABLE_START] = sText_PkmnGrewToLv, + [STRINGID_PKMNLEARNEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnLearnedMove, + [STRINGID_TRYTOLEARNMOVE1 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove1, + [STRINGID_TRYTOLEARNMOVE2 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove2, + [STRINGID_TRYTOLEARNMOVE3 - BATTLESTRINGS_TABLE_START] = sText_TryToLearnMove3, + [STRINGID_PKMNFORGOTMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnForgotMove, + [STRINGID_STOPLEARNINGMOVE - BATTLESTRINGS_TABLE_START] = sText_StopLearningMove, + [STRINGID_DIDNOTLEARNMOVE - BATTLESTRINGS_TABLE_START] = sText_DidNotLearnMove, + [STRINGID_PKMNLEARNEDMOVE2 - BATTLESTRINGS_TABLE_START] = sText_PkmnLearnedMove2, + [STRINGID_ATTACKMISSED - BATTLESTRINGS_TABLE_START] = sText_AttackMissed, + [STRINGID_PKMNPROTECTEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedItself, + [STRINGID_STATSWONTINCREASE2 - BATTLESTRINGS_TABLE_START] = sText_StatsWontIncrease2, + [STRINGID_AVOIDEDDAMAGE - BATTLESTRINGS_TABLE_START] = sText_AvoidedDamage, + [STRINGID_ITDOESNTAFFECT - BATTLESTRINGS_TABLE_START] = sText_ItDoesntAffect, + [STRINGID_ATTACKERFAINTED - BATTLESTRINGS_TABLE_START] = sText_AttackerFainted, + [STRINGID_TARGETFAINTED - BATTLESTRINGS_TABLE_START] = sText_TargetFainted, + [STRINGID_PLAYERGOTMONEY - BATTLESTRINGS_TABLE_START] = sText_PlayerGotMoney, + [STRINGID_PLAYERWHITEOUT - BATTLESTRINGS_TABLE_START] = sText_PlayerWhiteout, + [STRINGID_PLAYERWHITEOUT2 - BATTLESTRINGS_TABLE_START] = sText_PlayerPanicked, + [STRINGID_PREVENTSESCAPE - BATTLESTRINGS_TABLE_START] = sText_PreventsEscape, + [STRINGID_HITXTIMES - BATTLESTRINGS_TABLE_START] = sText_HitXTimes, + [STRINGID_PKMNFELLASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnFellAsleep, + [STRINGID_PKMNMADESLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeSleep, + [STRINGID_PKMNALREADYASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyAsleep, + [STRINGID_PKMNALREADYASLEEP2 - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyAsleep2, + [STRINGID_PKMNWASNTAFFECTED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasntAffected, + [STRINGID_PKMNWASPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasPoisoned, + [STRINGID_PKMNPOISONEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnPoisonedBy, + [STRINGID_PKMNHURTBYPOISON - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByPoison, + [STRINGID_PKMNALREADYPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyPoisoned, + [STRINGID_PKMNBADLYPOISONED - BATTLESTRINGS_TABLE_START] = sText_PkmnBadlyPoisoned, + [STRINGID_PKMNENERGYDRAINED - BATTLESTRINGS_TABLE_START] = sText_PkmnEnergyDrained, + [STRINGID_PKMNWASBURNED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasBurned, + [STRINGID_PKMNBURNEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnBurnedBy, + [STRINGID_PKMNHURTBYBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtByBurn, + [STRINGID_PKMNWASFROZEN - BATTLESTRINGS_TABLE_START] = sText_PkmnWasFrozen, + [STRINGID_PKMNFROZENBY - BATTLESTRINGS_TABLE_START] = sText_PkmnFrozenBy, + [STRINGID_PKMNISFROZEN - BATTLESTRINGS_TABLE_START] = sText_PkmnIsFrozen, + [STRINGID_PKMNWASDEFROSTED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrosted, + [STRINGID_PKMNWASDEFROSTED2 - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrosted2, + [STRINGID_PKMNWASDEFROSTEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDefrostedBy, + [STRINGID_PKMNWASPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasParalyzed, + [STRINGID_PKMNWASPARALYZEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasParalyzedBy, + [STRINGID_PKMNISPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsParalyzed, + [STRINGID_PKMNISALREADYPARALYZED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsAlreadyParalyzed, + [STRINGID_PKMNHEALEDPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_PkmnHealedParalysis, + [STRINGID_PKMNDREAMEATEN - BATTLESTRINGS_TABLE_START] = sText_PkmnDreamEaten, + [STRINGID_STATSWONTINCREASE - BATTLESTRINGS_TABLE_START] = sText_StatsWontIncrease, + [STRINGID_STATSWONTDECREASE - BATTLESTRINGS_TABLE_START] = sText_StatsWontDecrease, + [STRINGID_TEAMSTOPPEDWORKING - BATTLESTRINGS_TABLE_START] = sText_TeamStoppedWorking, + [STRINGID_FOESTOPPEDWORKING - BATTLESTRINGS_TABLE_START] = sText_FoeStoppedWorking, + [STRINGID_PKMNISCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnIsConfused, + [STRINGID_PKMNHEALEDCONFUSION - BATTLESTRINGS_TABLE_START] = sText_PkmnHealedConfusion, + [STRINGID_PKMNWASCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnWasConfused, + [STRINGID_PKMNALREADYCONFUSED - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyConfused, + [STRINGID_PKMNFELLINLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnFellInLove, + [STRINGID_PKMNINLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnInLove, + [STRINGID_PKMNIMMOBILIZEDBYLOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnImmobilizedByLove, + [STRINGID_PKMNBLOWNAWAY - BATTLESTRINGS_TABLE_START] = sText_PkmnBlownAway, + [STRINGID_PKMNCHANGEDTYPE - BATTLESTRINGS_TABLE_START] = sText_PkmnChangedType, + [STRINGID_PKMNFLINCHED - BATTLESTRINGS_TABLE_START] = sText_PkmnFlinched, + [STRINGID_PKMNREGAINEDHEALTH - BATTLESTRINGS_TABLE_START] = sText_PkmnRegainedHealth, + [STRINGID_PKMNHPFULL - BATTLESTRINGS_TABLE_START] = sText_PkmnHPFull, + [STRINGID_PKMNRAISEDSPDEF - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpDef, + [STRINGID_PKMNRAISEDDEF - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedDef, + [STRINGID_PKMNCOVEREDBYVEIL - BATTLESTRINGS_TABLE_START] = sText_PkmnCoveredByVeil, + [STRINGID_PKMNUSEDSAFEGUARD - BATTLESTRINGS_TABLE_START] = sText_PkmnUsedSafeguard, + [STRINGID_PKMNSAFEGUARDEXPIRED - BATTLESTRINGS_TABLE_START] = sText_PkmnSafeguardExpired, + [STRINGID_PKMNWENTTOSLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnWentToSleep, + [STRINGID_PKMNSLEPTHEALTHY - BATTLESTRINGS_TABLE_START] = sText_PkmnSleptHealthy, + [STRINGID_PKMNWHIPPEDWHIRLWIND - BATTLESTRINGS_TABLE_START] = sText_PkmnWhippedWhirlwind, + [STRINGID_PKMNTOOKSUNLIGHT - BATTLESTRINGS_TABLE_START] = sText_PkmnTookSunlight, + [STRINGID_PKMNLOWEREDHEAD - BATTLESTRINGS_TABLE_START] = sText_PkmnLoweredHead, + [STRINGID_PKMNISGLOWING - BATTLESTRINGS_TABLE_START] = sText_PkmnIsGlowing, + [STRINGID_PKMNFLEWHIGH - BATTLESTRINGS_TABLE_START] = sText_PkmnFlewHigh, + [STRINGID_PKMNDUGHOLE - BATTLESTRINGS_TABLE_START] = sText_PkmnDugHole, + [STRINGID_PKMNSQUEEZEDBYBIND - BATTLESTRINGS_TABLE_START] = sText_PkmnSqueezedByBind, + [STRINGID_PKMNTRAPPEDINVORTEX - BATTLESTRINGS_TABLE_START] = sText_PkmnTrappedInVortex, + [STRINGID_PKMNWRAPPEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnWrappedBy, + [STRINGID_PKMNCLAMPED - BATTLESTRINGS_TABLE_START] = sText_PkmnClamped, + [STRINGID_PKMNHURTBY - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtBy, + [STRINGID_PKMNFREEDFROM - BATTLESTRINGS_TABLE_START] = sText_PkmnFreedFrom, + [STRINGID_PKMNCRASHED - BATTLESTRINGS_TABLE_START] = sText_PkmnCrashed, + [STRINGID_PKMNSHROUDEDINMIST - BATTLESTRINGS_TABLE_START] = gBattleText_MistShroud, + [STRINGID_PKMNPROTECTEDBYMIST - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedByMist, + [STRINGID_PKMNGETTINGPUMPED - BATTLESTRINGS_TABLE_START] = gBattleText_GetPumped, + [STRINGID_PKMNHITWITHRECOIL - BATTLESTRINGS_TABLE_START] = sText_PkmnHitWithRecoil, + [STRINGID_PKMNPROTECTEDITSELF2 - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedItself2, + [STRINGID_PKMNBUFFETEDBYSANDSTORM - BATTLESTRINGS_TABLE_START] = sText_PkmnBuffetedBySandstorm, + [STRINGID_PKMNPELTEDBYHAIL - BATTLESTRINGS_TABLE_START] = sText_PkmnPeltedByHail, + [STRINGID_PKMNSEEDED - BATTLESTRINGS_TABLE_START] = sText_PkmnSeeded, + [STRINGID_PKMNEVADEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnEvadedAttack, + [STRINGID_PKMNSAPPEDBYLEECHSEED - BATTLESTRINGS_TABLE_START] = sText_PkmnSappedByLeechSeed, + [STRINGID_PKMNFASTASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnFastAsleep, + [STRINGID_PKMNWOKEUP - BATTLESTRINGS_TABLE_START] = sText_PkmnWokeUp, + [STRINGID_PKMNUPROARKEPTAWAKE - BATTLESTRINGS_TABLE_START] = sText_PkmnUproarKeptAwake, + [STRINGID_PKMNWOKEUPINUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnWokeUpInUproar, + [STRINGID_PKMNCAUSEDUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnCausedUproar, + [STRINGID_PKMNMAKINGUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnMakingUproar, + [STRINGID_PKMNCALMEDDOWN - BATTLESTRINGS_TABLE_START] = sText_PkmnCalmedDown, + [STRINGID_PKMNCANTSLEEPINUPROAR - BATTLESTRINGS_TABLE_START] = sText_PkmnCantSleepInUproar, + [STRINGID_PKMNSTOCKPILED - BATTLESTRINGS_TABLE_START] = sText_PkmnStockpiled, + [STRINGID_PKMNCANTSTOCKPILE - BATTLESTRINGS_TABLE_START] = sText_PkmnCantStockpile, + [STRINGID_PKMNCANTSLEEPINUPROAR2 - BATTLESTRINGS_TABLE_START] = sText_PkmnCantSleepInUproar2, + [STRINGID_UPROARKEPTPKMNAWAKE - BATTLESTRINGS_TABLE_START] = sText_UproarKeptPkmnAwake, + [STRINGID_PKMNSTAYEDAWAKEUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnStayedAwakeUsing, + [STRINGID_PKMNSTORINGENERGY - BATTLESTRINGS_TABLE_START] = sText_PkmnStoringEnergy, + [STRINGID_PKMNUNLEASHEDENERGY - BATTLESTRINGS_TABLE_START] = sText_PkmnUnleashedEnergy, + [STRINGID_PKMNFATIGUECONFUSION - BATTLESTRINGS_TABLE_START] = sText_PkmnFatigueConfusion, + [STRINGID_PLAYERPICKEDUPMONEY - BATTLESTRINGS_TABLE_START] = sText_PkmnPickedUpItem, + [STRINGID_PKMNUNAFFECTED - BATTLESTRINGS_TABLE_START] = sText_PkmnUnaffected, + [STRINGID_PKMNTRANSFORMEDINTO - BATTLESTRINGS_TABLE_START] = sText_PkmnTransformedInto, + [STRINGID_PKMNMADESUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeSubstitute, + [STRINGID_PKMNHASSUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_PkmnHasSubstitute, + [STRINGID_SUBSTITUTEDAMAGED - BATTLESTRINGS_TABLE_START] = sText_SubstituteDamaged, + [STRINGID_PKMNSUBSTITUTEFADED - BATTLESTRINGS_TABLE_START] = sText_PkmnSubstituteFaded, + [STRINGID_PKMNMUSTRECHARGE - BATTLESTRINGS_TABLE_START] = sText_PkmnMustRecharge, + [STRINGID_PKMNRAGEBUILDING - BATTLESTRINGS_TABLE_START] = sText_PkmnRageBuilding, + [STRINGID_PKMNMOVEWASDISABLED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveWasDisabled, + [STRINGID_PKMNMOVEISDISABLED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveIsDisabled, + [STRINGID_PKMNMOVEDISABLEDNOMORE - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveDisabledNoMore, + [STRINGID_PKMNGOTENCORE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotEncore, + [STRINGID_PKMNENCOREENDED - BATTLESTRINGS_TABLE_START] = sText_PkmnEncoreEnded, + [STRINGID_PKMNTOOKAIM - BATTLESTRINGS_TABLE_START] = sText_PkmnTookAim, + [STRINGID_PKMNSKETCHEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSketchedMove, + [STRINGID_PKMNTRYINGTOTAKEFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnTryingToTakeFoe, + [STRINGID_PKMNTOOKFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnTookFoe, + [STRINGID_PKMNREDUCEDPP - BATTLESTRINGS_TABLE_START] = sText_PkmnReducedPP, + [STRINGID_PKMNSTOLEITEM - BATTLESTRINGS_TABLE_START] = sText_PkmnStoleItem, + [STRINGID_TARGETCANTESCAPENOW - BATTLESTRINGS_TABLE_START] = sText_TargetCantEscapeNow, + [STRINGID_PKMNFELLINTONIGHTMARE - BATTLESTRINGS_TABLE_START] = sText_PkmnFellIntoNightmare, + [STRINGID_PKMNLOCKEDINNIGHTMARE - BATTLESTRINGS_TABLE_START] = sText_PkmnLockedInNightmare, + [STRINGID_PKMNLAIDCURSE - BATTLESTRINGS_TABLE_START] = sText_PkmnLaidCurse, + [STRINGID_PKMNAFFLICTEDBYCURSE - BATTLESTRINGS_TABLE_START] = sText_PkmnAfflictedByCurse, + [STRINGID_SPIKESSCATTERED - BATTLESTRINGS_TABLE_START] = sText_SpikesScattered, + [STRINGID_PKMNHURTBYSPIKES - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtBySpikes, + [STRINGID_PKMNIDENTIFIED - BATTLESTRINGS_TABLE_START] = sText_PkmnIdentified, + [STRINGID_PKMNPERISHCOUNTFELL - BATTLESTRINGS_TABLE_START] = sText_PkmnPerishCountFell, + [STRINGID_PKMNBRACEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnBracedItself, + [STRINGID_PKMNENDUREDHIT - BATTLESTRINGS_TABLE_START] = sText_PkmnEnduredHit, + [STRINGID_MAGNITUDESTRENGTH - BATTLESTRINGS_TABLE_START] = sText_MagnitudeStrength, + [STRINGID_PKMNCUTHPMAXEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnCutHPMaxedAttack, + [STRINGID_PKMNCOPIEDSTATCHANGES - BATTLESTRINGS_TABLE_START] = sText_PkmnCopiedStatChanges, + [STRINGID_PKMNGOTFREE - BATTLESTRINGS_TABLE_START] = sText_PkmnGotFree, + [STRINGID_PKMNSHEDLEECHSEED - BATTLESTRINGS_TABLE_START] = sText_PkmnShedLeechSeed, + [STRINGID_PKMNBLEWAWAYSPIKES - BATTLESTRINGS_TABLE_START] = sText_PkmnBlewAwaySpikes, + [STRINGID_PKMNFLEDFROMBATTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnFledFromBattle, + [STRINGID_PKMNFORESAWATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnForesawAttack, + [STRINGID_PKMNTOOKATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnTookAttack, + [STRINGID_PKMNATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnAttack, + [STRINGID_PKMNCENTERATTENTION - BATTLESTRINGS_TABLE_START] = sText_PkmnCenterAttention, + [STRINGID_PKMNCHARGINGPOWER - BATTLESTRINGS_TABLE_START] = sText_PkmnChargingPower, + [STRINGID_NATUREPOWERTURNEDINTO - BATTLESTRINGS_TABLE_START] = sText_NaturePowerTurnedInto, + [STRINGID_PKMNSTATUSNORMAL - BATTLESTRINGS_TABLE_START] = sText_PkmnStatusNormal, + [STRINGID_PKMNHASNOMOVESLEFT - BATTLESTRINGS_TABLE_START] = sText_PkmnHasNoMovesLeft, + [STRINGID_PKMNSUBJECTEDTOTORMENT - BATTLESTRINGS_TABLE_START] = sText_PkmnSubjectedToTorment, + [STRINGID_PKMNCANTUSEMOVETORMENT - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveTorment, + [STRINGID_PKMNTIGHTENINGFOCUS - BATTLESTRINGS_TABLE_START] = sText_PkmnTighteningFocus, + [STRINGID_PKMNFELLFORTAUNT - BATTLESTRINGS_TABLE_START] = sText_PkmnFellForTaunt, + [STRINGID_PKMNCANTUSEMOVETAUNT - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveTaunt, + [STRINGID_PKMNREADYTOHELP - BATTLESTRINGS_TABLE_START] = sText_PkmnReadyToHelp, + [STRINGID_PKMNSWITCHEDITEMS - BATTLESTRINGS_TABLE_START] = sText_PkmnSwitchedItems, + [STRINGID_PKMNCOPIEDFOE - BATTLESTRINGS_TABLE_START] = sText_PkmnCopiedFoe, + [STRINGID_PKMNMADEWISH - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeWish, + [STRINGID_PKMNWISHCAMETRUE - BATTLESTRINGS_TABLE_START] = sText_PkmnWishCameTrue, + [STRINGID_PKMNPLANTEDROOTS - BATTLESTRINGS_TABLE_START] = sText_PkmnPlantedRoots, + [STRINGID_PKMNABSORBEDNUTRIENTS - BATTLESTRINGS_TABLE_START] = sText_PkmnAbsorbedNutrients, + [STRINGID_PKMNANCHOREDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnAnchoredItself, + [STRINGID_PKMNWASMADEDROWSY - BATTLESTRINGS_TABLE_START] = sText_PkmnWasMadeDrowsy, + [STRINGID_PKMNKNOCKEDOFF - BATTLESTRINGS_TABLE_START] = sText_PkmnKnockedOff, + [STRINGID_PKMNSWAPPEDABILITIES - BATTLESTRINGS_TABLE_START] = sText_PkmnSwappedAbilities, + [STRINGID_PKMNSEALEDOPPONENTMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSealedOpponentMove, + [STRINGID_PKMNCANTUSEMOVESEALED - BATTLESTRINGS_TABLE_START] = sText_PkmnCantUseMoveSealed, + [STRINGID_PKMNWANTSGRUDGE - BATTLESTRINGS_TABLE_START] = sText_PkmnWantsGrudge, + [STRINGID_PKMNLOSTPPGRUDGE - BATTLESTRINGS_TABLE_START] = sText_PkmnLostPPGrudge, + [STRINGID_PKMNSHROUDEDITSELF - BATTLESTRINGS_TABLE_START] = sText_PkmnShroudedItself, + [STRINGID_PKMNMOVEBOUNCED - BATTLESTRINGS_TABLE_START] = sText_PkmnMoveBounced, + [STRINGID_PKMNWAITSFORTARGET - BATTLESTRINGS_TABLE_START] = sText_PkmnWaitsForTarget, + [STRINGID_PKMNSNATCHEDMOVE - BATTLESTRINGS_TABLE_START] = sText_PkmnSnatchedMove, + [STRINGID_PKMNMADEITRAIN - BATTLESTRINGS_TABLE_START] = sText_PkmnMadeItRain, + [STRINGID_PKMNRAISEDSPEED - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpeed, + [STRINGID_PKMNPROTECTEDBY - BATTLESTRINGS_TABLE_START] = sText_PkmnProtectedBy, + [STRINGID_PKMNPREVENTSUSAGE - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsUsage, + [STRINGID_PKMNRESTOREDHPUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnRestoredHPUsing, + [STRINGID_PKMNCHANGEDTYPEWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnChangedTypeWith, + [STRINGID_PKMNPREVENTSPARALYSISWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsParalysisWith, + [STRINGID_PKMNPREVENTSROMANCEWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsRomanceWith, + [STRINGID_PKMNPREVENTSPOISONINGWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsPoisoningWith, + [STRINGID_PKMNPREVENTSCONFUSIONWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsConfusionWith, + [STRINGID_PKMNRAISEDFIREPOWERWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedFirePowerWith, + [STRINGID_PKMNANCHORSITSELFWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnAnchorsItselfWith, + [STRINGID_PKMNCUTSATTACKWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnCutsAttackWith, + [STRINGID_PKMNPREVENTSSTATLOSSWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnPreventsStatLossWith, + [STRINGID_PKMNHURTSWITH - BATTLESTRINGS_TABLE_START] = sText_PkmnHurtsWith, + [STRINGID_PKMNTRACED - BATTLESTRINGS_TABLE_START] = sText_PkmnTraced, + [STRINGID_STATSHARPLY - BATTLESTRINGS_TABLE_START] = sText_StatSharply, + [STRINGID_STATROSE - BATTLESTRINGS_TABLE_START] = gBattleText_Rose, + [STRINGID_STATHARSHLY - BATTLESTRINGS_TABLE_START] = sText_StatHarshly, + [STRINGID_STATFELL - BATTLESTRINGS_TABLE_START] = sText_StatFell, + [STRINGID_ATTACKERSSTATROSE - BATTLESTRINGS_TABLE_START] = sText_AttackersStatRose, + [STRINGID_DEFENDERSSTATROSE - BATTLESTRINGS_TABLE_START] = gText_DefendersStatRose, + [STRINGID_ATTACKERSSTATFELL - BATTLESTRINGS_TABLE_START] = sText_AttackersStatFell, + [STRINGID_DEFENDERSSTATFELL - BATTLESTRINGS_TABLE_START] = sText_DefendersStatFell, + [STRINGID_CRITICALHIT - BATTLESTRINGS_TABLE_START] = sText_CriticalHit, + [STRINGID_ONEHITKO - BATTLESTRINGS_TABLE_START] = sText_OneHitKO, + [STRINGID_123POOF - BATTLESTRINGS_TABLE_START] = sText_123Poof, + [STRINGID_ANDELLIPSIS - BATTLESTRINGS_TABLE_START] = sText_AndEllipsis, + [STRINGID_NOTVERYEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_NotVeryEffective, + [STRINGID_SUPEREFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_SuperEffective, + [STRINGID_GOTAWAYSAFELY - BATTLESTRINGS_TABLE_START] = sText_GotAwaySafely, + [STRINGID_WILDPKMNFLED - BATTLESTRINGS_TABLE_START] = sText_WildPkmnFled, + [STRINGID_NORUNNINGFROMTRAINERS - BATTLESTRINGS_TABLE_START] = sText_NoRunningFromTrainers, + [STRINGID_CANTESCAPE - BATTLESTRINGS_TABLE_START] = sText_CantEscape, + [STRINGID_DONTLEAVEBIRCH - BATTLESTRINGS_TABLE_START] = sText_EmptyString5, + [STRINGID_BUTNOTHINGHAPPENED - BATTLESTRINGS_TABLE_START] = sText_ButNothingHappened, + [STRINGID_BUTITFAILED - BATTLESTRINGS_TABLE_START] = sText_ButItFailed, + [STRINGID_ITHURTCONFUSION - BATTLESTRINGS_TABLE_START] = sText_ItHurtConfusion, + [STRINGID_MIRRORMOVEFAILED - BATTLESTRINGS_TABLE_START] = sText_MirrorMoveFailed, + [STRINGID_STARTEDTORAIN - BATTLESTRINGS_TABLE_START] = sText_StartedToRain, + [STRINGID_DOWNPOURSTARTED - BATTLESTRINGS_TABLE_START] = sText_DownpourStarted, + [STRINGID_RAINCONTINUES - BATTLESTRINGS_TABLE_START] = sText_RainContinues, + [STRINGID_DOWNPOURCONTINUES - BATTLESTRINGS_TABLE_START] = sText_DownpourContinues, + [STRINGID_RAINSTOPPED - BATTLESTRINGS_TABLE_START] = sText_RainStopped, + [STRINGID_SANDSTORMBREWED - BATTLESTRINGS_TABLE_START] = sText_SandstormBrewed, + [STRINGID_SANDSTORMRAGES - BATTLESTRINGS_TABLE_START] = sText_SandstormRages, + [STRINGID_SANDSTORMSUBSIDED - BATTLESTRINGS_TABLE_START] = sText_SandstormSubsided, + [STRINGID_SUNLIGHTGOTBRIGHT - BATTLESTRINGS_TABLE_START] = sText_SunlightGotBright, + [STRINGID_SUNLIGHTSTRONG - BATTLESTRINGS_TABLE_START] = sText_SunlightStrong, + [STRINGID_SUNLIGHTFADED - BATTLESTRINGS_TABLE_START] = sText_SunlightFaded, + [STRINGID_STARTEDHAIL - BATTLESTRINGS_TABLE_START] = sText_StartedHail, + [STRINGID_HAILCONTINUES - BATTLESTRINGS_TABLE_START] = sText_HailContinues, + [STRINGID_HAILSTOPPED - BATTLESTRINGS_TABLE_START] = sText_HailStopped, + [STRINGID_FAILEDTOSPITUP - BATTLESTRINGS_TABLE_START] = sText_FailedToSpitUp, + [STRINGID_FAILEDTOSWALLOW - BATTLESTRINGS_TABLE_START] = sText_FailedToSwallow, + [STRINGID_WINDBECAMEHEATWAVE - BATTLESTRINGS_TABLE_START] = sText_WindBecameHeatWave, + [STRINGID_STATCHANGESGONE - BATTLESTRINGS_TABLE_START] = sText_StatChangesGone, + [STRINGID_COINSSCATTERED - BATTLESTRINGS_TABLE_START] = sText_CoinsScattered, + [STRINGID_TOOWEAKFORSUBSTITUTE - BATTLESTRINGS_TABLE_START] = sText_TooWeakForSubstitute, + [STRINGID_SHAREDPAIN - BATTLESTRINGS_TABLE_START] = sText_SharedPain, + [STRINGID_BELLCHIMED - BATTLESTRINGS_TABLE_START] = sText_BellChimed, + [STRINGID_FAINTINTHREE - BATTLESTRINGS_TABLE_START] = sText_FaintInThree, + [STRINGID_NOPPLEFT - BATTLESTRINGS_TABLE_START] = sText_NoPPLeft, + [STRINGID_BUTNOPPLEFT - BATTLESTRINGS_TABLE_START] = sText_ButNoPPLeft, + [STRINGID_PLAYERUSEDITEM - BATTLESTRINGS_TABLE_START] = sText_PlayerUsedItem, + [STRINGID_OLDMANUSEDITEM - BATTLESTRINGS_TABLE_START] = sText_OldManUsedItem, + [STRINGID_TRAINERBLOCKEDBALL - BATTLESTRINGS_TABLE_START] = sText_TrainerBlockedBall, + [STRINGID_DONTBEATHIEF - BATTLESTRINGS_TABLE_START] = sText_DontBeAThief, + [STRINGID_ITDODGEDBALL - BATTLESTRINGS_TABLE_START] = sText_ItDodgedBall, + [STRINGID_YOUMISSEDPKMN - BATTLESTRINGS_TABLE_START] = sText_YouMissedPkmn, + [STRINGID_PKMNBROKEFREE - BATTLESTRINGS_TABLE_START] = sText_PkmnBrokeFree, + [STRINGID_ITAPPEAREDCAUGHT - BATTLESTRINGS_TABLE_START] = sText_ItAppearedCaught, + [STRINGID_AARGHALMOSTHADIT - BATTLESTRINGS_TABLE_START] = sText_AarghAlmostHadIt, + [STRINGID_SHOOTSOCLOSE - BATTLESTRINGS_TABLE_START] = sText_ShootSoClose, + [STRINGID_GOTCHAPKMNCAUGHT - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught, + [STRINGID_GOTCHAPKMNCAUGHT2 - BATTLESTRINGS_TABLE_START] = sText_GotchaPkmnCaught2, + [STRINGID_GIVENICKNAMECAPTURED - BATTLESTRINGS_TABLE_START] = sText_GiveNicknameCaptured, + [STRINGID_PKMNSENTTOPC - BATTLESTRINGS_TABLE_START] = sText_PkmnSentToPC, + [STRINGID_PKMNDATAADDEDTODEX - BATTLESTRINGS_TABLE_START] = sText_PkmnDataAddedToDex, + [STRINGID_ITISRAINING - BATTLESTRINGS_TABLE_START] = sText_ItIsRaining, + [STRINGID_SANDSTORMISRAGING - BATTLESTRINGS_TABLE_START] = sText_SandstormIsRaging, + [STRINGID_CANTESCAPE2 - BATTLESTRINGS_TABLE_START] = sText_CantEscape2, + [STRINGID_PKMNIGNORESASLEEP - BATTLESTRINGS_TABLE_START] = sText_PkmnIgnoresAsleep, + [STRINGID_PKMNIGNOREDORDERS - BATTLESTRINGS_TABLE_START] = sText_PkmnIgnoredOrders, + [STRINGID_PKMNBEGANTONAP - BATTLESTRINGS_TABLE_START] = sText_PkmnBeganToNap, + [STRINGID_PKMNLOAFING - BATTLESTRINGS_TABLE_START] = sText_PkmnLoafing, + [STRINGID_PKMNWONTOBEY - BATTLESTRINGS_TABLE_START] = sText_PkmnWontObey, + [STRINGID_PKMNTURNEDAWAY - BATTLESTRINGS_TABLE_START] = sText_PkmnTurnedAway, + [STRINGID_PKMNPRETENDNOTNOTICE - BATTLESTRINGS_TABLE_START] = sText_PkmnPretendNotNotice, + [STRINGID_ENEMYABOUTTOSWITCHPKMN - BATTLESTRINGS_TABLE_START] = sText_EnemyAboutToSwitchPkmn, + [STRINGID_THREWROCK - BATTLESTRINGS_TABLE_START] = sText_ThrewARock, + [STRINGID_THREWBAIT - BATTLESTRINGS_TABLE_START] = sText_ThrewSomeBait, + [STRINGID_PKMNWATCHINGCAREFULLY - BATTLESTRINGS_TABLE_START] = sText_PkmnWatchingCarefully, + [STRINGID_PKMNANGRY - BATTLESTRINGS_TABLE_START] = sText_PkmnIsAngry, + [STRINGID_PKMNEATING - BATTLESTRINGS_TABLE_START] = sText_PkmnIsEating, + [STRINGID_DUMMY288 - BATTLESTRINGS_TABLE_START] = sText_Empty1, + [STRINGID_DUMMY289 - BATTLESTRINGS_TABLE_START] = sText_Empty1, + [STRINGID_OUTOFSAFARIBALLS - BATTLESTRINGS_TABLE_START] = sText_OutOfSafariBalls, + [STRINGID_PKMNSITEMCUREDPARALYSIS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredParalysis, + [STRINGID_PKMNSITEMCUREDPOISON - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredPoison, + [STRINGID_PKMNSITEMHEALEDBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemHealedBurn, + [STRINGID_PKMNSITEMDEFROSTEDIT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemDefrostedIt, + [STRINGID_PKMNSITEMWOKEIT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemWokeIt, + [STRINGID_PKMNSITEMSNAPPEDOUT - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemSnappedOut, + [STRINGID_PKMNSITEMCUREDPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemCuredProblem, + [STRINGID_PKMNSITEMRESTOREDHEALTH - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredHealth, + [STRINGID_PKMNSITEMRESTOREDPP - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredPP, + [STRINGID_PKMNSITEMRESTOREDSTATUS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredStatus, + [STRINGID_PKMNSITEMRESTOREDHPALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemRestoredHPALittle, + [STRINGID_ITEMALLOWSONLYYMOVE - BATTLESTRINGS_TABLE_START] = sText_ItemAllowsOnlyYMove, + [STRINGID_PKMNHUNGONWITHX - BATTLESTRINGS_TABLE_START] = sText_PkmnHungOnWithX, + [STRINGID_EMPTYSTRING3 - BATTLESTRINGS_TABLE_START] = gText_EmptyString3, + [STRINGID_PKMNSXPREVENTSBURNS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsBurns, + [STRINGID_PKMNSXBLOCKSY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXBlocksY, + [STRINGID_PKMNSXRESTOREDHPALITTLE2 - BATTLESTRINGS_TABLE_START] = sText_PkmnsXRestoredHPALittle2, + [STRINGID_PKMNSXWHIPPEDUPSANDSTORM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXWhippedUpSandstorm, + [STRINGID_PKMNSXPREVENTSYLOSS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsYLoss, + [STRINGID_PKMNSXINFATUATEDY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXInfatuatedY, + [STRINGID_PKMNSXMADEYINEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeYIneffective, + [STRINGID_PKMNSXCUREDYPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXCuredYProblem, + [STRINGID_ITSUCKEDLIQUIDOOZE - BATTLESTRINGS_TABLE_START] = sText_ItSuckedLiquidOoze, + [STRINGID_PKMNTRANSFORMED - BATTLESTRINGS_TABLE_START] = sText_PkmnTransformed, + [STRINGID_ELECTRICITYWEAKENED - BATTLESTRINGS_TABLE_START] = sText_ElectricityWeakened, + [STRINGID_FIREWEAKENED - BATTLESTRINGS_TABLE_START] = sText_FireWeakened, + [STRINGID_PKMNHIDUNDERWATER - BATTLESTRINGS_TABLE_START] = sText_PkmnHidUnderwater, + [STRINGID_PKMNSPRANGUP - BATTLESTRINGS_TABLE_START] = sText_PkmnSprangUp, + [STRINGID_HMMOVESCANTBEFORGOTTEN - BATTLESTRINGS_TABLE_START] = sText_HMMovesCantBeForgotten, + [STRINGID_XFOUNDONEY - BATTLESTRINGS_TABLE_START] = sText_XFoundOneY, + [STRINGID_PLAYERDEFEATEDTRAINER1 - BATTLESTRINGS_TABLE_START] = sText_PlayerDefeatedLinkTrainerTrainer1, + [STRINGID_SOOTHINGAROMA - BATTLESTRINGS_TABLE_START] = sText_SoothingAroma, + [STRINGID_ITEMSCANTBEUSEDNOW - BATTLESTRINGS_TABLE_START] = sText_ItemsCantBeUsedNow, + [STRINGID_FORXCOMMAYZ - BATTLESTRINGS_TABLE_START] = sText_ForXCommaYZ, + [STRINGID_USINGITEMSTATOFPKMNROSE - BATTLESTRINGS_TABLE_START] = sText_UsingItemTheStatOfPkmnRose, + [STRINGID_PKMNUSEDXTOGETPUMPED - BATTLESTRINGS_TABLE_START] = sText_PkmnUsedXToGetPumped, + [STRINGID_PKMNSXMADEYUSELESS - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeYUseless, + [STRINGID_PKMNTRAPPEDBYSANDTOMB - BATTLESTRINGS_TABLE_START] = sText_PkmnTrappedBySandTomb, + [STRINGID_EMPTYSTRING4 - BATTLESTRINGS_TABLE_START] = sText_EmptyString4, + [STRINGID_ABOOSTED - BATTLESTRINGS_TABLE_START] = sText_ABoosted, + [STRINGID_PKMNSXINTENSIFIEDSUN - BATTLESTRINGS_TABLE_START] = sText_PkmnsXIntensifiedSun, + [STRINGID_PKMNMAKESGROUNDMISS - BATTLESTRINGS_TABLE_START] = sText_PkmnMakesGroundMiss, + [STRINGID_YOUTHROWABALLNOWRIGHT - BATTLESTRINGS_TABLE_START] = sText_YouThrowABallNowRight, + [STRINGID_PKMNSXTOOKATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnsXTookAttack, + [STRINGID_PKMNCHOSEXASDESTINY - BATTLESTRINGS_TABLE_START] = sText_PkmnChoseXAsDestiny, + [STRINGID_PKMNLOSTFOCUS - BATTLESTRINGS_TABLE_START] = sText_PkmnLostFocus, + [STRINGID_USENEXTPKMN - BATTLESTRINGS_TABLE_START] = sText_UseNextPkmn, + [STRINGID_PKMNFLEDUSINGITS - BATTLESTRINGS_TABLE_START] = sText_PkmnFledUsingIts, + [STRINGID_PKMNFLEDUSING - BATTLESTRINGS_TABLE_START] = sText_PkmnFledUsing, + [STRINGID_PKMNWASDRAGGEDOUT - BATTLESTRINGS_TABLE_START] = sText_PkmnWasDraggedOut, + [STRINGID_PREVENTEDFROMWORKING - BATTLESTRINGS_TABLE_START] = sText_PreventedFromWorking, + [STRINGID_PKMNSITEMNORMALIZEDSTATUS - BATTLESTRINGS_TABLE_START] = sText_PkmnsItemNormalizedStatus, + [STRINGID_TRAINER1USEDITEM - BATTLESTRINGS_TABLE_START] = sText_Trainer1UsedItem, + [STRINGID_BOXISFULL - BATTLESTRINGS_TABLE_START] = sText_BoxIsFull, + [STRINGID_PKMNAVOIDEDATTACK - BATTLESTRINGS_TABLE_START] = sText_PkmnAvoidedAttack, + [STRINGID_PKMNSXMADEITINEFFECTIVE - BATTLESTRINGS_TABLE_START] = sText_PkmnsXMadeItIneffective, + [STRINGID_PKMNSXPREVENTSFLINCHING - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsFlinching, + [STRINGID_PKMNALREADYHASBURN - BATTLESTRINGS_TABLE_START] = sText_PkmnAlreadyHasBurn, + [STRINGID_STATSWONTDECREASE2 - BATTLESTRINGS_TABLE_START] = sText_StatsWontDecrease2, + [STRINGID_PKMNSXBLOCKSY2 - BATTLESTRINGS_TABLE_START] = sText_PkmnsXBlocksY2, + [STRINGID_PKMNSXWOREOFF - BATTLESTRINGS_TABLE_START] = sText_PkmnsXWoreOff, + [STRINGID_PKMNRAISEDDEFALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedDefALittle, + [STRINGID_PKMNRAISEDSPDEFALITTLE - BATTLESTRINGS_TABLE_START] = sText_PkmnRaisedSpDefALittle, + [STRINGID_THEWALLSHATTERED - BATTLESTRINGS_TABLE_START] = sText_TheWallShattered, + [STRINGID_PKMNSXPREVENTSYSZ - BATTLESTRINGS_TABLE_START] = sText_PkmnsXPreventsYsZ, + [STRINGID_PKMNSXCUREDITSYPROBLEM - BATTLESTRINGS_TABLE_START] = sText_PkmnsXCuredItsYProblem, + [STRINGID_ATTACKERCANTESCAPE - BATTLESTRINGS_TABLE_START] = sText_AttackerCantEscape, + [STRINGID_PKMNOBTAINEDX - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedX, + [STRINGID_PKMNOBTAINEDX2 - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedX2, + [STRINGID_PKMNOBTAINEDXYOBTAINEDZ - BATTLESTRINGS_TABLE_START] = sText_PkmnObtainedXYObtainedZ, + [STRINGID_BUTNOEFFECT - BATTLESTRINGS_TABLE_START] = sText_ButNoEffect, + [STRINGID_PKMNSXHADNOEFFECTONY - BATTLESTRINGS_TABLE_START] = sText_PkmnsXHadNoEffectOnY, + [STRINGID_OAKPLAYERWON - BATTLESTRINGS_TABLE_START] = gText_WinEarnsPrizeMoney, + [STRINGID_OAKPLAYERLOST - BATTLESTRINGS_TABLE_START] = gText_HowDissapointing, + [STRINGID_PLAYERLOSTAGAINSTENEMYTRAINER - BATTLESTRINGS_TABLE_START] = sText_PlayerWhiteoutAgainstTrainer, + [STRINGID_PLAYERPAIDPRIZEMONEY - BATTLESTRINGS_TABLE_START] = sText_PlayerPaidAsPrizeMoney, + [STRINGID_PKMNTRANSFERREDSOMEONESPC - BATTLESTRINGS_TABLE_START] = Text_MonSentToBoxInSomeonesPC, + [STRINGID_PKMNTRANSFERREDBILLSPC - BATTLESTRINGS_TABLE_START] = Text_MonSentToBoxInBillsPC, + [STRINGID_PKMNBOXSOMEONESPCFULL - BATTLESTRINGS_TABLE_START] = Text_MonSentToBoxSomeonesBoxFull, + [STRINGID_PKMNBOXBILLSPCFULL - BATTLESTRINGS_TABLE_START] = Text_MonSentToBoxBillsBoxFull, + [STRINGID_POKEDUDEUSED - BATTLESTRINGS_TABLE_START] = sText_PokedudeUsedItem, + [STRINGID_POKEFLUTECATCHY - BATTLESTRINGS_TABLE_START] = sText_PlayedFluteCatchyTune, + [STRINGID_POKEFLUTE - BATTLESTRINGS_TABLE_START] = sText_PlayedThe, + [STRINGID_MONHEARINGFLUTEAWOKE - BATTLESTRINGS_TABLE_START] = sText_PkmnHearingFluteAwoke, + [STRINGID_TRAINER2CLASS - BATTLESTRINGS_TABLE_START] = sText_Trainer2Class, + [STRINGID_TRAINER2NAME - BATTLESTRINGS_TABLE_START] = sText_Trainer2Name, + [STRINGID_PLAYERWHITEDOUT - BATTLESTRINGS_TABLE_START] = sText_PlayerWhiteout2, + [STRINGID_MONTOOSCAREDTOMOVE - BATTLESTRINGS_TABLE_START] = sText_TooScaredToMove, + [STRINGID_GHOSTGETOUTGETOUT - BATTLESTRINGS_TABLE_START] = sText_GetOutGetOut, + [STRINGID_SILPHSCOPEUNVEILED - BATTLESTRINGS_TABLE_START] = sText_SilphScopeUnveil, + [STRINGID_GHOSTWASMAROWAK - BATTLESTRINGS_TABLE_START] = sText_TheGhostWas, + [STRINGID_TRAINER1MON1COMEBACK - BATTLESTRINGS_TABLE_START] = sText_Trainer1RecallPkmn1, + [STRINGID_TRAINER1WINTEXT - BATTLESTRINGS_TABLE_START] = sText_Trainer1WinText, + [STRINGID_TRAINER1MON2COMEBACK - BATTLESTRINGS_TABLE_START] = sText_Trainer1RecallPkmn2, + [STRINGID_TRAINER1MON1AND2COMEBACK - BATTLESTRINGS_TABLE_START] = sText_Trainer1RecallBoth }; const u16 gMissStringIds[] = { @@ -1042,7 +1042,7 @@ const u16 gTransformUsedStringIds[] = { STRINGID_BUTITFAILED }; -const u16 gSubsituteUsedStringIds[] = { +const u16 gSubstituteUsedStringIds[] = { STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE }; @@ -1087,7 +1087,7 @@ const u16 gAttractUsedStringIds[] = { STRINGID_PKMNSXINFATUATEDY }; -const u16 gLeechSeedDrainStringIds[] = { +const u16 gAbsorbDrainStringIds[] = { STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE }; @@ -1117,7 +1117,7 @@ const u16 gBallEscapeStringIds[] = { STRINGID_SHOOTSOCLOSE }; -const u16 gWeatherContinuesStringIds[] = { +const u16 gWeatherStartsStringIds[] = { STRINGID_ITISRAINING, STRINGID_ITISRAINING, STRINGID_ITISRAINING, From 95b16a2391a1a9d3700ca0722097aa691fa098ee Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 1 Aug 2022 15:16:58 -0400 Subject: [PATCH 12/13] Review changes from https://github.com/pret/pokeemerald/pull/1721 --- include/pokemon_storage_system_internal.h | 4 +--- src/pokemon_storage_system_6.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/pokemon_storage_system_internal.h b/include/pokemon_storage_system_internal.h index 3890928e4..3582d1f32 100644 --- a/include/pokemon_storage_system_internal.h +++ b/include/pokemon_storage_system_internal.h @@ -16,8 +16,6 @@ // between 2 Pokémon with held items #define MAX_ITEM_ICONS 3 -#define MAX_MENU_ITEMS 7 - enum { MODE_PARTY, @@ -308,7 +306,7 @@ struct PokemonStorageSystemData /* 0c66 */ u8 iconScrollState; /* 0c67 */ u8 iconScrollToBoxId; // Unused duplicate of scrollToBoxId /* 0c68 */ struct WindowTemplate menuWindow; - /* 0c70 */ struct StorageMenu menuItems[MAX_MENU_ITEMS]; + /* 0c70 */ struct StorageMenu menuItems[7]; /* 0ca8 */ u8 menuItemsCount; /* 0ca9 */ u8 menuWidth; /* 0caa */ u8 menuUnusedField; // Never read. diff --git a/src/pokemon_storage_system_6.c b/src/pokemon_storage_system_6.c index 773c0f8aa..6b8b4f67d 100644 --- a/src/pokemon_storage_system_6.c +++ b/src/pokemon_storage_system_6.c @@ -58,7 +58,7 @@ static const u8 *const sMenuTexts[] = { void SetMenuText(u8 textId) { - if (gPSSData->menuItemsCount < MAX_MENU_ITEMS) + if (gPSSData->menuItemsCount < ARRAY_COUNT(gPSSData->menuItems)) { u8 len; struct StorageMenu *menu = &gPSSData->menuItems[gPSSData->menuItemsCount]; From b1bc05ec058df4b6af848dd166f60070fae5df6b Mon Sep 17 00:00:00 2001 From: Eduardo Quezada Date: Mon, 1 Aug 2022 15:37:00 -0400 Subject: [PATCH 13/13] Review changes --- include/constants/battle_anim.h | 4 ++-- src/mon_markings.c | 11 +++-------- src/pokemon_storage_system_8.c | 32 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/include/constants/battle_anim.h b/include/constants/battle_anim.h index 1e946dd1a..4363b7fca 100644 --- a/include/constants/battle_anim.h +++ b/include/constants/battle_anim.h @@ -354,9 +354,9 @@ #define B_ANIM_BAIT_THROW 0x4 #define B_ANIM_ITEM_KNOCKOFF 0x5 #define B_ANIM_TURN_TRAP 0x6 -#define B_ANIM_HELD_ITEM_EFFECT 0x7 +#define B_ANIM_HELD_ITEM_EFFECT 0x7 #define B_ANIM_SMOKEBALL_ESCAPE 0x8 -#define B_ANIM_FOCUS_BAND 0x9 +#define B_ANIM_FOCUS_BAND 0x9 #define B_ANIM_RAIN_CONTINUES 0xA #define B_ANIM_SUN_CONTINUES 0xB #define B_ANIM_SANDSTORM_CONTINUES 0xC diff --git a/src/mon_markings.c b/src/mon_markings.c index d444538e5..da633aacf 100644 --- a/src/mon_markings.c +++ b/src/mon_markings.c @@ -356,9 +356,8 @@ void FreeMonMarkingsMenu(void) u16 i; for (i = 0; i < 3; i++) - { FreeSpriteTilesByTag(sMenu->baseTileTag + i); - } + FreeSpritePaletteByTag(sMenu->basePaletteTag); FreeSpritePaletteByTag(sMenu->basePaletteTag + 1); for (i = 0; i < ARRAY_COUNT(sMenu->windowSprites); i++) @@ -385,20 +384,16 @@ bool8 HandleMonMarkingsMenuInput(void) if (JOY_NEW(DPAD_UP)) { - s8 pos; PlaySE(SE_SELECT); - pos = --sMenu->cursorPos; - if (pos < 0) + if (--sMenu->cursorPos < 0) sMenu->cursorPos = SELECTION_CANCEL; return TRUE; } if (JOY_NEW(DPAD_DOWN)) { - s8 pos; PlaySE(SE_SELECT); - pos = ++sMenu->cursorPos; - if (pos > SELECTION_CANCEL) + if (++sMenu->cursorPos > SELECTION_CANCEL) sMenu->cursorPos = 0; return TRUE; } diff --git a/src/pokemon_storage_system_8.c b/src/pokemon_storage_system_8.c index b14eb9844..cdd7728a2 100644 --- a/src/pokemon_storage_system_8.c +++ b/src/pokemon_storage_system_8.c @@ -595,25 +595,25 @@ void InitItemInfoWindow(void) bool8 UpdateItemInfoWindowSlideIn(void) { - s32 i, var; + s32 i, pos; if (gPSSData->itemInfoWindowOffset == 0) return FALSE; gPSSData->itemInfoWindowOffset--; - var = 25 - gPSSData->itemInfoWindowOffset; - for (i = 0; i < var; i++) + pos = 25 - gPSSData->itemInfoWindowOffset; + for (i = 0; i < pos; i++) { WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->itemInfoWindowOffset + i, i, 12, 1, 8, 15, 25); } - DrawItemInfoWindow(var); + DrawItemInfoWindow(pos); return (gPSSData->itemInfoWindowOffset != 0); } bool8 UpdateItemInfoWindowSlideOut(void) { - s32 i, var; + s32 i, pos; if (gPSSData->itemInfoWindowOffset == 25) return FALSE; @@ -622,28 +622,28 @@ bool8 UpdateItemInfoWindowSlideOut(void) FillBgTilemapBufferRect(0, 0, 25, 11, 1, 10, 17); gPSSData->itemInfoWindowOffset++; - var = 25 - gPSSData->itemInfoWindowOffset; - for (i = 0; i < var; i++) + pos = 25 - gPSSData->itemInfoWindowOffset; + for (i = 0; i < pos; i++) { WriteSequenceToBgTilemapBuffer(0, GetBgAttribute(0, BG_ATTR_BASETILE) + 0x14 + gPSSData->itemInfoWindowOffset + i, i, 12, 1, 8, 15, 25); } - DrawItemInfoWindow(var); + DrawItemInfoWindow(pos); - FillBgTilemapBufferRect(0, 0, var, 11, 1, 10, 0x11); + FillBgTilemapBufferRect(0, 0, pos, 11, 1, 10, 0x11); return (gPSSData->itemInfoWindowOffset != 25); } -static void DrawItemInfoWindow(u32 pos) +static void DrawItemInfoWindow(u32 x) { - if (pos != 0) + if (x != 0) { - FillBgTilemapBufferRect(0, 0x1A4, 0, 0xB, pos, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x9A4, 0, 0x14, pos, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A4, 0, 0xB, x, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x9A4, 0, 0x14, x, 1, 0xFu); } - FillBgTilemapBufferRect(0, 0x1A5, pos, 0xC, 1, 8, 0xFu); - FillBgTilemapBufferRect(0, 0x1A6, pos, 0xB, 1, 1, 0xFu); - FillBgTilemapBufferRect(0, 0x1A7, pos, 0x14, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A5, x, 0xC, 1, 8, 0xFu); + FillBgTilemapBufferRect(0, 0x1A6, x, 0xB, 1, 1, 0xFu); + FillBgTilemapBufferRect(0, 0x1A7, x, 0x14, 1, 1, 0xFu); ScheduleBgCopyTilemapToVram(0); }