From f2480e0fd54b3379215846dcac4d87ad1611e81d Mon Sep 17 00:00:00 2001 From: Jesus Arechiga Date: Sat, 26 Mar 2022 00:30:21 -0700 Subject: [PATCH 01/29] Updates to INSTALL.md for Apple Silicon Macs Apple Silicon Macs new default bash installs Homebrew in a different directory than Intel macs, and thus breaks compatibility of some of the build commands. New notes are added specifically for Apple Silicon Mac users. There was previous discussion in the pokeemerald discord that helped verify these additional requirements for Apple Silicon Macs, and thus should also be changed in that repo's INSTALL.md --- INSTALL.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 0ae7a2eae..d9d9e0949 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -236,13 +236,19 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for > This guide installs libpng via Homebrew as it is the easiest method, however advanced users can install libpng through other means if they so desire. +
+ Note for Apple Silicon (M1) Mac users... + +> Currently, Homebrew and libng must be installed via Rosetta on Apple Silicon Macs. Before continuing, create a [Terminal shell profile with Rosetta](https://www.astroworldcreations.com/blog/apple-silicon-and-legacy-command-line-software). Be sure to run the commands corresponding to Apple Silicon (M1). +
1. Open the Terminal. 2. If Homebrew is not installed, then install [Homebrew](https://brew.sh/) by following the instructions on the website. 3. Run the following command to install libpng. ```bash - brew install libpng + brew install libpng # Intel Macs + /usr/local/bin/brew install libpng # Apple Silicon (M1) Macs ``` libpng is now installed. @@ -265,11 +271,14 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for ```bash export DEVKITPRO=/opt/devkitpro - echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc + echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc # Intel Macs + echo "export DEVKITPRO=$DEVKITPRO" >> ~/.zshrc # Apple Silicon (M1) Macs export DEVKITARM=$DEVKITPRO/devkitARM - echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc + echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc # Intel Macs + echo "export DEVKITARM=$DEVKITARM" >> ~/.zshrc # Apple Silicon (M1) Macs - echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile + echo "if [ -f ~/.bashrc ]; then . ~/.bashrc; fi" >> ~/.bash_profile # Intel Macs + echo "if [ -f ~/.zshrc ]; then . ~/.zshrc; fi" >> ~/.zprofile # Apple Silicon (M1) Macs ``` ### Choosing where to store pokefirered (macOS) @@ -548,4 +557,4 @@ To compile the `modern` target with this toolchain, the subdirectories `lib`, `i * [porymap](https://github.com/huderlem/porymap) for viewing and editing maps * [poryscript](https://github.com/huderlem/poryscript) for scripting ([VS Code extension](https://marketplace.visualstudio.com/items?itemName=karathan.poryscript)) -* [Tilemap Studio](https://github.com/Rangi42/tilemap-studio) for viewing and editing tilemaps \ No newline at end of file +* [Tilemap Studio](https://github.com/Rangi42/tilemap-studio) for viewing and editing tilemaps From 81efd8f9f88373f061d5ee66408fa6723bbcabca Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 24 Jan 2023 16:23:46 -0500 Subject: [PATCH 02/29] Document script_menu --- include/constants/menu.h | 2 + src/script_menu.c | 543 +++++++++++++++++++++------------------ 2 files changed, 289 insertions(+), 256 deletions(-) diff --git a/include/constants/menu.h b/include/constants/menu.h index aed98dec4..f6ac73efb 100644 --- a/include/constants/menu.h +++ b/include/constants/menu.h @@ -70,6 +70,8 @@ #define MULTICHOICE_JOIN_OR_LEAD 63 #define MULTICHOICE_TRAINER_TOWER_MODE 64 +#define MULTICHOICE_NONE 255 + #define LISTMENU_BADGES 0 #define LISTMENU_SILPHCO_FLOORS 1 #define LISTMENU_ROCKET_HIDEOUT_FLOORS 2 diff --git a/src/script_menu.c b/src/script_menu.c index 49f5402b5..f3bf33587 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -14,6 +14,10 @@ #include "constants/seagallop.h" #include "constants/menu.h" +#define GFXTAG_FOSSIL 7000 + +#define MULTICHOICE(name) {.list = name, .count = ARRAY_COUNT(name)} + struct MultichoiceListStruct { const struct MenuAction * list; @@ -35,59 +39,59 @@ static void DestroyScriptMenuWindow(u8 windowId); static u8 CreateWindowFromRect(u8 left, u8 top, u8 width, u8 height); -static const struct MenuAction sScriptMultiChoiceMenu_YesNo[] = { +static const struct MenuAction sMultichoiceList_YesNo[] = { { gText_Yes }, { gText_No } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerCardIconTint[] = { +static const struct MenuAction sMultichoiceList_TrainerCardIconTint[] = { { gText_Normal }, { gText_Black }, { gText_Pink }, { gText_Sepia } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Quit[] = { { gText_HallOfFame }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Quit[] = { +static const struct MenuAction sMultichoiceList_Eggs_Quit[] = { { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_Victories_Quit[] = { { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Eggs_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Victories_Quit[] = { { gText_HallOfFame }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eggs_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_Eggs_Victories_Quit[] = { { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit[] = { +static const struct MenuAction sMultichoiceList_HOF_Eggs_Victories_Quit[] = { { gText_HallOfFame }, { gText_Eggs }, { gText_Victories }, { gText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] = { +static const struct MenuAction sMultichoiceList_TrainerSchoolWhiteboard[] = { { gText_Slp }, { gText_Psn }, { gText_Par }, @@ -96,13 +100,13 @@ static const struct MenuAction sScriptMultiChoiceMenu_TrainerSchoolWhiteboard[] { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo[] = { +static const struct MenuAction sMultichoiceList_YesNoInfo[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[] = { +static const struct MenuAction sMultichoiceList_SingleDoubleMultiInfoExit[] = { { gText_SingleBattle }, { gText_DoubleBattle }, { gText_MultiBattle }, @@ -110,59 +114,59 @@ static const struct MenuAction sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit[ { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_YesNoInfo2[] = { +static const struct MenuAction sMultichoiceList_YesNoInfo2[] = { { gText_Yes }, { gText_No }, { gText_Info } }; -static const struct MenuAction sScriptMultiChoiceMenu_ChallengeInfoExit[] = { +static const struct MenuAction sMultichoiceList_ChallengeInfoExit[] = { { gText_MakeAChallenge }, { gText_Info_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_RooftopB1F[] = { +static const struct MenuAction sMultichoiceList_RooftopB1F[] = { { gText_Rooftop }, { gText_B1F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Helix[] = { +static const struct MenuAction sMultichoiceList_Helix[] = { { gText_HelixFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Dome[] = { +static const struct MenuAction sMultichoiceList_Dome[] = { { gText_DomeFossil }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Amber[] = { +static const struct MenuAction sMultichoiceList_Amber[] = { { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_HelixAmber[] = { +static const struct MenuAction sMultichoiceList_HelixAmber[] = { { gText_HelixFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_DomeAmber[] = { +static const struct MenuAction sMultichoiceList_DomeAmber[] = { { gText_DomeFossil }, { gText_OldAmber }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_CeladonVendingMachine[] = { +static const struct MenuAction sMultichoiceList_CeladonVendingMachine[] = { { gText_FreshWater_200 }, { gText_SodaPop_300 }, { gText_Lemonade_350 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerTMPrizes[] = { { gText_Tm13_4000Coins }, { gText_Tm23_3500Coins }, { gText_Tm24_4000Coins }, @@ -171,7 +175,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerTMPrizes[] = { { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerBattleItemPrizes[] = { { gText_SmokeBall_800Coins }, { gText_MiracleSeed_1000Coins }, { gText_Charcoal_1000Coins }, @@ -180,23 +184,23 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerBattleItemPrizes { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter[] = { +static const struct MenuAction sMultichoiceList_GameCornerCoinPurchaseCounter[] = { { gText_50Coins_1000 }, { gText_500Coins_10000 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Excellent_NotSoBad[] = { +static const struct MenuAction sMultichoiceList_Excellent_NotSoBad[] = { { gText_Excellent }, { gText_NotSoBad } }; -static const struct MenuAction sScriptMultiChoiceMenu_RightLeft[] = { +static const struct MenuAction sMultichoiceList_RightLeft[] = { { gText_Right }, { gText_Left } }; -static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { +static const struct MenuAction sMultichoiceList_DeptStoreElevator[] = { { gText_5F_2 }, { gText_4F_2 }, { gText_3F_2 }, @@ -205,91 +209,91 @@ static const struct MenuAction sScriptMultiChoiceMenu_DeptStoreElevator[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWater[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWater[] = { { gText_FreshWater }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPop[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlSodaPop[] = { { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterSodaPop[] = { { gText_FreshWater }, { gText_SodaPop }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlLemonade[] = { { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterLemonade[] = { { gText_FreshWater }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlSodaPopLemonade[] = { { gText_SodaPop }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade[] = { +static const struct MenuAction sMultichoiceList_ThirstyGirlFreshWaterSodaPopLemonade[] = { { gText_FreshWater }, { gText_SodaPop }, { gText_Lemonade }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_0[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_0[] = { { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_1[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_1[] = { { gText_RedShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_2[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_2[] = { { gText_YellowShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_3[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_3[] = { { gText_RedShard }, { gText_YellowShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_4[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_4[] = { { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_5[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_5[] = { { gText_RedShard }, { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_6[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_6[] = { { gText_YellowShard }, { gText_BlueShard }, { gText_GreenShard }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { +static const struct MenuAction sMultichoiceList_Unref_Shards_7[] = { { gText_RedShard }, { gText_YellowShard }, { gText_BlueShard }, @@ -297,7 +301,7 @@ static const struct MenuAction sScriptMultiChoiceMenu_Unref_Shards_7[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { +static const struct MenuAction sMultichoiceList_Eeveelutions[] = { { gText_Eevee }, { gText_Flareon }, { gText_Jolteon }, @@ -305,12 +309,12 @@ static const struct MenuAction sScriptMultiChoiceMenu_Eeveelutions[] = { { gText_QuitLooking } }; -static const struct MenuAction sScriptMultiChoiceMenu_BikeShop[] = { +static const struct MenuAction sMultichoiceList_BikeShop[] = { { gText_Bicycle_Price }, { gText_NoThanks } }; -static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] = { +static const struct MenuAction sMultichoiceList_GameCornerPokemonPrizes[] = { #if defined(FIRERED) { gText_Abra_180Coins }, { gText_Clefairy_500Coins }, @@ -327,81 +331,81 @@ static const struct MenuAction sScriptMultiChoiceMenu_GameCornerPokemonPrizes[] { gText_NoThanks_2 } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeCenter_Colosseum[] = { +static const struct MenuAction sMultichoiceList_TradeCenter_Colosseum[] = { { gText_TradeCenter }, { gText_Colosseum }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Link_Wireless[] = { +static const struct MenuAction sMultichoiceList_Link_Wireless[] = { { gText_GameLinkCable }, { gText_Wireless }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_RocketHideoutElevator[] = { +static const struct MenuAction sMultichoiceList_RocketHideoutElevator[] = { { gText_B1F }, { gText_B2F }, { gText_B4F }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_LinkedDirectUnion[] = { +static const struct MenuAction sMultichoiceList_LinkedDirectUnion[] = { { gText_LinkedGamePlay }, { gText_DirectCorner }, { gText_UnionRoom }, { gOtherText_Quit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island23[] = { +static const struct MenuAction sMultichoiceList_Island23[] = { { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island13[] = { +static const struct MenuAction sMultichoiceList_Island13[] = { { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Island12[] = { +static const struct MenuAction sMultichoiceList_Island12[] = { { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumCrush[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_BerryCrush }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_48[] = { +static const struct MenuAction sMultichoiceList_48[] = { { gText_EmptyLinkService1 }, { gText_EmptyLinkService2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseum_2[] = { +static const struct MenuAction sMultichoiceList_TradeColosseum_2[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_PokejumpDodrio[] = { +static const struct MenuAction sMultichoiceList_PokejumpDodrio[] = { { gText_PokemonJump }, { gText_DodrioBerryPicking }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Mushrooms[] = { +static const struct MenuAction sMultichoiceList_Mushrooms[] = { { gText_2Tinymushrooms }, { gText_1BigMushroom } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumBlankCrush[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_RecordCorner }, @@ -409,78 +413,78 @@ static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlankCrush[] { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TradeColosseumBlank[] = { +static const struct MenuAction sMultichoiceList_TradeColosseumBlank[] = { { gText_TradeCenter }, { gText_Colosseum_2 }, { gText_RecordCorner }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavel[] = { +static const struct MenuAction sMultichoiceList_SeviiNavel[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiBirth[] = { +static const struct MenuAction sMultichoiceList_SeviiBirth[] = { { gText_SeviiIslands }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeviiNavelBirth[] = { +static const struct MenuAction sMultichoiceList_SeviiNavelBirth[] = { { gText_SeviiIslands }, { gText_NavelRock }, { gText_BirthIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Seagallop123[] = { +static const struct MenuAction sMultichoiceList_Seagallop123[] = { { gText_OneIsland }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV23[] = { +static const struct MenuAction sMultichoiceList_SeagallopV23[] = { { gText_Vermilion }, { gText_TwoIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV13[] = { +static const struct MenuAction sMultichoiceList_SeagallopV13[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_ThreeIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopV12[] = { +static const struct MenuAction sMultichoiceList_SeagallopV12[] = { { gText_Vermilion }, { gText_OneIsland }, { gText_TwoIsland }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_SeagallopVermilion[] = { +static const struct MenuAction sMultichoiceList_SeagallopVermilion[] = { { gText_Vermilion }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_62[] = { +static const struct MenuAction sMultichoiceList_62[] = { { gText_Multichoice_Empty1 }, { gText_Multichoice_Empty2 }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_JoinOrLead[] = { +static const struct MenuAction sMultichoiceList_JoinOrLead[] = { { gText_JoinGroup }, { gText_BecomeLeader }, { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { +static const struct MenuAction sMultichoiceList_TrainerTowerMode[] = { { gOtherText_Single }, { gOtherText_Double }, { gOtherText_Knockout }, @@ -488,76 +492,76 @@ static const struct MenuAction sScriptMultiChoiceMenu_TrainerTowerMode[] = { { gOtherText_Exit } }; -static const struct MenuAction sScriptMultiChoiceMenu_Exit[] = { +static const struct MenuAction sMultichoiceList_Exit[] = { { gOtherText_Exit } }; -const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = { - { sScriptMultiChoiceMenu_YesNo, NELEMS(sScriptMultiChoiceMenu_YesNo) }, - { sScriptMultiChoiceMenu_Eeveelutions, NELEMS(sScriptMultiChoiceMenu_Eeveelutions) }, - { sScriptMultiChoiceMenu_TrainerCardIconTint, NELEMS(sScriptMultiChoiceMenu_TrainerCardIconTint) }, - { sScriptMultiChoiceMenu_HOF_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Quit) }, - { sScriptMultiChoiceMenu_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Quit) }, - { sScriptMultiChoiceMenu_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Victories_Quit) }, - { sScriptMultiChoiceMenu_HOF_Eggs_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Quit) }, - { sScriptMultiChoiceMenu_HOF_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Victories_Quit) }, - { sScriptMultiChoiceMenu_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_Eggs_Victories_Quit) }, - { sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit, NELEMS(sScriptMultiChoiceMenu_HOF_Eggs_Victories_Quit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_Exit, NELEMS(sScriptMultiChoiceMenu_Exit) }, - { sScriptMultiChoiceMenu_BikeShop, NELEMS(sScriptMultiChoiceMenu_BikeShop) }, - { sScriptMultiChoiceMenu_GameCornerPokemonPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerPokemonPrizes) }, - { sScriptMultiChoiceMenu_TrainerSchoolWhiteboard, NELEMS(sScriptMultiChoiceMenu_TrainerSchoolWhiteboard) }, - { sScriptMultiChoiceMenu_YesNoInfo, NELEMS(sScriptMultiChoiceMenu_YesNoInfo) }, - { sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit, NELEMS(sScriptMultiChoiceMenu_SingleDoubleMultiInfoExit) }, - { sScriptMultiChoiceMenu_YesNoInfo2, NELEMS(sScriptMultiChoiceMenu_YesNoInfo2) }, - { sScriptMultiChoiceMenu_ChallengeInfoExit, NELEMS(sScriptMultiChoiceMenu_ChallengeInfoExit) }, - { sScriptMultiChoiceMenu_RooftopB1F, NELEMS(sScriptMultiChoiceMenu_RooftopB1F) }, - { sScriptMultiChoiceMenu_Helix, NELEMS(sScriptMultiChoiceMenu_Helix) }, - { sScriptMultiChoiceMenu_Dome, NELEMS(sScriptMultiChoiceMenu_Dome) }, - { sScriptMultiChoiceMenu_Amber, NELEMS(sScriptMultiChoiceMenu_Amber) }, - { sScriptMultiChoiceMenu_HelixAmber, NELEMS(sScriptMultiChoiceMenu_HelixAmber) }, - { sScriptMultiChoiceMenu_DomeAmber, NELEMS(sScriptMultiChoiceMenu_DomeAmber) }, - { sScriptMultiChoiceMenu_CeladonVendingMachine, NELEMS(sScriptMultiChoiceMenu_CeladonVendingMachine) }, - { sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter, NELEMS(sScriptMultiChoiceMenu_GameCornerCoinPurchaseCounter) }, - { sScriptMultiChoiceMenu_Excellent_NotSoBad, NELEMS(sScriptMultiChoiceMenu_Excellent_NotSoBad) }, - { sScriptMultiChoiceMenu_RightLeft, NELEMS(sScriptMultiChoiceMenu_RightLeft) }, - { sScriptMultiChoiceMenu_GameCornerTMPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerTMPrizes) }, - { sScriptMultiChoiceMenu_DeptStoreElevator, NELEMS(sScriptMultiChoiceMenu_DeptStoreElevator) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWater, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWater) }, - { sScriptMultiChoiceMenu_ThirstyGirlSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPop) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPop) }, - { sScriptMultiChoiceMenu_ThirstyGirlLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlSodaPopLemonade) }, - { sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade, NELEMS(sScriptMultiChoiceMenu_ThirstyGirlFreshWaterSodaPopLemonade) }, - { sScriptMultiChoiceMenu_TradeCenter_Colosseum, NELEMS(sScriptMultiChoiceMenu_TradeCenter_Colosseum) }, - { sScriptMultiChoiceMenu_Link_Wireless, NELEMS(sScriptMultiChoiceMenu_Link_Wireless) }, - { sScriptMultiChoiceMenu_GameCornerBattleItemPrizes, NELEMS(sScriptMultiChoiceMenu_GameCornerBattleItemPrizes) }, - { sScriptMultiChoiceMenu_RocketHideoutElevator, NELEMS(sScriptMultiChoiceMenu_RocketHideoutElevator) }, - { sScriptMultiChoiceMenu_LinkedDirectUnion, NELEMS(sScriptMultiChoiceMenu_LinkedDirectUnion) }, - { sScriptMultiChoiceMenu_Island23, NELEMS(sScriptMultiChoiceMenu_Island23) }, - { sScriptMultiChoiceMenu_Island13, NELEMS(sScriptMultiChoiceMenu_Island13) }, - { sScriptMultiChoiceMenu_Island12, NELEMS(sScriptMultiChoiceMenu_Island12) }, - { sScriptMultiChoiceMenu_TradeColosseumCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumCrush) }, - { sScriptMultiChoiceMenu_48, NELEMS(sScriptMultiChoiceMenu_48) }, - { sScriptMultiChoiceMenu_PokejumpDodrio, NELEMS(sScriptMultiChoiceMenu_PokejumpDodrio) }, - { sScriptMultiChoiceMenu_TradeColosseum_2, NELEMS(sScriptMultiChoiceMenu_TradeColosseum_2) }, - { sScriptMultiChoiceMenu_Mushrooms, NELEMS(sScriptMultiChoiceMenu_Mushrooms) }, - { sScriptMultiChoiceMenu_TradeColosseumBlankCrush, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlankCrush) }, - { sScriptMultiChoiceMenu_TradeColosseumBlank, NELEMS(sScriptMultiChoiceMenu_TradeColosseumBlank) }, - { sScriptMultiChoiceMenu_SeviiNavel, NELEMS(sScriptMultiChoiceMenu_SeviiNavel) }, - { sScriptMultiChoiceMenu_SeviiBirth, NELEMS(sScriptMultiChoiceMenu_SeviiBirth) }, - { sScriptMultiChoiceMenu_SeviiNavelBirth, NELEMS(sScriptMultiChoiceMenu_SeviiNavelBirth) }, - { sScriptMultiChoiceMenu_Seagallop123, NELEMS(sScriptMultiChoiceMenu_Seagallop123) }, - { sScriptMultiChoiceMenu_SeagallopV23, NELEMS(sScriptMultiChoiceMenu_SeagallopV23) }, - { sScriptMultiChoiceMenu_SeagallopV13, NELEMS(sScriptMultiChoiceMenu_SeagallopV13) }, - { sScriptMultiChoiceMenu_SeagallopV12, NELEMS(sScriptMultiChoiceMenu_SeagallopV12) }, - { sScriptMultiChoiceMenu_SeagallopVermilion, NELEMS(sScriptMultiChoiceMenu_SeagallopVermilion) }, - { sScriptMultiChoiceMenu_62, NELEMS(sScriptMultiChoiceMenu_62) }, - { sScriptMultiChoiceMenu_JoinOrLead, NELEMS(sScriptMultiChoiceMenu_JoinOrLead) }, - { sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) } +static const struct MultichoiceListStruct sMultichoiceLists[] = { + [MULTICHOICE_YES_NO] = MULTICHOICE(sMultichoiceList_YesNo), + [MULTICHOICE_EEVEELUTIONS] = MULTICHOICE(sMultichoiceList_Eeveelutions), + [MULTICHOICE_TRAINER_CARD_ICON_TINT] = MULTICHOICE(sMultichoiceList_TrainerCardIconTint), + [MULTICHOICE_HOF_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Quit), + [MULTICHOICE_EGGS_QUIT] = MULTICHOICE(sMultichoiceList_Eggs_Quit), + [MULTICHOICE_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_Victories_Quit), + [MULTICHOICE_HOF_EGGS_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Eggs_Quit), + [MULTICHOICE_HOF_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Victories_Quit), + [MULTICHOICE_EGGS_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_Eggs_Victories_Quit), + [MULTICHOICE_HOF_EGGS_VICTORIES_QUIT] = MULTICHOICE(sMultichoiceList_HOF_Eggs_Victories_Quit), + [MULTICHOICE_EXIT] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_EXIT_2] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_EXIT_3] = MULTICHOICE(sMultichoiceList_Exit), + [MULTICHOICE_BIKE_SHOP] = MULTICHOICE(sMultichoiceList_BikeShop), + [MULTICHOICE_GAME_CORNER_POKEMON_PRIZES] = MULTICHOICE(sMultichoiceList_GameCornerPokemonPrizes), + [MULTICHOICE_TRAINER_SCHOOL_WHITEBOARD] = MULTICHOICE(sMultichoiceList_TrainerSchoolWhiteboard), + [MULTICHOICE_YES_NO_INFO] = MULTICHOICE(sMultichoiceList_YesNoInfo), + [MULTICHOICE_SINGLE_DOUBLE_MULTI_INFO_EXIT] = MULTICHOICE(sMultichoiceList_SingleDoubleMultiInfoExit), + [MULTICHOICE_YES_NO_INFO_2] = MULTICHOICE(sMultichoiceList_YesNoInfo2), + [MULTICHOICE_CHALLENGE_INFO_EXIT] = MULTICHOICE(sMultichoiceList_ChallengeInfoExit), + [MULTICHOICE_ROOFTOP_B1F] = MULTICHOICE(sMultichoiceList_RooftopB1F), + [MULTICHOICE_HELIX] = MULTICHOICE(sMultichoiceList_Helix), + [MULTICHOICE_DOME] = MULTICHOICE(sMultichoiceList_Dome), + [MULTICHOICE_AMBER] = MULTICHOICE(sMultichoiceList_Amber), + [MULTICHOICE_HELIX_AMBER] = MULTICHOICE(sMultichoiceList_HelixAmber), + [MULTICHOICE_DOME_AMBER] = MULTICHOICE(sMultichoiceList_DomeAmber), + [MULTICHOICE_CELADON_VENDING_MACHINE] = MULTICHOICE(sMultichoiceList_CeladonVendingMachine), + [MULTICHOICE_GAME_CORNER_COIN_PURCHASE_COUNTER] = MULTICHOICE(sMultichoiceList_GameCornerCoinPurchaseCounter), + [MULTICHOICE_EXCELLENT_NOT_SO_BAD] = MULTICHOICE(sMultichoiceList_Excellent_NotSoBad), + [MULTICHOICE_RIGHT_LEFT] = MULTICHOICE(sMultichoiceList_RightLeft), + [MULTICHOICE_GAME_CORNER_TMPRIZES] = MULTICHOICE(sMultichoiceList_GameCornerTMPrizes), + [MULTICHOICE_DEPT_STORE_ELEVATOR] = MULTICHOICE(sMultichoiceList_DeptStoreElevator), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWater), + [MULTICHOICE_THIRSTY_GIRL_SODA_POP] = MULTICHOICE(sMultichoiceList_ThirstyGirlSodaPop), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterSodaPop), + [MULTICHOICE_THIRSTY_GIRL_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlLemonade), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterLemonade), + [MULTICHOICE_THIRSTY_GIRL_SODA_POP_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlSodaPopLemonade), + [MULTICHOICE_THIRSTY_GIRL_FRESH_WATER_SODA_POP_LEMONADE] = MULTICHOICE(sMultichoiceList_ThirstyGirlFreshWaterSodaPopLemonade), + [MULTICHOICE_TRADE_CENTER_COLOSSEUM] = MULTICHOICE(sMultichoiceList_TradeCenter_Colosseum), + [MULTICHOICE_LINK_WIRELESS] = MULTICHOICE(sMultichoiceList_Link_Wireless), + [MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES] = MULTICHOICE(sMultichoiceList_GameCornerBattleItemPrizes), + [MULTICHOICE_ROCKET_HIDEOUT_ELEVATOR] = MULTICHOICE(sMultichoiceList_RocketHideoutElevator), + [MULTICHOICE_LINKED_DIRECT_UNION] = MULTICHOICE(sMultichoiceList_LinkedDirectUnion), + [MULTICHOICE_ISLAND_23] = MULTICHOICE(sMultichoiceList_Island23), + [MULTICHOICE_ISLAND_13] = MULTICHOICE(sMultichoiceList_Island13), + [MULTICHOICE_ISLAND_12] = MULTICHOICE(sMultichoiceList_Island12), + [MULTICHOICE_TRADE_COLOSSEUM_CRUSH] = MULTICHOICE(sMultichoiceList_TradeColosseumCrush), + [MULTICHOICE_48] = MULTICHOICE(sMultichoiceList_48), + [MULTICHOICE_POKEJUMP_DODRIO] = MULTICHOICE(sMultichoiceList_PokejumpDodrio), + [MULTICHOICE_TRADE_COLOSSEUM_2] = MULTICHOICE(sMultichoiceList_TradeColosseum_2), + [MULTICHOICE_MUSHROOMS] = MULTICHOICE(sMultichoiceList_Mushrooms), + [MULTICHOICE_TRADE_COLOSSEUM_BLANK_CRUSH] = MULTICHOICE(sMultichoiceList_TradeColosseumBlankCrush), + [MULTICHOICE_TRADE_COLOSSEUM_BLANK] = MULTICHOICE(sMultichoiceList_TradeColosseumBlank), + [MULTICHOICE_SEVII_NAVEL] = MULTICHOICE(sMultichoiceList_SeviiNavel), + [MULTICHOICE_SEVII_BIRTH] = MULTICHOICE(sMultichoiceList_SeviiBirth), + [MULTICHOICE_SEVII_NAVEL_BIRTH] = MULTICHOICE(sMultichoiceList_SeviiNavelBirth), + [MULTICHOICE_SEAGALLOP_123] = MULTICHOICE(sMultichoiceList_Seagallop123), + [MULTICHOICE_SEAGALLOP_V23] = MULTICHOICE(sMultichoiceList_SeagallopV23), + [MULTICHOICE_SEAGALLOP_V13] = MULTICHOICE(sMultichoiceList_SeagallopV13), + [MULTICHOICE_SEAGALLOP_V12] = MULTICHOICE(sMultichoiceList_SeagallopV12), + [MULTICHOICE_SEAGALLOP_VERMILION] = MULTICHOICE(sMultichoiceList_SeagallopVermilion), + [MULTICHOICE_62] = MULTICHOICE(sMultichoiceList_62), + [MULTICHOICE_JOIN_OR_LEAD] = MULTICHOICE(sMultichoiceList_JoinOrLead), + [MULTICHOICE_TRAINER_TOWER_MODE] = MULTICHOICE(sMultichoiceList_TrainerTowerMode), }; // From Cool to Berries goes unused @@ -627,8 +631,8 @@ static const struct OamData sMuseumFossilOamData = { }; static const struct SpriteTemplate sMuseumFossilSprTemplate = { - .tileTag = 7000, - .paletteTag = 0xFFFF, + .tileTag = GFXTAG_FOSSIL, + .paletteTag = TAG_NONE, .oam = &sMuseumFossilOamData, .anims = sMuseumFossilAnimCmdTable, .affineAnims = gDummySpriteAffineAnimTable, @@ -641,25 +645,25 @@ static const u16 sMuseumKabutopsSprTiles[] = INCBIN_U16("graphics/script_menu/ka static const u16 sMuseumKabutopsSprPalette[] = INCBIN_U16("graphics/script_menu/kabutops_fossil.gbapal"); static const struct SpriteSheet sMuseumKabutopsSprSheets[] = { - {sMuseumKabutopsSprTiles, 0x800, 7000}, + {sMuseumKabutopsSprTiles, sizeof(sMuseumKabutopsSprTiles), GFXTAG_FOSSIL}, {} }; static const struct SpriteSheet sMuseumAerodactylSprSheets[] = { - {sMuseumAerodactylSprTiles, 0x800, 7000}, + {sMuseumAerodactylSprTiles, sizeof(sMuseumAerodactylSprTiles), GFXTAG_FOSSIL}, {} }; static const u8 *const sSeagallopDestStrings[] = { - gText_Vermilion, - gText_OneIsland, - gText_TwoIsland, - gText_ThreeIsland, - gText_FourIsland, - gText_FiveIsland, - gText_SixIsland, - gText_SevenIsland + [SEAGALLOP_VERMILION_CITY] = gText_Vermilion, + [SEAGALLOP_ONE_ISLAND] = gText_OneIsland, + [SEAGALLOP_TWO_ISLAND] = gText_TwoIsland, + [SEAGALLOP_THREE_ISLAND] = gText_ThreeIsland, + [SEAGALLOP_FOUR_ISLAND] = gText_FourIsland, + [SEAGALLOP_FIVE_ISLAND] = gText_FiveIsland, + [SEAGALLOP_SIX_ISLAND] = gText_SixIsland, + [SEAGALLOP_SEVEN_ISLAND] = gText_SevenIsland, }; static u16 GetStringTilesWide(const u8 *str) @@ -714,8 +718,8 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres if ((ignoreBpress & 2) || QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { ignoreBpress &= 1; - count = gScriptMultiChoiceMenus[mcId].count; - list = gScriptMultiChoiceMenus[mcId].list; + count = sMultichoiceLists[mcId].count; + list = sMultichoiceLists[mcId].list; strWidth = 0; for (i = 0; i < count; i++) { @@ -729,7 +733,9 @@ static void DrawVerticalMultichoiceMenu(u8 left, u8 top, u8 mcId, u8 ignoreBpres height = GetMCWindowHeight(count); windowId = CreateWindowFromRect(left, top, width, height); SetStdWindowBorderStyle(windowId, FALSE); - if (mcId == 30 || mcId == 13 || mcId == 41) + if (mcId == MULTICHOICE_GAME_CORNER_TMPRIZES + || mcId == MULTICHOICE_BIKE_SHOP + || mcId == MULTICHOICE_GAME_CORNER_BATTLE_ITEM_PRIZES) MultichoiceList_PrintItems(windowId, FONT_NORMAL, 8, 2, 14, count, list, 0, 2); else MultichoiceList_PrintItems(windowId, FONT_NORMAL, 8, 2, 14, count, list, 0, 2); @@ -766,21 +772,30 @@ static u8 GetMCWindowHeight(u8 count) } } +#define tTimer data[2] +#define tIgnoreBPress data[4] +#define tWrapAround data[5] +#define tWindowId data[6] +#define tMultichoiceId data[7] + static void CreateMCMenuInputHandlerTask(u8 ignoreBpress, u8 count, u8 windowId, u8 mcId) { u8 taskId; - if (mcId == 39 || mcId == 47 || mcId == 50) + if (mcId == MULTICHOICE_TRADE_CENTER_COLOSSEUM + || mcId == MULTICHOICE_TRADE_COLOSSEUM_CRUSH + || mcId == MULTICHOICE_TRADE_COLOSSEUM_2) sDelay = 12; else sDelay = 0; + taskId = CreateTask(Task_MultichoiceMenu_HandleInput, 80); - gTasks[taskId].data[4] = ignoreBpress; + gTasks[taskId].tIgnoreBPress = ignoreBpress; if (count > 3) - gTasks[taskId].data[5] = TRUE; + gTasks[taskId].tWrapAround = TRUE; else - gTasks[taskId].data[5] = FALSE; - gTasks[taskId].data[6] = windowId; - gTasks[taskId].data[7] = mcId; + gTasks[taskId].tWrapAround = FALSE; + gTasks[taskId].tWindowId = windowId; + gTasks[taskId].tMultichoiceId = mcId; MultiChoicePrintHelpDescription(mcId); } @@ -794,18 +809,18 @@ static void Task_MultichoiceMenu_HandleInput(u8 taskId) sDelay--; else { - if (data[5] == FALSE) + if (tWrapAround == FALSE) input = Menu_ProcessInputNoWrapAround(); else input = Menu_ProcessInput(); if (JOY_NEW(DPAD_UP | DPAD_DOWN)) - MultiChoicePrintHelpDescription(data[7]); + MultiChoicePrintHelpDescription(tMultichoiceId); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - if (data[4]) + case MENU_B_PRESSED: + if (tIgnoreBPress) return; PlaySE(SE_SELECT); gSpecialVar_Result = SCR_MENU_CANCEL; @@ -814,7 +829,7 @@ static void Task_MultichoiceMenu_HandleInput(u8 taskId) gSpecialVar_Result = input; break; } - DestroyScriptMenuWindow(data[6]); + DestroyScriptMenuWindow(tWindowId); DestroyTask(taskId); ScriptContext_Enable(); } @@ -825,15 +840,15 @@ static void MultiChoicePrintHelpDescription(u8 mcId) { switch (mcId) { - case 39: + case MULTICHOICE_TRADE_CENTER_COLOSSEUM: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_CableClub_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; - case 47: + case MULTICHOICE_TRADE_COLOSSEUM_CRUSH: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_WirelessCenter_TradeBattleCrushCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; - case 50: + case MULTICHOICE_TRADE_COLOSSEUM_2: FillWindowPixelBuffer(0, PIXEL_FILL(1)); AddTextPrinterParameterized2(0, FONT_NORMAL, sDescriptionPtrs_WirelessCenter_TradeBattleCancel[Menu_GetCursorPos()], 0, NULL, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); break; @@ -865,23 +880,23 @@ static bool8 IsScriptActive(void) static void Task_YesNoMenu_HandleInput(u8 taskId) { s8 input; - if (gTasks[taskId].data[2] < 5) + if (gTasks[taskId].tTimer < 5) { - gTasks[taskId].data[2]++; + gTasks[taskId].tTimer++; } else { input = Menu_ProcessInputNoWrapClearOnChoose(); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - case 1: + case MENU_B_PRESSED: + case 1: // NO PlaySE(SE_SELECT); gSpecialVar_Result = FALSE; break; - case 0: + case 0: // YES gSpecialVar_Result = TRUE; break; } @@ -890,7 +905,7 @@ static void Task_YesNoMenu_HandleInput(u8 taskId) } } -bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount) +bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBpress, u8 columnCount) { const struct MenuAction * list; u8 count; @@ -902,16 +917,16 @@ bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 co gSpecialVar_Result = SCR_MENU_UNSET; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE) { - list = gScriptMultiChoiceMenus[multichoiceId].list; - count = gScriptMultiChoiceMenus[multichoiceId].count; + list = sMultichoiceLists[multichoiceId].list; + count = sMultichoiceLists[multichoiceId].count; width = GetMenuWidthFromList(list, count) + 1; rowCount = count / columnCount; taskId = CreateTask(Hask_MultichoiceGridMenu_HandleInput, 80); - 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], FONT_NORMAL_COPY_1, width * 8, 16, columnCount, rowCount, list); - MultichoiceGrid_InitCursor(gTasks[taskId].data[6], FONT_NORMAL_COPY_1, 0, 1, width * 8, columnCount, rowCount, 0); + gTasks[taskId].tIgnoreBPress = ignoreBpress; + gTasks[taskId].tWindowId = CreateWindowFromRect(left, top, width * columnCount, rowCount * 2); + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, FALSE); + MultichoiceGrid_PrintItems(gTasks[taskId].tWindowId, FONT_NORMAL_COPY_1, width * 8, 16, columnCount, rowCount, list); + MultichoiceGrid_InitCursor(gTasks[taskId].tWindowId, FONT_NORMAL_COPY_1, 0, 1, width * 8, columnCount, rowCount, 0); ScheduleBgCopyTilemapToVram(0); } return TRUE; @@ -923,10 +938,10 @@ static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) s8 input = Menu_ProcessInputGridLayout(); switch (input) { - case -2: + case MENU_NOTHING_CHOSEN: return; - case -1: - if (data[4]) + case MENU_B_PRESSED: + if (tIgnoreBPress) return; PlaySE(SE_SELECT); gSpecialVar_Result = SCR_MENU_CANCEL; @@ -935,11 +950,21 @@ static void Hask_MultichoiceGridMenu_HandleInput(u8 taskId) gSpecialVar_Result = input; break; } - DestroyScriptMenuWindow(data[6]); + DestroyScriptMenuWindow(tWindowId); DestroyTask(taskId); ScriptContext_Enable(); } +#undef tIgnoreBPress +#undef tWrapAround +#undef tWindowId +#undef tMultichoiceId + +#define tState data[0] +#define tSpecies data[1] +#define tSpriteId data[2] +#define tWindowId data[5] + bool8 CreatePCMenu(void) { if (FuncIsActiveTask(Task_MultichoiceMenu_HandleInput) == TRUE) @@ -954,7 +979,7 @@ static void CreatePCMenuWindow(void) u8 cursorWidth = GetMenuCursorDimensionByFont(FONT_NORMAL, 0); u8 height = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT); u8 windowWidth; - u8 nitems; + u8 numItems; u8 windowId; switch (GetStringTilesWide(gText_SPc)) { @@ -971,33 +996,33 @@ static void CreatePCMenuWindow(void) } if (FlagGet(FLAG_SYS_GAME_CLEAR)) { - nitems = 5; + numItems = 5; windowId = CreateWindowFromRect(0, 0, windowWidth, 10); SetStdWindowBorderStyle(windowId, FALSE); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame_2, cursorWidth, 50, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 66, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_HallOfFame_2, cursorWidth, 50, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 66, TEXT_SKIP_DRAW, NULL); } else { if (FlagGet(FLAG_SYS_POKEDEX_GET)) - nitems = 4; + numItems = 4; else - nitems = 3; - windowId = CreateWindowFromRect(0, 0, windowWidth, nitems * 2); + numItems = 3; + windowId = CreateWindowFromRect(0, 0, windowWidth, numItems * 2); SetStdWindowBorderStyle(windowId, FALSE); if (FlagGet(FLAG_SYS_POKEDEX_GET)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, 0xFF, NULL); - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 2 + 16 * (nitems - 1), 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_ProfOakSPc, cursorWidth, 34, TEXT_SKIP_DRAW, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_LogOff, cursorWidth, 2 + 16 * (numItems - 1), TEXT_SKIP_DRAW, NULL); } if (FlagGet(FLAG_SYS_NOT_SOMEONES_PC)) - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BillSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_BillSPc, cursorWidth, 2 , TEXT_SKIP_DRAW, NULL); else - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeoneSPc, cursorWidth, 2 , 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_SomeoneSPc, cursorWidth, 2 , TEXT_SKIP_DRAW, NULL); StringExpandPlaceholders(gStringVar4, gText_SPc); Menu_PrintFormatIntlPlayerName(windowId, gStringVar4, cursorWidth, 18); - Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, nitems, 0); - CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, numItems, 0); + CreateMCMenuInputHandlerTask(FALSE, numItems, windowId, MULTICHOICE_NONE); ScheduleBgCopyTilemapToVram(0); } @@ -1010,19 +1035,19 @@ void ScriptMenu_DisplayPCStartupPrompt(void) static void Task_ScriptShowMonPic(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - task->data[0]++; + task->tState++; break; case 1: break; case 2: - FreeResourcesAndDestroySprite(&gSprites[task->data[2]], task->data[2]); - task->data[0]++; + FreeResourcesAndDestroySprite(&gSprites[task->tSpriteId], task->tSpriteId); + task->tState++; break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1034,17 +1059,17 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) u8 taskId; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) return TRUE; - if (FindTaskIdByFunc(Task_ScriptShowMonPic) != 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) != TASK_NONE) return FALSE; spriteId = CreateMonSprite_PicBox(species, 8 * x + 40, 8 * y + 40, FALSE); taskId = CreateTask(Task_ScriptShowMonPic, 80); - gTasks[taskId].data[5] = CreateWindowFromRect(x, y, 8, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[1] = species; - gTasks[taskId].data[2] = spriteId; + gTasks[taskId].tWindowId = CreateWindowFromRect(x, y, 8, 8); + gTasks[taskId].tState = 0; + gTasks[taskId].tSpecies = species; + gTasks[taskId].tSpriteId = spriteId; gSprites[spriteId].callback = SpriteCallbackDummy; gSprites[spriteId].oam.priority = 0; - SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, TRUE); ScheduleBgCopyTilemapToVram(0); return TRUE; } @@ -1052,15 +1077,15 @@ bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y) bool8 (*ScriptMenu_HidePokemonPic(void))(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); - if (taskId == 0xFF) + if (taskId == TASK_NONE) return NULL; - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; return PicboxWait; } static bool8 PicboxWait(void) { - if (FindTaskIdByFunc(Task_ScriptShowMonPic) == 0xFF) + if (FindTaskIdByFunc(Task_ScriptShowMonPic) == TASK_NONE) return TRUE; else return FALSE; @@ -1070,20 +1095,20 @@ void PicboxCancel(void) { u8 taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); struct Task *task; - if (taskId != 0xFF) + if (taskId != TASK_NONE) { task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: case 1: case 2: - FreeResourcesAndDestroySprite(&gSprites[task->data[2]], task->data[2]); - DestroyScriptMenuWindow(task->data[5]); + FreeResourcesAndDestroySprite(&gSprites[task->tSpriteId], task->tSpriteId); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1093,20 +1118,20 @@ void PicboxCancel(void) void Task_WaitMuseumFossilPic(u8 taskId) { struct Task *task = &gTasks[taskId]; - switch (task->data[0]) + switch (task->tState) { case 0: - task->data[0]++; + task->tState++; break; case 1: break; case 2: - DestroySprite(&gSprites[task->data[2]]); - FreeSpriteTilesByTag(7000); - task->data[0]++; + DestroySprite(&gSprites[task->tSpriteId]); + FreeSpriteTilesByTag(GFXTAG_FOSSIL); + task->tState++; break; case 3: - DestroyScriptMenuWindow(task->data[5]); + DestroyScriptMenuWindow(task->tWindowId); DestroyTask(taskId); break; } @@ -1118,7 +1143,7 @@ bool8 OpenMuseumFossilPic(void) u8 taskId; if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) == TRUE) return TRUE; - if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != 0xFF) + if (FindTaskIdByFunc(Task_WaitMuseumFossilPic) != TASK_NONE) return FALSE; if (gSpecialVar_0x8004 == SPECIES_KABUTOPS) { @@ -1137,10 +1162,10 @@ bool8 OpenMuseumFossilPic(void) spriteId = CreateSprite(&sMuseumFossilSprTemplate, gSpecialVar_0x8005 * 8 + 40, gSpecialVar_0x8006 * 8 + 40, 0); gSprites[spriteId].oam.paletteNum = 13; taskId = CreateTask(Task_WaitMuseumFossilPic, 80); - gTasks[taskId].data[5] = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); - gTasks[taskId].data[0] = 0; - gTasks[taskId].data[2] = spriteId; - SetStdWindowBorderStyle(gTasks[taskId].data[5], TRUE); + gTasks[taskId].tWindowId = CreateWindowFromRect(gSpecialVar_0x8005, gSpecialVar_0x8006, 8, 8); + gTasks[taskId].tState = 0; + gTasks[taskId].tSpriteId = spriteId; + SetStdWindowBorderStyle(gTasks[taskId].tWindowId, TRUE); ScheduleBgCopyTilemapToVram(0); return TRUE; } @@ -1148,9 +1173,9 @@ bool8 OpenMuseumFossilPic(void) bool8 CloseMuseumFossilPic(void) { u8 taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); - if (taskId == 0xFF) + if (taskId == TASK_NONE) return FALSE; - gTasks[taskId].data[0]++; + gTasks[taskId].tState++; return TRUE; } @@ -1174,21 +1199,23 @@ void QLPlaybackCB_DestroyScriptMenuMonPicSprites(void) u8 taskId; s16 *data; ScriptContext_SetupScript(EventScript_ReleaseEnd); + taskId = FindTaskIdByFunc(Task_ScriptShowMonPic); - if (taskId != 0xFF) + if (taskId != TASK_NONE) { data = gTasks[taskId].data; - if (data[0] < 2) - FreeResourcesAndDestroySprite(&gSprites[data[2]], data[2]); + if (tState < 2) + FreeResourcesAndDestroySprite(&gSprites[tSpriteId], tSpriteId); } + taskId = FindTaskIdByFunc(Task_WaitMuseumFossilPic); - if (taskId != 0xFF) + if (taskId != TASK_NONE) { data = gTasks[taskId].data; - if (data[0] < 2) + if (tState < 2) { - DestroySprite(&gSprites[data[2]]); - FreeSpriteTilesByTag(7000); + DestroySprite(&gSprites[tSpriteId]); + FreeSpriteTilesByTag(GFXTAG_FOSSIL); } } } @@ -1197,9 +1224,9 @@ void DrawSeagallopDestinationMenu(void) { // 8004 = Starting location // 8005 = Page (0: Verm, One, Two, Three, Four, Other, Exit; 1: Four, Five, Six, Seven, Other, Exit) - u8 r4; + u8 destinationId; u8 top; - u8 nitems; + u8 numItems; u8 cursorWidth; u8 fontHeight; u8 windowId; @@ -1210,37 +1237,41 @@ void DrawSeagallopDestinationMenu(void) if (gSpecialVar_0x8005 == 1) { if (gSpecialVar_0x8004 < SEAGALLOP_FIVE_ISLAND) - r4 = SEAGALLOP_FIVE_ISLAND; + destinationId = SEAGALLOP_FIVE_ISLAND; else - r4 = SEAGALLOP_FOUR_ISLAND; - nitems = 5; + destinationId = SEAGALLOP_FOUR_ISLAND; + numItems = 5; top = 2; } else { - r4 = SEAGALLOP_VERMILION_CITY; - nitems = 6; + destinationId = SEAGALLOP_VERMILION_CITY; + numItems = 6; top = 0; } cursorWidth = GetMenuCursorDimensionByFont(FONT_NORMAL, 0); fontHeight = GetFontAttribute(FONT_NORMAL, FONTATTR_MAX_LETTER_HEIGHT); - windowId = CreateWindowFromRect(17, top, 11, nitems * 2); + windowId = CreateWindowFromRect(17, top, 11, numItems * 2); SetStdWindowBorderStyle(windowId, FALSE); - for (i = 0; i < nitems - 2; i++) + + // -2 excludes "Other" and "Exit", appended after the loop + for (i = 0; i < numItems - 2; i++) { - if (r4 != gSpecialVar_0x8004) - AddTextPrinterParameterized(windowId, FONT_NORMAL, sSeagallopDestStrings[r4], cursorWidth, i * 16 + 2, 0xFF, NULL); + if (destinationId != gSpecialVar_0x8004) + AddTextPrinterParameterized(windowId, FONT_NORMAL, sSeagallopDestStrings[destinationId], cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); else i--; - r4++; - if (r4 == SEAGALLOP_CINNABAR_ISLAND) - r4 = SEAGALLOP_VERMILION_CITY; + destinationId++; + + // Wrap around + if (destinationId == SEAGALLOP_SEVEN_ISLAND + 1) + destinationId = SEAGALLOP_VERMILION_CITY; } - AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Other, cursorWidth, i * 16 + 2, 0xFF, NULL); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gText_Other, cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); i++; - AddTextPrinterParameterized(windowId, FONT_NORMAL, gOtherText_Exit, cursorWidth, i * 16 + 2, 0xFF, NULL); - Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, nitems, 0); - CreateMCMenuInputHandlerTask(FALSE, nitems, windowId, 0xFF); + AddTextPrinterParameterized(windowId, FONT_NORMAL, gOtherText_Exit, cursorWidth, i * 16 + 2, TEXT_SKIP_DRAW, NULL); + Menu_InitCursor(windowId, FONT_NORMAL, 0, 2, 16, numItems, 0); + CreateMCMenuInputHandlerTask(FALSE, numItems, windowId, MULTICHOICE_NONE); ScheduleBgCopyTilemapToVram(0); } } From 0a2885744f8fcd091077b421362f83934141e2e7 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 30 Jan 2023 10:41:11 -0500 Subject: [PATCH 03/29] Colorize pokedex/caught_marker --- graphics/pokedex/caught_marker.png | Bin 105 -> 164 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/pokedex/caught_marker.png b/graphics/pokedex/caught_marker.png index 74f43ec80240e008b1e7b69817356756d98e96d4..dd2deb1251e85c21c03567cb778a984055003397 100644 GIT binary patch delta 146 zcmV;D0B!$iqydl_e**vj05&0`xBvhEFi=cXMVy?y0002Rw2S86#rF2@|NsAcVmYLg zV%5c@|Mu?g?&j6i)tsE1|Nj8ZK{@}6Ii&SuSpWb4FG)l}R0x@4U{ES&U|{<9u7E-B z-Mi-us&zo3G_>v+Lus(F83VhqaRLKFc^U%%B`ytWwX7Dj3;+NC07*qoM6N<$f(gb! AJ*&Y7hH}gMZ!~vlS$@jr$KxTNl`njxgN@xNAC{ZAX From c23e55ec943978fea63b27da507730cb6d221340 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 31 Jan 2023 12:22:41 -0500 Subject: [PATCH 04/29] Sync debug print functions --- include/config.h | 22 +++ include/gba/isagbprint.h | 92 +++++----- include/mini_printf.h | 52 ++++++ src/isagbprn.c | 93 +++++++++- src/main.c | 9 +- src/mini_printf.c | 355 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 578 insertions(+), 45 deletions(-) create mode 100644 include/mini_printf.h create mode 100644 src/mini_printf.c diff --git a/include/config.h b/include/config.h index 78651f023..956858e2d 100644 --- a/include/config.h +++ b/include/config.h @@ -13,6 +13,28 @@ // Fire Red likely forgot to define NDEBUG/NOAGBPRN before release, leading // to the inclusion of asserts in the retail ROM. +#ifndef NDEBUG +#define PRETTY_PRINT_OFF (0) +#define PRETTY_PRINT_MINI_PRINTF (1) +#define PRETTY_PRINT_LIBC (2) + +#define LOG_HANDLER_AGB_PRINT (0) +#define LOG_HANDLER_NOCASH_PRINT (1) +#define LOG_HANDLER_MGBA_PRINT (2) + +// Use this switch to choose a handler for pretty printing. +// NOTE: mini_printf supports a custom pretty printing formatter to display preproc encoded strings. (%S) +// some libc distributions (especially dkp arm-libc) will fail to link pretty printing. +#define PRETTY_PRINT_HANDLER (PRETTY_PRINT_OFF) + +// Use this switch to choose a handler for printf output. +// NOTE: These will only work on the respective emulators and should not be used in a productive environment. +// Some emulators or real hardware might (and is allowed to) crash if they are used. +// AGB_PRINT is supported on respective debug units. + +#define LOG_HANDLER (LOG_HANDLER_AGB_PRINT) +#endif // NDEBUG + // Define the game version for use elsewhere #if defined(FIRERED) #define GAME_VERSION VERSION_FIRE_RED diff --git a/include/gba/isagbprint.h b/include/gba/isagbprint.h index 7808b174c..de14b289e 100644 --- a/include/gba/isagbprint.h +++ b/include/gba/isagbprint.h @@ -1,55 +1,69 @@ #ifndef GUARD_GBA_ISAGBPRINT_H #define GUARD_GBA_ISAGBPRINT_H +#include "gba/types.h" + +#define MGBA_LOG_FATAL (0) +#define MGBA_LOG_ERROR (1) +#define MGBA_LOG_WARN (2) +#define MGBA_LOG_INFO (3) +#define MGBA_LOG_DEBUG (4) + #ifdef NDEBUG +#define DebugPrintf(pBuf, ...) +#define DebugPrintfLevel(level, pBuf, ...) +#define MgbaOpen() +#define MgbaClose() #define AGBPrintInit() -#define AGBPutc(cChr) -#define AGBPrint(pBuf) -#define AGBPrintf(pBuf, ...) -#define AGBPrintFlush1Block() -#define AGBPrintFlush() -#define AGBAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) #else -void AGBPrintInit(void); -void AGBPutc(const char cChr); -void AGBPrint(const char *pBuf); + +bool32 MgbaOpen(void); +void MgbaClose(void); +void MgbaPrintf(s32 level, const char *pBuf, ...); +void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram); +void NoCashGBAPrintf(const char *pBuf, ...); +void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram); void AGBPrintf(const char *pBuf, ...); -void AGBPrintFlush1Block(void); -void AGBPrintFlush(void); void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram); +void AGBPrintInit(void); + +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) + +#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__) + +#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT) + +#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__) + +#else // Default to AGBPrint + +#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__) +#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram) +#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__) + #endif - -#undef AGB_ASSERT -#ifdef NDEBUG -#define AGB_ASSERT(exp) -#else -#define AGB_ASSERT(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 1); -#endif - -#undef AGB_WARNING -#ifdef NDEBUG -#define AGB_WARNING(exp) -#else -#define AGB_WARNING(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 0); -#endif - -// for matching purposes - -#if MODERN -#define AGB_ASSERT_EX(exp, file, line) AGB_ASSERT(exp) -#define AGB_WARNING_EX(exp, file, line) AGB_WARNING(exp) -#else -#ifdef NDEBUG -#define AGB_ASSERT_EX(exp, file, line) -#else -#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 1); #endif #ifdef NDEBUG -#define AGB_WARNING_EX(exp, file, line) + +#define AGB_ASSERT(exp) +#define AGB_WARNING(exp) +#define AGB_ASSERT_EX(exp, file, line) +#define AGB_WARNING_EX(exp, file, line) + #else -#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 0); -#endif + +#define AGB_ASSERT(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, TRUE) +#define AGB_WARNING(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, FALSE) + +#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, FALSE); +#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, TRUE); + #endif #endif // GUARD_GBA_ISAGBPRINT_H diff --git a/include/mini_printf.h b/include/mini_printf.h new file mode 100644 index 000000000..a891327cc --- /dev/null +++ b/include/mini_printf.h @@ -0,0 +1,52 @@ +/* + * The Minimal snprintf() implementation + * + * Copyright (c) 2013 Michal Ludvig + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the auhor nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Courtey of https://github.com/mludvig/mini-printf + * stripped to reduce file size for agb needs + */ + +#ifndef __MINI_PRINTF__ +#define __MINI_PRINTF__ + +#include +#include "gba/types.h" + +#ifdef NDEBUG + +#define mini_vsnprintf(buffer, buffer_len, fmt, va) +#define mini_vpprintf(buf, fmt, va) + +#else + +s32 mini_vsnprintf(char* buffer, u32 buffer_len, const char *fmt, va_list va); +s32 mini_vpprintf(void* buf, const char *fmt, va_list va); + +#endif +#endif diff --git a/src/isagbprn.c b/src/isagbprn.c index 46195f72f..a038814e7 100644 --- a/src/isagbprn.c +++ b/src/isagbprn.c @@ -2,6 +2,8 @@ #include #include "config.h" #include "gba/gba.h" +#include "malloc.h" +#include "mini_printf.h" #define AGB_PRINT_FLUSH_ADDR 0x9FE209D #define AGB_PRINT_STRUCT_ADDR 0x9FE20F8 @@ -14,6 +16,11 @@ #define NOCASHGBAPRINTADDR1 0x4FFFA10 // automatically adds a newline after the string has finished #define NOCASHGBAPRINTADDR2 0x4FFFA14 // does not automatically add the newline. by default, NOCASHGBAPRINTADDR2 is used. this is used to keep strings consistent between no$gba and VBA-RR, but a user can choose to forgo this. +// hardware extensions for LOG_HANDLER_MGBA_PRINT +#define REG_DEBUG_ENABLE ((vu16*) (0x4FFF780)) // handshake: (w)[0xC0DE] -> (r)[0x1DEA] +#define REG_DEBUG_FLAGS ((vu16*) (0x4FFF700)) +#define REG_DEBUG_STRING ((char*) (0x4FFF600)) + struct AGBPrintStruct { u16 m_nRequest; @@ -26,6 +33,8 @@ typedef void (*LPFN_PRINT_FLUSH)(void); #ifndef NDEBUG +// AGBPrint print functions +#if (LOG_HANDLER == LOG_HANDLER_AGB_PRINT) void AGBPrintFlush1Block(void); void AGBPrintInit(void) @@ -87,7 +96,15 @@ void AGBPrintf(const char *pBuf, ...) char bufPrint[0x100]; va_list vArgv; va_start(vArgv, pBuf); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) vsprintf(bufPrint, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #else + #error "unspecified pretty printing handler." + #endif va_end(vArgv); AGBPrint(bufPrint); } @@ -155,9 +172,10 @@ void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopP AGBPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s] \n", pFile, nLine, pExpression); } } +#endif -// no$gba print functions, uncomment to use -/* +// no$gba print functions +#if (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT) void NoCashGBAPrint(const char *pBuf) { *(volatile u32 *)NOCASHGBAPRINTADDR2 = (u32)pBuf; @@ -168,10 +186,79 @@ void NoCashGBAPrintf(const char *pBuf, ...) char bufPrint[0x100]; va_list vArgv; va_start(vArgv, pBuf); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) vsprintf(bufPrint, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(bufPrint, 0x100, pBuf, vArgv); + #else + #error "unspecified pretty printing handler." + #endif va_end(vArgv); NoCashGBAPrint(bufPrint); } -*/ + +void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram) +{ + if (nStopProgram) + { + NoCashGBAPrintf("ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + asm(".hword 0xEFFF"); + } + else + { + NoCashGBAPrintf("WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + } +} +#endif + +// mgba print functions +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) +#define MGBA_REG_DEBUG_MAX (256) + +bool32 MgbaOpen(void) +{ + *REG_DEBUG_ENABLE = 0xC0DE; + return *REG_DEBUG_ENABLE == 0x1DEA; +} + +void MgbaClose(void) +{ + *REG_DEBUG_ENABLE = 0; +} + +void MgbaPrintf(s32 level, const char* ptr, ...) +{ + va_list args; + + level &= 0x7; + va_start(args, ptr); + #if (PRETTY_PRINT_HANDLER == PRETTY_PRINT_OFF) + vsprintf(REG_DEBUG_STRING, ptr, args); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_MINI_PRINTF) + mini_vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args); + #elif (PRETTY_PRINT_HANDLER == PRETTY_PRINT_LIBC) + vsnprintf(REG_DEBUG_STRING, MGBA_REG_DEBUG_MAX, ptr, args); + #else + #error "unspecified pretty printing handler." + #endif + va_end(args); + *REG_DEBUG_FLAGS = level | 0x100; +} + +void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram) +{ + if (nStopProgram) + { + MgbaPrintf(MGBA_LOG_ERROR, "ASSERTION FAILED FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + asm(".hword 0xEFFF"); + } + else + { + MgbaPrintf(MGBA_LOG_WARN, "WARING FILE=[%s] LINE=[%d] EXP=[%s]", pFile, nLine, pExpression); + } +} +#endif #endif diff --git a/src/main.c b/src/main.c index 5efaaf6d1..f4305ec05 100644 --- a/src/main.c +++ b/src/main.c @@ -70,12 +70,9 @@ u8 gPcmDmaCounter; // These variables are not defined in RS or Emerald, and are never read. // They were likely used to debug the audio engine and VCount interrupt. -// Define NDEBUG in include/config.h to remove these variables. -#ifndef NDEBUG u8 sVcountAfterSound; u8 sVcountAtIntr; u8 sVcountBeforeSound; -#endif static IntrFunc * const sTimerIntrFunc = gIntrTable + 0x7; @@ -146,7 +143,13 @@ void AgbMain() SetNotInSaveFailedScreen(); +#ifndef NDEBUG +#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT) + (void) MgbaOpen(); +#elif (LOG_HANDLER == LOG_HANDLER_AGB_PRINT) AGBPrintInit(); +#endif +#endif #if REVISION == 1 if (gFlashMemoryPresent != TRUE) diff --git a/src/mini_printf.c b/src/mini_printf.c new file mode 100644 index 000000000..b507420f5 --- /dev/null +++ b/src/mini_printf.c @@ -0,0 +1,355 @@ +/* + * The Minimal snprintf() implementation + * + * Copyright (c) 2013,2014 Michal Ludvig + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the auhor nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * mini-printf courtesy of https://github.com/mludvig/mini-printf + * stripped to reduce file size for agb needs + */ + +#include "mini_printf.h" +#include "gba/types.h" +#include "gba/defines.h" +#include "config.h" +#include "characters.h" +#include "string_util.h" + +#ifndef NDEBUG +#if (PRETTY_PRINT_HANDLER != PRETTY_PRINT_OFF) + +struct mini_buff +{ + char *buffer, *pbuffer; + u32 buffer_len; +}; + +static inline char mini_pchar_decode(char encoded) +{ + char ret = '?'; + if (encoded >= CHAR_a && encoded <= CHAR_z) + ret = encoded-(CHAR_a-'a'); // lower-case characters + else if (encoded >= CHAR_A && encoded <= CHAR_Z) + ret = encoded-(CHAR_A-'A'); // upper-case characters + else if (encoded >= CHAR_0 && encoded <= CHAR_9) + ret = encoded-(CHAR_0-'0'); // numbers + else if (encoded == CHAR_SPACE) + ret = ' '; // space + else if (encoded == CHAR_EXCL_MARK) + ret = '!'; // exclamation point + else if (encoded == CHAR_QUESTION_MARK) + ret = '?'; // question mark + else if (encoded == CHAR_PERIOD) + ret = '.'; // period + else if (encoded == CHAR_DBL_QUOTE_LEFT || encoded == CHAR_DBL_QUOTE_RIGHT) + ret = '"'; // double quote + else if (encoded == CHAR_SGL_QUOTE_LEFT || encoded == CHAR_SGL_QUOTE_RIGHT) + ret = '\''; // single quote + else if (encoded == CHAR_CURRENCY) + ret = '$'; // currency mark (pokemonies in game, dollar sign in logs) + else if (encoded == CHAR_COMMA) + ret = ','; // comma + else if (encoded == CHAR_MULT_SIGN) + ret = '#'; // pound, hashtag, octothorpe, whatever + else if (encoded == CHAR_SLASH) + ret = '/'; // slash + else if (encoded == CHAR_LESS_THAN) + ret = '<'; // less than sign + else if (encoded == CHAR_GREATER_THAN) + ret = '>'; // greater than sign + else if (encoded == CHAR_PERCENT) + ret = '%'; // percentage + else if (encoded == CHAR_LEFT_PAREN) + ret = '('; // opening parentheses + else if (encoded == CHAR_RIGHT_PAREN) + ret = ')'; // closing parentheses + return ret; +} + +static s32 _putsAscii(char *s, s32 len, void *buf) +{ + char *p0; + s32 i; + struct mini_buff *b; + + if (!buf) + return len; + + b = buf; + p0 = b->buffer; + + /* Copy to buffer */ + for (i = 0; i < len; i++) { + if(b->pbuffer == b->buffer + b->buffer_len - 1) { + break; + } + *(b->pbuffer ++) = s[i]; + } + *(b->pbuffer) = 0; + return b->pbuffer - p0; +} + +static s32 _putsEncoded(char *s, s32 len, void *buf) +{ + char *p0; + s32 i; + struct mini_buff *b; + + if (!buf) + return len; + + b = buf; + p0 = b->buffer; + + /* Copy to buffer */ + for (i = 0; i < len; i++) { + if(b->pbuffer == b->buffer + b->buffer_len - 1) { + break; + } + *(b->pbuffer ++) = mini_pchar_decode(s[i]); + } + *(b->pbuffer) = 0; + return b->pbuffer - p0; +} + +static s32 mini_strlen(const char *s) +{ + s32 len = 0; + while (s[len] != '\0') len++; + return len; +} + +static s32 mini_itoa(u32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) +{ + char *pbuffer = buffer; + s32 negative = 0; + s32 i, len; + + /* No support for unusual radixes. */ + if (radix > 16) + return 0; + + if (value < 0 && !unsig) + { + negative = 1; + value = -value; + } + + /* This builds the string back to front ... */ + do + { + s32 digit = value % radix; + *(pbuffer++) = (digit < 10 ? '0' + digit : (uppercase ? 'A' : 'a') + digit - 10); + value /= radix; + } while (value > 0); + + if (negative) + *(pbuffer++) = '-'; + + *(pbuffer) = '\0'; + + /* ... now we reverse it (could do it recursively but will + * conserve the stack space) */ + len = (pbuffer - buffer); + for (i = 0; i < len / 2; i++) + { + char j = buffer[i]; + buffer[i] = buffer[len-i-1]; + buffer[len-i-1] = j; + } + + return len; +} + +static s32 mini_pad(char* ptr, s32 len, char pad_char, s32 pad_to, char *buffer) +{ + s32 i; + bool32 overflow = FALSE; + char * pbuffer = buffer; + if(pad_to == 0) + pad_to = len; + if (len > pad_to) { + len = pad_to; + overflow = TRUE; + } + for(i = pad_to - len; i > 0; i --) + { + *(pbuffer++) = pad_char; + } + for(i = len; i > 0; i --) + { + *(pbuffer++) = *(ptr++); + } + len = pbuffer - buffer; + if(overflow) + { + for (i = 0; i < 3 && pbuffer > buffer; i ++) + { + *(pbuffer-- - 1) = '*'; + } + } + return len; +} + +s32 mini_vsnprintf(char *buffer, u32 buffer_len, const char *fmt, va_list va) +{ + struct mini_buff b; + s32 n; + b.buffer = buffer; + b.pbuffer = buffer; + b.buffer_len = buffer_len; + if (buffer_len == 0) + buffer = NULL; + n = mini_vpprintf((buffer != NULL) ? &b : NULL, fmt, va); + if (buffer == NULL) + return n; + return b.pbuffer - b.buffer; +} + +s32 mini_vpprintf(void* buf, const char *fmt, va_list va) +{ + char bf[24]; + char bf2[24]; + char ch; + s32 n; + n = 0; + while ((ch=*(fmt++))) + { + s32 len; + if (ch != '%') + { + len = 1; + len = _putsAscii(&ch, len, buf); + } else + { + char pad_char = ' '; + s32 pad_to = 0; + char l = 0; + char *ptr; + + ch=*(fmt++); + + /* Zero padding requested */ + if (ch == '0') + pad_char = '0'; + while (ch >= '0' && ch <= '9') + { + pad_to = pad_to * 10 + (ch - '0'); + ch= *(fmt++); + } + if(pad_to > (s32) sizeof(bf)) + { + pad_to = sizeof(bf); + } + if (ch == 'l') + { + l = 1; + ch=*(fmt++); + } + + switch (ch) + { + case 0: + goto end; + case 'u': + case 'd': + if(l) + { + len = mini_itoa(va_arg(va, u32), 10, 0, (ch=='u'), bf2); + } else + { + if(ch == 'u') + { + len = mini_itoa((u32) va_arg(va, u32), 10, 0, 1, bf2); + } + else + { + len = mini_itoa((s32) va_arg(va, s32), 10, 0, 0, bf2); + } + } + len = mini_pad(bf2, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 'x': + case 'X': + if(l) + { + len = mini_itoa(va_arg(va, u32), 16, (ch=='X'), 1, bf2); + } + else + { + len = mini_itoa((u32) va_arg(va, u32), 16, (ch=='X'), 1, bf2); + } + len = mini_pad(bf2, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 'c' : + ch = (char)(va_arg(va, s32)); + len = mini_pad(&ch, 1, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + break; + + case 's' : + ptr = va_arg(va, char*); + len = mini_strlen(ptr); + if (pad_to > 0) + { + len = mini_pad(ptr, len, pad_char, pad_to, bf); + len = _putsAscii(bf, len, buf); + } else + { + len = _putsAscii(ptr, len, buf); + } + break; + case 'S' : // preproc encoded string handler + ptr = va_arg(va, char*); + len = StringLength(ptr); + if (pad_to > 0) + { + len = mini_pad(ptr, len, pad_char, pad_to, bf); + len = _putsEncoded(bf, len, buf); + } else + { + len = _putsEncoded(ptr, len, buf); + } + break; + default: + len = 1; + len = _putsAscii(&ch, len, buf); + break; + } + } + n = n + len; + } +end: + return n; +} + +#endif +#endif From 2b42740c690c2c9cb408e44314645dfc80649d86 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 1 Feb 2023 09:37:54 -0500 Subject: [PATCH 05/29] Fix debug printing negative values --- src/mini_printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mini_printf.c b/src/mini_printf.c index b507420f5..1d9b0dffc 100644 --- a/src/mini_printf.c +++ b/src/mini_printf.c @@ -143,7 +143,7 @@ static s32 mini_strlen(const char *s) return len; } -static s32 mini_itoa(u32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) +static s32 mini_itoa(s32 value, u32 radix, s32 uppercase, bool32 unsig, char *buffer) { char *pbuffer = buffer; s32 negative = 0; From 797fb4a733b2c64244ce7eac9229dcc33791dbf1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 4 Feb 2023 11:19:55 -0500 Subject: [PATCH 06/29] Document slot machine graphics --- graphics/slot_machine/digits.png | Bin 0 -> 202 bytes .../{unk_84661d4.bin => firered/bg.bin} | Bin graphics/slot_machine/firered/bg.png | Bin 0 -> 1974 bytes .../button_pressed.png} | Bin .../{unk_846506c.png => firered/clefairy.png} | Bin .../combos_window.bin} | Bin .../slot_machine/firered/combos_window.png | Bin 0 -> 913 bytes .../match_lines.pal} | 0 .../slot_machine/firered/payout_lights.pal | 51 ++ graphics/slot_machine/firered/reel_icons.png | Bin 0 -> 5968 bytes .../{unk_lg_8465ab8.bin => leafgreen/bg.bin} | Bin graphics/slot_machine/leafgreen/bg.png | Bin 0 -> 1792 bytes .../slot_machine/leafgreen/button_pressed.png | Bin 0 -> 229 bytes .../clefairy.png} | Bin .../combos_window.bin} | Bin .../slot_machine/leafgreen/combos_window.png | Bin 0 -> 973 bytes .../match_lines.pal} | 0 .../slot_machine/leafgreen/payout_lights.pal | 51 ++ .../slot_machine/leafgreen/reel_icons.png | Bin 0 -> 5860 bytes graphics/slot_machine/unk_8464974.pal | 19 - graphics/slot_machine/unk_8464994.pal | 19 - graphics/slot_machine/unk_84649b4.pal | 19 - graphics/slot_machine/unk_84649d4.pal | 19 - graphics/slot_machine/unk_84649f4.pal | 19 - graphics/slot_machine/unk_8464a14.png | Bin 1234 -> 0 bytes graphics/slot_machine/unk_8465524.pal | 19 - graphics/slot_machine/unk_8465544.png | Bin 215 -> 0 bytes graphics/slot_machine/unk_8465930.pal | 19 - graphics/slot_machine/unk_8465950.pal | 19 - graphics/slot_machine/unk_8465970.pal | 19 - graphics/slot_machine/unk_8465990.pal | 19 - graphics/slot_machine/unk_84659b0.pal | 19 - graphics/slot_machine/unk_84659d0.png | Bin 1736 -> 0 bytes graphics/slot_machine/unk_84664dc.pal | 19 - graphics/slot_machine/unk_84664fc.pal | 19 - graphics/slot_machine/unk_846651c.pal | 19 - graphics/slot_machine/unk_84665c0.pal | 19 - graphics/slot_machine/unk_84665e0.pal | 19 - graphics/slot_machine/unk_8466600.pal | 19 - graphics/slot_machine/unk_8466620.png | Bin 772 -> 0 bytes graphics/slot_machine/unk_lg_8464434.png | Bin 1200 -> 0 bytes graphics/slot_machine/unk_lg_84652bc.pal | 19 - graphics/slot_machine/unk_lg_84652dc.pal | 19 - graphics/slot_machine/unk_lg_84652fc.pal | 19 - graphics/slot_machine/unk_lg_846531c.pal | 19 - graphics/slot_machine/unk_lg_846533c.pal | 19 - graphics/slot_machine/unk_lg_846535c.png | Bin 1605 -> 0 bytes graphics/slot_machine/unk_lg_8465dbc.pal | 19 - graphics/slot_machine/unk_lg_8465ddc.pal | 19 - graphics/slot_machine/unk_lg_8465dfc.pal | 19 - graphics/slot_machine/unk_lg_8465f00.png | Bin 842 -> 0 bytes graphics_file_rules.mk | 12 +- src/slot_machine.c | 800 ++++++++++-------- 53 files changed, 542 insertions(+), 847 deletions(-) create mode 100644 graphics/slot_machine/digits.png rename graphics/slot_machine/{unk_84661d4.bin => firered/bg.bin} (100%) create mode 100644 graphics/slot_machine/firered/bg.png rename graphics/slot_machine/{unk_846653c.png => firered/button_pressed.png} (100%) rename graphics/slot_machine/{unk_846506c.png => firered/clefairy.png} (100%) rename graphics/slot_machine/{unk_8466998.bin => firered/combos_window.bin} (100%) create mode 100644 graphics/slot_machine/firered/combos_window.png rename graphics/slot_machine/{unk_84664bc.pal => firered/match_lines.pal} (100%) create mode 100644 graphics/slot_machine/firered/payout_lights.pal create mode 100644 graphics/slot_machine/firered/reel_icons.png rename graphics/slot_machine/{unk_lg_8465ab8.bin => leafgreen/bg.bin} (100%) create mode 100644 graphics/slot_machine/leafgreen/bg.png create mode 100644 graphics/slot_machine/leafgreen/button_pressed.png rename graphics/slot_machine/{unk_lg_8464a3c.png => leafgreen/clefairy.png} (100%) rename graphics/slot_machine/{unk_lg_8466278.bin => leafgreen/combos_window.bin} (100%) create mode 100644 graphics/slot_machine/leafgreen/combos_window.png rename graphics/slot_machine/{unk_lg_8465d9c.pal => leafgreen/match_lines.pal} (100%) create mode 100644 graphics/slot_machine/leafgreen/payout_lights.pal create mode 100644 graphics/slot_machine/leafgreen/reel_icons.png delete mode 100644 graphics/slot_machine/unk_8464974.pal delete mode 100644 graphics/slot_machine/unk_8464994.pal delete mode 100644 graphics/slot_machine/unk_84649b4.pal delete mode 100644 graphics/slot_machine/unk_84649d4.pal delete mode 100644 graphics/slot_machine/unk_84649f4.pal delete mode 100644 graphics/slot_machine/unk_8464a14.png delete mode 100644 graphics/slot_machine/unk_8465524.pal delete mode 100644 graphics/slot_machine/unk_8465544.png delete mode 100644 graphics/slot_machine/unk_8465930.pal delete mode 100644 graphics/slot_machine/unk_8465950.pal delete mode 100644 graphics/slot_machine/unk_8465970.pal delete mode 100644 graphics/slot_machine/unk_8465990.pal delete mode 100644 graphics/slot_machine/unk_84659b0.pal delete mode 100644 graphics/slot_machine/unk_84659d0.png delete mode 100644 graphics/slot_machine/unk_84664dc.pal delete mode 100644 graphics/slot_machine/unk_84664fc.pal delete mode 100644 graphics/slot_machine/unk_846651c.pal delete mode 100644 graphics/slot_machine/unk_84665c0.pal delete mode 100644 graphics/slot_machine/unk_84665e0.pal delete mode 100644 graphics/slot_machine/unk_8466600.pal delete mode 100644 graphics/slot_machine/unk_8466620.png delete mode 100644 graphics/slot_machine/unk_lg_8464434.png delete mode 100644 graphics/slot_machine/unk_lg_84652bc.pal delete mode 100644 graphics/slot_machine/unk_lg_84652dc.pal delete mode 100644 graphics/slot_machine/unk_lg_84652fc.pal delete mode 100644 graphics/slot_machine/unk_lg_846531c.pal delete mode 100644 graphics/slot_machine/unk_lg_846533c.pal delete mode 100644 graphics/slot_machine/unk_lg_846535c.png delete mode 100644 graphics/slot_machine/unk_lg_8465dbc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465ddc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465dfc.pal delete mode 100644 graphics/slot_machine/unk_lg_8465f00.png diff --git a/graphics/slot_machine/digits.png b/graphics/slot_machine/digits.png new file mode 100644 index 0000000000000000000000000000000000000000..d52754d8d2a7d4aaa22a7edaea29e2acd3edd015 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^96-E)g&9a5&NHwEQU(D&A+A6=DJkmze;`c+_|Nb< zR_q;6VW_8zV~EDYpoGE8!sKjt?!=fYmZ~Spv_Pbz~d)l8zKKfIBieJ_ZDUmOH$jv)A>k_j%WKJ@0$n|5h^7*Ii%N zSQh}G@99BjX&u&H4?J31bprKCT7zO(?mIzotI4qTp<(XfxM`h2u^Aj3L=Z&%0MvV} zR&W8LAgKf-B+rtPiR7seU?aE!z`=uDZCIsJ{hdU(KxGO3Z&i>)+Vo#XoA>hSjCp{> z7;+oCX_L&Cs-1!FiS$7HYkQnN+$MSomR zymyDYFjW`c#nrvmo0e_v9&n0kpt)3xg}3mKUn&QUf`+D-1XsR<{_KpC0;<@U8h9Vt zM&qqj?j>mau582g9)#v}WUKVwFhJJ#@wul7$C2h=i|INf3tl%$dFy~-gMJ`&)(A_Q z*--baDaUE!S$|-BZNMh3507%6|Hfz+!`Jz$VS;1pQPek6>U~Le`JeUP_2m`EY|cKs z>6sKH!EZaj4}1tr=mTQfVz|*c&6DK%0U13u9TIH>un9NUKDm=&VkB>0eURX_>FrN>7zULQ;tmsAC zffCD}o~>oMM3xx6+2;xI+eE^aG6!@1+gISBaTF&V6@pLo%zn>XTucO2HP?0*Mr{d> zWr^crbTyGqmGW>?(n8T6a}tTI>^oB{0Jq(J^c&E8S^LuU0LP?BsbRtkJLH$GS?CxL z1xvmZfj-M02ds@gN`1iH--p#WVMB@+ak`2)Vh=Biyngxk%^m=M@g2blPpmH9H&ci% z)10z!2XErus;{1to|jlP{3=*h+rDikYTZxv)Ub%l(U~YNK6))^N_aB2{Gg7E-DH$D zH3G=yPC<6%PHswNc26W~Eg#5&XR+@a;Nx=BfE=9ggHh&3N;Zo$29I~Tfd><&>zVHC zS|7v(vg%CItL-}H_aaSiNcj0YB>cz21d0=uglZg$c#b-T^Dvow+_>K_ zQKvT<+CKiX-|R7(@+jIC#}5unom>SIF5lI|p^p7_8)9z*jqcCLtAK?$jBnh2VWG~H zk-s&>(YJ(t01;ILWL^6cnXRUR`b{G`NagX=%5uwQO zv^oT51$hPnYrA~o2WvqE1((Qn(x=o{CsN`j7n|)`-dTPqC zk$HK(Q#Gah6`-7cLAsKxGB-JM4YLwANj@3vW7V%(o-}1kIRU}Dc5Re8ffd%ZF71=^ zgZBjUHg(RK0&#I-Ovwvb?uH!uL3Gx>AbnNee!Lf;YW9AiRWIsK7?8;Qqr={e(QVzW zCd{s-R1zK^*2hegE#Bf4MB^HMKyQNkP6hC;?$VRGZbVnFDSgyym)f0<4k6-YnyU3! ztY&8CnQ&P;`Uw2RVBcs1JRaiK7)H3bU5-=!4!j9hZS^*ffQ~vDM!a=RCY-W?-YO*-2%>0@To4S zHp|AIBFI^s*m@n!u5xNs*>bm-nKGw3UG@yF)bqfxeIlPE)IKKy4WH1or5Jex970~R_|04U7szU*dRO1F7)bQ zlqL+Mo`y2@iHANOqWduFW8V!^<&szzXlT@26Oa6ZNGkG No^HPM;+=fqe*m;mc9{SG literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_846653c.png b/graphics/slot_machine/firered/button_pressed.png similarity index 100% rename from graphics/slot_machine/unk_846653c.png rename to graphics/slot_machine/firered/button_pressed.png diff --git a/graphics/slot_machine/unk_846506c.png b/graphics/slot_machine/firered/clefairy.png similarity index 100% rename from graphics/slot_machine/unk_846506c.png rename to graphics/slot_machine/firered/clefairy.png diff --git a/graphics/slot_machine/unk_8466998.bin b/graphics/slot_machine/firered/combos_window.bin similarity index 100% rename from graphics/slot_machine/unk_8466998.bin rename to graphics/slot_machine/firered/combos_window.bin diff --git a/graphics/slot_machine/firered/combos_window.png b/graphics/slot_machine/firered/combos_window.png new file mode 100644 index 0000000000000000000000000000000000000000..6472e5b25f5602b810de406b5e0047894b5e57f2 GIT binary patch literal 913 zcmV;C18)3@P)Px#kWfriMdrQcK|w+P|No2b|E&N2YR%sE-h2P%wAH;@-Z23G?f~}9bJd(F_Avn7 z|IPpA=EeX2K|w+G_V)i$QZcmuLDm2NoKgUs0G#ehq@=z7?g0Pxq{XB;?%n|2|IPpA z=EeX2K|w+G_V#;&gT>9w|BG{4d;isg|CCC_y;?#4w5;~#YW7M1#sB}_|IPpA=5Om8 z@c;k$)^yBk8ei0*;Dcl56a=8@3cpY^ z4OZU!7eFEIAJVC;XkK$bI03#?B@X{9U~Xzl6y?eZKQ+r5Ko%&Chw=_RF#z4O2dYHUQr|y%b69}J=5ZYH zTtn1f0uXyV?!PGoQl7vA^*9d0FpgSBxk`Y+6&>8^Ay9yEvFm%?_pMtGHM9e%H3f3y zP`>AY%>^K)kb(I1!73Vr;SSu+B6_?6q#)v2s6)YzhBscBXgN!j`~^oqUJ*l9_j}NC zpv-}2c(r2SKadD%v0$31#MM0U<_TY5&gL=R${(pXgxDPcl>yp35TCYBvnah1pe%GT z6rw?b$L9ny5$73h3%#-7ho8?Up11D<#kvivpHWv^R}Gn*?2e7vw+)u(0^7EV)!-Ts z!z3(j>$;l57a+Fc5uyRhvcv^a4m1vCQgFb)RZRc8zkqS7OMvdHOUTjm>3|qC3|Ii3 n>l7$|YcdKqatq{odmZpMt*E)auJzD300000NkvXXu0mjf0Xn?c literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_84664bc.pal b/graphics/slot_machine/firered/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_84664bc.pal rename to graphics/slot_machine/firered/match_lines.pal diff --git a/graphics/slot_machine/firered/payout_lights.pal b/graphics/slot_machine/firered/payout_lights.pal new file mode 100644 index 000000000..b95e4b5e7 --- /dev/null +++ b/graphics/slot_machine/firered/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +238 172 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 205 32 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +238 172 0 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 205 32 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/firered/reel_icons.png b/graphics/slot_machine/firered/reel_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..9ebb2b7a798a262eae9e78b196926a4148a358b0 GIT binary patch literal 5968 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 literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/leafgreen/button_pressed.png b/graphics/slot_machine/leafgreen/button_pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..f913eab9ae227d467a8037ce19e57a91bd28a1aa GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=5z5hR>co`~Uxc_q`y; zIhs*RERTNcF5VLKe~IS1DGdM5I<5&~kVuk9N{Rw1F3+m40#XH@E{-7_GhKW4^0pZ8 zwBFa*H;*Z7!-UPx#kWfriMdrQcK|w+P|No2b|E&N2YR%sE-h2P%wAH;@-Z23G?f~}9bJd(F_Avn7 z|IPpA=EeX2K|w+G_V)i$QZcmuLDm2NoKgUs0G#ehq@=z7?g0Pxq{XB;?%n|2|IPpA z=EeX2K|w+G_V#;&gT>9w|BG{4d;isg|CCC_y;?#4w5;~#YW7M1#sB}_|IPpA=5Om8 z@c;k<>q$gGR9Ja2^mmP3!EbGFwgT~MJojkcsC65HfVIgA;Iodv({v_HlLZf>NF1hI!${XE$v0all*i~R=dlL|v0%_} zGT4*n+7*b&(8Xkfgaxo3M6S>x%dKVH0Emj%+I)_|YwDBWSkfWZt1rF}rYo0x&~;zD zmR^C=mlPfxy;!?By8^>oVE862kO7YH0IctTiMvN#lL7i3UIUwK{occkV8F4bgV9sLNIw)aJZW7_sfwW@bTF9H-Gj8biF-*maEN2!Y)N_K;Pd1|6O1{h1R+aZD{1? z3SeTk2**`az{?r=S8xLa=H=OdG4oacBe{gKRc#|+O1w3|rWl*1v6V+gf3#fQJ%<0S zXzmEQQ#0Ii`lx1@8JKq<<7wyXFIu?Dcc-Si9gD!G1RcYJy(cl)n>y@Iz}m$4(3=C? zK$U(#Hsm vaFLS6^$7O{oEt02mGq4tnm558(8s{P%`(~pGqD_G00000NkvXXu0mjfPz&qZ literal 0 HcmV?d00001 diff --git a/graphics/slot_machine/unk_lg_8465d9c.pal b/graphics/slot_machine/leafgreen/match_lines.pal similarity index 100% rename from graphics/slot_machine/unk_lg_8465d9c.pal rename to graphics/slot_machine/leafgreen/match_lines.pal diff --git a/graphics/slot_machine/leafgreen/payout_lights.pal b/graphics/slot_machine/leafgreen/payout_lights.pal new file mode 100644 index 000000000..8e0f65ee2 --- /dev/null +++ b/graphics/slot_machine/leafgreen/payout_lights.pal @@ -0,0 +1,51 @@ +JASC-PAL +0100 +48 +222 222 222 +255 255 255 +139 222 82 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +255 90 0 +222 41 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +255 180 65 +255 90 0 +197 246 139 +156 0 0 +0 0 0 +222 222 222 +255 255 255 +139 222 82 +255 90 0 +222 41 0 +255 180 65 +255 90 0 +255 255 131 +255 180 65 +255 255 255 +255 255 131 +255 255 131 +255 180 65 +197 246 139 +156 0 0 +0 0 0 diff --git a/graphics/slot_machine/leafgreen/reel_icons.png b/graphics/slot_machine/leafgreen/reel_icons.png new file mode 100644 index 0000000000000000000000000000000000000000..ceb9b739aec6cbf5b25c93cb82d5c4d50343d26c GIT binary patch literal 5860 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 diff --git a/graphics/slot_machine/unk_8465524.pal b/graphics/slot_machine/unk_8465524.pal deleted file mode 100644 index b8cf64bae..000000000 --- a/graphics/slot_machine/unk_8465524.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -98 98 90 -255 255 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 255 0 diff --git a/graphics/slot_machine/unk_8465544.png b/graphics/slot_machine/unk_8465544.png deleted file mode 100644 index 0e3154f61bb46d4393bfa7a39b34f16cabb0c7f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^96-E)g&9a5&NHwEQU(D&A+A6=DJkmze;`c+_|Nb< zR_q;6A!A99UoeBivm0qZPN=7gV~EDYpoGE8!sKjt?!=fYmZ~Spv_Pbz~d)l8zKKfIBieJ_ZDUmOH a$jT-G@yGywn#{yW0} diff --git a/graphics/slot_machine/unk_8465930.pal b/graphics/slot_machine/unk_8465930.pal deleted file mode 100644 index f2c377a3f..000000000 --- a/graphics/slot_machine/unk_8465930.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -57 57 49 -230 230 230 -255 255 255 -238 172 0 -197 74 24 -205 90 0 -255 205 32 -222 123 32 -255 164 41 -57 148 255 -164 222 255 -0 49 123 -139 0 0 -98 98 90 -0 0 0 diff --git a/graphics/slot_machine/unk_8465950.pal b/graphics/slot_machine/unk_8465950.pal deleted file mode 100644 index 634aa770d..000000000 --- a/graphics/slot_machine/unk_8465950.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -238 172 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 90 0 -222 41 0 -255 205 32 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_8465970.pal b/graphics/slot_machine/unk_8465970.pal deleted file mode 100644 index 1d932206e..000000000 --- a/graphics/slot_machine/unk_8465970.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -74 74 213 -115 172 255 -115 164 74 -156 238 74 -255 90 0 -255 164 41 -255 238 32 -222 41 0 -189 189 189 -156 156 156 -123 123 123 -90 90 90 -65 65 65 -0 0 0 diff --git a/graphics/slot_machine/unk_8465990.pal b/graphics/slot_machine/unk_8465990.pal deleted file mode 100644 index 2c2b3d843..000000000 --- a/graphics/slot_machine/unk_8465990.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -238 172 0 -172 106 106 -222 156 156 -148 82 82 -197 131 131 -8 123 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -222 123 32 -255 205 32 -205 90 0 diff --git a/graphics/slot_machine/unk_84659b0.pal b/graphics/slot_machine/unk_84659b0.pal deleted file mode 100644 index 742063525..000000000 --- a/graphics/slot_machine/unk_84659b0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -213 57 0 -205 90 0 -255 255 255 -238 172 0 -0 0 197 -180 65 0 -180 65 0 -0 106 0 -0 106 0 -82 123 255 -246 156 0 -246 156 0 -41 180 82 -41 180 82 -0 0 0 diff --git a/graphics/slot_machine/unk_84659d0.png b/graphics/slot_machine/unk_84659d0.png deleted file mode 100644 index 5223d0d3fd183aa4beb285503bd718d5590b913f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1736 zcmV;(1~>VMP)Ht_7{>W8+#f&~;GPyJi=vHuiZBGN5`-gE708GHGvrbR;KQH8@JsjLhcNs?so8o3B-ReJ0L&f0NHc(J z$q#B-0bN>B0U%>ePXVyzBnbcsOVE7;wF88#!~!tt^+sXXLxb{kyXRrpMKk06&E_8U zr_m|FB>+k}lTp8a7KVHMK0O``4#M#2V8HoDt^?;E4TlfH@Y--Vld(48vCMxQ;Hi}V zI>3unz<&<#N*-w)PVvtpqoRJZfA$Rk&HgMJ#DjyY0K_a|2@nn2!w1&@Xb)#cda9?> zDHK3JbhfwG2LR11dUpT*vx6{3vkG{5eEjl3*hXUjHBx|jL}zCPa7KV<_hSe^vj*_; zxD5el77D1IltRCpLKw%@6v!}6A#Arz3h-bG1zZc5$biiz>LFsu#Gwg0jU8Z98TGJ@ zD3|fbmC?4btE;;|TE2g8=M4kt*FEsyRK(V(J$R^2i$F&@W{y;18PM~ z`F=dn^Rc$g3ZO-Ijigxugxs|N%=KJP^u#u+0EPa|W*JbkNn8@prv7&%c~AhTYgh}{ z0!|;Z=0_hN6QJ=3Df|cl(zE4!@9J9IS3KyAKxlNc`RH*pL)+p6ns;0oS6r_u=#58D z8eNsm(SAVNVgc}=X+x+~WjYlus(_ol@uaKHAALldqisp(p9aA)Ag8??ze1!dCf@8# zy5}7^Lz|y>q84Rf0b1ivs(ht$A$BgTf|Yr2^GVW?a)$Op2UYkQo%R`^!w`g2_&m4~ zpv0P)$g8p_BP=-F{}X`yFbF<*2LLR<$l7^u2|(P`V*ozGR$&1~fglC-Wk72MfDGcp zruN8)Aec0TwZJKm@lwdOfEZPl~u6twMjHz&N zfnQ39wGF_F`qr&CMGBaNu`qy?HK;8q)D56sqyPX_(^Os|37QI6I-&FCJeBP z*f%R7-3X{l3#czn0k2NcIVq+ah1(UVunCr6Y~61pon-z8;&;SvKOqhey}Jn6X&6AG zV~S%5P^4D?!{^VR|BCqKJH+m;0o;=(4#2N>w4+!J^jV>9qk_7TfZi5>wP`E60$8UY zNietta0&#lX)FO68x$nT33lluZXjV=Aq2>o;42tT$wH`=$kL)7=eGhX=n5|8S zvbj=rlI(3o!9xV~y_c9U03m3HUIobH3P~s{I6OSKe*L@Swcm zoAqfF2$5$<6=1w%l>}fD6gvfgBee&{LV?dc6wM2q*eIG*}@p0v<3KP;uC<9(DucF-5|M|skv7& zJM~Mca;ADQDZEXgYz1h1PBk|Z!@RQT+`ckx29#=$@=4_u7tK-%_*i4Zd-5e>vaz4i%|NA z&yS+BI$*1+ZZK5>f*Ak+9Xdvif4BpJoi$$TQG?#x2#9yUf$B&6U*LY^DxorqB&nJ% zI>7yq*B~@kxUV?M2?nw|U=WI8+b8Qj_QBbfF9kQeU~Pwk6l}SjH;QHg77C4FRGrE3 zmW^8At|)GH3~K#RpD0@_fm*ZLJsy9@@hkCKS)A$d_wk9cQ-lVT)quK^O|G~ut{DjQ zi(3;3RRf?o{A545z*!-M34VPmZ+8}|L9kDj)~8+2!1%KG`I(=`U{aP}f=)#HNkDRf zpJD;=Nm-UatpnOt)>w6c6#PiVAw4b2ua1$C{ig!jWLqFsrzke3sT0JiLvk}z6*wH| zT6GD}_4rr{6owFn)ExP3xhx`_YkeGX11>_)iE57g4rm*1A3s|Zh3kV0J@*#m!_f!u z{|b^xbt>aJ<$j^}n$I|z=7;b7Ou4OE5E3CV+hiMgGhqUW@o~7Udg25*0>36Cf`FO) z1yt3>x|Po2;9HZ^iox8^GG~K&V5f?{ylCDG0{;Lv91=(2ZnDS#0000n diff --git a/graphics/slot_machine/unk_lg_8464434.png b/graphics/slot_machine/unk_lg_8464434.png deleted file mode 100644 index f7c3b0d7c5c8377426a9ded185183edd88992d76..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1200 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 D@<#uX diff --git a/graphics/slot_machine/unk_lg_8465dbc.pal b/graphics/slot_machine/unk_lg_8465dbc.pal deleted file mode 100644 index 790cb6b64..000000000 --- a/graphics/slot_machine/unk_lg_8465dbc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -255 90 0 -222 41 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465ddc.pal b/graphics/slot_machine/unk_lg_8465ddc.pal deleted file mode 100644 index 32932dfb2..000000000 --- a/graphics/slot_machine/unk_lg_8465ddc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -255 180 65 -255 90 0 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465dfc.pal b/graphics/slot_machine/unk_lg_8465dfc.pal deleted file mode 100644 index 82eae667f..000000000 --- a/graphics/slot_machine/unk_lg_8465dfc.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -222 222 222 -255 255 255 -139 222 82 -255 90 0 -222 41 0 -255 180 65 -255 90 0 -255 255 131 -255 180 65 -255 255 255 -255 255 131 -255 255 131 -255 180 65 -197 246 139 -156 0 0 -0 0 0 diff --git a/graphics/slot_machine/unk_lg_8465f00.png b/graphics/slot_machine/unk_lg_8465f00.png deleted file mode 100644 index 56ce87fce8d0277a86e54cf0267326b2f1e32dcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 842 zcmV-Q1GW5#P) zF>BjE6vy9JxINrp=+Ifo=nRe4WJtI`L+h!@m{plFd&(|IGIlUDUqBG(7*GwSG|&-X3FvG52^m?|a3aYlgSU$vtl~ho{NwdlfyI;~t%al&>JapGpB+I>#nMdEAX7 zwZ21d4$FGhipS6ZA&F%i=P>2{qMf1b-3qz{_K2N(YGFiBIC*2exk+M^QNkE~{D9?7 zT1KJzd4Epgsn1TYeT8M#^JS9Rn8kTd+{Av;XM4Om!6$LbxYMbP#jY)2ie!7l{T=|( zEp(`K1A2!8!S=9#+F;|2w*zO^wL4}dw@`+RQ58eNGKbQB*%`wa3kP-#2ytRddhAT( zAh`MP?J7e_FN%zH#(Jb_3f~MM%QyLjDb+D9nLM8iFX{mkKxCNIAiwr?^MJ?3sT&zi zbkbC5O?}lHDh=cDoSV2Tb<#HMR}g3lPKIZ6Vh3Ju%I$m@>Q>PlYjKyj_;a38+q}RG z!)?K5P0V=0iCGVG0~1cHMwJ9+IHC$Sepi#)?J?A#HKo1wdNrFG;v}CxZ8(udW1Pe} zO$%>$SEP{nC6R6YLtbH1w&rCikzLN#yoDE9s}*^itIvdEOx7h2nI%Ks{;ZBFXWsZs zQy6Pa=P_G0{=(oH^L)NYbqFjNH}LZ29n5>3*_g#C%ohdYU%kap0Ky*Tm8rJVWCz%K z`Mk7rTbYB-MrrDMzk21jzxP)iYL81zUZJhN0-EYeP0rD{kB$@ -$(SLOTMACHINEGFXDIR)/reel_time_gfx.4bpp: $(SLOTMACHINEGFXDIR)/reel_time_pikachu.4bpp \ - $(SLOTMACHINEGFXDIR)/reel_time_machine.4bpp - @cat $^ >$@ - $(UNUSEDGFXDIR)/intro_birch_beauty.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 822 -Wnum_tiles @@ -462,12 +457,15 @@ graphics/link/321start.4bpp: %.4bpp: %.png $(TEXTWINDOWGFXDIR)/signpost.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 19 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_8466620.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/combos_window.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 66 -Wnum_tiles -$(SLOTMACHINEGFXDIR)/unk_84659d0.4bpp: %.4bpp: %.png +$(SLOTMACHINEGFXDIR)/firered/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 138 -Wnum_tiles +$(SLOTMACHINEGFXDIR)/leafgreen/bg.4bpp: %.4bpp: %.png + $(GFX) $< $@ -num_tiles 134 -Wnum_tiles + $(TEACHYTVGFXDIR)/tiles.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 233 -Wnum_tiles diff --git a/src/slot_machine.c b/src/slot_machine.c index b89412a7e..1b79bf9f8 100644 --- a/src/slot_machine.c +++ b/src/slot_machine.c @@ -13,48 +13,92 @@ #include "strings.h" #include "constants/songs.h" -#define SLOT_IMAGE_7 0 -#define SLOT_IMAGE_ROCKET 1 -#define SLOT_IMAGE_PIKACHU 2 -#define SLOT_IMAGE_PSYDUCK 3 -#define SLOT_IMAGE_CHERRIES 4 -#define SLOT_IMAGE_MAGNEMITE 5 -#define SLOT_IMAGE_SHELLDER 6 +#define NUM_REELS 3 +#define REEL_LENGTH 21 // Total number of icons per reel -#define SLOT_PAYOUT_NONE 0 -#define SLOT_PAYOUT_CHERRIES2 1 -#define SLOT_PAYOUT_CHERRIES3 2 -#define SLOT_PAYOUT_MAGSHELL 3 -#define SLOT_PAYOUT_PIKAPSY 4 -#define SLOT_PAYOUT_ROCKET 5 -#define SLOT_PAYOUT_7 6 +// Only 4 icons are actually visible per reel at a single +// time, with 1 on deck. Only 3 visible when not spinning. +#define REEL_LOAD_LENGTH 5 -#define ROWATTR_COL1POS 0 -#define ROWATTR_COL2POS 1 -#define ROWATTR_COL3POS 2 -#define ROWATTR_MINBET 3 +// 3 horizontal, 2 diagonal +#define NUM_MATCH_LINES 5 -#define SLOTTASK_GFX_INIT 0 -#define SLOTTASK_FADEOUT_EXIT 1 -#define SLOTTASK_UPDATE_LINE_LIGHTS 2 -#define SLOTTASK_CLEFAIRY_BOUNCE 3 -#define SLOTTASK_ANIM_WIN 4 -#define SLOTTASK_END_ANIM_WIN 5 -#define SLOTTASK_ANIM_LOSE 6 -#define SLOTTASK_ANIM_BETTING 7 -#define SLOTTASK_SHOW_AMOUNTS 8 -#define SLOTTASK_MSG_NO_COINS 9 -#define SLOTTASK_ASK_QUIT 10 -#define SLOTTASK_DESTROY_YESNO 11 -#define SLOTTASK_PRESS_BUTTON 12 -#define SLOTTASK_RELEASE_BUTTONS 13 -#define SLOTTASK_SHOWHELP 14 -#define SLOTTASK_HIDEHELP 15 +#define NUM_BUTTON_TILES 4 +#define NUM_DIGIT_SPRITES 4 + +enum { + PALSLOT_LINE_NORMAL = 4, // Loaded as part of sBg_Pal + PALSLOT_LINE_BET, + PALSLOT_LINE_MATCH, +}; + +enum { + GFXTAG_REEL_ICONS, + GFXTAG_CLEFAIRY, + GFXTAG_DIGITS, +}; + +enum { + PALTAG_REEL_ICONS_0, + PALTAG_REEL_ICONS_1, + PALTAG_REEL_ICONS_2, + PALTAG_REEL_ICONS_3, + PALTAG_REEL_ICONS_4, + PALTAG_CLEFAIRY, + PALTAG_DIGITS, +}; + +enum { + ICON_7, + ICON_ROCKET, + ICON_PIKACHU, + ICON_PSYDUCK, // Psyduck in FR, Slowpoke in LG + ICON_CHERRIES, + ICON_MAGNEMITE, // Magnemite in FR, Voltorb in LG + ICON_SHELLDER, // Shellder in FR, Staryu in LG +}; + +enum { + PAYOUT_NONE, + PAYOUT_CHERRIES2, + PAYOUT_CHERRIES3, + PAYOUT_MAGSHELL, + PAYOUT_PIKAPSY, + PAYOUT_ROCKET, + PAYOUT_7, + NUM_PAYOUT_TYPES +}; + +enum { + ROWATTR_COL1POS, + ROWATTR_COL2POS, + ROWATTR_COL3POS, + ROWATTR_MINBET, +}; + +enum { + SLOTTASK_GFX_INIT, + SLOTTASK_FADEOUT_EXIT, + SLOTTASK_UPDATE_LINE_LIGHTS, + SLOTTASK_CLEFAIRY_BOUNCE, + SLOTTASK_ANIM_WIN, + SLOTTASK_END_ANIM_WIN, + SLOTTASK_ANIM_LOSE, + SLOTTASK_ANIM_BETTING, + SLOTTASK_SHOW_AMOUNTS, + SLOTTASK_MSG_NO_COINS, + SLOTTASK_ASK_QUIT, + SLOTTASK_DESTROY_YESNO, + SLOTTASK_PRESS_BUTTON, + SLOTTASK_RELEASE_BUTTONS, + SLOTTASK_SHOWHELP, + SLOTTASK_HIDEHELP, +}; struct SlotMachineState { MainCallback savedCallback; - u16 machineidx; + u16 machineIdx; u16 currentReel; u16 machineBias; u16 slotRewardClass; @@ -62,22 +106,22 @@ struct SlotMachineState u16 bet; u8 taskId; u8 spinReelsTaskId; - bool32 reelIsSpinning[3]; - s16 reelPositions[3]; - s16 reelSubpixel[3]; - s16 destReelPos[3]; - s16 reelStopOrder[3]; + bool32 reelIsSpinning[NUM_REELS]; + s16 reelPositions[NUM_REELS]; + s16 reelSubpixel[NUM_REELS]; + s16 destReelPos[NUM_REELS]; + s16 reelStopOrder[NUM_REELS]; u32 reel2BiasInPlay; - bool32 winFlags[5]; + bool32 winFlags[NUM_MATCH_LINES]; u16 payout; }; struct SlotMachineGfxManager { - u32 field_00[3]; - struct Sprite *reelIconSprites[3][5]; - struct Sprite *creditDigitSprites[4]; - struct Sprite *payoutDigitSprites[4]; + u32 field_00[NUM_REELS]; // Never read + struct Sprite *reelIconSprites[NUM_REELS][REEL_LOAD_LENGTH]; + struct Sprite *creditDigitSprites[NUM_DIGIT_SPRITES]; + struct Sprite *payoutDigitSprites[NUM_DIGIT_SPRITES]; struct Sprite *clefairySprites[2]; vu16 * reelIconAffineParamPtr; }; @@ -96,13 +140,13 @@ struct SlotMachineSetupTaskData // align 2 s32 bg1X; bool32 yesNoMenuActive; - u16 buttonPressedTiles[3][4]; - u16 buttonReleasedTiles[3][4]; - u8 field_005C[0x800]; - u8 bg0TilemapBuffer[0x800]; - u8 bg1TilemapBuffer[0x800]; - u8 bg2TilemapBuffer[0x800]; - u8 bg3TilemapBuffer[0x800]; + u16 buttonPressedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u16 buttonReleasedTiles[NUM_REELS][NUM_BUTTON_TILES]; + u8 unusedBuffer[BG_SCREEN_SIZE]; + u8 bg0TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg1TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg2TilemapBuffer[BG_SCREEN_SIZE]; + u8 bg3TilemapBuffer[BG_SCREEN_SIZE]; }; // size: 285C struct LineStateTileIdxList @@ -198,7 +242,7 @@ static const u8 sSecondReelBiasCheckIndices[][2] = { {0x04, 0x06} }; -static const u8 sThirdReelBiasCheckIndices[][3] = { +static const u8 sThirdReelBiasCheckIndices[NUM_MATCH_LINES][3] = { {0x00, 0x03, 0x06}, // top row {0x01, 0x04, 0x07}, // middle row {0x02, 0x05, 0x08}, // bottom row @@ -206,7 +250,7 @@ static const u8 sThirdReelBiasCheckIndices[][3] = { {0x02, 0x04, 0x06} // bl-tr }; -static const u8 sRowAttributes[][4] = { +static const u8 sRowAttributes[NUM_MATCH_LINES][4] = { {0x00, 0x04, 0x08, 0x03}, // tl-br {0x00, 0x03, 0x06, 0x02}, // top row {0x01, 0x04, 0x07, 0x01}, // middle row @@ -214,150 +258,193 @@ static const u8 sRowAttributes[][4] = { {0x02, 0x04, 0x06, 0x03} // bl-tr }; -static const u16 sReelBiasChances[][7] = { - {0x1fa1, 0x2eab, 0x3630, 0x39f3, 0x3bd4, 0x3bfc, 0x0049}, - {0x1f97, 0x2ea2, 0x3627, 0x39e9, 0x3bca, 0x3bf8, 0x0049}, - {0x1f91, 0x2e9b, 0x3620, 0x39e3, 0x3bc4, 0x3bf4, 0x0049}, - {0x1f87, 0x2e92, 0x3617, 0x39d9, 0x3bba, 0x3bef, 0x0050}, - {0x1f7f, 0x2e89, 0x360e, 0x39d1, 0x3bb2, 0x3bea, 0x0050}, - {0x1fc9, 0x2efc, 0x3696, 0x3a63, 0x3c49, 0x3c8b, 0x0073}, +static const u16 sReelBiasChances[][NUM_PAYOUT_TYPES] = { + { + [PAYOUT_NONE] = 0x1fa1, + [PAYOUT_CHERRIES2] = 0x2eab, + [PAYOUT_CHERRIES3] = 0x3630, + [PAYOUT_MAGSHELL] = 0x39f3, + [PAYOUT_PIKAPSY] = 0x3bd4, + [PAYOUT_ROCKET] = 0x3bfc, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f97, + [PAYOUT_CHERRIES2] = 0x2ea2, + [PAYOUT_CHERRIES3] = 0x3627, + [PAYOUT_MAGSHELL] = 0x39e9, + [PAYOUT_PIKAPSY] = 0x3bca, + [PAYOUT_ROCKET] = 0x3bf8, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f91, + [PAYOUT_CHERRIES2] = 0x2e9b, + [PAYOUT_CHERRIES3] = 0x3620, + [PAYOUT_MAGSHELL] = 0x39e3, + [PAYOUT_PIKAPSY] = 0x3bc4, + [PAYOUT_ROCKET] = 0x3bf4, + [PAYOUT_7] = 0x0049, + }, + { + [PAYOUT_NONE] = 0x1f87, + [PAYOUT_CHERRIES2] = 0x2e92, + [PAYOUT_CHERRIES3] = 0x3617, + [PAYOUT_MAGSHELL] = 0x39d9, + [PAYOUT_PIKAPSY] = 0x3bba, + [PAYOUT_ROCKET] = 0x3bef, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1f7f, + [PAYOUT_CHERRIES2] = 0x2e89, + [PAYOUT_CHERRIES3] = 0x360e, + [PAYOUT_MAGSHELL] = 0x39d1, + [PAYOUT_PIKAPSY] = 0x3bb2, + [PAYOUT_ROCKET] = 0x3bea, + [PAYOUT_7] = 0x0050, + }, + { + [PAYOUT_NONE] = 0x1fc9, + [PAYOUT_CHERRIES2] = 0x2efc, + [PAYOUT_CHERRIES3] = 0x3696, + [PAYOUT_MAGSHELL] = 0x3a63, + [PAYOUT_PIKAPSY] = 0x3c49, + [PAYOUT_ROCKET] = 0x3c8b, + [PAYOUT_7] = 0x0073, + }, }; -static const u8 sReelIconAnimByReelAndPos[][21] = { +static const u8 sReelIconAnimByReelAndPos[NUM_REELS][REEL_LENGTH] = { { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_7, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU + ICON_7, + ICON_PSYDUCK, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_7, + ICON_SHELLDER, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_CHERRIES, + ICON_PIKACHU, + ICON_SHELLDER, + ICON_7, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_ROCKET, + ICON_SHELLDER, + ICON_PIKACHU }, { - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_7, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_CHERRIES, - SLOT_IMAGE_ROCKET, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_CHERRIES + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_ROCKET, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_PIKACHU, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_PSYDUCK, + ICON_7, + ICON_MAGNEMITE, + ICON_CHERRIES, + ICON_ROCKET, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PSYDUCK, + ICON_CHERRIES }, { - SLOT_IMAGE_7, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_PIKACHU, - SLOT_IMAGE_PSYDUCK, - SLOT_IMAGE_MAGNEMITE, - SLOT_IMAGE_SHELLDER, - SLOT_IMAGE_ROCKET + ICON_7, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_SHELLDER, + ICON_MAGNEMITE, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_PIKACHU, + ICON_PSYDUCK, + ICON_MAGNEMITE, + ICON_SHELLDER, + ICON_ROCKET }, }; static const u16 sPayoutTable[] = { - [SLOT_PAYOUT_NONE] = 0, - [SLOT_PAYOUT_CHERRIES2] = 2, - [SLOT_PAYOUT_CHERRIES3] = 6, - [SLOT_PAYOUT_MAGSHELL] = 8, - [SLOT_PAYOUT_PIKAPSY] = 15, - [SLOT_PAYOUT_ROCKET] = 100, - [SLOT_PAYOUT_7] = 300 + [PAYOUT_NONE] = 0, + [PAYOUT_CHERRIES2] = 2, + [PAYOUT_CHERRIES3] = 6, + [PAYOUT_MAGSHELL] = 8, + [PAYOUT_PIKAPSY] = 15, + [PAYOUT_ROCKET] = 100, + [PAYOUT_7] = 300 }; -static const u16 sSpritePal_ReelIcons_0[] = INCBIN_U16("graphics/slot_machine/unk_8464974.gbapal"); -static const u16 sSpritePal_ReelIcons_1[] = INCBIN_U16("graphics/slot_machine/unk_8464994.gbapal"); -static const u16 sSpritePal_ReelIcons_2[] = INCBIN_U16("graphics/slot_machine/unk_84649b4.gbapal"); -static const u16 sSpritePal_ReelIcons_3[] = INCBIN_U16("graphics/slot_machine/unk_84649d4.gbapal"); -static const u16 sSpritePal_ReelIcons_4[] = INCBIN_U16("graphics/slot_machine/unk_84649f4.gbapal"); #if defined(FIRERED) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_8464a14.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_846506c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_846506c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/firered/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/clefairy.4bpp.lz"); #elif defined(LEAFGREEN) -static const u32 sSpriteTiles_ReelIcons[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464434.4bpp.lz"); -static const u16 sSpritePal_Clefairy[] = INCBIN_U16("graphics/slot_machine/unk_lg_8464a3c.gbapal"); -static const u32 sSpriteTiles_Clefairy[] = INCBIN_U32("graphics/slot_machine/unk_lg_8464a3c.4bpp.lz"); +static const u16 sReelIcons_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/reel_icons.gbapal"); +static const u32 sReelIcons_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/reel_icons.4bpp.lz"); +static const u16 sClefairy_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/clefairy.gbapal"); +static const u32 sClefairy_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/clefairy.4bpp.lz"); #endif -static const u16 sSpritePal_Digits[] = INCBIN_U16("graphics/slot_machine/unk_8465524.gbapal"); -static const u32 sSpriteTiles_Digits[] = INCBIN_U32("graphics/slot_machine/unk_8465544.4bpp.lz"); +static const u16 sDigits_Pal[] = INCBIN_U16("graphics/slot_machine/digits.gbapal"); +static const u32 sDigits_Tiles[] = INCBIN_U32("graphics/slot_machine/digits.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {(const void *)sSpriteTiles_ReelIcons, 0xe00, 0}, - {(const void *)sSpriteTiles_Clefairy, 0xc00, 1}, - {(const void *)sSpriteTiles_Digits, 0x280, 2}, + {.data = sReelIcons_Tiles, .size = 0xe00, .tag = GFXTAG_REEL_ICONS}, + {.data = sClefairy_Tiles, .size = 0xc00, .tag = GFXTAG_CLEFAIRY}, + {.data = sDigits_Tiles, .size = 0x280, .tag = GFXTAG_DIGITS}, }; static const struct SpritePalette sSpritePalettes[] = { - {sSpritePal_ReelIcons_0, 0}, - {sSpritePal_ReelIcons_1, 1}, - {sSpritePal_ReelIcons_2, 2}, - {sSpritePal_ReelIcons_3, 3}, - {sSpritePal_ReelIcons_4, 4}, - {sSpritePal_Clefairy, 5}, - {sSpritePal_Digits, 6}, - {NULL} + {.data = sReelIcons_Pal[0], .tag = PALTAG_REEL_ICONS_0}, + {.data = sReelIcons_Pal[1], .tag = PALTAG_REEL_ICONS_1}, + {.data = sReelIcons_Pal[2], .tag = PALTAG_REEL_ICONS_2}, + {.data = sReelIcons_Pal[3], .tag = PALTAG_REEL_ICONS_3}, + {.data = sReelIcons_Pal[4], .tag = PALTAG_REEL_ICONS_4}, + {.data = sClefairy_Pal, .tag = PALTAG_CLEFAIRY}, + {.data = sDigits_Pal, .tag = PALTAG_DIGITS}, + {} }; +static const u16 sReelIconPaletteTags[] = { #if defined(FIRERED) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 0, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 4, - [SLOT_IMAGE_SHELLDER] = 3 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_0, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_4, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_3, #elif defined(LEAFGREEN) -static const u16 sReelIconPaletteTags[] = { - [SLOT_IMAGE_7] = 2, - [SLOT_IMAGE_ROCKET] = 2, - [SLOT_IMAGE_PIKACHU] = 0, - [SLOT_IMAGE_PSYDUCK] = 3, - [SLOT_IMAGE_CHERRIES] = 2, - [SLOT_IMAGE_MAGNEMITE] = 1, - [SLOT_IMAGE_SHELLDER] = 1 -}; + [ICON_7] = PALTAG_REEL_ICONS_2, + [ICON_ROCKET] = PALTAG_REEL_ICONS_2, + [ICON_PIKACHU] = PALTAG_REEL_ICONS_0, + [ICON_PSYDUCK] = PALTAG_REEL_ICONS_3, + [ICON_CHERRIES] = PALTAG_REEL_ICONS_2, + [ICON_MAGNEMITE] = PALTAG_REEL_ICONS_1, + [ICON_SHELLDER] = PALTAG_REEL_ICONS_1, #endif +}; static const u16 sReelIconAffineParams[] = { 0x0120, 0x011f, 0x011e, 0x011d, 0x011c, 0x011b, 0x011a, 0x0119, 0x0118, 0x0117, 0x0116, 0x0115, 0x0114, 0x0113, 0x0112, 0x0111, @@ -451,13 +538,13 @@ static const union AnimCmd sAnimCmd_ReelIcon_Shellder_2[] = { }; static const union AnimCmd *const sAnimTable_ReelIcons[] = { - sAnimCmd_ReelIcon_7, - sAnimCmd_ReelIcon_Rocket, - sAnimCmd_ReelIcon_Pikachu, - sAnimCmd_ReelIcon_Psyduck, - sAnimCmd_ReelIcon_Cherries, - sAnimCmd_ReelIcon_Magnemite, - sAnimCmd_ReelIcon_Shellder, + [ICON_7] = sAnimCmd_ReelIcon_7, + [ICON_ROCKET] = sAnimCmd_ReelIcon_Rocket, + [ICON_PIKACHU] = sAnimCmd_ReelIcon_Pikachu, + [ICON_PSYDUCK] = sAnimCmd_ReelIcon_Psyduck, + [ICON_CHERRIES] = sAnimCmd_ReelIcon_Cherries, + [ICON_MAGNEMITE] = sAnimCmd_ReelIcon_Magnemite, + [ICON_SHELLDER] = sAnimCmd_ReelIcon_Shellder, sAnimCmd_ReelIcon_Pikachu_2, sAnimCmd_ReelIcon_Psyduck_2, sAnimCmd_ReelIcon_Cherries_2, @@ -475,8 +562,8 @@ static const union AffineAnimCmd *const sAffineAnimTable_ReelIcons_Unused[] = { }; static const struct SpriteTemplate sSpriteTemplate_ReelIcons = { - .tileTag = 0, - .paletteTag = 0, + .tileTag = GFXTAG_REEL_ICONS, + .paletteTag = PALTAG_REEL_ICONS_0, .oam = &sOamData_ReelIcons, .anims = sAnimTable_ReelIcons, .images = NULL, @@ -564,8 +651,8 @@ static const union AnimCmd *const sAnimTable_Digits[] = { }; static const struct SpriteTemplate sSpriteTemplate_Digits = { - .tileTag = 2, - .paletteTag = 6, + .tileTag = GFXTAG_DIGITS, + .paletteTag = PALTAG_DIGITS, .oam = &sOamData_Digits, .anims = sAnimTable_Digits, .images = NULL, @@ -620,8 +707,8 @@ static const union AnimCmd *const sAnimTable_Clefairy[] = { }; static const struct SpriteTemplate sSpriteTemplate_Clefairy = { - .tileTag = 1, - .paletteTag = 5, + .tileTag = GFXTAG_CLEFAIRY, + .paletteTag = PALTAG_CLEFAIRY, .oam = &sOamData_Clefairy, .anims = sAnimTable_Clefairy, .images = NULL, @@ -649,36 +736,25 @@ bool8 (*const sSlotMachineSetupTasks[])(u8 *, struct SlotMachineSetupTaskData *) }; #if defined(FIRERED) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_8465930.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_8465950.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_8465970.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_8465990.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_84659b0.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_84659d0.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_84661d4.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_84664bc.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_84664dc.gbapal","graphics/slot_machine/unk_84664fc.gbapal", "graphics/slot_machine/unk_846651c.gbapal"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/firered/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/firered/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/firered/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/firered/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/firered/combos_window.bin.lz"); #elif defined(LEAFGREEN) -static const u16 sBgPal_00[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652bc.gbapal"); -static const u16 sBgPal_10[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652dc.gbapal"); -static const u16 sBgPal_20[] = INCBIN_U16("graphics/slot_machine/unk_lg_84652fc.gbapal"); -static const u16 sBgPal_30[] = INCBIN_U16("graphics/slot_machine/unk_lg_846531c.gbapal"); -static const u16 sBgPal_40[] = INCBIN_U16("graphics/slot_machine/unk_lg_846533c.gbapal"); -static const u32 sBg2Tiles_00[] = INCBIN_U32("graphics/slot_machine/unk_lg_846535c.4bpp.lz"); -static const u32 sBg2Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465ab8.bin.lz"); -static const u16 sBgPal_50[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465d9c.gbapal"); -static const u16 sBgPal_VictoryFlash[] = INCBIN_U16("graphics/slot_machine/unk_lg_8465dbc.gbapal","graphics/slot_machine/unk_lg_8465ddc.gbapal", "graphics/slot_machine/unk_lg_8465dfc.gbapal"); -#endif -static const u32 sBg2Tiles_C0[] = INCBIN_U32("graphics/slot_machine/unk_846653c.4bpp.lz"); -static const u16 sBgPal_70[] = INCBIN_U16("graphics/slot_machine/unk_84665c0.gbapal"); -static const u16 sBgPal_80[] = INCBIN_U16("graphics/slot_machine/unk_84665e0.gbapal"); -static const u16 sBgPal_90[] = INCBIN_U16("graphics/slot_machine/unk_8466600.gbapal"); -#if defined(FIRERED) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_8466620.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_8466998.bin.lz"); -#elif defined(LEAFGREEN) -static const u32 sBg1Tiles[] = INCBIN_U32("graphics/slot_machine/unk_lg_8465f00.4bpp.lz"); -static const u32 sBg1Map[] = INCBIN_U32("graphics/slot_machine/unk_lg_8466278.bin.lz"); +static const u16 sBg_Pal[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/bg.gbapal"); +static const u32 sBg_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/bg.bin.lz"); +static const u16 sBgPal_MatchLines[] = INCBIN_U16("graphics/slot_machine/leafgreen/match_lines.gbapal"); +static const u16 sBgPal_PayoutLight[][16] = INCBIN_U16("graphics/slot_machine/leafgreen/payout_lights.gbapal"); +static const u32 sButtonPressed_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/button_pressed.4bpp.lz"); +static const u16 sCombosWindow_Pal[] = INCBIN_U16("graphics/slot_machine/leafgreen/combos_window.gbapal"); +static const u32 sCombosWindow_Tiles[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.4bpp.lz"); +static const u32 sCombosWindow_Tilemap[] = INCBIN_U32("graphics/slot_machine/leafgreen/combos_window.bin.lz"); #endif static const struct BgTemplate sBgTemplates[] = { @@ -758,15 +834,15 @@ static const u16 sLineTiles_BLTR[] = { 0x0204, 0x0205, 0x0206, 0x0224, 0x0225, 0x0226, 0x01e7, 0x0207, 0x018c, 0x01ac, 0x0131, 0x0151, 0x00d6, 0x00f6, 0x00b7, 0x00b8, 0x00b9, 0x00d7, 0x00d8, 0x00d9 }; -static const struct LineStateTileIdxList sLineStateTileIdxs[] = { - { sLineTiles_TLBR, NELEMS(sLineTiles_TLBR) }, - { sLineTiles_TopRow, NELEMS(sLineTiles_TopRow) }, - { sLineTiles_MiddleRow, NELEMS(sLineTiles_MiddleRow) }, - { sLineTiles_BottomRow, NELEMS(sLineTiles_BottomRow) }, - { sLineTiles_BLTR, NELEMS(sLineTiles_BLTR) } +static const struct LineStateTileIdxList sLineStateTileIdxs[NUM_MATCH_LINES] = { + { sLineTiles_TLBR, ARRAY_COUNT(sLineTiles_TLBR) }, + { sLineTiles_TopRow, ARRAY_COUNT(sLineTiles_TopRow) }, + { sLineTiles_MiddleRow, ARRAY_COUNT(sLineTiles_MiddleRow) }, + { sLineTiles_BottomRow, ARRAY_COUNT(sLineTiles_BottomRow) }, + { sLineTiles_BLTR, ARRAY_COUNT(sLineTiles_BLTR) } }; -static const u8 sWInningLineFlashPalIdxs[2] = {2, 4}; +static const u8 sWinningLineFlashPalIdxs[2] = {2, 4}; static const struct WindowTemplate sYesNoWindowTemplate = { .bg = 0, @@ -778,7 +854,7 @@ static const struct WindowTemplate sYesNoWindowTemplate = { .baseBlock = 0x9F }; -static const u16 sReelButtonMapTileIdxs[][4] = { +static const u16 sReelButtonMapTileIdxs[NUM_REELS][NUM_BUTTON_TILES] = { {0x0229, 0x022a, 0x0249, 0x024a}, {0x022e, 0x022f, 0x024e, 0x024f}, {0x0233, 0x0234, 0x0253, 0x0254} @@ -792,9 +868,9 @@ void PlaySlotMachine(u16 machineIdx, MainCallback savedCallback) SetMainCallback2(savedCallback); else { - if (machineIdx > 5) + if (machineIdx >= ARRAY_COUNT(sReelBiasChances)) machineIdx = 0; - sSlotMachineState->machineidx = machineIdx; + sSlotMachineState->machineIdx = machineIdx; sSlotMachineState->savedCallback = savedCallback; InitSlotMachineState(sSlotMachineState); SetMainCallback2(CB2_InitSlotMachine); @@ -809,12 +885,12 @@ static void InitSlotMachineState(struct SlotMachineState * ptr) ptr->bet = 0; ptr->payout = 0; // for whatever reason, the loop does not use the ptr param - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { sSlotMachineState->reelIsSpinning[i] = FALSE; - sSlotMachineState->reelPositions[i] = 0; - sSlotMachineState->reelSubpixel[i] = 0; - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->reelPositions[i] = 0; + sSlotMachineState->reelSubpixel[i] = 0; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; } } @@ -952,16 +1028,16 @@ static void MainTask_SlotsGameLoop(u8 taskId) if (IsReelSpinning(sSlotMachineState->currentReel) == 0 && !IsSlotMachineSetupTaskActive(0)) { sSlotMachineState->currentReel++; - if (sSlotMachineState->currentReel >= 3) + if (sSlotMachineState->currentReel >= NUM_REELS) { sSlotMachineState->slotRewardClass = CalcPayout(); sSlotMachineState->bet = 0; sSlotMachineState->currentReel = 0; - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_NONE) + if (sSlotMachineState->slotRewardClass == PAYOUT_NONE) SetMainTask(MainTask_DarnNoPayout); else { - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_7) IncrementGameStat(GAME_STAT_SLOT_JACKPOTS); ResetMachineBias(); SetMainTask(MainTask_WinHandlePayout); @@ -1098,7 +1174,7 @@ static void MainTask_WinHandlePayout(u8 taskId) switch (data[0]) { case 0: - if (sSlotMachineState->slotRewardClass == SLOT_PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == SLOT_PAYOUT_7) + if (sSlotMachineState->slotRewardClass == PAYOUT_ROCKET || sSlotMachineState->slotRewardClass == PAYOUT_7) PlayFanfare(MUS_SLOTS_JACKPOT); else PlayFanfare(MUS_SLOTS_WIN); @@ -1201,7 +1277,7 @@ static void Task_SpinReels(u8 taskId) s32 i; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { if (sSlotMachineState->reelIsSpinning[i] || sSlotMachineState->reelSubpixel[i] != 0) { @@ -1213,12 +1289,12 @@ static void Task_SpinReels(u8 taskId) sSlotMachineState->reelSubpixel[i] = 0; sSlotMachineState->reelPositions[i]--; if (sSlotMachineState->reelPositions[i] < 0) - sSlotMachineState->reelPositions[i] = 20; + sSlotMachineState->reelPositions[i] = REEL_LENGTH - 1; } if (sSlotMachineState->reelPositions[i] != sSlotMachineState->destReelPos[i]) continue; } - sSlotMachineState->destReelPos[i] = 21; + sSlotMachineState->destReelPos[i] = REEL_LENGTH; sSlotMachineState->reelIsSpinning[i] = FALSE; } } @@ -1229,10 +1305,8 @@ static void StartReels(void) { s32 i; - for (i = 0; i < 3; i++) - { + for (i = 0; i < NUM_REELS; i++) sSlotMachineState->reelIsSpinning[i] = TRUE; - } } static void StopCurrentReel(u16 whichReel, u16 whichReel2) @@ -1263,7 +1337,7 @@ static s16 GetNextReelPosition(u16 whichReel) { position--; if (position < 0) - position = 20; + position = REEL_LENGTH - 1; } return position; } @@ -1282,7 +1356,7 @@ static void StopReel1(u16 whichReel) { for (j = 0, destPos = nextPos - i + 1; j < 3; j++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(1, sReelIconAnimByReelAndPos[whichReel][destPos])) break; @@ -1298,7 +1372,7 @@ static void StopReel1(u16 whichReel) { for (i = 0, destPos = nextPos + 1; i < 3; i++, destPos++) { - if (destPos >= 21) + if (destPos >= REEL_LENGTH) destPos = 0; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { @@ -1310,7 +1384,7 @@ static void StopReel1(u16 whichReel) for (i = 0, destPos = nextPos; i < 4; i++, destPos--) { if (destPos < 0) - destPos = 20; + destPos = REEL_LENGTH - 1; if (TestReelIconAttribute(sSlotMachineState->machineBias, sReelIconAnimByReelAndPos[whichReel][destPos])) { posToSample[numPosToSample] = i + 1; @@ -1328,7 +1402,7 @@ static void StopReel1(u16 whichReel) } destPos = nextPos - destPos; if (destPos < 0) - destPos += 21; + destPos += REEL_LENGTH; sSlotMachineState->reelStopOrder[0] = whichReel; sSlotMachineState->destReelPos[whichReel] = destPos; } @@ -1342,11 +1416,11 @@ static void StopReel2(u16 whichReel) firstStoppedReelId = sSlotMachineState->reelStopOrder[0]; firstStoppedReelPos = sSlotMachineState->reelPositions[firstStoppedReelId] + 1; - if (firstStoppedReelPos >= 21) + if (firstStoppedReelPos >= REEL_LENGTH) firstStoppedReelPos = 0; nextPos = GetNextReelPosition(whichReel); pos = nextPos + 1; - if (pos >= 21) + if (pos >= REEL_LENGTH) pos = 0; numPossiblePositions = 0; for (i = 0; i < 5; i++) @@ -1358,12 +1432,12 @@ static void StopReel2(u16 whichReel) } pos--; if (pos < 0) - pos = 20; + pos = REEL_LENGTH - 1; } if (numPossiblePositions == 0) { sSlotMachineState->reel2BiasInPlay = 0; - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1375,7 +1449,7 @@ static void StopReel2(u16 whichReel) } pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->reelStopOrder[1] = whichReel; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1405,7 +1479,7 @@ static void StopReel3(u16 whichReel) } if (numPossiblePositions == 0) { - if (sSlotMachineState->machineBias == SLOT_PAYOUT_ROCKET || sSlotMachineState->machineBias == SLOT_PAYOUT_7) + if (sSlotMachineState->machineBias == PAYOUT_ROCKET || sSlotMachineState->machineBias == PAYOUT_7) pos = 4; else pos = 0; @@ -1414,7 +1488,7 @@ static void StopReel3(u16 whichReel) pos = possiblePositions[0]; pos = nextPos - pos; if (pos < 0) - pos += 21; + pos += REEL_LENGTH; sSlotMachineState->destReelPos[whichReel] = pos; } @@ -1431,10 +1505,10 @@ static bool32 TwoReelBiasCheck(s32 reel0id, s32 reel0pos, s32 reel1id, s32 reel1 icons[3 * reel0id + i] = sReelIconAnimByReelAndPos[reel0id][reel0pos]; icons[3 * reel1id + i] = sReelIconAnimByReelAndPos[reel1id][reel1pos]; reel0pos++; - if (reel0pos >= 21) + if (reel0pos >= REEL_LENGTH) reel0pos = 0; reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; } @@ -1501,40 +1575,40 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) firstStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[0]] + 1; secondStoppedPos = sSlotMachineState->reelPositions[sSlotMachineState->reelStopOrder[1]] + 1; reelPos++; - if (firstStoppedPos >= 21) + if (firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (secondStoppedPos >= 21) + if (secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; for (i = 0; i < 3; i++) { icons[sSlotMachineState->reelStopOrder[0] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[0]][firstStoppedPos]; icons[sSlotMachineState->reelStopOrder[1] * 3 + i] = sReelIconAnimByReelAndPos[sSlotMachineState->reelStopOrder[1]][secondStoppedPos]; icons[reelId * 3 + i] = sReelIconAnimByReelAndPos[reelId][reelPos]; - if (++firstStoppedPos >= 21) + if (++firstStoppedPos >= REEL_LENGTH) firstStoppedPos = 0; - if (++secondStoppedPos >= 21) + if (++secondStoppedPos >= REEL_LENGTH) secondStoppedPos = 0; - if (++reelPos >= 21) + if (++reelPos >= REEL_LENGTH) reelPos = 0; } switch (biasIcon) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: for (i = 0; i < 3; i++) { if (TestReelIconAttribute(1, icons[i])) return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]]) return FALSE; } return TRUE; - case SLOT_PAYOUT_CHERRIES2: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES2: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return FALSE; @@ -1545,15 +1619,15 @@ static bool32 OneReelBiasCheck(s32 reelId, s32 reelPos, s32 biasIcon) return TRUE; } return FALSE; - case SLOT_PAYOUT_CHERRIES3: - for (i = 0; i < 5; i++) + case PAYOUT_CHERRIES3: + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; } return FALSE; } - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][1]] && icons[sThirdReelBiasCheckIndices[i][0]] == icons[sThirdReelBiasCheckIndices[i][2]] && TestReelIconAttribute(biasIcon, icons[sThirdReelBiasCheckIndices[i][0]])) return TRUE; @@ -1565,19 +1639,19 @@ static bool32 TestReelIconAttribute(s32 attr, s32 icon) { switch (attr) { - case SLOT_PAYOUT_NONE: + case PAYOUT_NONE: return icon ^ 4 ? TRUE : FALSE; - case SLOT_PAYOUT_CHERRIES2: - case SLOT_PAYOUT_CHERRIES3: - return icon == SLOT_IMAGE_CHERRIES ? TRUE : FALSE; - case SLOT_PAYOUT_MAGSHELL: - return icon == SLOT_IMAGE_MAGNEMITE || icon == SLOT_IMAGE_SHELLDER ? TRUE : FALSE; - case SLOT_PAYOUT_PIKAPSY: - return icon == SLOT_IMAGE_PIKACHU || icon == SLOT_IMAGE_PSYDUCK ? TRUE : FALSE; - case SLOT_PAYOUT_ROCKET: - return icon == SLOT_IMAGE_ROCKET ? TRUE : FALSE; - case SLOT_PAYOUT_7: - return icon == SLOT_IMAGE_7 ? TRUE : FALSE; + case PAYOUT_CHERRIES2: + case PAYOUT_CHERRIES3: + return icon == ICON_CHERRIES ? TRUE : FALSE; + case PAYOUT_MAGSHELL: + return icon == ICON_MAGNEMITE || icon == ICON_SHELLDER ? TRUE : FALSE; + case PAYOUT_PIKAPSY: + return icon == ICON_PIKACHU || icon == ICON_PSYDUCK ? TRUE : FALSE; + case PAYOUT_ROCKET: + return icon == ICON_ROCKET ? TRUE : FALSE; + case PAYOUT_7: + return icon == ICON_7 ? TRUE : FALSE; default: return FALSE; } @@ -1588,18 +1662,18 @@ static u8 ReelIconToPayoutRank(s32 iconId) switch (iconId) { default: - case SLOT_IMAGE_CHERRIES: - return SLOT_PAYOUT_CHERRIES2; - case SLOT_IMAGE_MAGNEMITE: - case SLOT_IMAGE_SHELLDER: - return SLOT_PAYOUT_MAGSHELL; - case SLOT_IMAGE_PIKACHU: - case SLOT_IMAGE_PSYDUCK: - return SLOT_PAYOUT_PIKAPSY; - case SLOT_IMAGE_ROCKET: - return SLOT_PAYOUT_ROCKET; - case SLOT_IMAGE_7: - return SLOT_PAYOUT_7; + case ICON_CHERRIES: + return PAYOUT_CHERRIES2; + case ICON_MAGNEMITE: + case ICON_SHELLDER: + return PAYOUT_MAGSHELL; + case ICON_PIKACHU: + case ICON_PSYDUCK: + return PAYOUT_PIKAPSY; + case ICON_ROCKET: + return PAYOUT_ROCKET; + case ICON_7: + return PAYOUT_7; } } @@ -1607,22 +1681,22 @@ static void CalcSlotBias(void) { u16 rval = Random() / 4; s32 i; - const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineidx]; - for (i = 0; i < 6; i++) + const u16 * biasChances = sReelBiasChances[sSlotMachineState->machineIdx]; + for (i = 0; i < NUM_PAYOUT_TYPES - 1; i++) { if (rval < biasChances[i]) break; } - if (sSlotMachineState->machineBias < SLOT_PAYOUT_ROCKET) + if (sSlotMachineState->machineBias < PAYOUT_ROCKET) { if (sSlotMachineState->biasCooldown == 0) { - if ((Random() & 0x3FFF) < biasChances[SLOT_PAYOUT_7]) + if ((Random() & 0x3FFF) < biasChances[PAYOUT_7]) sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; } if (sSlotMachineState->biasCooldown != 0) { - if (i == 0 && (Random() & 0x3FFF) < 0x2CCC) // 70% + if (i == 0 && (Random() & 0x3FFF) < (int)(0.7 * 0x3FFF)) // 70% sSlotMachineState->biasCooldown = (Random() & 1) ? 5 : 60; sSlotMachineState->biasCooldown--; } @@ -1642,7 +1716,7 @@ static u16 CalcPayout(void) s32 reel1pos, reel2pos, reel3pos; s32 bestMatch; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) sSlotMachineState->winFlags[i] = FALSE; bestMatch = 0; @@ -1653,20 +1727,20 @@ static u16 CalcPayout(void) for (i = 0; i < 3; i++) { reel1pos++; - if (reel1pos >= 21) + if (reel1pos >= REEL_LENGTH) reel1pos = 0; reel2pos++; - if (reel2pos >= 21) + if (reel2pos >= REEL_LENGTH) reel2pos = 0; reel3pos++; - if (reel3pos >= 21) + if (reel3pos >= REEL_LENGTH) reel3pos = 0; visibleIcons[0 * 3 + i] = sReelIconAnimByReelAndPos[0][reel1pos]; visibleIcons[1 * 3 + i] = sReelIconAnimByReelAndPos[1][reel2pos]; visibleIcons[2 * 3 + i] = sReelIconAnimByReelAndPos[2][reel3pos]; } sSlotMachineState->payout = 0; - for (i = 0; i < 5; i++) + for (i = 0; i < NUM_MATCH_LINES; i++) { if (sSlotMachineState->bet >= sRowAttributes[i][ROWATTR_MINBET]) { @@ -1699,16 +1773,16 @@ static u8 GetPlayerBet(void) return sSlotMachineState->bet; } -static bool32 GetWinFlagByLine(int a0) +static bool32 GetWinFlagByLine(int lineId) { - return sSlotMachineState->winFlags[a0]; + return sSlotMachineState->winFlags[lineId]; } static bool32 LoadSpriteGraphicsAndAllocateManager(void) { s32 i; - for (i = 0; i < NELEMS(sSpriteSheets); i++) + for (i = 0; i < ARRAY_COUNT(sSpriteSheets); i++) LoadCompressedSpriteSheet(&sSpriteSheets[i]); LoadSpritePalettes(sSpritePalettes); sSlotMachineGfxManager = Alloc(sizeof(*sSlotMachineGfxManager)); @@ -1731,13 +1805,11 @@ static void InitGfxManager(struct SlotMachineGfxManager * manager) { s32 i, j; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { manager->field_00[i] = 0; - for (j = 0; j < 5; j++) - { + for (j = 0; j < REEL_LOAD_LENGTH; j++) manager->reelIconSprites[i][j] = NULL; - } } } @@ -1747,9 +1819,9 @@ static void CreateReelIconSprites(void) s32 i, j; s32 spriteId; s32 animId; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { spriteId = CreateSprite(&sSpriteTemplate_ReelIcons, 80 + 40 * i, 44 + 24 * j, 2); animId = sReelIconAnimByReelAndPos[i][j]; @@ -1772,11 +1844,11 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) s32 i, j; s32 reelPos, ypos; - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { reelPos = *reelPosPtr; ypos = *yposPtr * 8; - for (j = 0; j < 5; j++) + for (j = 0; j < REEL_LOAD_LENGTH; j++) { sSlotMachineGfxManager->reelIconSprites[i][j]->y2 = ypos; { @@ -1791,7 +1863,7 @@ static void UpdateReelIconSprites(const s16 * reelPosPtr, const s16 * yposPtr) } sSlotMachineGfxManager->reelIconSprites[i][j]->oam.paletteNum = IndexOfSpritePaletteTag(sReelIconPaletteTags[sReelIconAnimByReelAndPos[i][reelPos]]); reelPos++; - if (reelPos >= 21) + if (reelPos >= REEL_LENGTH) reelPos = 0; } reelPosPtr++; @@ -1819,11 +1891,11 @@ static void CreateScoreDigitSprites(void) s32 i; s32 spriteId; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x55 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 85 + 7 * i, 30, 0); sSlotMachineGfxManager->creditDigitSprites[i] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Digits, 0x85 + 7 * i, 30, 0); + spriteId = CreateSprite(&sSpriteTemplate_Digits, 133 + 7 * i, 30, 0); sSlotMachineGfxManager->payoutDigitSprites[i] = &gSprites[spriteId]; } } @@ -1836,7 +1908,7 @@ static void UpdateCoinsDisplay(void) s32 divisor = 1000; s32 quotient; - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_DIGIT_SPRITES; i++) { quotient = coins / divisor; StartSpriteAnim(sSlotMachineGfxManager->creditDigitSprites[i], quotient); @@ -1850,11 +1922,9 @@ static void UpdateCoinsDisplay(void) static void CreateClefairySprites(void) { - s32 spriteId; - - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0x10, 0x88, 1); + s32 spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 16, 136, 1); sSlotMachineGfxManager->clefairySprites[0] = &gSprites[spriteId]; - spriteId = CreateSprite(&sSpriteTemplate_Clefairy, 0xE0, 0x88, 1); + spriteId = CreateSprite(&sSpriteTemplate_Clefairy, DISPLAY_WIDTH - 16, 136, 1); sSlotMachineGfxManager->clefairySprites[1] = &gSprites[spriteId]; sSlotMachineGfxManager->clefairySprites[1]->hFlip = TRUE; } @@ -1862,10 +1932,8 @@ static void CreateClefairySprites(void) static void SetClefairySpriteAnim(u8 animId) { s32 i; - for (i = 0; i < 2; i++) - { + for (i = 0; i < (int)ARRAY_COUNT(sSlotMachineGfxManager->clefairySprites); i++) StartSpriteAnim(sSlotMachineGfxManager->clefairySprites[i], animId); - } } static bool32 CreateSlotMachine(void) @@ -1875,7 +1943,7 @@ static bool32 CreateSlotMachine(void) struct SlotMachineSetupTaskData * ptr = Alloc(sizeof(struct SlotMachineSetupTaskData)); if (ptr == NULL) return FALSE; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) ptr->tasks[i].active = 0; ptr->yesNoMenuActive = FALSE; SetWordTaskArg(CreateTask(Task_SlotMachine, 2), 0, (uintptr_t)ptr); @@ -1898,7 +1966,7 @@ static void Task_SlotMachine(u8 taskId) struct SlotMachineSetupTaskData * ptr = (void *)GetWordTaskArg(taskId, 0); s32 i; - for (i = 0; i < 8; i++) + for (i = 0; i < (int)ARRAY_COUNT(ptr->tasks); i++) { if (ptr->tasks[i].active) ptr->tasks[i].active = sSlotMachineSetupTasks[ptr->tasks[i].funcno](&ptr->tasks[i].state, ptr); @@ -1958,7 +2026,7 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData SetGpuReg(REG_OFFSET_DISPCNT, 0); ResetBgPositions(); ResetBgsAndClearDma3BusyFlags(FALSE); - InitBgsFromTemplates(0, sBgTemplates, NELEMS(sBgTemplates)); + InitBgsFromTemplates(0, sBgTemplates, ARRAY_COUNT(sBgTemplates)); InitWindows(sWindowTemplates); SetBgTilemapBuffer(3, ptr->bg3TilemapBuffer); @@ -1966,29 +2034,29 @@ static bool8 SlotsTask_GraphicsInit(u8 * state, struct SlotMachineSetupTaskData CopyBgTilemapBufferToVram(3); ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_00, 0, 0x00, 0); - DecompressAndCopyTileDataToVram(2, sBg2Tiles_C0, 0, 0xC0, 0); + DecompressAndCopyTileDataToVram(2, sBg_Tiles, 0, 0x00, 0); + DecompressAndCopyTileDataToVram(2, sButtonPressed_Tiles, 0, 0xC0, 0); SetBgTilemapBuffer(2, ptr->bg2TilemapBuffer); - CopyToBgTilemapBuffer(2, sBg2Map, 0, 0x00); + CopyToBgTilemapBuffer(2, sBg_Tilemap, 0, 0x00); CopyBgTilemapBufferToVram(2); - LoadPalette(sBgPal_00, 0x00, 0xA0); - LoadPalette(sBgPal_50, 0x50, 0x20); - LoadPalette(sBgPal_70, 0x70, 0x60); + LoadPalette(sBg_Pal, 0x00, sizeof(sBg_Pal)); + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_BET * 16, sizeof(sBgPal_MatchLines)); + LoadPalette(sCombosWindow_Pal, 0x70, sizeof(sCombosWindow_Pal)); LoadColor(RGB(30, 30, 31), pal); LoadUserWindowGfx2(0, 0x00A, 0xD0); LoadStdWindowGfxOnBg(0, 0x001, 0xF0); SetBgTilemapBuffer(0, ptr->bg0TilemapBuffer); FillBgTilemapBufferRect_Palette0(0, 0, 0, 2, 32, 30); - DecompressAndCopyTileDataToVram(1, sBg1Tiles, 0, 0, 0); - DecompressAndCopyTileDataToVram(1, sBg1Map, 0, 0, 1); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tiles, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, sCombosWindow_Tilemap, 0, 0, 1); CopyBgTilemapBufferToVram(1); LoadPalette(GetTextWindowPalette(2), 0xE0, 0x20); FillWindowPixelBuffer(1, 0xFF); PutWindowTilemap(1); - x = 236 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); + x = DISPLAY_WIDTH - 4 - GetStringWidth(FONT_SMALL, gString_SlotMachineControls, 0); textColor[0] = TEXT_DYNAMIC_COLOR_6; textColor[1] = TEXT_COLOR_WHITE; textColor[2] = TEXT_COLOR_DARK_GRAY; @@ -2278,20 +2346,20 @@ static void SetLineStatesByBet(u16 * bgTilemapBuffer) switch (GetPlayerBet()) { case 0: - SetLineState(bgTilemapBuffer, 0, 4); - SetLineState(bgTilemapBuffer, 1, 4); - SetLineState(bgTilemapBuffer, 2, 4); - SetLineState(bgTilemapBuffer, 3, 4); - SetLineState(bgTilemapBuffer, 4, 4); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_NORMAL); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_NORMAL); break; case 3: - SetLineState(bgTilemapBuffer, 0, 5); - SetLineState(bgTilemapBuffer, 4, 5); + SetLineState(bgTilemapBuffer, 0, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 4, PALSLOT_LINE_BET); case 2: - SetLineState(bgTilemapBuffer, 1, 5); - SetLineState(bgTilemapBuffer, 3, 5); + SetLineState(bgTilemapBuffer, 1, PALSLOT_LINE_BET); + SetLineState(bgTilemapBuffer, 3, PALSLOT_LINE_BET); case 1: - SetLineState(bgTilemapBuffer, 2, 5); + SetLineState(bgTilemapBuffer, 2, PALSLOT_LINE_BET); break; } } @@ -2318,11 +2386,11 @@ static void Task_FlashWinningLine(u8 taskId) switch (data[0]) { case 0: - LoadPalette(sBgPal_50, 0x60, 0x20); - for (i = 0; i < 5; i++) + LoadPalette(sBgPal_MatchLines, PALSLOT_LINE_MATCH * 16, sizeof(sBgPal_MatchLines)); + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 6); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_MATCH); } CopyBgTilemapBufferToVram(2); data[0]++; @@ -2331,7 +2399,7 @@ static void Task_FlashWinningLine(u8 taskId) if (data[1] == 0) { u16 y = gSineTable[data[2]] >> 7; - LoadPalette(&sBgPal_VictoryFlash[16 * y], 0x10, 0x20); + LoadPalette(&sBgPal_PayoutLight[y], 0x10, sizeof(sBgPal_PayoutLight[0])); data[2] += 32; data[2] &= 0x7F; data[1] = 8; @@ -2344,7 +2412,7 @@ static void Task_FlashWinningLine(u8 taskId) data[4] += 8; data[4] &= 0x7F; data[5] = gSineTable[data[4]] >> 5; - BlendPalettes(0x00000040, data[5], RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5], RGB_BLACK); } else { @@ -2354,22 +2422,24 @@ static void Task_FlashWinningLine(u8 taskId) data[4] = 0; data[5]++; data[5] &= 1; - BlendPalettes(0x00000040, data[5] * 8, RGB_BLACK); + BlendPalettes(1 << PALSLOT_LINE_MATCH, data[5] * 8, RGB_BLACK); } } - for (i = 0; i < NELEMS(sWInningLineFlashPalIdxs); i++) - { - gPlttBufferFaded[sWInningLineFlashPalIdxs[i] + 0x60] = gPlttBufferUnfaded[sWInningLineFlashPalIdxs[i] + 0x60]; - } + for (i = 0; i < ARRAY_COUNT(sWinningLineFlashPalIdxs); i++) + gPlttBufferFaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16] = gPlttBufferUnfaded[sWinningLineFlashPalIdxs[i] + PALSLOT_LINE_MATCH * 16]; break; case 2: - for (i = 0; i < 5; i++) + // Restore match lines to normal color + for (i = 0; i < NUM_MATCH_LINES; i++) { if (GetWinFlagByLine(i)) - SetLineState(GetBgTilemapBuffer(2), i, 4); + SetLineState(GetBgTilemapBuffer(2), i, PALSLOT_LINE_NORMAL); } - LoadPalette(sBgPal_10, 0x10, 0x20); + + // Restore payout lights to normal color + LoadPalette(&sBg_Pal[1], 0x10, sizeof(sBg_Pal[1])); + CopyBgTilemapBufferToVram(2); data[0]++; break; @@ -2408,9 +2478,9 @@ static void InitReelButtonTileMem(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; data->buttonReleasedTiles[i][j] = buffer[idx]; @@ -2421,12 +2491,12 @@ static void InitReelButtonTileMem(void) static void SetReelButtonPressed(u8 reel) { - if (reel < 3) + if (reel < NUM_REELS) { s32 i; struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 4; i++) + for (i = 0; i < NUM_BUTTON_TILES; i++) { u16 idx = sReelButtonMapTileIdxs[reel][i]; buffer[idx] = data->buttonPressedTiles[reel][i]; @@ -2440,9 +2510,9 @@ static void ReleaseReelButtons(void) struct SlotMachineSetupTaskData * data = GetSlotMachineSetupTaskDataPtr(); u16 * buffer = GetBgTilemapBuffer(2); - for (i = 0; i < 3; i++) + for (i = 0; i < NUM_REELS; i++) { - for (j = 0; j < 4; j++) + for (j = 0; j < NUM_BUTTON_TILES; j++) { u16 idx = sReelButtonMapTileIdxs[i][j]; buffer[idx] = data->buttonReleasedTiles[i][j]; From 9db23d743793c7e867d14c9d3fd2aa5e8accc389 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 5 Feb 2023 13:23:51 -0500 Subject: [PATCH 07/29] Fix some miscolored pixels --- graphics/slot_machine/leafgreen/bg.png | Bin 1792 -> 1792 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/graphics/slot_machine/leafgreen/bg.png b/graphics/slot_machine/leafgreen/bg.png index a3e7813f14b332ed6915cda8d26c5bd7b86befc8..97ff62b092f0a35d531b39f1d3e20cdd62c32680 100644 GIT binary patch delta 295 zcmV+?0oeY44uB4@ngt%=$p!cLV+eOx?t$N)+~Y9tYeTu7*{fevh1JMCQj@p^O@H9? zD4s|+1MnSA9hfIVBlGA30hS$zUVNt1F(Qt8FjugXX-02$>K#khI`aPE0pj%{2Vf7B zu3&&XfxU6bfrUG3fYO-^kRu3gji&fsav-5!?Ldl9yh1x*ZZw*EjH))};VT2kc}87{ z#D-@am?D7DI#B3|s3#lQS(TV^7002ovPDHLkV1keLg5LlD delta 295 zcmV+?0oeY44uB4@ngt$V=Yo6uF@!rT_rPyY?r|9SwV_cBh^8rB~^5MbGX=*4GB9V6nn2Xh5GnP&86r{1x2tt0Or9w1&Xasc)~ z=?VtO6WAM<99X!s1}L4$06Bu-)@X|FB?l7v)efWx#VfP}=0>Br$Ea#k9=>8XaK!N9#VpjcOV0BuxtOE_a6bE tpAstjf1d++fSF*_Gxs+F9LC?_!2f9p3n}8geqI0o002ovPDHLkV1nrQh0Xu~ From 2dd60bd86c487cbb61f1c342066d3af750b9a819 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sun, 5 Feb 2023 22:09:17 -0500 Subject: [PATCH 08/29] Document credits graphics --- graphics/credits/blastoise_1.png | Bin 0 -> 1348 bytes graphics/credits/blastoise_2.png | Bin 0 -> 1609 bytes graphics/credits/charizard_1.png | Bin 0 -> 1304 bytes graphics/credits/charizard_2.png | Bin 0 -> 1954 bytes .../{unk_8EAE548.bin => copyright.bin} | Bin graphics/credits/copyright.png | Bin 0 -> 867 bytes .../{unk_8413DB8.png => ground_city.png} | Bin .../{unk_8413874.png => ground_dirt.png} | Bin .../{unk_8413338.png => ground_grass.png} | Bin graphics/credits/pikachu_1.png | Bin 0 -> 782 bytes graphics/credits/pikachu_2.png | Bin 0 -> 908 bytes .../{unk_8411C18.png => player_female.png} | Bin .../{unk_8410E30.png => player_male.png} | Bin .../credits/{unk_8EAB30C.bin => pokeball.bin} | Bin .../credits/{unk_8EAAB98.png => pokeball.png} | Bin .../{blastoise.pal => pokeball_blastoise.pal} | 0 .../{charizard.pal => pokeball_charizard.pal} | 0 .../{pikachu.pal => pokeball_pikachu.pal} | 0 .../{venusaur.pal => pokeball_venusaur.pal} | 0 .../credits/{unk_84129C0.png => rival.png} | Bin .../credits/{unk_8410B20.bin => the_end.bin} | Bin .../credits/{unk_8410B20.png => the_end.png} | Bin graphics/credits/unk_840CB8C.bin | Bin 3200 -> 0 bytes graphics/credits/unk_840D228.bin | Bin 4992 -> 0 bytes graphics/credits/unk_840DC0C.bin | Bin 2048 -> 0 bytes graphics/credits/unk_840E158.bin | Bin 3200 -> 0 bytes graphics/credits/unk_840E904.bin | Bin 3840 -> 0 bytes graphics/credits/unk_840F240.bin | Bin 3200 -> 0 bytes graphics/credits/unk_840F944.bin | Bin 3840 -> 0 bytes graphics/credits/unk_8410198.bin | Bin 3200 -> 0 bytes graphics/credits/unk_84105B4.bin | Bin 4608 -> 0 bytes graphics/credits/unk_8410E10.pal | 19 - graphics/credits/unk_8411BF8.pal | 19 - graphics/credits/unk_84129A0.pal | 19 - graphics/credits/unk_8413318.pal | 19 - graphics/credits/unk_8413854.pal | 19 - graphics/credits/unk_8413D98.pal | 19 - graphics/credits/unk_8EAE548.png | Bin 908 -> 0 bytes graphics/credits/venusaur_1.png | Bin 0 -> 1521 bytes graphics/credits/venusaur_2.png | Bin 0 -> 1812 bytes graphics/credits/venusaur_unused.png | Bin 0 -> 1094 bytes .../{unk_840CA54.bin => white_circle.bin} | Bin .../{unk_840C630.pal => white_circle.pal} | 0 .../{unk_840C650.png => white_circle.png} | Bin graphics_file_rules.mk | 3 - include/graphics.h | 12 +- src/credits.c | 377 +++++++++--------- src/graphics.c | 20 +- 48 files changed, 209 insertions(+), 317 deletions(-) create mode 100644 graphics/credits/blastoise_1.png create mode 100644 graphics/credits/blastoise_2.png create mode 100644 graphics/credits/charizard_1.png create mode 100644 graphics/credits/charizard_2.png rename graphics/credits/{unk_8EAE548.bin => copyright.bin} (100%) create mode 100644 graphics/credits/copyright.png rename graphics/credits/{unk_8413DB8.png => ground_city.png} (100%) rename graphics/credits/{unk_8413874.png => ground_dirt.png} (100%) rename graphics/credits/{unk_8413338.png => ground_grass.png} (100%) create mode 100644 graphics/credits/pikachu_1.png create mode 100644 graphics/credits/pikachu_2.png rename graphics/credits/{unk_8411C18.png => player_female.png} (100%) rename graphics/credits/{unk_8410E30.png => player_male.png} (100%) rename graphics/credits/{unk_8EAB30C.bin => pokeball.bin} (100%) rename graphics/credits/{unk_8EAAB98.png => pokeball.png} (100%) rename graphics/credits/{blastoise.pal => pokeball_blastoise.pal} (100%) rename graphics/credits/{charizard.pal => pokeball_charizard.pal} (100%) rename graphics/credits/{pikachu.pal => pokeball_pikachu.pal} (100%) rename graphics/credits/{venusaur.pal => pokeball_venusaur.pal} (100%) rename graphics/credits/{unk_84129C0.png => rival.png} (100%) rename graphics/credits/{unk_8410B20.bin => the_end.bin} (100%) rename graphics/credits/{unk_8410B20.png => the_end.png} (100%) delete mode 100644 graphics/credits/unk_840CB8C.bin delete mode 100644 graphics/credits/unk_840D228.bin delete mode 100644 graphics/credits/unk_840DC0C.bin delete mode 100644 graphics/credits/unk_840E158.bin delete mode 100644 graphics/credits/unk_840E904.bin delete mode 100644 graphics/credits/unk_840F240.bin delete mode 100644 graphics/credits/unk_840F944.bin delete mode 100644 graphics/credits/unk_8410198.bin delete mode 100644 graphics/credits/unk_84105B4.bin delete mode 100644 graphics/credits/unk_8410E10.pal delete mode 100644 graphics/credits/unk_8411BF8.pal delete mode 100644 graphics/credits/unk_84129A0.pal delete mode 100644 graphics/credits/unk_8413318.pal delete mode 100644 graphics/credits/unk_8413854.pal delete mode 100644 graphics/credits/unk_8413D98.pal delete mode 100644 graphics/credits/unk_8EAE548.png create mode 100644 graphics/credits/venusaur_1.png create mode 100644 graphics/credits/venusaur_2.png create mode 100644 graphics/credits/venusaur_unused.png rename graphics/credits/{unk_840CA54.bin => white_circle.bin} (100%) rename graphics/credits/{unk_840C630.pal => white_circle.pal} (100%) rename graphics/credits/{unk_840C650.png => white_circle.png} (100%) diff --git a/graphics/credits/blastoise_1.png b/graphics/credits/blastoise_1.png new file mode 100644 index 0000000000000000000000000000000000000000..b212fbcc1930bb066b1999bc4cb19de110befcbf GIT binary patch literal 1348 zcmV-K1-tr*P)9YDzJzF*)9(bN|(9?yNz*i#eQgL7c_zbCl*vgOo~2a}W>^u1rp+000Ef zNklFai zxgn9u{v(q_YOjpF3oGr#8Dl3Q0>yrPV-xTXdg!f(js$_3PrmQR{CKa?_<#JX0hNDm zYsBV9`CE)jD;sLFMh26{rVuPGEkqDC>!1i2o507yoYDl)Dw4`1xMGZrq3G2Hg4b5r z=M_?HBsl-1KaLoBHMBTb#K@13TXsK=29o)*~XvEwt__#}mmS7+Wmm`VP*DjLiB7%fGyR5Vb*=E@o zAsGItqH*{97D40+d6Zx(gM)?r_Q**?*fqcJAgEik3^t=;H%ivcteX($y zpED372#})gh4Z1z(Jl$!J%RT#Q{dj;Ao#uv?$fT-U4thuAa58G+&8V^aIXT=*!aeA z?4J-E%m*Z3Qy%geX0zhrAti>5f~a^5_X7TDEbU3^`FMtW&)5Pb|vX>>%b^CY; z3;}p_hHepz47|?((T}|zW)g>swh6!k3cBarGKj@Mf_X3)4wA+&0}ERtUuyi=`JuNC z2FaP!MAJ~*n*2*UMgf!oAvy$FJwEtW8Bdnw7#M)T(@yn3q6cvHEa*7h6&uIoVORq< z1GX#(QduS@7*P$xh5I#k+^2)=1&;O0DyT?-cFwu|wsVq!6aBt=#4}6%d}rj1Smkf} ztOm*le6;*kZcO`k=NYsrTqB$I@fm$gcwQyAUj;X_X;}7-@@NKYaQ59xU>ZIux`W5E z^CCF%g;*XHLANI`$}Otef>tvkc;+rRktR&B+(oy4imiFZ8$n>G3!23H!W^FY8$V00009YDzJzF*)9(bN|(9?yNz*i#eQgL7c_zbCl*vgOo~2a}W>^u1rp+000Hl zNklHt_6u>ofmT*j#4z<8j)`p0=bqL}1sz3r-EpgT^4h?6hmqJ4SjZ{d% z4$%?>Fc<$Ll!O97Cmm@S1-giLqQuy+A@cf;-%^q`K!HwqfMoOZwIVbkDM^9>k)w_OZGwEaUsh&Sb*9RHe17 z&9T0ZQ4Xpt0H@TA670=)oUITF0UXr=tYh3P!F>%5&`Y@&M;_xy(K`0otJ+$+Xq;v~ z28yn^K13m6pZ;;&7mTZlMr`}HWdkgi;0m=`v0zLH$bhTCV8qx8w?f-KTdvpp7>BPj z+YMFG4PZdt9zGfLPgAgK+vke0)(z5L7PedKwUKZVJOSk`-H;$^86qsf25PQ#U5G=F z#{<)hnOLWwqO=S`%p##yOmgLDMvIPypDq zdvF%5@b$AYMdc6169At+hOZwJ5Nt~D9xJ|^GJk4w3)*B(1_cwNUsu$ zIgEG+C-Z|y6#^(A--Rc^>gHUTp7Z8Nh!89fMQA-oBJCUOmTZBIQ%G-ON|Bs(plkqR z{v^K5D>o5#5pzntj%l6{$pIKU&P3JRIIOzJoax5ll>bZ!d10PNP*;8D5}`N_dtqU^ z4pycMH{ydqVjReCRJ7+@D(YSg=~#eCe~KypD+58kSMYs0#aIK=1qfYs%zV#xuLpyE z27b-(g1RdlbMPiV!Fkh}BE$3P&7e?ufFgLCF(1Hg2G$YUcu0ft4@>X}Z6xSZPP%zc z%n^?03c&GIyRdzPnj0!>-Gj;*Wgs@-IdV7S>!WrCTI2v}lyN%qpt>`ViZ|$=Jtj)iGRwqQDfs4>- zi6zyZVuK?r69c1&1Zrio9A1W`;d@gwFCVxVSESl$qXP zvTCr_-38&QepKX{MLI8&+i`_&N822v@ARj3j**U;UZYcdceJa}aelQ(D)J~(&{^$( zvL2l4K|*$3$WG;Cpt^h)^vbiz!LhdkCWfFI`u&drMWNBkKAW#_qV|DI7zHs5H5fAXFJwPkliFZ zZjAsO&p;!KD6fLEWHarX=M_sCzS}xjA7Yz%@Oqz&gC3tv2wC&2sxg> zhjF2bE716U5IDH^7-Nx}y2v>#qX`gdvSi&$ z%1prEz!H$Lm@`pc><9-)np)*!7?8g20uEpqbD&@iDG$NKem)Gr#T>~Im2pxV*ivu)oN0#K>*d&)&Kwhb1blf000D| zNklKpL6b4{s=pdj3%B3*kX3-)PRVKv-I$PQ^hy{XZ@e*ih1}&Pk8At~P zh=;Q%1sy{VUT=I&gL9K9fk#GdSe@*d68Ts z(Z(kyy`7^LOs+v2TVN#EqF0wwb(J64Ezk>Q%=RTLA)Nac85|=F3xQ(^jR8f@xsyS= zHF2&7+Wb^RVxdlRXzTNyi9kD&FySCmOrNf{^6AipW;nx+-LKwAsWO#Kq>PD@M+xna?J!XRrjK zg)&f#jOA#h4=RN?Z8k_~5$08-0{@`kD-F`JNFfC_5jGTz3DzW}Hv}g`(B!s)TkRhu z#Q$pw1_Jt`+D9p@wYSNYc(cA$tKF+N8umk4h!V;`1$(mG<)8oeksgUY9Bi!0- z@0>_jOQ9WMq=2e61Z$7lJxf3lSi9H2u_;nO6-d?D{CejJ!S@)rVbe`Eaq$9o5c(lk z5a+zPmcfntMvZ-67m<+AQw-*6l(^ha7 z``W$U&j)yuPa9PB;im{6ip`jCc$30CSQy4F>sM=CKngVWA|BA=1O+FIAj5s_mbC-X z!5xHR4V3_)+2@ghFmMd}!MVFI-mm=>;hSj~OfGX5_;imG>~^~yAHwOW!Oq-|2;uf^ zf~u9=$Qz-1-KAFc!+4O0)nQt2;AxNs=YGVyvQxODCWvpD zLx}(dSQ;4aJLS3^V94kk6L6$M3Vofz?sp+m$KBet_08y{;7qrY!Rkr6D}H$Ncz<7K zNiyX*>||TF`Nv}~(3$t5f2cuVY1holk7G0OJTK;lnX7cF*^V6lmK}&D{>XdjjZ)ab zR;AjAPM&=T;K_;*v4RzBI- z?~TOT%tq!Cj`(4xOid;t6wfi61sbK0a-HI};(9L$}RBwgL`C)$v7PxDdqrhQr1A z^4O&-82-h1-oe82#T8otFWJ?{{+ZT+*()4gFI_q2<*J@#nr&GBs{I49p~B^GFPNYJ O0000xV*ivu)oN0#K>*d&)&Kwhb1blf000Lq zNklcT^XBJPQnfx>AoTpkMK5Wu?!MJfVS5D%`< zgD?Ica*_?Fz>1^<9~{7MDL^bDx7^tUL=+UT+DAtT&;aD}rMCbIqWG+Xt?*{<5$C<_3TEO{xs90E}^*R6f!;Aoj7|5vN z+9FCrlfP38BNM_9yGyeI)}<}b^slBY@P{Nzzqe)9LBz?WCtn_7y{dw zEF$2fLh_X$8-PB%Bn^!q?S#B~CeI)6xj0anB5vrwHzXDtaK0={{ZxIGBK?affoG1o_co3AcXfJ*Mv*7h4_ z0*JG=CVG6}C%Zvo(k9jEn5G%fv}i63mJkS932qiX;IpbJP43Yc8^s^D zPwuRxfSLkvG}H%Tz++(dxj_Iw*<4FgwJI&r4das}e5gf#itg#6I6AOWrZO*lmzpeLTw~XSQ6p%Ju zXUvv>3Ir7IZjgpb0vusz6?MHx0qe*R+r{g>ML-SH6M+f>i}}jO@s=Ew5V%t!pu8@# zoq!h<8iCs}jZ$%A1N#>D)xA*whm2SbJu3!!sDNW^m+o#8&^);p#jE;t43Hz`b!=UC zBv9uTDIfrkv5i1{5Rb_P^M29#{ZpwTfF8;-w?5#UN`q0tJ!)#;-q`X|z*Lmg%l%6N z);TA@cI$#uB{B6P9vilH`5RkN;dxvtuHeVsoBBDLR5p3H>R=&9pc4ZX0&D`#BH+%a z6w;wxdrIN4-jl`D^~HY@4d}uxJKx^A7Xzlu8VKAkNyDG32_WUoKRw+DxW=AwEdg{= zkh>ZnU>c^m3eoT*1?K1HpP&ZzY_Yo)<=o@4JdKMk)x8f^t!fPLFQvTox&LunYdg=h z8wv2K1Z)o|j;d}L18&bk`PJ7ozoy}?Hrgo=2lxzTC^3#H2;!0}jj=D{`~X7+ydVfGQa4hoivlw8K!@g}n2} zfYUxhyw-Q408O-p7v!%3a>7IT z>CTt{m;7+MlK|BG8J)DsV}OqUzl*AkHS=wt769+bzYx9~2i$4<<@h^V>bvBhp8~QY zp5CC?2|U#u^h3R?VMl(!Ry_ zz=oScm0$&XS9>#Gm}pq4e{~MOj6Anq*Y>V1-_Cze+&|yxU5z}>y}r!ty`CKz(TezJ ofAq0+spQ@vAFVp}YliUu0PyoU?>zUIcmMzZ07*qoM6N<$f|Yot)c^nh literal 0 HcmV?d00001 diff --git a/graphics/credits/unk_8EAE548.bin b/graphics/credits/copyright.bin similarity index 100% rename from graphics/credits/unk_8EAE548.bin rename to graphics/credits/copyright.bin diff --git a/graphics/credits/copyright.png b/graphics/credits/copyright.png new file mode 100644 index 0000000000000000000000000000000000000000..3e5f0fac3491755fbddce4803fa68b0c5748eb09 GIT binary patch literal 867 zcmV-p1DyPcP)h=wUh}C9U6@%}vV}i-B#(u`L z9F~h&4a@pFEVK={Va4d{udoOwbJGFC=Vmvb&t~-yVYjrOf6R;_IpID20S@;TpIlM* z#ua0yx+>aSaKd%;IB{A6#JxQi49Kee0wn&L4_JO*luuMFqRxJ78#a@gp4tI z_|{0Q0dv=FycIr2>~iQ_;5dCgWxYwz+37c(iy|*>W9|O(P)=$|;pZv+gXE%;usN&> zIcw_yXQV- zutR81qs9u-A+xqLbCE`exbBAKnbSTB0@)pwD`Dp2NWu{n;i$yfvXP>MXLVU{C(`S(Iupi(#1sgZ{@& z*d;8#@Bgte+$_-YVxjj)dnUw>g3A}b4($RK-#Oxo)8noedRjAdd!3f!7Q`!m@@3!i zvf+U)FR?s@20Sjmkn8Ww4XDyyTj&KlZZDSCJj3ETUsBeuhz(a?szfcW<3~rX9pBfg tQ-I_0i?b4HaHTeiew#w)5B2$f?H^C)Eu^Qpoei_SX;B)P`k9@dV2r{QHfaUnr_u0$QzVAH56a?RUl0bOSHmZ1N%DVqt>|LZbm6|3vDnALMdh0 zb)xOugJZb>qp*eDD@!O$MuAP|ynh86`7f!4-zUZn=+U>LuX_c@^LL~`)q;QdLS&YG`8;$w7U>Y=(y4J zAho@n+1(IMtTQoA5Km;a{yh}Dj+L}WE;}&gL@Di&9f+J*$+bPPO!wpCsvM3EOS)UZ z-JiD3tYWurpCo>;@`b)nxBpiC0;ZmT-CK$XP5=M^ M07*qoM6N<$f<8)Vp8x;= literal 0 HcmV?d00001 diff --git a/graphics/credits/pikachu_2.png b/graphics/credits/pikachu_2.png new file mode 100644 index 0000000000000000000000000000000000000000..f31020c9068aeecf6f875ed24981ce2346781603 GIT binary patch literal 908 zcmV;719SX|P)ZDp@*boTM|i2Lp$XR7HI#U{&S&d5%Lyq@xOvf*-0jK)qraZq`($&tPs^=;cxYysF;<*r#VxWNa!J9LS^w zNUUqeQLdPd7<9!0DYF6yw)#qnGS>i@=*e|fbSV)VeYGYkQGX8dN&)ZJY1W@AMUW&D zoj>a9UB-cDgM+2E7|D1#dqTyR7_JxQ{dVyg6V9o8~`}#Bjy6uCD8wl04E7H z?-h*R0${Z{^z;z>GX0BHwLk9LEOmSmg1}1ekFU!ZU}Q z#T$7MlZo%GFK3PLzg1cQub$9`e$Pu{XP}vrKckI>RMEzOkd->CO(UgX<9!B1qC78d zn-7P>eGYOr?`4aw_O4U`#VSameMMwh<^3NYr{1;Kg2EDZcTP3{@8g4iD-}JVgUtJY iDx$iU^)KGyAH`pfePSk%8Y6!9vFmDL#r3jj>ixv%;yaWci2rV*P zOvT6;1{_i#K%^s!)_{Q0Jf(Do0t$8U7QiTy%o%F;d!%H`jvaIe(4|lM@!j!A-raZa z-Vyz8|Dgi;Iei=Yb^J6>lnRwnWxJ_S9@Z#QMuvq_{Ui!i5{5<8m9y_#sBGa96&Cfg zfQD+z%(kB`*UsKJr=H`X=rut9d7mkWlB`CF)-(hc7? zT|v>h$TK0bb@6;%i09%QYx+VI=8Y-xeN&JD9Y7;hqfT5w?}tk7n|Rfj_?9ul%%A`g zU`AS-00VgmO+R#r_Q6nDr0@Zy#}*{u=Fb~6%9FK0uGU1ZFy<*3djj|idQ3FX76?cT z#uo0@1PYkah5B-*yxwPwrQWLcbC zI;u(enm3_QX;fZa&vRX`;kx)A+gaUic)ss?zE^U?_eETjfJAISLE^cx#6WEc5i1{s zkr`?l8K{zA94A;PZvp5=Q!4!se-IAj02(D3SjRL3B^+awUf36wF0DRB@ zZbjox({t~7-kop1gHFu-Kfx8S2sRhsZQ6Wc6J7V*iUxdR70lCB5BNk^=gD0a?ke0o zQ3p%Fe4KCq|HQrFHRVs9zy0xMvv+XQA3eO?+>WhpUd9&1svzuP4HXAXjNJDzR-OU& zH3=!PR$5um$S7<_rN%v_x`;fu6UzdGVlb@GDZ=tLo(5&ZcqWb}Qk^(i6|p7}wPf4R zmTVm_?a@_;dn$`VmD9$WU1%B_rCN16X&h2VBZgAMQfD-MA@8a9iBfT2#h7xeWE!_9 zU1?K#ubro@b|qB1eXo7K@jh0h#c>o2_B-JMSJBG0*GV!5F_3URK6oShgp!nt5f_%IAZoT#tiq7qevA?SBitKD0M zPRs3fAA}RQtd{Gn#W_~5*PT|&fz33w+PK|`7l`&>Okyd)$ry=SxKVy8Q)o8y$uTrad!WO_i&7tIgr0IW316E zGfjlEt};ZAN^wb%$vc3s#t2+TMQE4`nqYdJS8~VC!H>1E^_H@4ZF&hvR1Y8X_26 zq%>IJPt9?DOdV-;(0Hof>66tmXsqVJfea3}Ng}V#7@y4n?ra}gbcB72{};7?0Iox@ AQUCw| diff --git a/graphics/credits/unk_840D228.bin b/graphics/credits/unk_840D228.bin deleted file mode 100644 index f6c336c0173740a2131c8f559cdfd20ee6fd366c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4992 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 F{~NvG=kx#o diff --git a/graphics/credits/unk_840E158.bin b/graphics/credits/unk_840E158.bin deleted file mode 100644 index 2d912863446cb41a4227b6e48333d9107a0de89d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3200 zcmeH|PiPy*9>>QAv!@4|l|e-yr91LNp%){KL1)F=bImgoDY(#+3?TV1U?f*o9RYF$x$!ZXi;2>O8pn4EuZ?-)UA_&7?cfS|MRiIAeP=(>15&km{-dYbn{`OhB z`z&tT*ag@VV*dNMdkb@SL);F+-jlP#(60Z=#5~rzHIMbGKoBhNymJ2e73g5Kn1ZN@ z-FtgAP+_3HJ5=hwkCcKi>a43&RVpQkYLHc{5w5CI;(H}~vD`oH{yPlAeQ*Fijk|H< z8Df^-b`jGCngozxcn>sW9Iv;#cZBGQ@Dz?7e5a3R9c-uY>`55nxWfBNg|Td_IFxoQ z^id9IV(s}*srfx@NBP6gWOM-qG zjLdF8joFP4!_)ZDK`(x|*E>`PYHCok8bIN;YQ~4q=)S1L6(R0#3emiMQ#g&!D$d4c zqqcEd$j7~|d>nU0BYpxN3ZYb^(N>j8TOl)5sJd#e7psHsaC}yyD+^RpiRQrBmc%9* z_DLF-$QmJLH$hEyWZn#F)-s2JqTf4M0(~u-kRLGb*pf~3$7W<;=UVHr>7X_=olf6G z=}sp)j*Ol;jxVw_P5XLewC)VGj>hMfa}AA5TfIkXGKCph;2SUiw53x~4O-F4W`oL& zn=-0xM$tuW9GOmZG3BDsXsC*mazo10XBd~#HJR;e-Ouzj3a#WoOR7y@Q<|Y@N1K#d zn_b;E13ZpQ7JE0;ZVY{JyR@-E51cTxw0dSKM*Yq*W~`yb%p{7|CALm+C^}<(bOgB! zNlZzRgtQtS%}7MnI>Tv!8!E@cp=B7+%rGkEhUVOKE?OXEqKlM_KBrWsWIk2kyuK#H zZYzppYTTiND5Bp)=k$5@h$jn2oF^lYjxKaM(k2bvjjG)YObU{Wc8}g>i%MJ z$G^eL3x3Z3v7GdO`~`g|hH?wS;fr=IRFISzs)=z-r}%`h+gZ zN!ceqm;JK;Qr+-h)_p%Y@%?4GvgrE=%P(>1-!1LPLXrEB$zNLW{eu6>ZlG3>IGbe% z>#zL2oasXmp0%9S$YSMx!(Kq6udXlg$)w1WQ~h4+g7+Rzd9ZT{gfD_Zj#FNjg`5kG zT*f^lgvUz7q+3cR-9jN*M}Irku_<=NUDSO%$Z6iq^m*%jyTGBX1^Rk35=$<5ajk~5 zeZlKHA2C+?#AEf6OT9Ysh*HMpCLZ%9E|d7i10mM%-RGa+KZCyv9Ld+}Bvrs6B@p7& zfA!h7rR|Ts^O|+S?6Ymg-@{K;@jwb288pEsajqghe1J6`2wCC{99oH|2*<=%2~gl} ziP!Q)o5LOwEP)%zgKfm)EHI?913ev{ETYWW9Gqj!z3Z~_-HG>G9=%nk|J~sQT$b%W p>atXq#Kn2M%aQ!iJbzl7ls{wcD>>g-X0qUr3Et9o%Bk08`4x#6F_QoQ diff --git a/graphics/credits/unk_840E904.bin b/graphics/credits/unk_840E904.bin deleted file mode 100644 index 4887c1e7e79f412ecbdb51fc6b8c4455212a820d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3840 zcmd5;O=u%W8m&1Pofh1ZKwyxFN?MegkxGM(K~{l}5e#Kn*pQR$tA3)CC%cwe7BMA~ ztFfE-;!~i(x($=Tx*FC@AEJ}NPz`-D7*sH`vrKNiuOvHTCo>QhhV18l_5bsI?^Tsd z$S1QpRz7^Vx)4OTEcSNVXxun({o|(akJb8JzgQsTVzW-%m(RuE#o5Nj znYHchS$|zD)DPSyrn=3h>py>fFg`mw5Zh-P>TW)!ljefJ2EH#YeBXTuxEJ^LpAEJ9 z{Low=W4F100nNMl|G#<5C8Tu({~CnU4+uGMN!^{p65_hAY%(vRaOSF){!qF8-x}_2 z?C5x?ggaE{u2SoB2(c~@`Kz&==Dyg9BC+|^f5!g#rtiP<&wbx-igQbiK(~xu^af(% zeBi&@RKCBV{7oTz^kBaWJO2nP0q)Vo4`?}_`LPL+$L_k_cj0)p&TzqXvHuW$9VrDr zl=_#i>gWD<_j$J(TI}A#{r*3tj6lhuI|Oz~OT`G058QYftGlr~O$HZZGVuMn^2c@c zlUrAonP2V9#i6ukat_z3G<4mk5;RL>a@>^CZ+z4E`_`7&U0V}7+gsug(=lLxGQ|2^=X5a4nMfKyPbj*iq=4MD8>>3d7DwT1c_E}29D32vJLxfbg^KSu&dZWD?!Ar6 zM(e(wn*NQ}4p?~#8e((o5~X%gmhERMEM&p_4^`0q#T!#3i2{Ib6x#tC;cQp;6?aj%|gkPJ{(zTI4Udx1$EHo@(EHaE;r@Rpa z@t`Yg34l9ZI9kFD%K#3plAhuoX)l=Iz5!+rNQ2u<2MlHPwC|W;&$%{zxn~Mg%M#lw zlvsf>MoWyrwGbEWno_3?pXn1J{yI?V^CwDCHc%aKY?+=yy|A6SPIoXN<-}=$(kzB& zryx4$>vWJwL7Uhm_Gz_EpU~?)Lfew0E#J6f6Tp`D0Q;uhv(~-x?}~Dj<+8k7s&bwH z*ecJnMZUsXD+yLDG6s$*D*_3YV_BqCR!wkLt@1LEWJR6@0uwhuCT_0#anr3N467w1FPACjHHN$#1`bV`EG;;+ zQ~;rtQ+&S~Xts5SG3zX>R%Wcq;U|B?s`-DgC!cqU>~R4-1q?~VzhLb3GGn{90LSqe z;@LQ@CF9_tSVSNQBAMWMj$=kJAV#yLSe&vL)|sQ$CDnZUcYJ=N!JhRuw|H<7s!5ih zWygU#i4tp9WiDDJg{Vqe%SGH7>k2rn!jmdrnIXyY{A-5B3JB_g<9*KaQJ!CP})pGlc z{X0U%O7Y&>Qa12|@eYAS5QyUVz^rr-N;26%dxa%%X;+{VP82pqn5c6E#R~`uVeo2- z#**MaN#py;Y&?p8*_QDyB}wiRlKjmtEH{h%3!I`#B8s{dw$D11E@Pbkv0q^j9X?Caxh3Kq z>lW})JV>Q34tfd~Xfewed0omaM)|lsGc_xIo^o1(2B_eczI96MbyT38B%HLcZ~1-L ywiNKGttF#n$k72+ACy);xJ{qhoBv^bS-@FZe2tkOe21fD=TU^{mJ!{j2<5-SV<8Oy diff --git a/graphics/credits/unk_840F240.bin b/graphics/credits/unk_840F240.bin deleted file mode 100644 index 285a468b66b8e0a7293768217a1f18399522d304..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3200 zcmd6pO>f&a7{>`L=L&MMYXvdqMX7aOopnS9U+R;3HHxJSmP-#SD)iEP3B!YO$;Bv8 zUHU~B8@-!$(gFnr*pw_e25ea3{&eClU7D@M&~5~N;KLW`A^&{%LdgF(>Hl_Y+WI2? zF)K|;N-M;pl#r7fgmjlH(q-4`36b@Vg*%kOK0Owz5u7Ncx#bZTD$79?P=7PO?*E@$ze#CYIcK}#QsUXr zuHq6H7*oX^3h@T2bVr~+9t;Yt6CDKkBnW)uqoI^WG|0C~D9SUfhk?^P3(n4(D4MEr z#aI>cc{m@3;Y^2nd%=^Z+_CRQ-`Q@fsMvSamQ7VjS0rVvnv{AoismGWURn{1P81(z zojA@xwGqeukDZt}whO4iN?p3Bd353C-oo|sgvyF&VnFlKH@=> z^9PSEc*uDW@CQM#3*#evdtTT6z104@b87Fj21m7-p3`|_PW90oDs*B$XUz8vTKkCZ zw?ZJ?2NG*4r5A5D! zyZ52V^EzV(VHmFYf%Ez$3j}$J))|KYXx3Z!Ja&sW%c!-_mWap$4tqFdA3XLYCzRX6l7#7lzT01zj zjP5rLMyI1E(5wConz7ceVOR&@&maR~xCgB`N5-)SBZl<84)uJNL0gaVwnwA-l(L9> zrWUMHuP?WH{jr-3$2QHBrc`Sj%h{|(SKkaYV_AcBGKPH}$MLH;K16n?bsVE_%wiL7 z3v&2!L828?silcB(EL&VG z>n+hg_z7WZq~b;Cr z#G^-rSOVdJCFoxuS!Y3BLB9-C55bW|Y6jdK#lOEj{!#rC4CDijMW5g@NDYWrA@zZf zN!c%yl7_KCDmjp2jXvR1Xa}7Rke84|HFmiw>kP-l<8q7UsA_}g9O&0J5!#9%U;8nD zWMa(}7yR6SJ1v6m2oBH;`T%wx9K(Ab{^b~VmMV+dH^fka1fnIiA@09pp@s%|{(kt2 z3fNynVDEj#`{v>-OmXKrxO=g8FVYbA?F2gDy&~OQ%1qls%dxZ6cJtIX?-5x5lY@-N zf?BH7*4np~Y7f7<_6(`!IByfB;1iJde%Jmr{3;wQP(mvxqM;cfLy6~##85S4Qe%~1 zIk0Z%3dX>s!k$P^VFC(+QP88rPYuQiMVWqu_`5oz^~}Cbp1M^h#hD9lA6)~RCZ1c> XsnKG+W|v1+_3{3@vMQH*{Js4Lt9A+q diff --git a/graphics/credits/unk_840F944.bin b/graphics/credits/unk_840F944.bin deleted file mode 100644 index ba2cdab77ce99ea4c6dc1c56d26676f36c060e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3840 zcmeH}O>g5i8prtwMxdJO#t_p>FEPg2%bwg0I4N9UR+r6OdvRz?fg+b8MlYMsuz-<5 zx#UozKy}F%p>1rjM^kcU76S}mQMTm{V8asor(crHv@__-0(_6Jq?CPd*MW=(8TGZccdZSTl!e)~YljfIB4nHqQf3ZO zmeky~@B00L67yRh$RXI@G18jsQ>q^tL#M{nL56xpeWNM$Z(k5^M{d9esO)dC^?No# z{cyvGVJg=$I%E$HUGF(#E`!~GK4Z^i&2li4F@%Vf9AvQ^Bx`9P%TTG6N|UiJlpIz( zS$sfcr9zDvSmD%tOVSGaL1p_ts6s21W@szdJo!)g0!hF&?_q>->e%M+GXn zikB{_xAUKKLc)-PaNfaR0A`)&a{C?>B{&58ohXNq+at}Nh);p z<JwH`RLA z)x;3P`NzW2;G}uM$wV{=ITe`qr0zG@%>BI+ZumduYA;X9z!dVyk=1Am^nz|rk2yqq zczpaL6c3t@(YWIi)SKW`h$9qpAsXf-dV$3&6D$_y>Z7^oR87#JrqiH7_!0H}7sh|l zmwsQWT#n654&-2^^}tAJdZ5mHWok^RDlPEa9ea7d&x#rwiLXsVjY#n>=QVI7*ppOFVPZ9En_sMIbA7omt?B-k94Jd~?mMfYM z3OY-a;@EJ7ELGW0lQL7~KZ`g$FJg6-CMtjqq9eq`H=Oe}VrxSSWqS=I3b+ZvXW}A6 z*9+VKzJ=kQx5W>`zq&&F*AwDHEyNy$%+xxSNjY|7c}Q>MA$zV?tdHaYCkH^s~G2M#=OkSZLwy5zjOgpyXe_uD>YNC!D7O%Gau zyWEQUVWO%t$OD;_LRwS*Mt-77Iklv~?sZ6-3{TU+@Vt=Y^ZwXe8B;;3*fIH6v)yhT zHQTNBQ3rZ8pkXWAXlFIVM!mBO_-)PVc+ZZg2>D)vhkvtqZPS2pXJ>8EYPY8YmC~8g zlqI?XU0$=i6vj8=qMoS?}7NscXuvBa1hSB80Z-M$saQEBfpEia3 zI^^=a9m>K+~micS0`==o zS5_~?D83<+3MCavCzP^^$7TrsiuJ+Z8?1~jZlTY7>a@aNX^g^HEMBr#q$Ra#r( z*qCHYNb=@kY2$%T5s=pK`8H`;#yfOb!daxotTd%A36|OE;ZV9}2yNjYQr2%Zd%n5# z_wB(`GkNbL-#PH@2mS8ri9MrZ8kLnQv>VTgzpkkpm=~!8%ePjNqN({h&gv3Bc!~))6 zbz~GL8}D!6bBSA=rj<%n%1}=J_?_Rc`o8ZjuE_1RDkir#c#)jo`%rO>B_Eg4Ps?1j z?5TcN)o(Bvmx+`=4UsYelJO|GLUWB)v1L`V;TWp38%NHnEVn~h-gjmB(8cn(t77Te z^VWFS4kFGSt~uxSVQIWIcep0O?H`^Qe{mRw>$d8*v8IbuN~1w~n%1ft2-A?_(qp}8 zf-5wV)*>EpXs%hKRs@%IW8~e9`H`)xvPg+RHwmE1yq7B4(N^#Xdg%kk?>X0DP8K^l z`O(t}88V4z5jyJJMvWGC8ICZ9325JLs$G_(aZ}SVlo0jknd--{dURYErjcoNifIR1 zhEME0E;Nq%BHI<&bzCdwZ)+Thve9tS27l1sW9}>X(D077g1MnV=dtSNH#o-)=A*Y( zh?*8frzi?7ir4z-?E)>HFxr^uq+j4YsBf^mn;RO1EkD}!ex%-SswWdY1-!%7Oz>6@ z>H1pGof+rM0ZdcxIp^9h2+loqF7+%v-_YqKm+h=h;K(kU+c{IMhEiIzsyeimV++ee z2)u9GJi5fpE4k=H)*e~*2g{FFd?I#&*A(TD1hUj0pv5fngW5{MAiH^;LYHu?=2tx>H6Ob6+ymZNs^=Z!D=P+@u8>d{s$2Iiyl+a7n*Eos^j zt$|Lp3=w5_CNc_%gfNpZON8rRX@w*!Ry94jNa*va>`H!cfX^=vza3ZxGjsgFcfFr> zP;S?P3o)5@w{9^;3pqA>p48XrjNx!NWe(pd`&L=E)u7cPHOVTgLEB&eyu^R21_P13 Umt+vw|5(drzvq(%B)f6@1x_A+ga7~l diff --git a/graphics/credits/unk_84105B4.bin b/graphics/credits/unk_84105B4.bin deleted file mode 100644 index d173e611e30a682d8c04d4d2ceeb5967a9ba8ecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4608 zcmeH~v2qhJ5QeuQr5@rkp-kbuT#+GHV1)`?07pmW1}CZ*zf?M>q{9pqLz7fMD~}k< z?y}Fozp~Hduua1_0VX^5XQf+NvOevtFGTltPvA}n2$A@em4k?k{k8W=W+i@qV-tZI zfrmtO2G@aOI3|~UtF!FOUWdPSn7ceT^%mU-%*J~me+`KtID#WMx@GuSGK{gTE*+qj zi42_gN4wrXI=2W)ow`5=_ z8Lno3tz~rWMyp?-R#jw^mYx4{OY9!n#ipWq0NV*r#u{8oxg`hqbp^s zQtnUuR z7P0J-^{;J&wr(}EtIrQP3@@M&htY`X1N8BNDIBsghjlssbjAJ8SIqF-g;@28U*O!% znBNw-@o26gd?RJdqsyoK?(#;?Yi;3E2x(tJ@c6vmcm<)^7@n81%MZusmTqKme)i0 zGt)W*rbt$}s6w-+LNh8jG?L)dB4prDuhb`t$aI6JcI7ug5o=y=&q7JGkGc|i3*P%! zD>UmV8*Fg-=uJiNc>kWXQV>sX6^&YiY?-a;YtuU*yat&bz!?9 z7%^C7z<3s&li5ttd*?sTd*w)jKEnf)B#X<2{(&u#`vGq{K^S+`qC`n`!l2F)u4MtU z_;(21jfQfE`2}w;y^81r?Yh9=(0l-Mlbsr>s(C%fGZ2~k$K`}wn3QWvh@OG!zcBro NzDtw4{sO<>{14H7C*A-6 diff --git a/graphics/credits/unk_8410E10.pal b/graphics/credits/unk_8410E10.pal deleted file mode 100644 index 5667181bd..000000000 --- a/graphics/credits/unk_8410E10.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -57 57 123 -172 123 65 -255 197 148 -222 148 115 -123 65 65 -82 106 156 -57 57 123 -115 164 197 -123 123 131 -238 238 255 -180 180 213 -255 106 74 -197 57 57 -255 222 90 -213 180 74 -0 0 0 diff --git a/graphics/credits/unk_8411BF8.pal b/graphics/credits/unk_8411BF8.pal deleted file mode 100644 index 5667181bd..000000000 --- a/graphics/credits/unk_8411BF8.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -57 57 123 -172 123 65 -255 197 148 -222 148 115 -123 65 65 -82 106 156 -57 57 123 -115 164 197 -123 123 131 -238 238 255 -180 180 213 -255 106 74 -197 57 57 -255 222 90 -213 180 74 -0 0 0 diff --git a/graphics/credits/unk_84129A0.pal b/graphics/credits/unk_84129A0.pal deleted file mode 100644 index ac601cddf..000000000 --- a/graphics/credits/unk_84129A0.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -49 49 49 -255 222 205 -238 180 148 -197 139 106 -106 74 74 -222 164 74 -197 123 8 -49 65 82 -205 139 255 -115 82 131 -156 106 172 -106 123 131 -197 205 180 -238 74 24 -255 255 255 -0 0 0 diff --git a/graphics/credits/unk_8413318.pal b/graphics/credits/unk_8413318.pal deleted file mode 100644 index 284b70b77..000000000 --- a/graphics/credits/unk_8413318.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -131 197 0 -74 139 0 -32 115 0 -0 82 0 -106 172 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/credits/unk_8413854.pal b/graphics/credits/unk_8413854.pal deleted file mode 100644 index 46d4f48dd..000000000 --- a/graphics/credits/unk_8413854.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -189 180 98 -172 164 74 -156 148 49 -123 115 24 -222 213 131 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -255 0 255 diff --git a/graphics/credits/unk_8413D98.pal b/graphics/credits/unk_8413D98.pal deleted file mode 100644 index a3476d0d4..000000000 --- a/graphics/credits/unk_8413D98.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -131 197 0 -74 139 0 -32 115 0 -0 82 0 -106 172 0 -189 180 98 -172 164 74 -156 148 49 -123 115 24 -222 213 131 -222 222 222 -205 205 205 -189 189 189 -238 238 238 -131 131 131 diff --git a/graphics/credits/unk_8EAE548.png b/graphics/credits/unk_8EAE548.png deleted file mode 100644 index 297827436c4897a0fee81cce7941444fb5b6ce92..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 908 zcmV;719SX|P)mD2m9UwX;HSaQ6@4ie!@Qimx8PE zGOvMui(&ZYH7_eKppR;JZk784k~sml1=tY|IpJ3c3&0jW-BQ8{91$%g_&s2fL7-Db zuKgA;F0t-@0WMdx{DhX={E|NR7jdr2_Q22W4X|iEsFRk(z#X1y(cqc)Vv_9Xo9>ce zX>j$Qfw%{#VoInlfHw4?4Q?{EPf|Ag6oNN5(@EPl4rhKwy-2W)NgJ#d;S-66X4ymU{An`YFH9@_k)H|3Lm4&jv`Bj z>>lqixyAtjyavfWfV~V(33R>nF=NS;G@gkz!srhqxMz~2LJlZpQ8V?0IrNCBMCFv# zwSbg>EXsx~5(Q6yc}hSL5+dE7 zRWTF|7o(a7u(l72 zE1*}^x>jpomP56`DkzGc$&NJ@!L}R%sEZRARWTHh>%mMH9ZlNcYckqg=Y%Zm0rEnp zfD+UkWRHM1yMKtoa*zYU9%{OXJ~9&H3K*%h0d9?4?KiAn5Fea81{>L~kc z@M}<}n}0VIjE6eg`h61dPzzkg-}9Hp1e&p@326CaqVOQD-pF`lFOrJ1;eRnu9Ed)F zKDTpI_KV7x*T??W6+k0=Sf~Ze!Epsb8SD=xe-4fh3GuWe+rQu1F!0lfM$QiT2J|^x ix`3`RdI4^I->!darY)owcg)lP0000Lf6XKqrAf12HW*s&8hswp7XOsfR)zNVB{1 zoB#Wmw>zQG|MqX#f|Z5;nq~bHm$mKut;{p~=CM=N(zrt?Rg)eeCA4 z&tILs+R3?hJonjr6ucgLUTtUR^z`&q&Vp;#em0NH)&)p`+uc1qk*jRGHb;=w?H8U+ z_fGG=d42yu1(vQ%H$X_wYDuAawZi@ z-_e6P;Gs)$FI;d4oG1Vxhu$oh1ux`NTN-&Nhv%WP_i_dVKO~g%0Yc;mrP-NHrb08J zg}MYX0eBE9&(^U5K62g}#C8VY!(-Q`F3pF@Oc}%Z(88hju72#jwaVn7=N=tb*X5lhHMUc=R2UXrna5Sl^#Jilc zA!7oRt^p)f#uB{8`%`X#V*pp^_oxi62^eCW58*eVsK5hu-s&L~BLzgZ?`{)Ph%*Q$ z!5Qx%66}uxVuJ>XGq4VEVte-(tG1E2Me@Hh20@=UVX?4Bj?;=2Sd7SJV;h5?aXuKt z2Tl2`+I9G#2NWS!;Mg@J;WP$LcPM>1Ek201Eh{ zv3Q#&K(Wn`Uqvny2dx4}RdLli7t!)qtWfO$2vNpaUV;!9NVWoW^3K+0cpL zzO=q6>UyFd&X2(kF-_xZS_2R@RRD>ugWOt{>P20 z*ERj}^^Rg7bfYE)6EaYB8J}rppQs|GD{u=Z)4G8-<+PXrK}`k8Cq;3yehDsP&{)UI zn^Gq&I9LN^$Uul{@)C?}VpTVz8yNc@1uRMhKTy=nE6~JhG>vaWw;} zEV{9}iKUGd$CgZ&QYj7ll7tu|vdLq<_tGKm18lIV&NE8?if@+I;S)9?CcbEqv<6obheH^IjP>8)14;rbTem+(OsxcwOr9bNG)?IbYsxYo z%~(-1#}ufmx=~sip9Wx-MIdU?N2%l_sOlP04fBtHt9_dRPL-XRo(5ri5HVNeVN`bZ^HXYta7F?%+{?mixEOdrNe+WfyRzifX3 XSynEV_FX}q00000NkvXXu0mjfU=zbY literal 0 HcmV?d00001 diff --git a/graphics/credits/venusaur_2.png b/graphics/credits/venusaur_2.png new file mode 100644 index 0000000000000000000000000000000000000000..22b78305cc56d3855c0634d522d89a4c8b4a285b GIT binary patch literal 1812 zcmV+v2kZEWP)qjamjBjZ_-Ex5ZLHjtM*TNM;Os8s}=smMhL6 z4+Ml;WFaRrZpIg%0uA=fB*Akv$)G;0P6L7#^hsdoIyf7A?EPO$wmcfiNnj6K*a&sK z@BQz8^}5xX_CH%o<`;i7)TGd*4g2U15T=RD_Q}sfFKx@VOmh?A?v)uGiQTmp z0BGtP_t@%~E^Gq9p8I^6cl>Wvpc5sFLwbz`iI-&#@M!;bnJ_z zP4~xz!0YX$N&IWMKL$WtTHAAhefxM@+qe^ua$>ln$%Vk7HWs*qKm?$p)FL@IUW+49 z9X`>k-VuQPlU}!L^%fqRMv3Y)YZ$oJm#x;m+p~@rwrISTEKDeTt}>)MN!*=l|Ddq9k_csB~! zlQpaf&|r%IT`4)vx%Z+42>=}oo>FWc@~QW4HdLxbA==&+Oq(?T^~1Jex?+Es3HQ8# zb2{{O6|?|sxAq8tTqoW3`nvLUe}>37!N5^UdEUsfWLnm~gy|ZNn=#}MAUy*x$2l9E zd)`ouzJkm29@&<%!Egl@l=5dSprmu<0AW(Loxa>MpS8V4whsl?_gEIxLm!{Ap>uwX za4*3B*N*f3p3Hjh8O!3Um(_ib;j=$Y4_(KB$Z$BM4d$E&zURS$B%t3{5$N4Z4Au3u za~3#fDj)^qjQ}rDe!CA~sQf68HU-WdXD|SuhLqnS1r#wHDgb>CCmKoI6ESvuedY|D z0X0^4XazcztpK#)K}8bxM2taUfT+PpjVK-J8|v8hd?r2V=|P}^ER^nC=!yg)KnD=? zGdPn$q~NF94bKn!NFqB0&K;O=t{noh{R})@58yJZ)F|CJ7%8PwJNkER(v?KaDXL<+ z&(eCtIw)Z14M&Wnr49h?K&}ZOwal5*2Y{iF2kQD1$Qd1@3UGK5mwYu0MvxfaOj3(c zc1L3Bn#BVpzaBR#>m8_(Gz^w*_lJ7mH@xiK-4}B*=Kz=xqI4jOiX@zK42NnOv|yyK z)OP!RI5JM=EGG*o^QovxuB!|I>OH0-&!3p)KMGN)qxk!K;52iJL_3yca$ZDJ$cE~- z-#7ETZduDLr5Y(m>)H0&*x|dIKdyHP4d(Oi?8w z@N=p$7GO#Kl*-M4m_E`{LKJzCmv)6%M+83@r1XQclF;Mv{ z0Yy;}sY?0*us$&?R&Qm#JXI){ZeK-!SV=XeZH*aKhDn96sDxn&A7Y}w{~m_R?Qn3*gF0000i1k70w?J=tHohc|U#M zdv8XYO8ws=!`O1c*xgU&?+YO_874&k6GX-m7@bt=!B{@85vXs80q2Zy-W#ykZ56yH zrhUfW?C2 z_hpw20E?pl!pSx=UyfN=I1-qd;IeP=ZgLEr-pOx5oN?ae{KsiH(=`CB-ty#C7HkBx+6~kX#0NN$B+v@N!*yZUfv6~-B}PUg24Bb zyzgzc|1-F71NYQd+@U*jPv;2vUf!Pve+3X z&mCP1U9c5JE9Jd;u!t=%e|j7N1uGGDAIRRV3CTr>#uE)$x&{1^ebuU>s1Eu;PJhw~Vyp>pny zY3j9ttnl*LU&J7r&Fu0@Y*Z>$la^?iECndty~1W%@f=edw@lrv?a>{Uqtt+wL?lpH z0cKG%>E6!YjL8ebK*vT2QAsS3u9!Kj0UQ=Z<2w|+x5$p{@m`q6(lLy9nDR?A-O|JRL?E=*)Pib69$$P62b-1$MGSkn zXR2CNyB+oMf$YlbmBv>T#5WZ{yMjo;0JyrHx)#~wJH&wNz-JTx0taskId = 0xFF; + sCreditsMgr->taskId = TASK_NONE; sCreditsMgr->unk_1D = 0; ResetSpriteData(); SetMainCallback2(CB2_Credits); @@ -790,8 +799,8 @@ static bool32 DoOverworldMapScrollScene(u8 whichMon) if (!Overworld_DoScrollSceneForCredits(&sCreditsMgr->ovwldseqno, sOverworldMapScenes[sCreditsMgr->whichMon], QL_TINT_NONE)) return FALSE; CreateCreditsWindow(); - SetGpuReg(REG_OFFSET_WIN0H, 0xF0); - SetGpuReg(REG_OFFSET_WIN0V, 0x247C); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(36, DISPLAY_HEIGHT - 36)); SwitchWin1OffWin0On(); InitBgDarkenEffect(); Menu_LoadStdPalAt(0xF0); @@ -811,8 +820,8 @@ static s32 RollCredits(void) { case CREDITSSCENE_INIT_WIN0: SwitchWin1OffWin0On(); - SetGpuReg(REG_OFFSET_WIN0H, 0xF0); - SetGpuReg(REG_OFFSET_WIN0V, 0x4F51); + SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH)); + SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(DISPLAY_HEIGHT / 2 - 1, DISPLAY_HEIGHT / 2 + 1)); sCreditsMgr->mainseqno = CREDITSSCENE_SETUP_DARKEN_EFFECT; return 0; case CREDITSSCENE_SETUP_DARKEN_EFFECT: @@ -912,13 +921,13 @@ static s32 RollCredits(void) case CREDITSSCENE_PRINT_ADDPRINTER1: if (gPaletteFade.active) return sCreditsMgr->canSpeedThrough; - win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; // unused - AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_0); + win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused; + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL_COPY_1, 2, 6, 0, 0, sTextColor_Header, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].title); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_ADDPRINTER2; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_ADDPRINTER2: - win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_8; - AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unk_4); + win0v[0] = sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].unused; + AddTextPrinterParameterized4(sCreditsMgr->windowId, FONT_NORMAL, 8, 6, 0, 0, sTextColor_Regular, -1, sCreditsTexts[sCreditsScript[sCreditsMgr->scrcmdidx].param].names); sCreditsMgr->mainseqno = CREDITSSCENE_PRINT_DELAY; return sCreditsMgr->canSpeedThrough; case CREDITSSCENE_PRINT_DELAY: @@ -1042,29 +1051,29 @@ static void LoadCreditsMonPic(u8 whichMon) InitWindows(sWindowTemplates_Charizard); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_CHARIZARD, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Charizard, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Charizard, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sCharizard1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sCharizard2_Tiles, 0, 0); break; case CREDITSMON_VENUSAUR: InitWindows(sWindowTemplates_Venusaur); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_VENUSAUR, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Venusaur, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Venusaur, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sVenusaur1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sVenusaur2_Tiles, 0, 0); break; case CREDITSMON_BLASTOISE: InitWindows(sWindowTemplates_Blastoise); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_BLASTOISE, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Blastoise, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Blastoise, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sBlastoise1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sBlastoise2_Tiles, 0, 0); break; case CREDITSMON_PIKACHU: InitWindows(sWindowTemplates_Pikachu); FillWindowPixelBuffer(0, PIXEL_FILL(0)); LoadMonPicInWindow(SPECIES_PIKACHU, SHINY_ODDS, 0, TRUE, 10, 0); - CopyToWindowPixelBuffer(1, (const void *)sWindow1Map_Pikachu, 0, 0); - CopyToWindowPixelBuffer(2, (const void *)sWindow2Map_Pikachu, 0, 0); + CopyToWindowPixelBuffer(1, (const void *)sPikachu1_Tiles, 0, 0); + CopyToWindowPixelBuffer(2, (const void *)sPikachu2_Tiles, 0, 0); break; } CopyWindowToVram(0, COPYWIN_GFX); @@ -1108,19 +1117,19 @@ static bool32 DoCreditsMonScene(void) ResetBgsAndClearDma3BusyFlags(1); InitBgsFromTemplates(1, sBgTemplates_MonSceneOrTheEnd, NELEMS(sBgTemplates_MonSceneOrTheEnd)); SetBgTilemapBuffer(0, Alloc(BG_SCREEN_SIZE)); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); - ChangeBgX(1, 0, 0); - ChangeBgY(1, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); + ChangeBgX(1, 0, BG_COORD_SET); + ChangeBgY(1, 0, BG_COORD_SET); sCreditsMgr->creditsMonTimer = 0; sCreditsMgr->unk_0E = 0; SetBgAffine(2, 0x8000, 0x8000, 0x78, 0x50, sCreditsMgr->creditsMonTimer, sCreditsMgr->creditsMonTimer, 0); - DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxTiles, 0x2000, 0, 0); - DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleGfx, 0x2000, 0, 0); - DecompressAndLoadBgGfxUsingHeap(1, gCreditsPokeballBgGfxMap, 0x500, 0, 1); - DecompressAndLoadBgGfxUsingHeap(2, sAffineCircleMap, 0x400, 0, 1); - LoadPalette(gCreditsMonBackdropPals[sCreditsMgr->whichMon], 0, 0x20); - LoadPalette(sPalette_OneBlackThenAllWhite, 0xF0, 0x20); + DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tiles, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tiles, 0x2000, 0, 0); + DecompressAndLoadBgGfxUsingHeap(1, gCreditsMonPokeball_Tilemap, 0x500, 0, 1); + DecompressAndLoadBgGfxUsingHeap(2, sCreditsMonCircle_Tilemap, 0x400, 0, 1); + LoadPalette(gCreditsMonPokeball_Pals[sCreditsMgr->whichMon], 0, 0x20); + LoadPalette(sCreditsMonCircle_Pal, 0xF0, 0x20); LoadCreditsMonPic(sCreditsMgr->whichMon); SetVBlankCallback(VBlankCB); EnableInterrupts(INTR_FLAG_VBLANK); @@ -1236,8 +1245,8 @@ static bool32 DoCopyrightOrTheEndGfxScene(void) ResetTasks(); ResetBgsAndClearDma3BusyFlags(1); InitBgsFromTemplates(0, sBgTemplates_MonSceneOrTheEnd, 1); - ChangeBgX(0, 0, 0); - ChangeBgY(0, 0, 0); + ChangeBgX(0, 0, BG_COORD_SET); + ChangeBgY(0, 0, BG_COORD_SET); DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].tiles, 0x2000, 0, 0); DecompressAndLoadBgGfxUsingHeap(0, sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].map, 0x800, 0, 1); LoadPalette(sCopyrightOrTheEndGfxHeaders[sCreditsMgr->whichMon].palette, 0x00, 0x200); @@ -1276,9 +1285,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 0: break; case 1: - if (gSprites[data->playerSpriteId].x != 0xD0) + if (gSprites[data->characterSpriteId].x != 0xD0) { - gSprites[data->playerSpriteId].x--; + gSprites[data->characterSpriteId].x--; gSprites[data->groundSpriteId].x--; } else @@ -1289,9 +1298,9 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 2: if (sCreditsMgr->unk_1D & 1) { - if (gSprites[data->playerSpriteId].y != 0x50) + if (gSprites[data->characterSpriteId].y != 0x50) { - gSprites[data->playerSpriteId].y--; + gSprites[data->characterSpriteId].y--; gSprites[data->groundSpriteId].y--; } else @@ -1303,7 +1312,7 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) case 3: if (sCreditsMgr->mainseqno == 15) { - gSprites[data->playerSpriteId].x--; + gSprites[data->characterSpriteId].x--; gSprites[data->groundSpriteId].x--; } break; @@ -1312,15 +1321,15 @@ static void Task_MovePlayerAndGroundSprites(u8 taskId) static void DestroyPlayerOrRivalSprite(void) { - if (sCreditsMgr->taskId != 0xFF) + if (sCreditsMgr->taskId != TASK_NONE) { struct CreditsTaskData * data = (void *)gTasks[sCreditsMgr->taskId].data; - FreeSpriteTilesByTag(data->playerTilesTag); - DestroySprite(&gSprites[data->playerSpriteId]); + FreeSpriteTilesByTag(data->characterTilesTag); + DestroySprite(&gSprites[data->characterSpriteId]); FreeSpriteTilesByTag(data->groundTilesTag); DestroySprite(&gSprites[data->groundSpriteId]); DestroyTask(sCreditsMgr->taskId); - sCreditsMgr->taskId = 0xFF; + sCreditsMgr->taskId = TASK_NONE; } } @@ -1332,7 +1341,7 @@ static void LoadPlayerOrRivalSprite(u8 whichScene) struct SpriteTemplate sprTemplate; struct CompressedSpriteSheet sprSheet; - if (sCreditsMgr->taskId == 0xFF) + if (sCreditsMgr->taskId == TASK_NONE) { taskId = CreateTask(Task_MovePlayerAndGroundSprites, 0); data = (void *)gTasks[taskId].data; @@ -1341,97 +1350,97 @@ static void LoadPlayerOrRivalSprite(u8 whichScene) { default: case 0: - x = 0xd0; - y = 0x50; + x = DISPLAY_WIDTH - 32; + y = DISPLAY_HEIGHT / 2; break; case 1: - x = 0x110; - y = 0x50; + x = DISPLAY_WIDTH + 32; + y = DISPLAY_HEIGHT / 2; break; case 2: - x = 0xd0; - y = 0xa0; + x = DISPLAY_WIDTH - 32; + y = DISPLAY_HEIGHT; break; } data->spriteMoveCmd = sPlayerRivalSpriteParams[whichScene][2]; - data->playerTilesTag = 0x2000; - data->field_04 = 0xFFFF; + data->characterTilesTag = GFXTAG_CHARACTER; + data->characterPalTag = TAG_NONE; switch (sPlayerRivalSpriteParams[whichScene][0]) { case 0: // Player if (gSaveBlock2Ptr->playerGender == MALE) { - sprSheet.data = sMalePlayerSpriteGfx; + sprSheet.data = sPlayerMale_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sMalePlayerSpritePal, 0x1F0, 0x20); + LoadPalette(sPlayerMale_Pal, 0x1F0, sizeof(sPlayerMale_Pal)); } else { - sprSheet.data = sFemalePlayerSpriteGfx; + sprSheet.data = sPlayerFemale_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sFemalePlayerSpritePal, 0x1F0, 0x20); + LoadPalette(sPlayerFemale_Pal, 0x1F0, sizeof(sPlayerFemale_Pal)); } break; case 1: // Rival - sprSheet.data = sRivalSpriteGfx; + sprSheet.data = sRival_Tiles; sprSheet.size = 0x3000; - sprSheet.tag = data->playerTilesTag; + sprSheet.tag = data->characterTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sRivalSpritePal, 0x1F0, 0x20); + LoadPalette(sRival_Pal, 0x1F0, sizeof(sRival_Pal)); break; } sprTemplate = sPlayerOrRivalSpriteTemplate; - sprTemplate.tileTag = data->playerTilesTag; - data->playerSpriteId = CreateSprite(&sprTemplate, x, y, 0); - gSprites[data->playerSpriteId].oam.paletteNum = 0xF; - gSprites[data->playerSpriteId].subpriority = 0; + sprTemplate.tileTag = data->characterTilesTag; + data->characterSpriteId = CreateSprite(&sprTemplate, x, y, 0); + gSprites[data->characterSpriteId].oam.paletteNum = 15; + gSprites[data->characterSpriteId].subpriority = 0; - data->groundTilesTag = 0x2001; - data->field_0A = 0xFFFF; + data->groundTilesTag = GFXTAG_GROUND; + data->groundPalTag = TAG_NONE; switch (sPlayerRivalSpriteParams[whichScene][1]) { case 0: - sprSheet.data = sGroundSpriteGfx_Grass; + sprSheet.data = sGround_Grass_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20); + LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; case 1: - sprSheet.data = sGroundSpriteGfx_Grass; + sprSheet.data = sGround_Grass_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Grass, 0x1E0, 0x20); + LoadPalette(sGround_Grass_Pal, 0x1E0, sizeof(sGround_Grass_Pal)); sprTemplate = sGroundSpriteTemplate_Static; break; case 2: - sprSheet.data = sGroundSpriteGfx_Dirt; + sprSheet.data = sGround_Dirt_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_Dirt, 0x1E0, 0x20); + LoadPalette(sGround_Dirt_Pal, 0x1E0, sizeof(sGround_Dirt_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; case 3: - sprSheet.data = sGroundSpriteGfx_City; + sprSheet.data = sGround_City_Tiles; sprSheet.size = 0x3000; sprSheet.tag = data->groundTilesTag; LoadCompressedSpriteSheet(&sprSheet); - LoadPalette(sGroundSpritePal_City, 0x1E0, 0x20); + LoadPalette(sGround_City_Pal, 0x1E0, sizeof(sGround_City_Pal)); sprTemplate = sGroundSpriteTemplate_Running; break; } sprTemplate.tileTag = data->groundTilesTag; - data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 0x26, 0); - gSprites[data->groundSpriteId].oam.paletteNum = 0xE; + data->groundSpriteId = CreateSprite(&sprTemplate, x, y + 38, 0); + gSprites[data->groundSpriteId].oam.paletteNum = 14; gSprites[data->groundSpriteId].subpriority = 1; } } diff --git a/src/graphics.c b/src/graphics.c index 8a11d58a5..79f97f127 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1343,16 +1343,16 @@ const u16 gUnionRoomChatPanelBgPal_7[] = INCBIN_U16("graphics/interface/union_ro const u32 gUnionRoomChatPanelBgTiles[] = INCBIN_U32("graphics/interface/union_room_chat_panel.4bpp.lz"); const u32 gUnionRoomChatPanelBgMap[] = INCBIN_U32("graphics/interface/union_room_chat_panel.bin.lz"); -const u16 gCreditsMonBackdropPals[][16] = +const u16 gCreditsMonPokeball_Pals[][16] = { - INCBIN_U16("graphics/credits/charizard.gbapal"), - INCBIN_U16("graphics/credits/venusaur.gbapal"), - INCBIN_U16("graphics/credits/blastoise.gbapal"), - INCBIN_U16("graphics/credits/pikachu.gbapal"), + INCBIN_U16("graphics/credits/pokeball_charizard.gbapal"), + INCBIN_U16("graphics/credits/pokeball_venusaur.gbapal"), + INCBIN_U16("graphics/credits/pokeball_blastoise.gbapal"), + INCBIN_U16("graphics/credits/pokeball_pikachu.gbapal"), }; -const u32 gCreditsPokeballBgGfxTiles[] = INCBIN_U32("graphics/credits/unk_8EAAB98.4bpp.lz"); -const u32 gCreditsPokeballBgGfxMap[] = INCBIN_U32("graphics/credits/unk_8EAB30C.bin.lz"); +const u32 gCreditsMonPokeball_Tiles[] = INCBIN_U32("graphics/credits/pokeball.4bpp.lz"); +const u32 gCreditsMonPokeball_Tilemap[] = INCBIN_U32("graphics/credits/pokeball.bin.lz"); #ifdef FIRERED const u16 gGraphics_TitleScreen_GameTitleLogoPals[] = INCBIN_U16("graphics/title_screen/firered/game_title_logo.gbapal"); @@ -1382,9 +1382,9 @@ const u16 gTitleScreen_Slash_Pal[] = INCBIN_U16("graphics/title_screen/leafgreen const u32 gTitleScreen_BlankSprite_Tiles[] = INCBIN_U32("graphics/title_screen/blank_sprite.4bpp.lz"); -const u16 gCreditsAllRightsReservedGfxPal[] = INCBIN_U16("graphics/credits/unk_8EAE548.gbapal"); -const u8 gCreditsAllRightsReservedGfxTiles[] = INCBIN_U8("graphics/credits/unk_8EAE548.4bpp.lz"); -const u8 gCreditsAllRightsReservedGfxMap[] = INCBIN_U8("graphics/credits/unk_8EAE548.bin.lz"); +const u16 gCreditsCopyright_Pal[] = INCBIN_U16("graphics/credits/copyright.gbapal"); +const u8 gCreditsCopyright_Tiles[] = INCBIN_U8("graphics/credits/copyright.4bpp.lz"); +const u8 gCreditsCopyright_Tilemap[] = INCBIN_U8("graphics/credits/copyright.bin.lz"); const u32 gUnknown_8EAEA00[] = INCBIN_U32("graphics/link/gba.gbapal"); const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/link/gba_pal2.gbapal"); From 83a266f54786e9a8b18d8d5a92479607c47ac3eb Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 7 Feb 2023 14:58:53 -0500 Subject: [PATCH 09/29] Move party menu graphics to own folder --- .../{party_menu_hpbar.png => hpbar_unused.png} | Bin .../party_menu_misc.bin => party_menu/bg.bin} | Bin .../party_menu_misc.pal => party_menu/bg.pal} | 0 .../party_menu_misc.png => party_menu/bg.png} | Bin .../cancel_button.bin} | Bin .../confirm_button.bin} | Bin graphics/{interface => party_menu}/hold_icons.png | Bin .../pokeball.png} | Bin .../pokeball_small.png} | Bin graphics_file_rules.mk | 3 ++- src/data/party_menu.h | 8 ++++---- src/graphics.c | 14 +++++++------- 12 files changed, 13 insertions(+), 12 deletions(-) rename graphics/interface/{party_menu_hpbar.png => hpbar_unused.png} (100%) rename graphics/{interface/party_menu_misc.bin => party_menu/bg.bin} (100%) rename graphics/{interface/party_menu_misc.pal => party_menu/bg.pal} (100%) rename graphics/{interface/party_menu_misc.png => party_menu/bg.png} (100%) rename graphics/{interface/party_menu_cancel_button.bin => party_menu/cancel_button.bin} (100%) rename graphics/{interface/party_menu_confirm_button.bin => party_menu/confirm_button.bin} (100%) rename graphics/{interface => party_menu}/hold_icons.png (100%) rename graphics/{interface/party_menu_pokeball.png => party_menu/pokeball.png} (100%) rename graphics/{interface/party_menu_pokeball_small.png => party_menu/pokeball_small.png} (100%) diff --git a/graphics/interface/party_menu_hpbar.png b/graphics/interface/hpbar_unused.png similarity index 100% rename from graphics/interface/party_menu_hpbar.png rename to graphics/interface/hpbar_unused.png diff --git a/graphics/interface/party_menu_misc.bin b/graphics/party_menu/bg.bin similarity index 100% rename from graphics/interface/party_menu_misc.bin rename to graphics/party_menu/bg.bin diff --git a/graphics/interface/party_menu_misc.pal b/graphics/party_menu/bg.pal similarity index 100% rename from graphics/interface/party_menu_misc.pal rename to graphics/party_menu/bg.pal diff --git a/graphics/interface/party_menu_misc.png b/graphics/party_menu/bg.png similarity index 100% rename from graphics/interface/party_menu_misc.png rename to graphics/party_menu/bg.png diff --git a/graphics/interface/party_menu_cancel_button.bin b/graphics/party_menu/cancel_button.bin similarity index 100% rename from graphics/interface/party_menu_cancel_button.bin rename to graphics/party_menu/cancel_button.bin diff --git a/graphics/interface/party_menu_confirm_button.bin b/graphics/party_menu/confirm_button.bin similarity index 100% rename from graphics/interface/party_menu_confirm_button.bin rename to graphics/party_menu/confirm_button.bin diff --git a/graphics/interface/hold_icons.png b/graphics/party_menu/hold_icons.png similarity index 100% rename from graphics/interface/hold_icons.png rename to graphics/party_menu/hold_icons.png diff --git a/graphics/interface/party_menu_pokeball.png b/graphics/party_menu/pokeball.png similarity index 100% rename from graphics/interface/party_menu_pokeball.png rename to graphics/party_menu/pokeball.png diff --git a/graphics/interface/party_menu_pokeball_small.png b/graphics/party_menu/pokeball_small.png similarity index 100% rename from graphics/interface/party_menu_pokeball_small.png rename to graphics/party_menu/pokeball_small.png diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index 591847f43..7b28965e9 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -2,6 +2,7 @@ TILESETGFXDIR := data/tilesets FONTGFXDIR := graphics/fonts FAMECHECKERGFXDIR := graphics/fame_checker INTERFACEGFXDIR := graphics/interface +PARTYMENUGFXDIR := graphics/party_menu BTLANMSPRGFXDIR := graphics/battle_anims/sprites UNUSEDGFXDIR := graphics/unused UNKNOWNGFXDIR := graphics/unknown @@ -199,7 +200,7 @@ $(MASKSGFXDIR)/unknown_D2EC24.4bpp: %.4bpp: %.png $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 16 -Wnum_tiles -$(INTERFACEGFXDIR)/party_menu_misc.4bpp: %.4bpp: %.png +$(PARTYMENUGFXDIR)/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 62 -Wnum_tiles $(TYPESGFXDIR)/move_types.4bpp: $(types:%=$(TYPESGFXDIR)/%.4bpp) $(contest_types:%=$(TYPESGFXDIR)/contest_%.4bpp) diff --git a/src/data/party_menu.h b/src/data/party_menu.h index de330200a..7624c6596 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -108,8 +108,8 @@ static const u8 sPartyMenuSpriteCoords[PARTY_LAYOUT_COUNT][PARTY_SIZE][4 * 2] = }, }; -static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_confirm_button.bin"); -static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_cancel_button.bin"); +static const u32 sConfirmButton_Tilemap[] = INCBIN_U32("graphics/party_menu/confirm_button.bin"); +static const u32 sCancelButton_Tilemap[] = INCBIN_U32("graphics/party_menu/cancel_button.bin"); static const u8 sFontColorTable[][3] = { @@ -695,8 +695,8 @@ static const u8 *const sFieldMoveDescriptionTable[] = [FIELD_MOVE_SWEET_SCENT] = gText_LureWildPokemon, }; -static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/interface/hold_icons.4bpp"); -static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/interface/hold_icons.gbapal"); +static const u32 sHeldItemGfx[] = INCBIN_U32("graphics/party_menu/hold_icons.4bpp"); +static const u16 sHeldItemPalette[] = INCBIN_U16("graphics/party_menu/hold_icons.gbapal"); static const struct OamData sOamData_HeldItem = { diff --git a/src/graphics.c b/src/graphics.c index 8a11d58a5..92f83e1de 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -148,7 +148,7 @@ const u32 gBattleAnimSpriteGfx_ClawSlash[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_Scratch3[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_3.4bpp.lz"); const u32 gBattleAnimSpriteGfx_Scratch2[] = INCBIN_U32("graphics/battle_anims/sprites/scratch_2.4bpp.lz"); -const u32 gPartyMenuHpBar_Gfx[] = INCBIN_U32("graphics/interface/party_menu_hpbar.4bpp.lz"); +const u32 gUnusedHpBar_Gfx[] = INCBIN_U32("graphics/interface/hpbar_unused.4bpp.lz"); const u32 gBattleAnimSpriteGfx_BubbleBurst2[] = INCBIN_U32("graphics/battle_anims/sprites/bubble_burst_2.4bpp.lz"); @@ -1074,13 +1074,13 @@ const u32 gBattleAnimSpritePal_Slash2[] = INCBIN_U32("graphics/battle_anims/spri const u32 gBattleAnimSpriteGfx_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.4bpp.lz"); const u32 gBattleAnimSpritePal_WhiteShadow[] = INCBIN_U32("graphics/battle_anims/sprites/white_shadow.gbapal.lz"); -const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/interface/party_menu_misc.4bpp.lz"); -const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/interface/party_menu_misc.gbapal.lz"); -const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/interface/party_menu_misc.bin.lz"); +const u32 gPartyMenuBg_Gfx[] = INCBIN_U32("graphics/party_menu/bg.4bpp.lz"); +const u32 gPartyMenuBg_Pal[] = INCBIN_U32("graphics/party_menu/bg.gbapal.lz"); +const u32 gPartyMenuBg_Tilemap[] = INCBIN_U32("graphics/party_menu/bg.bin.lz"); -const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball.4bpp.lz"); -const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/interface/party_menu_pokeball_small.4bpp.lz"); //unused -const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/interface/party_menu_pokeball.gbapal.lz"); +const u32 gPartyMenuPokeball_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball.4bpp.lz"); +const u32 gPartyMenuPokeballSmall_Gfx[] = INCBIN_U32("graphics/party_menu/pokeball_small.4bpp.lz"); //unused +const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gbapal.lz"); const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz"); const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz"); From 4bc2f8821336657e246df1cb15ac293bad908fdc Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 7 Feb 2023 15:07:50 -0500 Subject: [PATCH 10/29] Clarify party menu slot tilemaps --- graphics/party_menu/slot_main.bin | Bin 0 -> 70 bytes graphics/party_menu/slot_main_no_hp.bin | Bin 0 -> 70 bytes graphics/party_menu/slot_wide.bin | Bin 0 -> 54 bytes graphics/party_menu/slot_wide_empty.bin | Bin 0 -> 54 bytes graphics/party_menu/slot_wide_no_hp.bin | Bin 0 -> 54 bytes src/data/party_menu.h | 50 ++++-------------------- src/party_menu.c | 24 ++++++------ 7 files changed, 20 insertions(+), 54 deletions(-) create mode 100755 graphics/party_menu/slot_main.bin create mode 100755 graphics/party_menu/slot_main_no_hp.bin create mode 100755 graphics/party_menu/slot_wide.bin create mode 100755 graphics/party_menu/slot_wide_empty.bin create mode 100755 graphics/party_menu/slot_wide_no_hp.bin diff --git a/graphics/party_menu/slot_main.bin b/graphics/party_menu/slot_main.bin new file mode 100755 index 0000000000000000000000000000000000000000..2f3e729f6d59ee67786cb6b563ff62eac2c811da GIT binary patch literal 70 hcmb1;gaRoAMJQ0h#?r91u>u2IegP;D)YFFo0{}b{35Ngx literal 0 HcmV?d00001 diff --git a/graphics/party_menu/slot_main_no_hp.bin b/graphics/party_menu/slot_main_no_hp.bin new file mode 100755 index 0000000000000000000000000000000000000000..653ad1a64b6e4fdf72afe6b68afb74c422fc97b5 GIT binary patch literal 70 fcmb1;gaRoAMJQ0h#?sJ)0xf<4C=k@shXMltETRbM literal 0 HcmV?d00001 diff --git a/graphics/party_menu/slot_wide.bin b/graphics/party_menu/slot_wide.bin new file mode 100755 index 0000000000000000000000000000000000000000..c88b73bf78b0d11157d338457f38b231a5779dd8 GIT binary patch literal 54 ZcmdPaK?Aymicnx;Y77Qu<`!tc5q3KIYT literal 0 HcmV?d00001 diff --git a/graphics/party_menu/slot_wide_empty.bin b/graphics/party_menu/slot_wide_empty.bin new file mode 100755 index 0000000000000000000000000000000000000000..3592178b3fc0a6256883b968542bb851d2cb2f42 GIT binary patch literal 54 VcmWd?Lj&S+3}`@JRSgZO0{~`S1a<%b literal 0 HcmV?d00001 diff --git a/graphics/party_menu/slot_wide_no_hp.bin b/graphics/party_menu/slot_wide_no_hp.bin new file mode 100755 index 0000000000000000000000000000000000000000..8f662da0ae553b434916406d76116f9cac4e7795 GIT binary patch literal 54 VcmdPaK?AymifF*d+yV_)0s!@r348zm literal 0 HcmV?d00001 diff --git a/src/data/party_menu.h b/src/data/party_menu.h index 7624c6596..6b4ebc1f7 100644 --- a/src/data/party_menu.h +++ b/src/data/party_menu.h @@ -549,48 +549,14 @@ static const struct WindowTemplate sFieldMoveDescriptionWindowTemplate = .baseBlock = 0x373, }; -static const u8 sMainSlotTileNums[] = -{ - 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 59, 60, 58, 58, 58, 58, 58, 58, 61, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48, -}; - -static const u8 sMainSlotTileNums_Egg[] = -{ - 24, 25, 25, 25, 25, 25, 25, 25, 25, 26, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 32, 33, 33, 33, 33, 33, 33, 33, 33, 34, - 40, 41, 41, 41, 41, 41, 41, 41, 41, 42, - 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, - 46, 47, 47, 47, 47, 47, 47, 47, 47, 48, -}; - -static const u8 sOtherSlotsTileNums[] = -{ - 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 52, 53, 51, 51, 51, 51, 51, 51, 54, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, -}; - -static const u8 sOtherSlotsTileNums_Egg[] = -{ - 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, - 49, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 50, - 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 57, -}; - -static const u8 sEmptySlotTileNums[] = -{ - 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, - 37, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 39, -}; +// Plain tilemaps for party menu slots. +// The versions with no HP bar are used by eggs, and in certain displays like registering at a battle facility. +// There is no empty version of the main slot because it shouldn't ever be empty. +static const u8 sSlotTilemap_Main[] = INCBIN_U8("graphics/party_menu/slot_main.bin"); +static const u8 sSlotTilemap_MainNoHP[] = INCBIN_U8("graphics/party_menu/slot_main_no_hp.bin"); +static const u8 sSlotTilemap_Wide[] = INCBIN_U8("graphics/party_menu/slot_wide.bin"); +static const u8 sSlotTilemap_WideNoHP[] = INCBIN_U8("graphics/party_menu/slot_wide_no_hp.bin"); +static const u8 sSlotTilemap_WideEmpty[] = INCBIN_U8("graphics/party_menu/slot_wide_empty.bin"); static const u8 sGenderPalOffsets[] = {11, 12}; diff --git a/src/party_menu.c b/src/party_menu.c index f87119218..f192cd2e5 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -110,7 +110,7 @@ enum struct PartyMenuBoxInfoRects { - void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); + void (*blitFunc)(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); u8 dimensions[24]; u8 descTextLeft; u8 descTextTop; @@ -145,8 +145,8 @@ struct PartyMenuBox u8 statusSpriteId; }; -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 isEgg); +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP); static void CursorCB_Summary(u8 taskId); static void CursorCB_Switch(u8 taskId); static void CursorCB_Cancel1(u8 taskId); @@ -2184,35 +2184,35 @@ static void BlitBitmapToPartyWindow(u8 windowId, const u8 *tileNums, u8 menuBoxW } } -static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_LeftColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 10; height = 7; } - if (!isEgg) - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums, 10, x, y, width, height); + if (!hideHP) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Main, 10, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sMainSlotTileNums_Egg, 10, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_MainNoHP, 10, x, y, width, height); } -static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, u8 isEgg) +static void BlitBitmapToPartyWindow_RightColumn(u8 windowId, u8 x, u8 y, u8 width, u8 height, bool8 hideHP) { if (width == 0 && height == 0) { width = 18; height = 3; } - if (!isEgg) - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums, 18, x, y, width, height); + if (!hideHP) + BlitBitmapToPartyWindow(windowId, sSlotTilemap_Wide, 18, x, y, width, height); else - BlitBitmapToPartyWindow(windowId, sOtherSlotsTileNums_Egg, 18, x, y, width, height); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideNoHP, 18, x, y, width, height); } static void DrawEmptySlot(u8 windowId) { - BlitBitmapToPartyWindow(windowId, sEmptySlotTileNums, 18, 0, 0, 18, 3); + BlitBitmapToPartyWindow(windowId, sSlotTilemap_WideEmpty, 18, 0, 0, 18, 3); } #define LOAD_PARTY_BOX_PAL(paletteIds, paletteOffsets) \ From cc776ab95f97e546288bc2e50929cd2bfc1411e6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 7 Feb 2023 18:26:29 -0500 Subject: [PATCH 11/29] Colorize party menu bg graphics --- graphics/party_menu/bg.pal | 179 ------------------------------------- graphics/party_menu/bg.png | Bin 613 -> 1112 bytes 2 files changed, 179 deletions(-) delete mode 100644 graphics/party_menu/bg.pal diff --git a/graphics/party_menu/bg.pal b/graphics/party_menu/bg.pal deleted file mode 100644 index d6d7e4185..000000000 --- a/graphics/party_menu/bg.pal +++ /dev/null @@ -1,179 +0,0 @@ -JASC-PAL -0100 -176 -123 156 115 -255 255 255 -106 106 106 -0 0 0 -65 205 255 -0 139 189 -49 189 238 -255 156 148 -189 90 82 -222 123 115 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -139 148 123 -74 74 98 -65 156 148 -32 106 98 -74 172 164 -57 139 139 -82 65 74 -32 16 24 -255 0 255 -255 0 255 -255 255 255 -123 205 180 -57 148 123 -255 0 255 -255 0 255 -115 90 180 -139 148 123 -255 115 49 -65 156 148 -32 106 98 -74 172 164 -57 139 139 -82 65 74 -82 82 90 -255 0 255 -255 0 255 -255 255 255 -123 205 180 -57 148 123 -255 0 255 -255 0 255 -164 115 246 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -131 197 222 -57 148 222 -41 123 180 -131 197 222 -41 123 180 -115 255 172 -90 213 131 -65 205 255 -0 98 148 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -213 197 90 -197 164 24 -156 156 32 -213 197 90 -156 156 32 -255 230 57 -205 172 8 -255 156 148 -156 65 57 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -74 74 98 -115 115 115 -255 255 255 -213 164 32 -197 106 16 -164 74 0 -213 164 32 -164 74 0 -255 115 49 -197 57 0 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -123 156 115 -255 115 49 -115 115 115 -255 255 255 -180 255 164 -123 222 131 -123 156 98 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -172 238 255 -123 213 238 -74 172 205 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -246 246 148 -246 230 98 -222 197 32 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 115 49 -115 115 115 -255 255 255 -255 213 222 -255 189 148 -238 164 131 -255 115 49 -255 115 49 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 -57 156 255 -255 255 115 -115 115 115 -255 255 255 -180 255 164 -123 222 131 -131 172 106 -255 255 115 -255 255 115 -255 0 255 -255 0 255 -255 0 255 -255 0 255 -82 82 82 -255 213 82 -255 180 65 diff --git a/graphics/party_menu/bg.png b/graphics/party_menu/bg.png index c58f3aae98d8e7eb47f33be3d95b71bd78570b98..ed9f8a599afee7528fe6fbd1a5818a3d3fa70584 100644 GIT binary patch literal 1112 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I3?%1nZ+ru!7>k44ofy`glX=O&z$6gh6XIGu zr}+Q>|5;gCKv~DL{~5aX8t#4ff6kP>Q9<{ri-Ce@pnFQSmsgVGoGA)fNnUG~Sax>@ zIeIAwNc?B`4?_R{SD)QtIi(uHEsoj(RR6!&5KVnhP!v}6ONze%-2*hgxESQB=A-v4 zr`*%5-U4I*$>RTOqOLZB9GNsFC@ARv)u8`d9Ff&uJsNd%iNu^a3P1*s{Qu1I>>3WB zU* zZ#m~bT>YAN|EsUQ^ICJ3NcG>oP5JgL>E2NVBGv!Ddhh?C@u;4Od zMnfFCuEKNHf(tJhX0gi#vo@?@T**1z`u$<0!#4w&1-YiXYaO^W{me`K(5pv;()eDy zTQ^g$x9Fbg8Y>4eHa>~0i1LI`=9`D4uF2-esW|Yyw^$+9XUQ@9-972c77jBbkBbI6 zJZ4CJ$9Ba0AVailg`-x&il>{s{~xXXFY+X{;V#4Jg{K(a{aea>Y1WsWA!$FWI1)}P zo;q%ISB`lN#}#R72H#sT2NuLOn2B3BtXyvkICETf!kPUq5@vHRmpQ=J5X^VSO#F@|d&9Yf_4{`0vpi6L;#I)ab4_aR z-}i>FTQ$rGkbN=jH^aY!rk>|Y7-}~c{#oA;;=N13)*`+4ap|#L&+h+CKAYxMtMOo( z==J^gUyE)PQv0$;^J}Q=8Bu}v&u-_c@x6)@IAE&HWas(wvx-7|;9rI<>=F&%9&kU% z7F`yq)lkm(vb|_V0sB(Ti~wxRK>#xoahOUV=Fk8bY}PRc z<1T+%76GQ!T%(3`*8HSAZdclA1ZS=B3IR>Y$m<%VHF{;1%{$fdg60Jpc~%nM2;=Km{zcat2|QR6Sl`; zPNPiUSw9>g3;1ydODks~rMFIjLjdrIrGvB{#DMWLs}NQa@VBG?1-4uMpimXa-d2C4 z8+bp)8wggy0N!gJcZcKdc&t7UfU62?mJS;P4!h4gc0e(31={TE8XkSXsotNeI6yf# zz~yiboL6yKmSq6gKm`q~`M)US|3uzdv4Mq0$}8ln-l}E2TN{JH_$Xm q0wt-*ftw@&UQ*1#G*w&+;2Sr2H`x$PHX#Q90000 Date: Wed, 8 Feb 2023 11:45:03 -0500 Subject: [PATCH 12/29] Sync mapjson --- asm/macros/map.inc | 6 + tools/mapjson/mapjson.cpp | 444 ++++++++++++++++---------------------- 2 files changed, 195 insertions(+), 255 deletions(-) diff --git a/asm/macros/map.inc b/asm/macros/map.inc index ceaa383b4..83ef472c9 100644 --- a/asm/macros/map.inc +++ b/asm/macros/map.inc @@ -75,6 +75,12 @@ inc _num_traps .endm + @ Defines a weather coord event for map data. Any coord event is treated as a weather coord event if its script is NULL. + @ NOTE: In FRLG, the weather handling functions are dummied out. See src/coord_event_weather.c + .macro coord_weather_event x:req, y:req, elevation:req, weather:req + coord_event \x, \y, \elevation, \weather, 0, NULL + .endm + @ Defines a generic background event for map data. Mirrors the struct layout of BgEvent in include/global.fieldmap.h @ 'kind' is any BG_EVENT_* constant (see include/constants/event_bg.h). @ 'arg6' is used differently depending on the bg event type. 'arg7' and 'arg8' are only used by bg_hidden_item_event. diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 5de9f7461..460e5e8af 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -61,14 +61,44 @@ void write_text_file(string filepath, string text) { out_file.close(); } + +string json_to_string(const Json &data, const string &field = "", bool silent = false) { + const Json value = !field.empty() ? data[field] : data; + string output = ""; + switch (value.type()) { + case Json::Type::STRING: + output = value.string_value(); + break; + case Json::Type::NUMBER: + output = std::to_string(value.int_value()); + break; + case Json::Type::BOOL: + output = value.bool_value() ? "TRUE" : "FALSE"; + break; + default:{ + if (!silent) { + string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; + FATAL_ERROR("%s is unexpected type; expected string, number, or bool.\n", s.c_str()); + } + } + } + + if (!silent && output.empty()) { + string s = !field.empty() ? ("Value for '" + field + "'") : "JSON field"; + FATAL_ERROR("%s cannot be empty.\n", s.c_str()); + } + + return output; +} + string generate_map_header_text(Json map_data, Json layouts_data) { - string map_layout_id = map_data["layout"].string_value(); + string map_layout_id = json_to_string(map_data, "layout"); vector matched; - for (auto &field : layouts_data["layouts"].array_items()) { - if (map_layout_id == field["id"].string_value()) - matched.push_back(field); + for (auto &layout : layouts_data["layouts"].array_items()) { + if (map_layout_id == json_to_string(layout, "id", true)) + matched.push_back(layout); } if (matched.size() != 1) @@ -78,55 +108,52 @@ string generate_map_header_text(Json map_data, Json layouts_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); - text << map_data["name"].string_value() << "::\n" - << "\t.4byte " << layout["name"].string_value() << "\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; + + text << mapName << ":\n" + << "\t.4byte " << json_to_string(layout, "name") << "\n"; if (map_data.object_items().find("shared_events_map") != map_data.object_items().end()) - text << "\t.4byte " << map_data["shared_events_map"].string_value() << "_MapEvents\n"; + text << "\t.4byte " << json_to_string(map_data, "shared_events_map") << "_MapEvents\n"; else - text << "\t.4byte " << map_data["name"].string_value() << "_MapEvents\n"; + text << "\t.4byte " << mapName << "_MapEvents\n"; if (map_data.object_items().find("shared_scripts_map") != map_data.object_items().end()) - text << "\t.4byte " << map_data["shared_scripts_map"].string_value() << "_MapScripts\n"; + text << "\t.4byte " << json_to_string(map_data, "shared_scripts_map") << "_MapScripts\n"; else - text << "\t.4byte " << map_data["name"].string_value() << "_MapScripts\n"; + text << "\t.4byte " << mapName << "_MapScripts\n"; if (map_data.object_items().find("connections") != map_data.object_items().end() - && map_data["connections"].array_items().size() > 0 && map_data["connections_no_include"] == Json()) - text << "\t.4byte " << map_data["name"].string_value() << "_MapConnections\n"; + && map_data["connections"].array_items().size() > 0 && json_to_string(map_data, "connections_no_include", true) != "TRUE") + text << "\t.4byte " << mapName << "_MapConnections\n"; else - text << "\t.4byte 0x0\n"; + text << "\t.4byte NULL\n"; - text << "\t.2byte " << map_data["music"].string_value() << "\n" - << "\t.2byte " << layout["id"].string_value() << "\n" - << "\t.byte " << map_data["region_map_section"].string_value() << "\n" - << "\t.byte " << map_data["requires_flash"].bool_value() << "\n" - << "\t.byte " << map_data["weather"].string_value() << "\n" - << "\t.byte " << map_data["map_type"].string_value() << "\n"; + text << "\t.2byte " << json_to_string(map_data, "music") << "\n" + << "\t.2byte " << json_to_string(layout, "id") << "\n" + << "\t.byte " << json_to_string(map_data, "region_map_section") << "\n" + << "\t.byte " << json_to_string(map_data, "requires_flash") << "\n" + << "\t.byte " << json_to_string(map_data, "weather") << "\n" + << "\t.byte " << json_to_string(map_data, "map_type") << "\n"; if (version != "firered") text << "\t.2byte 0\n"; - if (version == "ruby") { - text << "\t.byte " << map_data["show_map_name"].bool_value() << "\n"; - } - else if (version == "emerald" || version == "firered") { + if (version == "ruby") + text << "\t.byte " << json_to_string(map_data, "show_map_name") << "\n"; + else if (version == "emerald" || version == "firered") text << "\tmap_header_flags " - << "allow_cycling=" << map_data["allow_cycling"].bool_value() << ", " - << "allow_escaping=" << map_data["allow_escaping"].bool_value() << ", " - << "allow_running=" << map_data["allow_running"].bool_value() << ", " - << "show_map_name=" << map_data["show_map_name"].bool_value() << "\n"; - } + << "allow_cycling=" << json_to_string(map_data, "allow_cycling") << ", " + << "allow_escaping=" << json_to_string(map_data, "allow_escaping") << ", " + << "allow_running=" << json_to_string(map_data, "allow_running") << ", " + << "show_map_name=" << json_to_string(map_data, "show_map_name") << "\n"; - if (version == "firered") { - text << "\t.byte " << map_data["floor_number"].int_value() << "\n"; - } + if (version == "firered") + text << "\t.byte " << json_to_string(map_data, "floor_number") << "\n"; - text << "\t.byte " << map_data["battle_scene"].string_value() << "\n\n"; + text << "\t.byte " << json_to_string(map_data, "battle_scene") << "\n\n"; return text.str(); } @@ -137,22 +164,22 @@ string generate_map_connections_text(Json map_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); - text << map_data["name"].string_value() << "_MapConnectionsList::\n"; + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; + + text << mapName << "_MapConnectionsList:\n"; for (auto &connection : map_data["connections"].array_items()) { text << "\tconnection " - << connection["direction"].string_value() << ", " - << connection["offset"].int_value() << ", " - << connection["map"].string_value() << "\n"; + << json_to_string(connection, "direction") << ", " + << json_to_string(connection, "offset") << ", " + << json_to_string(connection, "map") << "\n"; } - text << "\n" << map_data["name"].string_value() << "_MapConnections::\n" + text << "\n" << mapName << "_MapConnections:\n" << "\t.4byte " << map_data["connections"].array_items().size() << "\n" - << "\t.4byte " << map_data["name"].string_value() << "_MapConnectionsList\n\n"; + << "\t.4byte " << mapName << "_MapConnectionsList\n\n"; return text.str(); } @@ -163,232 +190,137 @@ string generate_map_events_text(Json map_data) { ostringstream text; - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; + string mapName = json_to_string(map_data, "name"); + + text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" << mapName << "/map.json\n@\n\n"; string objects_label, warps_label, coords_label, bgs_label; if (map_data["object_events"].array_items().size() > 0) { - objects_label = map_data["name"].string_value() + "_ObjectEvents"; + objects_label = mapName + "_ObjectEvents"; text << objects_label << ":\n"; for (unsigned int i = 0; i < map_data["object_events"].array_items().size(); i++) { auto obj_event = map_data["object_events"].array_items()[i]; - text << "\tobject_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", 0, " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["elevation"].int_value() << ", " - << obj_event["movement_type"].string_value() << ", " - << obj_event["movement_range_x"].int_value() << ", " - << obj_event["movement_range_y"].int_value() << ", " - << obj_event["trainer_type"].string_value() << ", " - << obj_event["trainer_sight_or_berry_tree_id"].string_value() << ", " - << obj_event["script"].string_value() << ", " - << obj_event["flag"].string_value() << "\n"; - } - text << "\n"; - } else { - objects_label = "0x0"; - } - - if (map_data["warp_events"].array_items().size() > 0) { - warps_label = map_data["name"].string_value() + "_MapWarps"; - text << warps_label << ":\n"; - for (auto &warp_event : map_data["warp_events"].array_items()) { - text << "\twarp_def " - << warp_event["x"].int_value() << ", " - << warp_event["y"].int_value() << ", " - << warp_event["elevation"].int_value() << ", " - << warp_event["dest_warp_id"].string_value() << ", " - << warp_event["dest_map"].string_value() << "\n"; - } - text << "\n"; - } else { - warps_label = "0x0"; - } - - if (map_data["coord_events"].array_items().size() > 0) { - coords_label = map_data["name"].string_value() + "_MapCoordEvents"; - text << coords_label << ":\n"; - for (auto &coord_event : map_data["coord_events"].array_items()) { - if (coord_event["type"].string_value() == "trigger") { - text << "\tcoord_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["var"].string_value() << ", " - << coord_event["var_value"].string_value() << ", " - << coord_event["script"].string_value() << "\n"; - } - else if (coord_event["type"] == "weather") { - text << "\tcoord_weather_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["weather"].string_value() << "\n"; - } - } - text << "\n"; - } else { - coords_label = "0x0"; - } - - if (map_data["bg_events"].array_items().size() > 0) { - bgs_label = map_data["name"].string_value() + "_MapBGEvents"; - text << bgs_label << ":\n"; - for (auto &bg_event : map_data["bg_events"].array_items()) { - if (bg_event["type"] == "sign") { - text << "\tbg_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["player_facing_dir"].string_value() << ", " - << bg_event["script"].string_value() << "\n"; - } - else if (bg_event["type"] == "hidden_item") { - text << "\tbg_hidden_item_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["item"].string_value() << ", " - << bg_event["flag"].string_value() << "\n"; - } - else if (bg_event["type"] == "secret_base") { - text << "\tbg_secret_base_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["secret_base_id"].string_value() << "\n"; - } - } - text << "\n"; - } else { - bgs_label = "0x0"; - } - - text << map_data["name"].string_value() << "_MapEvents::\n" - << "\tmap_events " << objects_label << ", " << warps_label << ", " - << coords_label << ", " << bgs_label << "\n\n"; - - return text.str(); -} - -string generate_firered_map_events_text(Json map_data) { - ostringstream text; - - text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/" - << map_data["name"].string_value() - << "/map.json\n@\n\n"; - - string objects_label, warps_label, coords_label, bgs_label; - - if (map_data["object_events"].array_items().size() > 0) { - objects_label = map_data["name"].string_value() + "_ObjectEvents"; - text << objects_label << "::\n"; - for (unsigned int i = 0; i < map_data["object_events"].array_items().size(); i++) { - auto obj_event = map_data["object_events"].array_items()[i]; - string type = obj_event["type"].string_value(); + string type = json_to_string(obj_event, "type", true); // If no type field is present, assume it's a regular object event. if (type == "" || type == "object") { text << "\tobject_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["elevation"].int_value() << ", " - << obj_event["movement_type"].string_value() << ", " - << obj_event["movement_range_x"].int_value() << ", " - << obj_event["movement_range_y"].int_value() << ", " - << obj_event["trainer_type"].string_value() << ", " - << obj_event["trainer_sight_or_berry_tree_id"].string_value() << ", " - << obj_event["script"].string_value() << ", " - << obj_event["flag"].string_value() << "\n"; + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "elevation") << ", " + << json_to_string(obj_event, "movement_type") << ", " + << json_to_string(obj_event, "movement_range_x") << ", " + << json_to_string(obj_event, "movement_range_y") << ", " + << json_to_string(obj_event, "trainer_type") << ", " + << json_to_string(obj_event, "trainer_sight_or_berry_tree_id") << ", " + << json_to_string(obj_event, "script") << ", " + << json_to_string(obj_event, "flag") << "\n"; } else if (type == "clone") { text << "\tclone_event " << i + 1 << ", " - << obj_event["graphics_id"].string_value() << ", " - << obj_event["x"].int_value() << ", " - << obj_event["y"].int_value() << ", " - << obj_event["target_local_id"].int_value() << ", " - << obj_event["target_map"].string_value() << "\n"; + << json_to_string(obj_event, "graphics_id") << ", " + << json_to_string(obj_event, "x") << ", " + << json_to_string(obj_event, "y") << ", " + << json_to_string(obj_event, "target_local_id") << ", " + << json_to_string(obj_event, "target_map") << "\n"; + } else { + FATAL_ERROR("Unknown object event type '%s'. Expected 'object' or 'clone'.\n", type.c_str()); } } text << "\n"; } else { - objects_label = "0x0"; + objects_label = "NULL"; } if (map_data["warp_events"].array_items().size() > 0) { - warps_label = map_data["name"].string_value() + "_MapWarps"; - text << warps_label << "::\n"; + warps_label = mapName + "_MapWarps"; + text << warps_label << ":\n"; for (auto &warp_event : map_data["warp_events"].array_items()) { text << "\twarp_def " - << warp_event["x"].int_value() << ", " - << warp_event["y"].int_value() << ", " - << warp_event["elevation"].int_value() << ", " - << warp_event["dest_warp_id"].string_value() << ", " - << warp_event["dest_map"].string_value() << "\n"; + << json_to_string(warp_event, "x") << ", " + << json_to_string(warp_event, "y") << ", " + << json_to_string(warp_event, "elevation") << ", " + << json_to_string(warp_event, "dest_warp_id") << ", " + << json_to_string(warp_event, "dest_map") << "\n"; } text << "\n"; } else { - warps_label = "0x0"; + warps_label = "NULL"; } if (map_data["coord_events"].array_items().size() > 0) { - coords_label = map_data["name"].string_value() + "_MapCoordEvents"; - text << coords_label << "::\n"; + coords_label = mapName + "_MapCoordEvents"; + text << coords_label << ":\n"; for (auto &coord_event : map_data["coord_events"].array_items()) { - if (coord_event["type"].string_value() == "trigger") { + string type = json_to_string(coord_event, "type"); + if (type == "trigger") { text << "\tcoord_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["var"].string_value() << ", " - << coord_event["var_value"].string_value() << ", " - << coord_event["script"].string_value() << "\n"; + << json_to_string(coord_event, "x") << ", " + << json_to_string(coord_event, "y") << ", " + << json_to_string(coord_event, "elevation") << ", " + << json_to_string(coord_event, "var") << ", " + << json_to_string(coord_event, "var_value") << ", " + << json_to_string(coord_event, "script") << "\n"; } - else if (coord_event["type"] == "weather") { + else if (type == "weather") { text << "\tcoord_weather_event " - << coord_event["x"].int_value() << ", " - << coord_event["y"].int_value() << ", " - << coord_event["elevation"].int_value() << ", " - << coord_event["weather"].string_value() << "\n"; + << json_to_string(coord_event, "x") << ", " + << json_to_string(coord_event, "y") << ", " + << json_to_string(coord_event, "elevation") << ", " + << json_to_string(coord_event, "weather") << "\n"; + } else { + FATAL_ERROR("Unknown coord event type '%s'. Expected 'trigger' or 'weather'.\n", type.c_str()); } } text << "\n"; } else { - coords_label = "0x0"; + coords_label = "NULL"; } if (map_data["bg_events"].array_items().size() > 0) { - bgs_label = map_data["name"].string_value() + "_MapBGEvents"; - text << bgs_label << "::\n"; + bgs_label = mapName + "_MapBGEvents"; + text << bgs_label << ":\n"; for (auto &bg_event : map_data["bg_events"].array_items()) { - if (bg_event["type"] == "sign") { + string type = json_to_string(bg_event, "type"); + if (type == "sign") { text << "\tbg_sign_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["player_facing_dir"].string_value() << ", " - << bg_event["script"].string_value() << "\n"; + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "player_facing_dir") << ", " + << json_to_string(bg_event, "script") << "\n"; } - else if (bg_event["type"] == "hidden_item") { + else if (type == "hidden_item") { text << "\tbg_hidden_item_event " - << bg_event["x"].int_value() << ", " - << bg_event["y"].int_value() << ", " - << bg_event["elevation"].int_value() << ", " - << bg_event["item"].string_value() << ", " - << bg_event["flag"].string_value() << ", " - << bg_event["quantity"].int_value() << ", " - << bg_event["underfoot"].bool_value() << "\n"; + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "item") << ", " + << json_to_string(bg_event, "flag"); + if (version == "firered") { + text << ", " + << json_to_string(bg_event, "quantity") << ", " + << json_to_string(bg_event, "underfoot"); + } + text << "\n"; + } + else if (type == "secret_base") { + text << "\tbg_secret_base_event " + << json_to_string(bg_event, "x") << ", " + << json_to_string(bg_event, "y") << ", " + << json_to_string(bg_event, "elevation") << ", " + << json_to_string(bg_event, "secret_base_id") << "\n"; + } else { + FATAL_ERROR("Unknown bg event type '%s'. Expected 'sign', 'hidden_item', or 'secret_base'.\n", type.c_str()); } } text << "\n"; } else { - bgs_label = "0x0"; + bgs_label = "NULL"; } - text << map_data["name"].string_value() << "_MapEvents::\n" + text << mapName << "_MapEvents::\n" << "\tmap_events " << objects_label << ", " << warps_label << ", " << coords_label << ", " << bgs_label << "\n\n"; @@ -416,8 +348,7 @@ void process_map(string map_filepath, string layouts_filepath) { FATAL_ERROR("%s\n", layouts_err.c_str()); string header_text = generate_map_header_text(map_data, layouts_data); - string events_text = version == "firered" ? generate_firered_map_events_text(map_data) - : generate_map_events_text(map_data); + string events_text = generate_map_events_text(map_data); string connections_text = generate_map_connections_text(map_data); string files_dir = get_directory_name(map_filepath); @@ -432,11 +363,11 @@ string generate_groups_text(Json groups_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (auto &key : groups_data["group_order"].array_items()) { - string group = key.string_value(); + string group = json_to_string(key); text << group << "::\n"; auto maps = groups_data[group].array_items(); for (Json &map_name : maps) - text << "\t.4byte " << map_name.string_value() << "\n"; + text << "\t.4byte " << json_to_string(map_name) << "\n"; text << "\n"; } @@ -445,7 +376,7 @@ string generate_groups_text(Json groups_data) { text << "gMapGroups::\n"; for (auto &group : groups_data["group_order"].array_items()) - text << "\t.4byte " << group.string_value() << "\n"; + text << "\t.4byte " << json_to_string(group) << "\n"; text << "\n"; return text.str(); @@ -455,7 +386,7 @@ string generate_connections_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) + for (auto map_name : groups_data[json_to_string(group)].array_items()) map_names.push_back(map_name); vector connections_include_order = groups_data["connections_include_order"].array_items(); @@ -476,7 +407,7 @@ string generate_connections_text(Json groups_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/maps/map_groups.json\n@\n\n"; for (Json map_name : map_names) - text << "\t.include \"data/maps/" << map_name.string_value() << "/connections.inc\"\n"; + text << "\t.include \"data/maps/" << json_to_string(map_name) << "/connections.inc\"\n"; return text.str(); } @@ -485,8 +416,8 @@ string generate_headers_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) - map_names.push_back(map_name.string_value()); + for (auto map_name : groups_data[json_to_string(group)].array_items()) + map_names.push_back(json_to_string(map_name)); ostringstream text; @@ -502,8 +433,8 @@ string generate_events_text(Json groups_data) { vector map_names; for (auto &group : groups_data["group_order"].array_items()) - for (auto map_name : groups_data[group.string_value()].array_items()) - map_names.push_back(map_name.string_value()); + for (auto map_name : groups_data[json_to_string(group)].array_items()) + map_names.push_back(json_to_string(map_name)); ostringstream text; @@ -529,22 +460,25 @@ string generate_map_constants_text(string groups_filepath, Json groups_data) { int group_num = 0; for (auto &group : groups_data["group_order"].array_items()) { - text << "// " << group.string_value() << "\n"; + string groupName = json_to_string(group); + text << "// " << groupName << "\n"; vector map_ids; size_t max_length = 0; - for (auto &map_name : groups_data[group.string_value()].array_items()) { - string header_filepath = file_dir + map_name.string_value() + dir_separator + "map.json"; + for (auto &map_name : groups_data[groupName].array_items()) { + string header_filepath = file_dir + json_to_string(map_name) + dir_separator + "map.json"; string err_str; Json map_data = Json::parse(read_text_file(header_filepath), err_str); map_ids.push_back(map_data["id"]); - if (map_data["id"].string_value().length() > max_length) - max_length = map_data["id"].string_value().length(); + string id = json_to_string(map_data, "id"); + if (id.length() > max_length) + max_length = id.length(); } int map_id_num = 0; for (Json map_id : map_ids) { - text << "#define " << map_id.string_value() << string((max_length - map_id.string_value().length() + 1), ' ') + string id = json_to_string(map_id); + text << "#define " << id << string((max_length - id.length() + 1), ' ') << "(" << map_id_num++ << " | (" << group_num << " << 8))\n"; } text << "\n"; @@ -588,27 +522,26 @@ string generate_layout_headers_text(Json layouts_data) { for (auto &layout : layouts_data["layouts"].array_items()) { if (layout == Json::object()) continue; - string border_label = layout["name"].string_value() + "_Border"; - string blockdata_label = layout["name"].string_value() + "_Blockdata"; + string layoutName = json_to_string(layout, "name"); + string border_label = layoutName + "_Border"; + string blockdata_label = layoutName + "_Blockdata"; text << border_label << "::\n" - << "\t.incbin \"" << layout["border_filepath"].string_value() << "\"\n\n" + << "\t.incbin \"" << json_to_string(layout, "border_filepath") << "\"\n\n" << blockdata_label << "::\n" - << "\t.incbin \"" << layout["blockdata_filepath"].string_value() << "\"\n\n" + << "\t.incbin \"" << json_to_string(layout, "blockdata_filepath") << "\"\n\n" << "\t.align 2\n" - << layout["name"].string_value() << "::\n" - << "\t.4byte " << layout["width"].int_value() << "\n" - << "\t.4byte " << layout["height"].int_value() << "\n" + << layoutName << "::\n" + << "\t.4byte " << json_to_string(layout, "width") << "\n" + << "\t.4byte " << json_to_string(layout, "height") << "\n" << "\t.4byte " << border_label << "\n" << "\t.4byte " << blockdata_label << "\n" - << "\t.4byte " << layout["primary_tileset"].string_value() << "\n" - << "\t.4byte " << layout["secondary_tileset"].string_value() << "\n"; - + << "\t.4byte " << json_to_string(layout, "primary_tileset") << "\n" + << "\t.4byte " << json_to_string(layout, "secondary_tileset") << "\n"; if (version == "firered") { - text << "\t.byte " << layout["border_width"].int_value() << "\n" - << "\t.byte " << layout["border_height"].int_value() << "\n" + text << "\t.byte " << json_to_string(layout, "border_width") << "\n" + << "\t.byte " << json_to_string(layout, "border_height") << "\n" << "\t.2byte 0\n"; } - text << "\n"; } @@ -621,10 +554,10 @@ string generate_layouts_table_text(Json layouts_data) { text << "@\n@ DO NOT MODIFY THIS FILE! It is auto-generated from data/layouts/layouts.json\n@\n\n"; text << "\t.align 2\n" - << layouts_data["layouts_table_label"].string_value() << "::\n"; + << json_to_string(layouts_data, "layouts_table_label") << "::\n"; for (auto &layout : layouts_data["layouts"].array_items()) { - string layout_name = layout["name"].string_value(); + string layout_name = json_to_string(layout, "name", true); if (layout_name.empty()) layout_name = "NULL"; text << "\t.4byte " << layout_name << "\n"; } @@ -643,7 +576,7 @@ string generate_layouts_constants_text(Json layouts_data) { int i = 1; for (auto &layout : layouts_data["layouts"].array_items()) { if (layout != Json::object()) - text << "#define " << layout["id"].string_value() << " " << i << "\n"; + text << "#define " << json_to_string(layout, "id") << " " << i << "\n"; i++; } @@ -675,7 +608,8 @@ int main(int argc, char *argv[]) { if (argc < 3) FATAL_ERROR("USAGE: mapjson [options]\n"); - version = argv[2]; + char *version_arg = argv[2]; + version = string(version_arg); if (version != "emerald" && version != "ruby" && version != "firered") FATAL_ERROR("ERROR: must be 'emerald', 'firered', or 'ruby'.\n"); From 993aedc64a819652a69bfe053062e7d5a24ae35a Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 8 Feb 2023 13:31:20 -0500 Subject: [PATCH 13/29] Remove unnecessary version check --- tools/mapjson/mapjson.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tools/mapjson/mapjson.cpp b/tools/mapjson/mapjson.cpp index 460e5e8af..cfe95c485 100644 --- a/tools/mapjson/mapjson.cpp +++ b/tools/mapjson/mapjson.cpp @@ -371,10 +371,7 @@ string generate_groups_text(Json groups_data) { text << "\n"; } - if (version != "firered") - text << "\t.align 2\n"; - - text << "gMapGroups::\n"; + text << "\t.align 2\n" << "gMapGroups::\n"; for (auto &group : groups_data["group_order"].array_items()) text << "\t.4byte " << json_to_string(group) << "\n"; text << "\n"; From 6c8d9a090d22ff3c6ab85a896e53bdaaa3b8ef1d Mon Sep 17 00:00:00 2001 From: GriffinR Date: Fri, 17 Feb 2023 11:11:59 -0500 Subject: [PATCH 14/29] Colorize berry fix graphics --- graphics/berry_fix/gba_small.pal | 35 ------------ graphics/berry_fix/gba_small.png | Bin 2434 -> 2512 bytes graphics/berry_fix/gba_transfer.pal | 35 ------------ graphics/berry_fix/gba_transfer.png | Bin 2005 -> 2080 bytes graphics/berry_fix/gba_transfer_error.pal | 35 ------------ graphics/berry_fix/gba_transfer_error.png | Bin 1628 -> 15781 bytes graphics/berry_fix/gba_transfer_highlight.pal | 35 ------------ graphics/berry_fix/gba_transfer_highlight.png | Bin 2000 -> 9895 bytes graphics/berry_fix/logo.pal | 51 ------------------ graphics/berry_fix/logo.png | Bin 2199 -> 20792 bytes graphics/berry_fix/window.pal | 35 ------------ graphics/berry_fix/window.png | Bin 1214 -> 1316 bytes 12 files changed, 226 deletions(-) delete mode 100644 graphics/berry_fix/gba_small.pal delete mode 100644 graphics/berry_fix/gba_transfer.pal delete mode 100644 graphics/berry_fix/gba_transfer_error.pal delete mode 100644 graphics/berry_fix/gba_transfer_highlight.pal delete mode 100644 graphics/berry_fix/logo.pal delete mode 100644 graphics/berry_fix/window.pal diff --git a/graphics/berry_fix/gba_small.pal b/graphics/berry_fix/gba_small.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_small.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_small.png b/graphics/berry_fix/gba_small.png index 63f79cb496eac922e6f155f7c73cf82e519ac9a0..f11146c4e9a500979c91e5762c6ef8c2a6323609 100644 GIT binary patch delta 2465 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 delta 2387 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 M07*qoM6N<$g1*mzivR!s delta 1955 zcmV;U2VD4|5Y-Qm7!3pi0000rYI{`x001zNGBkgDYg{V;00&@6L_t(&f$f>iZrer> z$N37ok`6{sT*`^fo3#GOwd&I7l{NVSc0dFTQ+4pEI&toz3vkv2NcX)wUk$)7kVPJFtn{08z=^wd0iIQZ2MRvEc^ZFk za|OWd+3Sm96>t`SS`?J_7uC~%k^$>6C=f&>$+;`Fo~Bl$tp}VH6yqg;A{>zLPOKN9 z2u?50Z;qLHcD)i;AKlZ-(@Q8ffYZwk0K*306Eif<4Tr;4dPoI;pUSK0Zvf<%v`_#{ zKfn3C4VXZAG9kuf;w@m`f{XI)l;VGPnq4meY(aVD0sL$YCl2aBOondpgbCm#T>9Fw z0K&UB<$DS2T04~N+#Cnj=L{f&x)uO%V9K&&8&(j9@`RVAnFiJa)?z@>JuokYU~Rr& z9Og1pmhY&fdBA!M2tWn2A*?oR&qbBYe7~GNC$nm$VqH_4shGZWJqx*mrec59bg2c3 z9W5Iw>8o0sSQgEU7JzO5GvntL0CBWwxu?*JHJJe^Yzh3E zLezaJ7Y%K67{Zq@G#dNHHTS|8WYm45d06{`axVd%$_Oq1U=Ru{!3WHU0cd*Ajb};( z^~M*gxPUFOua=Kkh9RRgf@*(a7HkKEv`46nA`L}7jp;eQ>NyRcw!qZ2naA{UjLjUs z#!w%&I3rickQ5$e3NAxQ3J>GxvFy|5U-LP#0!>Oe=erA_+nKn~0I2iBqa5`e+P?>Q zeEjRVfXC+n9v+?v;NO4$CSVt(Zw!DpVRt6#d~wrQV@4bGqrgVCJ7uA(N2)!G%lBx! z8Gx&9v^L3rcGDyJvk{;O5SfuNWBI@c1{*WN*GPN21;7&|VyE?ZJfdX;Fm`OmV;e>I z9FL+NzAXSW5j8OYAmRxUk~;uUhXEwj=#L}9M&d#QjmZ0_t;K&7!i@Y{3ifHg4O^q8b?@U*@7ONG3-=+E`2qBTV*a(TFX;Dn)CyK8f1cZDOCsEe(4<5AY>z4`>0LOZ&;1cztFa z;E!{XCxd?g@SuO6J_X=EI{>sVX##NgahXf{j@I>?4o#y=1c=k5pCvrNY|!&1&AD79 z{XEO)Cx=7gmhaFsCecL)08D2fV|^ouQ0Q?dE8bGTk z1UTi6ERt`3{JE1PR1Fee5Ksc>`IoZ5=SkKEIOQ2V?}H>?9)Ipo%M(XJsuKwxVXh2v zAZ2Zkwq1Wn+I0X8!z5*s`&q6Szz16ZY6GBM2iSr|5umtj2RKs7eBH}Y2gq2ORDA9U zkR?9?fXdKM(Ur9UiU6N%9Br-zY(bt5njcOvgtTaoq86ZHqJ!>0Vz4PoTl2X{VV{fD zMnJv|FlYc`?YD54z6ZeaXt_@QXkH%d&Qz-wFo1ua%SN1MZ6VF)>wwOh6+qf~`8R_V zz{&+7;Ol@G&jxmfToG8MxjCq&5HtXK@$(rc4M+WKG32*u!sn^EIdCn=TSl=9IAL6r z(hPC}_@NwNxvZperfIoz>i~Z7@(RZmSIm zDe!+XsRbyEO91WwDZl-d^0$M5ACiPG2L2`>HwUT(R45hz_00Bv1sMN-jXMLH|7-ke zK>Oe4cLKEkqi|P%`~&u`0Bg^!y?s^PzPF3Nk$xq>iVb#mz@qI0*wprbJzx*m1NMMD pU=P>>_JBQL57-0tfbSacH)?(Gco$Od-vA2$002ovPDHLkV1foElcN9t diff --git a/graphics/berry_fix/gba_transfer_error.pal b/graphics/berry_fix/gba_transfer_error.pal deleted file mode 100644 index 0e177217f..000000000 --- a/graphics/berry_fix/gba_transfer_error.pal +++ /dev/null @@ -1,35 +0,0 @@ -JASC-PAL -0100 -32 -0 0 0 -255 255 255 -32 32 32 -172 172 172 -230 8 8 -255 189 115 -32 156 8 -148 246 148 -49 82 205 -164 197 246 -164 213 90 -238 230 197 -148 197 213 -32 57 98 -106 148 197 -90 106 156 -255 255 255 -164 213 90 -32 32 32 -123 123 205 -255 255 255 -74 74 115 -197 197 197 -98 98 189 -106 106 197 -98 123 57 -131 131 131 -222 41 0 -189 123 41 -180 180 222 -0 0 0 -0 0 0 diff --git a/graphics/berry_fix/gba_transfer_error.png b/graphics/berry_fix/gba_transfer_error.png index 6c5f69ff5f6bbdbaea43e761a065516fde60828c..389fa8cab395666f179b69f1f46d19cb20c079e2 100644 GIT binary patch literal 15781 zcmV;WJzBzvP) zaB^>EX>4U6ba`-PAZ2)IW&i+q+SR;S*5o*nbotIz)Dj4Q7`PlvJg0Zi%kO((9+{O{ zmDyGQ>6Z?Vh|k^Jj79>gq9Qur+W+_e^2d!27w4bL{<-)+|M{sb#>!kT#VhU<(#`*y z-;(?P{-*M#z^~4$<-Gnc*6#Y-Z~tlW=D%3GyZ?Dd`p2cX?!Q*M{L>o!c|GKR zdOiJZ*Wy3iQTXe(@gM&pJ?XEH{+G4;zSX{O|DLWtg_SDTpNINu3D56%<6tS%`B>ps z<-g4D>-qKatMQ1F9b2ry;Mcsu8zQUyg(s}g!x#4XIm6@@pSUB-9b=p^o!1)6|Hhfz zg2!Lsi#5GzU8%7@lU+-^9RGGN;e79VzHf%cH?P1uW8h+ePyCl(*MIlo|H-evUFiGV z@DNU%sE~{<%h|>(2#PBECCwGg$N!?h;ZCCEPW}8UpLs*q_dw$MnR(4uqWJ3fITp zVEt@Pi+(qsso}gg=JhW=H+44ac{27>pN0+fobq$!oJ+2`=5%8{ z{9R!t){?KtW4$w#@Rb>Q+51a7eQC@wKQ^c5`lj|hd%gS3BY*d|H(&W=g56x8Cnp?&F{Z}{3S z121deoiN9^do6D-D-FzfVMILq6W)1G7Pnt<0oH2=7kQQ9Gp!NhCV;Ux_Xf|yS{Uay zp54B<2KbZr(sNvp4`+*P`4t`(XcEwTG56+A+$XSD+`NC<`Tl-un76CT1r{E}r#^NI z+h}dqcClo$jrrt`$*tXT1-3tSk&hNEaSg6GzQtWUE*r?QKe)@R`I{-^6=(Q%&zH-< zg723_7|BN*iyx`IF|W5J7NBOV;i*_ayfKv>R|XlnXvGa}yngR;<-oTDh!1mI@y ztAa19V`Rkk?{4cZYd%=tSlIlxcIgA}e^|_hJEZtx3CGX5gYi9OtN>ob#0ssL%Qs@G z>%qBn>|MU6;x=qcThDWidhD=%INCcg8sKr_T!mZet!&t9uJ^>s@jJFC;l`lE7~{ET zNdasHa$>tWPR>??&s~Upu(`SW`nVn5U*~Fd^SQA1#;7(}3ZSLJ2C-;77f{XB8?+{V zpMU8g4=qzxwLT8@+>a(VkqDdD3}ip-Pp{G z)R$CGMAi-h=ZQSvy?{ermbKw6ye(C7O>5B%@l z&!ew_9{3HR@AHX<__=_d$lYNwV9KoQ{3-$T%fRd8n*bNqpYT-bOZ5E8i$TIA2?^^< zIOkwJH?9B6yA*0->fu-W+Ydz_>#f5i&1S{@W zzrbB^AbjokMJ#LIrEWL{VSbe7GpcT59af&6s+F(oo5wX^qWk!AZhw3^Ht>{tU%E0R zV`8xBJ+7=^=y%@uDtkO9A&WJsvXKpI(VZK-V@{xnO`Jw+zMA`ECu5KB3RV%L#={0s zw(#9nS)<$*_*Q`@eC-~1HQUd2FZT6W&v@{8?FXXW({5{ife^=bg8#Tc^NQt#NfhuE zhR$DK1`nW<2YbJ)%z?9@aBe^y^UuBVgiwYP3?fX(Wx%i#&>bhC;Q?}ap&^s(%nkPhihsudAl5RA)USfcPkwupXt@_Fd&Q1203Z!X&9p472 z;KlIU$Xe%Xa?41g1kB8Y*%(vt_U|21F!(q>BKQOEorLCEA(+6OSQK-|klxB-uto;z z)vGQ}5avRuN2myUK`6zPAd3=w$QO~lHvAJbkC5rkS3(C8xC?&`SA|}0nkNne zen8XiFb!#&P2X?0vPZ8 z8jwtwS=jgmN}=ZqFA`A~u62WFo3Mdr985a@Cpz<#J7xoJm{`X~MZ8E+Nd5CwwaDB{ z-`4R=+3?V8sbrsLnUgOAJaNz90}cZuJ^*&{5_mh6<-p`v7X+O9#UbGT>>J{#HhBhC zF0K&}VS=O78#CYoO&DPN}&9S@hA1U%RXR2^rBm%%;y<1`8vAGh=s14y61d{NEKZhJw;f2@?ZAs30Qm{lKF} z>}MT$I3c4FY17BwVSw}CC;>j-nfMQuz+$;FWIN+e5qjAIu4`*aS;J@M~xjm|l=BvGU`*9lZ>ILI{DxV0?~s zg4ZAzP_{1q@(XMLpf%!;$Zse|M+yO+cu_;x;<-bSffIZMc?*@OtOAaV7Dst?>wZ4NTnOoTz7oG03+W6xlgFw)xb|_&2I08 zx=)Y-&H{}euqrf6#&(Gr`2`eERsbZnwc#g$C;qMxLw`U?q7RS`c?&--_D6Ld&56?< z&3S8Sgx!1N_YjNXwz^ud1%QnW0t@Bmje6LEFPv9sn_xmmyE(l zxvP8S0nq9qY&kPxsGH2o^$J48W7L|{R=0;1~W4P>6W|P32NQ^>T)XD@ zbO3_4K?&hU*frdrmBv-$m*lNb##yu9Z?9*ICPW>^Mz)`u~FYx?cqibk8xzh zC~OVu$!I-63fv>O<+Tln<1iJU})r z2MVzzaszw|6UyK(sEzq!{H!V%5&8wN0$w!&0r+UD?(omsxbKeF!^et9k+{D__siqF@QK99Goq9L#=4tjvVRW0P-IF3qyk-wgw&%T6cX};EH

P&Zg19&An^oA!9d(u!`LlPCgPSbyEa^)GG$H3^Tp8;b^oTMrn49|K8n zx#e>c^vdB&-tRht)yd_7Zo^mO$R|2`TvZ`xwqf2sU~hDuQghFqj@1un!ii zmjEkMv)c@A!)Mu`8$~?9I83-Ah93~0cOkW4IgtNJlqltTRcKrqRAGtm=#Fy;rNf9$ z1h})biIu|d-1!GGpW&zrN5-bU2EJ6I2y_X}fcY$`qggsO_%opcD;~TCP{`iRiS+kb zAHu+g0X*S+`Tc{D*Z%}Y|ND0|90>0`uk7c-9?Yu{M^6f+nihmn)IY-I&)fdRyHKxq zSbJ-V*RzZ*%u4sHun1s~HqxH9#fQa`=)BtOxS$FARPrDW67aSK=qT8t@-~hgXB|4cWK2=4yE4s!6Wq{u5XM&HJ z0d5`a_>Rj*wZv9T0aMd__^<{AfSuIM6B9d6>|X)-%tjNpQ#)-Kg-{v}jzHzB67q#? z%_sfbW=Yo{n54Bib)y14ICs-6H07{#lnUV%ox=Sr||e7>{%8FR`Y%#d1GUV)QEI4;cO1-Q$_ zjaxzqR!5ETP&P342~BOXMV8G@K<>)Jv&##bx*918MoWBn1ZCLuadFn0Xp2VCI9RF1 z<9v#v2Q|)(5mH!cycznI2Ncx8osJF6fP6E+DiJj`-qw^(sen8Ee??~iAC0VQ-`Jx` zVAeQYC0Oks%5C=6ov+~MFd#p}@*%Y6;X&~7)RXDbA0NTCFj}tr*PpN73qwzV$7smJ z6G_OM!Y_j+?6`LpZqA49-|Ml&gBmCmT$nW~faGV<>?KyiR=>VyV2AQ&*&KL6Qo}_@ zLEo6K|1utUmJ0`jwndifnHTm2m6>LymMP|9Y0bP;wE!lbg9jkZ6#bA##2W0YPF8Yr zwW<qA`r&BlJIkG*9|V`}Kf?+c5POX%E>#Ph06dFmxjt1(gg_E@*+LA*|4)Y9 zbm7ZRZVVaMMl$m887BeqW(6Q>mDmcJqB0K6W|37(de!~07tl4p zWxazt+7G`UI4wY&h&3265cp>^_9>!7RL_Tsu%2#C`U#-+-DiOUO%(M8t<-C#`d20> zn@B)+Kt6(2|F(vBVS@lO!oEVt?R-T}Y z*}C*izy$zwUU>Ah?qF5IGFFst;IrfUxW+Mbq}65xp0h7Dc|eCx#s#6|vH%c~m!}RtdxghguvNgp5Si!>N$h z1o9YTAvVIo@H|2*hyWur#Q^;c1^WVu`WrR007nSZ%PWBuLqVf> zi8mn$8Sz~WR%3sVTF6ur0r>U*HQyFWKqRa8px7i@jvp~yH-M`At%BaL6}6#`xM}2( zn+M&?rZISC!ZEaR60yHWgJ{4g-wsPe!iI=-9>C4O3~CQXcd>`@o$;0M;7HwipEtjTb_h20?ZPt{kSqtz55B0n^GQfz<+{TM7Gg_)#qR=a zjlrs#_Cip6Q%aH6%Z2#rcUh_bYz)Q)cOLCtbM|CXSrbUj`XK}h#I%2tB~^mEM*J;{ zANpn0Fu|KuW=G@^OTUd`=naDP!?j7NUXY9{}3cI=b<)%&D(cb)N zkDqiSjbNXIHCq$jcItdK5PUXg;w^;ax_J)a3bWu&uJ52ry5nnxig=x&A@Kt=;6wqf z|HNX(Tj3IU=x(9gP6p#~xFHu0SYzcFrubozrx)8;-VZ#wpMa1+C#VlVw15 zxXj2J^oT~oLNMNH8eDv}XA5SJ4W3NEXqiw@Fd_Ra!J#`Po;hX9R^j^N2=?Eb@@1un zZvY3J2)YC@2HcPU>=mx{qhRmpF=8KpV_3&~G7Q&ie};ZwJq6)dItX754uy@PJ!d2I>*gg?6 z+Oyif^QULi8V&b>u(l6(d4sMPQT1z4Uqc=Efn_3R9aal<$hQ48GeAENBU(p0vg!fv z7g;0qo=3iN86xL(Pi_xcQOj{yDB8AV0XG3nmRya%Tw6m+LSs5u3bNW$C<7Yex|J&x zAl zu}$-rd^Nld1hAw%?8E(4(+hYZtAZp<91fiM-fMvvJb?u+xw?I(5PEJwDac9(iwoVV zGw^8UhDd;7Z_^562&Pm`Mz_n3G{hoS-}Bv}+Bv`dVNX6#$HEGPtsA&sZZ=^XU@0yb z2+8>5wh0K#nBfA42EfMWS$dpp?Y_lm;xV2NQ8CH#qj^{jy6ebK?)@}8DjpRKN{Fg% zAyg5blt!^6!Y91K>hM^EB|#p8g#M(PpB01RR!X-I89rh{BJ*h9)ON&)Qwx2OPW;Ah zA@DE^J1n2$={LT{aQH-rv*eR`a{8W?>@74!e>_LY4K)X|m>b|cj0_amlp^8G|OEHzoU z2sYxGFpI>g9bOgy_rIX1_fO#1kX>ar@5i!nMf>7xm_jju+9?6Rn`?8sRu0U7KlRQ} zd={bN%Gt`T1w^=@St6eG`x{UGpR?ra4^95Vl2Pu>tcz^yl^Y|$Znn&(eFrm4o%Ta3 zPcne7j!tKx^RF=5naV&CV%$>X|1+9={l$}WW*G%4ODBXY+di8Ng=LlxmuM0?&cn*5 zWv*9&|FX%MxR|k{2k+4Vvy%z|8|Xe-9adzyhLyu$zh@^}V%EmZ7aj=1Y{Rhw_8r&< zMlkGbwx{xdCBMSm&7Tp~QSxbWXWlY!Hh&<|mrbU4In>4i=(fS=W7nW;)si=H#Y=#4 z7~^5$_Q6Xja9*OD$}6M?d6(sgX`FT?*3N9b4Y~wxllDh}nwxj1U_m}_zJ^DLIxVmA zgjN*_bi-Otat=tn+JGa-e7|4@h9A}g4N$C4G!+Lt7#ed2_#(9Lhv(r0EQmArhr%?W zz?!`_qBKHwv<=*7!CQ#Rf!JiP4wt^|3X-1@*m!OPr>(&FTR08zmA5Tas^z^luh$CH zp)iN+!_;jO-F9JP-9XS`1aL#!`=-srY&s17y`irEDcoP|)33^aBnWf3)z*$qCjV&3 zWzl<^btBH${fTVe+(l4wNu+I#hSu0w^FS%!9@~|g%I@UQ%xSUaE1RiP-Yc#H`QK-W zKLbk1b~}EcnDPF+M<$A8EW}Bc7bVcy2y8h99pL1?pIaU;0IHOO0?F7Rqs^+%X(X)$E^Liq^OR zSuY135psHZE>`Ze&9XRmF@yLa)h2tsZ04AtOM(lXbiJjr`y+B<2#8Hn5}34>8a5Z2 zwtckSh4r081CbK-&25ltsWFO-9O|zmz6W3;58jaThkOg0dL;Ft~!fP z;avd}lN2n2dCrG`7Gj@mj(GPx1S(AsC0^qudfGP1rO%*PXL|-;^vbw#+5A6q!|UJp zq2vTCNT+ng5h>~q+4 z-S5>MApy>By%6F4u(Hu9H%J5m^mRzUQ7Ie*w?CQPBiS8I@^*G8$1tz;{28+I&%>IV zI{iE3WCTPWi~pQXIqulTJ$8g>>o~2WpI-)oF+3Y9xsvv0c>vEfR(*u0XWVZ?BW{6% zYfLn|y3I+Sv-l^slhJO=IoJk_@XajR(%`@~HY-AB77tyglG&t2jc%oP)NXkIQWE-uLRetHkzS}lAUyDcqERs zmc;4;^|++tZ*a&2Sbq+~m`MLDy+Fmy@T30lsNv;WAHgSdfF+A{=Rv@-{Hqp9P% zYK5^xL9*BOQgNKQ&99;9EN!6u zTW+t3#P>`pSvOz%SL~T*yx@$o!3rCCN4@^0bO~M2NtoZfhf`1R_)e(ozo7zvv<9>v&*KBI}l{GL~oi^J5WV48li-S8c@=Ls^GJbvjBj(d8u^@%y#v z&kv}%ueUi)-0Vohz|i7EGwfkELOXFjp9I|a7YRfkE*ar0K(s4Y$fs;(g#zY_n;9{`-9L$1LtnsS? z`sG)5RFI&Yl=>B|&SmVn=Zd!F=TmSz^|{}O-0r{0(bobif*v}8i21_hOh+Szr6BeJ4AtHW<4gU^5{n!Kx?xCd)3Xy|&5{j2srQG~?F02BVyZ8MXo5*6D2dIjaWi z=>n}&Cy3%~U+ro?`}y*+9ZO8k{kMn^uc8)g(iL?glq`&}Z?FGndhpB+o`$$HJ{V53 z_rIPzjQ=pKXS4i*#yi^vlesM^_si+R8D;>LB*ZpWMZFES1=m9iYG5cHuI-fD=cp}o z>D%qsiHr{&Be}LU4+uRm3JYQn!obySB6{`%R}ULD_?xKZm-E&`{yR|3M0U$3*-~3X zuJ1z}lKq&==}0lq*;415O(5FKWTUDvgP0yG#x7lV%6UQt6>f_F8Gqat=j9awD|b>Y zc<%#-tmv|(8D6#@!=q2n7mT5tPVZ-+a1%RhgG0>-KdBVV z&e3lanbmQg;!L{FJ3C+0-{1f{I@XFWj)V*{9c`>MjryE+4o4H<$fwF?573pbw<%;{(ZTbrz6 ztnL)mavT=g?`WM>YJ29dP)am07+z~1rajMq!#970pO$V^cx0(TO-%y!{O<3u?Hd74 z-~zX2et=qFZ~-yZas~nAH6EEYtK$^bLbjh8cDT~)-9~iClM~$pw7}(&DWD4h@(3S$ z8*yWc09(1xPPdVH1+##O#r+Mp+1=&6WcCy~|JX|NS^C=FW#){)>Wuh8KcEzCScAb~ zIVXY<=MgE-ma&Hi&#n9~5zcuF(nZGl)c#&4BZKl|i?V6Da+>LJNjqj|i6+_1n43qS^IU+P^Z7ywWQpam#AyP|(Yz*8NW>4p#_@X4Mk*G2yRc-SGx7av z|2vnHe*PDybLBh*;d6E!V{l|2#bJlk{6+d`?~Em6+xF~u`NA72M5r1JRnhsh)RjLE zY>Qq=$9Ra=CkSV$jRqX|v~qyuK30Mpj$Nf$hx619hmuio-1d~jtcN>tymTg0obWH_ zWJb3^WfCOaf^xRNk~u0F%;DRJTAny$vD%#eYH9E5DWacEY{bYUaKaq1x)Dw{NBk+= z9iCs2d?}J&S?M^_cJp_@L34J!=0^cXP{m>#%1I90qF%Cv39NoV!;}6yt?e3iY(zSl zb`zDkHAwS?cOFT*PDkmn9?%Ik*1Ex2y=M#0Ir-yn!{M03v|ls6RPfI?Vd|&uaJp=jG6S%Accs`8H(G6_n`y(qwWd5}} zu=lZ;RS|u`$ooB72Gj*cj(j%nu)WF0DHbAGN5dZR0If-3bUienQ()>DlB+!_w5koD z1uwhcV|ECm+R%Q}F(3j#o_30(aMIe^;M281?IpG|1Yt5;Hsc_N#h+mxTkwuOH=sL? zWvP1GUsugmxvsrH-2zM;!zy+Rg+fjN)^V}J3 z7S2>mL}5Caz*fekS~!V??)aC@vF%b44B63b-ToD7P^FI?740xj9GRg=wH>x{L=pA{ zrlRh6|C@d&+^^+El~YxB&M`|M1{~diH@-cf7>bQNHvM-Gs&VM+?>~{G4h}j6tt5j6 z+{9<70z}UYCI9j`kUV+P<6#Mwd-j?2HH-G@JZHf4BRGQE!3JIabynEyWsUL927ZYc zA^$l?{$K^L&I8iLqhP>?+v)pQt#A$-f9FMb%(hQC4QBVw93J6va(|vPlQE9vbkJ!^ zUJmtJbLBt7pGS*$LfM@4x-DjNDQHPyRtCO zFxti?2uFB&9`@8PLdZ@0HYEcB5!Y8#LVHvStjB(4dsnsp_L&Gt>~#a>OaaPQfZ znzFSBz@zcqcKkR5{r%bniG1;NBH%6Ni4N;Tp_(X-D7iad*}<0?Y|9+Kb370xaMsg2 zM6AXPHs_dK!(xqtnqEnk1%atwtBcsvdS+G3n$pHI^6DRRv-Xo0jR zzLk?8{w_PzlY?UEJ40`0KBc+t@%QC6CcBQcy8amzkR23a%c5f$_Lg_H{u&-H^rkZj z4w@oU{;I$e4uWYF(V?TPEjG!*sukSh^QimMpE2s)_r)d=^KH^-(x~hx#6Dyg7vIn? zi>HV`uj%Y<=el8h+C zzC6t})nfAyWD-_ucW^cYJN)xHt23-){_+#sk>~xuT%t^$=wI#TwGG=&8wAd_ML!?i z-yTneBS7Fy_tJ*X0Ukt3L<5Ekz`h<~V;-da<$tJgGbpF)c{yB!(>j&_Z3c4sA&)Sm z<^W__*04N2$~4$t4t#nK8@h-m2MQct3k2nTy{ElXEzL#Tq?c#6tBbJpuEWLGd`@ws zI*d=Kg8|?-$(GFDup{QZu3omsaGk>0B5I|oCt{dAn8uAgt)s5L-x@B5wKQof6H@05 zAbFV2)$G(gnWjmsJ%!%wfft}A!Nfy)@Gb2+gM$c7h*$l)_v6a9bC;oAN3^&1d>>pM zOO|8ZP;ci@_BqaIyH=&1v12QfrxEa%l!5+%UZ2zSwplLgni(xBJ-D4=2o9lmUf5yp zrzV7Xy-sE1V&9HOkU1ZVU@BvID2D;4oN`Dw1Iof8_YiQUGx%lw^)n9+byvSwP=Ns6 z^Vcf@zuO)10Ilh!AAlD74$cNoWu1K$1Vwvrv(5geBMwk^cKdBM@8eUM#Y3{ymD}|N zPX^k*X*N$PvV$iP|Bf~#VmJ+szCqmHKTG@_0{7R?WW@;S4q^XuZkG+}+s=t!(ttq2 z6OL1zSRFpvJqBbtM`jbWDRh7$*=t_?va3TZ`YHRhFq}jT%~r$2wnC&~K*wFS^_f@c zOqhjQvELdA(azC&z6QpIwECq7l&wYDRu}N(WR0hd-1e@_uiKOJCeOq99jF9Fs2-!` z;RNii$EbCWjvyX`o!j!P?Zn%_^uYYP2YUfftgl(lZA3$(6z%u#BH&*6LQN7YnkClt z?zWuuM^JuK-^X!|0*0)Vl20!5Ha(qx1^o8>5)a5Hd$jtQ#vLFC&)7Ya%SJW(b8lsz z1yY~XPSQZk0N>wi7Ip6IhAx}{iXHzrhx=GhFS$>nfRkf&U)Gf36k?Yx;A zqa|ge`?ol)^F1g{bo($Fu~jS<%MJo$({JUPW-V|=PtfsImga8w2#(-5Y;Psk)_ALN8zccj(vu(k5saw8d7U-*kg*L7UKr&O#;`R zm0zexbV~AiYz*DwbTt#1b8P2uqjQ9VGn{K!+yZ0~LDO~xT&#FF4;0kGYz>D(k85RH z2zx^qnOu~Bz#3Ju+BZO99o8QI;h{FaEH?77Kc)(bJB^v3>#h`WKs_XSyh^tvlkEYj zuo%v(e}!E&*x z=p@!@K;cTk<|Y84*qeGrEW(*;3*4wDP{2>p&8@!Yh?(T6UM3Uc>#jA^zKEKFx$R)@ zrGwZ9nFiKr7QI#b&h5(hPHk?Ea~20H4xh6@%F!AG(6FX^mG^g8qCi--1JQE)08~bc3ANN9t*O@Ep}U`r2uPCop6_v@6<|g`T1>WhX!-rO z0&i(Hr8JN70md+nb_D|^{2rIF_T$Nl(hAlJuJawFiq6Yc`=$gc%wLRZo<-<@oLw&n zqH8vkI3&%rEs}MmTu5U_P(rdZHwO`iE!bvA|wK0M-Oh zI~Gi?12_-V?{(Ho&fEd?Uur*jT=7X5|MSlPI>EwL5LbhT?j(YUUB?$Ob=uVIxcD}E z@H?xhSmc1TOw`r${Cx}&W6FG;Gs&-~^BMn~b$qVFC5b698{64qjYOtCej=w8TlsE# zp*)ts6q|7DbQbhv|2R6(@~5xX)VAj?LUP8BG5|J2HqfG5c{vtdsJk}Mql{EVw=)y5A;gc^#hnv)@eW%hKc^Wyn8I@fzHnMu>N&7YoCFou)17o{QO}(qMvpDAdx&O~z}DG+qdW;skj$h~dg zhac)YhNowqqo<3c;q`>jW-_Sj;#~K!w>W9B8_Ws@6n3pXfkj)!lqmDJp%a%GZl~wq zIYcs@{U#iF3S#wuLEO>)tPt($vNCv?#DHV){f>RvyHn2Lj?j)F^%>3*0ehZsxa2yw zVch(TEZOeFbNK4*m`Cf%r+5|>!D?QQUrp;HN+B^~y&f*zh4s43Lo&uD+CwmdU&iNiz z*gPu)Pit;L1MzQcbw>wqy9t1S1h@Spd&aI4PabZ^ z&l%E_6aPH0GJ4MPczBjmSJ?JhMEfULRkR2T^E)-;NeCa05abmrzpW`=@I_}TqVwPO zBP6rrU$F->Dsllf9_S9&IpVH+U~o{$u{yDLkChQR_IrkM<=S9z_ds<_$|K61sO=s* zN93?t)-SkZ=LX?8!zR%xQrQayGI9lHxS^4zjf=bKAx|bhUXQ2nR3IIB+!)7Yy2TSo z@F8NE09hs{sg@IrdH5hgfowynWjv#oE=}e&N-nbj@TQS#IK`eeiGPu zB*Gg{J26`D97|<)R43~9Q%6rZIta4sDT_4^u6Cpl(>~v-=XrRJCs1WXhVvx-oDw79 zx9K2D85i3gJQKHW43cH^R#>yg5`N0}K09n{>F^+?=cmj)aP;|SvHtg;*T4FU|LxEJ z-(Cn2Yfb;M1&U{Fj{MF0Q*|Ns9WARw%)tmX&^|Gje{oCuWmlrd7x zq{a56)mrZ6#gxU>AUR@cl*L+Vod5s-q}5s=ARv2t&Hw-ZN=kFZ#l>P`y=rR3VtYA* zgM;2F0KI!Dw6xv;000000C};k_y7O^0b)x>L;#2d9Y_EG010qNS#tmYE+YT{E+YYW zr9XB6000McNliru=K>KBBmlTRpw<8Y1=dMKK~!ko?U>1uqc{*iL0A_m95E#d+qnJz z-#Jq55)uY?Psbd{vN34Me9A>obpMciH)IJQi)jjvX_}Vscs#P^y5RKC?C;tDWcqoF z@(flI037b&`#nLNzAXjIZy7{sz&9;aj#z@ zFHLR>*}V^07?V#fDmN%R{%d%Spn3NAWMN9 zz#6qM;dc8B!0i2%B*X}$qKyGT05zLA15rN!xC;R3TdAG0By0>U%4OaLm@^lIBA&Tp zQ7x>0n!AePmcnYNmI`N3J*;S+QIQ><2*Lq?da{zndENrR-Vy);+l4v+2leL%=Y6-z z6{{-kkh2!6(G$=-dEj{jAlgpVa)Wu_tqn_3b)HjJ)d183aVZ7B+y;O$MF5FGWy>yO zy5RwdLDZ=Cf^7g$s##dMX%PVDz?KJ4QQY6)MtXk-0Je*|sy=fP!229vMexYR2u*-$ zVYdPH zY?~W0`x_0WmAeE22@1UZ@p_^dUlm+Dgj(i zd#mGh(>&}bz_aaua=;-BmnYo0xN2QizNUspt!-(>=R6|(>1;Rx&|1?WDODT?a6@t%M8nxL?6a5XVr&z)>m0O=zwjxB zHUUx`@ayP+Kdgtk<%-6U+jVvcV0zwoU=UY;1zZdRz~vzR&~Y~Nw9|S39p>Hx&@?eg z>nD}4ghBk#0H}okQ*>z7h6Na$n8cuK2(lc2G+6-*&e;&arRa5pR|SB=8K{H+b|C2o zY?21N;z3%HaAMj>JynFFX2qoGGSCC|bIw{UAYg#f(YO#nII(Zd&7 zCFs3Kg9!nn8i4e*NBtZK0jWY3FdVaz-Oy(M{R-e>04^3_UmPp|2HsPw@ia>UbgXT~ z!FJ+d0A6DH#RYp0C!T(_y!gsw1`ehcUw-_5vlDXK=1t!Jy{*`<*5>`E_RpKq32*|O j04Kl+Z~~kFCqVx%;$et1Hb8n` z5XbonyOIhcZa9=3o4AHt%TBGMjB9lgU%(CsBc%hFeSARJN}aEhiU3C-MQXdrwRwXB z^e*?GSyEa`RL;1&B8A5^IlDXi+xb{7<#`b0$eid@6n$^z#fO>N5+d^5w$}h)c9>;L z61g{jC+5Q62I%Zc?FSrZ*}E+Jl(Agx0OnN5>3#q_D9ct49vHwP!h zM*%#@+Jz(H$HOila6Hy|Zap|4LTFi0+?z_?6a~jf?8pWHy8|~mv@KwsWp9(DD2yXT zktCN{cIpCjQD_r4GWClm&pT{7U?qquO$Tzw+g#(e99 z$!~qd+XF5<@$;Yt99AA-;Hx?~kxa);K)`($w=?#D7{JeiPsJG$DITy3mNTyb{bVhF z!y0gE9eosgrEhA0ooX@1H~Rs1SB)gLwseW^46nzZjD7T?EK-jO34@LhF8KiJ-xZ6O2z2&wQ%)Zgpt7W8$RE&; zvQ(j})vALlRh4}+1_u_k&H!Bl7G!I?5gF2zx*o&qWo_X}RY25OO+gDayMZdpdZ>6P z-C{)xh1w||TUa~ZNT>-X)yD#Uh#i7&JZWi42%Kvllm#uN?$sCqA~ErQFa#WzRWyu; z3#Fwge&Z=_z=o_=HN{Qxuv{3<#M*J;_8cklHKrXRl1vroZpI`TXlY8!t9;@PXPC~qPKD+%X|y?Y}*W2 zt^QgA+;^@OK*tqeS3d$_oO#;X?A9(=KH9zS1g z061ohxqnmK;Z6gZ3ue-YiSSRU&s#tz-Od?*%LG#EEGvw9=iY& zm}ZY@JRsWGcH9n7L0h*gI%+<50RcrsvAvdG2Y@l+nX!1F478{T z*o1(b8n+-8&>^0Gi5y4>HU}LFYCwl<2yx)EEz;lu3|Gu_OvF39(}|!$B6J%xVA6?{ zXq~7NaR)pwF5o}P3*d(UB+0ltdWKYXQkF!UB2-1aT*$sr3N4T;cez>sZJ8C}?22@2rB(I=di8R>mUW*4c&5AnUH~tE7r_4p a_#42TUxG^y^g_n~0000SOr8^{-?hq--1(vR5K}tYCI;6Xn?k-8`kVZhdLApUiIz^nWp9TQX3ixR2xgktF zAxzzU*iDT3A@> zHYKVBXi_A-+I)VLcoTx>35WDO(Y-u{y$sdn`Cyh@&sf?eeXvN+B>xb5dvUmbLNa!< z|Hb&e>t*b4GlBO_AXVV+Dg5Op|Cg<+`zid(^N0KA!^46vUwF@NJEu?ZTTXAr+^qbc z9=gta>BppM%hpf&AD>n@0u3flUhW=^uWz;jU%K3aH`5OF@$L*7hQG*qzJ79S?&>C& zI_O~c|FFNVd)^&ybnDss;8`DYc;o(H$0lRn?PwhsGjnoS@qFa|uq|}QtC9Nbz2E(~ z(bc&1CGd&eV#Yt!3lwvgJdB=!} zsdN4FB5&9F$!S?zRG@NIQty43cU=$Z%@nhT+DjGp!?}G&?GVwHhF$S-H#r2h(tgf2 zG7PmJv9)Et&hb?qa8CR(m}150of4#NcTGau`r3}k%6v6@>hiKv_~+vV|FjIlSHZ(# z%Vh@r679cb8Pd4bwoRc1c9os+qKCGN%9YhkYoVHz?|D0~7k%mcuLbQ>H5I7*V_*Ns z@}?xvvC5Vhf4y%Qlg-1^d3(7j*P={(heRVzd{GxCvx*m9BW0SP2~e-94ODo1pnmC9w_uI_?@EwAPpx*F-&J z4_SzD&lu2R($P9Hmey=9ju$bI41h_Xof7;JB*I6NDGeA7Iyqb<2IhKp&94#PUH%+0 zvM7UPPuMxrs5q`j{)0|``?MZ+U2dYibd_WH&|ww(VC>GyW#to-&6k#H6_@Zm!AC_M z?xWg4pKBcZ88$UH_BIbyL&L7D6Res&n3XWoTPi%|#}|cKe0SWn=Iy&XE9^f1<3g7~ zTGiv`G@EVM{#Z`sl>t^lVJ+{{N=nyXPyfIVhiL|4MP;^(p5@yUPvS{UzwN_7zCN6X zk|(<~zWXb!Cz(%I_EQ%=4^>$X@rT+Z6|L)YdAXww1cL=!+t_!h3ZT_naZ^RdK77*B z3UN#v)a0}*jqLkqm+hJXjZmkDfccH6RILuvNPWpA4<<0eLvD_&s{w}BXmp_aSH3@#l?K*JdbF8+K>-y>Zt15WWBQq++H6gP;mkOKZx68VINB)D~We``p z7qtG$N4u}y`AXDYY5C4Oa;H!TOH|+SXb5Uhq3WswwDzNL1zos!rPvkjm+_*E#My6{ zY`-DCO^yCNoAlUcC<`N@3@Ug1jxlO`usDfZbzj$vUeak)9+Ln(IwM|X{*%|lJigb3@RW=WU%*2@%%C2fRNZ8Wp%Tqp!OjcPFWS^#{3E zafZ>X)v>{qm4QRxOS$j-w7B{FOVQd!T=u&{q_Cp2jfUheMeM7&H&K<&YXUB){WryA z$X;pFBOlky3XkB4ITT}PJyu2;t@h;vQg;$RIz+3PG+&XV`{NqT{jZ)2y|x?p<7NT0 z{~Rq&-Nw@VQPZ$2n5gPwd;~**Svyup-bRdUc}4mb2YZ%6VAtUr@M{kb%EC2I;p+Cz z@lTbdlUo1$Fq$xB8+8kknOaclP6+1^OgqE6A@QIY5bIwzX@=pX$s#Sf92vqv(A0z) zxkBaGL7qguO8L1FfuXMO>9Gg?d`Th`*1I3{etE>9d~b5U{m=uYR*TZMe9Kp9;hnX# z5xK&ohTA0wQCw1{Sw_AQVW-dBs?xUOz2rLxXEqI3YOvtV$kD~>#LV8XU|#~IN2X%I zu`_22(6pBtM)+yEK1$#T&X5ff;lm$i4eUryeTpsH_rEDkd2 zHDK)G6e=WXoBX`VkjukqveGZT03fkn8s7*kOvT1zCVI80uif@>%;y#$9%O0=-|@!L zXVVK0Hi9U>g&}cEcF{@?7bBXq$T&Q}I14x}vD|fKm@{bCTe`uOBFavH!+ukq_sGEX zBW5DIw?sVY^(nZNgnN~v z!7Qn$5P!e*jtz#u6(LBJi@KDrRy34vyN|a7E)9BW9`7ncdUdczX@^Z3dV+(pbciQ3 zri$IdxQVgeU5n<-&5ZnMvbhbYaxSE#|HOlq)|=hKk@a1Bn!E#zXk;y`uRLoJ@aqg? z@~B#C;%C$mI0Mar%up)tO2w9gK=$|BTkMUZN&^xwVuS5Q`avk--?E9#%7?Zn4I;*@ zY#-~5&q}|v-nD4-%=F$F1M%mTYmfrn$NLFEE)22S5_195kMnR*%MIy$65R9C{Qe|T z*?0Q)zgN2b1Ys=}1DYKt4An~JE4T&S+5~n!fHkDzKMnD);Akjej^lc6%Tp^~55eKj zdp#O{GLuWWvL=|8`xILJd#q$Wla-cvowdk*JQc`8oe)Ke;$a6Ke5iQbodR{IpGu7g zg9u+FU)yP=Po%hyOz5u)de$pU5Sd{y10IG)4)Se1R0hlpk#|8bS%U%+Vk?O3L7~Ep zrn2}xN#;Li0zM~CMmPkKe2#x?d`v%_*+pu20jn}RQoQJ>P{8oHYCgWLgtq9A%KBsV zq3b;iuu^n6;_-5|#J-$evDT>YyR+aDX554_`lF*vC*HlruQ@G*D5FTb-II89!Vhj3ROyK-HwQX{FTXXXEmyAPa1C6OuR*-%eer ze3y6bngKU}ayrIAhv`Wr({A2bXHk?aHtaMy1+_sRtnH&mCl5@~Sv%+aV|gnA?2mku|Bkt5xLq5g13I2XpmHnnHb@9kDnrTjC!2v$!&}I zfZ@+|avtMnVT$J-r*urfBMi$V^-a+9`Jg{zTkBL%pfrQFL|8LltvP-gb#6d@egEh3 z&umIkdy;=U7!m}eYt-tkcKDsL z2>`pSp9!bdiZ6j&pgW}s>VXnV=?NYp#Rr_bP|#DUxDu_jV243A}+cyur#k$o%qF^HgODA86#yiWNO?k-yL4H@zQEjOOsfP{7oLQI4c z+iy1P1EHNn{xsCPFYY{u6%q)~=9Bt^R)S%idM{aGLuO!&+aS9=3rw?(nBY#hNo+!E zH?n`>TLwi9PHEY@QHzS~B@$XEaxbw6^XL2dS%;1$LO+Rf28gg4N&zv1;hg1SSXi}2 zY$p+m^7-z5QtZ94@Lc@EjvW-?)q#s;tDN&BS!vzv{!aL@BACY$s)@s}9QNX5k#%3- zivS9fZ_<=c+RPX5Lvo|`7=+xg*9Qp6*4_qZr7np5RbD!> z_6_ea2#u98n0l&}nUpwDheU@TvT2vYkt~P*A6h=z$nFW*4J?@D6%K-hyV2lp-;1X_} z!lF@|TIFBCM4JN<-#8q!Y!HdN?B{|W2%%A@Gzy@r{F(G1JTH2J_FfIaxGSuP5 zPKOR|4XFQ|0*HX=?2^&2I2hYv*LgoYf`n?d#FYRl=45l6m-O3iKsbQ1LYWUBK`d zaN^%FTnNOqJyAT=&{2UG6xz(1smjqeYm|Y1-l#ynIuT|lRC=O@h zQG2cs#>ma2;8BWTf31kdNh^%%VQu9UuLfQ8D9kkeLl)#0Rnkfu#jR*mwV2VOe+9XG z7a*o3!rTP>4N}Muf~#@Q79PWa73iRhPJIeIa4AMz0j#gK6K6sqF<#;D*}UfZtYT(_@P_VDIP-Tm^_Q7n;pGmj@2=;*E^sFhjKsRC$o zE4to;?a99A!L)sWZcgKJYn?A9FlL2&%SWv?A5N%l$lh~FXv7C$eA7!mrwC)DqO^|0 zU^H{%{>L0=%!xI?=T0D-dwkVGk}1?(JjQB^c9gTh$P~hIUYtEH*Qmqn>SZ8cF?Wmk zC5EwhdZs*JuIPw=Duj&-Ki-E}B2aTnwuHOdJ~^2{LQ&eH|0h^1$NPEc6@*-68GEOI z>Rm1+TxMExG6av8jV-4M_)kyYZ!8DZbPlx-Rj`8FlSKHjL@jfYuEope3i<5rx1mJy z>5tcCaVCzPsN(AF1cF!^CzC;jq0U$p!}!J)MM?)%FL67Oj{>AWgD)VIDNUt`V~)a~ z>{d$5{>4*9{;N>Sth-wgJprR=E9s;6{PUA)gIybmCg=}kj}@N{vG?wzQHRXbRbyO7W+}!OU?QmaqY%!pk{xCcxAHZhy}VJAIdE zN=0eng6pKD7u10AIwGYpj7P58nb&r)&5~VQp|xMupvaGkGsSFXDY(NFh{RKl`6)GD z67eJ!iG&R?@A>wKwkWm-l{o(Q#bbXN6BQ4|(EBoed7 zBbd4xlgeBYzj1UNQ? zuXw0Agjtuktk)@h#oWgiUxw8^UjCD1`9)(Gsf?TmAI$8NmXp6m+av$Wij;tmOr8$+shBWQbTG%MB+vA%_ zW=x!Db`M$#g_u@&&P!0s-htW?)gZ`qAW>hdx!jtCUejRYj&b4N0_dDFCY!atj33LCFv z)$Or2A5_&}gaCpKoY1m(2EbLH6fR|d(4O{_<7IVjVVU%s)m{Z(Zc?ug0hVi=*aCr+V9C~6UQ6HPg2_C>6& zBB;r{)q@tEmU_>m>m}auVp^H#uPgQ>Z~d@%3)ofN8hF;8oe{zkA_iTQbHhaA>bgut z@8s7J*u88zNWfu92=Ocp?mw9f@H-alalQArL!4}?LX{voQA{u9%TvN-SX)-zp&nxZ zKxkPG52a%P=9C}m{nOgrx>8G)BK5QdlQPVfDp~gZEB*GQC~b@%${wn5LI7zA2Z}D^ z3TAq;F_9V}RtBkt{JZ;z zKW*gNO#I8>Bm zffL?-;CXJ4Kctig+ zND7SLAEctDLBRC&5*aHR`Grc|b9HAGWxsuZ0Z?vP;#A8@i)ohH01kpk{EXOWdrDs6 zmb#m|Zen`A^)&6DZ%61zfA@0bk{0p)ag8w$l95>aTW&fE+rMoRUT2pdGfd>MP>kDd3=^RE9 z*D9kPoUmLrmv_YYcI#)ZB26Eo8cAw`FTW+rxf{+e8{zBC#hEA5C~baLAVHMry8*B+ zF6v@Fi{b8;#=B7%mkvaQFmVolnnxvzJU-D#jS}L6{O(qBZ?q{qaFW$PF`Ev%`HK|6 z^4H|h0nS6d2x-m2z6qd-VSz*EyZFx4T%1S7bx9<39beO%jowa1(K&RLuL&wRm}=1I z4}4i8t8?@Pm7CHq$W#(r@K`VrnhLo0XkLbk zvS6Y_U(7-!(IdOGlr8Mu=&ls872ub$@gVdPu0dT^EXyV!VVxw#@QiqnoyLzH0)daR z$-r=Ay-=pWI#9vgzDl)tc78-G_sqQ`aXU0@mI5ACq(X>|B?tkVz~m}X&#zL`dicQJ zHZmlPCwrrmip}SkW=;Z6=4Hf)^RhXzi|xT4?s9E6$I<0mlTAuS+nb4k+NRR$BCq>p zwi|NZv^O>!yx8O%ip|OjVxx5G8|3^b)0KY!ndXWKjY*rZ_5i(~0s??vH55;&%(D1P-Lntlohwc?+?99PNm}dNnu=?uWEN+6%}?uPd=p%cUw) z*-bi9fqvtR9v;vHx-n8Hj+Su4NdT|-@%quG(bWJcc)fB}oXkpIXL)binO)wxuP9+C zHqI!^B$~R{`u1EFNrav>hRGXpQy*N0jh^_)WtVsN60742aGW;7#k~ z+gVYc(PEByY>wcWYxkf06%96@MF7yvBXY_%28Sj7&Qq39H`O}AbL0QmLj3f5>Ep^t z@V$-Gs95TRH0c@SOYuIStVp9(r?+Iye`3#K2gf#HGi7sHyHnG8R7ZGKKD&=KX7rkl zKlge+`y4WgO$+E04Fb+;iZW^4Kc7*p;2ZKgzbEN1rN49(Jpa?uSTNC2Zn}}A+QLrc z#v>i(cA%f@zE7V|%vNFcrJ?zB=tq(C+oQjSj&mxrkIIctY?-U^G&D#CFb{V__?Kfa zvg8{G-CJqsm~`G{E}Rcg<8}-Pp7p?cuDTIlAgjG$j$n%UYIIas1pOkny_klG6KDNQ z)f3QKQ%+3H|J6@Tr>l#CA0he}M5iD!f1=F~=3sr|=Nz<12Vw^QVC^~NB83M;zV@Rf zLe(hj7v3oMsH*YlntK#!iQfFG@HLZH;^JNal0slj8_O)VIt0=-G^cdXE(SSl|U5Q!J@VsD|PThmK1K~h3?DQ z=Yhb3lf)N%-qRP}%a_S8T1%Wj(q~pIuf2P21uFCZY-AI-sTgM(&f zowl}vX1;GjLPFNq0iC|=jg4#nZT>I3>#J}71E86T0t^s|PNVo=gXyHG?+O6$F#cZw zy-K7!{u43Wl+@%f_E884$#9HBXWRc%;*?<0+W$G(pG{NF*>I5bey%?5f}*>_0W&$mF$M{4c*=b!JMV?n9?f05yTXPSB(M4%2|aw3-w>7iDaXh<@} zhL1rd*0q52;U@fPItdR!oZ4H!72i~GYg-R05HU#G)9}WJ+KO6~^yXc0iYohI3IL%- z45_fX%o|_m5I(Ybu7Je($1wnw{IMbW2PU`H$a*Uj2iRpgr*dqMbsiY`j@)w|{qEfd zY3P0sD2l&Obx!+spHCCL!U!LTXgr#@d~cIpq$}$PN&b4s>%@GKmo%csf04V{L^I@! z%J;Ejg|5ksf&@C=(7Nrsl*SE>*TPyzj}+W%-9@27+G$Y&IMf}5k7Sh*uUX&g69XyC z=57FPIn4^>;l-gOu16sWoxd~!h(&B1kqMW79e!fx^kDE^6Q1%7&B;w9pKum# z;S_EuCe^rLjqi#Lhhd}o5iZhZ8MS8_?bHZ$phF~)(HdER+Y{s2IUBmi3fzFm;__{r zng{KVn`Q$S%^I<hJx8UTe5lk9 z0Mt_!!4kiWm{*XA?$bS#e7ukjv>%cXz#T3>evMwcZgC!A=K0#BVatC?jNJCUdzb!TKw5Qw5}UfN}!7o0yz6Uo5cphsMS@obiT3QmADtS zvNAGh<-c9Ad?1Ku-zpao%`$IKo3Io)x8=1ftF@kFK1^efl9G z7l<9E0wn{SN4B8Zu9l)k+I(I7-mYP%SdYfq7o`GkpPcXeTw1ZYEJYE34X_SM>363J zggD0L0U*EuXnq6pM5A@@grzarl*laRD^} z1;t$it@eG4nxama>Xh}I^A=0VoW(k^)#HGz!{5<{F;A`Y^`~E=*{+te+EC1K^ifI+ z!7)ebt$kXpAQ5_`_UMj&#%0g9UhG{IfK$1-_o+Trc_GRai;L2iE`W$+1(yOh$>!K7 z6mZMt@1@~i;=#(a1pp*!#G=s910V^PC7+hl(YJg%(=YDqa$80*KkR>N{3tEba;v;@ z05z-pe2J`KUq^50XQwU&vGe>$PI83 zWm;@YmcJ@)$}t2Pn}GGO$AvuPwJ*E>~1q`419Ww-_#q ze3wL*;!-AO_IojOy4QJS10DJIP64pmg#|EL!k+M$R^aHjMr*o|`!7#)1LC z;cho7SD4t9lZD@~q3S32;tBY=c#BE@{X!71_Xp}tNvDF1HuAd_y*Bnd)qbEFeJ3sW zHAejVp_fQ%86WUvw^so|`gx1Yp!$zoQ_cOLs4qDMfVI%9Xizh?zj;`!OC5&5aqLjc ziCscD{XOs<`*gBd91tOF<^EXFmoD_aRU3-dRJW%eQpXl>&BrFM0Gw`b=%!Xgt4n@b`=G(8~SmdxNU{k+l?|pfA9_hpm_I# znSs7!aK~alhD2d!aGYJZpH>fRgc%Jt;VUFi#GO3ftTFxtA7$7dGOz1L(6^6iD4BBc z1X?G8vfZrYI4$@`+K+XPrY(4MPWOImTC)=i0G>%ptrNKc{HDtQnwWBh$Eed(+$1L` zzb-K(7qu8_rchk`QBu=oyL8Tsa|tieWpVR0sO|!w4)

l~%vb_EWmcv`};L+<41- z!c)J6Ul!q01yYB1&INHDm0dvh-FjS`RBvTiaC~^d-eOvz>k4lQ;&p0sg&oZ#pLvEi zYw(}`K3{F0ptQa!uf?jHyha6?0RI2-ROybYzHWhI2%YTUzgrDZl2eD($e0BG5A$eQ AS^xk5 delta 1951 zcmbW2`8Sk{1IFKXR*A8uX;d>qDotVROUxt{LYAyE_Q+gvxw(bZ`%>MBp$rpO2w7@I z7z(+TM%kA*mdP#4a9ilwS|~C4_Wc*`InO!IIiK_V@cHez?>MNCj+aLv0RTvT8O-}x zdYK`+4WWc^CItYn3_F`6r(^RLvYR8{7%O(J$d(AMPuyUxN08HOAZD{t>PYkkV)ckA za}N1%GeN}nz35cWK;3{B9jTI%7qo@YUFqQ_VF-kQF3^hK2EO%2s* zA7f%9-+9HJ@4J|p-H~QB?hHv;vaOA?N&pl(HL=yi;!tnH%n-sD-xQ2f8Chb({jVD< zTYR&KJ)i0`dicnQPYKv3DoD}u1!+ySy!@TAs@CUHWntVS+2!mLF5MD2V^UPwi~R2= zlXg7>jHPc~Vrm}t3WCsWw%QSCMzM;!0clXkX4j#~w4;gY(e7DGDM{c(E4p~42TCA2 z>UhYC$8}O>?tgc5*D^&=m%%)bnR*i$b3(AauX^z6srh6@zeKu} zJl8{^H&uiaqegLY7W?wSv7*uS&lSpLNTz?eNiC&d*KbT}5P*^<;N-w8rX-u!tm42=Krr{Ong5qjs{Q|+_$@d^-Ij8!c&6<9gUZLC6O z420L!54_4+KbMC;CF_6<(%1PbEbyy6x5MdTb(xYfz(13*tR{JO zwI;+QVLEBJcH#GE3n;AaVagd2;+!=STc@jGqHJFK>M>HP<*FR%#Ql)4Y*drk^Rvx1!ij<4AIz!9K< zky{N`LY@;$;6n%0F?}VqvNukvJSfc=fp5oIdL4cnndNH04d8Wz?%7_dSC-^B>&(w8 zSypU<{ z8U^y&iUd6Dyqa>Kb5aRGyBa-ms1Ss6A8ZjE(aZnmevaEPi+*5B&W!rRfy7lcCpfO; z-GS?0(;Zz-b~nw!`P;mAY^yOnDS3NBGk+iu+Sa$nCB{a)pLf#8u%3LPp?UrMEAQxN z%`tUjHOGH#dwR+DLQ4nJ*1((@H-N^z(KWKQil^1bykdKY7Lf~Z+WqC0ml#-*+d5FY z0Bj`+1KIqpkiASgraV7631x=JCJ z2;V+yn=lphJh1Qo_n7W0Gcf}PhyEF_99jMZe(F1(rZd&mT&tD zT@dc|PHn|%`q>h$y6fK;#nUZPuM}5YL$^hR#nufqFf=^wus=du1(s^SCnsc!3F*C3 z&VWptsfy-MdlPDrVm_OT9edW1G8VXxJpkpr4B=H0i+Y<4%5vy@a3#Ir4ChIaXe zYIK42DdY@Po4rf{{arRG@ILF+dL)l?_g;Zq%*5#uuAlR0^Zwne?Uu);CK@9#XX^e2 zgNUTVcK)m?#@9t_f8!68n<%SJ)TR|anbS{fx~%jd*XTZ4 zk@&f<47++%0bQzyihUE{e;OfaEct656EP~r`au}UczVUFHBm1RTRk^Du>V+Lc9Z<9 z*}lCy#cLnJ7B0^gr5nS;pPlmaG`_)J7lC~5fkiOtSlTFjkEUhzFp=etvd6?A*e|rH ziW}x(JsPBNkQz?(hZS6tPqVsMlF2E#kpGR{pkI@ADaapJ$}j-MwuV?-WC4_i54p1MzYjY6Al-@1R| jHUtUy57{(C002kYdQ@0+Qek%> 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 Date: Fri, 17 Feb 2023 13:09:39 -0500 Subject: [PATCH 15/29] Sync some unlabeled graphics --- graphics/battle_anims/sprites/black_ball.pal | 19 +++++++++ .../unused/line_sketch_2.bin | Bin .../battle_anims/unused/line_sketch_2.pal | 19 +++++++++ .../unused/line_sketch_2.png | Bin .../unused/spinning_ball.png} | Bin .../unused/spinning_ball_2.pal} | 0 .../unused/unknown_1.bin} | Bin .../unused/unknown_2.bin} | Bin .../unused/unknown_3.bin} | Bin .../unused/unknown_4.bin} | Bin graphics/interface/blank2.pal | 19 --------- graphics/link/gba.pal | 19 --------- graphics/{link => trade}/gba.png | Bin graphics/{link => trade}/gba_pal2.pal | 0 graphics/unknown/unknown_D035A0.png | Bin 156 -> 0 bytes graphics/unknown/unknown_D0CAC8.bin | Bin 32 -> 0 bytes include/graphics.h | 6 +-- src/graphics.c | 38 +++++++++--------- src/learn_move.c | 6 +-- 19 files changed, 63 insertions(+), 63 deletions(-) create mode 100644 graphics/battle_anims/sprites/black_ball.pal rename graphics/{ => battle_anims}/unused/line_sketch_2.bin (100%) create mode 100644 graphics/battle_anims/unused/line_sketch_2.pal rename graphics/{ => battle_anims}/unused/line_sketch_2.png (100%) rename graphics/{unknown/unknown_D06D80.png => battle_anims/unused/spinning_ball.png} (100%) rename graphics/{unknown/unknown_D06D80_2.pal => battle_anims/unused/spinning_ball_2.pal} (100%) rename graphics/{unknown/unknown_D0CA04.bin => battle_anims/unused/unknown_1.bin} (100%) rename graphics/{unknown/unknown_D0CA28.bin => battle_anims/unused/unknown_2.bin} (100%) rename graphics/{unknown/unknown_D0CA4C.bin => battle_anims/unused/unknown_3.bin} (100%) rename graphics/{unknown/unknown_D0CD0C.bin => battle_anims/unused/unknown_4.bin} (100%) delete mode 100644 graphics/interface/blank2.pal delete mode 100644 graphics/link/gba.pal rename graphics/{link => trade}/gba.png (100%) rename graphics/{link => trade}/gba_pal2.pal (100%) delete mode 100644 graphics/unknown/unknown_D035A0.png delete mode 100644 graphics/unknown/unknown_D0CAC8.bin diff --git a/graphics/battle_anims/sprites/black_ball.pal b/graphics/battle_anims/sprites/black_ball.pal new file mode 100644 index 000000000..57e320140 --- /dev/null +++ b/graphics/battle_anims/sprites/black_ball.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +156 205 98 +156 205 98 +156 205 98 +131 205 131 +156 205 0 +24 0 106 +156 8 98 +0 213 131 +24 197 0 +164 8 106 +156 8 98 +164 8 106 +156 205 131 +24 213 98 +156 8 106 +164 205 98 diff --git a/graphics/unused/line_sketch_2.bin b/graphics/battle_anims/unused/line_sketch_2.bin similarity index 100% rename from graphics/unused/line_sketch_2.bin rename to graphics/battle_anims/unused/line_sketch_2.bin diff --git a/graphics/battle_anims/unused/line_sketch_2.pal b/graphics/battle_anims/unused/line_sketch_2.pal new file mode 100644 index 000000000..17cce5c65 --- /dev/null +++ b/graphics/battle_anims/unused/line_sketch_2.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +0 0 0 +0 0 255 +0 255 255 +148 255 255 +148 205 255 +148 156 255 +0 0 0 +0 0 0 +0 0 0 +255 0 8 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +255 255 255 diff --git a/graphics/unused/line_sketch_2.png b/graphics/battle_anims/unused/line_sketch_2.png similarity index 100% rename from graphics/unused/line_sketch_2.png rename to graphics/battle_anims/unused/line_sketch_2.png diff --git a/graphics/unknown/unknown_D06D80.png b/graphics/battle_anims/unused/spinning_ball.png similarity index 100% rename from graphics/unknown/unknown_D06D80.png rename to graphics/battle_anims/unused/spinning_ball.png diff --git a/graphics/unknown/unknown_D06D80_2.pal b/graphics/battle_anims/unused/spinning_ball_2.pal similarity index 100% rename from graphics/unknown/unknown_D06D80_2.pal rename to graphics/battle_anims/unused/spinning_ball_2.pal diff --git a/graphics/unknown/unknown_D0CA04.bin b/graphics/battle_anims/unused/unknown_1.bin similarity index 100% rename from graphics/unknown/unknown_D0CA04.bin rename to graphics/battle_anims/unused/unknown_1.bin diff --git a/graphics/unknown/unknown_D0CA28.bin b/graphics/battle_anims/unused/unknown_2.bin similarity index 100% rename from graphics/unknown/unknown_D0CA28.bin rename to graphics/battle_anims/unused/unknown_2.bin diff --git a/graphics/unknown/unknown_D0CA4C.bin b/graphics/battle_anims/unused/unknown_3.bin similarity index 100% rename from graphics/unknown/unknown_D0CA4C.bin rename to graphics/battle_anims/unused/unknown_3.bin diff --git a/graphics/unknown/unknown_D0CD0C.bin b/graphics/battle_anims/unused/unknown_4.bin similarity index 100% rename from graphics/unknown/unknown_D0CD0C.bin rename to graphics/battle_anims/unused/unknown_4.bin diff --git a/graphics/interface/blank2.pal b/graphics/interface/blank2.pal deleted file mode 100644 index 4b0812f09..000000000 --- a/graphics/interface/blank2.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/link/gba.pal b/graphics/link/gba.pal deleted file mode 100644 index 64a442293..000000000 --- a/graphics/link/gba.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -222 230 238 -189 205 230 -156 180 222 -131 131 139 -98 98 123 -65 74 106 -41 49 90 -230 230 230 -205 205 205 -180 180 180 -156 156 156 -213 180 106 -205 156 82 -49 255 106 diff --git a/graphics/link/gba.png b/graphics/trade/gba.png similarity index 100% rename from graphics/link/gba.png rename to graphics/trade/gba.png diff --git a/graphics/link/gba_pal2.pal b/graphics/trade/gba_pal2.pal similarity index 100% rename from graphics/link/gba_pal2.pal rename to graphics/trade/gba_pal2.pal diff --git a/graphics/unknown/unknown_D035A0.png b/graphics/unknown/unknown_D035A0.png deleted file mode 100644 index 0b2ae80f99e094b6f95db5de80c193783097aa58..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^93afX3?$7I7w-U41_3@HuK)l4XZZjB=>PwQ99c*I zpZ)g#EQ8?`pd>EvEmq(NP)^;`#W93qX0ibr6I*g}nlM{3Gjlpya+;Vhn*#F@CP6hd dhsgBwWQO8eHm-Nu=NE#E^K|udS?83{1OQ{oCIJ8d diff --git a/graphics/unknown/unknown_D0CAC8.bin b/graphics/unknown/unknown_D0CAC8.bin deleted file mode 100644 index 15379a9ceae794c6755d5198ba223866efd6138a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32 kcmWeoU;u-f2lb!od5r3d>KM2g80A?G7_bX4{;y{M0C$E5-v9sr diff --git a/include/graphics.h b/include/graphics.h index 3fe55401c..065132441 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4837,9 +4837,9 @@ extern const u32 gFile_graphics_misc_confetti_sheet[]; extern const u32 gFile_graphics_misc_confetti_palette[]; // learn_move -extern const u16 gUnknown_8E97DDC[]; -extern const u32 gUnknown_8E97DFC[]; -extern const u32 gUnknown_8E97EC4[]; +extern const u16 gMoveRelearner_Pal[]; +extern const u32 gMoveRelearner_Gfx[]; +extern const u32 gMoveRelearner_Tilemap[]; // shop menu extern const u32 gBuyMenuFrame_Gfx[]; diff --git a/src/graphics.c b/src/graphics.c index 480213bba..4eab25e87 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -69,8 +69,7 @@ const u32 gBattleAnimSpriteGfx_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpritePal_BlackSmoke[] = INCBIN_U32("graphics/battle_anims/sprites/black_smoke.gbapal.lz"); const u32 gBattleAnimSpriteGfx_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.4bpp.lz"); - -const u32 gUnknownGfx_8D035A0[] = INCBIN_U32("graphics/unknown/unknown_D035A0.4bpp.lz"); +const u32 gBattleAnimSpritePal_BlackBall[] = INCBIN_U32("graphics/battle_anims/sprites/black_ball.gbapal.lz"); const u32 gBattleAnimSpritePal_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Glass[] = INCBIN_U32("graphics/battle_anims/sprites/glass.4bpp.lz"); @@ -128,9 +127,9 @@ const u32 gBattleAnimSpriteGfx_Lightning2[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_Lightning[] = INCBIN_U32("graphics/battle_anims/sprites/lightning.4bpp.lz"); -const u32 gUnknownGfx_D06D80[] = INCBIN_U32("graphics/unknown/unknown_D06D80.4bpp.lz"); -const u32 gUnknownPal_D06DC4[] = INCBIN_U32("graphics/unknown/unknown_D06D80.gbapal.lz"); -const u32 gUnknownPal_D06DD8[] = INCBIN_U32("graphics/unknown/unknown_D06D80_2.gbapal.lz"); +const u32 gBattleAnimSpriteGfx_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.4bpp.lz"); +const u32 gBattleAnimSpritePal_SpinningBall[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball.gbapal.lz"); +const u32 gBattleAnimSpritePal_SpinningBall2[] = INCBIN_U32("graphics/battle_anims/unused/spinning_ball_2.gbapal.lz"); // old battle interface data, unused const u32 gOldBattleInterfaceGfx[] = INCBIN_U32("graphics/unused/obi1.4bpp.lz"); @@ -253,12 +252,13 @@ const u32 gBattleAnimSpritePal_Bell2[] = INCBIN_U32("graphics/battle_anims/sprit const u32 gBattleAnimSpriteGfx_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.4bpp.lz"); const u32 gBattleAnimSpritePal_PinkGlove[] = INCBIN_U32("graphics/battle_anims/sprites/pink_glove.gbapal.lz"); -const u16 gUnknown_D0CA04[] = INCBIN_U16("graphics/unknown/unknown_D0CA04.bin"); -const u16 gUnknown_D0CA28[] = INCBIN_U16("graphics/unknown/unknown_D0CA28.bin"); -const u16 gUnknown_D0CA4C[] = INCBIN_U16("graphics/unknown/unknown_D0CA4C.bin"); -const u32 gUnusedGfx8bpp_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.8bpp.lz"); -const u16 gUnknown_D0CAC8[] = INCBIN_U16("graphics/unknown/unknown_D0CAC8.bin"); -const u32 gUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/unused/line_sketch_2.bin.lz"); +const u16 gBattleAnimUnused_Unknown1[] = INCBIN_U16("graphics/battle_anims/unused/unknown_1.bin"); +const u16 gBattleAnimUnused_Unknown2[] = INCBIN_U16("graphics/battle_anims/unused/unknown_2.bin"); +const u16 gBattleAnimUnused_Unknown3[] = INCBIN_U16("graphics/battle_anims/unused/unknown_3.bin"); + +const u32 gBattleAnimUnusedGfx_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.8bpp.lz"); +const u16 gBattleAnimUnusedPal_LineSketch2[] = INCBIN_U16("graphics/battle_anims/unused/line_sketch_2.gbapal.lz"); +const u32 gBattleAnimUnusedTilemap_LineSketch2[] = INCBIN_U32("graphics/battle_anims/unused/line_sketch_2.bin.lz"); const u32 gBattleAnimSpriteGfx_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_BlueLines[] = INCBIN_U32("graphics/battle_anims/sprites/blue_lines.gbapal.lz"); @@ -274,7 +274,7 @@ const u32 gBattleAnimSpritePal_RedTube[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpritePal_Amnesia[] = INCBIN_U32("graphics/battle_anims/sprites/amnesia.gbapal.lz"); const u32 gBattleAnimSpritePal_String2[] = INCBIN_U32("graphics/battle_anims/sprites/string_2.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D0CD0C[] = INCBIN_U32("graphics/unknown/unknown_D0CD0C.bin.lz"); +const u32 gBattleAnimUnused_Unknown4[] = INCBIN_U32("graphics/battle_anims/unused/unknown_4.bin.lz"); const u32 gBattleAnimSpritePal_Pencil2[] = INCBIN_U32("graphics/battle_anims/sprites/pencil_2.gbapal.lz"); const u32 gBattleAnimSpritePal_Petal[] = INCBIN_U32("graphics/battle_anims/sprites/petal.gbapal.lz"); @@ -1154,9 +1154,9 @@ const u16 gFireRedMenuElements1_Pal[] = INCBIN_U16("graphics/interface/dex_caugh const u16 gFireRedMenuElements2_Pal[] = INCBIN_U16("graphics/interface/pokemon_types.gbapal"); const u8 gFireRedMenuElements_Gfx[] = INCBIN_U8("graphics/interface/dex_caught_pokeball_and_pokemon_types.4bpp"); -const u16 gUnknown_8E97DDC[] = INCBIN_U16("graphics/interface/learn_move.gbapal"); -const u32 gUnknown_8E97DFC[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz"); -const u32 gUnknown_8E97EC4[] = INCBIN_U32("graphics/interface/learn_move.bin.lz"); +const u16 gMoveRelearner_Pal[] = INCBIN_U16("graphics/interface/learn_move.gbapal"); +const u32 gMoveRelearner_Gfx[] = INCBIN_U32("graphics/interface/learn_move.4bpp.lz"); +const u32 gMoveRelearner_Tilemap[] = INCBIN_U32("graphics/interface/learn_move.bin.lz"); const u16 gNamingScreenKeyboard_Pal[] = INCBIN_U16("graphics/naming_screen/keyboard.gbapal"); const u16 gNamingScreenRival_Pal[] = INCBIN_U16("graphics/naming_screen/rival.gbapal"); @@ -1386,11 +1386,11 @@ const u16 gCreditsCopyright_Pal[] = INCBIN_U16("graphics/credits/copyright.gbapa const u8 gCreditsCopyright_Tiles[] = INCBIN_U8("graphics/credits/copyright.4bpp.lz"); const u8 gCreditsCopyright_Tilemap[] = INCBIN_U8("graphics/credits/copyright.bin.lz"); -const u32 gUnknown_8EAEA00[] = INCBIN_U32("graphics/link/gba.gbapal"); -const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/link/gba_pal2.gbapal"); -const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/link/gba.4bpp"); +const u32 gTradeGba_Pal[] = INCBIN_U32("graphics/trade/gba.gbapal"); +const u32 gTradeGba2_Pal[] = INCBIN_U32("graphics/trade/gba_pal2.gbapal"); +const u32 gTradeGba_Gfx[] = INCBIN_U32("graphics/trade/gba.4bpp"); -const u16 gUnknown_8EAFE80[] = INCBIN_U16("graphics/interface/blank2.gbapal"); +const u16 sEmptyPal[16] = {0}; const u16 gBerryCrush_Crusher_Pal[] = INCBIN_U16("graphics/berry_crush/crusher.gbapal"); const u32 gBerryCrush_Crusher_Gfx[] = INCBIN_U32("graphics/berry_crush/crusher.4bpp.lz"); diff --git a/src/learn_move.c b/src/learn_move.c index 098f90ea0..7c4f163f4 100644 --- a/src/learn_move.c +++ b/src/learn_move.c @@ -400,9 +400,9 @@ static void MoveRelearnerLoadBgGfx(void) SetBgTilemapBuffer(1, sMoveRelearner->bg1TilemapBuffer); LoadUserWindowGfx(0, 1, 0xE0); ListMenuLoadStdPalAt(0xD0, 1); - LoadPalette(gUnknown_8E97DDC, 0x00, 0x20); - DecompressAndLoadBgGfxUsingHeap(1, gUnknown_8E97DFC, 0, 0, 0); - CopyToBgTilemapBuffer(1, gUnknown_8E97EC4, 0, 0); + LoadPalette(gMoveRelearner_Pal, 0x00, 0x20); + DecompressAndLoadBgGfxUsingHeap(1, gMoveRelearner_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(1, gMoveRelearner_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); SetGpuReg(REG_OFFSET_BG0VOFS, 0); SetGpuReg(REG_OFFSET_BG0HOFS, 0); From 46a38eb3f49a2a59b433a7a1ed931dfb32caf5d1 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Mon, 27 Feb 2023 12:51:03 -0500 Subject: [PATCH 16/29] Let scaninc/preproc ignore empty asm files --- tools/preproc/asm_file.cpp | 4 +++- tools/scaninc/asm_file.cpp | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index 7756cadc5..2fc573c81 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -40,6 +40,8 @@ AsmFile::AsmFile(std::string filename) : m_filename(filename) if (m_size < 0) FATAL_ERROR("File size of \"%s\" is less than zero.\n", filename.c_str()); + else if (m_size == 0) + return; // Empty file m_buffer = new char[m_size + 1]; @@ -72,7 +74,7 @@ AsmFile::AsmFile(AsmFile&& other) : m_filename(std::move(other.m_filename)) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } // Removes comments to simplify further processing. diff --git a/tools/scaninc/asm_file.cpp b/tools/scaninc/asm_file.cpp index 109e604a2..d2cc624ee 100644 --- a/tools/scaninc/asm_file.cpp +++ b/tools/scaninc/asm_file.cpp @@ -36,6 +36,11 @@ AsmFile::AsmFile(std::string path) m_size = std::ftell(fp); + if (m_size < 0) + FATAL_ERROR("File size of \"%s\" is less than zero.\n", path.c_str()); + else if (m_size == 0) + return; // Empty file + m_buffer = new char[m_size]; std::rewind(fp); @@ -51,7 +56,7 @@ AsmFile::AsmFile(std::string path) AsmFile::~AsmFile() { - delete[] m_buffer; + if (m_size > 0) delete[] m_buffer; } IncDirectiveType AsmFile::ReadUntilIncDirective(std::string &path) From 4bf48cf21151f246ca6bcb277f7d3b5b2c0ccbf6 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 28 Feb 2023 11:18:49 -0500 Subject: [PATCH 17/29] Add hidden item constant usage --- include/field_specials.h | 8 -------- include/global.fieldmap.h | 33 ++++++++++++++++++++++++++------- src/field_control_avatar.c | 8 ++++---- src/field_specials.c | 18 +++++++++--------- src/itemfinder.c | 4 ++-- 5 files changed, 41 insertions(+), 30 deletions(-) diff --git a/include/field_specials.h b/include/field_specials.h index 7bc1e6ad1..b5d1f5c7f 100644 --- a/include/field_specials.h +++ b/include/field_specials.h @@ -3,14 +3,6 @@ #include "global.h" -enum HiddenItemAttr -{ - HIDDEN_ITEM_ID = 0, - HIDDEN_ITEM_FLAG, - HIDDEN_ITEM_QUANTITY, - HIDDEN_ITEM_UNDERFOOT -}; - u8 GetLeadMonIndex(void); s32 CountDigits(s32 number); void TV_PrintIntToStringVar(u8 varidx, s32 number); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index 079b0a4b6..dad5e1d62 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -50,6 +50,31 @@ enum TILE_TERRAIN_WATERFALL, }; +// Identifiers for the hidden item data stored in BgEvent's u32 hiddenItem +enum +{ + HIDDEN_ITEM_ITEM, + HIDDEN_ITEM_FLAG, + HIDDEN_ITEM_QUANTITY, + HIDDEN_ITEM_UNDERFOOT +}; + +// Masks/shifts to read the data above from the u32 hiddenItem, calculated from size. +#define HIDDEN_ITEM_ITEM_BITS 16 +#define HIDDEN_ITEM_FLAG_BITS 8 +#define HIDDEN_ITEM_QUANTITY_BITS 7 +#define HIDDEN_ITEM_UNDERFOOT_BITS 1 + +#define HIDDEN_ITEM_ITEM_SHIFT 0 +#define HIDDEN_ITEM_FLAG_SHIFT (HIDDEN_ITEM_ITEM_SHIFT + HIDDEN_ITEM_ITEM_BITS) +#define HIDDEN_ITEM_QUANTITY_SHIFT (HIDDEN_ITEM_FLAG_SHIFT + HIDDEN_ITEM_FLAG_BITS) +#define HIDDEN_ITEM_UNDERFOOT_SHIFT (HIDDEN_ITEM_QUANTITY_SHIFT + HIDDEN_ITEM_QUANTITY_BITS) + +#define GET_HIDDEN_ITEM_ITEM(raw) (((raw) >> HIDDEN_ITEM_ITEM_SHIFT) & ((1 << HIDDEN_ITEM_ITEM_BITS) - 1)) +#define GET_HIDDEN_ITEM_FLAG(raw) (((raw) >> HIDDEN_ITEM_FLAG_SHIFT) & ((1 << HIDDEN_ITEM_FLAG_BITS) - 1)) +#define GET_HIDDEN_ITEM_QUANTITY(raw) (((raw) >> HIDDEN_ITEM_QUANTITY_SHIFT) & ((1 << HIDDEN_ITEM_QUANTITY_BITS) - 1)) +#define GET_HIDDEN_ITEM_UNDERFOOT(raw)(((raw) >> HIDDEN_ITEM_UNDERFOOT_SHIFT) & ((1 << HIDDEN_ITEM_UNDERFOOT_BITS) - 1)) + typedef void (*TilesetCB)(void); struct Tileset @@ -133,13 +158,7 @@ struct BgEvent u8 kind; // The "kind" field determines how to access bgUnion union below. union { u8 *script; - struct { - u32 itemId:16; - u32 hiddenItemId:8; // flag offset to determine flag lookup - u32 quantity:7; - u32 isUnderfoot:1; - } hiddenItemStr; - u32 hiddenItem; + u32 hiddenItem; // Contains all the hidden item data. See GET_HIDDEN_ITEM_* defines further up } bgUnion; }; diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 9a7d55edc..1216bec21 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -495,11 +495,11 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position case 5: case 6: case BG_EVENT_HIDDEN_ITEM: - if (GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_UNDERFOOT) == TRUE) + if (GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_UNDERFOOT) == TRUE) return NULL; - gSpecialVar_0x8005 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_ID); - gSpecialVar_0x8004 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_FLAG); - gSpecialVar_0x8006 = GetHiddenItemAttr((u32)bgEvent->bgUnion.script, HIDDEN_ITEM_QUANTITY); + gSpecialVar_0x8005 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_ITEM); + gSpecialVar_0x8004 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_FLAG); + gSpecialVar_0x8006 = GetHiddenItemAttr(bgEvent->bgUnion.hiddenItem, HIDDEN_ITEM_QUANTITY); if (FlagGet(gSpecialVar_0x8004) == TRUE) return NULL; gSpecialVar_Facing = direction; diff --git a/src/field_specials.c b/src/field_specials.c index 872c5007d..ba8d70cd3 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -1750,15 +1750,15 @@ u16 StickerManGetBragFlags(void) u16 GetHiddenItemAttr(u32 hiddenItem, u8 attr) { - if (attr == 0) - return hiddenItem & 0xFFFF; - else if (attr == 1) - return ((hiddenItem >> 16) & 0xFF) + 1000; - else if (attr == 2) - return (hiddenItem >> 24) & 0x7F; - else if (attr == 3) - return (hiddenItem >> 31) & 0x01; - else + if (attr == HIDDEN_ITEM_ITEM) + return GET_HIDDEN_ITEM_ITEM(hiddenItem); + else if (attr == HIDDEN_ITEM_FLAG) + return GET_HIDDEN_ITEM_FLAG(hiddenItem) + FLAG_HIDDEN_ITEMS_START; + else if (attr == HIDDEN_ITEM_QUANTITY) + return GET_HIDDEN_ITEM_QUANTITY(hiddenItem); + else if (attr == HIDDEN_ITEM_UNDERFOOT) + return GET_HIDDEN_ITEM_UNDERFOOT(hiddenItem); + else // Invalid return 1; } diff --git a/src/itemfinder.c b/src/itemfinder.c index 551d0d53b..7819b3944 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -242,8 +242,8 @@ static void SetUnderfootHiddenItem(u8 taskId, u32 hiddenItem) { s16 *data = gTasks[taskId].data; gSpecialVar_0x8004 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_FLAG); - gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ID); - gSpecialVar_0x8006 = 1; + gSpecialVar_0x8005 = GetHiddenItemAttr(hiddenItem, HIDDEN_ITEM_ITEM); + gSpecialVar_0x8006 = 1; // Quantity. The 'HIDDEN_ITEM_QUANTITY' data is ignored for underfoot items TV_PrintIntToStringVar(0, gSpecialVar_0x8005); tHiddenItemFound = TRUE; tItemX = 0; From ab417d12552b25c8434592a942006cc0219932bf Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 1 Mar 2023 00:42:12 -0500 Subject: [PATCH 18/29] Sync pokemon.c --- asm/macros.inc | 1 - asm/macros/event.inc | 12 +- asm/macros/pokemon_data.inc | 57 - data/mystery_event_msg.s | 5 +- data/script_cmd_table.inc | 426 +- data/specials.inc | 2 +- include/battle.h | 2 +- include/constants/hold_effects.h | 2 +- include/constants/item_effects.h | 17 +- include/constants/pokemon.h | 295 +- include/malloc.h | 2 + include/pokemon.h | 166 +- include/pokemon_storage_system.h | 10 + src/battle_ai_script_commands.c | 16 +- src/battle_ai_switch_items.c | 38 +- src/battle_controller_oak_old_man.c | 8 +- src/battle_controller_player.c | 8 +- src/battle_controller_pokedude.c | 8 +- src/battle_controllers.c | 14 +- src/battle_interface.c | 4 +- src/battle_main.c | 80 +- src/battle_script_commands.c | 38 +- src/battle_setup.c | 2 +- src/battle_tower.c | 2 +- src/battle_util.c | 14 +- src/data/items.json | 2 +- src/data/pokemon/item_effects.h | 286 +- .../pokemon/{base_stats.h => species_info.h} | 4742 +++++++---------- src/daycare.c | 34 +- src/dodrio_berry_picking.c | 2 +- src/field_poison.c | 2 +- src/field_specials.c | 16 +- src/hall_of_fame.c | 2 +- src/item_use.c | 2 +- src/load_save.c | 1 + src/mystery_event_script.c | 2 +- src/oak_speech.c | 6 +- src/party_menu.c | 26 +- src/pokedex_screen.c | 12 +- src/pokemon.c | 1584 +++--- src/pokemon_jump.c | 2 +- src/pokemon_storage_system_data.c | 4 +- src/pokemon_storage_system_graphics.c | 12 +- src/pokemon_storage_system_misc.c | 4 +- src/pokemon_storage_system_tasks.c | 4 +- src/pokemon_summary_screen.c | 30 +- src/rom_header_gf.c | 4 +- src/save.c | 1 + src/scrcmd.c | 12 +- src/script_pokemon_util.c | 2 +- src/trade.c | 30 +- src/trade_scene.c | 6 +- src/trainer_tower.c | 2 +- src/union_room.c | 14 +- 54 files changed, 3710 insertions(+), 4365 deletions(-) delete mode 100644 asm/macros/pokemon_data.inc rename src/data/pokemon/{base_stats.h => species_info.h} (71%) diff --git a/asm/macros.inc b/asm/macros.inc index 0e53dc2a2..ac7f5681f 100644 --- a/asm/macros.inc +++ b/asm/macros.inc @@ -1,7 +1,6 @@ .include "asm/macros/asm.inc" .include "asm/macros/function.inc" .include "asm/macros/movement.inc" - .include "asm/macros/pokemon_data.inc" .include "asm/macros/ec.inc" .include "asm/macros/map.inc" .include "asm/macros/m4a.inc" diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 612d45efa..0135bc26d 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1576,15 +1576,15 @@ .4byte \value .endm - @ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party. - .macro setmoneventlegal slot:req + @ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party. + .macro setmonmodernfatefulencounter slot:req .byte 0xcd .2byte \slot .endm - @ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, + @ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set, @ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE. - .macro checkmoneventlegal slot:req + .macro checkmonmodernfatefulencounter slot:req .byte 0xce .2byte \slot .endm @@ -1849,10 +1849,10 @@ call EventScript_BrailleCursorWaitButton .endm - @ Creates an "event legal" Pokémon for an encounter + @ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter .macro seteventmon species:req, level:req, item=ITEM_NONE setvar VAR_0x8004, \species setvar VAR_0x8005, \level setvar VAR_0x8006, \item - special CreateEventLegalEnemyMon + special CreateEnemyEventMon .endm diff --git a/asm/macros/pokemon_data.inc b/asm/macros/pokemon_data.inc deleted file mode 100644 index b0a5f22e3..000000000 --- a/asm/macros/pokemon_data.inc +++ /dev/null @@ -1,57 +0,0 @@ - .macro pokedex_entry pokemon_name, height, weight, pokemon_scale, pokemon_offset, trainer_scale, trainer_offset - .2byte \height @ in decimeters - .2byte \weight @ in hectograms - .4byte DexDescription_\pokemon_name\()_1 - .4byte DexDescription_\pokemon_name\()_2 - .2byte 0 @ unused - .2byte \pokemon_scale - .2byte \pokemon_offset - .2byte \trainer_scale - .2byte \trainer_offset - .2byte 0 @ padding - .endm - - .macro base_stats hp, attack, defense, speed, sp_attack, sp_defense - .byte \hp - .byte \attack - .byte \defense - .byte \speed - .byte \sp_attack - .byte \sp_defense - .endm - - .macro ev_yield hp, attack, defense, speed, sp_attack, sp_defense - .2byte (\sp_defense << 10) | (\sp_attack << 8) | (\speed << 6) | (\defense << 4) | (\attack << 2) | \hp - .endm - - .macro level_up_move level, move - .2byte (\level << 9) | \move - .endm - - .macro evo_entry method, parameter, target_species - .2byte \method - .2byte \parameter - .2byte \target_species - .2byte 0 @ padding - .endm - - .macro empty_evo_entries count - .fill 8 * \count, 1, 0 - .endm - - .macro egg_moves_begin species - .2byte 20000 + \species - .endm - -@ If the min level equals the max level, only one level argument is needed. - .macro wild_mon species, min_level, max_level - .byte \min_level - - .ifb \max_level - .byte \min_level - .else - .byte \max_level - .endif - - .2byte SPECIES_\species - .endm diff --git a/data/mystery_event_msg.s b/data/mystery_event_msg.s index d4fe7faf2..535c530f1 100644 --- a/data/mystery_event_msg.s +++ b/data/mystery_event_msg.s @@ -7,6 +7,7 @@ #include "constants/species.h" #include "constants/vars.h" #include "constants/items.h" +#include "constants/region_map_sections.h" .include "asm/macros.inc" .include "asm/macros/event.inc" .include "constants/constants.inc" @@ -67,8 +68,8 @@ SurfPichu_FullParty: SurfPichu_GiveEgg: giveegg SPECIES_PICHU - setmoneventlegal VAR_EVENT_PICHU_SLOT - setmonmetlocation VAR_EVENT_PICHU_SLOT, 0xff + setmonmodernfatefulencounter VAR_EVENT_PICHU_SLOT + setmonmetlocation VAR_EVENT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER vgoto_if_eq VAR_EVENT_PICHU_SLOT, 1, SurfPichu_Slot1 vgoto_if_eq VAR_EVENT_PICHU_SLOT, 2, SurfPichu_Slot2 vgoto_if_eq VAR_EVENT_PICHU_SLOT, 3, SurfPichu_Slot3 diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index c73c0bb87..6cb2bed8f 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -1,219 +1,219 @@ .align 2 gScriptCmdTable:: - .4byte ScrCmd_nop @ 0x00 - .4byte ScrCmd_nop1 @ 0x01 - .4byte ScrCmd_end @ 0x02 - .4byte ScrCmd_return @ 0x03 - .4byte ScrCmd_call @ 0x04 - .4byte ScrCmd_goto @ 0x05 - .4byte ScrCmd_goto_if @ 0x06 - .4byte ScrCmd_call_if @ 0x07 - .4byte ScrCmd_gotostd @ 0x08 - .4byte ScrCmd_callstd @ 0x09 - .4byte ScrCmd_gotostd_if @ 0x0a - .4byte ScrCmd_callstd_if @ 0x0b - .4byte ScrCmd_returnram @ 0x0c - .4byte ScrCmd_endram @ 0x0d - .4byte ScrCmd_setmysteryeventstatus @ 0x0e - .4byte ScrCmd_loadword @ 0x0f - .4byte ScrCmd_loadbyte @ 0x10 - .4byte ScrCmd_setptr @ 0x11 - .4byte ScrCmd_loadbytefromptr @ 0x12 - .4byte ScrCmd_setptrbyte @ 0x13 - .4byte ScrCmd_copylocal @ 0x14 - .4byte ScrCmd_copybyte @ 0x15 - .4byte ScrCmd_setvar @ 0x16 - .4byte ScrCmd_addvar @ 0x17 - .4byte ScrCmd_subvar @ 0x18 - .4byte ScrCmd_copyvar @ 0x19 - .4byte ScrCmd_setorcopyvar @ 0x1a - .4byte ScrCmd_compare_local_to_local @ 0x1b - .4byte ScrCmd_compare_local_to_value @ 0x1c - .4byte ScrCmd_compare_local_to_ptr @ 0x1d - .4byte ScrCmd_compare_ptr_to_local @ 0x1e - .4byte ScrCmd_compare_ptr_to_value @ 0x1f - .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 - .4byte ScrCmd_compare_var_to_value @ 0x21 - .4byte ScrCmd_compare_var_to_var @ 0x22 - .4byte ScrCmd_callnative @ 0x23 - .4byte ScrCmd_gotonative @ 0x24 - .4byte ScrCmd_special @ 0x25 - .4byte ScrCmd_specialvar @ 0x26 - .4byte ScrCmd_waitstate @ 0x27 - .4byte ScrCmd_delay @ 0x28 - .4byte ScrCmd_setflag @ 0x29 - .4byte ScrCmd_clearflag @ 0x2a - .4byte ScrCmd_checkflag @ 0x2b - .4byte ScrCmd_initclock @ 0x2c - .4byte ScrCmd_dotimebasedevents @ 0x2d - .4byte ScrCmd_gettime @ 0x2e - .4byte ScrCmd_playse @ 0x2f - .4byte ScrCmd_waitse @ 0x30 - .4byte ScrCmd_playfanfare @ 0x31 - .4byte ScrCmd_waitfanfare @ 0x32 - .4byte ScrCmd_playbgm @ 0x33 - .4byte ScrCmd_savebgm @ 0x34 - .4byte ScrCmd_fadedefaultbgm @ 0x35 - .4byte ScrCmd_fadenewbgm @ 0x36 - .4byte ScrCmd_fadeoutbgm @ 0x37 - .4byte ScrCmd_fadeinbgm @ 0x38 - .4byte ScrCmd_warp @ 0x39 - .4byte ScrCmd_warpsilent @ 0x3a - .4byte ScrCmd_warpdoor @ 0x3b - .4byte ScrCmd_warphole @ 0x3c - .4byte ScrCmd_warpteleport @ 0x3d - .4byte ScrCmd_setwarp @ 0x3e - .4byte ScrCmd_setdynamicwarp @ 0x3f - .4byte ScrCmd_setdivewarp @ 0x40 - .4byte ScrCmd_setholewarp @ 0x41 - .4byte ScrCmd_getplayerxy @ 0x42 - .4byte ScrCmd_getpartysize @ 0x43 - .4byte ScrCmd_additem @ 0x44 - .4byte ScrCmd_removeitem @ 0x45 - .4byte ScrCmd_checkitemspace @ 0x46 - .4byte ScrCmd_checkitem @ 0x47 - .4byte ScrCmd_checkitemtype @ 0x48 - .4byte ScrCmd_addpcitem @ 0x49 - .4byte ScrCmd_checkpcitem @ 0x4a - .4byte ScrCmd_adddecoration @ 0x4b - .4byte ScrCmd_removedecoration @ 0x4c - .4byte ScrCmd_checkdecor @ 0x4d - .4byte ScrCmd_checkdecorspace @ 0x4e - .4byte ScrCmd_applymovement @ 0x4f - .4byte ScrCmd_applymovementat @ 0x50 - .4byte ScrCmd_waitmovement @ 0x51 - .4byte ScrCmd_waitmovementat @ 0x52 - .4byte ScrCmd_removeobject @ 0x53 - .4byte ScrCmd_removeobjectat @ 0x54 - .4byte ScrCmd_addobject @ 0x55 - .4byte ScrCmd_addobjectat @ 0x56 - .4byte ScrCmd_setobjectxy @ 0x57 - .4byte ScrCmd_showobjectat @ 0x58 - .4byte ScrCmd_hideobjectat @ 0x59 - .4byte ScrCmd_faceplayer @ 0x5a - .4byte ScrCmd_turnobject @ 0x5b - .4byte ScrCmd_trainerbattle @ 0x5c - .4byte ScrCmd_dotrainerbattle @ 0x5d - .4byte ScrCmd_gotopostbattlescript @ 0x5e - .4byte ScrCmd_gotobeatenscript @ 0x5f - .4byte ScrCmd_checktrainerflag @ 0x60 - .4byte ScrCmd_settrainerflag @ 0x61 - .4byte ScrCmd_cleartrainerflag @ 0x62 - .4byte ScrCmd_setobjectxyperm @ 0x63 - .4byte ScrCmd_copyobjectxytoperm @ 0x64 - .4byte ScrCmd_setobjectmovementtype @ 0x65 - .4byte ScrCmd_waitmessage @ 0x66 - .4byte ScrCmd_message @ 0x67 - .4byte ScrCmd_closemessage @ 0x68 - .4byte ScrCmd_lockall @ 0x69 - .4byte ScrCmd_lock @ 0x6a - .4byte ScrCmd_releaseall @ 0x6b - .4byte ScrCmd_release @ 0x6c - .4byte ScrCmd_waitbuttonpress @ 0x6d - .4byte ScrCmd_yesnobox @ 0x6e - .4byte ScrCmd_multichoice @ 0x6f - .4byte ScrCmd_multichoicedefault @ 0x70 - .4byte ScrCmd_multichoicegrid @ 0x71 - .4byte ScrCmd_drawbox @ 0x72 - .4byte ScrCmd_erasebox @ 0x73 - .4byte ScrCmd_drawboxtext @ 0x74 - .4byte ScrCmd_showmonpic @ 0x75 - .4byte ScrCmd_hidemonpic @ 0x76 - .4byte ScrCmd_showcontestpainting @ 0x77 - .4byte ScrCmd_braillemessage @ 0x78 - .4byte ScrCmd_givemon @ 0x79 - .4byte ScrCmd_giveegg @ 0x7a - .4byte ScrCmd_setmonmove @ 0x7b - .4byte ScrCmd_checkpartymove @ 0x7c - .4byte ScrCmd_bufferspeciesname @ 0x7d - .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e - .4byte ScrCmd_bufferpartymonnick @ 0x7f - .4byte ScrCmd_bufferitemname @ 0x80 - .4byte ScrCmd_bufferdecorationname @ 0x81 - .4byte ScrCmd_buffermovename @ 0x82 - .4byte ScrCmd_buffernumberstring @ 0x83 - .4byte ScrCmd_bufferstdstring @ 0x84 - .4byte ScrCmd_bufferstring @ 0x85 - .4byte ScrCmd_pokemart @ 0x86 - .4byte ScrCmd_pokemartdecoration @ 0x87 - .4byte ScrCmd_pokemartdecoration2 @ 0x88 - .4byte ScrCmd_playslotmachine @ 0x8 - .4byte ScrCmd_setberrytree @ 0x8a - .4byte ScrCmd_choosecontestmon @ 0x8b - .4byte ScrCmd_startcontest @ 0x8c - .4byte ScrCmd_showcontestresults @ 0x8d - .4byte ScrCmd_contestlinktransfer @ 0x8e - .4byte ScrCmd_random @ 0x8f - .4byte ScrCmd_addmoney @ 0x90 - .4byte ScrCmd_removemoney @ 0x91 - .4byte ScrCmd_checkmoney @ 0x92 - .4byte ScrCmd_showmoneybox @ 0x93 - .4byte ScrCmd_hidemoneybox @ 0x94 - .4byte ScrCmd_updatemoneybox @ 0x95 - .4byte ScrCmd_getpokenewsactive @ 0x96 - .4byte ScrCmd_fadescreen @ 0x97 - .4byte ScrCmd_fadescreenspeed @ 0x98 - .4byte ScrCmd_setflashlevel @ 0x99 - .4byte ScrCmd_animateflash @ 0x9a - .4byte ScrCmd_messageautoscroll @ 0x9b - .4byte ScrCmd_dofieldeffect @ 0x9c - .4byte ScrCmd_setfieldeffectargument @ 0x9d - .4byte ScrCmd_waitfieldeffect @ 0x9e - .4byte ScrCmd_setrespawn @ 0x9f - .4byte ScrCmd_checkplayergender @ 0xa0 - .4byte ScrCmd_playmoncry @ 0xa1 - .4byte ScrCmd_setmetatile @ 0xa2 - .4byte ScrCmd_resetweather @ 0xa3 - .4byte ScrCmd_setweather @ 0xa4 - .4byte ScrCmd_doweather @ 0xa5 - .4byte ScrCmd_setstepcallback @ 0xa6 - .4byte ScrCmd_setmaplayoutindex @ 0xa7 - .4byte ScrCmd_setobjectsubpriority @ 0xa8 - .4byte ScrCmd_resetobjectsubpriority @ 0xa9 - .4byte ScrCmd_createvobject @ 0xaa - .4byte ScrCmd_turnvobject @ 0xab - .4byte ScrCmd_opendoor @ 0xac - .4byte ScrCmd_closedoor @ 0xad - .4byte ScrCmd_waitdooranim @ 0xae - .4byte ScrCmd_setdooropen @ 0xaf - .4byte ScrCmd_setdoorclosed @ 0xb0 - .4byte ScrCmd_addelevmenuitem @ 0xb1 - .4byte ScrCmd_showelevmenu @ 0xb2 - .4byte ScrCmd_checkcoins @ 0xb3 - .4byte ScrCmd_addcoins @ 0xb4 - .4byte ScrCmd_removecoins @ 0xb5 - .4byte ScrCmd_setwildbattle @ 0xb6 - .4byte ScrCmd_dowildbattle @ 0xb7 - .4byte ScrCmd_setvaddress @ 0xb8 - .4byte ScrCmd_vgoto @ 0xb9 - .4byte ScrCmd_vcall @ 0xba - .4byte ScrCmd_vgoto_if @ 0xbb - .4byte ScrCmd_vcall_if @ 0xbc - .4byte ScrCmd_vmessage @ 0xbd - .4byte ScrCmd_vbuffermessage @ 0xbe - .4byte ScrCmd_vbufferstring @ 0xbf - .4byte ScrCmd_showcoinsbox @ 0xc0 - .4byte ScrCmd_hidecoinsbox @ 0xc1 - .4byte ScrCmd_updatecoinsbox @ 0xc2 - .4byte ScrCmd_incrementgamestat @ 0xc3 - .4byte ScrCmd_setescapewarp @ 0xc4 - .4byte ScrCmd_waitmoncry @ 0xc5 - .4byte ScrCmd_bufferboxname @ 0xc6 - .4byte ScrCmd_textcolor @ 0xc7 - .4byte ScrCmd_loadhelp @ 0xc8 - .4byte ScrCmd_unloadhelp @ 0xc9 - .4byte ScrCmd_signmsg @ 0xca - .4byte ScrCmd_normalmsg @ 0xcb - .4byte ScrCmd_comparestat @ 0xcc - .4byte ScrCmd_setmoneventlegal @ 0xcd - .4byte ScrCmd_checkmoneventlegal @ 0xce - .4byte ScrCmd_trywondercardscript @ 0xcf - .4byte ScrCmd_setworldmapflag @ 0xd0 - .4byte ScrCmd_warpspinenter @ 0xd1 - .4byte ScrCmd_setmonmetlocation @ 0xd2 - .4byte ScrCmd_getbraillestringwidth @ 0xd3 - .4byte ScrCmd_bufferitemnameplural @ 0xd4 + .4byte ScrCmd_nop @ 0x00 + .4byte ScrCmd_nop1 @ 0x01 + .4byte ScrCmd_end @ 0x02 + .4byte ScrCmd_return @ 0x03 + .4byte ScrCmd_call @ 0x04 + .4byte ScrCmd_goto @ 0x05 + .4byte ScrCmd_goto_if @ 0x06 + .4byte ScrCmd_call_if @ 0x07 + .4byte ScrCmd_gotostd @ 0x08 + .4byte ScrCmd_callstd @ 0x09 + .4byte ScrCmd_gotostd_if @ 0x0a + .4byte ScrCmd_callstd_if @ 0x0b + .4byte ScrCmd_returnram @ 0x0c + .4byte ScrCmd_endram @ 0x0d + .4byte ScrCmd_setmysteryeventstatus @ 0x0e + .4byte ScrCmd_loadword @ 0x0f + .4byte ScrCmd_loadbyte @ 0x10 + .4byte ScrCmd_setptr @ 0x11 + .4byte ScrCmd_loadbytefromptr @ 0x12 + .4byte ScrCmd_setptrbyte @ 0x13 + .4byte ScrCmd_copylocal @ 0x14 + .4byte ScrCmd_copybyte @ 0x15 + .4byte ScrCmd_setvar @ 0x16 + .4byte ScrCmd_addvar @ 0x17 + .4byte ScrCmd_subvar @ 0x18 + .4byte ScrCmd_copyvar @ 0x19 + .4byte ScrCmd_setorcopyvar @ 0x1a + .4byte ScrCmd_compare_local_to_local @ 0x1b + .4byte ScrCmd_compare_local_to_value @ 0x1c + .4byte ScrCmd_compare_local_to_ptr @ 0x1d + .4byte ScrCmd_compare_ptr_to_local @ 0x1e + .4byte ScrCmd_compare_ptr_to_value @ 0x1f + .4byte ScrCmd_compare_ptr_to_ptr @ 0x20 + .4byte ScrCmd_compare_var_to_value @ 0x21 + .4byte ScrCmd_compare_var_to_var @ 0x22 + .4byte ScrCmd_callnative @ 0x23 + .4byte ScrCmd_gotonative @ 0x24 + .4byte ScrCmd_special @ 0x25 + .4byte ScrCmd_specialvar @ 0x26 + .4byte ScrCmd_waitstate @ 0x27 + .4byte ScrCmd_delay @ 0x28 + .4byte ScrCmd_setflag @ 0x29 + .4byte ScrCmd_clearflag @ 0x2a + .4byte ScrCmd_checkflag @ 0x2b + .4byte ScrCmd_initclock @ 0x2c + .4byte ScrCmd_dotimebasedevents @ 0x2d + .4byte ScrCmd_gettime @ 0x2e + .4byte ScrCmd_playse @ 0x2f + .4byte ScrCmd_waitse @ 0x30 + .4byte ScrCmd_playfanfare @ 0x31 + .4byte ScrCmd_waitfanfare @ 0x32 + .4byte ScrCmd_playbgm @ 0x33 + .4byte ScrCmd_savebgm @ 0x34 + .4byte ScrCmd_fadedefaultbgm @ 0x35 + .4byte ScrCmd_fadenewbgm @ 0x36 + .4byte ScrCmd_fadeoutbgm @ 0x37 + .4byte ScrCmd_fadeinbgm @ 0x38 + .4byte ScrCmd_warp @ 0x39 + .4byte ScrCmd_warpsilent @ 0x3a + .4byte ScrCmd_warpdoor @ 0x3b + .4byte ScrCmd_warphole @ 0x3c + .4byte ScrCmd_warpteleport @ 0x3d + .4byte ScrCmd_setwarp @ 0x3e + .4byte ScrCmd_setdynamicwarp @ 0x3f + .4byte ScrCmd_setdivewarp @ 0x40 + .4byte ScrCmd_setholewarp @ 0x41 + .4byte ScrCmd_getplayerxy @ 0x42 + .4byte ScrCmd_getpartysize @ 0x43 + .4byte ScrCmd_additem @ 0x44 + .4byte ScrCmd_removeitem @ 0x45 + .4byte ScrCmd_checkitemspace @ 0x46 + .4byte ScrCmd_checkitem @ 0x47 + .4byte ScrCmd_checkitemtype @ 0x48 + .4byte ScrCmd_addpcitem @ 0x49 + .4byte ScrCmd_checkpcitem @ 0x4a + .4byte ScrCmd_adddecoration @ 0x4b + .4byte ScrCmd_removedecoration @ 0x4c + .4byte ScrCmd_checkdecor @ 0x4d + .4byte ScrCmd_checkdecorspace @ 0x4e + .4byte ScrCmd_applymovement @ 0x4f + .4byte ScrCmd_applymovementat @ 0x50 + .4byte ScrCmd_waitmovement @ 0x51 + .4byte ScrCmd_waitmovementat @ 0x52 + .4byte ScrCmd_removeobject @ 0x53 + .4byte ScrCmd_removeobjectat @ 0x54 + .4byte ScrCmd_addobject @ 0x55 + .4byte ScrCmd_addobjectat @ 0x56 + .4byte ScrCmd_setobjectxy @ 0x57 + .4byte ScrCmd_showobjectat @ 0x58 + .4byte ScrCmd_hideobjectat @ 0x59 + .4byte ScrCmd_faceplayer @ 0x5a + .4byte ScrCmd_turnobject @ 0x5b + .4byte ScrCmd_trainerbattle @ 0x5c + .4byte ScrCmd_dotrainerbattle @ 0x5d + .4byte ScrCmd_gotopostbattlescript @ 0x5e + .4byte ScrCmd_gotobeatenscript @ 0x5f + .4byte ScrCmd_checktrainerflag @ 0x60 + .4byte ScrCmd_settrainerflag @ 0x61 + .4byte ScrCmd_cleartrainerflag @ 0x62 + .4byte ScrCmd_setobjectxyperm @ 0x63 + .4byte ScrCmd_copyobjectxytoperm @ 0x64 + .4byte ScrCmd_setobjectmovementtype @ 0x65 + .4byte ScrCmd_waitmessage @ 0x66 + .4byte ScrCmd_message @ 0x67 + .4byte ScrCmd_closemessage @ 0x68 + .4byte ScrCmd_lockall @ 0x69 + .4byte ScrCmd_lock @ 0x6a + .4byte ScrCmd_releaseall @ 0x6b + .4byte ScrCmd_release @ 0x6c + .4byte ScrCmd_waitbuttonpress @ 0x6d + .4byte ScrCmd_yesnobox @ 0x6e + .4byte ScrCmd_multichoice @ 0x6f + .4byte ScrCmd_multichoicedefault @ 0x70 + .4byte ScrCmd_multichoicegrid @ 0x71 + .4byte ScrCmd_drawbox @ 0x72 + .4byte ScrCmd_erasebox @ 0x73 + .4byte ScrCmd_drawboxtext @ 0x74 + .4byte ScrCmd_showmonpic @ 0x75 + .4byte ScrCmd_hidemonpic @ 0x76 + .4byte ScrCmd_showcontestpainting @ 0x77 + .4byte ScrCmd_braillemessage @ 0x78 + .4byte ScrCmd_givemon @ 0x79 + .4byte ScrCmd_giveegg @ 0x7a + .4byte ScrCmd_setmonmove @ 0x7b + .4byte ScrCmd_checkpartymove @ 0x7c + .4byte ScrCmd_bufferspeciesname @ 0x7d + .4byte ScrCmd_bufferleadmonspeciesname @ 0x7e + .4byte ScrCmd_bufferpartymonnick @ 0x7f + .4byte ScrCmd_bufferitemname @ 0x80 + .4byte ScrCmd_bufferdecorationname @ 0x81 + .4byte ScrCmd_buffermovename @ 0x82 + .4byte ScrCmd_buffernumberstring @ 0x83 + .4byte ScrCmd_bufferstdstring @ 0x84 + .4byte ScrCmd_bufferstring @ 0x85 + .4byte ScrCmd_pokemart @ 0x86 + .4byte ScrCmd_pokemartdecoration @ 0x87 + .4byte ScrCmd_pokemartdecoration2 @ 0x88 + .4byte ScrCmd_playslotmachine @ 0x8 + .4byte ScrCmd_setberrytree @ 0x8a + .4byte ScrCmd_choosecontestmon @ 0x8b + .4byte ScrCmd_startcontest @ 0x8c + .4byte ScrCmd_showcontestresults @ 0x8d + .4byte ScrCmd_contestlinktransfer @ 0x8e + .4byte ScrCmd_random @ 0x8f + .4byte ScrCmd_addmoney @ 0x90 + .4byte ScrCmd_removemoney @ 0x91 + .4byte ScrCmd_checkmoney @ 0x92 + .4byte ScrCmd_showmoneybox @ 0x93 + .4byte ScrCmd_hidemoneybox @ 0x94 + .4byte ScrCmd_updatemoneybox @ 0x95 + .4byte ScrCmd_getpokenewsactive @ 0x96 + .4byte ScrCmd_fadescreen @ 0x97 + .4byte ScrCmd_fadescreenspeed @ 0x98 + .4byte ScrCmd_setflashlevel @ 0x99 + .4byte ScrCmd_animateflash @ 0x9a + .4byte ScrCmd_messageautoscroll @ 0x9b + .4byte ScrCmd_dofieldeffect @ 0x9c + .4byte ScrCmd_setfieldeffectargument @ 0x9d + .4byte ScrCmd_waitfieldeffect @ 0x9e + .4byte ScrCmd_setrespawn @ 0x9f + .4byte ScrCmd_checkplayergender @ 0xa0 + .4byte ScrCmd_playmoncry @ 0xa1 + .4byte ScrCmd_setmetatile @ 0xa2 + .4byte ScrCmd_resetweather @ 0xa3 + .4byte ScrCmd_setweather @ 0xa4 + .4byte ScrCmd_doweather @ 0xa5 + .4byte ScrCmd_setstepcallback @ 0xa6 + .4byte ScrCmd_setmaplayoutindex @ 0xa7 + .4byte ScrCmd_setobjectsubpriority @ 0xa8 + .4byte ScrCmd_resetobjectsubpriority @ 0xa9 + .4byte ScrCmd_createvobject @ 0xaa + .4byte ScrCmd_turnvobject @ 0xab + .4byte ScrCmd_opendoor @ 0xac + .4byte ScrCmd_closedoor @ 0xad + .4byte ScrCmd_waitdooranim @ 0xae + .4byte ScrCmd_setdooropen @ 0xaf + .4byte ScrCmd_setdoorclosed @ 0xb0 + .4byte ScrCmd_addelevmenuitem @ 0xb1 + .4byte ScrCmd_showelevmenu @ 0xb2 + .4byte ScrCmd_checkcoins @ 0xb3 + .4byte ScrCmd_addcoins @ 0xb4 + .4byte ScrCmd_removecoins @ 0xb5 + .4byte ScrCmd_setwildbattle @ 0xb6 + .4byte ScrCmd_dowildbattle @ 0xb7 + .4byte ScrCmd_setvaddress @ 0xb8 + .4byte ScrCmd_vgoto @ 0xb9 + .4byte ScrCmd_vcall @ 0xba + .4byte ScrCmd_vgoto_if @ 0xbb + .4byte ScrCmd_vcall_if @ 0xbc + .4byte ScrCmd_vmessage @ 0xbd + .4byte ScrCmd_vbuffermessage @ 0xbe + .4byte ScrCmd_vbufferstring @ 0xbf + .4byte ScrCmd_showcoinsbox @ 0xc0 + .4byte ScrCmd_hidecoinsbox @ 0xc1 + .4byte ScrCmd_updatecoinsbox @ 0xc2 + .4byte ScrCmd_incrementgamestat @ 0xc3 + .4byte ScrCmd_setescapewarp @ 0xc4 + .4byte ScrCmd_waitmoncry @ 0xc5 + .4byte ScrCmd_bufferboxname @ 0xc6 + .4byte ScrCmd_textcolor @ 0xc7 + .4byte ScrCmd_loadhelp @ 0xc8 + .4byte ScrCmd_unloadhelp @ 0xc9 + .4byte ScrCmd_signmsg @ 0xca + .4byte ScrCmd_normalmsg @ 0xcb + .4byte ScrCmd_comparestat @ 0xcc + .4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd + .4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce + .4byte ScrCmd_trywondercardscript @ 0xcf + .4byte ScrCmd_setworldmapflag @ 0xd0 + .4byte ScrCmd_warpspinenter @ 0xd1 + .4byte ScrCmd_setmonmetlocation @ 0xd2 + .4byte ScrCmd_getbraillestringwidth @ 0xd3 + .4byte ScrCmd_bufferitemnameplural @ 0xd4 gScriptCmdTableEnd:: .4byte ScrCmd_nop diff --git a/data/specials.inc b/data/specials.inc index be6e3d575..059f29015 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -451,5 +451,5 @@ gSpecials:: def_special InitElevatorFloorSelectMenuPos def_special UpdateLoreleiDollCollection def_special LoopWingFlapSound - def_special CreateEventLegalEnemyMon + def_special CreateEnemyEventMon gSpecialsEnd:: diff --git a/include/battle.h b/include/battle.h index 1086fa3ec..0c86b66b4 100644 --- a/include/battle.h +++ b/include/battle.h @@ -518,7 +518,7 @@ struct BattleScripting u8 pursuitDoublesAttacker; u8 reshowMainState; u8 reshowHelperState; - u8 field_23; + u8 levelUpHP; }; struct BattleSpriteInfo diff --git a/include/constants/hold_effects.h b/include/constants/hold_effects.h index b653f5a92..5853f1708 100644 --- a/include/constants/hold_effects.h +++ b/include/constants/hold_effects.h @@ -28,7 +28,7 @@ #define HOLD_EFFECT_MACHO_BRACE 24 #define HOLD_EFFECT_EXP_SHARE 25 #define HOLD_EFFECT_QUICK_CLAW 26 -#define HOLD_EFFECT_HAPPINESS_UP 27 +#define HOLD_EFFECT_FRIENDSHIP_UP 27 #define HOLD_EFFECT_CURE_ATTRACT 28 #define HOLD_EFFECT_CHOICE_BAND 29 #define HOLD_EFFECT_FLINCH 30 diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h index a5bb77035..888cb6853 100644 --- a/include/constants/item_effects.h +++ b/include/constants/item_effects.h @@ -3,7 +3,7 @@ // field 0 masks #define ITEM0_X_ATTACK 0x0F -#define ITEM0_HIGH_CRIT 0x30 // For Dire Hit, works the same way as move Focus Energy. +#define ITEM0_DIRE_HIT 0x30 // Works the same way as move Focus Energy. #define ITEM0_SACRED_ASH 0x40 #define ITEM0_INFATUATION 0x80 @@ -23,7 +23,7 @@ #define ITEM3_POISON 0x10 #define ITEM3_SLEEP 0x20 #define ITEM3_LEVEL_UP 0x40 -#define ITEM3_MIST 0x80 // For Guard Specs, works the same way as move Mist. +#define ITEM3_GUARD_SPEC 0x80 // Works the same way as the move Mist. #define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP) @@ -50,6 +50,19 @@ #define ITEM5_FRIENDSHIP_ALL (ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID | ITEM5_FRIENDSHIP_HIGH) // fields 6 and onwards are item-specific arguments +#define ITEM_EFFECT_ARG_START 6 + +// Special HP recovery amounts for ITEM4_HEAL_HP +#define ITEM6_HEAL_HP_FULL ((u8) -1) +#define ITEM6_HEAL_HP_HALF ((u8) -2) +#define ITEM6_HEAL_HP_LVL_UP ((u8) -3) + +// Special PP recovery amounts for ITEM4_HEAL_PP +#define ITEM6_HEAL_PP_FULL 0x7F + +// Amount of EV modified by ITEM4_EV_HP, ITEM4_EV_ATK, ITEM5_EV_DEF, ITEM5_EV_SPEED, ITEM5_EV_SPDEF and ITEM5_EV_SPATK +#define ITEM6_ADD_EV 10 +#define ITEM6_SUBTRACT_EV -10 // Used for GetItemEffectType. #define ITEM_EFFECT_X_ITEM 0 diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 83d7ecb2d..21c678744 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -2,95 +2,95 @@ #define GUARD_CONSTANTS_POKEMON_H // For (Set|Get)(Box)?MonData -#define MON_DATA_PERSONALITY 0 -#define MON_DATA_OT_ID 1 -#define MON_DATA_NICKNAME 2 -#define MON_DATA_LANGUAGE 3 -#define MON_DATA_SANITY_IS_BAD_EGG 4 -#define MON_DATA_SANITY_HAS_SPECIES 5 -#define MON_DATA_SANITY_IS_EGG 6 -#define MON_DATA_OT_NAME 7 -#define MON_DATA_MARKINGS 8 -#define MON_DATA_CHECKSUM 9 -#define MON_DATA_ENCRYPT_SEPARATOR 10 -#define MON_DATA_SPECIES 11 -#define MON_DATA_HELD_ITEM 12 -#define MON_DATA_MOVE1 13 -#define MON_DATA_MOVE2 14 -#define MON_DATA_MOVE3 15 -#define MON_DATA_MOVE4 16 -#define MON_DATA_PP1 17 -#define MON_DATA_PP2 18 -#define MON_DATA_PP3 19 -#define MON_DATA_PP4 20 -#define MON_DATA_PP_BONUSES 21 -#define MON_DATA_COOL 22 -#define MON_DATA_BEAUTY 23 -#define MON_DATA_CUTE 24 -#define MON_DATA_EXP 25 -#define MON_DATA_HP_EV 26 -#define MON_DATA_ATK_EV 27 -#define MON_DATA_DEF_EV 28 -#define MON_DATA_SPEED_EV 29 -#define MON_DATA_SPATK_EV 30 -#define MON_DATA_SPDEF_EV 31 -#define MON_DATA_FRIENDSHIP 32 -#define MON_DATA_SMART 33 -#define MON_DATA_POKERUS 34 -#define MON_DATA_MET_LOCATION 35 -#define MON_DATA_MET_LEVEL 36 -#define MON_DATA_MET_GAME 37 -#define MON_DATA_POKEBALL 38 -#define MON_DATA_HP_IV 39 -#define MON_DATA_ATK_IV 40 -#define MON_DATA_DEF_IV 41 -#define MON_DATA_SPEED_IV 42 -#define MON_DATA_SPATK_IV 43 -#define MON_DATA_SPDEF_IV 44 -#define MON_DATA_IS_EGG 45 -#define MON_DATA_ABILITY_NUM 46 -#define MON_DATA_TOUGH 47 -#define MON_DATA_SHEEN 48 -#define MON_DATA_OT_GENDER 49 -#define MON_DATA_COOL_RIBBON 50 -#define MON_DATA_BEAUTY_RIBBON 51 -#define MON_DATA_CUTE_RIBBON 52 -#define MON_DATA_SMART_RIBBON 53 -#define MON_DATA_TOUGH_RIBBON 54 -#define MON_DATA_STATUS 55 -#define MON_DATA_LEVEL 56 -#define MON_DATA_HP 57 -#define MON_DATA_MAX_HP 58 -#define MON_DATA_ATK 59 -#define MON_DATA_DEF 60 -#define MON_DATA_SPEED 61 -#define MON_DATA_SPATK 62 -#define MON_DATA_SPDEF 63 -#define MON_DATA_MAIL 64 -#define MON_DATA_SPECIES2 65 -#define MON_DATA_IVS 66 -#define MON_DATA_CHAMPION_RIBBON 67 -#define MON_DATA_WINNING_RIBBON 68 -#define MON_DATA_VICTORY_RIBBON 69 -#define MON_DATA_ARTIST_RIBBON 70 -#define MON_DATA_EFFORT_RIBBON 71 -#define MON_DATA_MARINE_RIBBON 72 -#define MON_DATA_LAND_RIBBON 73 -#define MON_DATA_SKY_RIBBON 74 -#define MON_DATA_COUNTRY_RIBBON 75 -#define MON_DATA_NATIONAL_RIBBON 76 -#define MON_DATA_EARTH_RIBBON 77 -#define MON_DATA_WORLD_RIBBON 78 -#define MON_DATA_UNUSED_RIBBONS 79 -#define MON_DATA_EVENT_LEGAL 80 -#define MON_DATA_KNOWN_MOVES 81 -#define MON_DATA_RIBBON_COUNT 82 -#define MON_DATA_RIBBONS 83 -#define MON_DATA_ATK2 84 -#define MON_DATA_DEF2 85 -#define MON_DATA_SPEED2 86 -#define MON_DATA_SPATK2 87 -#define MON_DATA_SPDEF2 88 +#define MON_DATA_PERSONALITY 0 +#define MON_DATA_OT_ID 1 +#define MON_DATA_NICKNAME 2 +#define MON_DATA_LANGUAGE 3 +#define MON_DATA_SANITY_IS_BAD_EGG 4 +#define MON_DATA_SANITY_HAS_SPECIES 5 +#define MON_DATA_SANITY_IS_EGG 6 +#define MON_DATA_OT_NAME 7 +#define MON_DATA_MARKINGS 8 +#define MON_DATA_CHECKSUM 9 +#define MON_DATA_ENCRYPT_SEPARATOR 10 +#define MON_DATA_SPECIES 11 +#define MON_DATA_HELD_ITEM 12 +#define MON_DATA_MOVE1 13 +#define MON_DATA_MOVE2 14 +#define MON_DATA_MOVE3 15 +#define MON_DATA_MOVE4 16 +#define MON_DATA_PP1 17 +#define MON_DATA_PP2 18 +#define MON_DATA_PP3 19 +#define MON_DATA_PP4 20 +#define MON_DATA_PP_BONUSES 21 +#define MON_DATA_COOL 22 +#define MON_DATA_BEAUTY 23 +#define MON_DATA_CUTE 24 +#define MON_DATA_EXP 25 +#define MON_DATA_HP_EV 26 +#define MON_DATA_ATK_EV 27 +#define MON_DATA_DEF_EV 28 +#define MON_DATA_SPEED_EV 29 +#define MON_DATA_SPATK_EV 30 +#define MON_DATA_SPDEF_EV 31 +#define MON_DATA_FRIENDSHIP 32 +#define MON_DATA_SMART 33 +#define MON_DATA_POKERUS 34 +#define MON_DATA_MET_LOCATION 35 +#define MON_DATA_MET_LEVEL 36 +#define MON_DATA_MET_GAME 37 +#define MON_DATA_POKEBALL 38 +#define MON_DATA_HP_IV 39 +#define MON_DATA_ATK_IV 40 +#define MON_DATA_DEF_IV 41 +#define MON_DATA_SPEED_IV 42 +#define MON_DATA_SPATK_IV 43 +#define MON_DATA_SPDEF_IV 44 +#define MON_DATA_IS_EGG 45 +#define MON_DATA_ABILITY_NUM 46 +#define MON_DATA_TOUGH 47 +#define MON_DATA_SHEEN 48 +#define MON_DATA_OT_GENDER 49 +#define MON_DATA_COOL_RIBBON 50 +#define MON_DATA_BEAUTY_RIBBON 51 +#define MON_DATA_CUTE_RIBBON 52 +#define MON_DATA_SMART_RIBBON 53 +#define MON_DATA_TOUGH_RIBBON 54 +#define MON_DATA_STATUS 55 +#define MON_DATA_LEVEL 56 +#define MON_DATA_HP 57 +#define MON_DATA_MAX_HP 58 +#define MON_DATA_ATK 59 +#define MON_DATA_DEF 60 +#define MON_DATA_SPEED 61 +#define MON_DATA_SPATK 62 +#define MON_DATA_SPDEF 63 +#define MON_DATA_MAIL 64 +#define MON_DATA_SPECIES_OR_EGG 65 +#define MON_DATA_IVS 66 +#define MON_DATA_CHAMPION_RIBBON 67 +#define MON_DATA_WINNING_RIBBON 68 +#define MON_DATA_VICTORY_RIBBON 69 +#define MON_DATA_ARTIST_RIBBON 70 +#define MON_DATA_EFFORT_RIBBON 71 +#define MON_DATA_MARINE_RIBBON 72 +#define MON_DATA_LAND_RIBBON 73 +#define MON_DATA_SKY_RIBBON 74 +#define MON_DATA_COUNTRY_RIBBON 75 +#define MON_DATA_NATIONAL_RIBBON 76 +#define MON_DATA_EARTH_RIBBON 77 +#define MON_DATA_WORLD_RIBBON 78 +#define MON_DATA_UNUSED_RIBBONS 79 +#define MON_DATA_MODERN_FATEFUL_ENCOUNTER 80 +#define MON_DATA_KNOWN_MOVES 81 +#define MON_DATA_RIBBON_COUNT 82 +#define MON_DATA_RIBBONS 83 +#define MON_DATA_ATK2 84 +#define MON_DATA_DEF2 85 +#define MON_DATA_SPEED2 86 +#define MON_DATA_SPATK2 87 +#define MON_DATA_SPDEF2 88 // Pokemon types #define TYPE_NONE 255 @@ -115,21 +115,21 @@ #define NUMBER_OF_MON_TYPES 18 // Pokemon egg groups -#define EGG_GROUP_NONE 0 -#define EGG_GROUP_MONSTER 1 -#define EGG_GROUP_WATER_1 2 -#define EGG_GROUP_BUG 3 -#define EGG_GROUP_FLYING 4 -#define EGG_GROUP_FIELD 5 -#define EGG_GROUP_FAIRY 6 -#define EGG_GROUP_GRASS 7 -#define EGG_GROUP_HUMAN_LIKE 8 -#define EGG_GROUP_WATER_3 9 -#define EGG_GROUP_MINERAL 10 -#define EGG_GROUP_AMORPHOUS 11 -#define EGG_GROUP_WATER_2 12 -#define EGG_GROUP_DITTO 13 -#define EGG_GROUP_DRAGON 14 +#define EGG_GROUP_NONE 0 +#define EGG_GROUP_MONSTER 1 +#define EGG_GROUP_WATER_1 2 +#define EGG_GROUP_BUG 3 +#define EGG_GROUP_FLYING 4 +#define EGG_GROUP_FIELD 5 +#define EGG_GROUP_FAIRY 6 +#define EGG_GROUP_GRASS 7 +#define EGG_GROUP_HUMAN_LIKE 8 +#define EGG_GROUP_WATER_3 9 +#define EGG_GROUP_MINERAL 10 +#define EGG_GROUP_AMORPHOUS 11 +#define EGG_GROUP_WATER_2 12 +#define EGG_GROUP_DITTO 13 +#define EGG_GROUP_DRAGON 14 #define EGG_GROUP_UNDISCOVERED 15 #define EGG_GROUPS_PER_MON 2 @@ -184,23 +184,29 @@ // Shiny odds #define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536 +#define MAX_LEVEL 100 + +#define OT_ID_PLAYER_ID 0 +#define OT_ID_PRESET 1 +#define OT_ID_RANDOM_NO_SHINY 2 + +#define MON_GIVEN_TO_PARTY 0 +#define MON_GIVEN_TO_PC 1 +#define MON_CANT_GIVE 2 + +#define PLAYER_HAS_TWO_USABLE_MONS 0 +#define PLAYER_HAS_ONE_MON 1 +#define PLAYER_HAS_ONE_USABLE_MON 2 + // Learning moves #define MON_ALREADY_KNOWS_MOVE 0xFFFE #define MON_HAS_MAX_MOVES 0xFFFF -#define PLAYER_HAS_TWO_USABLE_MONS 0x0 -#define PLAYER_HAS_ONE_MON 0x1 -#define PLAYER_HAS_ONE_USABLE_MON 0x2 +#define LEVEL_UP_MOVE_ID 0x01FF +#define LEVEL_UP_MOVE_LV 0xFE00 +#define LEVEL_UP_END 0xFFFF -#define MAX_LEVEL 100 - -#define OT_ID_RANDOM_NO_SHINY 2 -#define OT_ID_PRESET 1 -#define OT_ID_PLAYER_ID 0 - -#define MON_GIVEN_TO_PARTY 0x0 -#define MON_GIVEN_TO_PC 0x1 -#define MON_CANT_GIVE 0x2 +#define MAX_LEVEL_UP_MOVES 20 #define MON_MALE 0x00 #define MON_FEMALE 0xFE @@ -217,6 +223,10 @@ #define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 8 #define FRIENDSHIP_EVENT_FAINT_LARGE 9 +#define MAX_FRIENDSHIP 255 +#define MAX_SHEEN 255 +#define MAX_CONDITION 255 + #define MAX_PER_STAT_IVS 31 #define MAX_IV_MASK 31 #define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1) @@ -224,8 +234,52 @@ #define MAX_TOTAL_EVS 510 #define EV_ITEM_RAISE_LIMIT 100 -#define PARTY_SIZE 6 -#define BOX_NAME_LENGTH 8 +// Battle move flags +#define FLAG_MAKES_CONTACT (1 << 0) +#define FLAG_PROTECT_AFFECTED (1 << 1) +#define FLAG_MAGIC_COAT_AFFECTED (1 << 2) +#define FLAG_SNATCH_AFFECTED (1 << 3) +#define FLAG_MIRROR_MOVE_AFFECTED (1 << 4) +#define FLAG_KINGS_ROCK_AFFECTED (1 << 5) + +// Growth rates +#define GROWTH_MEDIUM_FAST 0 +#define GROWTH_ERRATIC 1 +#define GROWTH_FLUCTUATING 2 +#define GROWTH_MEDIUM_SLOW 3 +#define GROWTH_FAST 4 +#define GROWTH_SLOW 5 + +// Body colors for pokedex search +#define BODY_COLOR_RED 0 +#define BODY_COLOR_BLUE 1 +#define BODY_COLOR_YELLOW 2 +#define BODY_COLOR_GREEN 3 +#define BODY_COLOR_BLACK 4 +#define BODY_COLOR_BROWN 5 +#define BODY_COLOR_PURPLE 6 +#define BODY_COLOR_GRAY 7 +#define BODY_COLOR_WHITE 8 +#define BODY_COLOR_PINK 9 + +// Evolution types +#define EVO_FRIENDSHIP 1 // Pokémon levels up with friendship ≥ 220 +#define EVO_FRIENDSHIP_DAY 2 // Pokémon levels up during the day with friendship ≥ 220 +#define EVO_FRIENDSHIP_NIGHT 3 // Pokémon levels up at night with friendship ≥ 220 +#define EVO_LEVEL 4 // Pokémon reaches the specified level +#define EVO_TRADE 5 // Pokémon is traded +#define EVO_TRADE_ITEM 6 // Pokémon is traded while it's holding the specified item +#define EVO_ITEM 7 // specified item is used on Pokémon +#define EVO_LEVEL_ATK_GT_DEF 8 // Pokémon reaches the specified level with attack > defense +#define EVO_LEVEL_ATK_EQ_DEF 9 // Pokémon reaches the specified level with attack = defense +#define EVO_LEVEL_ATK_LT_DEF 10 // Pokémon reaches the specified level with attack < defense +#define EVO_LEVEL_SILCOON 11 // Pokémon reaches the specified level with a Silcoon personality value +#define EVO_LEVEL_CASCOON 12 // Pokémon reaches the specified level with a Cascoon personality value +#define EVO_LEVEL_NINJASK 13 // Pokémon reaches the specified level (special value for Ninjask) +#define EVO_LEVEL_SHEDINJA 14 // Pokémon reaches the specified level (special value for Shedinja) +#define EVO_BEAUTY 15 // Pokémon levels up with beauty ≥ specified value + +#define EVOS_PER_MON 5 #define EVO_MODE_NORMAL 0 #define EVO_MODE_TRADE 1 @@ -236,6 +290,11 @@ #define MON_PIC_HEIGHT 64 #define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2) +// Most pokemon have 1 frame. There are 2 exceptions: +// - Castform has 4 frames, 1 for each form +// - Deoxys has 2 frames, 1 for each form +#define MAX_MON_PIC_FRAMES 4 + // used by ShouldIgnoreDeoxysForm #define DEOXYS_CHECK_BATTLE_SPRITE 1 #define DEOXYS_CHECK_TRADE_MAIN 3 diff --git a/include/malloc.h b/include/malloc.h index ae66aecb1..bf89badc5 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -14,6 +14,8 @@ ptr = NULL; \ } +#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr) + extern u8 gHeap[]; void *Alloc(u32 size); void *AllocZeroed(u32 size); diff --git a/include/pokemon.h b/include/pokemon.h index 825683fd5..897abe383 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -4,7 +4,6 @@ #include "global.h" #include "sprite.h" #include "constants/pokemon.h" -#include "pokemon_storage_system.h" struct PokemonSubstruct0 { @@ -13,12 +12,13 @@ struct PokemonSubstruct0 u32 experience; u8 ppBonuses; u8 friendship; + u16 filler; }; struct PokemonSubstruct1 { - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; }; struct PokemonSubstruct2 @@ -56,34 +56,50 @@ struct PokemonSubstruct3 /* 0x07 */ u32 isEgg:1; /* 0x07 */ u32 abilityNum:1; - /* 0x08 */ u32 coolRibbon:3; - /* 0x08 */ u32 beautyRibbon:3; - /* 0x08 */ u32 cuteRibbon:3; - /* 0x09 */ u32 smartRibbon:3; - /* 0x09 */ u32 toughRibbon:3; - /* 0x09 */ u32 championRibbon:1; - /* 0x0A */ u32 winningRibbon:1; - /* 0x0A */ u32 victoryRibbon:1; - /* 0x0A */ u32 artistRibbon:1; - /* 0x0A */ u32 effortRibbon:1; - /* 0x0A */ u32 marineRibbon:1; // never distributed - /* 0x0A */ u32 landRibbon:1; // never distributed - /* 0x0A */ u32 skyRibbon:1; // never distributed - /* 0x0A */ u32 countryRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 nationalRibbon:1; - /* 0x0B */ u32 earthRibbon:1; - /* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners - /* 0x0B */ u32 unusedRibbons:4; // discarded in Gen 4 - /* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in FRLG & Gen 4+ summary screens; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness. + /* 0x08 */ u32 coolRibbon:3; // Stores the highest contest rank achieved in the Cool category. + /* 0x08 */ u32 beautyRibbon:3; // Stores the highest contest rank achieved in the Beauty category. + /* 0x08 */ u32 cuteRibbon:3; // Stores the highest contest rank achieved in the Cute category. + /* 0x09 */ u32 smartRibbon:3; // Stores the highest contest rank achieved in the Smart category. + /* 0x09 */ u32 toughRibbon:3; // Stores the highest contest rank achieved in the Tough category. + /* 0x09 */ u32 championRibbon:1; // Given when defeating the Champion. Because both RSE and FRLG use it, later generations don't specify from which region it comes from. + /* 0x0A */ u32 winningRibbon:1; // Given at the Battle Tower's Level 50 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 victoryRibbon:1; // Given at the Battle Tower's Level 100 challenge by winning a set of seven battles that extends the current streak to 56 or more. + /* 0x0A */ u32 artistRibbon:1; // Given at the Contest Hall by winning a Master Rank contest with at least 800 points, and agreeing to have the Pokémon's portrait placed in the museum after being offered. + /* 0x0A */ u32 effortRibbon:1; // Given at Slateport's market to Pokémon with maximum EVs. + /* 0x0A */ u32 marineRibbon:1; // Never distributed. + /* 0x0A */ u32 landRibbon:1; // Never distributed. + /* 0x0A */ u32 skyRibbon:1; // Never distributed. + /* 0x0A */ u32 countryRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 nationalRibbon:1; // Given to purified Shadow Pokémon in Colosseum/XD. + /* 0x0B */ u32 earthRibbon:1; // Given to teams that have beaten Mt. Battle's 100-battle challenge in Colosseum/XD. + /* 0x0B */ u32 worldRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners. + /* 0x0B */ u32 unusedRibbons:4; // Discarded in Gen 4. + + // The functionality of this bit changed in FRLG: + // In RS, this bit does nothing, is never set, & is accidentally unset when hatching Eggs. + // In FRLG & Emerald, this controls Mew & Deoxys obedience and whether they can be traded. + // If set, a Pokémon is a fateful encounter in FRLG's summary screen if hatched & for all Pokémon in Gen 4+ summary screens. + // Set for in-game event island legendaries, events distributed after a certain date, & Pokémon from XD: Gale of Darkness. + // Not to be confused with METLOC_FATEFUL_ENCOUNTER. + /* 0x0B */ u32 modernFatefulEncounter:1; }; +// Number of bytes in the largest Pokémon substruct. +// They are assumed to be the same size, and will be padded to +// the largest size by the union. +// By default they are all 12 bytes. +#define NUM_SUBSTRUCT_BYTES (max(sizeof(struct PokemonSubstruct0), \ + max(sizeof(struct PokemonSubstruct1), \ + max(sizeof(struct PokemonSubstruct2), \ + sizeof(struct PokemonSubstruct3))))) + union PokemonSubstruct { struct PokemonSubstruct0 type0; struct PokemonSubstruct1 type1; struct PokemonSubstruct2 type2; struct PokemonSubstruct3 type3; - u16 raw[6]; + u16 raw[NUM_SUBSTRUCT_BYTES / 2]; // /2 because it's u16, not u8 }; struct BoxPokemon @@ -103,7 +119,7 @@ struct BoxPokemon union { - u32 raw[12]; + u32 raw[(NUM_SUBSTRUCT_BYTES * 4) / 4]; // *4 because there are 4 substructs, /4 because it's u32, not u8 union PokemonSubstruct substructs[4]; } secure; }; @@ -123,19 +139,11 @@ struct Pokemon u16 spDefense; }; -struct PokemonStorage -{ - /*0x0000*/ u8 currentBox; - /*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]; - /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][BOX_NAME_LENGTH + 1]; - /*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT]; -}; - struct BattleTowerPokemon { /*0x00*/ u16 species; /*0x02*/ u16 heldItem; - /*0x04*/ u16 moves[4]; + /*0x04*/ u16 moves[MAX_MON_MOVES]; /*0x0C*/ u8 level; /*0x0D*/ u8 ppBonuses; /*0x0E*/ u8 hpEV; @@ -154,12 +162,10 @@ struct BattleTowerPokemon u32 gap:1; u32 abilityNum:1; /*0x1C*/ u32 personality; - /*0x20*/ u8 nickname[11]; + /*0x20*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x2B*/ u8 friendship; }; -#define BATTLE_STATS_NO 8 - struct BattlePokemon { /*0x00*/ u16 species; @@ -168,7 +174,7 @@ struct BattlePokemon /*0x06*/ u16 speed; /*0x08*/ u16 spAttack; /*0x0A*/ u16 spDefense; - /*0x0C*/ u16 moves[4]; + /*0x0C*/ u16 moves[MAX_MON_MOVES]; /*0x14*/ u32 hpIV:5; /*0x14*/ u32 attackIV:5; /*0x15*/ u32 defenseIV:5; @@ -177,12 +183,12 @@ struct BattlePokemon /*0x17*/ u32 spDefenseIV:5; /*0x17*/ u32 isEgg:1; /*0x17*/ u32 abilityNum:1; - /*0x18*/ s8 statStages[BATTLE_STATS_NO]; + /*0x18*/ s8 statStages[NUM_BATTLE_STATS]; /*0x20*/ u8 ability; /*0x21*/ u8 type1; /*0x22*/ u8 type2; /*0x23*/ u8 unknown; - /*0x24*/ u8 pp[4]; + /*0x24*/ u8 pp[MAX_MON_MOVES]; /*0x28*/ u16 hp; /*0x2A*/ u8 level; /*0x2B*/ u8 friendship; @@ -190,7 +196,7 @@ struct BattlePokemon /*0x2E*/ u16 item; /*0x30*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; /*0x3B*/ u8 ppBonuses; - /*0x3C*/ u8 otName[8]; + /*0x3C*/ u8 otName[PLAYER_NAME_LENGTH + 1]; /*0x44*/ u32 experience; /*0x48*/ u32 personality; /*0x4C*/ u32 status1; @@ -198,7 +204,7 @@ struct BattlePokemon /*0x54*/ u32 otId; }; -struct BaseStats +struct SpeciesInfo { /* 0x00 */ u8 baseHP; /* 0x01 */ u8 baseAttack; @@ -206,8 +212,7 @@ struct BaseStats /* 0x03 */ u8 baseSpeed; /* 0x04 */ u8 baseSpAttack; /* 0x05 */ u8 baseSpDefense; - /* 0x06 */ u8 type1; - /* 0x07 */ u8 type2; + /* 0x06 */ u8 types[2]; /* 0x08 */ u8 catchRate; /* 0x09 */ u8 expYield; /* 0x0A */ u16 evYield_HP:2; @@ -216,14 +221,13 @@ struct BaseStats /* 0x0A */ u16 evYield_Speed:2; /* 0x0B */ u16 evYield_SpAttack:2; /* 0x0B */ u16 evYield_SpDefense:2; - /* 0x0C */ u16 item1; - /* 0x0E */ u16 item2; + /* 0x0C */ u16 itemCommon; + /* 0x0E */ u16 itemRare; /* 0x10 */ u8 genderRatio; /* 0x11 */ u8 eggCycles; /* 0x12 */ u8 friendship; /* 0x13 */ u8 growthRate; - /* 0x14 */ u8 eggGroup1; - /* 0x15 */ u8 eggGroup2; + /* 0x14 */ u8 eggGroups[2]; /* 0x16 */ u8 abilities[2]; /* 0x18 */ u8 safariZoneFleeRate; /* 0x19 */ u8 bodyColor : 7; @@ -243,20 +247,13 @@ struct BattleMove u8 flags; }; -extern const struct BattleMove gBattleMoves[]; - -// Battle move flags -#define FLAG_MAKES_CONTACT (1 << 0) -#define FLAG_PROTECT_AFFECTED (1 << 1) -#define FLAG_MAGIC_COAT_AFFECTED (1 << 2) -#define FLAG_SNATCH_AFFECTED (1 << 3) -#define FLAG_MIRROR_MOVE_AFFECTED (1 << 4) -#define FLAG_KINGS_ROCK_AFFECTED (1 << 5) +#define SPINDA_SPOT_WIDTH 16 +#define SPINDA_SPOT_HEIGHT 16 struct SpindaSpot { u8 x, y; - u16 image[16]; + u16 image[SPINDA_SPOT_HEIGHT]; }; struct __attribute__((packed)) LevelUpMove @@ -265,46 +262,6 @@ struct __attribute__((packed)) LevelUpMove u16 level:7; }; -enum -{ - GROWTH_MEDIUM_FAST, - GROWTH_ERRATIC, - GROWTH_FLUCTUATING, - GROWTH_MEDIUM_SLOW, - GROWTH_FAST, - GROWTH_SLOW -}; - -enum -{ - BODY_COLOR_RED, - BODY_COLOR_BLUE, - BODY_COLOR_YELLOW, - BODY_COLOR_GREEN, - BODY_COLOR_BLACK, - BODY_COLOR_BROWN, - BODY_COLOR_PURPLE, - BODY_COLOR_GRAY, - BODY_COLOR_WHITE, - BODY_COLOR_PINK -}; - -#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220 -#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220 -#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220 -#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level -#define EVO_TRADE 0x0005 // Pokémon is traded -#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item -#define EVO_ITEM 0x0007 // specified item is used on Pokémon -#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense -#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense -#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense -#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value -#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value -#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask) -#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja) -#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value - struct Evolution { u16 method; @@ -312,8 +269,6 @@ struct Evolution u16 targetSpecies; }; -#define EVOS_PER_MON 5 - #define NUM_UNOWN_FORMS 28 #define GET_UNOWN_LETTER(personality) (( \ @@ -323,11 +278,14 @@ struct Evolution | (((personality) & 0x00000003) >> 0) \ ) % NUM_UNOWN_FORMS) +#define GET_SHINY_VALUE(otId, personality) (HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality)) + +extern const struct BattleMove gBattleMoves[]; extern u8 gPlayerPartyCount; extern struct Pokemon gPlayerParty[PARTY_SIZE]; extern u8 gEnemyPartyCount; extern struct Pokemon gEnemyParty[PARTY_SIZE]; -extern const struct BaseStats gBaseStats[]; +extern const struct SpeciesInfo gSpeciesInfo[]; extern const u8 *const gItemEffectTable[]; extern const u8 gStatStageRatios[][2]; extern struct SpriteTemplate gMultiuseSpriteTemplate; @@ -459,11 +417,11 @@ bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId); void SetDeoxysStats(void); u16 GetUnionRoomTrainerPic(void); u16 GetUnionRoomTrainerClass(void); -void CreateEventLegalEnemyMon(void); +void CreateEnemyEventMon(void); void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 bank); -struct OakSpeechNidoranFStruct *OakSpeechNidoranFSetup(u8 battlePosition, bool8 enable); -void OakSpeechNidoranFFreeResources(void); -void *OakSpeechNidoranFGetBuffer(u8 bufferId); +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 battlePosition, u8 mode); +void DestroyMonSpritesGfxManager(void); +u8 *MonSpritesGfxManager_GetSpritePtr(u8 bufferId); #endif // GUARD_POKEMON_H diff --git a/include/pokemon_storage_system.h b/include/pokemon_storage_system.h index 388d3dba5..745e9d8b7 100644 --- a/include/pokemon_storage_system.h +++ b/include/pokemon_storage_system.h @@ -2,11 +2,13 @@ #define GUARD_POKEMON_STORAGE_SYSTEM_H #include "global.h" +#include "pokemon.h" #define TOTAL_BOXES_COUNT 14 #define IN_BOX_ROWS 5 // Number of rows, 6 Pokémon per row #define IN_BOX_COLUMNS 6 // Number of columns, 5 Pokémon per column #define IN_BOX_COUNT (IN_BOX_ROWS * IN_BOX_COLUMNS) +#define BOX_NAME_LENGTH 8 /* COLUMNS @@ -39,6 +41,14 @@ enum }; #define MAX_DEFAULT_WALLPAPER WALLPAPER_SAVANNA +struct PokemonStorage +{ + /*0x0000*/ u8 currentBox; + /*0x0001*/ struct BoxPokemon boxes[TOTAL_BOXES_COUNT][IN_BOX_COUNT]; + /*0x8344*/ u8 boxNames[TOTAL_BOXES_COUNT][BOX_NAME_LENGTH + 1]; + /*0x83C2*/ u8 boxWallpapers[TOTAL_BOXES_COUNT]; +}; + u8 *GetBoxNamePtr(u8 boxNumber); struct BoxPokemon *GetBoxedMonPtr(u8 boxId, u8 monPosition); void SetBoxMonNickAt(u8 boxId, u8 monPosition, const u8 *newNick); diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index 253f03c02..4df9977bc 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -1113,8 +1113,8 @@ static void Cmd_count_alive_pokemon(void) { if (i != battlerOnField1 && i != battlerOnField2 && GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) { AI_THINKING_STRUCT->funcResult++; } @@ -1165,25 +1165,25 @@ static void Cmd_get_ability(void) return; } - if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) + if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE) { - if (gBaseStats[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) + if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] != ABILITY_NONE) { // AI has no knowledge of opponent, so it guesses which ability. if (Random() % 2) - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; else - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; } else { - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[0]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0]; } } else { // AI can't actually reach this part since no pokemon has ability 2 and no ability 1. - AI_THINKING_STRUCT->funcResult = gBaseStats[gBattleMons[battlerId].species].abilities[1]; + AI_THINKING_STRUCT->funcResult = gSpeciesInfo[gBattleMons[battlerId].species].abilities[1]; } } else diff --git a/src/battle_ai_switch_items.c b/src/battle_ai_switch_items.c index f459a9eb1..73c013cfa 100644 --- a/src/battle_ai_switch_items.c +++ b/src/battle_ai_switch_items.c @@ -54,8 +54,8 @@ static bool8 ShouldSwitchIfWonderGuard(void) for (i = 0; i < PARTY_SIZE; ++i) { if (GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0 - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG || i == gBattlerPartyIndexes[gActiveBattler]) continue; GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); // Unused return value. @@ -120,8 +120,8 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) u8 monAbility; if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -129,9 +129,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void) continue; species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - monAbility = gBaseStats[species].abilities[1]; + monAbility = gSpeciesInfo[species].abilities[1]; else - monAbility = gBaseStats[species].abilities[0]; + monAbility = gSpeciesInfo[species].abilities[0]; if (absorbingTypeAbility == monAbility && Random() & 1) { // we found a mon @@ -265,8 +265,8 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) u8 monAbility; if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -274,9 +274,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent) continue; species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES); if (GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - monAbility = gBaseStats[species].abilities[1]; + monAbility = gSpeciesInfo[species].abilities[1]; else - monAbility = gBaseStats[species].abilities[0]; + monAbility = gSpeciesInfo[species].abilities[0]; moveFlags = AI_TypeCalc(gLastLandedMoves[gActiveBattler], species, monAbility); if (moveFlags & flags) { @@ -330,8 +330,8 @@ static bool8 ShouldSwitch(void) for (i = 0; i < PARTY_SIZE; ++i) { if ((GetMonData(&gEnemyParty[i], MON_DATA_HP) == 0) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE) - || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) + || (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) || (i == gBattlerPartyIndexes[battlerIn1]) || (i == gBattlerPartyIndexes[battlerIn2]) || (i == *(gBattleStruct->monToSwitchIntoId + battlerIn1)) @@ -472,8 +472,8 @@ u8 GetMostSuitableMonToSwitchInto(void) && i != *(gBattleStruct->monToSwitchIntoId + battlerIn1) && i != *(gBattleStruct->monToSwitchIntoId + battlerIn2)) { - u8 type1 = gBaseStats[species].type1; - u8 type2 = gBaseStats[species].type2; + u8 type1 = gSpeciesInfo[species].types[0]; + u8 type2 = gSpeciesInfo[species].types[1]; u8 typeDmg = 10; ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type1, type1, type2, &typeDmg); ModulateByTypeEffectiveness(gBattleMons[opposingBattler].type2, type1, type2, &typeDmg); @@ -551,9 +551,9 @@ static u8 GetAI_ItemType(u8 itemId, const u8 *itemEffect) // NOTE: should take u return AI_ITEM_HEAL_HP; else if (itemEffect[3] & ITEM3_STATUS_ALL) return AI_ITEM_CURE_CONDITION; - else if (itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0) + else if (itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK) || itemEffect[1] != 0 || itemEffect[2] != 0) return AI_ITEM_X_STAT; - else if (itemEffect[3] & ITEM3_MIST) + else if (itemEffect[3] & ITEM3_GUARD_SPEC) return AI_ITEM_GUARD_SPECS; else return AI_ITEM_NOT_RECOGNIZABLE; @@ -567,8 +567,8 @@ static bool8 ShouldUseItem(void) for (i = 0; i < PARTY_SIZE; ++i) if (GetMonData(&gEnemyParty[i], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) ++validMons; for (i = 0; i < MAX_TRAINER_ITEMS; ++i) { @@ -650,7 +650,7 @@ static bool8 ShouldUseItem(void) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8; if (itemEffects[2] & ITEM2_X_ACCURACY) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20; - if (itemEffects[0] & ITEM0_HIGH_CRIT) + if (itemEffects[0] & ITEM0_DIRE_HIT) *(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80; shouldUse = TRUE; break; diff --git a/src/battle_controller_oak_old_man.c b/src/battle_controller_oak_old_man.c index cf9ef722a..0e0fd8784 100644 --- a/src/battle_controller_oak_old_man.c +++ b/src/battle_controller_oak_old_man.c @@ -470,7 +470,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -512,11 +512,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -548,7 +548,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index 64a47823f..c9afab61f 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1031,7 +1031,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -1073,11 +1073,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -1109,7 +1109,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controller_pokedude.c b/src/battle_controller_pokedude.c index 3b1084aa4..ca052a025 100644 --- a/src/battle_controller_pokedude.c +++ b/src/battle_controller_pokedude.c @@ -451,7 +451,7 @@ static void Task_GiveExpToMon(u8 taskId) u16 species = GetMonData(mon, MON_DATA_SPECIES); u8 level = GetMonData(mon, MON_DATA_LEVEL); u32 currExp = GetMonData(mon, MON_DATA_EXP); - u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= nextLvlExp) { @@ -493,11 +493,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId) u8 level = GetMonData(mon, MON_DATA_LEVEL); u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 exp = GetMonData(mon, MON_DATA_EXP); - u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level]; + u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; u32 expToNextLvl; exp -= currLvlExp; - expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp; + expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp; SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp); PlaySE(SE_EXP); gTasks[taskId].func = Task_GiveExpWithExpBar; @@ -529,7 +529,7 @@ static void Task_GiveExpWithExpBar(u8 taskId) level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP); species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES); - expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1]; + expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1]; if (currExp + gainedExp >= expOnNextLvl) { u8 savedActiveBattler; diff --git a/src/battle_controllers.c b/src/battle_controllers.c index e877a1c08..a2662c39a 100644 --- a/src/battle_controllers.c +++ b/src/battle_controllers.c @@ -302,8 +302,8 @@ static void SetBattlePartyIds(void) if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER) { if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0 - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG)) { gBattlerPartyIndexes[i] = j; @@ -313,8 +313,8 @@ static void SetBattlePartyIds(void) else { if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG)) { gBattlerPartyIndexes[i] = j; @@ -328,7 +328,7 @@ static void SetBattlePartyIds(void) { if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0 && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2. - && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG) && gBattlerPartyIndexes[i - 2] != j) { @@ -339,8 +339,8 @@ static void SetBattlePartyIds(void) else { if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0 - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG) && gBattlerPartyIndexes[i - 2] != j) { diff --git a/src/battle_interface.c b/src/battle_interface.c index 22dc43acb..feb590f5b 100644 --- a/src/battle_interface.c +++ b/src/battle_interface.c @@ -1811,9 +1811,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem species = GetMonData(mon, MON_DATA_SPECIES); level = GetMonData(mon, MON_DATA_LEVEL); exp = GetMonData(mon, MON_DATA_EXP); - currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level]; + currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level]; currExpBarValue = exp - currLevelExp; - maxExpBarValue = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLevelExp; + maxExpBarValue = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLevelExp; SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles); MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0); } diff --git a/src/battle_main.c b/src/battle_main.c index 40a797e2a..bb34635b4 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -715,33 +715,33 @@ static void CB2_InitBattleInternal(void) gBattleCommunication[MULTIUSE_STATE] = 0; } -#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ - for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ - { \ - u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \ - u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ - u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ - \ - if (species == SPECIES_NONE) \ - continue; \ - \ - /* Is healthy mon? */ \ - if (species != SPECIES_EGG && hp != 0 && status == 0) \ - (flags) |= 1 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is Egg or statused? */ \ - if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ - (flags) |= 2 << (i) * 2; \ - \ - if (species == SPECIES_NONE) /* Redundant */ \ - continue; \ - \ - /* Is fainted? */ \ - if (species != SPECIES_EGG && hp == 0) \ - (flags) |= 3 << (i) * 2; \ +#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \ + for ((i) = 0; (i) < PARTY_SIZE; (i)++) \ + { \ + u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \ + u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \ + u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \ + \ + if (species == SPECIES_NONE) \ + continue; \ + \ + /* Is healthy mon? */ \ + if (species != SPECIES_EGG && hp != 0 && status == 0) \ + (flags) |= 1 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is Egg or statused? */ \ + if (hp != 0 && (species == SPECIES_EGG || status != 0)) \ + (flags) |= 2 << (i) * 2; \ + \ + if (species == SPECIES_NONE) /* Redundant */ \ + continue; \ + \ + /* Is fainted? */ \ + if (species != SPECIES_EGG && hp == 0) \ + (flags) |= 3 << (i) * 2; \ } // For Vs Screen at link battle start @@ -2277,8 +2277,8 @@ static void BattleStartClearSetData(void) gBattleStruct->runTries = 0; gBattleStruct->safariRockThrowCounter = 0; gBattleStruct->safariBaitThrowCounter = 0; - *(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; - *(&gBattleStruct->safariEscapeFactor) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275; + *(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; + *(&gBattleStruct->safariEscapeFactor) = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].safariZoneFleeRate * 100 / 1275; if (gBattleStruct->safariEscapeFactor <= 1) gBattleStruct->safariEscapeFactor = 2; gBattleStruct->wildVictorySong = 0; @@ -2508,8 +2508,8 @@ void FaintClearSetData(void) *(i * 8 + gActiveBattler * 2 + (u8 *)(gBattleStruct->lastTakenMoveFrom) + 1) = 0; } gBattleResources->flags->flags[gActiveBattler] = 0; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; } static void BattleIntroGetMonsData(void) @@ -2573,8 +2573,8 @@ static void BattleIntroDrawTrainersOrMonsSprites(void) for (i = 0; i < sizeof(struct BattlePokemon); i++) ptr[i] = gBattleBufferB[gActiveBattler][4 + i]; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)]; *hpOnSwitchout = gBattleMons[gActiveBattler].hp; @@ -2651,8 +2651,8 @@ static void BattleIntroDrawPartySummaryScreens(void) { for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -2669,8 +2669,8 @@ static void BattleIntroDrawPartySummaryScreens(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -2695,8 +2695,8 @@ static void BattleIntroDrawPartySummaryScreens(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatus[i].hp = HP_EMPTY_SLOT; hpStatus[i].status = 0; @@ -4337,7 +4337,7 @@ static void HandleAction_WatchesCarefully(void) --gBattleStruct->safariRockThrowCounter; if (gBattleStruct->safariRockThrowCounter == 0) { - *(&gBattleStruct->safariCatchFactor) = gBaseStats[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275; + *(&gBattleStruct->safariCatchFactor) = gSpeciesInfo[GetMonData(gEnemyParty, MON_DATA_SPECIES)].catchRate * 100 / 1275; gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MON_WATCHING; } else diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index d9a2ee160..6450a952e 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1514,7 +1514,7 @@ u8 AI_TypeCalc(u16 move, u16 targetSpecies, u8 targetAbility) { s32 i = 0; u8 flags = 0; - u8 type1 = gBaseStats[targetSpecies].type1, type2 = gBaseStats[targetSpecies].type2; + u8 type1 = gSpeciesInfo[targetSpecies].types[0], type2 = gSpeciesInfo[targetSpecies].types[1]; u8 moveType; if (move == MOVE_STRUGGLE) @@ -3163,7 +3163,7 @@ static void Cmd_getexp(void) viaExpShare++; } - calculatedExp = gBaseStats[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7; + calculatedExp = gSpeciesInfo[gBattleMons[gBattlerFainted].species].expYield * gBattleMons[gBattlerFainted].level / 7; if (viaExpShare) // at least one mon is getting exp via exp share { @@ -4480,8 +4480,8 @@ static void Cmd_switchindataupdate(void) for (i = 0; i < sizeof(struct BattlePokemon); i++) monData[i] = gBattleBufferB[gActiveBattler][4 + i]; - gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1; - gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2; + gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[0]; + gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].types[1]; gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum); // check knocked off item @@ -5453,8 +5453,8 @@ static void Cmd_drawpartystatussummary(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE - || GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE + || GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) { hpStatuses[i].hp = 0xFFFF; hpStatuses[i].status = 0; @@ -6168,7 +6168,7 @@ static void Cmd_various(void) } for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); abilityNum = GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM); status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); if (species != SPECIES_NONE @@ -6188,7 +6188,7 @@ static void Cmd_various(void) monToCheck = 0; for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG); abilityNum = GetMonData(&gEnemyParty[i], MON_DATA_ABILITY_NUM); status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS); @@ -8041,7 +8041,7 @@ static void Cmd_healpartystatus(void) for (i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&party[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG); u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM); if (species != SPECIES_NONE && species != SPECIES_EGG) @@ -8587,8 +8587,8 @@ static void Cmd_trydobeatup(void) for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++) { if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) - && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) + && GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS)) break; } @@ -8598,10 +8598,10 @@ static void Cmd_trydobeatup(void) gBattlescriptCurrInstr += 9; - gBattleMoveDamage = gBaseStats[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; + gBattleMoveDamage = gSpeciesInfo[GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES)].baseAttack; gBattleMoveDamage *= gBattleMoves[gCurrentMove].power; gBattleMoveDamage *= (GetMonData(&party[gBattleCommunication[0]], MON_DATA_LEVEL) * 2 / 5 + 2); - gBattleMoveDamage /= gBaseStats[gBattleMons[gBattlerTarget].species].baseDefense; + gBattleMoveDamage /= gSpeciesInfo[gBattleMons[gBattlerTarget].species].baseDefense; gBattleMoveDamage = (gBattleMoveDamage / 50) + 2; if (gProtectStructs[gBattlerAttacker].helpingHand) gBattleMoveDamage = gBattleMoveDamage * 15 / 10; @@ -9104,9 +9104,9 @@ static void Cmd_assistattackselect(void) { if (monId == gBattlerPartyIndexes[gBattlerAttacker]) continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE) + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE) continue; - if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG) + if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG) continue; for (moveId = 0; moveId < MAX_MON_MOVES; moveId++) @@ -9267,12 +9267,12 @@ static void Cmd_pickup(void) for (i = 0; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM) != ABILITY_NONE) - ability = gBaseStats[species].abilities[1]; + ability = gSpeciesInfo[species].abilities[1]; else - ability = gBaseStats[species].abilities[0]; + ability = gSpeciesInfo[species].abilities[0]; if (ability == ABILITY_PICKUP && species != SPECIES_NONE && species != SPECIES_EGG && heldItem == ITEM_NONE && !(Random() % 10)) { s32 random = Random() % 100; @@ -9496,7 +9496,7 @@ static void Cmd_handleballthrow(void) if (gLastUsedItem == ITEM_SAFARI_BALL) catchRate = gBattleStruct->safariCatchFactor * 1275 / 100; else - catchRate = gBaseStats[gBattleMons[gBattlerTarget].species].catchRate; + catchRate = gSpeciesInfo[gBattleMons[gBattlerTarget].species].catchRate; if (gLastUsedItem > ITEM_SAFARI_BALL) { diff --git a/src/battle_setup.c b/src/battle_setup.c index 36c9eac1b..3ad8f180d 100644 --- a/src/battle_setup.c +++ b/src/battle_setup.c @@ -545,7 +545,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons) for (i = 0; i < PARTY_SIZE; ++i) { - u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0) { diff --git a/src/battle_tower.c b/src/battle_tower.c index 9586b2dee..e6e4f2472 100644 --- a/src/battle_tower.c +++ b/src/battle_tower.c @@ -796,7 +796,7 @@ void CheckPartyBattleTowerBanlist(void) for (i = 0; i < PARTY_SIZE; i++) { - species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species2 = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM); level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); diff --git a/src/battle_util.c b/src/battle_util.c index be2422ff7..f28afe05f 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -1560,8 +1560,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) break; } return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE); @@ -1589,8 +1589,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&party[i], MON_DATA_HP) != 0 - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE - && GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE + && GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG && i != partyIdBattlerOn1 && i != partyIdBattlerOn2 && i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId]) break; @@ -3130,14 +3130,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget) return targetBattler; } -static bool32 IsMonEventLegal(u8 battlerId) +static bool32 IsBattlerModernFatefulEncounter(u8 battlerId) { if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT) return TRUE; if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS && GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW) return TRUE; - return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL); + return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); } u8 IsMonDisobedient(void) @@ -3151,7 +3151,7 @@ u8 IsMonDisobedient(void) if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT) return 0; - if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys + if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys { if (!IsOtherTrainer(gBattleMons[gBattlerAttacker].otId, gBattleMons[gBattlerAttacker].otName)) return 0; diff --git a/src/data/items.json b/src/data/items.json index 25c9056ff..0a87abbe8 100644 --- a/src/data/items.json +++ b/src/data/items.json @@ -2948,7 +2948,7 @@ "english": "SOOTHE BELL", "itemId": "ITEM_SOOTHE_BELL", "price": 100, - "holdEffect": "HOLD_EFFECT_HAPPINESS_UP", + "holdEffect": "HOLD_EFFECT_FRIENDSHIP_UP", "holdEffectParam": 0, "description_english": "An item to be held by a POKéMON.\\nA bell with a comforting chime that\\nmakes the holder calm and friendly.", "importance": 0, diff --git a/src/data/pokemon/item_effects.h b/src/data/pokemon/item_effects.h index 31a78a748..db57298b6 100644 --- a/src/data/pokemon/item_effects.h +++ b/src/data/pokemon/item_effects.h @@ -1,6 +1,6 @@ static const u8 sItemEffect_Potion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 20, + [6] = 20, // Amount of HP to recover }; static const u8 sItemEffect_Antidote[6] = { @@ -26,22 +26,22 @@ static const u8 sItemEffect_ParalyzeHeal[6] = { static const u8 sItemEffect_FullRestore[7] = { [3] = ITEM3_STATUS_ALL, [4] = ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_MaxPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_HyperPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 200, + [6] = 200, // Amount of HP to recover }; static const u8 sItemEffect_SuperPotion[7] = { [4] = ITEM4_HEAL_HP, - [6] = 50, + [6] = 50, // Amount of HP to recover }; static const u8 sItemEffect_FullHeal[6] = { @@ -50,87 +50,87 @@ static const u8 sItemEffect_FullHeal[6] = { static const u8 sItemEffect_Revive[7] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -2, + [6] = ITEM6_HEAL_HP_HALF, }; static const u8 sItemEffect_MaxRevive[7] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; static const u8 sItemEffect_FreshWater[7] = { [4] = ITEM4_HEAL_HP, - [6] = 50, + [6] = 50, // Amount of HP to recover }; static const u8 sItemEffect_SodaPop[7] = { [4] = ITEM4_HEAL_HP, - [6] = 60, + [6] = 60, // Amount of HP to recover }; static const u8 sItemEffect_Lemonade[7] = { [4] = ITEM4_HEAL_HP, - [6] = 80, + [6] = 80, // Amount of HP to recover }; static const u8 sItemEffect_MoomooMilk[7] = { [4] = ITEM4_HEAL_HP, - [6] = 100, + [6] = 100, // Amount of HP to recover }; static const u8 sItemEffect_EnergyPowder[10] = { [4] = ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 50, - [7] = -5, - [8] = -5, - [9] = -10, + [6] = 50, // Amount of HP to recover + [7] = -5, // Friendship change, low + [8] = -5, // Friendship change, mid + [9] = -10, // Friendship change, high }; static const u8 sItemEffect_EnergyRoot[10] = { [4] = ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 200, - [7] = -10, - [8] = -10, - [9] = -15, + [6] = 200, // Amount of HP to recover + [7] = -10, // Friendship change, low + [8] = -10, // Friendship change, mid + [9] = -15, // Friendship change, high }; static const u8 sItemEffect_HealPowder[9] = { [3] = ITEM3_STATUS_ALL, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = -5, - [7] = -5, - [8] = -10, + [6] = -5, // Friendship change, low + [7] = -5, // Friendship change, mid + [8] = -10, // Friendship change, high }; static const u8 sItemEffect_RevivalHerb[10] = { [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = -1, - [7] = -15, - [8] = -15, - [9] = -20, + [6] = ITEM6_HEAL_HP_FULL, + [7] = -15, // Friendship change, low + [8] = -15, // Friendship change, mid + [9] = -20, // Friendship change, high }; static const u8 sItemEffect_Ether[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_MaxEther[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 0x7F, + [6] = ITEM6_HEAL_PP_FULL, }; static const u8 sItemEffect_Elixir[7] = { [4] = ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_MaxElixir[7] = { [4] = ITEM4_HEAL_PP_ALL, - [6] = 0x7F, + [6] = ITEM6_HEAL_PP_FULL, }; static const u8 sItemEffect_LavaCookie[6] = { @@ -151,137 +151,121 @@ static const u8 sItemEffect_RedFlute[6] = { static const u8 sItemEffect_BerryJuice[7] = { [4] = ITEM4_HEAL_HP, - [6] = 20, + [6] = 20, // Amount of HP to recover }; static const u8 sItemEffect_SacredAsh[7] = { [0] = ITEM0_SACRED_ASH, [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, - [6] = -1, + [6] = ITEM6_HEAL_HP_FULL, }; +#define VITAMIN_FRIENDSHIP_CHANGE(i) \ + [(i) + 0] = 5, /* Friendship change, low */ \ + [(i) + 1] = 3, /* Friendship change, mid */ \ + [(i) + 2] = 2 /* Friendship change, high */ + static const u8 sItemEffect_HPUp[10] = { [4] = ITEM4_EV_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Protein[10] = { [4] = ITEM4_EV_ATK, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Iron[10] = { [5] = ITEM5_EV_DEF | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Carbos[10] = { [5] = ITEM5_EV_SPEED | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_Calcium[10] = { [5] = ITEM5_EV_SPATK | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_RareCandy[10] = { [3] = ITEM3_LEVEL_UP, [4] = ITEM4_REVIVE | ITEM4_HEAL_HP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 0xFD, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_HEAL_HP_LVL_UP, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_PPUp[9] = { [4] = ITEM4_PP_UP, [5] = ITEM5_FRIENDSHIP_ALL, - [6] = 5, - [7] = 3, - [8] = 2, + VITAMIN_FRIENDSHIP_CHANGE(6), }; static const u8 sItemEffect_Zinc[10] = { [5] = ITEM5_EV_SPDEF | ITEM5_FRIENDSHIP_ALL, - [6] = 10, - [7] = 5, - [8] = 3, - [9] = 2, + [6] = ITEM6_ADD_EV, + VITAMIN_FRIENDSHIP_CHANGE(7), }; static const u8 sItemEffect_PPMax[9] = { [5] = ITEM5_PP_MAX | ITEM5_FRIENDSHIP_ALL, - [6] = 5, - [7] = 3, - [8] = 2, + VITAMIN_FRIENDSHIP_CHANGE(6), }; +#define STAT_BOOST_FRIENDSHIP_CHANGE \ + [6] = 1, /* Friendship change, low */ \ + [7] = 1 /* Friendship change, mid */ + static const u8 sItemEffect_GuardSpec[8] = { - [3] = ITEM3_MIST, + [3] = ITEM3_GUARD_SPEC, [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_DireHit[8] = { - [0] = 2 << 4, + [0] = 2 << 4, // ITEM0_DIRE_HIT [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_XAttack[8] = { - [0] = 1, + [0] = 1, // ITEM0_X_ATTACK [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE }; static const u8 sItemEffect_XDefend[8] = { - [1] = 1 << 4, + [1] = 1 << 4, /// ITEM1_X_DEFEND [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XSpeed[8] = { - [1] = 1, + [1] = 1, // ITEM1_X_SPEED [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XAccuracy[8] = { - [2] = 1 << 4, + [2] = 1 << 4, // ITEM2_X_ACCURACY [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_XSpecial[8] = { - [2] = 1, + [2] = 1, // ITEM2_X_SPATK [5] = ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID, - [6] = 1, - [7] = 1, + STAT_BOOST_FRIENDSHIP_CHANGE, }; static const u8 sItemEffect_SunStone[6] = { @@ -330,12 +314,12 @@ static const u8 sItemEffect_AspearBerry[6] = { static const u8 sItemEffect_LeppaBerry[7] = { [4] = ITEM4_HEAL_PP_ONE | ITEM4_HEAL_PP_ALL, - [6] = 10, + [6] = 10, // Amount of PP to recover }; static const u8 sItemEffect_OranBerry[7] = { [4] = ITEM4_HEAL_HP, - [6] = 10, + [6] = 10, // Amount of HP to recover }; static const u8 sItemEffect_PersimBerry[6] = { @@ -348,73 +332,73 @@ static const u8 sItemEffect_LumBerry[6] = { static const u8 sItemEffect_SitrusBerry[7] = { [4] = ITEM4_HEAL_HP, - [6] = 30, + [6] = 30, // Amount of HP to recover }; const u8 *const gItemEffectTable[] = { - [ITEM_POTION - ITEM_POTION] = sItemEffect_Potion, - [ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote, - [ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal, - [ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal, - [ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening, + [ITEM_POTION - ITEM_POTION] = sItemEffect_Potion, + [ITEM_ANTIDOTE - ITEM_POTION] = sItemEffect_Antidote, + [ITEM_BURN_HEAL - ITEM_POTION] = sItemEffect_BurnHeal, + [ITEM_ICE_HEAL - ITEM_POTION] = sItemEffect_IceHeal, + [ITEM_AWAKENING - ITEM_POTION] = sItemEffect_Awakening, [ITEM_PARALYZE_HEAL - ITEM_POTION] = sItemEffect_ParalyzeHeal, - [ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore, - [ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion, - [ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion, - [ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion, - [ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal, - [ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive, - [ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive, - [ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater, - [ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop, - [ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade, - [ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk, + [ITEM_FULL_RESTORE - ITEM_POTION] = sItemEffect_FullRestore, + [ITEM_MAX_POTION - ITEM_POTION] = sItemEffect_MaxPotion, + [ITEM_HYPER_POTION - ITEM_POTION] = sItemEffect_HyperPotion, + [ITEM_SUPER_POTION - ITEM_POTION] = sItemEffect_SuperPotion, + [ITEM_FULL_HEAL - ITEM_POTION] = sItemEffect_FullHeal, + [ITEM_REVIVE - ITEM_POTION] = sItemEffect_Revive, + [ITEM_MAX_REVIVE - ITEM_POTION] = sItemEffect_MaxRevive, + [ITEM_FRESH_WATER - ITEM_POTION] = sItemEffect_FreshWater, + [ITEM_SODA_POP - ITEM_POTION] = sItemEffect_SodaPop, + [ITEM_LEMONADE - ITEM_POTION] = sItemEffect_Lemonade, + [ITEM_MOOMOO_MILK - ITEM_POTION] = sItemEffect_MoomooMilk, [ITEM_ENERGY_POWDER - ITEM_POTION] = sItemEffect_EnergyPowder, - [ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot, - [ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder, - [ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb, - [ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether, - [ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther, - [ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir, - [ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir, - [ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie, - [ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute, - [ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute, - [ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute, - [ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice, - [ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh, - [ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp, - [ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein, - [ITEM_IRON - ITEM_POTION] = sItemEffect_Iron, - [ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos, - [ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium, - [ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy, - [ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp, - [ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc, - [ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax, - [ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec, - [ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit, - [ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack, - [ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend, - [ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed, - [ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy, - [ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial, - [ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone, - [ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone, - [ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone, + [ITEM_ENERGY_ROOT - ITEM_POTION] = sItemEffect_EnergyRoot, + [ITEM_HEAL_POWDER - ITEM_POTION] = sItemEffect_HealPowder, + [ITEM_REVIVAL_HERB - ITEM_POTION] = sItemEffect_RevivalHerb, + [ITEM_ETHER - ITEM_POTION] = sItemEffect_Ether, + [ITEM_MAX_ETHER - ITEM_POTION] = sItemEffect_MaxEther, + [ITEM_ELIXIR - ITEM_POTION] = sItemEffect_Elixir, + [ITEM_MAX_ELIXIR - ITEM_POTION] = sItemEffect_MaxElixir, + [ITEM_LAVA_COOKIE - ITEM_POTION] = sItemEffect_LavaCookie, + [ITEM_BLUE_FLUTE - ITEM_POTION] = sItemEffect_BlueFlute, + [ITEM_YELLOW_FLUTE - ITEM_POTION] = sItemEffect_YellowFlute, + [ITEM_RED_FLUTE - ITEM_POTION] = sItemEffect_RedFlute, + [ITEM_BERRY_JUICE - ITEM_POTION] = sItemEffect_BerryJuice, + [ITEM_SACRED_ASH - ITEM_POTION] = sItemEffect_SacredAsh, + [ITEM_HP_UP - ITEM_POTION] = sItemEffect_HPUp, + [ITEM_PROTEIN - ITEM_POTION] = sItemEffect_Protein, + [ITEM_IRON - ITEM_POTION] = sItemEffect_Iron, + [ITEM_CARBOS - ITEM_POTION] = sItemEffect_Carbos, + [ITEM_CALCIUM - ITEM_POTION] = sItemEffect_Calcium, + [ITEM_RARE_CANDY - ITEM_POTION] = sItemEffect_RareCandy, + [ITEM_PP_UP - ITEM_POTION] = sItemEffect_PPUp, + [ITEM_ZINC - ITEM_POTION] = sItemEffect_Zinc, + [ITEM_PP_MAX - ITEM_POTION] = sItemEffect_PPMax, + [ITEM_GUARD_SPEC - ITEM_POTION] = sItemEffect_GuardSpec, + [ITEM_DIRE_HIT - ITEM_POTION] = sItemEffect_DireHit, + [ITEM_X_ATTACK - ITEM_POTION] = sItemEffect_XAttack, + [ITEM_X_DEFEND - ITEM_POTION] = sItemEffect_XDefend, + [ITEM_X_SPEED - ITEM_POTION] = sItemEffect_XSpeed, + [ITEM_X_ACCURACY - ITEM_POTION] = sItemEffect_XAccuracy, + [ITEM_X_SPECIAL - ITEM_POTION] = sItemEffect_XSpecial, + [ITEM_SUN_STONE - ITEM_POTION] = sItemEffect_SunStone, + [ITEM_MOON_STONE - ITEM_POTION] = sItemEffect_MoonStone, + [ITEM_FIRE_STONE - ITEM_POTION] = sItemEffect_FireStone, [ITEM_THUNDER_STONE - ITEM_POTION] = sItemEffect_ThunderStone, - [ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone, - [ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone, - [ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry, - [ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry, - [ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry, - [ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry, - [ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry, - [ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry, - [ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry, - [ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry, - [ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry, - [ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry, - [LAST_BERRY_INDEX - ITEM_POTION] = NULL, + [ITEM_WATER_STONE - ITEM_POTION] = sItemEffect_WaterStone, + [ITEM_LEAF_STONE - ITEM_POTION] = sItemEffect_LeafStone, + [ITEM_CHERI_BERRY - ITEM_POTION] = sItemEffect_CheriBerry, + [ITEM_CHESTO_BERRY - ITEM_POTION] = sItemEffect_ChestoBerry, + [ITEM_PECHA_BERRY - ITEM_POTION] = sItemEffect_PechaBerry, + [ITEM_RAWST_BERRY - ITEM_POTION] = sItemEffect_RawstBerry, + [ITEM_ASPEAR_BERRY - ITEM_POTION] = sItemEffect_AspearBerry, + [ITEM_LEPPA_BERRY - ITEM_POTION] = sItemEffect_LeppaBerry, + [ITEM_ORAN_BERRY - ITEM_POTION] = sItemEffect_OranBerry, + [ITEM_PERSIM_BERRY - ITEM_POTION] = sItemEffect_PersimBerry, + [ITEM_LUM_BERRY - ITEM_POTION] = sItemEffect_LumBerry, + [ITEM_SITRUS_BERRY - ITEM_POTION] = sItemEffect_SitrusBerry, + [LAST_BERRY_INDEX - ITEM_POTION] = NULL, }; diff --git a/src/data/pokemon/base_stats.h b/src/data/pokemon/species_info.h similarity index 71% rename from src/data/pokemon/base_stats.h rename to src/data/pokemon/species_info.h index 2dbde1483..3e36c08ce 100644 --- a/src/data/pokemon/base_stats.h +++ b/src/data/pokemon/species_info.h @@ -2,39 +2,37 @@ // 255 (MON_GENDERLESS) is reserved for genderless Pokémon. #define PERCENT_FEMALE(percent) min(254, ((percent * 255) / 100)) -#define OLD_UNOWN_BASE_STATS \ - { \ - .baseHP = 50, \ - .baseAttack = 150, \ - .baseDefense = 50, \ - .baseSpAttack = 150, \ - .baseSpDefense = 50, \ - .baseSpeed = 150, \ - .type1 = TYPE_NORMAL, \ - .type2 = TYPE_NORMAL, \ - .catchRate = 3, \ - .expYield = 1, \ - .evYield_HP = 2, \ - .evYield_Attack = 2, \ - .evYield_Defense = 2, \ - .evYield_Speed = 2, \ - .evYield_SpAttack = 2, \ - .evYield_SpDefense = 2, \ - .item1 = ITEM_NONE, \ - .item2 = ITEM_NONE, \ - .genderRatio = MON_GENDERLESS, \ - .eggCycles = 120, \ - .friendship = 0, \ - .growthRate = GROWTH_MEDIUM_FAST, \ - .eggGroup1 = EGG_GROUP_UNDISCOVERED,\ - .eggGroup2 = EGG_GROUP_UNDISCOVERED,\ - .abilities = {0, 0}, \ - .safariZoneFleeRate = 0, \ - .bodyColor = BODY_COLOR_BLACK, \ - .noFlip = FALSE, \ +#define OLD_UNOWN_SPECIES_INFO \ + { \ + .baseHP = 50, \ + .baseAttack = 150, \ + .baseDefense = 50, \ + .baseSpAttack = 150, \ + .baseSpDefense = 50, \ + .baseSpeed = 150, \ + .types = {TYPE_NORMAL, TYPE_NORMAL}, \ + .catchRate = 3, \ + .expYield = 1, \ + .evYield_HP = 2, \ + .evYield_Attack = 2, \ + .evYield_Defense = 2, \ + .evYield_Speed = 2, \ + .evYield_SpAttack = 2, \ + .evYield_SpDefense = 2, \ + .itemCommon = ITEM_NONE, \ + .itemRare = ITEM_NONE, \ + .genderRatio = MON_GENDERLESS, \ + .eggCycles = 120, \ + .friendship = 0, \ + .growthRate = GROWTH_MEDIUM_FAST, \ + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, \ + .abilities = {ABILITY_NONE, ABILITY_NONE}, \ + .safariZoneFleeRate = 0, \ + .bodyColor = BODY_COLOR_BLACK, \ + .noFlip = FALSE, \ } -const struct BaseStats gBaseStats[] = +const struct SpeciesInfo gSpeciesInfo[] = { [SPECIES_NONE] = {0}, [SPECIES_BULBASAUR] = @@ -45,8 +43,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 64, .evYield_HP = 0, @@ -55,15 +52,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -76,8 +72,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -86,15 +81,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -107,8 +101,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -117,15 +110,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -138,8 +130,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -148,15 +139,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -169,8 +159,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -179,15 +168,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -200,8 +188,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 109, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -210,15 +197,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -231,8 +217,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 50, .baseSpDefense = 64, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 66, .evYield_HP = 0, @@ -241,15 +226,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -262,8 +246,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 58, .baseSpAttack = 65, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -272,15 +255,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -293,8 +275,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 78, .baseSpAttack = 85, .baseSpDefense = 105, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -303,15 +284,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -324,8 +304,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 20, .baseSpDefense = 20, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 255, .expYield = 53, .evYield_HP = 1, @@ -334,15 +313,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -355,8 +333,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 72, .evYield_HP = 0, @@ -365,15 +342,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -386,8 +362,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 160, .evYield_HP = 0, @@ -396,15 +371,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -417,8 +391,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 20, .baseSpDefense = 20, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 255, .expYield = 52, .evYield_HP = 0, @@ -427,15 +400,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -448,8 +420,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 120, .expYield = 71, .evYield_HP = 0, @@ -458,15 +429,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -479,8 +449,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 45, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 45, .expYield = 159, .evYield_HP = 0, @@ -489,15 +458,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -510,8 +478,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 56, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 55, .evYield_HP = 0, @@ -520,15 +487,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -541,8 +507,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 71, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 120, .expYield = 113, .evYield_HP = 0, @@ -551,15 +516,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -572,8 +536,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 91, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 172, .evYield_HP = 0, @@ -582,15 +545,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -603,8 +565,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 72, .baseSpAttack = 25, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 57, .evYield_HP = 0, @@ -613,15 +574,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -634,8 +594,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 97, .baseSpAttack = 50, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 127, .expYield = 116, .evYield_HP = 0, @@ -644,15 +603,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -665,8 +623,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 31, .baseSpDefense = 31, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 58, .evYield_HP = 0, @@ -675,15 +632,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -696,8 +652,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 61, .baseSpDefense = 61, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 90, .expYield = 162, .evYield_HP = 0, @@ -706,15 +661,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -727,8 +681,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 54, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 255, .expYield = 62, .evYield_HP = 0, @@ -737,15 +690,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_SHED_SKIN }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -758,8 +710,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 65, .baseSpDefense = 79, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 90, .expYield = 147, .evYield_HP = 0, @@ -768,15 +719,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_SHED_SKIN }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_SHED_SKIN}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -789,8 +739,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 50, .baseSpDefense = 40, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 82, .evYield_HP = 0, @@ -799,15 +748,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -820,8 +768,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 90, .baseSpDefense = 80, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 75, .expYield = 122, .evYield_HP = 0, @@ -830,15 +777,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -851,8 +797,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 93, .evYield_HP = 0, @@ -861,15 +806,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -882,8 +826,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 90, .expYield = 163, .evYield_HP = 0, @@ -892,15 +835,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SOFT_SAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -913,8 +855,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 41, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 235, .expYield = 59, .evYield_HP = 1, @@ -923,15 +864,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -944,8 +884,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 56, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 120, .expYield = 117, .evYield_HP = 2, @@ -954,15 +893,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -975,8 +913,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 76, .baseSpAttack = 75, .baseSpDefense = 85, - .type1 = TYPE_POISON, - .type2 = TYPE_GROUND, + .types = {TYPE_POISON, TYPE_GROUND}, .catchRate = 45, .expYield = 194, .evYield_HP = 3, @@ -985,15 +922,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1006,8 +942,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 235, .expYield = 60, .evYield_HP = 0, @@ -1016,15 +951,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1037,8 +971,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 120, .expYield = 118, .evYield_HP = 0, @@ -1047,15 +980,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1068,8 +1000,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_POISON, - .type2 = TYPE_GROUND, + .types = {TYPE_POISON, TYPE_GROUND}, .catchRate = 45, .expYield = 195, .evYield_HP = 0, @@ -1078,15 +1009,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1099,8 +1029,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 60, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 68, .evYield_HP = 2, @@ -1109,15 +1038,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1130,8 +1058,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 90, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 25, .expYield = 129, .evYield_HP = 3, @@ -1140,15 +1067,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1161,8 +1087,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 63, .evYield_HP = 0, @@ -1171,15 +1096,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1192,8 +1116,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 81, .baseSpDefense = 100, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 75, .expYield = 178, .evYield_HP = 0, @@ -1202,15 +1125,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1223,8 +1145,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 45, .baseSpDefense = 25, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 170, .expYield = 76, .evYield_HP = 2, @@ -1233,15 +1154,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1254,8 +1174,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 75, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 50, .expYield = 109, .evYield_HP = 3, @@ -1264,15 +1183,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -1285,8 +1203,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 30, .baseSpDefense = 40, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -1295,15 +1212,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1316,8 +1232,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 65, .baseSpDefense = 75, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 90, .expYield = 171, .evYield_HP = 0, @@ -1326,15 +1241,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1347,8 +1261,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 75, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 255, .expYield = 78, .evYield_HP = 0, @@ -1357,15 +1270,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1378,8 +1290,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 120, .expYield = 132, .evYield_HP = 0, @@ -1388,15 +1299,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1409,8 +1319,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 100, .baseSpDefense = 90, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 184, .evYield_HP = 0, @@ -1419,15 +1328,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1440,8 +1348,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_BUG, - .type2 = TYPE_GRASS, + .types = {TYPE_BUG, TYPE_GRASS}, .catchRate = 190, .expYield = 70, .evYield_HP = 0, @@ -1450,15 +1357,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_TINY_MUSHROOM, - .item2 = ITEM_BIG_MUSHROOM, + .itemCommon = ITEM_TINY_MUSHROOM, + .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1471,8 +1377,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 60, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_GRASS, + .types = {TYPE_BUG, TYPE_GRASS}, .catchRate = 75, .expYield = 128, .evYield_HP = 0, @@ -1481,15 +1386,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_TINY_MUSHROOM, - .item2 = ITEM_BIG_MUSHROOM, + .itemCommon = ITEM_TINY_MUSHROOM, + .itemRare = ITEM_BIG_MUSHROOM, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -1502,8 +1406,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 190, .expYield = 75, .evYield_HP = 0, @@ -1512,15 +1415,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1533,8 +1435,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 90, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 75, .expYield = 138, .evYield_HP = 0, @@ -1543,15 +1444,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -1564,8 +1464,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 81, .evYield_HP = 0, @@ -1574,15 +1473,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1595,8 +1493,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 50, .baseSpDefense = 70, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 50, .expYield = 153, .evYield_HP = 0, @@ -1605,15 +1502,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1626,8 +1522,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 69, .evYield_HP = 0, @@ -1636,15 +1531,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NUGGET, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NUGGET, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1657,8 +1551,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 148, .evYield_HP = 0, @@ -1667,15 +1560,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1688,8 +1580,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 65, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 80, .evYield_HP = 0, @@ -1698,15 +1589,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_CLOUD_NINE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -1719,8 +1609,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 174, .evYield_HP = 0, @@ -1729,15 +1618,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_CLOUD_NINE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_CLOUD_NINE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -1750,8 +1638,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 190, .expYield = 74, .evYield_HP = 0, @@ -1760,15 +1647,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1781,8 +1667,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 75, .expYield = 149, .evYield_HP = 0, @@ -1791,15 +1676,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1812,8 +1696,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 91, .evYield_HP = 0, @@ -1822,15 +1705,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1843,8 +1725,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 75, .expYield = 213, .evYield_HP = 0, @@ -1853,15 +1734,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1874,8 +1754,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 77, .evYield_HP = 0, @@ -1884,15 +1763,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1905,8 +1783,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 120, .expYield = 131, .evYield_HP = 0, @@ -1915,15 +1792,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1936,8 +1812,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 90, - .type1 = TYPE_WATER, - .type2 = TYPE_FIGHTING, + .types = {TYPE_WATER, TYPE_FIGHTING}, .catchRate = 45, .expYield = 185, .evYield_HP = 0, @@ -1946,15 +1821,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -1967,8 +1841,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 105, .baseSpDefense = 55, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 200, .expYield = 73, .evYield_HP = 0, @@ -1977,15 +1850,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -1998,8 +1870,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 120, .baseSpDefense = 70, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 100, .expYield = 145, .evYield_HP = 0, @@ -2008,15 +1879,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2029,8 +1899,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 135, .baseSpDefense = 85, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 50, .expYield = 186, .evYield_HP = 0, @@ -2039,15 +1908,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_TWISTED_SPOON, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_TWISTED_SPOON, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2060,8 +1928,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 180, .expYield = 88, .evYield_HP = 0, @@ -2070,15 +1937,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2091,8 +1957,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 50, .baseSpDefense = 60, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 90, .expYield = 146, .evYield_HP = 0, @@ -2101,15 +1966,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_FOCUS_BAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2122,8 +1986,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 65, .baseSpDefense = 85, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 193, .evYield_HP = 0, @@ -2132,15 +1995,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_FOCUS_BAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_FOCUS_BAND, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2153,8 +2015,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 70, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 255, .expYield = 84, .evYield_HP = 0, @@ -2163,15 +2024,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2184,8 +2044,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 85, .baseSpDefense = 45, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 120, .expYield = 151, .evYield_HP = 0, @@ -2194,15 +2053,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2215,8 +2073,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 100, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 45, .expYield = 191, .evYield_HP = 0, @@ -2225,15 +2082,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -2246,8 +2102,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 50, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 190, .expYield = 105, .evYield_HP = 0, @@ -2256,15 +2111,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2277,8 +2131,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 80, .baseSpDefense = 120, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 60, .expYield = 205, .evYield_HP = 0, @@ -2287,15 +2140,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_LIQUID_OOZE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -2308,8 +2160,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 255, .expYield = 86, .evYield_HP = 0, @@ -2318,15 +2169,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2339,8 +2189,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 120, .expYield = 134, .evYield_HP = 0, @@ -2349,15 +2198,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2370,8 +2218,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 177, .evYield_HP = 0, @@ -2380,15 +2227,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2401,8 +2247,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 152, .evYield_HP = 0, @@ -2411,15 +2256,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2432,8 +2276,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 60, .expYield = 192, .evYield_HP = 0, @@ -2442,15 +2285,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -2463,8 +2305,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 190, .expYield = 99, .evYield_HP = 1, @@ -2473,15 +2314,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2494,8 +2334,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 75, .expYield = 164, .evYield_HP = 0, @@ -2504,15 +2343,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -2525,8 +2363,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 95, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_STEEL, + .types = {TYPE_ELECTRIC, TYPE_STEEL}, .catchRate = 190, .expYield = 89, .evYield_HP = 0, @@ -2535,15 +2372,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_MAGNET_PULL, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2556,8 +2392,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 120, .baseSpDefense = 70, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_STEEL, + .types = {TYPE_ELECTRIC, TYPE_STEEL}, .catchRate = 60, .expYield = 161, .evYield_HP = 0, @@ -2566,15 +2401,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MAGNET, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MAGNET, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_MAGNET_PULL, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_MAGNET_PULL, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2587,8 +2421,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 58, .baseSpDefense = 62, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 94, .evYield_HP = 0, @@ -2597,15 +2430,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_STICK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_STICK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FIELD}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_INNER_FOCUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2618,8 +2450,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 190, .expYield = 96, .evYield_HP = 0, @@ -2628,15 +2459,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2649,8 +2479,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 158, .evYield_HP = 0, @@ -2659,15 +2488,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -2680,8 +2508,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 45, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 100, .evYield_HP = 0, @@ -2690,15 +2517,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2711,8 +2537,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 75, .expYield = 176, .evYield_HP = 0, @@ -2721,15 +2546,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -2742,8 +2566,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 190, .expYield = 90, .evYield_HP = 1, @@ -2752,15 +2575,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_STENCH, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2773,8 +2595,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 100, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 75, .expYield = 157, .evYield_HP = 1, @@ -2783,15 +2604,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_STENCH, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_STENCH, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2804,8 +2624,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -2814,15 +2633,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_PEARL, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_PEARL, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2835,8 +2653,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 85, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 60, .expYield = 203, .evYield_HP = 0, @@ -2845,15 +2662,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_PEARL, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_PEARL, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2866,8 +2682,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 35, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 190, .expYield = 95, .evYield_HP = 0, @@ -2876,15 +2691,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2897,8 +2711,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 115, .baseSpDefense = 55, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 90, .expYield = 126, .evYield_HP = 0, @@ -2907,15 +2720,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2928,8 +2740,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 75, - .type1 = TYPE_GHOST, - .type2 = TYPE_POISON, + .types = {TYPE_GHOST, TYPE_POISON}, .catchRate = 45, .expYield = 190, .evYield_HP = 0, @@ -2938,15 +2749,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -2959,8 +2769,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 30, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 108, .evYield_HP = 0, @@ -2969,15 +2778,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -2990,8 +2798,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 42, .baseSpAttack = 43, .baseSpDefense = 90, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 190, .expYield = 102, .evYield_HP = 0, @@ -3000,15 +2807,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3021,8 +2827,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 73, .baseSpDefense = 115, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 75, .expYield = 165, .evYield_HP = 0, @@ -3031,15 +2836,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3052,8 +2856,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 115, .evYield_HP = 0, @@ -3062,15 +2865,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3083,8 +2885,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 206, .evYield_HP = 0, @@ -3093,15 +2894,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -3114,8 +2914,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 103, .evYield_HP = 0, @@ -3124,15 +2923,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_STATIC }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3145,8 +2943,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 140, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 60, .expYield = 150, .evYield_HP = 0, @@ -3155,15 +2952,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_STATIC }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_STATIC}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3176,8 +2972,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 45, - .type1 = TYPE_GRASS, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GRASS, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 98, .evYield_HP = 0, @@ -3186,15 +2981,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3207,8 +3001,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 125, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GRASS, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 212, .evYield_HP = 0, @@ -3217,15 +3010,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -3238,8 +3030,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 190, .expYield = 87, .evYield_HP = 0, @@ -3248,15 +3039,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_THICK_CLUB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3269,8 +3059,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 50, .baseSpDefense = 80, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 75, .expYield = 124, .evYield_HP = 0, @@ -3279,15 +3068,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_THICK_CLUB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_THICK_CLUB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3300,8 +3088,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 87, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 139, .evYield_HP = 0, @@ -3310,15 +3097,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3331,8 +3117,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 76, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 140, .evYield_HP = 0, @@ -3341,15 +3126,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3362,8 +3146,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 127, .evYield_HP = 2, @@ -3372,15 +3155,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3393,8 +3175,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 60, .baseSpDefense = 45, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 190, .expYield = 114, .evYield_HP = 0, @@ -3403,15 +3184,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3424,8 +3204,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 60, .expYield = 173, .evYield_HP = 0, @@ -3434,15 +3213,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3455,8 +3233,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GROUND, - .type2 = TYPE_ROCK, + .types = {TYPE_GROUND, TYPE_ROCK}, .catchRate = 120, .expYield = 135, .evYield_HP = 0, @@ -3465,15 +3242,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3486,8 +3262,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_ROCK, + .types = {TYPE_GROUND, TYPE_ROCK}, .catchRate = 60, .expYield = 204, .evYield_HP = 0, @@ -3496,15 +3271,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_LIGHTNING_ROD, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -3517,8 +3291,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 105, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 30, .expYield = 255, .evYield_HP = 2, @@ -3527,15 +3300,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LUCKY_EGG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LUCKY_EGG, .genderRatio = MON_FEMALE, .eggCycles = 40, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3548,8 +3320,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 100, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 166, .evYield_HP = 0, @@ -3558,15 +3329,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3579,8 +3349,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 40, .baseSpDefense = 80, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 175, .evYield_HP = 2, @@ -3589,15 +3358,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3610,8 +3378,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 83, .evYield_HP = 0, @@ -3620,15 +3387,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3641,8 +3407,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 155, .evYield_HP = 0, @@ -3651,15 +3416,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_POISON_POINT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_POISON_POINT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -3672,8 +3436,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 63, .baseSpAttack = 35, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 111, .evYield_HP = 0, @@ -3682,15 +3445,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 50, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3703,8 +3465,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 68, .baseSpAttack = 65, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 170, .evYield_HP = 0, @@ -3713,15 +3474,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_VEIL}, .safariZoneFleeRate = 75, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3734,8 +3494,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 70, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 106, .evYield_HP = 0, @@ -3744,15 +3503,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STARDUST, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STARDUST, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3765,8 +3523,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 100, .baseSpDefense = 85, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 207, .evYield_HP = 0, @@ -3775,15 +3532,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STARDUST, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STARDUST, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -3796,8 +3552,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 100, .baseSpDefense = 120, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 136, .evYield_HP = 0, @@ -3806,15 +3561,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -3827,8 +3581,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 187, .evYield_HP = 0, @@ -3837,15 +3590,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -3858,8 +3610,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 115, .baseSpDefense = 95, - .type1 = TYPE_ICE, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ICE, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 137, .evYield_HP = 0, @@ -3868,15 +3619,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3889,8 +3639,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 95, .baseSpDefense = 85, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 156, .evYield_HP = 0, @@ -3899,15 +3648,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -3920,8 +3668,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 93, .baseSpAttack = 100, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 167, .evYield_HP = 0, @@ -3930,15 +3677,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_FLAME_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -3951,8 +3697,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 70, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -3961,15 +3706,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -3982,8 +3726,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 211, .evYield_HP = 0, @@ -3992,15 +3735,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4013,8 +3755,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 15, .baseSpDefense = 20, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 20, .evYield_HP = 0, @@ -4023,15 +3764,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 25, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4044,8 +3784,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 81, .baseSpAttack = 60, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 45, .expYield = 214, .evYield_HP = 0, @@ -4054,15 +3793,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 5, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4075,8 +3813,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_ICE, + .types = {TYPE_WATER, TYPE_ICE}, .catchRate = 45, .expYield = 219, .evYield_HP = 2, @@ -4085,15 +3822,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4106,8 +3842,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 48, .baseSpDefense = 48, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 35, .expYield = 61, .evYield_HP = 1, @@ -4116,15 +3851,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_POWDER, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_DITTO, - .eggGroup2 = EGG_GROUP_DITTO, - .abilities = { ABILITY_LIMBER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DITTO, EGG_GROUP_DITTO}, + .abilities = {ABILITY_LIMBER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4137,8 +3871,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 92, .evYield_HP = 0, @@ -4147,15 +3880,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4168,8 +3900,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 110, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 196, .evYield_HP = 2, @@ -4178,15 +3909,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4199,8 +3929,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 110, .baseSpDefense = 95, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -4209,15 +3938,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4230,8 +3958,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 110, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 198, .evYield_HP = 0, @@ -4240,15 +3967,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_FLASH_FIRE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_FLASH_FIRE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -4261,8 +3987,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 130, .evYield_HP = 0, @@ -4271,15 +3996,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_TRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4292,8 +4016,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 90, .baseSpDefense = 55, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 120, .evYield_HP = 0, @@ -4302,15 +4025,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4323,8 +4045,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 199, .evYield_HP = 0, @@ -4333,15 +4054,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4354,8 +4074,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 55, .baseSpDefense = 45, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 119, .evYield_HP = 0, @@ -4364,15 +4083,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4385,8 +4103,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 65, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_WATER, + .types = {TYPE_ROCK, TYPE_WATER}, .catchRate = 45, .expYield = 201, .evYield_HP = 0, @@ -4395,15 +4112,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_BATTLE_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4416,8 +4132,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_ROCK, - .type2 = TYPE_FLYING, + .types = {TYPE_ROCK, TYPE_FLYING}, .catchRate = 45, .expYield = 202, .evYield_HP = 0, @@ -4426,15 +4141,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_PRESSURE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_PRESSURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4447,8 +4161,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 65, .baseSpDefense = 110, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 25, .expYield = 154, .evYield_HP = 2, @@ -4457,15 +4170,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_CHESTO_BERRY, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_CHESTO_BERRY, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_IMMUNITY, ABILITY_THICK_FAT }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_IMMUNITY, ABILITY_THICK_FAT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -4478,8 +4190,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 125, - .type1 = TYPE_ICE, - .type2 = TYPE_FLYING, + .types = {TYPE_ICE, TYPE_FLYING}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -4488,15 +4199,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4509,8 +4219,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 125, .baseSpDefense = 90, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_FLYING, + .types = {TYPE_ELECTRIC, TYPE_FLYING}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -4519,15 +4228,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4540,8 +4248,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 125, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 3, .expYield = 217, .evYield_HP = 0, @@ -4550,15 +4257,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4571,8 +4277,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 67, .evYield_HP = 0, @@ -4581,15 +4286,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 100, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4602,8 +4306,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -4612,15 +4315,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_FANG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 125, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4633,8 +4335,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -4643,15 +4344,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_FANG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_FANG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -4664,8 +4364,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 154, .baseSpDefense = 90, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -4674,15 +4373,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -4695,8 +4393,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 64, .evYield_HP = 3, @@ -4705,15 +4402,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -4726,8 +4422,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 49, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 64, .evYield_HP = 0, @@ -4736,15 +4431,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_LUM_BERRY, - .item2 = ITEM_LUM_BERRY, + .itemCommon = ITEM_LUM_BERRY, + .itemRare = ITEM_LUM_BERRY, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4757,8 +4451,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 63, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -4767,15 +4460,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4788,8 +4480,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 83, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -4798,15 +4489,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -4819,8 +4509,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -4829,15 +4518,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4850,8 +4538,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 65, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -4860,15 +4547,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4881,8 +4567,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 109, .baseSpDefense = 85, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -4891,15 +4576,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -4912,8 +4596,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 44, .baseSpDefense = 48, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 66, .evYield_HP = 0, @@ -4922,15 +4605,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -4943,8 +4625,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 58, .baseSpAttack = 59, .baseSpDefense = 63, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -4953,15 +4634,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = TRUE, @@ -4974,8 +4654,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 78, .baseSpAttack = 79, .baseSpDefense = 83, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -4984,15 +4663,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5005,8 +4683,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 35, .baseSpDefense = 45, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 57, .evYield_HP = 0, @@ -5015,15 +4692,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_ORAN_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5036,8 +4712,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 116, .evYield_HP = 0, @@ -5046,15 +4721,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5067,8 +4741,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 36, .baseSpDefense = 56, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 58, .evYield_HP = 1, @@ -5077,15 +4750,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5098,8 +4770,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 76, .baseSpDefense = 96, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 90, .expYield = 162, .evYield_HP = 2, @@ -5108,15 +4779,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5129,8 +4799,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -5139,15 +4808,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5160,8 +4828,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 110, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 90, .expYield = 134, .evYield_HP = 0, @@ -5170,15 +4837,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5191,8 +4857,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 255, .expYield = 54, .evYield_HP = 0, @@ -5201,15 +4866,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_INSOMNIA }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5222,8 +4886,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 90, .expYield = 134, .evYield_HP = 0, @@ -5232,15 +4895,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_INSOMNIA }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_INSOMNIA}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -5253,8 +4915,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 130, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_POISON, - .type2 = TYPE_FLYING, + .types = {TYPE_POISON, TYPE_FLYING}, .catchRate = 90, .expYield = 204, .evYield_HP = 0, @@ -5263,15 +4924,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5284,8 +4944,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 56, .baseSpDefense = 56, - .type1 = TYPE_WATER, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_WATER, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 90, .evYield_HP = 1, @@ -5294,15 +4953,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_YELLOW_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_YELLOW_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5315,8 +4973,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 67, .baseSpAttack = 76, .baseSpDefense = 76, - .type1 = TYPE_WATER, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_WATER, TYPE_ELECTRIC}, .catchRate = 75, .expYield = 156, .evYield_HP = 2, @@ -5325,15 +4982,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_YELLOW_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_YELLOW_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_VOLT_ABSORB, ABILITY_ILLUMINATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5346,8 +5002,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 190, .expYield = 42, .evYield_HP = 0, @@ -5356,15 +5011,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5377,8 +5031,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 45, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 37, .evYield_HP = 0, @@ -5387,15 +5040,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5408,8 +5060,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 40, .baseSpDefense = 20, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 170, .expYield = 39, .evYield_HP = 1, @@ -5418,15 +5069,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = TRUE, @@ -5439,8 +5089,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 40, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 74, .evYield_HP = 0, @@ -5449,15 +5098,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_HUSTLE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5470,8 +5118,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 80, .baseSpDefense = 105, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 75, .expYield = 114, .evYield_HP = 0, @@ -5480,15 +5127,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_HUSTLE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_HUSTLE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5501,8 +5147,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 45, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 190, .expYield = 73, .evYield_HP = 0, @@ -5511,15 +5156,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5532,8 +5176,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 95, .baseSpDefense = 70, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 75, .expYield = 171, .evYield_HP = 0, @@ -5542,15 +5185,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5563,8 +5205,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 235, .expYield = 59, .evYield_HP = 0, @@ -5573,15 +5214,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -5594,8 +5234,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 80, .baseSpDefense = 60, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 120, .expYield = 117, .evYield_HP = 0, @@ -5604,15 +5243,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5625,8 +5263,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 90, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 194, .evYield_HP = 0, @@ -5635,15 +5272,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5656,8 +5292,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 184, .evYield_HP = 0, @@ -5666,15 +5301,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5687,8 +5321,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 20, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 58, .evYield_HP = 2, @@ -5697,15 +5330,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5718,8 +5350,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 80, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 153, .evYield_HP = 3, @@ -5728,15 +5359,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5749,8 +5379,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 65, .expYield = 135, .evYield_HP = 0, @@ -5759,15 +5388,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -5780,8 +5408,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 185, .evYield_HP = 0, @@ -5790,15 +5417,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_WATER_ABSORB, ABILITY_DAMP }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_WATER_ABSORB, ABILITY_DAMP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -5811,8 +5437,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 55, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -5821,15 +5446,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -5842,8 +5466,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 120, .expYield = 136, .evYield_HP = 0, @@ -5852,15 +5475,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -5873,8 +5495,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 55, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 45, .expYield = 176, .evYield_HP = 0, @@ -5883,15 +5504,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -5904,8 +5524,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 94, .evYield_HP = 0, @@ -5914,15 +5533,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_PICKUP }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_PICKUP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -5935,8 +5553,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 235, .expYield = 52, .evYield_HP = 0, @@ -5945,15 +5562,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5966,8 +5582,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 105, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 120, .expYield = 146, .evYield_HP = 0, @@ -5976,15 +5591,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -5997,8 +5611,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 75, .baseSpDefense = 45, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 75, .expYield = 147, .evYield_HP = 0, @@ -6007,15 +5620,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_COMPOUND_EYES}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6028,8 +5640,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 255, .expYield = 52, .evYield_HP = 1, @@ -6038,15 +5649,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6059,8 +5669,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 90, .expYield = 137, .evYield_HP = 2, @@ -6069,15 +5678,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_DAMP, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_DAMP, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6090,8 +5698,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 95, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -6100,15 +5707,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6121,8 +5727,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 60, .baseSpDefense = 130, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -6131,15 +5736,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6152,8 +5756,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 91, .baseSpAttack = 85, .baseSpDefense = 42, - .type1 = TYPE_DARK, - .type2 = TYPE_FLYING, + .types = {TYPE_DARK, TYPE_FLYING}, .catchRate = 30, .expYield = 107, .evYield_HP = 0, @@ -6162,15 +5765,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -6183,8 +5785,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 100, .baseSpDefense = 110, - .type1 = TYPE_WATER, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_WATER, TYPE_PSYCHIC}, .catchRate = 70, .expYield = 164, .evYield_HP = 0, @@ -6193,15 +5794,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6214,8 +5814,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 85, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 45, .expYield = 147, .evYield_HP = 0, @@ -6224,15 +5823,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6245,8 +5843,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 72, .baseSpDefense = 48, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 225, .expYield = 61, .evYield_HP = 0, @@ -6255,15 +5852,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -6276,8 +5872,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 33, .baseSpAttack = 33, .baseSpDefense = 58, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 177, .evYield_HP = 2, @@ -6286,15 +5881,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SHADOW_TAG, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6307,8 +5901,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 90, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_NORMAL, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 149, .evYield_HP = 0, @@ -6317,15 +5910,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PERSIM_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PERSIM_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6338,8 +5930,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 190, .expYield = 60, .evYield_HP = 0, @@ -6348,15 +5939,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6369,8 +5959,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_BUG, - .type2 = TYPE_STEEL, + .types = {TYPE_BUG, TYPE_STEEL}, .catchRate = 75, .expYield = 118, .evYield_HP = 0, @@ -6379,15 +5968,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6400,8 +5988,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 75, .evYield_HP = 1, @@ -6410,15 +5997,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6431,8 +6017,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 35, .baseSpDefense = 65, - .type1 = TYPE_GROUND, - .type2 = TYPE_FLYING, + .types = {TYPE_GROUND, TYPE_FLYING}, .catchRate = 60, .expYield = 108, .evYield_HP = 0, @@ -6441,15 +6026,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SAND_VEIL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6462,8 +6046,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_STEEL, - .type2 = TYPE_GROUND, + .types = {TYPE_STEEL, TYPE_GROUND}, .catchRate = 25, .expYield = 196, .evYield_HP = 0, @@ -6472,15 +6055,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6493,8 +6075,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 63, .evYield_HP = 0, @@ -6503,15 +6084,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_INTIMIDATE, ABILITY_RUN_AWAY }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_RUN_AWAY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6524,8 +6104,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 75, .expYield = 178, .evYield_HP = 0, @@ -6534,15 +6113,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_INTIMIDATE, ABILITY_INTIMIDATE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -6555,8 +6133,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_POISON, + .types = {TYPE_WATER, TYPE_POISON}, .catchRate = 45, .expYield = 100, .evYield_HP = 0, @@ -6565,15 +6142,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_POISON_POINT, ABILITY_SWIFT_SWIM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6586,8 +6162,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_BUG, - .type2 = TYPE_STEEL, + .types = {TYPE_BUG, TYPE_STEEL}, .catchRate = 25, .expYield = 200, .evYield_HP = 0, @@ -6596,15 +6171,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6617,8 +6191,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 5, .baseSpAttack = 10, .baseSpDefense = 230, - .type1 = TYPE_BUG, - .type2 = TYPE_ROCK, + .types = {TYPE_BUG, TYPE_ROCK}, .catchRate = 190, .expYield = 80, .evYield_HP = 0, @@ -6627,15 +6200,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_BERRY_JUICE, - .item2 = ITEM_BERRY_JUICE, + .itemCommon = ITEM_BERRY_JUICE, + .itemRare = ITEM_BERRY_JUICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -6648,8 +6220,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 40, .baseSpDefense = 95, - .type1 = TYPE_BUG, - .type2 = TYPE_FIGHTING, + .types = {TYPE_BUG, TYPE_FIGHTING}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -6658,15 +6229,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -6679,8 +6249,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 35, .baseSpDefense = 75, - .type1 = TYPE_DARK, - .type2 = TYPE_ICE, + .types = {TYPE_DARK, TYPE_ICE}, .catchRate = 60, .expYield = 132, .evYield_HP = 0, @@ -6689,15 +6258,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_KEEN_EYE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -6710,8 +6278,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 124, .evYield_HP = 0, @@ -6720,15 +6287,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -6741,8 +6307,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 75, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 60, .expYield = 189, .evYield_HP = 0, @@ -6751,15 +6316,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6772,8 +6336,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 70, .baseSpDefense = 40, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 190, .expYield = 78, .evYield_HP = 0, @@ -6782,15 +6345,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6803,8 +6365,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_FIRE, - .type2 = TYPE_ROCK, + .types = {TYPE_FIRE, TYPE_ROCK}, .catchRate = 75, .expYield = 154, .evYield_HP = 0, @@ -6813,15 +6374,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_FLAME_BODY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6834,8 +6394,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_ICE, - .type2 = TYPE_GROUND, + .types = {TYPE_ICE, TYPE_GROUND}, .catchRate = 225, .expYield = 78, .evYield_HP = 0, @@ -6844,15 +6403,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NONE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6865,8 +6423,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_ICE, - .type2 = TYPE_GROUND, + .types = {TYPE_ICE, TYPE_GROUND}, .catchRate = 75, .expYield = 160, .evYield_HP = 1, @@ -6875,15 +6432,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ASPEAR_BERRY, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_ASPEAR_BERRY, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -6896,8 +6452,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 85, - .type1 = TYPE_WATER, - .type2 = TYPE_ROCK, + .types = {TYPE_WATER, TYPE_ROCK}, .catchRate = 60, .expYield = 113, .evYield_HP = 0, @@ -6906,15 +6461,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_RED_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_RED_SHARD, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HUSTLE, ABILITY_NATURAL_CURE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HUSTLE, ABILITY_NATURAL_CURE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -6927,8 +6481,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 190, .expYield = 78, .evYield_HP = 0, @@ -6937,15 +6490,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_HUSTLE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_HUSTLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -6958,8 +6510,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 105, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 75, .expYield = 164, .evYield_HP = 0, @@ -6968,15 +6519,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -6989,8 +6539,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_ICE, - .type2 = TYPE_FLYING, + .types = {TYPE_ICE, TYPE_FLYING}, .catchRate = 45, .expYield = 183, .evYield_HP = 0, @@ -6999,15 +6548,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_HUSTLE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7020,8 +6568,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 80, .baseSpDefense = 140, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 25, .expYield = 168, .evYield_HP = 0, @@ -7030,15 +6577,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_WATER_ABSORB}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7051,8 +6597,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_STEEL, - .type2 = TYPE_FLYING, + .types = {TYPE_STEEL, TYPE_FLYING}, .catchRate = 25, .expYield = 168, .evYield_HP = 0, @@ -7061,15 +6606,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SHARP_BEAK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SHARP_BEAK, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_STURDY }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_STURDY}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7082,8 +6626,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 80, .baseSpDefense = 50, - .type1 = TYPE_DARK, - .type2 = TYPE_FIRE, + .types = {TYPE_DARK, TYPE_FIRE}, .catchRate = 120, .expYield = 114, .evYield_HP = 0, @@ -7092,15 +6635,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7113,8 +6655,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 110, .baseSpDefense = 80, - .type1 = TYPE_DARK, - .type2 = TYPE_FIRE, + .types = {TYPE_DARK, TYPE_FIRE}, .catchRate = 45, .expYield = 204, .evYield_HP = 0, @@ -7123,15 +6664,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_EARLY_BIRD, ABILITY_FLASH_FIRE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -7144,8 +6684,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 95, .baseSpDefense = 95, - .type1 = TYPE_WATER, - .type2 = TYPE_DRAGON, + .types = {TYPE_WATER, TYPE_DRAGON}, .catchRate = 45, .expYield = 207, .evYield_HP = 0, @@ -7154,15 +6693,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7175,8 +6713,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 120, .expYield = 124, .evYield_HP = 1, @@ -7185,15 +6722,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7206,8 +6742,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 60, .expYield = 189, .evYield_HP = 0, @@ -7216,15 +6751,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STURDY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STURDY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7237,8 +6771,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 105, .baseSpDefense = 95, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 180, .evYield_HP = 0, @@ -7247,15 +6780,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_UP_GRADE, - .item2 = ITEM_UP_GRADE, + .itemCommon = ITEM_UP_GRADE, + .itemRare = ITEM_UP_GRADE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_TRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_TRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7268,8 +6800,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 165, .evYield_HP = 0, @@ -7278,15 +6809,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7299,8 +6829,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 20, .baseSpDefense = 45, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 106, .evYield_HP = 0, @@ -7309,15 +6838,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -7330,8 +6858,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 75, .expYield = 91, .evYield_HP = 0, @@ -7340,15 +6867,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -7361,8 +6887,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 35, .baseSpDefense = 110, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 45, .expYield = 138, .evYield_HP = 0, @@ -7371,15 +6896,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7392,8 +6916,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_ICE, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ICE, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 87, .evYield_HP = 0, @@ -7402,15 +6925,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7423,8 +6945,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 106, .evYield_HP = 0, @@ -7433,15 +6954,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_STATIC, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_STATIC, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = TRUE, @@ -7454,8 +6974,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 83, .baseSpAttack = 70, .baseSpDefense = 55, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 117, .evYield_HP = 0, @@ -7464,15 +6983,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_FLAME_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_FLAME_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7485,8 +7003,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -7495,15 +7012,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_MOOMOO_MILK, - .item2 = ITEM_MOOMOO_MILK, + .itemCommon = ITEM_MOOMOO_MILK, + .itemRare = ITEM_MOOMOO_MILK, .genderRatio = MON_FEMALE, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7516,8 +7032,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 75, .baseSpDefense = 135, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 30, .expYield = 255, .evYield_HP = 2, @@ -7526,15 +7041,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LUCKY_EGG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LUCKY_EGG, .genderRatio = MON_FEMALE, .eggCycles = 40, .friendship = 140, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_SERENE_GRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -7547,8 +7061,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 115, .baseSpAttack = 115, .baseSpDefense = 100, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -7557,15 +7070,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -7578,8 +7090,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 90, .baseSpDefense = 75, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 3, .expYield = 217, .evYield_HP = 1, @@ -7588,15 +7099,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -7609,8 +7119,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 90, .baseSpDefense = 115, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -7619,15 +7128,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -7640,8 +7148,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 41, .baseSpAttack = 45, .baseSpDefense = 50, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 67, .evYield_HP = 0, @@ -7650,15 +7157,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7671,8 +7177,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 51, .baseSpAttack = 65, .baseSpDefense = 70, - .type1 = TYPE_ROCK, - .type2 = TYPE_GROUND, + .types = {TYPE_ROCK, TYPE_GROUND}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -7681,15 +7186,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -7702,8 +7206,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 61, .baseSpAttack = 95, .baseSpDefense = 100, - .type1 = TYPE_ROCK, - .type2 = TYPE_DARK, + .types = {TYPE_ROCK, TYPE_DARK}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -7712,15 +7215,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_SAND_STREAM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_SAND_STREAM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7733,8 +7235,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 90, .baseSpDefense = 154, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_FLYING, + .types = {TYPE_PSYCHIC, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -7743,15 +7244,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -7764,8 +7264,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 110, .baseSpDefense = 154, - .type1 = TYPE_FIRE, - .type2 = TYPE_FLYING, + .types = {TYPE_FIRE, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -7774,15 +7273,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7795,8 +7293,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_GRASS, + .types = {TYPE_PSYCHIC, TYPE_GRASS}, .catchRate = 45, .expYield = 64, .evYield_HP = 3, @@ -7805,44 +7302,43 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_LUM_BERRY, - .item2 = ITEM_LUM_BERRY, + .itemCommon = ITEM_LUM_BERRY, + .itemRare = ITEM_LUM_BERRY, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, }, - [SPECIES_OLD_UNOWN_B] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_C] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_D] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_E] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_F] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_G] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_H] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_I] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_J] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_K] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_L] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_M] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_N] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_O] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_P] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_R] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_S] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_T] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_U] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_V] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_W] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_X] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_BASE_STATS, - [SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_BASE_STATS, + [SPECIES_OLD_UNOWN_B] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_C] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_D] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_E] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_F] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_G] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_H] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_I] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_J] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_K] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_L] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_M] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_N] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_O] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_P] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Q] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_R] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_S] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_T] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_U] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_V] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_W] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_X] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Y] = OLD_UNOWN_SPECIES_INFO, + [SPECIES_OLD_UNOWN_Z] = OLD_UNOWN_SPECIES_INFO, [SPECIES_TREECKO] = { .baseHP = 40, @@ -7851,8 +7347,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -7861,15 +7356,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7882,8 +7376,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 85, .baseSpDefense = 65, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 141, .evYield_HP = 0, @@ -7892,15 +7385,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7913,8 +7405,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 120, .baseSpAttack = 105, .baseSpDefense = 85, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -7923,15 +7414,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 3, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_OVERGROW, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_OVERGROW, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -7944,8 +7434,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 70, .baseSpDefense = 50, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -7954,15 +7443,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -7975,8 +7463,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 85, .baseSpDefense = 60, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIRE, TYPE_FIGHTING}, .catchRate = 45, .expYield = 142, .evYield_HP = 0, @@ -7985,15 +7472,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8006,8 +7492,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 110, .baseSpDefense = 70, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIRE, TYPE_FIGHTING}, .catchRate = 45, .expYield = 209, .evYield_HP = 0, @@ -8016,15 +7501,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_BLAZE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_BLAZE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8037,8 +7521,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 45, .expYield = 65, .evYield_HP = 0, @@ -8047,15 +7530,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8068,8 +7550,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 45, .expYield = 143, .evYield_HP = 0, @@ -8078,15 +7559,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8099,8 +7579,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 85, .baseSpDefense = 90, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 45, .expYield = 210, .evYield_HP = 0, @@ -8109,15 +7588,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_TORRENT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_TORRENT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8130,8 +7608,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 255, .expYield = 55, .evYield_HP = 0, @@ -8140,15 +7617,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PECHA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_RUN_AWAY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_RUN_AWAY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8161,8 +7637,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 127, .expYield = 128, .evYield_HP = 0, @@ -8171,15 +7646,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_PECHA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PECHA_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8192,8 +7666,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 30, .baseSpDefense = 41, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 60, .evYield_HP = 0, @@ -8202,15 +7675,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_ORAN_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_ORAN_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8223,8 +7695,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 50, .baseSpDefense = 61, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 128, .evYield_HP = 0, @@ -8233,15 +7704,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_ORAN_BERRY, - .item2 = ITEM_SITRUS_BERRY, + .itemCommon = ITEM_ORAN_BERRY, + .itemRare = ITEM_SITRUS_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PICKUP, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PICKUP, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8254,8 +7724,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 255, .expYield = 54, .evYield_HP = 1, @@ -8264,15 +7733,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -8285,8 +7753,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 71, .evYield_HP = 0, @@ -8295,15 +7762,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8316,8 +7782,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 90, .baseSpDefense = 50, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 45, .expYield = 161, .evYield_HP = 0, @@ -8326,15 +7791,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8347,8 +7811,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 15, .baseSpAttack = 25, .baseSpDefense = 25, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 120, .expYield = 72, .evYield_HP = 0, @@ -8357,15 +7820,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -8378,8 +7840,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 90, - .type1 = TYPE_BUG, - .type2 = TYPE_POISON, + .types = {TYPE_BUG, TYPE_POISON}, .catchRate = 45, .expYield = 160, .evYield_HP = 0, @@ -8388,15 +7849,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SHIELD_DUST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SHIELD_DUST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8409,8 +7869,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -8419,15 +7878,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8440,8 +7898,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 120, .expYield = 141, .evYield_HP = 0, @@ -8450,15 +7907,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8471,8 +7927,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 90, .baseSpDefense = 100, - .type1 = TYPE_WATER, - .type2 = TYPE_GRASS, + .types = {TYPE_WATER, TYPE_GRASS}, .catchRate = 45, .expYield = 181, .evYield_HP = 0, @@ -8481,15 +7936,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_GRASS}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_RAIN_DISH}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8502,8 +7956,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -8512,15 +7965,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8533,8 +7985,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 60, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 120, .expYield = 141, .evYield_HP = 0, @@ -8543,15 +7994,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8564,8 +8014,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 90, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 45, .expYield = 181, .evYield_HP = 0, @@ -8574,15 +8023,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_EARLY_BIRD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8595,8 +8043,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_GROUND, + .types = {TYPE_BUG, TYPE_GROUND}, .catchRate = 255, .expYield = 65, .evYield_HP = 0, @@ -8605,15 +8052,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_COMPOUND_EYES, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_COMPOUND_EYES, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -8626,8 +8072,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 160, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 120, .expYield = 155, .evYield_HP = 0, @@ -8636,15 +8081,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SPEED_BOOST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_SPEED_BOOST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8657,8 +8101,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_BUG, - .type2 = TYPE_GHOST, + .types = {TYPE_BUG, TYPE_GHOST}, .catchRate = 45, .expYield = 95, .evYield_HP = 2, @@ -8667,15 +8110,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_WONDER_GUARD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_WONDER_GUARD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8688,8 +8130,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 30, .baseSpDefense = 30, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 200, .expYield = 59, .evYield_HP = 0, @@ -8698,15 +8139,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8719,8 +8159,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 125, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 45, .expYield = 162, .evYield_HP = 0, @@ -8729,15 +8168,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_GUTS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_FLYING}, + .abilities = {ABILITY_GUTS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8750,8 +8188,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 40, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 255, .expYield = 65, .evYield_HP = 1, @@ -8760,15 +8197,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -8781,8 +8217,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_FIGHTING, + .types = {TYPE_GRASS, TYPE_FIGHTING}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -8791,15 +8226,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_EFFECT_SPORE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_EFFECT_SPORE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -8812,8 +8246,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 85, .evYield_HP = 0, @@ -8822,15 +8255,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OWN_TEMPO, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OWN_TEMPO, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = TRUE, @@ -8843,8 +8275,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 55, .baseSpDefense = 30, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 190, .expYield = 64, .evYield_HP = 0, @@ -8853,15 +8284,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -8874,8 +8304,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_WATER, - .type2 = TYPE_FLYING, + .types = {TYPE_WATER, TYPE_FLYING}, .catchRate = 45, .expYield = 164, .evYield_HP = 0, @@ -8884,15 +8313,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FLYING, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FLYING}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -8905,8 +8333,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 50, .baseSpDefense = 52, - .type1 = TYPE_BUG, - .type2 = TYPE_WATER, + .types = {TYPE_BUG, TYPE_WATER}, .catchRate = 200, .expYield = 63, .evYield_HP = 0, @@ -8915,15 +8342,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_BUG}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8936,8 +8362,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 80, .baseSpDefense = 82, - .type1 = TYPE_BUG, - .type2 = TYPE_FLYING, + .types = {TYPE_BUG, TYPE_FLYING}, .catchRate = 75, .expYield = 128, .evYield_HP = 0, @@ -8946,15 +8371,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SILVER_POWDER, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SILVER_POWDER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_BUG}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8967,8 +8391,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 125, .expYield = 137, .evYield_HP = 1, @@ -8977,15 +8400,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -8998,8 +8420,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 90, .baseSpDefense = 45, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 206, .evYield_HP = 2, @@ -9008,15 +8429,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_WATER_VEIL, ABILITY_OBLIVIOUS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9029,8 +8449,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 65, .evYield_HP = 0, @@ -9039,15 +8458,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LEPPA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LEPPA_BERRY, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9060,8 +8478,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 60, .expYield = 138, .evYield_HP = 1, @@ -9070,15 +8487,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_LEPPA_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_LEPPA_BERRY, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_CUTE_CHARM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_CUTE_CHARM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9091,8 +8507,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 60, .baseSpDefense = 120, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 200, .expYield = 132, .evYield_HP = 0, @@ -9101,15 +8516,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_PERSIM_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_PERSIM_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_COLOR_CHANGE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_COLOR_CHANGE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9122,8 +8536,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 40, .baseSpDefense = 70, - .type1 = TYPE_GROUND, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GROUND, TYPE_PSYCHIC}, .catchRate = 255, .expYield = 58, .evYield_HP = 0, @@ -9132,15 +8545,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9153,8 +8565,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 70, .baseSpDefense = 120, - .type1 = TYPE_GROUND, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_GROUND, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 189, .evYield_HP = 0, @@ -9163,15 +8574,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -9184,8 +8594,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 45, .baseSpDefense = 90, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 255, .expYield = 108, .evYield_HP = 0, @@ -9194,15 +8603,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_STURDY, ABILITY_MAGNET_PULL }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_STURDY, ABILITY_MAGNET_PULL}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9215,8 +8623,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 85, .baseSpDefense = 70, - .type1 = TYPE_FIRE, - .type2 = TYPE_FIRE, + .types = {TYPE_FIRE, TYPE_FIRE}, .catchRate = 90, .expYield = 161, .evYield_HP = 0, @@ -9225,15 +8632,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_WHITE_SMOKE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_WHITE_SMOKE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9246,8 +8652,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 65, - .type1 = TYPE_DARK, - .type2 = TYPE_GHOST, + .types = {TYPE_DARK, TYPE_GHOST}, .catchRate = 45, .expYield = 98, .evYield_HP = 0, @@ -9256,15 +8661,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_KEEN_EYE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_KEEN_EYE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -9277,8 +8681,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 46, .baseSpDefense = 41, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 190, .expYield = 92, .evYield_HP = 1, @@ -9287,15 +8690,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -9308,8 +8710,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 76, .baseSpDefense = 71, - .type1 = TYPE_WATER, - .type2 = TYPE_GROUND, + .types = {TYPE_WATER, TYPE_GROUND}, .catchRate = 75, .expYield = 158, .evYield_HP = 2, @@ -9318,15 +8719,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9339,8 +8739,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 97, .baseSpAttack = 40, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 225, .expYield = 110, .evYield_HP = 0, @@ -9349,15 +8748,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_HEART_SCALE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_HEART_SCALE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9370,8 +8768,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 50, .baseSpDefense = 35, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 205, .expYield = 111, .evYield_HP = 0, @@ -9380,15 +8777,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9401,8 +8797,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 90, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 155, .expYield = 161, .evYield_HP = 0, @@ -9411,15 +8806,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_SHELL_ARMOR}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9432,8 +8826,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 10, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 61, .evYield_HP = 0, @@ -9442,15 +8835,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9463,8 +8855,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 81, .baseSpAttack = 100, .baseSpDefense = 125, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 213, .evYield_HP = 0, @@ -9473,15 +8864,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_MARVEL_SCALE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_MARVEL_SCALE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -9494,8 +8884,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 20, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 225, .expYield = 88, .evYield_HP = 0, @@ -9504,15 +8893,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_ROUGH_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9525,8 +8913,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 95, .baseSpDefense = 40, - .type1 = TYPE_WATER, - .type2 = TYPE_DARK, + .types = {TYPE_WATER, TYPE_DARK}, .catchRate = 60, .expYield = 175, .evYield_HP = 0, @@ -9535,15 +8922,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_2, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_ROUGH_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_2, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_ROUGH_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9556,8 +8942,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 10, .baseSpAttack = 45, .baseSpDefense = 45, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 255, .expYield = 73, .evYield_HP = 0, @@ -9566,15 +8951,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SOFT_SAND, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SOFT_SAND, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_ARENA_TRAP }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_ARENA_TRAP}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9587,8 +8971,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_GROUND, - .type2 = TYPE_DRAGON, + .types = {TYPE_GROUND, TYPE_DRAGON}, .catchRate = 120, .expYield = 126, .evYield_HP = 0, @@ -9597,15 +8980,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_LEVITATE, ABILITY_LEVITATE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9618,8 +9000,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_GROUND, - .type2 = TYPE_DRAGON, + .types = {TYPE_GROUND, TYPE_DRAGON}, .catchRate = 45, .expYield = 197, .evYield_HP = 0, @@ -9628,15 +9009,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_BUG, - .abilities = { ABILITY_LEVITATE, ABILITY_LEVITATE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_BUG}, + .abilities = {ABILITY_LEVITATE, ABILITY_LEVITATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9649,8 +9029,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 20, .baseSpDefense = 30, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 180, .expYield = 87, .evYield_HP = 1, @@ -9659,15 +9038,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_THICK_FAT, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9680,8 +9058,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 60, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_FIGHTING, + .types = {TYPE_FIGHTING, TYPE_FIGHTING}, .catchRate = 200, .expYield = 184, .evYield_HP = 2, @@ -9690,15 +9067,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_KINGS_ROCK, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_KINGS_ROCK, .genderRatio = PERCENT_FEMALE(25), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_THICK_FAT, ABILITY_GUTS }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_THICK_FAT, ABILITY_GUTS}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -9711,8 +9087,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 65, .baseSpDefense = 40, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 120, .expYield = 104, .evYield_HP = 0, @@ -9721,15 +9096,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9742,8 +9116,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 105, .baseSpAttack = 105, .baseSpDefense = 60, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 45, .expYield = 168, .evYield_HP = 0, @@ -9752,15 +9125,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_STATIC, ABILITY_LIGHTNING_ROD }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_STATIC, ABILITY_LIGHTNING_ROD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9773,8 +9145,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 65, .baseSpDefense = 45, - .type1 = TYPE_FIRE, - .type2 = TYPE_GROUND, + .types = {TYPE_FIRE, TYPE_GROUND}, .catchRate = 255, .expYield = 88, .evYield_HP = 0, @@ -9783,15 +9154,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_RAWST_BERRY, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_RAWST_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -9804,8 +9174,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 105, .baseSpDefense = 75, - .type1 = TYPE_FIRE, - .type2 = TYPE_GROUND, + .types = {TYPE_FIRE, TYPE_GROUND}, .catchRate = 150, .expYield = 175, .evYield_HP = 0, @@ -9814,15 +9183,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_RAWST_BERRY, - .item2 = ITEM_RAWST_BERRY, + .itemCommon = ITEM_RAWST_BERRY, + .itemRare = ITEM_RAWST_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_MAGMA_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_MAGMA_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -9835,8 +9203,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 55, .baseSpDefense = 50, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 255, .expYield = 75, .evYield_HP = 1, @@ -9845,15 +9212,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9866,8 +9232,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 75, .baseSpDefense = 70, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 120, .expYield = 128, .evYield_HP = 2, @@ -9876,15 +9241,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9897,8 +9261,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 90, - .type1 = TYPE_ICE, - .type2 = TYPE_WATER, + .types = {TYPE_ICE, TYPE_WATER}, .catchRate = 45, .expYield = 192, .evYield_HP = 3, @@ -9907,15 +9270,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -9928,8 +9290,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 35, .baseSpAttack = 85, .baseSpDefense = 40, - .type1 = TYPE_GRASS, - .type2 = TYPE_GRASS, + .types = {TYPE_GRASS, TYPE_GRASS}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -9938,15 +9299,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9959,8 +9319,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 115, .baseSpDefense = 60, - .type1 = TYPE_GRASS, - .type2 = TYPE_DARK, + .types = {TYPE_GRASS, TYPE_DARK}, .catchRate = 60, .expYield = 177, .evYield_HP = 0, @@ -9969,15 +9328,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_GRASS, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_SAND_VEIL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_GRASS, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_SAND_VEIL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -9990,8 +9348,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 190, .expYield = 74, .evYield_HP = 1, @@ -10000,15 +9357,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10021,8 +9377,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 80, .baseSpDefense = 80, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 75, .expYield = 187, .evYield_HP = 2, @@ -10031,15 +9386,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NEVER_MELT_ICE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NEVER_MELT_ICE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_INNER_FOCUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_INNER_FOCUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -10052,8 +9406,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 95, .baseSpDefense = 85, - .type1 = TYPE_ROCK, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ROCK, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 150, .evYield_HP = 0, @@ -10062,15 +9415,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_MOON_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_MOON_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10083,8 +9435,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 55, .baseSpDefense = 65, - .type1 = TYPE_ROCK, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_ROCK, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 150, .evYield_HP = 0, @@ -10093,15 +9444,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SUN_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SUN_STONE, .genderRatio = MON_GENDERLESS, .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10114,8 +9464,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 20, .baseSpAttack = 20, .baseSpDefense = 40, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 150, .expYield = 33, .evYield_HP = 1, @@ -10124,15 +9473,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(75), .eggCycles = 10, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_THICK_FAT, ABILITY_HUGE_POWER }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_THICK_FAT, ABILITY_HUGE_POWER}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10145,8 +9493,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 255, .expYield = 89, .evYield_HP = 0, @@ -10155,15 +9502,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10176,8 +9522,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 90, .baseSpDefense = 110, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 60, .expYield = 164, .evYield_HP = 0, @@ -10186,15 +9531,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_THICK_FAT, ABILITY_OWN_TEMPO }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_THICK_FAT, ABILITY_OWN_TEMPO}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -10207,8 +9551,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 85, .baseSpDefense = 75, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 200, .expYield = 120, .evYield_HP = 0, @@ -10217,15 +9560,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_PLUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_PLUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10238,8 +9580,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 75, .baseSpDefense = 85, - .type1 = TYPE_ELECTRIC, - .type2 = TYPE_ELECTRIC, + .types = {TYPE_ELECTRIC, TYPE_ELECTRIC}, .catchRate = 200, .expYield = 120, .evYield_HP = 0, @@ -10248,15 +9589,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_MINUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_MINUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -10269,8 +9609,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_STEEL, - .type2 = TYPE_STEEL, + .types = {TYPE_STEEL, TYPE_STEEL}, .catchRate = 45, .expYield = 98, .evYield_HP = 0, @@ -10279,15 +9618,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FAIRY, - .abilities = { ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FAIRY}, + .abilities = {ABILITY_HYPER_CUTTER, ABILITY_INTIMIDATE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10300,8 +9638,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 60, .baseSpAttack = 40, .baseSpDefense = 55, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_FIGHTING, TYPE_PSYCHIC}, .catchRate = 180, .expYield = 91, .evYield_HP = 0, @@ -10310,15 +9647,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_PURE_POWER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10331,8 +9667,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 60, .baseSpDefense = 75, - .type1 = TYPE_FIGHTING, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_FIGHTING, TYPE_PSYCHIC}, .catchRate = 90, .expYield = 153, .evYield_HP = 0, @@ -10341,15 +9676,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_HUMAN_LIKE, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_PURE_POWER, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_HUMAN_LIKE, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_PURE_POWER, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -10362,8 +9696,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 75, - .type1 = TYPE_NORMAL, - .type2 = TYPE_FLYING, + .types = {TYPE_NORMAL, TYPE_FLYING}, .catchRate = 255, .expYield = 74, .evYield_HP = 0, @@ -10372,15 +9705,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10393,8 +9725,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 70, .baseSpDefense = 105, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 188, .evYield_HP = 0, @@ -10403,15 +9734,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FLYING, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FLYING, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10424,8 +9754,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 23, .baseSpAttack = 23, .baseSpDefense = 48, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 125, .expYield = 44, .evYield_HP = 1, @@ -10434,15 +9763,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SHADOW_TAG, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SHADOW_TAG, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10455,8 +9783,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 30, .baseSpDefense = 90, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 190, .expYield = 97, .evYield_HP = 0, @@ -10465,15 +9792,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10486,8 +9812,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 25, .baseSpAttack = 60, .baseSpDefense = 130, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 90, .expYield = 179, .evYield_HP = 0, @@ -10496,15 +9821,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10517,8 +9841,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 100, .baseSpDefense = 80, - .type1 = TYPE_GRASS, - .type2 = TYPE_POISON, + .types = {TYPE_GRASS, TYPE_POISON}, .catchRate = 150, .expYield = 152, .evYield_HP = 0, @@ -10527,15 +9850,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_POISON_BARB, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_POISON_BARB, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_NATURAL_CURE, ABILITY_POISON_POINT }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_GRASS}, + .abilities = {ABILITY_NATURAL_CURE, ABILITY_POISON_POINT}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = TRUE, @@ -10548,8 +9870,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 35, .baseSpDefense = 35, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 255, .expYield = 83, .evYield_HP = 1, @@ -10558,15 +9879,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_TRUANT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10579,8 +9899,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 55, .baseSpDefense = 55, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 126, .evYield_HP = 0, @@ -10589,15 +9908,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 2, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_VITAL_SPIRIT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_VITAL_SPIRIT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -10610,8 +9928,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 95, .baseSpDefense = 65, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 210, .evYield_HP = 3, @@ -10620,15 +9937,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_TRUANT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_TRUANT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -10641,8 +9957,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 43, .baseSpDefense = 53, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 225, .expYield = 75, .evYield_HP = 1, @@ -10651,15 +9966,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10672,8 +9986,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 73, .baseSpDefense = 83, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 75, .expYield = 168, .evYield_HP = 2, @@ -10682,15 +9995,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BIG_PEARL, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BIG_PEARL, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LIQUID_OOZE, ABILITY_STICKY_HOLD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -10703,8 +10015,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 51, .baseSpAttack = 72, .baseSpDefense = 87, - .type1 = TYPE_GRASS, - .type2 = TYPE_FLYING, + .types = {TYPE_GRASS, TYPE_FLYING}, .catchRate = 200, .expYield = 169, .evYield_HP = 2, @@ -10713,15 +10024,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_GRASS, - .abilities = { ABILITY_CHLOROPHYLL, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_GRASS}, + .abilities = {ABILITY_CHLOROPHYLL, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -10734,8 +10044,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 28, .baseSpAttack = 51, .baseSpDefense = 23, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 190, .expYield = 68, .evYield_HP = 1, @@ -10744,15 +10053,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10765,8 +10073,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 48, .baseSpAttack = 71, .baseSpDefense = 43, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 120, .expYield = 126, .evYield_HP = 2, @@ -10775,15 +10082,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10796,8 +10102,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 68, .baseSpAttack = 91, .baseSpDefense = 63, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 184, .evYield_HP = 3, @@ -10806,15 +10111,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_CHESTO_BERRY, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_CHESTO_BERRY, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_SOUNDPROOF, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_FIELD}, + .abilities = {ABILITY_SOUNDPROOF, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10827,8 +10131,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 32, .baseSpAttack = 74, .baseSpDefense = 55, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 255, .expYield = 142, .evYield_HP = 0, @@ -10837,15 +10140,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_BLUE_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_BLUE_SHARD, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SHELL_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SHELL_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10858,8 +10160,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 52, .baseSpAttack = 94, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 178, .evYield_HP = 0, @@ -10868,15 +10169,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -10889,8 +10189,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 52, .baseSpAttack = 114, .baseSpDefense = 75, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 60, .expYield = 178, .evYield_HP = 0, @@ -10899,15 +10198,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_1, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_1}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PINK, .noFlip = FALSE, @@ -10920,8 +10218,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 75, .baseSpDefense = 60, - .type1 = TYPE_DARK, - .type2 = TYPE_DARK, + .types = {TYPE_DARK, TYPE_DARK}, .catchRate = 30, .expYield = 174, .evYield_HP = 0, @@ -10930,15 +10227,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_MEDIUM_SLOW, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -10951,8 +10247,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 63, .baseSpDefense = 33, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 225, .expYield = 97, .evYield_HP = 0, @@ -10961,15 +10256,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -10982,8 +10276,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 83, .baseSpDefense = 63, - .type1 = TYPE_GHOST, - .type2 = TYPE_GHOST, + .types = {TYPE_GHOST, TYPE_GHOST}, .catchRate = 45, .expYield = 179, .evYield_HP = 0, @@ -10992,15 +10285,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_SPELL_TAG, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_SPELL_TAG, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 35, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_INSOMNIA, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_INSOMNIA, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = FALSE, @@ -11013,8 +10305,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 100, .baseSpDefense = 60, - .type1 = TYPE_POISON, - .type2 = TYPE_POISON, + .types = {TYPE_POISON, TYPE_POISON}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -11023,15 +10314,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_SHED_SKIN, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_SHED_SKIN, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLACK, .noFlip = TRUE, @@ -11044,8 +10334,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 90, .expYield = 165, .evYield_HP = 0, @@ -11054,15 +10343,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_FIELD, - .eggGroup2 = EGG_GROUP_FIELD, - .abilities = { ABILITY_IMMUNITY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FIELD, EGG_GROUP_FIELD}, + .abilities = {ABILITY_IMMUNITY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = TRUE, @@ -11075,8 +10363,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 55, .baseSpAttack = 45, .baseSpDefense = 65, - .type1 = TYPE_WATER, - .type2 = TYPE_ROCK, + .types = {TYPE_WATER, TYPE_ROCK}, .catchRate = 25, .expYield = 198, .evYield_HP = 1, @@ -11085,15 +10372,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_GREEN_SHARD, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_GREEN_SHARD, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 40, .friendship = 70, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_WATER_1, - .eggGroup2 = EGG_GROUP_WATER_2, - .abilities = { ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_WATER_1, EGG_GROUP_WATER_2}, + .abilities = {ABILITY_SWIFT_SWIM, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11106,8 +10392,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 40, .baseSpDefense = 40, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 180, .expYield = 96, .evYield_HP = 0, @@ -11116,15 +10401,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11137,8 +10421,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 50, .baseSpDefense = 50, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 90, .expYield = 152, .evYield_HP = 0, @@ -11147,15 +10430,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11168,8 +10450,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 60, - .type1 = TYPE_STEEL, - .type2 = TYPE_ROCK, + .types = {TYPE_STEEL, TYPE_ROCK}, .catchRate = 45, .expYield = 205, .evYield_HP = 0, @@ -11178,15 +10459,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_HARD_STONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_HARD_STONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 35, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MONSTER, - .eggGroup2 = EGG_GROUP_MONSTER, - .abilities = { ABILITY_STURDY, ABILITY_ROCK_HEAD }, + .eggGroups = {EGG_GROUP_MONSTER, EGG_GROUP_MONSTER}, + .abilities = {ABILITY_STURDY, ABILITY_ROCK_HEAD}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11199,8 +10479,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 70, .baseSpDefense = 70, - .type1 = TYPE_NORMAL, - .type2 = TYPE_NORMAL, + .types = {TYPE_NORMAL, TYPE_NORMAL}, .catchRate = 45, .expYield = 145, .evYield_HP = 1, @@ -11209,15 +10488,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_MYSTIC_WATER, - .item2 = ITEM_MYSTIC_WATER, + .itemCommon = ITEM_MYSTIC_WATER, + .itemRare = ITEM_MYSTIC_WATER, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_MEDIUM_FAST, - .eggGroup1 = EGG_GROUP_FAIRY, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_FORECAST, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_FAIRY, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_FORECAST, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11230,8 +10508,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 47, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 150, .expYield = 146, .evYield_HP = 0, @@ -11240,15 +10517,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_ILLUMINATE, ABILITY_SWARM }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_ILLUMINATE, ABILITY_SWARM}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11261,8 +10537,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 85, .baseSpAttack = 73, .baseSpDefense = 75, - .type1 = TYPE_BUG, - .type2 = TYPE_BUG, + .types = {TYPE_BUG, TYPE_BUG}, .catchRate = 150, .expYield = 146, .evYield_HP = 0, @@ -11271,15 +10546,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 15, .friendship = 70, .growthRate = GROWTH_FLUCTUATING, - .eggGroup1 = EGG_GROUP_BUG, - .eggGroup2 = EGG_GROUP_HUMAN_LIKE, - .abilities = { ABILITY_OBLIVIOUS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_BUG, EGG_GROUP_HUMAN_LIKE}, + .abilities = {ABILITY_OBLIVIOUS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -11292,8 +10566,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 23, .baseSpAttack = 61, .baseSpDefense = 87, - .type1 = TYPE_ROCK, - .type2 = TYPE_GRASS, + .types = {TYPE_ROCK, TYPE_GRASS}, .catchRate = 45, .expYield = 121, .evYield_HP = 0, @@ -11302,15 +10575,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_PURPLE, .noFlip = FALSE, @@ -11323,8 +10595,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 43, .baseSpAttack = 81, .baseSpDefense = 107, - .type1 = TYPE_ROCK, - .type2 = TYPE_GRASS, + .types = {TYPE_ROCK, TYPE_GRASS}, .catchRate = 45, .expYield = 201, .evYield_HP = 0, @@ -11333,15 +10604,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 2, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_SUCTION_CUPS, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_SUCTION_CUPS, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11354,8 +10624,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 75, .baseSpAttack = 40, .baseSpDefense = 50, - .type1 = TYPE_ROCK, - .type2 = TYPE_BUG, + .types = {TYPE_ROCK, TYPE_BUG}, .catchRate = 45, .expYield = 119, .evYield_HP = 0, @@ -11364,15 +10633,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_BATTLE_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11385,8 +10653,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 45, .baseSpAttack = 70, .baseSpDefense = 80, - .type1 = TYPE_ROCK, - .type2 = TYPE_BUG, + .types = {TYPE_ROCK, TYPE_BUG}, .catchRate = 45, .expYield = 200, .evYield_HP = 0, @@ -11395,15 +10662,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(12.5), .eggCycles = 30, .friendship = 70, .growthRate = GROWTH_ERRATIC, - .eggGroup1 = EGG_GROUP_WATER_3, - .eggGroup2 = EGG_GROUP_WATER_3, - .abilities = { ABILITY_BATTLE_ARMOR, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_WATER_3, EGG_GROUP_WATER_3}, + .abilities = {ABILITY_BATTLE_ARMOR, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11416,8 +10682,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 40, .baseSpAttack = 45, .baseSpDefense = 35, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 235, .expYield = 70, .evYield_HP = 0, @@ -11426,15 +10691,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11447,8 +10711,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 65, .baseSpDefense = 55, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 120, .expYield = 140, .evYield_HP = 0, @@ -11457,15 +10720,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 2, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11478,8 +10740,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 80, .baseSpAttack = 125, .baseSpDefense = 115, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 208, .evYield_HP = 0, @@ -11488,15 +10749,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 20, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_SYNCHRONIZE, ABILITY_TRACE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_SYNCHRONIZE, ABILITY_TRACE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11509,8 +10769,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 40, .baseSpDefense = 30, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 89, .evYield_HP = 0, @@ -11519,15 +10778,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11540,8 +10798,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 60, .baseSpDefense = 50, - .type1 = TYPE_DRAGON, - .type2 = TYPE_DRAGON, + .types = {TYPE_DRAGON, TYPE_DRAGON}, .catchRate = 45, .expYield = 144, .evYield_HP = 0, @@ -11550,15 +10807,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_ROCK_HEAD, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_ROCK_HEAD, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_WHITE, .noFlip = FALSE, @@ -11571,8 +10827,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 110, .baseSpDefense = 80, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 45, .expYield = 218, .evYield_HP = 0, @@ -11581,15 +10836,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_DRAGON_SCALE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_DRAGON_SCALE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_DRAGON, - .eggGroup2 = EGG_GROUP_DRAGON, - .abilities = { ABILITY_INTIMIDATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_DRAGON, EGG_GROUP_DRAGON}, + .abilities = {ABILITY_INTIMIDATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11602,8 +10856,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 30, .baseSpAttack = 35, .baseSpDefense = 60, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 103, .evYield_HP = 0, @@ -11612,15 +10865,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11633,8 +10885,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 55, .baseSpDefense = 80, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 153, .evYield_HP = 0, @@ -11643,15 +10894,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11664,8 +10914,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 70, .baseSpAttack = 95, .baseSpDefense = 90, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 210, .evYield_HP = 0, @@ -11674,15 +10923,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_METAL_COAT, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_METAL_COAT, .genderRatio = MON_GENDERLESS, .eggCycles = 40, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_MINERAL, - .eggGroup2 = EGG_GROUP_MINERAL, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_MINERAL, EGG_GROUP_MINERAL}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11695,8 +10943,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 50, .baseSpDefense = 100, - .type1 = TYPE_ROCK, - .type2 = TYPE_ROCK, + .types = {TYPE_ROCK, TYPE_ROCK}, .catchRate = 3, .expYield = 217, .evYield_HP = 0, @@ -11705,15 +10952,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BROWN, .noFlip = FALSE, @@ -11726,8 +10972,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 100, .baseSpDefense = 200, - .type1 = TYPE_ICE, - .type2 = TYPE_ICE, + .types = {TYPE_ICE, TYPE_ICE}, .catchRate = 3, .expYield = 216, .evYield_HP = 0, @@ -11736,15 +10981,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11757,8 +11001,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 50, .baseSpAttack = 75, .baseSpDefense = 150, - .type1 = TYPE_STEEL, - .type2 = TYPE_STEEL, + .types = {TYPE_STEEL, TYPE_STEEL}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -11767,15 +11010,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 80, .friendship = 35, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_CLEAR_BODY, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_CLEAR_BODY, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GRAY, .noFlip = FALSE, @@ -11788,8 +11030,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 150, .baseSpDefense = 140, - .type1 = TYPE_WATER, - .type2 = TYPE_WATER, + .types = {TYPE_WATER, TYPE_WATER}, .catchRate = 5, .expYield = 218, .evYield_HP = 0, @@ -11798,15 +11039,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_DRIZZLE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_DRIZZLE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11819,8 +11059,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 90, .baseSpAttack = 100, .baseSpDefense = 90, - .type1 = TYPE_GROUND, - .type2 = TYPE_GROUND, + .types = {TYPE_GROUND, TYPE_GROUND}, .catchRate = 5, .expYield = 218, .evYield_HP = 0, @@ -11829,15 +11068,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_DROUGHT, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_DROUGHT, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -11850,8 +11088,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 95, .baseSpAttack = 150, .baseSpDefense = 90, - .type1 = TYPE_DRAGON, - .type2 = TYPE_FLYING, + .types = {TYPE_DRAGON, TYPE_FLYING}, .catchRate = 3, .expYield = 220, .evYield_HP = 0, @@ -11860,15 +11097,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_AIR_LOCK, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_AIR_LOCK, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_GREEN, .noFlip = FALSE, @@ -11881,8 +11117,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 110, .baseSpDefense = 130, - .type1 = TYPE_DRAGON, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_DRAGON, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 211, .evYield_HP = 0, @@ -11891,15 +11126,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 3, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_FEMALE, .eggCycles = 120, .friendship = 90, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = FALSE, @@ -11912,8 +11146,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 110, .baseSpAttack = 130, .baseSpDefense = 110, - .type1 = TYPE_DRAGON, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_DRAGON, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 211, .evYield_HP = 0, @@ -11922,15 +11155,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 3, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_MALE, .eggCycles = 120, .friendship = 90, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, @@ -11943,8 +11175,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 100, .baseSpAttack = 100, .baseSpDefense = 100, - .type1 = TYPE_STEEL, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_STEEL, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 215, .evYield_HP = 3, @@ -11953,15 +11184,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 0, .evYield_SpDefense = 0, - .item1 = ITEM_STAR_PIECE, - .item2 = ITEM_STAR_PIECE, + .itemCommon = ITEM_STAR_PIECE, + .itemRare = ITEM_STAR_PIECE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 100, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_SERENE_GRACE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_SERENE_GRACE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_YELLOW, .noFlip = FALSE, @@ -11974,8 +11204,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 150, .baseSpAttack = 150, .baseSpDefense = 50, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 3, .expYield = 215, .evYield_HP = 0, @@ -11984,15 +11213,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 1, .evYield_SpAttack = 1, .evYield_SpDefense = 0, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = MON_GENDERLESS, .eggCycles = 120, .friendship = 0, .growthRate = GROWTH_SLOW, - .eggGroup1 = EGG_GROUP_UNDISCOVERED, - .eggGroup2 = EGG_GROUP_UNDISCOVERED, - .abilities = { ABILITY_PRESSURE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_UNDISCOVERED, EGG_GROUP_UNDISCOVERED}, + .abilities = {ABILITY_PRESSURE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_RED, .noFlip = TRUE, @@ -12005,8 +11233,7 @@ const struct BaseStats gBaseStats[] = .baseSpeed = 65, .baseSpAttack = 95, .baseSpDefense = 80, - .type1 = TYPE_PSYCHIC, - .type2 = TYPE_PSYCHIC, + .types = {TYPE_PSYCHIC, TYPE_PSYCHIC}, .catchRate = 45, .expYield = 147, .evYield_HP = 0, @@ -12015,15 +11242,14 @@ const struct BaseStats gBaseStats[] = .evYield_Speed = 0, .evYield_SpAttack = 1, .evYield_SpDefense = 1, - .item1 = ITEM_NONE, - .item2 = ITEM_NONE, + .itemCommon = ITEM_NONE, + .itemRare = ITEM_NONE, .genderRatio = PERCENT_FEMALE(50), .eggCycles = 25, .friendship = 70, .growthRate = GROWTH_FAST, - .eggGroup1 = EGG_GROUP_AMORPHOUS, - .eggGroup2 = EGG_GROUP_AMORPHOUS, - .abilities = { ABILITY_LEVITATE, ABILITY_NONE }, + .eggGroups = {EGG_GROUP_AMORPHOUS, EGG_GROUP_AMORPHOUS}, + .abilities = {ABILITY_LEVITATE, ABILITY_NONE}, .safariZoneFleeRate = 0, .bodyColor = BODY_COLOR_BLUE, .noFlip = FALSE, diff --git a/src/daycare.c b/src/daycare.c index 6780bcde4..adf754425 100644 --- a/src/daycare.c +++ b/src/daycare.c @@ -1092,13 +1092,13 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation) u8 metLocation; u8 isEgg; - CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); metLevel = 0; ball = ITEM_POKE_BALL; language = LANGUAGE_JAPANESE; SetMonData(mon, MON_DATA_POKEBALL, &ball); SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname); - SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles); + SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles); SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); SetMonData(mon, MON_DATA_LANGUAGE, &language); if (setHotSpringsLocation) @@ -1119,13 +1119,13 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare * u8 language; personality = daycare->offspringPersonality | (Random() << 16); - CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); metLevel = 0; ball = ITEM_POKE_BALL; language = LANGUAGE_JAPANESE; SetMonData(mon, MON_DATA_POKEBALL, &ball); SetMonData(mon, MON_DATA_NICKNAME, sJapaneseEggNickname); - SetMonData(mon, MON_DATA_FRIENDSHIP, &gBaseStats[species].eggCycles); + SetMonData(mon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].eggCycles); SetMonData(mon, MON_DATA_MET_LEVEL, &metLevel); SetMonData(mon, MON_DATA_LANGUAGE, &language); } @@ -1284,8 +1284,8 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare) trainerIds[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_OT_ID); personality = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_PERSONALITY); genders[i] = GetGenderFromSpeciesAndPersonality(species[i], personality); - eggGroups[i][0] = gBaseStats[species[i]].eggGroup1; - eggGroups[i][1] = gBaseStats[species[i]].eggGroup2; + eggGroups[i][0] = gSpeciesInfo[species[i]].eggGroups[0]; + eggGroups[i][1] = gSpeciesInfo[species[i]].eggGroups[1]; } // check unbreedable egg group @@ -1594,42 +1594,34 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) { u16 species; u32 personality, pokerus; - u8 i, friendship, language, gameMet, markings, isEventLegal; - u16 moves[4]; + u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter; + u16 moves[MAX_MON_MOVES]; u32 ivs[NUM_STATS]; species = GetMonData(egg, MON_DATA_SPECIES); - for (i = 0; i < 4; i++) - { + for (i = 0; i < MAX_MON_MOVES; i++) moves[i] = GetMonData(egg, MON_DATA_MOVE1 + i); - } personality = GetMonData(egg, MON_DATA_PERSONALITY); for (i = 0; i < NUM_STATS; i++) - { ivs[i] = GetMonData(egg, MON_DATA_HP_IV + i); - } // language = GetMonData(egg, MON_DATA_LANGUAGE); gameMet = GetMonData(egg, MON_DATA_MET_GAME); markings = GetMonData(egg, MON_DATA_MARKINGS); pokerus = GetMonData(egg, MON_DATA_POKERUS); - isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL); + isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER); - CreateMon(temp, species, EGG_HATCH_LEVEL, 32, TRUE, personality, 0, 0); + CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0); - for (i = 0; i < 4; i++) - { + for (i = 0; i < MAX_MON_MOVES; i++) SetMonData(temp, MON_DATA_MOVE1 + i, &moves[i]); - } for (i = 0; i < NUM_STATS; i++) - { SetMonData(temp, MON_DATA_HP_IV + i, &ivs[i]); - } language = GAME_LANGUAGE; SetMonData(temp, MON_DATA_LANGUAGE, &language); @@ -1639,7 +1631,7 @@ static void CreatedHatchedMon(struct Pokemon *egg, struct Pokemon *temp) friendship = 120; SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship); SetMonData(temp, MON_DATA_POKERUS, &pokerus); - SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); *egg = *temp; } diff --git a/src/dodrio_berry_picking.c b/src/dodrio_berry_picking.c index 41d5d6b92..a740bda86 100644 --- a/src/dodrio_berry_picking.c +++ b/src/dodrio_berry_picking.c @@ -2914,7 +2914,7 @@ void IsDodrioInParty(void) for (i = 0; i < PARTY_SIZE; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES) - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO) { gSpecialVar_Result = TRUE; return; diff --git a/src/field_poison.c b/src/field_poison.c index 34640489e..02ad5574c 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -12,7 +12,7 @@ static bool32 IsMonValidSpecies(struct Pokemon *pokemon) { - u16 species = GetMonData(pokemon, MON_DATA_SPECIES2); + u16 species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_NONE || species == SPECIES_EGG) return FALSE; return TRUE; diff --git a/src/field_specials.c b/src/field_specials.c index 872c5007d..2d360cfa6 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -199,7 +199,7 @@ bool8 PlayerHasGrassPokemonInParty(void) ) { species = GetMonData(pokemon, MON_DATA_SPECIES); - if (gBaseStats[species].type1 == TYPE_GRASS || gBaseStats[species].type2 == TYPE_GRASS) + if (gSpeciesInfo[species].types[0] == TYPE_GRASS || gSpeciesInfo[species].types[1] == TYPE_GRASS) return TRUE; } } @@ -423,7 +423,7 @@ bool8 IsStarterFirstStageInParty(void) u8 i; for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == species) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == species) return TRUE; } return FALSE; @@ -515,7 +515,7 @@ u8 GetLeadMonIndex(void) for (i = 0; i < partyCount; i++) { pokemon = &gPlayerParty[i]; - if (GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES2, NULL) != SPECIES_NONE) + if (GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG && GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE) return i; } return 0; @@ -523,7 +523,7 @@ u8 GetLeadMonIndex(void) u16 GetPartyMonSpecies(void) { - return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL); + return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES_OR_EGG, NULL); } bool8 IsMonOTNameNotPlayers(void) @@ -1716,7 +1716,7 @@ void UpdateTrainerCardPhotoIcons(void) partyCount = CalculatePlayerPartyCount(); for (i = 0; i < partyCount; i++) { - species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL); + species[i] = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL); personality[i] = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY, NULL); } VarSet(VAR_TRAINER_CARD_MON_ICON_1, SpeciesToMailSpecies(species[0], personality[0])); @@ -1768,7 +1768,7 @@ bool8 DoesPlayerPartyContainSpecies(void) u8 i; for (i = 0; i < partyCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004) return TRUE; } return FALSE; @@ -2232,7 +2232,7 @@ bool8 CapeBrinkGetMoveToTeachLeadPokemon(void) gSpecialVar_0x8007 = leadMonSlot; for (i = 0; i < NELEMS(sCapeBrinkCompatibleSpecies); i++) { - if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES2, NULL) == sCapeBrinkCompatibleSpecies[i]) + if (GetMonData(&gPlayerParty[leadMonSlot], MON_DATA_SPECIES_OR_EGG, NULL) == sCapeBrinkCompatibleSpecies[i]) { tutorMonId = i; break; @@ -2500,7 +2500,7 @@ bool8 PlayerPartyContainsSpeciesWithPlayerID(void) u8 i; for (i = 0; i < playerCount; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == gSpecialVar_0x8004 + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == gSpecialVar_0x8004 && GetPlayerTrainerId() == GetMonData(&gPlayerParty[i], MON_DATA_OT_ID, NULL)) return TRUE; } diff --git a/src/hall_of_fame.c b/src/hall_of_fame.c index 72ba97b47..d408b528e 100644 --- a/src/hall_of_fame.c +++ b/src/hall_of_fame.c @@ -390,7 +390,7 @@ static void Task_Hof_InitMonData(u8 taskId) { if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) != SPECIES_NONE) { - sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + sHofMonPtr[0].mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); sHofMonPtr[0].mon[i].tid = GetMonData(&gPlayerParty[i], MON_DATA_OT_ID); sHofMonPtr[0].mon[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); sHofMonPtr[0].mon[i].lvl = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL); diff --git a/src/item_use.c b/src/item_use.c index 0070c5631..ce659673e 100644 --- a/src/item_use.c +++ b/src/item_use.c @@ -923,7 +923,7 @@ void ItemUse_SetQuestLogEvent(u8 eventId, struct Pokemon *pokemon, u16 itemId, u questLog->itemId = itemId; questLog->param = param; if (pokemon != NULL) - questLog->species = GetMonData(pokemon, MON_DATA_SPECIES2); + questLog->species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG); else questLog->species = 0xFFFF; SetQuestLogEvent(eventId, (void *)questLog); diff --git a/src/load_save.c b/src/load_save.c index 49c2cec88..4d33ceeb8 100644 --- a/src/load_save.c +++ b/src/load_save.c @@ -3,6 +3,7 @@ #include "gba/flash_internal.h" #include "load_save.h" #include "pokemon.h" +#include "pokemon_storage_system.h" #include "random.h" #include "item.h" #include "save_location.h" diff --git a/src/mystery_event_script.c b/src/mystery_event_script.c index edcbdb722..d50c09484 100644 --- a/src/mystery_event_script.c +++ b/src/mystery_event_script.c @@ -242,7 +242,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) void *mailPtr = (void *)(data + sizeof(struct Pokemon)); pokemon = *(struct Pokemon *)pokemonPtr; - species = GetMonData(&pokemon, MON_DATA_SPECIES2); + species = GetMonData(&pokemon, MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) StringCopyN(gStringVar1, gText_EggNickname, POKEMON_NAME_LENGTH + 1); diff --git a/src/oak_speech.c b/src/oak_speech.c index d5b2ba7ba..4d2e4ccb8 100644 --- a/src/oak_speech.c +++ b/src/oak_speech.c @@ -722,7 +722,7 @@ static void Task_NewGameScene(u8 taskId) break; case 1: sOakSpeechResources = AllocZeroed(sizeof(*sOakSpeechResources)); - OakSpeechNidoranFSetup(1, TRUE); + CreateMonSpritesGfxManager(1, 1); break; case 2: SetGpuReg(REG_OFFSET_WIN0H, 0); @@ -1775,7 +1775,7 @@ static void Task_OakSpeech_WaitForFade(u8 taskId) static void Task_OakSpeech_FreeResources(u8 taskId) { FreeAllWindowBuffers(); - OakSpeechNidoranFFreeResources(); + DestroyMonSpritesGfxManager(); Free(sOakSpeechResources); sOakSpeechResources = NULL; gTextFlags.canABSpeedUpPrint = FALSE; @@ -1876,7 +1876,7 @@ static void CreateNidoranFSprite(u8 taskId) { u8 spriteId; - DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], OakSpeechNidoranFGetBuffer(0), SPECIES_NIDORAN_F); + DecompressPicFromTable(&gMonFrontPicTable[SPECIES_NIDORAN_F], MonSpritesGfxManager_GetSpritePtr(0), SPECIES_NIDORAN_F); LoadCompressedSpritePaletteUsingHeap(&gMonPaletteTable[SPECIES_NIDORAN_F]); SetMultiuseSpriteTemplateToPokemon(SPECIES_NIDORAN_F, 0); spriteId = CreateSprite(&gMultiuseSpriteTemplate, 96, 96, 1); diff --git a/src/party_menu.c b/src/party_menu.c index f192cd2e5..cf1984c84 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -2652,7 +2652,7 @@ static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *m // If in a multi battle, show partners Deoxys icon as Normal forme if (IsMultiBattle() == TRUE && gMain.inBattle) handleDeoxys = (sMultiBattlePartnersPartyMask[slot] ^ handleDeoxys) ? TRUE : FALSE; - species2 = GetMonData(mon, MON_DATA_SPECIES2); + species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, handleDeoxys); UpdatePartyMonHPBar(menuBox->monSpriteId, mon); } @@ -3357,8 +3357,8 @@ static void SetSwitchedPartyOrderQuestLogEvent(void) { u16 *buffer = Alloc(2 * sizeof(u16)); - buffer[0] = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); - buffer[1] = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES2); + buffer[0] = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); + buffer[1] = GetMonData(&gPlayerParty[gPartyMenu.slotId2], MON_DATA_SPECIES_OR_EGG); SetQuestLogEvent(QL_EVENT_SWITCHED_PARTY_ORDER, buffer); Free(buffer); } @@ -3847,11 +3847,11 @@ static void CursorCB_Store(u8 taskId) // Register mon for the Trading Board in Union Room static void CursorCB_Register(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); - switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal)) + switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter)) { case CANT_REGISTER_MON: StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow); @@ -3874,10 +3874,10 @@ static void CursorCB_Register(u8 taskId) static void CursorCB_Trade1(u8 taskId) { - u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2); + u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG); u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES); - u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL); - u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal); + u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER); + u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter); if (stringId != UR_TRADE_MSG_NONE) { @@ -4133,7 +4133,7 @@ static void SetSwappedHeldItemQuestLogEvent(struct Pokemon *mon, u16 item, u16 i { u16 *ptr = Alloc(4 * sizeof(u16)); - ptr[2] = GetMonData(mon, MON_DATA_SPECIES2); + ptr[2] = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); ptr[0] = item; ptr[1] = item2; if (gPartyMenu.action == PARTY_ACTION_GIVE_PC_ITEM) @@ -4154,7 +4154,7 @@ static void SetUsedFieldMoveQuestLogEvent(struct Pokemon *mon, u8 fieldMove) { struct FieldMoveWarpParams *ptr = Alloc(sizeof(*ptr)); - ptr->species = GetMonData(mon, MON_DATA_SPECIES2); + ptr->species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); ptr->fieldMove = fieldMove; switch (ptr->fieldMove) { @@ -4187,7 +4187,7 @@ void SetUsedFlyQuestLogEvent(const u8 *healLocCtrlData) mapHeader = Overworld_GetMapHeaderByGroupAndId(ptr->mapGroup, ptr->mapNum); Free(ptr); ptr2 = Alloc(4); - ptr2->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES2); + ptr2->species = GetMonData(&gPlayerParty[GetCursorSelectionMonId()], MON_DATA_SPECIES_OR_EGG); ptr2->fieldMove = FIELD_MOVE_FLY; ptr2->regionMapSectionId = mapHeader->regionMapSectionId; SetQuestLogEvent(QL_EVENT_USED_FIELD_MOVE, (u16 *)ptr2); @@ -5342,7 +5342,7 @@ u8 GetItemEffectType(u16 item) itemEffect = gSaveBlock1Ptr->enigmaBerry.itemEffect; else itemEffect = gItemEffectTable[item - ITEM_POTION]; - if ((itemEffect[0] & (ITEM0_HIGH_CRIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_MIST)) + if ((itemEffect[0] & (ITEM0_DIRE_HIT | ITEM0_X_ATTACK)) || itemEffect[1] || itemEffect[2] || (itemEffect[3] & ITEM3_GUARD_SPEC)) return ITEM_EFFECT_X_ITEM; else if (itemEffect[0] & ITEM0_SACRED_ASH) return ITEM_EFFECT_SACRED_ASH; diff --git a/src/pokedex_screen.c b/src/pokedex_screen.c index 6a3f5d884..53a6485d8 100644 --- a/src/pokedex_screen.c +++ b/src/pokedex_screen.c @@ -1555,10 +1555,10 @@ static void ItemPrintFunc_OrderedListMenu(u8 windowId, u32 itemId, u8 y) if (caught) { BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, 0, 0x28, y); - type1 = gBaseStats[species].type1; + type1 = gSpeciesInfo[species].types[0]; BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, type1 + 1, 0x78, y); - if (type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gBaseStats[species].type2 + 1, 0x98, y); + if (type1 != gSpeciesInfo[species].types[1]) + BlitMoveInfoIcon(sPokedexScreenData->numericalOrderWindowId, gSpeciesInfo[species].types[1] + 1, 0x98, y); } } @@ -3091,9 +3091,9 @@ u8 DexScreen_DrawMonAreaPage(void) if (monIsCaught) { - BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type1, 0, 1); - if (gBaseStats[species].type1 != gBaseStats[species].type2) - BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gBaseStats[species].type2, 32, 1); + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[0], 0, 1); + if (gSpeciesInfo[species].types[0] != gSpeciesInfo[species].types[1]) + BlitMoveInfoIcon(sPokedexScreenData->windowIds[12], 1 + gSpeciesInfo[species].types[1], 32, 1); } PutWindowTilemap(sPokedexScreenData->windowIds[12]); CopyWindowToVram(sPokedexScreenData->windowIds[12], COPYWIN_GFX); diff --git a/src/pokemon.c b/src/pokemon.c index 172f51ad5..330ae3dea 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -23,6 +23,7 @@ #include "overworld.h" #include "party_menu.h" #include "field_specials.h" +#include "berry.h" #include "constants/items.h" #include "constants/item_effects.h" #include "constants/hoenn_cries.h" @@ -40,16 +41,16 @@ #define SPECIES_TO_NATIONAL(name) [SPECIES_##name - 1] = NATIONAL_DEX_##name #define HOENN_TO_NATIONAL(name) [HOENN_DEX_##name - 1] = NATIONAL_DEX_##name -struct OakSpeechNidoranFStruct +struct MonSpritesGfxManager { - u8 spriteCount:4; + u8 numSprites:4; u8 battlePosition:4; - u8 frameCount; - u8 enable; - bool8 enable2; - u32 sizePerSprite; - u8 *dataBuffer; - u8 **bufferPtrs; + u8 numFrames; + u8 active; + u8 mode; + u32 dataSize; + u8 *spriteBuffer; + u8 **spritePointers; struct SpriteTemplate *templates; struct SpriteFrameImage *frameImages; }; @@ -60,7 +61,7 @@ EWRAM_DATA u8 gEnemyPartyCount = 0; EWRAM_DATA struct Pokemon gEnemyParty[PARTY_SIZE] = {}; EWRAM_DATA struct Pokemon gPlayerParty[PARTY_SIZE] = {}; EWRAM_DATA struct SpriteTemplate gMultiuseSpriteTemplate = {0}; -static EWRAM_DATA struct OakSpeechNidoranFStruct *sOakSpeechNidoranResources = NULL; +static EWRAM_DATA struct MonSpritesGfxManager *sMonSpritesGfxManager = NULL; static union PokemonSubstruct *GetSubstruct(struct BoxPokemon *boxMon, u32 personality, u8 substructType); static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId); @@ -98,7 +99,8 @@ static const struct CombinedMove sCombinedMoves[2] = // NOTE: The order of the elements in the 3 arrays below is irrelevant. // To reorder the pokedex, see the values in include/constants/pokedex.h. -static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) + // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex) +static const u16 sSpeciesToHoennPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_HOENN(BULBASAUR), SPECIES_TO_HOENN(IVYSAUR), @@ -513,7 +515,8 @@ static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoe SPECIES_TO_HOENN(CHIMECHO), }; -static const u16 sSpeciesToNationalPokedexNum[] = // Assigns all species to the National Dex Index (Summary No. for National Dex) + // Assigns all species to the National Dex Index (Summary No. for National Dex) +static const u16 sSpeciesToNationalPokedexNum[NUM_SPECIES - 1] = { SPECIES_TO_NATIONAL(BULBASAUR), SPECIES_TO_NATIONAL(IVYSAUR), @@ -928,7 +931,8 @@ static const u16 sSpeciesToNationalPokedexNum[] = // Assigns all species to the SPECIES_TO_NATIONAL(CHIMECHO), }; -static const u16 sHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using National Dex Index) +// Assigns all Hoenn Dex Indexes to a National Dex Index +static const u16 sHoennToNationalOrder[NUM_SPECIES - 1] = { HOENN_TO_NATIONAL(TREECKO), HOENN_TO_NATIONAL(GROVYLE), @@ -1345,54 +1349,53 @@ static const u16 sHoennToNationalOrder[] = // Assigns Hoenn Dex Pokémon (Using static const struct SpindaSpot sSpindaSpotGraphics[] = { - {16, 7, INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, - {40, 8, INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, - {22, 25, INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, - {34, 26, INCBIN_U16("graphics/spinda_spots/spot_3.bin")} + {.x = 16, .y = 7, .image = INCBIN_U16("graphics/spinda_spots/spot_0.bin")}, + {.x = 40, .y = 8, .image = INCBIN_U16("graphics/spinda_spots/spot_1.bin")}, + {.x = 22, .y = 25, .image = INCBIN_U16("graphics/spinda_spots/spot_2.bin")}, + {.x = 34, .y = 26, .image = INCBIN_U16("graphics/spinda_spots/spot_3.bin")} }; #include "data/pokemon/item_effects.h" -static const s8 sNatureStatTable[][5] = -{ - // Atk Def Spd Sp.Atk Sp.Def - { 0, 0, 0, 0, 0}, // Hardy - { +1, -1, 0, 0, 0}, // Lonely - { +1, 0, -1, 0, 0}, // Brave - { +1, 0, 0, -1, 0}, // Adamant - { +1, 0, 0, 0, -1}, // Naughty - { -1, +1, 0, 0, 0}, // Bold - { 0, 0, 0, 0, 0}, // Docile - { 0, +1, -1, 0, 0}, // Relaxed - { 0, +1, 0, -1, 0}, // Impish - { 0, +1, 0, 0, -1}, // Lax - { -1, 0, +1, 0, 0}, // Timid - { 0, -1, +1, 0, 0}, // Hasty - { 0, 0, 0, 0, 0}, // Serious - { 0, 0, +1, -1, 0}, // Jolly - { 0, 0, +1, 0, -1}, // Naive - { -1, 0, 0, +1, 0}, // Modest - { 0, -1, 0, +1, 0}, // Mild - { 0, 0, -1, +1, 0}, // Quiet - { 0, 0, 0, 0, 0}, // Bashful - { 0, 0, 0, +1, -1}, // Rash - { -1, 0, 0, 0, +1}, // Calm - { 0, -1, 0, 0, +1}, // Gentle - { 0, 0, -1, 0, +1}, // Sassy - { 0, 0, 0, -1, +1}, // Careful - { 0, 0, 0, 0, 0}, // Quirky +static const s8 sNatureStatTable[NUM_NATURES][NUM_NATURE_STATS] = +{ // Attack Defense Speed Sp.Atk Sp.Def + [NATURE_HARDY] = { 0, 0, 0, 0, 0 }, + [NATURE_LONELY] = { +1, -1, 0, 0, 0 }, + [NATURE_BRAVE] = { +1, 0, -1, 0, 0 }, + [NATURE_ADAMANT] = { +1, 0, 0, -1, 0 }, + [NATURE_NAUGHTY] = { +1, 0, 0, 0, -1 }, + [NATURE_BOLD] = { -1, +1, 0, 0, 0 }, + [NATURE_DOCILE] = { 0, 0, 0, 0, 0 }, + [NATURE_RELAXED] = { 0, +1, -1, 0, 0 }, + [NATURE_IMPISH] = { 0, +1, 0, -1, 0 }, + [NATURE_LAX] = { 0, +1, 0, 0, -1 }, + [NATURE_TIMID] = { -1, 0, +1, 0, 0 }, + [NATURE_HASTY] = { 0, -1, +1, 0, 0 }, + [NATURE_SERIOUS] = { 0, 0, 0, 0, 0 }, + [NATURE_JOLLY] = { 0, 0, +1, -1, 0 }, + [NATURE_NAIVE] = { 0, 0, +1, 0, -1 }, + [NATURE_MODEST] = { -1, 0, 0, +1, 0 }, + [NATURE_MILD] = { 0, -1, 0, +1, 0 }, + [NATURE_QUIET] = { 0, 0, -1, +1, 0 }, + [NATURE_BASHFUL] = { 0, 0, 0, 0, 0 }, + [NATURE_RASH] = { 0, 0, 0, +1, -1 }, + [NATURE_CALM] = { -1, 0, 0, 0, +1 }, + [NATURE_GENTLE] = { 0, -1, 0, 0, +1 }, + [NATURE_SASSY] = { 0, 0, -1, 0, +1 }, + [NATURE_CAREFUL] = { 0, 0, 0, -1, +1 }, + [NATURE_QUIRKY] = { 0, 0, 0, 0, 0 }, }; #include "data/pokemon/tmhm_learnsets.h" #include "data/pokemon/trainer_class_lookups.h" #include "data/pokemon/cry_ids.h" #include "data/pokemon/experience_tables.h" -#include "data/pokemon/base_stats.h" +#include "data/pokemon/species_info.h" #include "data/pokemon/level_up_learnsets.h" #include "data/pokemon/evolution.h" #include "data/pokemon/level_up_learnset_pointers.h" -static const s8 sPokeblockFlavorCompatibilityTable[] = +static const s8 sPokeblockFlavorCompatibilityTable[NUM_NATURES * FLAVOR_COUNT] = { // Cool, Beauty, Cute, Smart, Tough 0, 0, 0, 0, 0, // Hardy @@ -1422,32 +1425,38 @@ static const s8 sPokeblockFlavorCompatibilityTable[] = 0, 0, 0, 0, 0 // Quirky }; -const u8 gPPUpGetMask[] = { 0x03, 0x0c, 0x30, 0xc0 }; // Masks for getting PP Up count, also PP Max values +#define PP_UP_SHIFTS(val) val, (val) << 2, (val) << 4, (val) << 6 +#define PP_UP_SHIFTS_INV(val) (u8)~(val), (u8)~((val) << 2), (u8)~((val) << 4), (u8)~((val) << 6) -const u8 gPPUpSetMask[] = { 0xfc, 0xf3, 0xcf, 0x3f }; // Masks for setting PP Up count +// PP Up bonuses are stored for a Pokémon as a single byte. +// There are 2 bits (a value 0-3) for each move slot that +// represent how many PP Ups have been applied. +// The following arrays take a move slot id and return: +// gPPUpGetMask - A mask to get the number of PP Ups applied to that move slot +// gPPUpClearMask - A mask to clear the number of PP Ups applied to that move slot +// gPPUpAddValues - A value to add to the PP Bonuses byte to apply 1 PP Up to that move slot +const u8 gPPUpGetMask[MAX_MON_MOVES] = {PP_UP_SHIFTS(3)}; +const u8 gPPUpClearMask[MAX_MON_MOVES] = {PP_UP_SHIFTS_INV(3)}; +const u8 gPPUpAddValues[MAX_MON_MOVES] = {PP_UP_SHIFTS(1)}; -const u8 gPPUpAddMask[] = { 0x01, 0x04, 0x10, 0x40 }; // Values added to PP Up count - -const u8 gStatStageRatios[][2] = +const u8 gStatStageRatios[MAX_STAT_STAGE + 1][2] = { - { 10, 40 }, - { 10, 35 }, - { 10, 30 }, - { 10, 25 }, - { 10, 20 }, - { 10, 15 }, - { 10, 10 }, - { 15, 10 }, - { 20, 10 }, - { 25, 10 }, - { 30, 10 }, - { 35, 10 }, - { 40, 10 }, - { 138, 174 }, - { 108, 120 }, + {10, 40}, // -6, MIN_STAT_STAGE + {10, 35}, // -5 + {10, 30}, // -4 + {10, 25}, // -3 + {10, 20}, // -2 + {10, 15}, // -1 + {10, 10}, // 0, DEFAULT_STAT_STAGE + {15, 10}, // +1 + {20, 10}, // +2 + {25, 10}, // +3 + {30, 10}, // +4 + {35, 10}, // +5 + {40, 10}, // +6, MAX_STAT_STAGE }; -static const u8 sFiller = _(""); +static const u8 sText_GameFreak[] = _("ゲーフリ"); static const u8 sHoldEffectToType[][2] = { @@ -1470,7 +1479,7 @@ static const u8 sHoldEffectToType[][2] = {HOLD_EFFECT_NORMAL_POWER, TYPE_NORMAL}, }; -const struct SpriteTemplate gSpriteTemplates_Battlers[] = +const struct SpriteTemplate gSpriteTemplates_Battlers[MAX_BATTLERS_COUNT] = { [B_POSITION_PLAYER_LEFT] = { .tileTag = TAG_NONE, @@ -1569,7 +1578,8 @@ static const struct SpriteTemplate sTrainerBackSpriteTemplates[] = }; // Classes dummied out -static const u8 sSecretBaseFacilityClasses[][5] = +#define NUM_SECRET_BASE_CLASSES 5 +static const u8 sSecretBaseFacilityClasses[GENDER_COUNT][NUM_SECRET_BASE_CLASSES] = { [MALE] = { FACILITY_CLASS_YOUNGSTER, @@ -1597,11 +1607,14 @@ static const u8 sGetMonDataEVConstants[] = MON_DATA_SPATK_EV }; +// For stat-raising items static const u8 sStatsToRaise[] = { STAT_ATK, STAT_ATK, STAT_SPEED, STAT_DEF, STAT_SPATK, STAT_ACC }; +// 3 modifiers each for how much to change friendship for different ranges +// 0-99, 100-199, 200+ static const s8 sFriendshipEventDeltas[][3] = { [FRIENDSHIP_EVENT_GROW_LEVEL] = { 5, 3, 2 }, @@ -1616,31 +1629,35 @@ static const s8 sFriendshipEventDeltas[][3] = [FRIENDSHIP_EVENT_FAINT_LARGE] = {-5, -5, -10 }, }; +#define HM_MOVES_END 0xFFFF + static const u16 sHMMoves[] = { MOVE_CUT, MOVE_FLY, MOVE_SURF, MOVE_STRENGTH, MOVE_FLASH, - MOVE_ROCK_SMASH, MOVE_WATERFALL, MOVE_DIVE, 0xFFFF + MOVE_ROCK_SMASH, MOVE_WATERFALL, MOVE_DIVE, HM_MOVES_END }; #if defined(FIRERED) +// Attack forme static const u16 sDeoxysBaseStats[] = { - 50, // Hp - 180, // Attack - 20, // Defense - 150, // Speed - 180, // Sp.Attack - 20, // Sp.Defense + [STAT_HP] = 50, + [STAT_ATK] = 180, + [STAT_DEF] = 20, + [STAT_SPEED] = 150, + [STAT_SPATK] = 180, + [STAT_SPDEF] = 20, }; #elif defined(LEAFGREEN) +// Defense forme static const u16 sDeoxysBaseStats[] = { - 50, // Hp - 70, // Attack - 160, // Defense - 90, // Speed - 70, // Sp.Attack - 160, // Sp.Defense + [STAT_HP] = 50, + [STAT_ATK] = 70, + [STAT_DEF] = 160, + [STAT_SPEED] = 90, + [STAT_SPATK] = 70, + [STAT_SPDEF] = 160, }; #endif @@ -1668,34 +1685,33 @@ const u16 gUnionRoomFacilityClasses[NUM_UNION_ROOM_CLASSES * GENDER_COUNT] = FACILITY_CLASS_BEAUTY, }; -static const struct OamData sOakSpeechNidoranFDummyOamData = +static const struct OamData sOamData_64x64 = { .y = 0, .affineMode = ST_OAM_AFFINE_OFF, - .objMode = 0, + .objMode = ST_OAM_OBJ_NORMAL, .mosaic = FALSE, - .bpp = 0, - .shape = 0, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, }; -static const struct SpriteTemplate sOakSpeechNidoranFDummyTemplate = +static const struct SpriteTemplate sSpriteTemplate_64x64 = { .tileTag = TAG_NONE, .paletteTag = TAG_NONE, - .oam = &sOakSpeechNidoranFDummyOamData, + .oam = &sOamData_64x64, .anims = gDummySpriteAnimTable, .images = NULL, .affineAnims = gDummySpriteAffineAnimTable, .callback = SpriteCallbackDummy, }; -// code void ZeroBoxMonData(struct BoxPokemon *boxMon) { u8 *raw = (u8 *)boxMon; @@ -1718,7 +1734,7 @@ void ZeroMonData(struct Pokemon *mon) SetMonData(mon, MON_DATA_SPEED, &arg); SetMonData(mon, MON_DATA_SPATK, &arg); SetMonData(mon, MON_DATA_SPDEF, &arg); - arg = 255; + arg = MAIL_NONE; SetMonData(mon, MON_DATA_MAIL, &arg); } @@ -1742,7 +1758,7 @@ void CreateMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFix ZeroMonData(mon); CreateBoxMon(&mon->box, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); SetMonData(mon, MON_DATA_LEVEL, &level); - arg = 255; + arg = MAIL_NONE; SetMonData(mon, MON_DATA_MAIL, &arg); CalculateMonStats(mon); } @@ -1770,7 +1786,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, do { value = Random32(); - shinyValue = HIHALF(value) ^ LOHALF(value) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(value, personality); } while (shinyValue < SHINY_ODDS); } else if (otIdType == OT_ID_PRESET) //Pokemon has a preset OT ID @@ -1795,8 +1811,8 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_LANGUAGE, &gGameLanguage); SetBoxMonData(boxMon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName); SetBoxMonData(boxMon, MON_DATA_SPECIES, &species); - SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gBaseStats[species].growthRate][level]); - SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gBaseStats[species].friendship); + SetBoxMonData(boxMon, MON_DATA_EXP, &gExperienceTables[gSpeciesInfo[species].growthRate][level]); + SetBoxMonData(boxMon, MON_DATA_FRIENDSHIP, &gSpeciesInfo[species].friendship); value = GetCurrentRegionMapSectionId(); SetBoxMonData(boxMon, MON_DATA_MET_LOCATION, &value); SetBoxMonData(boxMon, MON_DATA_MET_LEVEL, &level); @@ -1805,7 +1821,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, SetBoxMonData(boxMon, MON_DATA_POKEBALL, &value); SetBoxMonData(boxMon, MON_DATA_OT_GENDER, &gSaveBlock2Ptr->playerGender); - if (fixedIV < 32) + if (fixedIV < USE_RANDOM_IVS) { SetBoxMonData(boxMon, MON_DATA_HP_IV, &fixedIV); SetBoxMonData(boxMon, MON_DATA_ATK_IV, &fixedIV); @@ -1819,24 +1835,24 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, u32 iv; value = Random(); - iv = value & 0x1F; + iv = value & MAX_IV_MASK; SetBoxMonData(boxMon, MON_DATA_HP_IV, &iv); - iv = (value & 0x3E0) >> 5; + iv = (value & (MAX_IV_MASK << 5)) >> 5; SetBoxMonData(boxMon, MON_DATA_ATK_IV, &iv); - iv = (value & 0x7C00) >> 10; + iv = (value & (MAX_IV_MASK << 10)) >> 10; SetBoxMonData(boxMon, MON_DATA_DEF_IV, &iv); value = Random(); - iv = value & 0x1F; + iv = value & MAX_IV_MASK; SetBoxMonData(boxMon, MON_DATA_SPEED_IV, &iv); - iv = (value & 0x3E0) >> 5; + iv = (value & (MAX_IV_MASK << 5)) >> 5; SetBoxMonData(boxMon, MON_DATA_SPATK_IV, &iv); - iv = (value & 0x7C00) >> 10; + iv = (value & (MAX_IV_MASK << 10)) >> 10; SetBoxMonData(boxMon, MON_DATA_SPDEF_IV, &iv); } - if (gBaseStats[species].abilities[1]) + if (gSpeciesInfo[species].abilities[1]) { value = personality & 1; SetBoxMonData(boxMon, MON_DATA_ABILITY_NUM, &value); @@ -1855,7 +1871,7 @@ void CreateMonWithNature(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, } while (nature != GetNatureFromPersonality(personality)); - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 gender, u8 nature, u8 unownLetter) @@ -1869,7 +1885,7 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, do { personality = Random32(); - actualLetter = ((((personality & 0x3000000) >> 18) | ((personality & 0x30000) >> 12) | ((personality & 0x300) >> 6) | (personality & 0x3)) % 28); + actualLetter = GET_UNOWN_LETTER(personality); } while (nature != GetNatureFromPersonality(personality) || gender != GetGenderFromSpeciesAndPersonality(species, personality) @@ -1885,7 +1901,7 @@ void CreateMonWithGenderNatureLetter(struct Pokemon *mon, u16 species, u8 level, || gender != GetGenderFromSpeciesAndPersonality(species, personality)); } - CreateMon(mon, species, level, fixedIV, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, fixedIV, TRUE, personality, OT_ID_PLAYER_ID, 0); } // Used to create the Old Man's Weedle? @@ -1900,25 +1916,25 @@ void CreateMaleMon(struct Pokemon *mon, u16 species, u8 level) personality = Random32(); } while (GetGenderFromSpeciesAndPersonality(species, personality) != MON_MALE); - CreateMon(mon, species, level, 32, 1, personality, OT_ID_PRESET, otId); + CreateMon(mon, species, level, USE_RANDOM_IVS, TRUE, personality, OT_ID_PRESET, otId); } void CreateMonWithIVsPersonality(struct Pokemon *mon, u16 species, u8 level, u32 ivs, u32 personality) { - CreateMon(mon, species, level, 0, 1, personality, OT_ID_PLAYER_ID, 0); + CreateMon(mon, species, level, 0, TRUE, personality, OT_ID_PLAYER_ID, 0); SetMonData(mon, MON_DATA_IVS, &ivs); CalculateMonStats(mon); } static void CreateMonWithIVsOTID(struct Pokemon *mon, u16 species, u8 level, u8 *ivs, u32 otId) { - CreateMon(mon, species, level, 0, 0, 0, OT_ID_PRESET, otId); - SetMonData(mon, MON_DATA_HP_IV, &ivs[0]); - SetMonData(mon, MON_DATA_ATK_IV, &ivs[1]); - SetMonData(mon, MON_DATA_DEF_IV, &ivs[2]); - SetMonData(mon, MON_DATA_SPEED_IV, &ivs[3]); - SetMonData(mon, MON_DATA_SPATK_IV, &ivs[4]); - SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[5]); + CreateMon(mon, species, level, 0, FALSE, 0, OT_ID_PRESET, otId); + SetMonData(mon, MON_DATA_HP_IV, &ivs[STAT_HP]); + SetMonData(mon, MON_DATA_ATK_IV, &ivs[STAT_ATK]); + SetMonData(mon, MON_DATA_DEF_IV, &ivs[STAT_DEF]); + SetMonData(mon, MON_DATA_SPEED_IV, &ivs[STAT_SPEED]); + SetMonData(mon, MON_DATA_SPATK_IV, &ivs[STAT_SPATK]); + SetMonData(mon, MON_DATA_SPDEF_IV, &ivs[STAT_SPDEF]); CalculateMonStats(mon); } @@ -1929,7 +1945,7 @@ void CreateMonWithEVSpread(struct Pokemon *mon, u16 species, u8 level, u8 fixedI u16 evAmount; u8 evsBits; - CreateMon(mon, species, level, fixedIV, 0, 0, 0, 0); + CreateMon(mon, species, level, fixedIV, FALSE, 0, OT_ID_PLAYER_ID, 0); evsBits = evSpread; @@ -1959,9 +1975,9 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) s32 i; u8 value; - CreateMon(mon, src->species, src->level, 0, 1, src->personality, 1, src->otId); + CreateMon(mon, src->species, src->level, 0, TRUE, src->personality, OT_ID_PRESET, src->otId); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) SetMonMoveSlot(mon, src->moves[i], i); SetMonData(mon, MON_DATA_PP_BONUSES, &src->ppBonuses); @@ -1971,7 +1987,7 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) /* StringCopy(nickname, src->nickname); - if (nickname[0] == 0xFC && nickname[1] == 0x15) + if (nickname[0] == EXT_CTRL_CODE_BEGIN && nickname[1] == EXT_CTRL_CODE_JPN) language = LANGUAGE_JAPANESE; else language = GAME_LANGUAGE; @@ -2005,12 +2021,12 @@ void CreateBattleTowerMon(struct Pokemon *mon, struct BattleTowerPokemon *src) CalculateMonStats(mon); } -static void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) +static void CreateEventMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId) { - bool32 isEventLegal = TRUE; + bool32 isModernFatefulEncounter = TRUE; CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId); - SetMonData(mon, MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(mon, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); } void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest) @@ -2026,7 +2042,7 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP dest->heldItem = heldItem; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) dest->moves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); dest->level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -2059,16 +2075,16 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon) union PokemonSubstruct *substruct3 = GetSubstruct(boxMon, boxMon->personality, 3); s32 i; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct0->raw); i++) checksum += substruct0->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct1->raw); i++) checksum += substruct1->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct2->raw); i++) checksum += substruct2->raw[i]; - for (i = 0; i < 6; i++) + for (i = 0; i < (s32)ARRAY_COUNT(substruct3->raw); i++) checksum += substruct3->raw[i]; return checksum; @@ -2076,7 +2092,7 @@ static u16 CalculateBoxMonChecksum(struct BoxPokemon *boxMon) #define CALC_STAT(base, iv, ev, statIndex, field) \ { \ - u8 baseStat = gBaseStats[species].base; \ + u8 baseStat = gSpeciesInfo[species].base; \ s32 n = (((2 * baseStat + iv + ev / 4) * level) / 100) + 5; \ u8 nature = GetNature(mon); \ n = ModifyStatByNature(nature, n, statIndex); \ @@ -2111,13 +2127,13 @@ void CalculateMonStats(struct Pokemon *mon) } else { - s32 n = 2 * gBaseStats[species].baseHP + hpIV; + s32 n = 2 * gSpeciesInfo[species].baseHP + hpIV; newMaxHP = (((n + hpEV / 4) * level) / 100) + level + 10; } - gBattleScripting.field_23 = newMaxHP - oldMaxHP; - if (gBattleScripting.field_23 == 0) - gBattleScripting.field_23 = 1; + gBattleScripting.levelUpHP = newMaxHP - oldMaxHP; + if (gBattleScripting.levelUpHP == 0) + gBattleScripting.levelUpHP = 1; SetMonData(mon, MON_DATA_MAX_HP, &newMaxHP); @@ -2160,7 +2176,7 @@ void BoxMonToMon(struct BoxPokemon *src, struct Pokemon *dest) SetMonData(dest, MON_DATA_STATUS, &value); SetMonData(dest, MON_DATA_HP, &value); SetMonData(dest, MON_DATA_MAX_HP, &value); - value = 255; + value = MAIL_NONE; SetMonData(dest, MON_DATA_MAIL, &value); CalculateMonStats(dest); } @@ -2171,7 +2187,7 @@ static u8 GetLevelFromMonExp(struct Pokemon *mon) u32 exp = GetMonData(mon, MON_DATA_EXP, NULL); s32 level = 1; - while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp) + while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp) level++; return level - 1; @@ -2183,7 +2199,7 @@ u8 GetLevelFromBoxMonExp(struct BoxPokemon *boxMon) u32 exp = GetBoxMonData(boxMon, MON_DATA_EXP, NULL); s32 level = 1; - while (level <= MAX_LEVEL && gExperienceTables[gBaseStats[species].growthRate][level] <= exp) + while (level <= MAX_LEVEL && gExperienceTables[gSpeciesInfo[species].growthRate][level] <= exp) level++; return level - 1; @@ -2197,7 +2213,7 @@ u16 GiveMoveToMon(struct Pokemon *mon, u16 move) static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { u16 existingMove = GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, NULL); if (!existingMove) @@ -2207,16 +2223,16 @@ static u16 GiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) return move; } if (existingMove == move) - return -2; + return MON_ALREADY_KNOWS_MOVE; } - return -1; + return MON_HAS_MAX_MOVES; } u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) { s32 i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (!mon->moves[i]) { @@ -2226,7 +2242,7 @@ u16 GiveMoveToBattleMon(struct BattlePokemon *mon, u16 move) } } - return -1; + return MON_HAS_MAX_MOVES; } void SetMonMoveSlot(struct Pokemon *mon, u16 move, u8 slot) @@ -2257,21 +2273,21 @@ static void GiveBoxMonInitialMoveset(struct BoxPokemon *boxMon) u16 moveLevel; u16 move; - moveLevel = (gLevelUpLearnsets[species][i] & 0xFE00); + moveLevel = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV); if (moveLevel > (level << 9)) break; - move = (gLevelUpLearnsets[species][i] & 0x1FF); + move = (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); - if (GiveMoveToBoxMon(boxMon, move) == 0xFFFF) + if (GiveMoveToBoxMon(boxMon, move) == MON_HAS_MAX_MOVES) DeleteFirstMoveAndGiveMoveToBoxMon(boxMon, move); } } u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) { - u32 retVal = 0; + u32 retVal = MOVE_NONE; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); @@ -2283,17 +2299,17 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) { sLearningMoveTableID = 0; - while ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) != (level << 9)) + while ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) != (level << 9)) { sLearningMoveTableID++; if (gLevelUpLearnsets[species][sLearningMoveTableID] == LEVEL_UP_END) - return 0; + return MOVE_NONE; } } - if ((gLevelUpLearnsets[species][sLearningMoveTableID] & 0xFE00) == (level << 9)) + if ((gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_LV) == (level << 9)) { - gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & 0x1FF); + gMoveToLearn = (gLevelUpLearnsets[species][sLearningMoveTableID] & LEVEL_UP_MOVE_ID); sLearningMoveTableID++; retVal = GiveMoveToMon(mon, gMoveToLearn); } @@ -2304,11 +2320,11 @@ u16 MonTryLearningNewMove(struct Pokemon *mon, bool8 firstMove) void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) { s32 i; - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; u8 ppBonuses; - for (i = 0; i < 3; i++) + for (i = 0; i < MAX_MON_MOVES - 1; i++) { moves[i] = GetMonData(mon, MON_DATA_MOVE2 + i, NULL); pp[i] = GetMonData(mon, MON_DATA_PP2 + i, NULL); @@ -2316,10 +2332,10 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetMonData(mon, MON_DATA_MOVE1 + i, &moves[i]); SetMonData(mon, MON_DATA_PP1 + i, &pp[i]); @@ -2331,11 +2347,11 @@ void DeleteFirstMoveAndGiveMoveToMon(struct Pokemon *mon, u16 move) static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 move) { s32 i; - u16 moves[4]; - u8 pp[4]; + u16 moves[MAX_MON_MOVES]; + u8 pp[MAX_MON_MOVES]; u8 ppBonuses; - for (i = 0; i < 3; i++) + for (i = 0; i < MAX_MON_MOVES - 1; i++) { moves[i] = GetBoxMonData(boxMon, MON_DATA_MOVE2 + i, NULL); pp[i] = GetBoxMonData(boxMon, MON_DATA_PP2 + i, NULL); @@ -2343,10 +2359,10 @@ static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 mo ppBonuses = GetBoxMonData(boxMon, MON_DATA_PP_BONUSES, NULL); ppBonuses >>= 2; - moves[3] = move; - pp[3] = gBattleMoves[move].pp; + moves[MAX_MON_MOVES - 1] = move; + pp[MAX_MON_MOVES - 1] = gBattleMoves[move].pp; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { SetBoxMonData(boxMon, MON_DATA_MOVE1 + i, &moves[i]); SetBoxMonData(boxMon, MON_DATA_PP1 + i, &pp[i]); @@ -2361,6 +2377,11 @@ static void DeleteFirstMoveAndGiveMoveToBoxMon(struct BoxPokemon *boxMon, u16 mo (var) /= (gStatStageRatios)[(mon)->statStages[(statIndex)]][1]; \ } +// Own function in pokeemerald +#define ShouldGetStatBadgeBoost(flag, battler)\ + (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER)) && FlagGet(flag) && GetBattlerSide(battler) == B_SIDE_PLAYER) + + s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *defender, u32 move, u16 sideStatus, u16 powerOverride, u8 typeOverride, u8 battlerIdAtk, u8 battlerIdDef) { u32 i; @@ -2382,13 +2403,14 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (!typeOverride) type = gBattleMoves[move].type; else - type = typeOverride & 0x3F; + type = typeOverride & DYNAMIC_TYPE_MASK; attack = attacker->attack; defense = defender->defense; spAttack = attacker->spAttack; spDefense = defender->spDefense; + // Get attacker hold item info if (attacker->item == ITEM_ENIGMA_BERRY) { attackerHoldEffect = gEnigmaBerries[battlerIdAtk].holdEffect; @@ -2400,6 +2422,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de attackerHoldEffectParam = ItemId_GetHoldEffectParam(attacker->item); } + // Get defender hold item info if (defender->item == ITEM_ENIGMA_BERRY) { defenderHoldEffect = gEnigmaBerries[battlerIdDef].holdEffect; @@ -2414,33 +2437,17 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (attacker->ability == ABILITY_HUGE_POWER || attacker->ability == ABILITY_PURE_POWER) attack *= 2; - // In FRLG, the Battle Tower and opponent checks are stubbed here. - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE01_GET) - && GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER) - attack = (110 * attack) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE05_GET) - && GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER) - defense = (110 * defense) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE07_GET) - && GetBattlerSide(battlerIdAtk) == B_SIDE_PLAYER) - spAttack = (110 * spAttack) / 100; - } - if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | /*BATTLE_TYPE_BATTLE_TOWER |*/ BATTLE_TYPE_EREADER_TRAINER))) - { - if (FlagGet(FLAG_BADGE07_GET) - && GetBattlerSide(battlerIdDef) == B_SIDE_PLAYER) - spDefense = (110 * spDefense) / 100; - } + if (ShouldGetStatBadgeBoost(FLAG_BADGE01_GET, battlerIdAtk)) + attack = (110 * attack) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE05_GET, battlerIdDef)) + defense = (110 * defense) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdAtk)) + spAttack = (110 * spAttack) / 100; + if (ShouldGetStatBadgeBoost(FLAG_BADGE07_GET, battlerIdDef)) + spDefense = (110 * spDefense) / 100; - for (i = 0; i < NELEMS(sHoldEffectToType); i++) + // Apply type-bonus hold item + for (i = 0; i < ARRAY_COUNT(sHoldEffectToType); i++) { if (attackerHoldEffect == sHoldEffectToType[i][0] && type == sHoldEffectToType[i][1]) @@ -2453,6 +2460,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } + // Apply boosts from hold items if (attackerHoldEffect == HOLD_EFFECT_CHOICE_BAND) attack = (150 * attack) / 100; if (attackerHoldEffect == HOLD_EFFECT_SOUL_DEW && !(gBattleTypeFlags & (BATTLE_TYPE_BATTLE_TOWER)) && (attacker->species == SPECIES_LATIAS || attacker->species == SPECIES_LATIOS)) @@ -2493,6 +2501,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de gBattleMovePower = (150 * gBattleMovePower) / 100; if (type == TYPE_BUG && attacker->ability == ABILITY_SWARM && attacker->hp <= (attacker->maxHP / 3)) gBattleMovePower = (150 * gBattleMovePower) / 100; + + // Self-destruct / Explosion cut defense in half if (gBattleMoves[gCurrentMove].effect == EFFECT_EXPLOSION) defense /= 2; @@ -2500,7 +2510,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { - if (attacker->statStages[STAT_ATK] > 6) + // Critical hit, if attacker has lost attack stat stages then ignore stat drop + if (attacker->statStages[STAT_ATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, attack, STAT_ATK) else damage = attack; @@ -2513,7 +2524,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { - if (defender->statStages[STAT_DEF] < 6) + // Critical hit, if defender has gained defense stat stages then ignore stat increase + if (defender->statStages[STAT_DEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, defense, STAT_DEF) else damageHelper = defense; @@ -2524,9 +2536,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = damage / damageHelper; damage /= 50; + // Burn cuts attack in half if ((attacker->status1 & STATUS1_BURN) && attacker->ability != ABILITY_GUTS) damage /= 2; + // Apply Reflect if ((sideStatus & SIDE_STATUS_REFLECT) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -2535,10 +2549,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } - if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) + // Moves hitting both targets do half damage in double battles + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // moves always do at least 1 damage. + // Moves always do at least 1 damage. if (damage == 0) damage = 1; } @@ -2550,7 +2565,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de { if (gCritMultiplier == 2) { - if (attacker->statStages[STAT_SPATK] > 6) + // Critical hit, if attacker has lost sp. attack stat stages then ignore stat drop + if (attacker->statStages[STAT_SPATK] > DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damage, attacker, spAttack, STAT_SPATK) else damage = spAttack; @@ -2563,7 +2579,8 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de if (gCritMultiplier == 2) { - if (defender->statStages[STAT_SPDEF] < 6) + // Critical hit, if defender has gained sp. defense stat stages then ignore stat increase + if (defender->statStages[STAT_SPDEF] < DEFAULT_STAT_STAGE) APPLY_STAT_MOD(damageHelper, defender, spDefense, STAT_SPDEF) else damageHelper = spDefense; @@ -2574,6 +2591,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage = (damage / damageHelper); damage /= 50; + // Apply Lightscreen if ((sideStatus & SIDE_STATUS_LIGHTSCREEN) && gCritMultiplier == 1) { if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) @@ -2582,12 +2600,14 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de damage /= 2; } - if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == 8 && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) + // Moves hitting both targets do half damage in double battles + if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) && gBattleMoves[move].target == MOVE_TARGET_BOTH && CountAliveMonsInBattle(BATTLE_ALIVE_DEF_SIDE) == 2) damage /= 2; - // are effects of weather negated with cloud nine or air lock + // Are effects of weather negated with cloud nine or air lock if (WEATHER_HAS_EFFECT2) { + // Rain weakens Fire, boosts Water if (gBattleWeather & B_WEATHER_RAIN_TEMPORARY) { switch (type) @@ -2601,11 +2621,11 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // any weather except sun weakens solar beam + // Any weather except sun weakens solar beam if ((gBattleWeather & (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_HAIL_TEMPORARY)) && gCurrentMove == MOVE_SOLAR_BEAM) damage /= 2; - // sunny + // Sun boosts Fire, weakens Water if (gBattleWeather & B_WEATHER_SUN) { switch (type) @@ -2620,7 +2640,7 @@ s32 CalculateBaseDamage(struct BattlePokemon *attacker, struct BattlePokemon *de } } - // flash fire triggered + // Flash fire triggered if ((gBattleResources->flags->flags[battlerIdAtk] & RESOURCE_FLAG_FLASH_FIRE) && type == TYPE_FIRE) damage = (15 * damage) / 10; } @@ -2636,21 +2656,21 @@ u8 CountAliveMonsInBattle(u8 caseId) switch (caseId) { case BATTLE_ALIVE_EXCEPT_ACTIVE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (i != gActiveBattler && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; } break; case BATTLE_ALIVE_ATK_SIDE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (GetBattlerSide(i) == GetBattlerSide(gBattlerAttacker) && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; } break; case BATTLE_ALIVE_DEF_SIDE: - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) { if (GetBattlerSide(i) == GetBattlerSide(gBattlerTarget) && !(gAbsentBattlerFlags & gBitTable[i])) retVal++; @@ -2696,15 +2716,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon) u16 species = GetBoxMonData(boxMon, MON_DATA_SPECIES, NULL); u32 personality = GetBoxMonData(boxMon, MON_DATA_PERSONALITY, NULL); - switch (gBaseStats[species].genderRatio) + switch (gSpeciesInfo[species].genderRatio) { case MON_MALE: case MON_FEMALE: case MON_GENDERLESS: - return gBaseStats[species].genderRatio; + return gSpeciesInfo[species].genderRatio; } - if (gBaseStats[species].genderRatio > (personality & 0xFF)) + if (gSpeciesInfo[species].genderRatio > (personality & 0xFF)) return MON_FEMALE; else return MON_MALE; @@ -2712,15 +2732,15 @@ u8 GetBoxMonGender(struct BoxPokemon *boxMon) u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) { - switch (gBaseStats[species].genderRatio) + switch (gSpeciesInfo[species].genderRatio) { case MON_MALE: case MON_FEMALE: case MON_GENDERLESS: - return gBaseStats[species].genderRatio; + return gSpeciesInfo[species].genderRatio; } - if (gBaseStats[species].genderRatio > (personality & 0xFF)) + if (gSpeciesInfo[species].genderRatio > (personality & 0xFF)) return MON_FEMALE; else return MON_MALE; @@ -2730,23 +2750,23 @@ void SetMultiuseSpriteTemplateToPokemon(u16 speciesTag, u8 battlerPosition) { if (gMonSpritesGfxPtr != NULL) { - if (battlerPosition >= 4) + if (battlerPosition >= MAX_BATTLERS_COUNT) battlerPosition = 0; gMultiuseSpriteTemplate = gMonSpritesGfxPtr->templates[battlerPosition]; } else { - if (sOakSpeechNidoranResources) + if (sMonSpritesGfxManager) { - if (battlerPosition >= (s8)sOakSpeechNidoranResources->battlePosition) // why a cast?!? changing the unk0_2 type to s8 causes extra shifts, but a cast is the correct fix. why, compiler? + if (battlerPosition >= (s8)sMonSpritesGfxManager->battlePosition) // why a cast?!? changing the unk0_2 type to s8 causes extra shifts, but a cast is the correct fix. why, compiler? battlerPosition = 0; - gMultiuseSpriteTemplate = sOakSpeechNidoranResources->templates[battlerPosition]; + gMultiuseSpriteTemplate = sMonSpritesGfxManager->templates[battlerPosition]; } else { - if (battlerPosition >= 4) + if (battlerPosition >= MAX_BATTLERS_COUNT) battlerPosition = 0; gMultiuseSpriteTemplate = gSpriteTemplates_Battlers[battlerPosition]; @@ -2777,7 +2797,7 @@ void SetMultiuseSpriteTemplateToTrainerBack(u16 trainerSpriteId, u8 battlerPosit static void EncryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->personality; boxMon->secure.raw[i] ^= boxMon->otId; @@ -2787,7 +2807,7 @@ static void EncryptBoxMon(struct BoxPokemon *boxMon) static void DecryptBoxMon(struct BoxPokemon *boxMon) { u32 i; - for (i = 0; i < 12; i++) + for (i = 0; i < ARRAY_COUNT(boxMon->secure.raw); i++) { boxMon->secure.raw[i] ^= boxMon->otId; boxMon->secure.raw[i] ^= boxMon->personality; @@ -2963,9 +2983,9 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; } } @@ -3032,8 +3052,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) { retVal = 0; - // FRLG changed this to 7 which used to be PLAYER_NAME_LENGTH + 1 - while (retVal < 7) + while (retVal < PLAYER_NAME_LENGTH) { data[retVal] = boxMon->otName[retVal]; retVal++; @@ -3210,16 +3229,21 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data) case MON_DATA_UNUSED_RIBBONS: retVal = substruct3->unusedRibbons; break; - case MON_DATA_EVENT_LEGAL: - retVal = substruct3->eventLegal; + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + retVal = substruct3->modernFatefulEncounter; break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: retVal = substruct0->species; if (substruct0->species && (substruct3->isEgg || boxMon->isBadEgg)) retVal = SPECIES_EGG; break; case MON_DATA_IVS: - retVal = substruct3->hpIV | (substruct3->attackIV << 5) | (substruct3->defenseIV << 10) | (substruct3->speedIV << 15) | (substruct3->spAttackIV << 20) | (substruct3->spDefenseIV << 25); + retVal = substruct3->hpIV + | (substruct3->attackIV << 5) + | (substruct3->defenseIV << 10) + | (substruct3->speedIV << 15) + | (substruct3->spAttackIV << 20) + | (substruct3->spDefenseIV << 25); break; case MON_DATA_KNOWN_MOVES: if (substruct0->species && !substruct3->isEgg) @@ -3340,7 +3364,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg) case MON_DATA_MAIL: SET8(mon->mail); break; - case MON_DATA_SPECIES2: + case MON_DATA_SPECIES_OR_EGG: break; // why did FRLG go out of its way to specify all of these for default? case MON_DATA_IVS: @@ -3357,7 +3381,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg) case MON_DATA_EARTH_RIBBON: case MON_DATA_WORLD_RIBBON: case MON_DATA_UNUSED_RIBBONS: - case MON_DATA_EVENT_LEGAL: + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: case MON_DATA_KNOWN_MOVES: case MON_DATA_RIBBON_COUNT: case MON_DATA_RIBBONS: @@ -3387,9 +3411,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) if (CalculateBoxMonChecksum(boxMon) != boxMon->checksum) { - boxMon->isBadEgg = 1; - boxMon->isEgg = 1; - substruct3->isEgg = 1; + boxMon->isBadEgg = TRUE; + boxMon->isEgg = TRUE; + substruct3->isEgg = TRUE; EncryptBoxMon(boxMon); return; } @@ -3425,7 +3449,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_OT_NAME: { s32 i; - for (i = 0; i < 7; i++) + for (i = 0; i < PLAYER_NAME_LENGTH; i++) boxMon->otName[i] = data[i]; break; } @@ -3442,9 +3466,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) { SET16(substruct0->species); if (substruct0->species) - boxMon->hasSpecies = 1; + boxMon->hasSpecies = TRUE; else - boxMon->hasSpecies = 0; + boxMon->hasSpecies = FALSE; break; } case MON_DATA_HELD_ITEM: @@ -3552,9 +3576,9 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_IS_EGG: SET8(substruct3->isEgg); if (substruct3->isEgg) - boxMon->isEgg = 1; + boxMon->isEgg = TRUE; else - boxMon->isEgg = 0; + boxMon->isEgg = FALSE; break; case MON_DATA_ABILITY_NUM: SET8(substruct3->abilityNum); @@ -3613,8 +3637,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) case MON_DATA_UNUSED_RIBBONS: SET8(substruct3->unusedRibbons); break; - case MON_DATA_EVENT_LEGAL: - SET8(substruct3->eventLegal); + case MON_DATA_MODERN_FATEFUL_ENCOUNTER: + SET8(substruct3->modernFatefulEncounter); break; case MON_DATA_IVS: { @@ -3623,12 +3647,12 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg) #else u32 ivs = *data; // Bug: Only the HP IV and the lower 3 bits of the Attack IV are read. The rest become 0. #endif - substruct3->hpIV = ivs & 0x1F; - substruct3->attackIV = (ivs >> 5) & 0x1F; - substruct3->defenseIV = (ivs >> 10) & 0x1F; - substruct3->speedIV = (ivs >> 15) & 0x1F; - substruct3->spAttackIV = (ivs >> 20) & 0x1F; - substruct3->spDefenseIV = (ivs >> 25) & 0x1F; + substruct3->hpIV = ivs & MAX_IV_MASK; + substruct3->attackIV = (ivs >> 5) & MAX_IV_MASK; + substruct3->defenseIV = (ivs >> 10) & MAX_IV_MASK; + substruct3->speedIV = (ivs >> 15) & MAX_IV_MASK; + substruct3->spAttackIV = (ivs >> 20) & MAX_IV_MASK; + substruct3->spDefenseIV = (ivs >> 25) & MAX_IV_MASK; break; } default: @@ -3744,8 +3768,8 @@ u8 GetMonsStateToDoubles(void) // FRLG changed the order of these checks, but there's no point to doing that // because of the requirement of all 3 of these checks. if (GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0 - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG) aliveCount++; } @@ -3755,9 +3779,9 @@ u8 GetMonsStateToDoubles(void) u8 GetAbilityBySpecies(u16 species, bool8 abilityNum) { if (abilityNum) - gLastUsedAbility = gBaseStats[species].abilities[1]; + gLastUsedAbility = gSpeciesInfo[species].abilities[1]; else - gLastUsedAbility = gBaseStats[species].abilities[0]; + gLastUsedAbility = gSpeciesInfo[species].abilities[0]; return gLastUsedAbility; } @@ -3784,24 +3808,24 @@ static void CreateSecretBaseEnemyParty(struct SecretBaseRecord *secretBaseRecord gBattleResources->secretBase->party.species[i], gBattleResources->secretBase->party.levels[i], 15, - 1, + TRUE, gBattleResources->secretBase->party.personality[i], - 2, + OT_ID_RANDOM_NO_SHINY, 0); SetMonData(&gEnemyParty[i], MON_DATA_HELD_ITEM, &gBattleResources->secretBase->party.heldItems[i]); - for (j = 0; j < 6; j++) + for (j = 0; j < NUM_STATS; j++) SetMonData(&gEnemyParty[i], MON_DATA_HP_EV + j, &gBattleResources->secretBase->party.EVs[i]); - for (j = 0; j < 4; j++) + for (j = 0; j < MAX_MON_MOVES; j++) { - SetMonData(&gEnemyParty[i], MON_DATA_MOVE1 + j, &gBattleResources->secretBase->party.moves[i * 4 + j]); - SetMonData(&gEnemyParty[i], MON_DATA_PP1 + j, &gBattleMoves[gBattleResources->secretBase->party.moves[i * 4 + j]].pp); + SetMonData(&gEnemyParty[i], MON_DATA_MOVE1 + j, &gBattleResources->secretBase->party.moves[i * MAX_MON_MOVES + j]); + SetMonData(&gEnemyParty[i], MON_DATA_PP1 + j, &gBattleMoves[gBattleResources->secretBase->party.moves[i * MAX_MON_MOVES + j]].pp); } } } - gBattleTypeFlags = 8; + gBattleTypeFlags = BATTLE_TYPE_TRAINER; gTrainerBattleOpponent_A = TRAINER_SECRET_BASE; } @@ -3868,13 +3892,13 @@ u8 CalculatePPWithBonus(u16 move, u8 ppBonuses, u8 moveIndex) void RemoveMonPPBonus(struct Pokemon *mon, u8 moveIndex) { u8 ppBonuses = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - ppBonuses &= gPPUpSetMask[moveIndex]; + ppBonuses &= gPPUpClearMask[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &ppBonuses); } void RemoveBattleMonPPBonus(struct BattlePokemon *mon, u8 moveIndex) { - mon->ppBonuses &= gPPUpSetMask[moveIndex]; + mon->ppBonuses &= gPPUpClearMask[moveIndex]; } static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) @@ -3886,7 +3910,7 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES, NULL); gBattleMons[battlerId].item = GetMonData(&gPlayerParty[partyIndex], MON_DATA_HELD_ITEM, NULL); - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { gBattleMons[battlerId].moves[i] = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MOVE1 + i, NULL); gBattleMons[battlerId].pp[i] = GetMonData(&gPlayerParty[partyIndex], MON_DATA_PP1 + i, NULL); @@ -3914,8 +3938,8 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) gBattleMons[battlerId].isEgg = GetMonData(&gPlayerParty[partyIndex], MON_DATA_IS_EGG, NULL); gBattleMons[battlerId].abilityNum = GetMonData(&gPlayerParty[partyIndex], MON_DATA_ABILITY_NUM, NULL); gBattleMons[battlerId].otId = GetMonData(&gPlayerParty[partyIndex], MON_DATA_OT_ID, NULL); - gBattleMons[battlerId].type1 = gBaseStats[gBattleMons[battlerId].species].type1; - gBattleMons[battlerId].type2 = gBaseStats[gBattleMons[battlerId].species].type2; + gBattleMons[battlerId].type1 = gSpeciesInfo[gBattleMons[battlerId].species].types[0]; + gBattleMons[battlerId].type2 = gSpeciesInfo[gBattleMons[battlerId].species].types[1]; gBattleMons[battlerId].ability = GetAbilityBySpecies(gBattleMons[battlerId].species, gBattleMons[battlerId].abilityNum); GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, nickname); StringCopy_Nickname(gBattleMons[battlerId].nickname, nickname); @@ -3924,7 +3948,7 @@ static void CopyPlayerPartyMonToBattleData(u8 battlerId, u8 partyIndex) hpSwitchout = &gBattleStruct->hpOnSwitchout[GetBattlerSide(battlerId)]; *hpSwitchout = gBattleMons[battlerId].hp; - for (i = 0; i < 8; i++) + for (i = 0; i < NUM_BATTLE_STATS; i++) gBattleMons[battlerId].statStages[i] = DEFAULT_STAT_STAGE; gBattleMons[battlerId].status2 = 0; @@ -3937,6 +3961,31 @@ bool8 ExecuteTableBasedItemEffect(struct Pokemon *mon, u16 item, u8 partyIndex, return PokemonUseItemEffects(mon, item, partyIndex, moveIndex, 0); } +#define UPDATE_FRIENDSHIP_FROM_ITEM() \ +{ \ + if (retVal == 0 && friendshipChange == 0) \ + { \ + friendshipChange = itemEffect[idx]; \ + friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); \ + if (friendshipChange > 0 && holdEffect == HOLD_EFFECT_FRIENDSHIP_UP) \ + friendship += 150 * friendshipChange / 100; \ + else \ + friendship += friendshipChange; \ + if (friendshipChange > 0) \ + { \ + if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == ITEM_LUXURY_BALL) \ + friendship++; \ + if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) \ + friendship++; \ + } \ + if (friendship < 0) \ + friendship = 0; \ + if (friendship > MAX_FRIENDSHIP) \ + friendship = MAX_FRIENDSHIP; \ + SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); \ + } \ +} + bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 moveIndex, bool8 usedByAI) { u32 data; @@ -3944,15 +3993,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov s32 cmdIndex; bool8 retVal = TRUE; const u8 *itemEffect; - u8 idx = 6; + u8 idx = ITEM_EFFECT_ARG_START; u32 i; - s8 friendshipDelta = 0; + s8 friendshipChange = 0; u8 holdEffect; - u8 battleMonId = 4; + u8 battleMonId = MAX_BATTLERS_COUNT; u16 heldItem; u8 val; u32 evDelta; + // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); if (heldItem == ITEM_ENIGMA_BERRY) { @@ -3966,6 +4016,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov holdEffect = ItemId_GetHoldEffect(heldItem); } + // Get battler id (if relevant) gPotentialItemEffectBattler = gBattlerInMenuId; if (gMain.inBattle) { @@ -3984,14 +4035,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov else { gActiveBattler = 0; - battleMonId = 4; + battleMonId = MAX_BATTLERS_COUNT; } + // Skip using the item if it won't do anything if (!IS_POKEMON_ITEM(item)) return TRUE; if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; + // Get item effect if (item == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4004,90 +4057,112 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov itemEffect = gItemEffectTable[item - ITEM_POTION]; } - for (cmdIndex = 0; cmdIndex < 6; cmdIndex++) + // Do item effect + for (cmdIndex = 0; cmdIndex < ITEM_EFFECT_ARG_START; cmdIndex++) { switch (cmdIndex) { - // status healing effects + + // Handle ITEM0 effects (infatuation, Dire Hit, X Attack). ITEM0_SACRED_ASH is handled in party_menu.c case 0: + // Cure infatuation if ((itemEffect[cmdIndex] & ITEM0_INFATUATION) - && gMain.inBattle && battleMonId != 4 && (gBattleMons[battleMonId].status2 & STATUS2_INFATUATION)) + && gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && (gBattleMons[battleMonId].status2 & STATUS2_INFATUATION)) { gBattleMons[battleMonId].status2 &= ~STATUS2_INFATUATION; retVal = FALSE; } - if ((itemEffect[cmdIndex] & ITEM0_HIGH_CRIT) + + // Dire Hit + if ((itemEffect[cmdIndex] & ITEM0_DIRE_HIT) && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) { gBattleMons[gActiveBattler].status2 |= STATUS2_FOCUS_ENERGY; retVal = FALSE; } + + // X Attack if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK) - && gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & ITEM0_X_ATTACK; - if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12) - gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_ATK] = MAX_STAT_STAGE; retVal = FALSE; } break; - // in-battle stat boosting effects? + + // Handle ITEM1 effects (in-battle stat boosting effects) case 1: + // X Defend if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND) - && gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & ITEM1_X_DEFEND) >> 4; - if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12) - gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_DEF] = MAX_STAT_STAGE; retVal = FALSE; } + + // X Speed if ((itemEffect[cmdIndex] & ITEM1_X_SPEED) - && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & ITEM1_X_SPEED; - if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12) - gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_SPEED] = MAX_STAT_STAGE; retVal = FALSE; } break; - // more stat boosting effects? + + // Handle ITEM2 effects (more stat boosting effects) case 2: + // X Accuracy if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY) - && gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & ITEM2_X_ACCURACY) >> 4; - if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12) - gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_ACC] = MAX_STAT_STAGE; retVal = FALSE; } + + // X Sp Attack if ((itemEffect[cmdIndex] & ITEM2_X_SPATK) - && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE) { gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & ITEM2_X_SPATK; - if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12) - gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12; + if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > MAX_STAT_STAGE) + gBattleMons[gActiveBattler].statStages[STAT_SPATK] = MAX_STAT_STAGE; retVal = FALSE; } break; + + // Handle ITEM3 effects (Guard Spec, Rare Candy, cure status) case 3: - if ((itemEffect[cmdIndex] & ITEM3_MIST) + // Guard Spec + if ((itemEffect[cmdIndex] & ITEM3_GUARD_SPEC) && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) { gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer = 5; retVal = FALSE; } - if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) // raise level - && GetMonData(mon, MON_DATA_LEVEL, NULL) != 100) + + // Rare Candy + if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) + && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) { - data = gExperienceTables[gBaseStats[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; + data = gExperienceTables[gSpeciesInfo[GetMonData(mon, MON_DATA_SPECIES, NULL)].growthRate][GetMonData(mon, MON_DATA_LEVEL, NULL) + 1]; SetMonData(mon, MON_DATA_EXP, &data); CalculateMonStats(mon); retVal = FALSE; } + + // Cure status if ((itemEffect[cmdIndex] & ITEM3_SLEEP) && HealStatusConditions(mon, partyIndex, STATUS1_SLEEP, battleMonId) == 0) { - if (battleMonId != 4) + if (battleMonId != MAX_BATTLERS_COUNT) gBattleMons[battleMonId].status2 &= ~STATUS2_NIGHTMARE; retVal = FALSE; } @@ -4100,15 +4175,18 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov if ((itemEffect[cmdIndex] & ITEM3_PARALYSIS) && HealStatusConditions(mon, partyIndex, STATUS1_PARALYSIS, battleMonId) == 0) retVal = FALSE; if ((itemEffect[cmdIndex] & ITEM3_CONFUSION) // heal confusion - && gMain.inBattle && battleMonId != 4 && (gBattleMons[battleMonId].status2 & STATUS2_CONFUSION)) + && gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && (gBattleMons[battleMonId].status2 & STATUS2_CONFUSION)) { gBattleMons[battleMonId].status2 &= ~STATUS2_CONFUSION; retVal = FALSE; } break; - // EV, HP, and PP raising effects + + // Handle ITEM4 effects (Change HP/Atk EVs, HP heal, PP heal, PP up, Revive, and evolution stones) case 4: val = itemEffect[cmdIndex]; + + // PP Up if (val & ITEM4_PP_UP) { val &= ~ITEM4_PP_UP; @@ -4116,7 +4194,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov i = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); if (data < 3 && i > 4) { - data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddMask[moveIndex]; + data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL) + gPPUpAddValues[moveIndex]; SetMonData(mon, MON_DATA_PP_BONUSES, &data); data = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), data, moveIndex) - i; @@ -4126,6 +4204,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } } i = 0; + + // Loop through and try each of the remaining ITEM4 effects while (val != 0) { if (val & 1) @@ -4135,20 +4215,25 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov switch (i) { - case 0: // EV_HP - case 1: // EV_ATK + case 0: // ITEM4_EV_HP + case 1: // ITEM4_EV_ATK evCount = GetMonEVCount(mon); - if (evCount >= 510) + + // Has EV increase limit already been reached? + if (evCount >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { - if (data + itemEffect[idx] > 100) - evDelta = 100 - (data + itemEffect[idx]) + itemEffect[idx]; + // Limit the increase + if (data + itemEffect[idx] > EV_ITEM_RAISE_LIMIT) + evDelta = EV_ITEM_RAISE_LIMIT - (data + itemEffect[idx]) + itemEffect[idx]; else evDelta = itemEffect[idx]; - if (evCount + evDelta > 510) - evDelta += 510 - (evCount + evDelta); + if (evCount + evDelta > MAX_TOTAL_EVS) + evDelta += MAX_TOTAL_EVS - (evCount + evDelta); + + // Update EVs and stats data += evDelta; SetMonData(mon, sGetMonDataEVConstants[i], &data); CalculateMonStats(mon); @@ -4156,8 +4241,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } break; - case 2: // HEAL_HP - // revive? + case 2: // ITEM4_HEAL_HP + // If Revive, update number of times revive has been used if (val & (ITEM4_REVIVE >> 2)) { if (GetMonData(mon, MON_DATA_HP, NULL) != 0) @@ -4167,7 +4252,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } if (gMain.inBattle) { - if (battleMonId != 4) + if (battleMonId != MAX_BATTLERS_COUNT) { gAbsentBattlerFlags &= ~gBitTable[battleMonId]; CopyPlayerPartyMonToBattleData(battleMonId, GetPartyIdFromBattlePartyId(gBattlerPartyIndexes[battleMonId])); @@ -4190,40 +4275,47 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; } } + + // Get amount of HP to restore data = itemEffect[idx++]; switch (data) { - case 0xFF: + case ITEM6_HEAL_HP_FULL: data = GetMonData(mon, MON_DATA_MAX_HP, NULL) - GetMonData(mon, MON_DATA_HP, NULL); break; - case 0xFE: + case ITEM6_HEAL_HP_HALF: data = GetMonData(mon, MON_DATA_MAX_HP, NULL) / 2; if (data == 0) data = 1; break; - case 0xFD: - data = gBattleScripting.field_23; + case ITEM6_HEAL_HP_LVL_UP: + data = gBattleScripting.levelUpHP; break; } + + // Only restore HP if not at max health if (GetMonData(mon, MON_DATA_MAX_HP, NULL) != GetMonData(mon, MON_DATA_HP, NULL)) { if (!usedByAI) { + // Restore HP data = GetMonData(mon, MON_DATA_HP, NULL) + data; if (data > GetMonData(mon, MON_DATA_MAX_HP, NULL)) data = GetMonData(mon, MON_DATA_MAX_HP, NULL); SetMonData(mon, MON_DATA_HP, &data); - if (gMain.inBattle && battleMonId != 4) + + // Update battler (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT) { gBattleMons[battleMonId].hp = data; if (!(val & (ITEM4_REVIVE >> 2)) && GetBattlerSide(gActiveBattler) == B_SIDE_PLAYER) { if (gBattleResults.numHealingItemsUsed < 255) gBattleResults.numHealingItemsUsed++; - // I have to re-use this variable to match. + r5 = gActiveBattler; gActiveBattler = battleMonId; - BtlController_EmitGetMonData(BUFFER_A, 0, 0); + BtlController_EmitGetMonData(BUFFER_A, REQUEST_ALL_BATTLE, 0); MarkBattlerForControllerExec(gActiveBattler); gActiveBattler = r5; } @@ -4237,10 +4329,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } val &= ~(ITEM4_REVIVE >> 2); break; - case 3: // HEAL_PP_ALL + case 3: // ITEM4_HEAL_PP if (!(val & (ITEM4_HEAL_PP_ONE >> 3))) { - for (r5 = 0; r5 < 4; r5++) + // Heal PP for all moves + for (r5 = 0; r5 < MAX_MON_MOVES; r5++) { u16 move_id; @@ -4256,10 +4349,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov data = CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), r5); } SetMonData(mon, MON_DATA_PP1 + r5, &data); - if (gMain.inBattle - && battleMonId != 4 && !(gBattleMons[battleMonId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battleMonId].mimickedMoves & gBitTable[r5])) + + // Heal battler PP too (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battleMonId, r5)) gBattleMons[battleMonId].pp[r5] = data; + retVal = FALSE; } } @@ -4267,8 +4361,8 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov } else { + // Heal PP for one move u16 move_id; - data = GetMonData(mon, MON_DATA_PP1 + moveIndex, NULL); move_id = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); if (data != CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex)) @@ -4281,21 +4375,26 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov data = CalculatePPWithBonus(move_id, GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); } SetMonData(mon, MON_DATA_PP1 + moveIndex, &data); - if (gMain.inBattle - && battleMonId != 4 && !(gBattleMons[battleMonId].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[battleMonId].mimickedMoves & gBitTable[moveIndex])) + + // Heal battler PP too (if applicable) + if (gMain.inBattle && battleMonId != MAX_BATTLERS_COUNT && MOVE_IS_PERMANENT(battleMonId, moveIndex)) gBattleMons[battleMonId].pp[moveIndex] = data; + retVal = FALSE; } } break; - case 7: // EVO_STONE + + // cases 4-6 are ITEM4_HEAL_PP_ONE, ITEM4_PP_UP, and ITEM4_REVIVE, which + // are already handled above by other cases or before the loop + + case 7: // ITEM4_EVO_STONE { u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item); if (targetSpecies != SPECIES_NONE) { - BeginEvolutionScene(mon, targetSpecies, 0, partyIndex); + BeginEvolutionScene(mon, targetSpecies, FALSE, partyIndex); return FALSE; } } @@ -4306,9 +4405,13 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov val >>= 1; } break; + + // Handle ITEM5 effects (Change Def/SpDef/SpAtk/Speed EVs, PP Max, and friendship changes) case 5: val = itemEffect[cmdIndex]; i = 0; + + // Loop through and try each of the ITEM5 effects while (val != 0) { if (val & 1) @@ -4317,22 +4420,27 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov switch (i) { - case 0: // EV_DEF - case 1: // EV_SPEED - case 2: // EV_SPDEF - case 3: // EV_SPATK + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK evCount = GetMonEVCount(mon); - if (evCount >= 510) + + // Has EV increase limit already been reached? + if (evCount >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i + 2], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { - if (data + itemEffect[idx] > 100) - evDelta = 100 - (data + itemEffect[idx]) + itemEffect[idx]; + // Limit the increase + if (data + itemEffect[idx] > EV_ITEM_RAISE_LIMIT) + evDelta = EV_ITEM_RAISE_LIMIT - (data + itemEffect[idx]) + itemEffect[idx]; else evDelta = itemEffect[idx]; - if (evCount + evDelta > 510) - evDelta += 510 - (evCount + evDelta); + if (evCount + evDelta > MAX_TOTAL_EVS) + evDelta += MAX_TOTAL_EVS - (evCount + evDelta); + + // Update EVs and stats data += evDelta; SetMonData(mon, sGetMonDataEVConstants[i + 2], &data); CalculateMonStats(mon); @@ -4340,14 +4448,16 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov idx++; } break; - case 4: // PP_MAX + case 4: // ITEM5_PP_MAX data = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); + + // Check if 3 PP Ups have been applied already if (data < 3) { evDelta = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); data = GetMonData(mon, MON_DATA_PP_BONUSES, NULL); - data &= gPPUpSetMask[moveIndex]; - data += gPPUpAddMask[moveIndex] * 3; + data &= gPPUpClearMask[moveIndex]; + data += gPPUpAddValues[moveIndex] * 3; // Apply 3 PP Ups (max) SetMonData(mon, MON_DATA_PP_BONUSES, &data); data = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), data, moveIndex) - evDelta; @@ -4356,77 +4466,23 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov retVal = FALSE; } break; - case 5: // FRIENDSHIP_LOW - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 5: // ITEM5_FRIENDSHIP_LOW + // Changes to friendship are given differently depending on + // how much friendship the Pokémon already has. + // In general, Pokémon with lower friendship receive more, + // and Pokémon with higher friendship receive less. + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; - case 6: // FRIENDSHIP_MID - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200 - && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 6: // ITEM5_FRIENDSHIP_MID + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; - case 7: // FRIENDSHIP_HIGH - if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && retVal == 0 && friendshipDelta == 0) - { - friendshipDelta = itemEffect[idx]; - friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - if (friendshipDelta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) - friendship += 150 * friendshipDelta / 100; - else - friendship += friendshipDelta; - if (friendshipDelta > 0) - { - if (GetMonData(mon, MON_DATA_POKEBALL, NULL) == 11) - friendship++; - if (GetMonData(mon, MON_DATA_MET_LOCATION, NULL) == GetCurrentRegionMapSectionId()) - friendship++; - } - if (friendship < 0) - friendship = 0; - if (friendship > 255) - friendship = 255; - SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); - } + case 7: // ITEM5_FRIENDSHIP_HIGH + if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200) + UPDATE_FRIENDSHIP_FROM_ITEM(); idx++; break; } @@ -4448,7 +4504,7 @@ static bool8 HealStatusConditions(struct Pokemon *mon, u32 unused, u32 healMask, { status &= ~healMask; SetMonData(mon, MON_DATA_STATUS, &status); - if (gMain.inBattle && battleId != 4) + if (gMain.inBattle && battleId != MAX_BATTLERS_COUNT) gBattleMons[battleId].status1 &= ~healMask; return FALSE; } @@ -4465,17 +4521,17 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo s32 cmdIndex; bool8 retVal = TRUE; const u8 *itemEffect; - u8 idx = 6; + u8 idx = ITEM_EFFECT_ARG_START; u32 i; s32 sp18 = 0; u8 holdEffect; - u8 battlerId = 4; + u8 battlerId = MAX_BATTLERS_COUNT; u16 heldItem; u8 curEffect; u32 curMoveId; + // Get item hold effect heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); - // you have to write as such, because otherwise gMain.inBattle will lose its u8 cast if (heldItem == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4487,6 +4543,8 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo { holdEffect = ItemId_GetHoldEffect(heldItem); } + + // Get battler id (if relevant) gPotentialItemEffectBattler = gBattlerInMenuId; if (gMain.inBattle) { @@ -4505,12 +4563,16 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo else { gActiveBattler = 0; - battlerId = 4; + battlerId = MAX_BATTLERS_COUNT; } + + // Skip using the item if it won't do anything if (!IS_POKEMON_ITEM(item)) return TRUE; if (gItemEffectTable[item - ITEM_POTION] == NULL && item != ITEM_ENIGMA_BERRY) return TRUE; + + // Get item effect if (item == ITEM_ENIGMA_BERRY) { if (gMain.inBattle) @@ -4520,51 +4582,68 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } else { - itemEffect = gItemEffectTable[item - 13]; + itemEffect = gItemEffectTable[item - ITEM_POTION]; } - for (cmdIndex = 0; cmdIndex < 6; cmdIndex++) + + for (cmdIndex = 0; cmdIndex < ITEM_EFFECT_ARG_START; cmdIndex++) { switch (cmdIndex) { // status healing effects case 0: - if (itemEffect[cmdIndex] & ITEM0_INFATUATION - && gMain.inBattle - && battlerId != 4 - && gBattleMons[battlerId].status2 & STATUS2_INFATUATION) + // Cure infatuation + if (itemEffect[cmdIndex] & ITEM0_INFATUATION && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && gBattleMons[battlerId].status2 & STATUS2_INFATUATION) retVal = FALSE; - if (itemEffect[cmdIndex] & ITEM0_HIGH_CRIT - && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) + + // Dire Hit + if (itemEffect[cmdIndex] & ITEM0_DIRE_HIT && !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY)) retVal = FALSE; + + // X Attack if ((itemEffect[cmdIndex] & ITEM0_X_ATTACK) - && gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ATK] < MAX_STAT_STAGE) retVal = FALSE; break; - // in-battle stat boosting effects? + + // Handle ITEM1 effects (in-battle stat boosting effects) case 1: + // X Defend if ((itemEffect[cmdIndex] & ITEM1_X_DEFEND) - && gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_DEF] < MAX_STAT_STAGE) retVal = FALSE; + + // X Speed if ((itemEffect[cmdIndex] & ITEM1_X_SPEED) - && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPEED] < MAX_STAT_STAGE) retVal = FALSE; break; - // more stat boosting effects? + + // Handle ITEM2 effects (more stat boosting effects) case 2: + // X Accuracy if ((itemEffect[cmdIndex] & ITEM2_X_ACCURACY) - && gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_ACC] < MAX_STAT_STAGE) retVal = FALSE; + + // X Sp Attack if ((itemEffect[cmdIndex] & ITEM2_X_SPATK) - && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12) + && gBattleMons[gActiveBattler].statStages[STAT_SPATK] < MAX_STAT_STAGE) retVal = FALSE; break; + + // Handle ITEM3 effects (Guard Spec, Rare Candy, cure status case 3: - if ((itemEffect[cmdIndex] & ITEM3_MIST) + // Guard Spec + if ((itemEffect[cmdIndex] & ITEM3_GUARD_SPEC) && gSideTimers[GetBattlerSide(gActiveBattler)].mistTimer == 0) retVal = FALSE; - if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) // raise level - && GetMonData(mon, MON_DATA_LEVEL, NULL) != 100) + + // Rare Candy + if ((itemEffect[cmdIndex] & ITEM3_LEVEL_UP) + && GetMonData(mon, MON_DATA_LEVEL, NULL) != MAX_LEVEL) retVal = FALSE; + + // Cure status if ((itemEffect[cmdIndex] & ITEM3_SLEEP) && PartyMonHasStatus(mon, partyIndex, STATUS1_SLEEP, battlerId)) retVal = FALSE; @@ -4577,12 +4656,15 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo if ((itemEffect[cmdIndex] & ITEM3_PARALYSIS) && PartyMonHasStatus(mon, partyIndex, STATUS1_PARALYSIS, battlerId)) retVal = FALSE; if (itemEffect[cmdIndex] & ITEM3_CONFUSION // heal confusion - && gMain.inBattle && battlerId != 4 && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) + && gMain.inBattle && battlerId != MAX_BATTLERS_COUNT && (gBattleMons[battlerId].status2 & STATUS2_CONFUSION)) retVal = FALSE; break; - // EV, HP, and PP raising effects + + // Handle ITEM4 effects (Change HP/Atk EVs, HP heal, PP heal, PP up, Revive, and evolution stones) case 4: curEffect = itemEffect[cmdIndex]; + + // PP Up if (curEffect & ITEM4_PP_UP) { curEffect &= ~ITEM4_PP_UP; @@ -4592,25 +4674,28 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo retVal = FALSE; } i = 0; - while (curEffect) // _080428C0 + + // Loop through and try each of the remaining ITEM4 effects + while (curEffect) { if (curEffect & 1) { switch (i) { - case 0: // EV_HP - case 1: // EV_ATK - if (GetMonEVCount(mon) >= 510) + case 0: // ITEM4_EV_HP + case 1: // ITEM4_EV_ATK + + // Has EV increase limit already been reached? + if (GetMonEVCount(mon) >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { idx++; retVal = FALSE; } break; - case 2: // HEAL_HP - // revive? + case 2: // ITEM4_HEAL_HP if (curEffect & (ITEM4_REVIVE >> 2)) { if (GetMonData(mon, MON_DATA_HP, NULL) != 0) @@ -4643,7 +4728,7 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } idx++; } - else // _080429FA + else { data = GetMonData(mon, MON_DATA_PP1 + moveIndex, NULL); curMoveId = GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL); @@ -4654,7 +4739,11 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } } break; - case 7: + + // cases 4-6 are ITEM4_HEAL_PP_ONE, ITEM4_PP_UP, and ITEM4_REVIVE, which + // are already handled above by other cases or before the loop + + case 7: // ITEM4_EVO_STONE if (GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item) != SPECIES_NONE) return FALSE; break; @@ -4664,42 +4753,48 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo curEffect >>= 1; } break; + + // Handle ITEM5 effects (Change Def/SpDef/SpAtk/Speed EVs, PP Max, and friendship changes) case 5: curEffect = itemEffect[cmdIndex]; i = 0; + + // Loop through and try each of the ITEM5 effects while (curEffect) { if (curEffect & 1) { switch (i) { - case 0: // EV_DEF - case 1: // EV_SPEED - case 2: // EV_SPDEF - case 3: // EV_SPATK - if (GetMonEVCount(mon) >= 510) + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK + if (GetMonEVCount(mon) >= MAX_TOTAL_EVS) return TRUE; data = GetMonData(mon, sGetMonDataEVConstants[i + 2], NULL); - if (data < 100) + if (data < EV_ITEM_RAISE_LIMIT) { retVal = FALSE; idx++; } break; - case 4: // PP_MAX + case 4: // ITEM5_PP_MAX data = (GetMonData(mon, MON_DATA_PP_BONUSES, NULL) & gPPUpGetMask[moveIndex]) >> (moveIndex * 2); tmp = CalculatePPWithBonus(GetMonData(mon, MON_DATA_MOVE1 + moveIndex, NULL), GetMonData(mon, MON_DATA_PP_BONUSES, NULL), moveIndex); - if (data < 3 && tmp > 4) + + // Check if 3 PP Ups have been applied already, and that the move has a total PP of at least 5 (excludes Sketch) + if (data < 3 && tmp >= 5) retVal = FALSE; break; - case 5: // FRIENDSHIP_LOW + case 5: // ITEM5_FRIENDSHIP_LOW if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 100 && retVal == FALSE && sp18 == 0) sp18 = itemEffect[idx]; idx++; break; - case 6: // FRIENDSHIP_MID + case 6: // ITEM5_FRIENDSHIP_MID if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 100 && GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) < 200 && retVal == FALSE @@ -4707,7 +4802,7 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo sp18 = itemEffect[idx]; idx++; break; - case 7: // FRIENDSHIP_HIGH + case 7: // ITEM5_FRIENDSHIP_HIGH if (GetMonData(mon, MON_DATA_FRIENDSHIP, NULL) >= 200 && retVal == FALSE && sp18 == 0) @@ -4742,9 +4837,9 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) u8 j; u8 val; - offset = 6; + offset = ITEM_EFFECT_ARG_START; - temp = gItemEffectTable[itemId - 13]; + temp = gItemEffectTable[itemId - ITEM_POTION]; if (!temp && itemId != ITEM_ENIGMA_BERRY) return 0; @@ -4756,7 +4851,7 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) itemEffect = temp; - for (i = 0; i < 6; i++) + for (i = 0; i < ITEM_EFFECT_ARG_START; i++) { switch (i) { @@ -4769,8 +4864,8 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) break; case 4: val = itemEffect[4]; - if (val & 0x20) - val &= 0xDF; + if (val & ITEM4_PP_UP) + val &= ~ITEM4_PP_UP; j = 0; while (val) { @@ -4778,25 +4873,26 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) { switch (j) { - case 2: - if (val & 0x10) - val &= 0xEF; - case 0: + case 2: // ITEM4_HEAL_HP + if (val & (ITEM4_REVIVE >> 2)) + val &= ~(ITEM4_REVIVE >> 2); + // fallthrough + case 0: // ITEM4_EV_HP if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 1: + case 1: // ITEM4_EV_ATK if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 3: + case 3: // ITEM4_HEAL_PP if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 7: + case 7: // ITEM4_EVO_STONE if (i == effectByte) return 0; break; @@ -4817,18 +4913,18 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) { switch (j) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: + case 0: // ITEM5_EV_DEF + case 1: // ITEM5_EV_SPEED + case 2: // ITEM5_EV_SPDEF + case 3: // ITEM5_EV_SPATK + case 4: // ITEM5_PP_MAX + case 5: // ITEM5_FRIENDSHIP_LOW + case 6: // ITEM5_FRIENDSHIP_MID if (i == effectByte && (val & effectBit)) return offset; offset++; break; - case 7: + case 7: // ITEM5_FRIENDSHIP_HIGH if (i == effectByte) return 0; break; @@ -4846,10 +4942,10 @@ u8 GetItemEffectParamOffset(u16 itemId, u8 effectByte, u8 effectBit) return offset; } -static void BufferStatRoseMessage(int stat) +static void BufferStatRoseMessage(int statIdx) { gBattlerTarget = gBattlerInMenuId; - StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[stat]]); + StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[statIdx]]); StringCopy(gBattleTextBuff2, gBattleText_Rose); BattleStringExpandPlaceholdersToDisplayedString(gText_DefendersStatRose); } @@ -4872,18 +4968,18 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) } else { - itemEffect = gItemEffectTable[itemId - 13]; + itemEffect = gItemEffectTable[itemId - ITEM_POTION]; } gPotentialItemEffectBattler = gBattlerInMenuId; for (i = 0; i < 3; i++) { - if (itemEffect[i] & 0xF) + if (itemEffect[i] & (ITEM0_X_ATTACK | ITEM1_X_SPEED | ITEM2_X_SPATK)) BufferStatRoseMessage(i * 2); - if (itemEffect[i] & 0xF0) + if (itemEffect[i] & (ITEM0_DIRE_HIT | ITEM1_X_DEFEND | ITEM2_X_ACCURACY)) { - if (i) + if (i != 0) // Dire Hit is the only ITEM0 above { BufferStatRoseMessage(i * 2 + 1); } @@ -4895,7 +4991,7 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) } } - if (itemEffect[3] & 0x80) + if (itemEffect[3] & ITEM3_GUARD_SPEC) { gBattlerAttacker = gBattlerInMenuId; BattleStringExpandPlaceholdersToDisplayedString(gBattleText_MistShroud); @@ -4906,12 +5002,12 @@ const u8 *Battle_PrintStatBoosterEffectMessage(u16 itemId) u8 GetNature(struct Pokemon *mon) { - return GetMonData(mon, MON_DATA_PERSONALITY, NULL) % 25; + return GetMonData(mon, MON_DATA_PERSONALITY, NULL) % NUM_NATURES; } static u8 GetNatureFromPersonality(u32 personality) { - return personality % 25; + return personality % NUM_NATURES; } u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) @@ -4932,6 +5028,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) else holdEffect = ItemId_GetHoldEffect(heldItem); + // Prevent evolution with Everstone, unless we're just viewing the party menu with an evolution item if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE && type != EVO_MODE_ITEM_CHECK) return 0; @@ -4941,7 +5038,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) level = GetMonData(mon, MON_DATA_LEVEL, NULL); friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, NULL); - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { switch (gEvolutionTable[species][i].method) { @@ -5003,7 +5100,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) } break; case EVO_MODE_TRADE: - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { switch (gEvolutionTable[species][i].method) { @@ -5014,9 +5111,11 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) if (gEvolutionTable[species][i].param == heldItem) { targetSpecies = gEvolutionTable[species][i].targetSpecies; + + // Prevent cross-generational evolutions like Scizor and Steelix until the National Pokedex is obtained if (IsNationalPokedexEnabled() || targetSpecies <= KANTO_SPECIES_END) { - heldItem = 0; + heldItem = ITEM_NONE; SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem); targetSpecies = gEvolutionTable[species][i].targetSpecies; } @@ -5027,7 +5126,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) break; case EVO_MODE_ITEM_USE: case EVO_MODE_ITEM_CHECK: - for (i = 0; i < 5; i++) + for (i = 0; i < EVOS_PER_MON; i++) { if (gEvolutionTable[species][i].method == EVO_ITEM && gEvolutionTable[species][i].param == evolutionItem) @@ -5042,16 +5141,16 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) return targetSpecies; } -static u16 HoennPokedexNumToSpecies(u16 var) +static u16 HoennPokedexNumToSpecies(u16 hoennNum) { u16 species; - if (!var) + if (!hoennNum) return 0; species = 0; - while (species < NUM_SPECIES - 1 && sSpeciesToHoennPokedexNum[species] != var) + while (species < NUM_SPECIES - 1 && sSpeciesToHoennPokedexNum[species] != hoennNum) species++; if (species == NUM_SPECIES - 1) @@ -5131,42 +5230,81 @@ u16 SpeciesToCryId(u16 species) return sHoennSpeciesIdToCryId[species - ((SPECIES_OLD_UNOWN_Z + 1) - 1)]; } -#define DRAW_SPINDA_SPOTS \ +// Spots can be drawn on Spinda's color indexes 1, 2, or 3 +#define FIRST_SPOT_COLOR 1 +#define LAST_SPOT_COLOR 3 + +// To draw a spot pixel, add 4 to the color index +#define SPOT_COLOR_ADJUSTMENT 4 +/* + The macro below handles drawing the randomly-placed spots on Spinda's front sprite. + Spinda has 4 spots, each with an entry in sSpindaSpotGraphics. Each entry contains + a base x and y coordinate for the spot and a 16x16 binary image. Each bit in the image + determines whether that pixel should be considered part of the spot. + + The position of each spot is randomized using the Spinda's personality. The entire 32 bit + personality value is used, 4 bits for each coordinate of the 4 spots. If the personality + value is 0x87654321, then 0x1 will be used for the 1st spot's x coord, 0x2 will be used for + the 1st spot's y coord, 0x3 will be used for the 2nd spot's x coord, and so on. Each + coordinate is calculated as (baseCoord + (given 4 bits of personality) - 8). In effect this + means each spot can start at any position -8 to +7 off of its base coordinates (256 possibilities). + + The macro then loops over the 16x16 spot image. For each bit in the spot's binary image, if + the bit is set then it's part of the spot; try to draw it. A pixel is drawn on Spinda if the + pixel on Spinda satisfies the following formula: ((u8)(colorIndex - 1) <= 2). The -1 excludes + transparent pixels, as these are index 0. Therefore only colors 1, 2, or 3 on Spinda will + allow a spot to be drawn. These color indexes are Spinda's light brown body colors. To create + the spot it adds 4 to the color index, so Spinda's spots will be colors 5, 6, and 7. + + The above is done two different ways in the macro: one with << 4, and one without. This + is because Spinda's sprite is a 4 bits per pixel image, but the pointer to Spinda's pixels + (destPixels) is an 8 bit pointer, so it addresses two pixels. Shifting by 4 accesses the 2nd + of these pixels, so this is done every other time. +*/ +#define DRAW_SPINDA_SPOTS(personality, dest) \ { \ - int i; \ - for (i = 0; i < 4; i++) \ + s32 i; \ + for (i = 0; i < (s32)ARRAY_COUNT(sSpindaSpotGraphics); i++) \ { \ - int j; \ + s32 row; \ u8 x = sSpindaSpotGraphics[i].x + ((personality & 0x0F) - 8); \ u8 y = sSpindaSpotGraphics[i].y + (((personality & 0xF0) >> 4) - 8); \ \ - for (j = 0; j < 16; j++) \ + for (row = 0; row < SPINDA_SPOT_HEIGHT; row++) \ { \ - int k; \ - s32 row = sSpindaSpotGraphics[i].image[j]; \ + s32 column; \ + s32 spotPixelRow = sSpindaSpotGraphics[i].image[row]; \ \ - for (k = x; k < x + 16; k++) \ + for (column = x; column < x + SPINDA_SPOT_WIDTH; column++) \ { \ - u8 *val = dest + ((k / 8) * 32) + \ - ((k % 8) / 2) + \ - ((y >> 3) << 8) + \ - ((y & 7) << 2); \ + /* Get target pixels on Spinda's sprite */ \ + u8 *destPixels = dest + ((column / 8) * TILE_SIZE_4BPP) + \ + ((column % 8) / 2) + \ + ((y / 8) * TILE_SIZE_4BPP * 8) + \ + ((y % 8) * 4); \ \ - if (row & 1) \ + /* Is this pixel in the 16x16 spot image part of the spot? */ \ + if (spotPixelRow & 1) \ { \ - if (k & 1) \ + /* destPixels addressess two pixels, alternate which */ \ + /* of the two pixels is being considered for drawing */ \ + if (column & 1) \ { \ - if ((u8)((*val & 0xF0) - 0x10) <= 0x20) \ - *val += 0x40; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF0) - (FIRST_SPOT_COLOR << 4))\ + <= ((LAST_SPOT_COLOR - FIRST_SPOT_COLOR) << 4))\ + *destPixels += (SPOT_COLOR_ADJUSTMENT << 4); \ } \ else \ { \ - if ((u8)((*val & 0xF) - 0x01) <= 0x02) \ - *val += 0x04; \ + /* Draw spot pixel if this is Spinda's body color */ \ + if ((u8)((*destPixels & 0xF) - FIRST_SPOT_COLOR) \ + <= (LAST_SPOT_COLOR - FIRST_SPOT_COLOR)) \ + *destPixels += SPOT_COLOR_ADJUSTMENT; \ } \ } \ \ - row >>= 1; \ + spotPixelRow >>= 1; \ } \ \ y++; \ @@ -5176,18 +5314,20 @@ u16 SpeciesToCryId(u16 species) } \ } +// Same as DrawSpindaSpots but attempts to discern for itself whether or +// not it's the front pic. static void DrawSpindaSpotsUnused(u16 species, u32 personality, u8 *dest) { if (species == SPECIES_SPINDA - && dest != gMonSpritesGfxPtr->sprites[0] - && dest != gMonSpritesGfxPtr->sprites[2]) - DRAW_SPINDA_SPOTS; + && dest != gMonSpritesGfxPtr->sprites[B_POSITION_PLAYER_LEFT] + && dest != gMonSpritesGfxPtr->sprites[B_POSITION_PLAYER_RIGHT]) + DRAW_SPINDA_SPOTS(personality, dest); } void DrawSpindaSpots(u16 species, u32 personality, u8 *dest, bool8 isFrontPic) { if (species == SPECIES_SPINDA && isFrontPic) - DRAW_SPINDA_SPOTS; + DRAW_SPINDA_SPOTS(personality, dest); } void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) @@ -5199,79 +5339,95 @@ void EvolutionRenameMon(struct Pokemon *mon, u16 oldSpecies, u16 newSpecies) SetMonData(mon, MON_DATA_NICKNAME, gSpeciesNames[newSpecies]); } -bool8 GetPlayerFlankId(void) +// The below two functions determine which side of a multi battle the trainer battles on +// 0 is the left (top in party menu), 1 is right (bottom in party menu) +u8 GetPlayerFlankId(void) { - bool8 retVal = FALSE; + u8 flankId = 0; switch (gLinkPlayers[GetMultiplayerId()].id) { case 0: case 3: - retVal = FALSE; + flankId = 0; break; case 1: case 2: - retVal = TRUE; + flankId = 1; break; } - return retVal; + return flankId; } -bool16 GetLinkTrainerFlankId(u8 linkPlayerId) +u16 GetLinkTrainerFlankId(u8 linkPlayerId) { - bool16 retVal = FALSE; + u16 flankId = 0; switch (gLinkPlayers[linkPlayerId].id) { case 0: case 3: - retVal = FALSE; + flankId = 0; break; case 1: case 2: - retVal = TRUE; + flankId = 1; break; } - return retVal; + return flankId; } -s32 GetBattlerMultiplayerId(u16 a1) +s32 GetBattlerMultiplayerId(u16 id) { - s32 id; - for (id = 0; id < MAX_LINK_PLAYERS; id++) - if (gLinkPlayers[id].id == a1) + s32 multiplayerId; + for (multiplayerId = 0; multiplayerId < MAX_LINK_PLAYERS; multiplayerId++) + if (gLinkPlayers[multiplayerId].id == id) break; - return id; + return multiplayerId; } -u8 GetTrainerEncounterMusicId(u16 trainer) +u8 GetTrainerEncounterMusicId(u16 trainerId) { - return gTrainers[trainer].encounterMusic_gender & 0x7F; + return TRAINER_ENCOUNTER_MUSIC(trainerId); } -static u16 ModifyStatByNature(u8 nature, u16 n, u8 statIndex) +static u16 ModifyStatByNature(u8 nature, u16 stat, u8 statIndex) { - if (statIndex < 1 || statIndex > 5) - { - // should just be "return n", but it wouldn't match without this - u16 retVal = n; - retVal++; - retVal--; - return retVal; - } +// Because this is a u16 it will be unable to store the +// result of the multiplication for any stat > 595 for a +// positive nature and > 728 for a negative nature. +// Neither occur in the base game, but this can happen if +// any Nature-affected base stat is increased to a value +// above 248. The closest by default is Shuckle at 230. +#ifdef BUGFIX + u32 retVal; +#else + u16 retVal; +#endif + + // Don't modify HP, Accuracy, or Evasion by nature + if (statIndex <= STAT_HP || statIndex > NUM_NATURE_STATS) + return stat; switch (sNatureStatTable[nature][statIndex - 1]) { case 1: - return (u16)(n * 110) / 100; + retVal = stat * 110; + retVal /= 100; + break; case -1: - return (u16)(n * 90) / 100; + retVal = stat * 90; + retVal /= 100; + break; + default: + retVal = stat; + break; } - return n; + return retVal; } void AdjustFriendship(struct Pokemon *mon, u8 event) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u16 heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, NULL); u8 holdEffect; @@ -5319,7 +5475,7 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) } delta = sFriendshipEventDeltas[event][friendshipLevel]; - if (delta > 0 && holdEffect == HOLD_EFFECT_HAPPINESS_UP) + if (delta > 0 && holdEffect == HOLD_EFFECT_FRIENDSHIP_UP) // 50% increase, rounding down delta = (150 * delta) / 100; @@ -5332,11 +5488,10 @@ void AdjustFriendship(struct Pokemon *mon, u8 event) friendship++; } - // Clamp to u8 if (friendship < 0) friendship = 0; - if (friendship > 255) - friendship = 255; + if (friendship > MAX_FRIENDSHIP) + friendship = MAX_FRIENDSHIP; SetMonData(mon, MON_DATA_FRIENDSHIP, &friendship); } @@ -5374,23 +5529,23 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) switch (i) { - case 0: - evIncrease = gBaseStats[defeatedSpecies].evYield_HP * multiplier; + case STAT_HP: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_HP * multiplier; break; - case 1: - evIncrease = gBaseStats[defeatedSpecies].evYield_Attack * multiplier; + case STAT_ATK: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Attack * multiplier; break; - case 2: - evIncrease = gBaseStats[defeatedSpecies].evYield_Defense * multiplier; + case STAT_DEF: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Defense * multiplier; break; - case 3: - evIncrease = gBaseStats[defeatedSpecies].evYield_Speed * multiplier; + case STAT_SPEED: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_Speed * multiplier; break; - case 4: - evIncrease = gBaseStats[defeatedSpecies].evYield_SpAttack * multiplier; + case STAT_SPATK: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpAttack * multiplier; break; - case 5: - evIncrease = gBaseStats[defeatedSpecies].evYield_SpDefense * multiplier; + case STAT_SPDEF: + evIncrease = gSpeciesInfo[defeatedSpecies].evYield_SpDefense * multiplier; break; } @@ -5414,9 +5569,9 @@ void MonGainEVs(struct Pokemon *mon, u16 defeatedSpecies) if (totalEVs + (s16)evIncrease > MAX_TOTAL_EVS) evIncrease = ((s16)evIncrease + MAX_TOTAL_EVS) - (totalEVs + evIncrease); - if (evs[i] + (s16)evIncrease > 255) + if (evs[i] + (s16)evIncrease > MAX_PER_STAT_EVS) { - int val1 = (s16)evIncrease + 255; + int val1 = (s16)evIncrease + MAX_PER_STAT_EVS; int val2 = evs[i] + evIncrease; evIncrease = val1 - val2; } @@ -5448,7 +5603,7 @@ void RandomlyGivePartyPokerus(struct Pokemon *party) &foo; } -u8 CheckPartyPokerus(struct Pokemon *party, u8 party_bm) +u8 CheckPartyPokerus(struct Pokemon *party, u8 selection) { u8 retVal; @@ -5456,25 +5611,23 @@ u8 CheckPartyPokerus(struct Pokemon *party, u8 party_bm) unsigned curBit = 1; retVal = 0; - if (party_bm != 0) // Check mons in party based on bitmask, LSB = first mon + if (selection) { do { - if ((party_bm & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) + if ((selection & 1) && (GetMonData(&party[partyIndex], MON_DATA_POKERUS, NULL) & 0xF)) retVal |= curBit; partyIndex++; curBit <<= 1; - party_bm >>= 1; + selection >>= 1; } - while (party_bm); + while (selection); } - else // Single Pokemon + else if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) { - if (GetMonData(&party[0], MON_DATA_POKERUS, NULL) & 0xF) - { - retVal = 1; - } + retVal = 1; } + return retVal; } @@ -5522,9 +5675,9 @@ void PartySpreadPokerus(struct Pokemon *party) static void SetMonExpWithMaxLevelCheck(struct Pokemon *mon, int species, u8 unused, u32 data) { - if (data > gExperienceTables[gBaseStats[species].growthRate][100]) + if (data > gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL]) { - data = gExperienceTables[gBaseStats[species].growthRate][100]; + data = gExperienceTables[gSpeciesInfo[species].growthRate][MAX_LEVEL]; SetMonData(mon, MON_DATA_EXP, &data); } } @@ -5536,9 +5689,9 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon) u8 newLevel = level + 1; u32 exp = GetMonData(mon, MON_DATA_EXP, NULL); - if (level < 100) + if (level < MAX_LEVEL) { - if (exp > gExperienceTables[gBaseStats[species].growthRate][newLevel]) + if (exp > gExperienceTables[gSpeciesInfo[species].growthRate][newLevel]) { SetMonData(mon, MON_DATA_LEVEL, &newLevel); SetMonExpWithMaxLevelCheck(mon, species, newLevel, exp); @@ -5556,7 +5709,7 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon) u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); if (species == SPECIES_EGG) { return 0; @@ -5575,36 +5728,36 @@ u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm) u8 GetMoveRelearnerMoves(struct Pokemon *mon, u16 *moves) { - u16 learnedMoves[4]; + u16 learnedMoves[MAX_MON_MOVES]; u8 numMoves = 0; u16 species = GetMonData(mon, MON_DATA_SPECIES, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); int i, j, k; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - for (i = 0; i < 20; i++) + for (i = 0; i < MAX_LEVEL_UP_MOVES; i++) { u16 moveLevel; - if (gLevelUpLearnsets[species][i] == 0xFFFF) + if (gLevelUpLearnsets[species][i] == LEVEL_UP_END) break; - moveLevel = gLevelUpLearnsets[species][i] & 0xFE00; + moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV; if (moveLevel <= (level << 9)) { - for (j = 0; j < 4 && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { - for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++) + for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++) ; if (k == numMoves) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; } } } @@ -5617,48 +5770,48 @@ u8 GetLevelUpMovesBySpecies(u16 species, u16 *moves) u8 numMoves = 0; int i; - for (i = 0; i < 20 && gLevelUpLearnsets[species][i] != 0xFFFF; i++) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + for (i = 0; i < MAX_LEVEL_UP_MOVES && gLevelUpLearnsets[species][i] != LEVEL_UP_END; i++) + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; return numMoves; } u8 GetNumberOfRelearnableMoves(struct Pokemon *mon) { - u16 learnedMoves[4]; - u16 moves[20]; + u16 learnedMoves[MAX_MON_MOVES]; + u16 moves[MAX_LEVEL_UP_MOVES]; u8 numMoves = 0; - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u8 level = GetMonData(mon, MON_DATA_LEVEL, NULL); int i, j, k; if (species == SPECIES_EGG) return 0; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) learnedMoves[i] = GetMonData(mon, MON_DATA_MOVE1 + i, NULL); - for (i = 0; i < 20; i++) + for (i = 0; i < MAX_LEVEL_UP_MOVES; i++) { u16 moveLevel; - if (gLevelUpLearnsets[species][i] == 0xFFFF) + if (gLevelUpLearnsets[species][i] == LEVEL_UP_END) break; - moveLevel = gLevelUpLearnsets[species][i] & 0xFE00; + moveLevel = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_LV; if (moveLevel <= (level << 9)) { - for (j = 0; j < 4 && learnedMoves[j] != (gLevelUpLearnsets[species][i] & 0x1FF); j++) + for (j = 0; j < MAX_MON_MOVES && learnedMoves[j] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); j++) ; - if (j == 4) + if (j == MAX_MON_MOVES) { - for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & 0x1FF); k++) + for (k = 0; k < numMoves && moves[k] != (gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID); k++) ; if (k == numMoves) - moves[numMoves++] = gLevelUpLearnsets[species][i] & 0x1FF; + moves[numMoves++] = gLevelUpLearnsets[species][i] & LEVEL_UP_MOVE_ID; } } } @@ -5678,7 +5831,7 @@ u16 SpeciesToPokedexNum(u16 species) void ClearBattleMonForms(void) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_BATTLERS_COUNT; i++) gBattleMonForms[i] = 0; } @@ -5730,7 +5883,7 @@ void PlayMapChosenOrBattleBGM(u16 songId) const u32 *GetMonFrontSpritePal(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); return GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality); @@ -5743,7 +5896,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p if (species > SPECIES_EGG) return gMonPaletteTable[0].data; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return gMonShinyPaletteTable[species].data; else @@ -5752,7 +5905,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon) { - u16 species = GetMonData(mon, MON_DATA_SPECIES2, NULL); + u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL); u32 otId = GetMonData(mon, MON_DATA_OT_ID, NULL); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, NULL); return GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); @@ -5762,7 +5915,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u { u32 shinyValue; - shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) return &gMonShinyPaletteTable[species]; else @@ -5772,7 +5925,7 @@ const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u bool32 IsHMMove2(u16 move) { int i = 0; - while (sHMMoves[i] != 0xFFFF) + while (sHMMoves[i] != HM_MOVES_END) { if (sHMMoves[i++] == move) return TRUE; @@ -5782,24 +5935,24 @@ bool32 IsHMMove2(u16 move) bool8 IsMonSpriteNotFlipped(u16 species) { - return gBaseStats[species].noFlip; + return gSpeciesInfo[species].noFlip; } static s8 GetMonFlavorRelation(struct Pokemon *mon, u8 flavor) { u8 nature = GetNature(mon); - return sPokeblockFlavorCompatibilityTable[nature * 5 + flavor]; + return sPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor]; } s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor) { u8 nature = GetNatureFromPersonality(personality); - return sPokeblockFlavorCompatibilityTable[nature * 5 + flavor]; + return sPokeblockFlavorCompatibilityTable[nature * FLAVOR_COUNT + flavor]; } bool8 IsTradedMon(struct Pokemon *mon) { - u8 otName[PLAYER_NAME_LENGTH]; + u8 otName[PLAYER_NAME_LENGTH + 1]; u32 otId; GetMonData(mon, MON_DATA_OT_NAME, otName); otId = GetMonData(mon, MON_DATA_OT_ID, NULL); @@ -5834,7 +5987,7 @@ void BoxMonRestorePP(struct BoxPokemon *boxMon) { int i; - for (i = 0; i < 4; i++) + for (i = 0; i < MAX_MON_MOVES; i++) { if (GetBoxMonData(boxMon, MON_DATA_MOVE1 + i, 0)) { @@ -5870,18 +6023,19 @@ void SetWildMonHeldItem(void) { u16 rnd = Random() % 100; u16 species = GetMonData(&gEnemyParty[0], MON_DATA_SPECIES, NULL); - if (gBaseStats[species].item1 == gBaseStats[species].item2) + if (gSpeciesInfo[species].itemCommon == gSpeciesInfo[species].itemRare) { - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); + // Both held items are the same, 100% chance to hold item + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon); return; } if (rnd > 44) { if (rnd <= 94) - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item1); + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemCommon); else - SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gBaseStats[species].item2); + SetMonData(&gEnemyParty[0], MON_DATA_HELD_ITEM, &gSpeciesInfo[species].itemRare); } } } @@ -5896,7 +6050,7 @@ bool8 IsMonShiny(struct Pokemon *mon) static bool8 IsShinyOtIdPersonality(u32 otId, u32 personality) { bool8 retVal = FALSE; - u32 shinyValue = HIHALF(otId) ^ LOHALF(otId) ^ HIHALF(personality) ^ LOHALF(personality); + u32 shinyValue = GET_SHINY_VALUE(otId, personality); if (shinyValue < SHINY_ODDS) retVal = TRUE; return retVal; @@ -5931,6 +6085,7 @@ u16 FacilityClassToPicIndex(u16 facilityClass) return gFacilityClassToPicIndex[facilityClass]; } +// If FALSE, should load this game's Deoxys form. If TRUE, should load normal Deoxys form bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId) { switch (caseId) @@ -5990,21 +6145,17 @@ bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId) static u16 GetDeoxysStat(struct Pokemon *mon, s32 statId) { s32 ivVal, evVal; - u16 statValue; + u16 statValue = 0; u8 nature; if (gBattleTypeFlags & BATTLE_TYPE_LINK_IN_BATTLE || GetMonData(mon, MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS) - { - return statValue = 0; - } - else - { - ivVal = GetMonData(mon, MON_DATA_HP_IV + statId, NULL); - evVal = GetMonData(mon, MON_DATA_HP_EV + statId, NULL); - statValue = ((sDeoxysBaseStats[statId] * 2 + ivVal + evVal / 4) * mon->level) / 100 + 5; - nature = GetNature(mon); - statValue = ModifyStatByNature(nature, statValue, (u8)statId); - } + return 0; + + ivVal = GetMonData(mon, MON_DATA_HP_IV + statId, NULL); + evVal = GetMonData(mon, MON_DATA_HP_EV + statId, NULL); + statValue = ((sDeoxysBaseStats[statId] * 2 + ivVal + evVal / 4) * mon->level) / 100 + 5; + nature = GetNature(mon); + statValue = ModifyStatByNature(nature, statValue, (u8)statId); return statValue; } @@ -6049,14 +6200,14 @@ u16 GetUnionRoomTrainerClass(void) return gFacilityClassToTrainerClass[gUnionRoomFacilityClasses[arrId]]; } -void CreateEventLegalEnemyMon(void) +void CreateEnemyEventMon(void) { s32 species = gSpecialVar_0x8004; s32 level = gSpecialVar_0x8005; s32 itemId = gSpecialVar_0x8006; ZeroEnemyPartyMons(); - CreateEventLegalMon(&gEnemyParty[0], species, level, 32, 0, 0, 0, 0); + CreateEventMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0); if (itemId) { u8 heldItem[2]; @@ -6083,30 +6234,34 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality) bool8 CheckBattleTypeGhost(struct Pokemon *mon, u8 battlerId) { - u8 buffer[12]; + u8 nickname[POKEMON_NAME_LENGTH + 1]; if (gBattleTypeFlags & BATTLE_TYPE_GHOST && GetBattlerSide(battlerId) != B_SIDE_PLAYER) { - GetMonData(mon, MON_DATA_NICKNAME, buffer); - StringGet_Nickname(buffer); - if (!StringCompare(buffer, gText_Ghost)) + GetMonData(mon, MON_DATA_NICKNAME, nickname); + StringGet_Nickname(nickname); + if (!StringCompare(nickname, gText_Ghost)) return TRUE; } return FALSE; } -static void OakSpeechNidoranFSetupTemplate(struct OakSpeechNidoranFStruct *structPtr, u8 battlePosition) +#define ALLOC_FAIL_BUFFER (1 << 0) +#define ALLOC_FAIL_STRUCT (1 << 1) +#define GFX_MANAGER_ACTIVE 0xA3 // Arbitrary value + +static void InitMonSpritesGfx_Mode1(struct MonSpritesGfxManager *structPtr, u8 battlePosition) { u16 i = 0, j = 0; - if (battlePosition > 3) + if (battlePosition >= MAX_BATTLERS_COUNT) { - for (i = 0; i < (s8)structPtr->spriteCount; ++i) + for (i = 0; i < (s8)structPtr->numSprites; ++i) { structPtr->templates[i] = gSpriteTemplates_Battlers[i]; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[i * structPtr->frameCount + j].data = &structPtr->bufferPtrs[i][j * 0x800]; - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->frameCount]; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[i * structPtr->numFrames + j].data = &structPtr->spritePointers[i][j * MON_PIC_SIZE]; + structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->numFrames]; } } else @@ -6114,172 +6269,173 @@ static void OakSpeechNidoranFSetupTemplate(struct OakSpeechNidoranFStruct *struc const struct SpriteTemplate *template = &gSpriteTemplates_Battlers[battlePosition]; structPtr->templates[0] = *template; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[j].data = &structPtr->bufferPtrs[0][j * 0x800]; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[j].data = &structPtr->spritePointers[0][j * MON_PIC_SIZE]; structPtr->templates[0].images = structPtr->frameImages; } } // not used -static void OakSpeechNidoranFSetupTemplateDummy(struct OakSpeechNidoranFStruct *structPtr) +static void InitMonSpritesGfx_Mode0(struct MonSpritesGfxManager *structPtr) { u16 i, j; - for (i = 0; i < (s8)structPtr->spriteCount; ++i) + for (i = 0; i < (s8)structPtr->numSprites; ++i) { - structPtr->templates[i] = sOakSpeechNidoranFDummyTemplate; - for (j = 0; j < structPtr->frameCount; ++j) - structPtr->frameImages[i * structPtr->spriteCount + j].data = &structPtr->bufferPtrs[i][j * 0x800]; - structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->spriteCount]; // should be frameCount logically + structPtr->templates[i] = sSpriteTemplate_64x64; + for (j = 0; j < structPtr->numFrames; ++j) + structPtr->frameImages[i * structPtr->numSprites + j].data = &structPtr->spritePointers[i][j * MON_PIC_SIZE]; + structPtr->templates[i].images = &structPtr->frameImages[i * structPtr->numSprites]; // should be numFrames logically structPtr->templates[i].anims = gAnims_MonPic; structPtr->templates[i].paletteTag = i; } } -struct OakSpeechNidoranFStruct *OakSpeechNidoranFSetup(u8 battlePosition, bool8 enable) +struct MonSpritesGfxManager *CreateMonSpritesGfxManager(u8 battlePosition, u8 mode) { s32 size; - u8 i, flags = 0; + u8 i, failureFlags = 0; - if (sOakSpeechNidoranResources != NULL) + if (sMonSpritesGfxManager != NULL) { - if (sOakSpeechNidoranResources->enable == 0xA3) + if (sMonSpritesGfxManager->active == GFX_MANAGER_ACTIVE) return NULL; - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - sOakSpeechNidoranResources = NULL; + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + sMonSpritesGfxManager = NULL; } - sOakSpeechNidoranResources = AllocZeroed(0x18); - if (sOakSpeechNidoranResources == NULL) + sMonSpritesGfxManager = AllocZeroed(sizeof(*sMonSpritesGfxManager)); + if (sMonSpritesGfxManager == NULL) return NULL; - switch (enable) + + switch (mode) { - case TRUE: - if (battlePosition == 4) + case 1: + if (battlePosition == MAX_BATTLERS_COUNT) { - sOakSpeechNidoranResources->spriteCount = 4; - sOakSpeechNidoranResources->battlePosition = 4; + sMonSpritesGfxManager->numSprites = MAX_BATTLERS_COUNT; + sMonSpritesGfxManager->battlePosition = MAX_BATTLERS_COUNT; } else { - if (battlePosition > 4) + if (battlePosition > MAX_BATTLERS_COUNT) battlePosition = 0; - sOakSpeechNidoranResources->spriteCount = 1; - sOakSpeechNidoranResources->battlePosition = 1; + sMonSpritesGfxManager->numSprites = 1; + sMonSpritesGfxManager->battlePosition = 1; } - sOakSpeechNidoranResources->frameCount = 4; - sOakSpeechNidoranResources->enable2 = TRUE; + sMonSpritesGfxManager->numFrames = MAX_MON_PIC_FRAMES; + sMonSpritesGfxManager->mode = 1; break; - case FALSE: + case 0: default: if (!battlePosition) battlePosition = 1; if (battlePosition > 8) battlePosition = 8; - sOakSpeechNidoranResources->spriteCount = (battlePosition << 16) >> 16; - sOakSpeechNidoranResources->battlePosition = battlePosition; - sOakSpeechNidoranResources->frameCount = 4; - sOakSpeechNidoranResources->enable2 = FALSE; + sMonSpritesGfxManager->numSprites = (battlePosition << 16) >> 16; + sMonSpritesGfxManager->battlePosition = battlePosition; + sMonSpritesGfxManager->numFrames = 4; + sMonSpritesGfxManager->mode = 0; break; } - size = sOakSpeechNidoranResources->frameCount * 0x800; - sOakSpeechNidoranResources->sizePerSprite = size; - sOakSpeechNidoranResources->dataBuffer = AllocZeroed(sOakSpeechNidoranResources->spriteCount * size); - sOakSpeechNidoranResources->bufferPtrs = AllocZeroed(sOakSpeechNidoranResources->spriteCount * 0x20); - if (sOakSpeechNidoranResources->dataBuffer == NULL || sOakSpeechNidoranResources->bufferPtrs == NULL) + + // Set up sprite / sprite pointer buffers + size = sMonSpritesGfxManager->numFrames * MON_PIC_SIZE; + sMonSpritesGfxManager->dataSize = size; + sMonSpritesGfxManager->spriteBuffer = AllocZeroed(sMonSpritesGfxManager->numSprites * size); + sMonSpritesGfxManager->spritePointers = AllocZeroed(sMonSpritesGfxManager->numSprites * 32); // ? Only * 4 is necessary, perhaps they were thinking bits. + if (sMonSpritesGfxManager->spriteBuffer == NULL || sMonSpritesGfxManager->spritePointers == NULL) { - flags |= 1; + failureFlags |= ALLOC_FAIL_BUFFER; } else { do { - for (i = 0; i < (s8)sOakSpeechNidoranResources->spriteCount; ++i) - sOakSpeechNidoranResources->bufferPtrs[i] = &sOakSpeechNidoranResources->dataBuffer[sOakSpeechNidoranResources->sizePerSprite * i]; + for (i = 0; i < (s8)sMonSpritesGfxManager->numSprites; ++i) + sMonSpritesGfxManager->spritePointers[i] = &sMonSpritesGfxManager->spriteBuffer[sMonSpritesGfxManager->dataSize * i]; } while (0); } - sOakSpeechNidoranResources->templates = AllocZeroed(sizeof(struct SpriteTemplate) * sOakSpeechNidoranResources->spriteCount); - sOakSpeechNidoranResources->frameImages = AllocZeroed(sOakSpeechNidoranResources->spriteCount * sizeof(struct SpriteFrameImage) * sOakSpeechNidoranResources->frameCount); - if (sOakSpeechNidoranResources->templates == NULL || sOakSpeechNidoranResources->frameImages == NULL) + + // Set up sprite structs + sMonSpritesGfxManager->templates = AllocZeroed(sizeof(struct SpriteTemplate) * sMonSpritesGfxManager->numSprites); + sMonSpritesGfxManager->frameImages = AllocZeroed(sMonSpritesGfxManager->numSprites * sizeof(struct SpriteFrameImage) * sMonSpritesGfxManager->numFrames); + if (sMonSpritesGfxManager->templates == NULL || sMonSpritesGfxManager->frameImages == NULL) { - flags |= 2; + failureFlags |= ALLOC_FAIL_STRUCT; } else { - for (i = 0; i < sOakSpeechNidoranResources->frameCount * sOakSpeechNidoranResources->spriteCount; ++i) - sOakSpeechNidoranResources->frameImages[i].size = 0x800; - switch (sOakSpeechNidoranResources->enable2) + for (i = 0; i < sMonSpritesGfxManager->numFrames * sMonSpritesGfxManager->numSprites; i++) + sMonSpritesGfxManager->frameImages[i].size = MON_PIC_SIZE; + switch (sMonSpritesGfxManager->mode) { - case TRUE: - OakSpeechNidoranFSetupTemplate(sOakSpeechNidoranResources, battlePosition); + case 1: + InitMonSpritesGfx_Mode1(sMonSpritesGfxManager, battlePosition); break; - case FALSE: + case 0: default: - OakSpeechNidoranFSetupTemplateDummy(sOakSpeechNidoranResources); + InitMonSpritesGfx_Mode0(sMonSpritesGfxManager); break; } } - if (flags & 2) + + // If either of the allocations failed free their respective members + if (failureFlags & ALLOC_FAIL_STRUCT) { - if (sOakSpeechNidoranResources->frameImages != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->frameImages); - if (sOakSpeechNidoranResources->templates != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->templates); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->frameImages); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->templates); } - if (flags & 1) + if (failureFlags & ALLOC_FAIL_BUFFER) { - if (sOakSpeechNidoranResources->bufferPtrs != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->bufferPtrs); - if (sOakSpeechNidoranResources->dataBuffer != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->dataBuffer); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spritePointers); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spriteBuffer); } - if (flags) + + if (failureFlags) { - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - FREE_AND_SET_NULL(sOakSpeechNidoranResources); + // Clear, something failed to allocate + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + FREE_AND_SET_NULL(sMonSpritesGfxManager); } else { - sOakSpeechNidoranResources->enable = 0xA3; + sMonSpritesGfxManager->active = GFX_MANAGER_ACTIVE; } - return sOakSpeechNidoranResources; + return sMonSpritesGfxManager; } -void OakSpeechNidoranFFreeResources(void) +void DestroyMonSpritesGfxManager(void) { - if (sOakSpeechNidoranResources != NULL) + if (sMonSpritesGfxManager != NULL) { - if (sOakSpeechNidoranResources->enable != 0xA3) + if (sMonSpritesGfxManager->active != GFX_MANAGER_ACTIVE) { - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - sOakSpeechNidoranResources = NULL; + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + sMonSpritesGfxManager = NULL; } else { - if (sOakSpeechNidoranResources->frameImages != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->frameImages); - if (sOakSpeechNidoranResources->templates != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->templates); - if (sOakSpeechNidoranResources->bufferPtrs != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->bufferPtrs); - if (sOakSpeechNidoranResources->dataBuffer != NULL) - FREE_AND_SET_NULL(sOakSpeechNidoranResources->dataBuffer); - memset(sOakSpeechNidoranResources, 0, sizeof(struct OakSpeechNidoranFStruct)); - FREE_AND_SET_NULL(sOakSpeechNidoranResources); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->frameImages); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->templates); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spritePointers); + TRY_FREE_AND_SET_NULL(sMonSpritesGfxManager->spriteBuffer); + memset(sMonSpritesGfxManager, 0, sizeof(*sMonSpritesGfxManager)); + FREE_AND_SET_NULL(sMonSpritesGfxManager); } } } -void *OakSpeechNidoranFGetBuffer(u8 bufferId) +u8 *MonSpritesGfxManager_GetSpritePtr(u8 spriteNum) { - if (sOakSpeechNidoranResources->enable != 0xA3) + if (sMonSpritesGfxManager->active != GFX_MANAGER_ACTIVE) { return NULL; } else { - if (bufferId >= (s8)sOakSpeechNidoranResources->spriteCount) - bufferId = 0; - return sOakSpeechNidoranResources->bufferPtrs[bufferId]; + if (spriteNum >= (s8)sMonSpritesGfxManager->numSprites) + spriteNum = 0; + return sMonSpritesGfxManager->spritePointers[spriteNum]; } } diff --git a/src/pokemon_jump.c b/src/pokemon_jump.c index e0ba89e1d..49e94867b 100644 --- a/src/pokemon_jump.c +++ b/src/pokemon_jump.c @@ -2692,7 +2692,7 @@ void IsPokemonJumpSpeciesInParty(void) { if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (IsSpeciesAllowedInPokemonJump(species)) { gSpecialVar_Result = TRUE; diff --git a/src/pokemon_storage_system_data.c b/src/pokemon_storage_system_data.c index dd1502977..ed09bdb65 100644 --- a/src/pokemon_storage_system_data.c +++ b/src/pokemon_storage_system_data.c @@ -1031,7 +1031,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct Pokemon *mon = (struct Pokemon *)pokemon; - gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2); + gStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); if (gStorage->displayMonSpecies != SPECIES_NONE) { sanityIsBagEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG); @@ -1054,7 +1054,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode) { struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon; - gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2); + gStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES_OR_EGG); if (gStorage->displayMonSpecies != SPECIES_NONE) { u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID); diff --git a/src/pokemon_storage_system_graphics.c b/src/pokemon_storage_system_graphics.c index 9e97c0e6f..946b319d9 100644 --- a/src/pokemon_storage_system_graphics.c +++ b/src/pokemon_storage_system_graphics.c @@ -298,7 +298,7 @@ static u8 GetMonIconPriorityByCursorArea(void) void CreateMovingMonIcon(void) { u32 personality = GetMonData(&gStorage->movingMon, MON_DATA_PERSONALITY); - u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES2); + u16 species = GetMonData(&gStorage->movingMon, MON_DATA_SPECIES_OR_EGG); u8 priority = GetMonIconPriorityByCursorArea(); gStorage->movingMonSprite = CreateMonIconSprite(species, personality, 0, 0, priority, 7); @@ -318,7 +318,7 @@ static void InitBoxMonSprites(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); @@ -344,7 +344,7 @@ static void InitBoxMonSprites(u8 boxId) void CreateBoxMonIconAtPos(u8 boxPosition) { - u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { @@ -567,7 +567,7 @@ static void SetBoxSpeciesAndPersonalities(u8 boxId) { for (j = 0; j < IN_BOX_COLUMNS; j++) { - gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2); + gStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG); if (gStorage->boxSpecies[boxPosition] != SPECIES_NONE) gStorage->boxPersonalities[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY); boxPosition++; @@ -597,14 +597,14 @@ void SetBoxMonIconObjMode(u8 boxPosition, u8 objMode) void CreatePartyMonsSprites(bool8 visible) { u16 i, count; - u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG); u32 personality = GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY); gStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12); count = 1; for (i = 1; i < PARTY_SIZE; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) { personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); diff --git a/src/pokemon_storage_system_misc.c b/src/pokemon_storage_system_misc.c index 90bb93e43..9d219c7d2 100644 --- a/src/pokemon_storage_system_misc.c +++ b/src/pokemon_storage_system_misc.c @@ -400,7 +400,7 @@ static void MultiMove_DeselectRow(u8 row, u8 minColumn, u8 maxColumn) static void MultiMove_SetIconToBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY); if (species != SPECIES_NONE) @@ -414,7 +414,7 @@ static void MultiMove_SetIconToBg(u8 x, u8 y) static void MultiMove_ClearIconFromBg(u8 x, u8 y) { u8 position = x + (IN_BOX_COLUMNS * y); - u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2); + u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE) FillWindowPixelRect8Bit(gStorage->multiMoveWindowId, PIXEL_FILL(0), 24 * x, 24 * y, 32, 32); diff --git a/src/pokemon_storage_system_tasks.c b/src/pokemon_storage_system_tasks.c index 173bb14b1..e80e9fe92 100644 --- a/src/pokemon_storage_system_tasks.c +++ b/src/pokemon_storage_system_tasks.c @@ -2680,12 +2680,12 @@ static void SetPokeStorageQuestLogEvent(u8 action) if (sInPartyMenu) { box2 = TOTAL_BOXES_COUNT; - species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES2); + species2 = GetMonData(&gPlayerParty[GetBoxCursorPosition()], MON_DATA_SPECIES_OR_EGG); } else { box2 = StorageGetCurrentBox(); - species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES2); + species2 = GetCurrentBoxMonData(GetBoxCursorPosition(), MON_DATA_SPECIES_OR_EGG); } questLogData = &gStorage->pokeStorageQuestLogData; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c56f243b2..06c747214 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -2105,15 +2105,15 @@ static void BufferMonInfo(void) return; } - sMonSummaryScreen->monTypes[0] = gBaseStats[dexNum].type1; - sMonSummaryScreen->monTypes[1] = gBaseStats[dexNum].type2; + sMonSummaryScreen->monTypes[0] = gSpeciesInfo[dexNum].types[0]; + sMonSummaryScreen->monTypes[1] = gSpeciesInfo[dexNum].types[1]; GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_NICKNAME, tempStr); StringCopyN_Multibyte(sMonSummaryScreen->summary.nicknameStrBuf, tempStr, POKEMON_NAME_LENGTH); StringGet_Nickname(sMonSummaryScreen->summary.nicknameStrBuf); gender = GetMonGender(&sMonSummaryScreen->currentMon); - dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); if (gender == MON_FEMALE) StringCopy(sMonSummaryScreen->summary.genderSymbolStrBuf, gText_FemaleSymbol); @@ -2224,7 +2224,7 @@ static void BufferMonSkills(void) if (level < 100) { species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES); - expToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - exp; + expToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - exp; } ConvertIntToDecimalStringN(sMonSummaryScreen->summary.expToNextLevelStrBuf, expToNextLevel, STR_CONV_MODE_LEFT_ALIGN, 7); @@ -2646,7 +2646,7 @@ static void PokeSum_PrintTrainerMemo_Mon_HeldByOT(void) // but Japanese uses different grammar for Bold and Gentle natures. if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // Hatched { - if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter + if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) { if (PokeSum_IsMonBoldOrGentle(nature)) DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_FatefulEncounterHatched_BoldGentleGrammar); @@ -2743,7 +2743,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void) // but Japanese uses different grammar for Bold and Gentle natures. if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // hatched from an EGG { - if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter + if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) { if (PokeSum_IsMonBoldOrGentle(nature)) DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_ApparentlyFatefulEncounterHatched_BoldGentleGrammar); @@ -2797,7 +2797,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void) if (sMonSummaryScreen->monList.mons != gEnemyParty) { - if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) + if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) chosenStrIndex = 4; else { @@ -2815,7 +2815,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void) } else { - if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) + if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE) chosenStrIndex = 4; else { @@ -4014,7 +4014,7 @@ static void PokeSum_CreateMonPicSprite(void) sMonPicBounceState = AllocZeroed(sizeof(struct MonPicBounceState)); - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY); trainerId = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_OT_ID); @@ -4142,7 +4142,7 @@ static void PokeSum_CreateMonIconSprite(void) u16 species; u32 personality; - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY); SafeLoadMonIconPalette(species); @@ -4178,7 +4178,7 @@ static void PokeSum_ShowOrHideMonIconSprite(bool8 invisible) static void PokeSum_DestroyMonIconSprite(void) { u16 species; - species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2); + species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG); SafeFreeMonIconPalette(species); DestroyMonIcon(&gSprites[sMonSummaryScreen->monIconSpriteId]); } @@ -4622,8 +4622,8 @@ static void UpdateExpBarObjs(void) if (level < 100) { - totalExpToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - gExperienceTables[gBaseStats[species].growthRate][level]; - curExpToNextLevel = exp - gExperienceTables[gBaseStats[species].growthRate][level]; + totalExpToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - gExperienceTables[gSpeciesInfo[species].growthRate][level]; + curExpToNextLevel = exp - gExperienceTables[gSpeciesInfo[species].growthRate][level]; pointsPerTile = ((totalExpToNextLevel << 2) / 8); totalPoints = (curExpToNextLevel << 2); @@ -5183,9 +5183,9 @@ static void PokeSum_TryPlayMonCry(void) if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG)) { if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE) - PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_NORMAL); else - PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK); + PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_WEAK); } } diff --git a/src/rom_header_gf.c b/src/rom_header_gf.c index ee6dffcbd..60696d810 100644 --- a/src/rom_header_gf.c +++ b/src/rom_header_gf.c @@ -61,7 +61,7 @@ struct GFRomHeader u32 externalEventFlagsOffset; u32 externalEventDataOffset; u32 unk18; - const struct BaseStats * baseStats; + const struct SpeciesInfo * speciesInfo; const u8 (* abilityNames)[]; const u8 *const * abilityDescriptions; const struct Item * items; @@ -146,7 +146,7 @@ static const struct GFRomHeader sGFRomHeader = { .externalEventFlagsOffset = offsetof(struct SaveBlock1, externalEventFlags), .externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData), .unk18 = 0x00000000, - .baseStats = gBaseStats, + .speciesInfo = gSpeciesInfo, .abilityNames = gAbilityNames, .abilityDescriptions = gAbilityDescriptionPointers, .items = gItems, diff --git a/src/save.c b/src/save.c index 08b8465b7..07def36e4 100644 --- a/src/save.c +++ b/src/save.c @@ -7,6 +7,7 @@ #include "link.h" #include "save_failed_screen.h" #include "fieldmap.h" +#include "pokemon_storage_system.h" #include "gba/flash_internal.h" static u8 HandleWriteSector(u16 sectorId, const struct SaveSectorLocation *locations); diff --git a/src/scrcmd.c b/src/scrcmd.c index 12d0a9588..1e7068d3f 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -2222,21 +2222,21 @@ bool8 ScrCmd_normalmsg(struct ScriptContext * ctx) return FALSE; } -// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it. -bool8 ScrCmd_setmoneventlegal(struct ScriptContext * ctx) +// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it. +bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext * ctx) { - bool8 isEventLegal = TRUE; + bool8 isModernFatefulEncounter = TRUE; u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal); + SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter); return FALSE; } -bool8 ScrCmd_checkmoneventlegal(struct ScriptContext * ctx) +bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext * ctx) { u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); - gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL); + gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL); return FALSE; } diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 4bd5c9f22..bc11dc001 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -109,7 +109,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item) for(i = 0; i < PARTY_SIZE; i++) { - u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item) return TRUE; } diff --git a/src/trade.c b/src/trade.c index e7de8d22d..d3966b993 100644 --- a/src/trade.c +++ b/src/trade.c @@ -948,7 +948,7 @@ static void CB2_CreateTradeMenu(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { struct Pokemon * mon = &gPlayerParty[i]; - sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2), + sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i][0] * 8) + 14, (sTradeMonSpriteCoords[i][1] * 8) - 12, @@ -960,7 +960,7 @@ static void CB2_CreateTradeMenu(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { struct Pokemon * mon = &gEnemyParty[i]; - sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL), + sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, (sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14, (sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12, @@ -1145,7 +1145,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++) { sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon( - GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL), + GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, sTradeMonSpriteCoords[i][0] * 8 + 14, sTradeMonSpriteCoords[i][1] * 8 - 12, @@ -1157,7 +1157,7 @@ void CB2_ReturnToTradeMenuFromSummary(void) for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++) { sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon( - GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2, NULL), + GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG, NULL), SpriteCB_MonIcon, sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8 + 14, sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8 - 12, @@ -1964,7 +1964,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 cursor // Partner cant trade illegitimate Deoxys or Mew partnerSpecies = GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_SPECIES); if ((partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW) - && !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_EVENT_LEGAL)) + && !GetMonData(&gEnemyParty[sTradeMenu->partnerCursorPosition % PARTY_SIZE], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return PARTNER_MON_INVALID; if (hasLiveMon != 0) @@ -2747,7 +2747,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int for (i = 0; i < partyCount; i++) { - species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES2); + species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES_OR_EGG); species[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES); } @@ -2790,7 +2790,7 @@ static u32 CanTradeSelectedMon(struct Pokemon * playerParty, int partyCount, int if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW) { - if (!GetMonData(&playerParty[monIdx], MON_DATA_EVENT_LEGAL)) + if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER)) return CANT_TRADE_INVALID_MON; } @@ -2855,17 +2855,17 @@ s32 GetGameProgressForLinkTrade(void) return TRADE_BOTH_PLAYERS_READY; } -static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal) +static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter) { if (species == SPECIES_DEOXYS || species == SPECIES_MEW) { - if (!isEventLegal) + if (!isModernFatefulEncounter) return TRUE; } return FALSE; } -int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal) +int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter) { bool8 playerHasNationalDex = player.hasNationalDex; bool8 playerCanLinkNationally = player.canLinkNationally; @@ -2890,7 +2890,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf } // Cannot trade illegitimate Deoxys/Mew - if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal)) + if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter)) return UR_TRADE_MSG_MON_CANT_BE_TRADED_2; if (partnerSpecies == SPECIES_EGG) @@ -2902,8 +2902,8 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf else { // Player's Pokémon must be of the type the partner requested - if (gBaseStats[playerSpecies2].type1 != requestedType - && gBaseStats[playerSpecies2].type2 != requestedType) + if (gSpeciesInfo[playerSpecies2].types[0] != requestedType + && gSpeciesInfo[playerSpecies2].types[1] != requestedType) return UR_TRADE_MSG_NOT_MON_PARTNER_WANTS; } @@ -2933,11 +2933,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf return UR_TRADE_MSG_NONE; } -int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal) +int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter) { bool8 hasNationalDex = player.hasNationalDex; - if (IsDeoxysOrMewUntradable(species, isEventLegal)) + if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter)) return CANT_REGISTER_MON; if (hasNationalDex) diff --git a/src/trade_scene.c b/src/trade_scene.c index 47d5f191c..82c363ada 100644 --- a/src/trade_scene.c +++ b/src/trade_scene.c @@ -755,7 +755,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state) { case 0: // Load graphics - species = GetMonData(mon, MON_DATA_SPECIES2); + species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG); personality = GetMonData(mon, MON_DATA_PERSONALITY); if (whichParty == TRADE_PLAYER) @@ -883,8 +883,8 @@ void CB2_LinkTrade(void) case 10: BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK); ShowBg(0); - sTradeAnim->questLogSpecies[TRADE_PLAYER] = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES2); - sTradeAnim->questLogSpecies[TRADE_PARTNER] = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES2); + sTradeAnim->questLogSpecies[TRADE_PLAYER] = GetMonData(&gPlayerParty[gSelectedTradeMonPositions[TRADE_PLAYER]], MON_DATA_SPECIES_OR_EGG); + sTradeAnim->questLogSpecies[TRADE_PARTNER] = GetMonData(&gEnemyParty[gSelectedTradeMonPositions[TRADE_PARTNER] % PARTY_SIZE], MON_DATA_SPECIES_OR_EGG); memcpy(sTradeAnim->linkPartnerName, gLinkPlayers[GetMultiplayerId() ^ 1].name, PLAYER_NAME_LENGTH); gMain.state++; break; diff --git a/src/trainer_tower.c b/src/trainer_tower.c index fd0bc4a0a..5aa48d026 100644 --- a/src/trainer_tower.c +++ b/src/trainer_tower.c @@ -1030,7 +1030,7 @@ static s32 GetPartyMaxLevel(void) for (i = 0; i < PARTY_SIZE; i++) { - if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG) + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL) != 0 && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG) { s32 currLevel = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL); if (currLevel > topLevel) diff --git a/src/union_room.c b/src/union_room.c index 48545c01c..59a090f98 100644 --- a/src/union_room.c +++ b/src/union_room.c @@ -4002,7 +4002,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (species == SPECIES_EGG) return UR_TRADE_MATCH; } @@ -4012,8 +4012,8 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species) { for (i = 0; i < gPlayerPartyCount; i++) { - species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); - if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type) + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); + if (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type) return UR_TRADE_MATCH; } return UR_TRADE_NOTYPE; @@ -4145,7 +4145,7 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void) for (i = 0; i < gPlayerPartyCount; i++) { if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= UNION_ROOM_MAX_LEVEL - && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG) + && GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG) count++; } @@ -4174,7 +4174,7 @@ void Script_ResetUnionRoomTrade(void) static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * trade) { - trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->playerLevel = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->playerPersonality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); if (trade->playerSpecies == SPECIES_EGG) @@ -4185,7 +4185,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * tra static void RegisterTradeMon(u32 monId, struct UnionRoomTrade * trade) { - trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2); + trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG); trade->level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL); trade->personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY); } @@ -4217,7 +4217,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade * trade, u8 mul cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY); if (cur_personality != personality) continue; - cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG); if (cur_species != species) continue; response = i; From b2526bbb4810bb457ff6b82d607f635c4cad0ec0 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Fri, 10 Mar 2023 00:00:17 +0800 Subject: [PATCH 19/29] Sync src/field_door.c --- src/field_door.c | 281 ++++++++++++++++++++++++++--------------------- 1 file changed, 157 insertions(+), 124 deletions(-) diff --git a/src/field_door.c b/src/field_door.c index c2cd4e6f0..c3be102da 100644 --- a/src/field_door.c +++ b/src/field_door.c @@ -6,13 +6,20 @@ #include "constants/songs.h" #include "constants/metatile_labels.h" -#define DOOR_SOUND_NORMAL 0 -#define DOOR_SOUND_SLIDING 1 +enum { + DOOR_SOUND_NORMAL, + DOOR_SOUND_SLIDING, +}; + +enum { + DOOR_SIZE_1x1, + DOOR_SIZE_1x2, +}; struct DoorAnimFrame { u8 duration; - u16 tile; + u16 tileOffset; }; struct DoorGraphics @@ -20,17 +27,17 @@ struct DoorGraphics u16 metatileId; u8 sound; u8 size; - const u8 * tiles; - const u8 * palettes; + const u8 *tiles; + const u8 *paletteNums; }; -static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y); -static void LoadDoorFrameTiles(const u8 *a0); -static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3); -static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2); -static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data); -static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames); -static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y); +static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y); +static void CopyDoorTilesToVram(const u8 *tiles); +static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums); +static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums); +static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data); +static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames); +static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y); static const u8 sDoorAnimTiles_General[] = INCBIN_U8("graphics/door_anims/general.4bpp"); static const u16 sDoorNullPalette1[16] = {}; @@ -173,35 +180,37 @@ static const u16 sDoorNullPalette63[16] = {}; static const u8 sDoorAnimTiles_TrainerTowerRoofElevator[] = INCBIN_U8("graphics/door_anims/trainer_tower_roof_elevator.4bpp"); static const u16 sDoorNullPalette64[16] = {}; +#define CLOSED_DOOR_TILES_OFFSET 0xFFFF + static const struct DoorAnimFrame sDoorAnimFrames_OpenSmall[] = { - {4, 0xFFFF}, - {4, 0x0000}, - {4, 0x0080}, - {4, 0x0100}, + {4, CLOSED_DOOR_TILES_OFFSET}, + {4, 0 * TILE_SIZE_4BPP}, + {4, 4 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_OpenLarge[] = { - {4, 0xFFFF}, - {4, 0x0000}, - {4, 0x0100}, - {4, 0x0200}, + {4, CLOSED_DOOR_TILES_OFFSET}, + {4, 0 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 16 * TILE_SIZE_4BPP}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_CloseSmall[] = { - {4, 0x0100}, - {4, 0x0080}, - {4, 0x0000}, - {4, 0xFFFF}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 4 * TILE_SIZE_4BPP}, + {4, 0 * TILE_SIZE_4BPP}, + {4, CLOSED_DOOR_TILES_OFFSET}, {} }; static const struct DoorAnimFrame sDoorAnimFrames_CloseLarge[] = { - {4, 0x0200}, - {4, 0x0100}, - {4, 0x0000}, - {4, 0xFFFF}, + {4, 16 * TILE_SIZE_4BPP}, + {4, 8 * TILE_SIZE_4BPP}, + {4, 0 * TILE_SIZE_4BPP}, + {4, CLOSED_DOOR_TILES_OFFSET}, {} }; @@ -239,64 +248,60 @@ static const u8 sDoorAnimPalettes_TrainerTowerLobbyElevator[] = {8, 8, 2, 2, 2, static const u8 sDoorAnimPalettes_TrainerTowerRoofElevator[] = {11, 11, 2, 2, 2, 2, 2, 2}; static const struct DoorGraphics sDoorGraphics[] = { - {METATILE_General_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_General, sDoorAnimPalettes_General}, - {METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle}, - {METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble}, - {METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet}, - {METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab}, - {METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian}, - {METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter}, - {METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron}, - {METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo}, - {METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean}, - {METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender}, - {METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion}, + {METATILE_General_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_General, sDoorAnimPalettes_General}, + {METATILE_General_SlidingSingleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingSingle, sDoorAnimPalettes_SlidingSingle}, + {METATILE_General_SlidingDoubleDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SlidingDouble, sDoorAnimPalettes_SlidingDouble}, + {METATILE_PalletTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pallet, sDoorAnimPalettes_Pallet}, + {METATILE_PalletTown_OaksLabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OaksLab, sDoorAnimPalettes_OaksLab}, + {METATILE_ViridianCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Viridian, sDoorAnimPalettes_Viridian}, + {METATILE_PewterCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Pewter, sDoorAnimPalettes_Pewter}, + {METATILE_SaffronCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Saffron, sDoorAnimPalettes_Saffron}, + {METATILE_SaffronCity_SilphCoDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SilphCo, sDoorAnimPalettes_SilphCo}, + {METATILE_CeruleanCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Cerulean, sDoorAnimPalettes_Cerulean}, + {METATILE_LavenderTown_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Lavender, sDoorAnimPalettes_Lavender}, + {METATILE_VermilionCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Vermilion, sDoorAnimPalettes_Vermilion}, /* Below was presumably intended for the door to the Pokemon Fan Club. The metatile is surrounded by metatiles for the fan club building. Its animation tiles are similar to the Vermilion door above, and the building on the map uses that metatile instead. The unused tiles have the pokeball above the door in view, but on the map the pokeball above the door is too high to be in view. The metatile below was subsequently re-used for the warp to enter the SS Anne from the harbor, which has no door. */ - {METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub}, - {METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore}, - {METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia}, - {METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone}, - {METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab}, - {METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123}, - {METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, 0, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner}, - {METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter}, - {METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45}, - {METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare}, - {METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse}, - {METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, 0, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67}, - {METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator}, - {METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub}, - {METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator}, - {METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, 1, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne}, - {METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator}, - {METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter}, - {METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator}, - {METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, 1, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator}, + {METATILE_VermilionCity_SSAnneWarp, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_PokemonFanClub, sDoorAnimPalettes_PokemonFanClub}, + {METATILE_CeladonCity_DeptStoreDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_DeptStore, sDoorAnimPalettes_DeptStore}, + {METATILE_FuchsiaCity_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Fuchsia, sDoorAnimPalettes_Fuchsia}, + {METATILE_FuchsiaCity_SafariZoneDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_SafariZone, sDoorAnimPalettes_SafariZone}, + {METATILE_CinnabarIsland_LabDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_CinnabarLab, sDoorAnimPalettes_CinnabarLab}, + {METATILE_SeviiIslands123_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii123, sDoorAnimPalettes_Sevii123}, + {METATILE_SeviiIslands123_GameCornerDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x1, sDoorAnimTiles_JoyfulGameCorner, sDoorAnimPalettes_JoyfulGameCorner}, + {METATILE_SeviiIslands123_PokeCenterDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_OneIslandPokeCenter, sDoorAnimPalettes_OneIslandPokeCenter}, + {METATILE_SeviiIslands45_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii45, sDoorAnimPalettes_Sevii45}, + {METATILE_SeviiIslands45_DayCareDoor, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_FourIslandDayCare, sDoorAnimPalettes_FourIslandDayCare}, + {METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_RocketWarehouse, sDoorAnimPalettes_RocketWarehouse}, + {METATILE_SeviiIslands67_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x1, sDoorAnimTiles_Sevii67, sDoorAnimPalettes_Sevii67}, + {METATILE_DepartmentStore_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_DeptStoreElevator, sDoorAnimPalettes_DeptStoreElevator}, + {METATILE_PokemonCenter_CableClubDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_CableClub, sDoorAnimPalettes_CableClub}, + {METATILE_SilphCo_HideoutElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_HideoutElevator, sDoorAnimPalettes_HideoutElevator}, + {METATILE_SSAnne_Door, DOOR_SOUND_NORMAL, DOOR_SIZE_1x2, sDoorAnimTiles_SSAnne, sDoorAnimPalettes_SSAnne}, + {METATILE_SilphCo_ElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_SilphCoElevator, sDoorAnimPalettes_SilphCoElevator}, + {METATILE_SeaCottage_Teleporter_Door, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_Teleporter, sDoorAnimPalettes_Teleporter}, + {METATILE_TrainerTower_LobbyElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerLobbyElevator, sDoorAnimPalettes_TrainerTowerLobbyElevator}, + {METATILE_TrainerTower_RoofElevatorDoor, DOOR_SOUND_SLIDING, DOOR_SIZE_1x2, sDoorAnimTiles_TrainerTowerRoofElevator, sDoorAnimPalettes_TrainerTowerRoofElevator}, {} }; -static void UpdateDrawDoorFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) +static void DrawDoor(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y) { - if (frames->tile == 0xFFFF) - { - DrawDoorDefaultImage(gfx, x, y); - } + if (frames->tileOffset == CLOSED_DOOR_TILES_OFFSET) + DrawClosedDoorTiles(gfx, x, y); else { - LoadDoorFrameTiles(&gfx->tiles[frames->tile]); - SetDoorFramePalettes(gfx, x, y, gfx->palettes); + CopyDoorTilesToVram(&gfx->tiles[frames->tileOffset]); + DrawCurrentDoorAnimFrame(gfx, x, y, gfx->paletteNums); } } -static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y) +static void DrawClosedDoorTiles(const struct DoorGraphics *gfx, int x, int y) { - if (gfx->size == 0) - { + if (gfx->size == DOOR_SIZE_1x1) CurrentMapDrawMetatileAt(x, y); - } else { CurrentMapDrawMetatileAt(x, y); @@ -304,73 +309,91 @@ static void DrawDoorDefaultImage(const struct DoorGraphics * gfx, int x, int y) } } -static void LoadDoorFrameTiles(const u8 *a0) +// NOTE: The tiles of a door's animation must be copied to VRAM because they are +// not already part of any given tileset. This means that if there are any +// pre-existing tiles in this copied region that are visible when the door +// animation is played, they will be overwritten. +#define DOOR_TILE_START (NUM_TILES_TOTAL - 8) + +static void CopyDoorTilesToVram(const u8 *tiles) { - CpuFastCopy(a0, (void *)(BG_VRAM + 0x7F00), 0x100); + CpuFastCopy(tiles, (void *)(VRAM + TILE_OFFSET_4BPP(DOOR_TILE_START)), 8 * TILE_SIZE_4BPP); } -static void SetDoorFramePalettes(const struct DoorGraphics * gfx, int x, int y, const u8 *a3) +static void DrawCurrentDoorAnimFrame(const struct DoorGraphics *gfx, int x, int y, const u8 *paletteNums) { - u16 sp00[8]; - if (gfx->size == 0) - { - BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); - } + u16 tiles[8]; + if (gfx->size == DOOR_SIZE_1x1) + BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums); + else { - BufferDoorFrameTilesWithPalettes(sp00, 0x3F8, a3); - DrawDoorMetatileAt(x, y - 1, sp00); - BufferDoorFrameTilesWithPalettes(sp00, 0x3FC, a3 + 4); + BuildDoorTiles(tiles, DOOR_TILE_START, paletteNums); + DrawDoorMetatileAt(x, y - 1, tiles); + BuildDoorTiles(tiles, DOOR_TILE_START + 4, &paletteNums[4]); } - DrawDoorMetatileAt(x, y, sp00); + + DrawDoorMetatileAt(x, y, tiles); } -static void BufferDoorFrameTilesWithPalettes(u16 *a0, u16 a1, const u8 *a2) +static void BuildDoorTiles(u16 *tiles, u16 tileNum, const u8 *paletteNums) { int i; u16 tile; + + // Only the first 4 tiles of each metatile (bottom layer) actually use the door tiles for (i = 0; i < 4; i++) { - tile = *(a2++) << 12; - a0[i] = tile | (a1 + i); + tile = *(paletteNums++) << 12; + tiles[i] = tile | (tileNum + i); } + + // The remaining tiles (top layer) always use tile 0 (with the same palette) for (; i < 8; i++) { - tile = *(a2++) << 12; - a0[i] = tile; + tile = *(paletteNums++) << 12; + tiles[i] = tile; } } +#define tFramesHi data[0] +#define tFramesLo data[1] +#define tGfxHi data[2] +#define tGfxLo data[3] +#define tFrameId data[4] +#define tCounter data[5] +#define tX data[6] +#define tY data[7] + static void Task_AnimateDoor(u8 taskId) { - s16 *data = (void *)gTasks[taskId].data; - const struct DoorAnimFrame * frames = (const void *)(((u16)data[0] << 16) | (u16)data[1]); - const struct DoorGraphics * gfx = (const void *)(((u16)data[2] << 16) | (u16)data[3]); - if (!PlayDoorAnimationFrame(gfx, frames, data)) + s16 *data = gTasks[taskId].data; + const struct DoorAnimFrame *frames = (struct DoorAnimFrame *)((u16)tFramesHi << 16 | (u16)tFramesLo); + const struct DoorGraphics *gfx = (struct DoorGraphics *)((u16)tGfxHi << 16 | (u16)tGfxLo); + if (!AnimateDoorFrame(gfx, frames, data)) DestroyTask(taskId); } -static bool32 PlayDoorAnimationFrame(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, s16 *data) +static bool32 AnimateDoorFrame(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, s16 *data) { - if (data[5] == 0) + if (tCounter == 0) + DrawDoor(gfx, &frames[tFrameId], tX, tY); + + if (tCounter == frames[tFrameId].duration) { - UpdateDrawDoorFrame(gfx, &frames[data[4]], data[6], data[7]); - } - if (data[5] == frames[data[4]].duration) - { - data[5] = 0; - data[4]++; - if (frames[data[4]].duration == 0) + tCounter = 0; + tFrameId++; + if (frames[tFrameId].duration == 0) // final frame has been reached return FALSE; + else + return TRUE; } - else - { - data[5]++; - } + + tCounter++; return TRUE; } -static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * gfx, u16 id) +static const struct DoorGraphics *GetDoorGraphics(const struct DoorGraphics *gfx, u16 id) { while (gfx->tiles != NULL) { @@ -381,7 +404,7 @@ static const struct DoorGraphics * GetDoorGraphics(const struct DoorGraphics * g return NULL; } -static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct DoorAnimFrame * frames, int x, int y) +static s8 StartDoorAnimationTask(const struct DoorGraphics *gfx, const struct DoorAnimFrame *frames, int x, int y) { u8 taskId; s16 *data; @@ -391,53 +414,63 @@ static s8 StartDoorAnimationTask(const struct DoorGraphics * gfx, const struct D taskId = CreateTask(Task_AnimateDoor, 80); data = gTasks[taskId].data; - data[6] = x; - data[7] = y; - data[1] = (uintptr_t)frames; - data[0] = (uintptr_t)frames >> 16; - data[3] = (uintptr_t)gfx; - data[2] = (uintptr_t)gfx >> 16; + tX = x; + tY = y; + tFramesLo = (uintptr_t)frames; + tFramesHi = (uintptr_t)frames >> 16; + tGfxLo = (uintptr_t)gfx; + tGfxHi = (uintptr_t)gfx >> 16; return taskId; } -static void DrawClosedDoor(const struct DoorGraphics * gfx, int x, int y) +#undef tFramesHi +#undef tFramesLo +#undef tGfxHi +#undef tGfxLo +#undef tFrameId +#undef tCounter +#undef tX +#undef tY + +static void DrawClosedDoor(const struct DoorGraphics *gfx, int x, int y) { - DrawDoorDefaultImage(gfx, x, y); + DrawClosedDoorTiles(gfx, x, y); } -static void DrawOpenedDoor(const struct DoorGraphics * gfx, int x, int y) +static void DrawOpenedDoor(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx != NULL) { - UpdateDrawDoorFrame(gfx, SeekToEndOfDoorAnim(gfx->size == 0 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge), x, y); + const struct DoorAnimFrame *frames = gfx->size == DOOR_SIZE_1x1 ? sDoorAnimFrames_OpenSmall : sDoorAnimFrames_OpenLarge; + DrawDoor(gfx, GetLastDoorAnimFrame(frames), x, y); } } -static const struct DoorAnimFrame * SeekToEndOfDoorAnim(const struct DoorAnimFrame * frames) +static const struct DoorAnimFrame *GetLastDoorAnimFrame(const struct DoorAnimFrame *frames) { while (frames->duration != 0) frames++; return frames - 1; } -static s8 AnimateDoorOpenInternal(const struct DoorGraphics * gfx, int x, int y) +static s8 AnimateDoorOpenInternal(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) return -1; - else if (gfx->size == 0) + else if (gfx->size == DOOR_SIZE_1x1) return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenSmall, x, y); else return StartDoorAnimationTask(gfx, sDoorAnimFrames_OpenLarge, x, y); } -static s8 AnimateDoorCloseInternal(const struct DoorGraphics * gfx, int x, int y) +static s8 StartDoorCloseAnimation(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) return -1; - else if (gfx->size == 0) + else if (gfx->size == DOOR_SIZE_1x1) return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseSmall, x, y); else return StartDoorAnimationTask(gfx, sDoorAnimFrames_CloseLarge, x, y); @@ -459,7 +492,7 @@ s8 FieldAnimateDoorClose(int x, int y) { if (!MetatileBehavior_IsWarpDoor_2(MapGridGetMetatileBehaviorAt((s16)x, (s16)y))) return -1; - return AnimateDoorCloseInternal(sDoorGraphics, x, y); + return StartDoorCloseAnimation(sDoorGraphics, x, y); } s8 FieldAnimateDoorOpen(int x, int y) @@ -482,7 +515,7 @@ u16 GetDoorSoundEffect(int x, int y) return SE_SLIDING_DOOR; } -static s8 GetDoorSoundType(const struct DoorGraphics * gfx, int x, int y) +static s8 GetDoorSoundType(const struct DoorGraphics *gfx, int x, int y) { gfx = GetDoorGraphics(gfx, MapGridGetMetatileIdAt(x, y)); if (gfx == NULL) From 242bb41682fe76e7e348fcd1c4232dd47c795db5 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Sat, 11 Mar 2023 23:57:01 +0800 Subject: [PATCH 20/29] Document src/graphics.c --- .../backgrounds/solarbeam.bin} | Bin .../unused/lights.bin} | Bin .../unused/lights.png} | Bin .../audience.bin} | Bin .../curtain.bin} | Bin .../interface.bin} | Bin .../interface.pal} | 0 graphics/contest/{misc.png => interface.png} | Bin .../japanese/audience.bin} | Bin .../japanese/audience.png} | Bin .../japanese/bg.bin} | Bin .../japanese/classes.png} | Bin .../japanese/floor.png} | Bin .../japanese/frame_1.png} | Bin .../japanese/frame_2.png} | Bin .../japanese/interface.bin} | Bin .../japanese/interface.png} | Bin .../japanese/meter.png} | Bin .../{unused => contest/japanese}/numbers.png | Bin .../japanese/numbers_2.png} | Bin .../japanese/palette.pal} | 0 .../{misc_2.png => japanese/results.png} | Bin .../japanese/symbols.png} | Bin .../japanese/voltage.png} | Bin .../japanese/windows.bin} | Bin graphics/contest/{misc.pal => results.pal} | 0 .../{misc_2_tilemap_3.bin => results_bg.bin} | Bin ..._2_tilemap_2.bin => results_interface.bin} | Bin ...ilemap_1.bin => results_winner_banner.bin} | Bin .../contest/{heart.png => slider_heart.png} | Bin .../pokemon/hitmontop/unused_garbage.bin | Bin graphics/unknown/unknown_D12A44.png | Bin 84 -> 0 bytes graphics/unknown/unknown_D12A64.png | Bin 95 -> 0 bytes graphics/unknown/unknown_EAFF60.pal | 51 ------------- graphics/unknown/unused_window.png | Bin 608 -> 0 bytes graphics_file_rules.mk | 21 ++--- src/data/graphics/pokemon.h | 2 +- src/graphics.c | 72 ++++++++---------- src/pokemon_special_anim_scene.c | 2 +- 39 files changed, 44 insertions(+), 104 deletions(-) rename graphics/{unknown/unknown_E7CFB0.bin => battle_anims/backgrounds/solarbeam.bin} (100%) rename graphics/{unknown/unknown_D1BE74.bin => battle_anims/unused/lights.bin} (100%) rename graphics/{unknown/unknown_D1BE74.png => battle_anims/unused/lights.png} (100%) rename graphics/{unused/old_contest_2.bin => contest/audience.bin} (100%) rename graphics/{unknown/unknown_D17AB8.bin => contest/curtain.bin} (100%) rename graphics/{unknown/unknown_D172A8.bin => contest/interface.bin} (100%) rename graphics/{unused/old_contest_2.pal => contest/interface.pal} (100%) rename graphics/contest/{misc.png => interface.png} (100%) rename graphics/{unknown/unknown_D17654.bin => contest/japanese/audience.bin} (100%) rename graphics/{unused/old_contest_2_2.png => contest/japanese/audience.png} (100%) rename graphics/{unused/old_contest.bin => contest/japanese/bg.bin} (100%) rename graphics/{unused/old_contest_classes.png => contest/japanese/classes.png} (100%) rename graphics/{unused/old_contest_floor.png => contest/japanese/floor.png} (100%) rename graphics/{unused/old_contest_frame_1.png => contest/japanese/frame_1.png} (100%) rename graphics/{unused/old_contest_frame_2.png => contest/japanese/frame_2.png} (100%) rename graphics/{unknown/unknown_D17548.bin => contest/japanese/interface.bin} (100%) rename graphics/{unused/old_contest_2_1.png => contest/japanese/interface.png} (100%) rename graphics/{unused/old_contest_meter.png => contest/japanese/meter.png} (100%) rename graphics/{unused => contest/japanese}/numbers.png (100%) rename graphics/{unused/old_contest_numbers.png => contest/japanese/numbers_2.png} (100%) rename graphics/{unused/old_contest.pal => contest/japanese/palette.pal} (100%) rename graphics/contest/{misc_2.png => japanese/results.png} (100%) rename graphics/{unused/old_contest_symbols.png => contest/japanese/symbols.png} (100%) rename graphics/{unknown/unknown_D196E4.png => contest/japanese/voltage.png} (100%) rename graphics/{unknown/unknown_D15BE8.bin => contest/japanese/windows.bin} (100%) rename graphics/contest/{misc.pal => results.pal} (100%) rename graphics/contest/{misc_2_tilemap_3.bin => results_bg.bin} (100%) rename graphics/contest/{misc_2_tilemap_2.bin => results_interface.bin} (100%) rename graphics/contest/{misc_2_tilemap_1.bin => results_winner_banner.bin} (100%) rename graphics/contest/{heart.png => slider_heart.png} (100%) rename data/garbage_8DD2290.bin => graphics/pokemon/hitmontop/unused_garbage.bin (100%) delete mode 100644 graphics/unknown/unknown_D12A44.png delete mode 100644 graphics/unknown/unknown_D12A64.png delete mode 100644 graphics/unknown/unknown_EAFF60.pal delete mode 100644 graphics/unknown/unused_window.png diff --git a/graphics/unknown/unknown_E7CFB0.bin b/graphics/battle_anims/backgrounds/solarbeam.bin similarity index 100% rename from graphics/unknown/unknown_E7CFB0.bin rename to graphics/battle_anims/backgrounds/solarbeam.bin diff --git a/graphics/unknown/unknown_D1BE74.bin b/graphics/battle_anims/unused/lights.bin similarity index 100% rename from graphics/unknown/unknown_D1BE74.bin rename to graphics/battle_anims/unused/lights.bin diff --git a/graphics/unknown/unknown_D1BE74.png b/graphics/battle_anims/unused/lights.png similarity index 100% rename from graphics/unknown/unknown_D1BE74.png rename to graphics/battle_anims/unused/lights.png diff --git a/graphics/unused/old_contest_2.bin b/graphics/contest/audience.bin similarity index 100% rename from graphics/unused/old_contest_2.bin rename to graphics/contest/audience.bin diff --git a/graphics/unknown/unknown_D17AB8.bin b/graphics/contest/curtain.bin similarity index 100% rename from graphics/unknown/unknown_D17AB8.bin rename to graphics/contest/curtain.bin diff --git a/graphics/unknown/unknown_D172A8.bin b/graphics/contest/interface.bin similarity index 100% rename from graphics/unknown/unknown_D172A8.bin rename to graphics/contest/interface.bin diff --git a/graphics/unused/old_contest_2.pal b/graphics/contest/interface.pal similarity index 100% rename from graphics/unused/old_contest_2.pal rename to graphics/contest/interface.pal diff --git a/graphics/contest/misc.png b/graphics/contest/interface.png similarity index 100% rename from graphics/contest/misc.png rename to graphics/contest/interface.png diff --git a/graphics/unknown/unknown_D17654.bin b/graphics/contest/japanese/audience.bin similarity index 100% rename from graphics/unknown/unknown_D17654.bin rename to graphics/contest/japanese/audience.bin diff --git a/graphics/unused/old_contest_2_2.png b/graphics/contest/japanese/audience.png similarity index 100% rename from graphics/unused/old_contest_2_2.png rename to graphics/contest/japanese/audience.png diff --git a/graphics/unused/old_contest.bin b/graphics/contest/japanese/bg.bin similarity index 100% rename from graphics/unused/old_contest.bin rename to graphics/contest/japanese/bg.bin diff --git a/graphics/unused/old_contest_classes.png b/graphics/contest/japanese/classes.png similarity index 100% rename from graphics/unused/old_contest_classes.png rename to graphics/contest/japanese/classes.png diff --git a/graphics/unused/old_contest_floor.png b/graphics/contest/japanese/floor.png similarity index 100% rename from graphics/unused/old_contest_floor.png rename to graphics/contest/japanese/floor.png diff --git a/graphics/unused/old_contest_frame_1.png b/graphics/contest/japanese/frame_1.png similarity index 100% rename from graphics/unused/old_contest_frame_1.png rename to graphics/contest/japanese/frame_1.png diff --git a/graphics/unused/old_contest_frame_2.png b/graphics/contest/japanese/frame_2.png similarity index 100% rename from graphics/unused/old_contest_frame_2.png rename to graphics/contest/japanese/frame_2.png diff --git a/graphics/unknown/unknown_D17548.bin b/graphics/contest/japanese/interface.bin similarity index 100% rename from graphics/unknown/unknown_D17548.bin rename to graphics/contest/japanese/interface.bin diff --git a/graphics/unused/old_contest_2_1.png b/graphics/contest/japanese/interface.png similarity index 100% rename from graphics/unused/old_contest_2_1.png rename to graphics/contest/japanese/interface.png diff --git a/graphics/unused/old_contest_meter.png b/graphics/contest/japanese/meter.png similarity index 100% rename from graphics/unused/old_contest_meter.png rename to graphics/contest/japanese/meter.png diff --git a/graphics/unused/numbers.png b/graphics/contest/japanese/numbers.png similarity index 100% rename from graphics/unused/numbers.png rename to graphics/contest/japanese/numbers.png diff --git a/graphics/unused/old_contest_numbers.png b/graphics/contest/japanese/numbers_2.png similarity index 100% rename from graphics/unused/old_contest_numbers.png rename to graphics/contest/japanese/numbers_2.png diff --git a/graphics/unused/old_contest.pal b/graphics/contest/japanese/palette.pal similarity index 100% rename from graphics/unused/old_contest.pal rename to graphics/contest/japanese/palette.pal diff --git a/graphics/contest/misc_2.png b/graphics/contest/japanese/results.png similarity index 100% rename from graphics/contest/misc_2.png rename to graphics/contest/japanese/results.png diff --git a/graphics/unused/old_contest_symbols.png b/graphics/contest/japanese/symbols.png similarity index 100% rename from graphics/unused/old_contest_symbols.png rename to graphics/contest/japanese/symbols.png diff --git a/graphics/unknown/unknown_D196E4.png b/graphics/contest/japanese/voltage.png similarity index 100% rename from graphics/unknown/unknown_D196E4.png rename to graphics/contest/japanese/voltage.png diff --git a/graphics/unknown/unknown_D15BE8.bin b/graphics/contest/japanese/windows.bin similarity index 100% rename from graphics/unknown/unknown_D15BE8.bin rename to graphics/contest/japanese/windows.bin diff --git a/graphics/contest/misc.pal b/graphics/contest/results.pal similarity index 100% rename from graphics/contest/misc.pal rename to graphics/contest/results.pal diff --git a/graphics/contest/misc_2_tilemap_3.bin b/graphics/contest/results_bg.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_3.bin rename to graphics/contest/results_bg.bin diff --git a/graphics/contest/misc_2_tilemap_2.bin b/graphics/contest/results_interface.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_2.bin rename to graphics/contest/results_interface.bin diff --git a/graphics/contest/misc_2_tilemap_1.bin b/graphics/contest/results_winner_banner.bin similarity index 100% rename from graphics/contest/misc_2_tilemap_1.bin rename to graphics/contest/results_winner_banner.bin diff --git a/graphics/contest/heart.png b/graphics/contest/slider_heart.png similarity index 100% rename from graphics/contest/heart.png rename to graphics/contest/slider_heart.png diff --git a/data/garbage_8DD2290.bin b/graphics/pokemon/hitmontop/unused_garbage.bin similarity index 100% rename from data/garbage_8DD2290.bin rename to graphics/pokemon/hitmontop/unused_garbage.bin diff --git a/graphics/unknown/unknown_D12A44.png b/graphics/unknown/unknown_D12A44.png deleted file mode 100644 index 96c49a9921532eab55692b37e4706470431ff0ab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=X-^l&5RRG2JF1iZ)w8WR!Y2^8 g@1OnQx99%YFa4JZ-r>mdKI;Vst02iGY5dZ)H diff --git a/graphics/unknown/unknown_D12A64.png b/graphics/unknown/unknown_D12A64.png deleted file mode 100644 index 1a82e117e5bad43c802509335c7d2703214067a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^5zopr0C)ZztpET3 diff --git a/graphics/unknown/unknown_EAFF60.pal b/graphics/unknown/unknown_EAFF60.pal deleted file mode 100644 index ea7e6ddbf..000000000 --- a/graphics/unknown/unknown_EAFF60.pal +++ /dev/null @@ -1,51 +0,0 @@ -JASC-PAL -0100 -48 -0 0 0 -148 222 164 -164 230 172 -180 238 189 -197 246 205 -213 255 222 -238 255 238 -255 255 255 -189 65 255 -255 255 255 -123 123 123 -255 0 255 -246 238 205 -139 123 74 -180 189 189 -255 255 255 -0 0 255 -164 172 172 -98 106 115 -123 131 139 -139 148 156 -115 156 189 -156 189 222 -148 222 164 -180 164 115 -205 189 148 -213 205 172 -230 222 189 -246 238 205 -139 123 74 -74 131 189 -65 74 90 -98 172 180 -41 41 57 -213 213 222 -205 205 205 -238 238 238 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/unknown/unused_window.png b/graphics/unknown/unused_window.png deleted file mode 100644 index 73086d4d2c01768222d8a12bd518fe74fcd6f71c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 608 zcmV-m0-ybfP)s=E8Ewg*Uws;;ZL4K?9CGiZFOm1T268DS!egKsyPfnoxicc;a6a0a~Ctf?psKxj(qv!M*iz`L$`- z+`(N2xy!KS=7sLwAq&~%Lepp!GFjN&JLI3ayLYg;gXR3(p_e~|bBA93aAxjs>?D&r zc=>~L-utn~>Cd5_e(jLXIf2a`EOuH+?tlWx9Z+CPI0179DnRZ)1;`x&!c-H&_wB0+ z`NhIFLjen$J6O)o9Zv2fn>$$IUT`f6{=vT`L7C-L*uPu}@f6gRkcGenBE}1m$gQE? u>&=2Zt>k&fB6LSsy!x$Dd?6CKH@*O#xH);E&>e~Z0000 $@ -$(UNUSEDGFXDIR)/old_contest.4bpp: $(UNUSEDGFXDIR)/old_contest_frame_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_floor.4bpp \ - $(UNUSEDGFXDIR)/old_contest_frame_2.4bpp \ - $(UNUSEDGFXDIR)/old_contest_symbols.4bpp \ - $(UNUSEDGFXDIR)/old_contest_meter.4bpp \ - $(UNUSEDGFXDIR)/old_contest_classes.4bpp \ - $(UNUSEDGFXDIR)/old_contest_numbers.4bpp +$(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \ + $(JPCONTESTGFXDIR)/floor.4bpp \ + $(JPCONTESTGFXDIR)/frame_2.4bpp \ + $(JPCONTESTGFXDIR)/symbols.4bpp \ + $(JPCONTESTGFXDIR)/meter.4bpp \ + $(JPCONTESTGFXDIR)/classes.4bpp \ + $(JPCONTESTGFXDIR)/numbers_2.4bpp @cat $^ >$@ -$(UNUSEDGFXDIR)/old_contest_2.4bpp: $(UNUSEDGFXDIR)/old_contest_2_1.4bpp \ - $(UNUSEDGFXDIR)/old_contest_2_2.4bpp +$(JPCONTESTGFXDIR)/composite_2.4bpp: $(JPCONTESTGFXDIR)/interface.4bpp \ + $(JPCONTESTGFXDIR)/audience.4bpp @cat $^ >$@ -$(UNKNOWNGFXDIR)/unknown_D196E4.4bpp: %.4bpp: %.png +$(JPCONTESTGFXDIR)/voltage.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 36 -Wnum_tiles $(BTLANMSPRGFXDIR)/ice_crystals.4bpp: $(BTLANMSPRGFXDIR)/ice_crystals_0.4bpp \ diff --git a/src/data/graphics/pokemon.h b/src/data/graphics/pokemon.h index bdf780908..e744f80e0 100644 --- a/src/data/graphics/pokemon.h +++ b/src/data/graphics/pokemon.h @@ -1658,7 +1658,7 @@ const u32 gMonShinyPalette_Hitmontop[] = INCBIN_U32("graphics/pokemon/hitmontop/ const u8 gMonIcon_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/icon.4bpp"); // This might be undefined memory garbage. Its all 00s except for 1 0F. Its also not referenced. -const u32 gUndefined_8DD1E90[] = INCBIN_U32("data/garbage_8DD2290.bin"); +const u32 gUnusedGarbage[] = INCBIN_U32("graphics/pokemon/hitmontop/unused_garbage.bin"); const u8 gMonFootprint_Hitmontop[] = INCBIN_U8("graphics/pokemon/hitmontop/footprint.1bpp"); diff --git a/src/graphics.c b/src/graphics.c index 4eab25e87..01ed0161b 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -413,50 +413,41 @@ const u32 gBattleAnimSpritePal_BlueFlames[] = INCBIN_U32("graphics/battle_anims/ const u32 gBattleAnimSpriteGfx_BlueFlames2[] = INCBIN_U32("graphics/battle_anims/sprites/blue_flames_2.4bpp.lz"); -// Contest +// Contest (unused) -const u32 gUnusedGfx_OldContest[] = INCBIN_U32("graphics/unused/old_contest.4bpp.lz"); -const u32 gUnusedPal_OldContest[] = INCBIN_U32("graphics/unused/old_contest.gbapal.lz"); -const u32 gUnusedTilemap_OldContest[] = INCBIN_U32("graphics/unused/old_contest.bin.lz"); +const u32 gJpContest_Gfx1[] = INCBIN_U32("graphics/contest/japanese/composite_1.4bpp.lz"); +const u32 gJpContest_Pal[] = INCBIN_U32("graphics/contest/japanese/palette.gbapal.lz"); +const u32 gJpContest_Bg_Tilemap[] = INCBIN_U32("graphics/contest/japanese/bg.bin.lz"); +const u32 gJpContest_Windows_Tilemap[] = INCBIN_U32("graphics/contest/japanese/windows.bin.lz"); +const u32 gJpContest_Numbers_Gfx[] = INCBIN_U32("graphics/contest/japanese/numbers.4bpp.lz"); +const u32 gJpContest_Numbers_Pal[] = INCBIN_U32("graphics/contest/japanese/numbers.gbapal.lz"); +const u32 gJpContest_Gfx2[] = INCBIN_U32("graphics/contest/japanese/composite_2.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D15BE8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D15BE8.bin.lz"); +const u32 gContest_Interface_Pal[] = INCBIN_U32("graphics/contest/interface.gbapal.lz"); +const u32 gContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/audience.bin.lz"); +const u32 gContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/interface.bin.lz"); -const u32 gFile_graphics_unused_numbers_sheet[] = INCBIN_U32("graphics/unused/numbers.4bpp.lz"); // From ruby -const u32 gFile_graphics_unused_numbers_palette[] = INCBIN_U32("graphics/unused/numbers.gbapal.lz"); // From ruby +const u32 gJpContest_Interface_Tilemap[] = INCBIN_U32("graphics/contest/japanese/interface.bin.lz"); +const u32 gJpContest_Audience_Tilemap[] = INCBIN_U32("graphics/contest/japanese/audience.bin.lz"); -const u32 gUnusedGfx_OldContest2[] = INCBIN_U32("graphics/unused/old_contest_2.4bpp.lz"); -const u32 gOldContestPalette[] = INCBIN_U32("graphics/unused/old_contest_2.gbapal.lz"); -const u32 gOldContestGfx[] = INCBIN_U32("graphics/unused/old_contest_2.bin.lz"); +const u32 gContest_Curtain_Tilemap[] = INCBIN_U32("graphics/contest/curtain.bin.lz"); +const u32 gContest_Interface_Gfx[] = INCBIN_U32("graphics/contest/interface.4bpp.lz"); +const u32 gContest_Audience_Gfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); +const u32 gContest_Faces_Gfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); +const u32 gContest_JudgeSymbols_Gfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); +const u32 gContest_JudgeSymbols_Pal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); +const u8 gContest_SliderHeart_Gfx[] = INCBIN_U8("graphics/contest/slider_heart.4bpp"); -const u32 gFile_graphics_unknown_unknown_D172A8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D172A8.bin.lz"); +const u32 gJpContest_Voltage_Gfx[] = INCBIN_U32("graphics/contest/japanese/voltage.4bpp.lz"); +const u32 gJpContest_Voltage_Pal[] = INCBIN_U32("graphics/contest/japanese/voltage.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D17548_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17548.bin.lz"); +const u32 gJpContestResults_Gfx[] = INCBIN_U32("graphics/contest/japanese/results.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D17654_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17654.bin.lz"); +const u32 gContestResults_WinnerBanner_Tilemap[] = INCBIN_U32("graphics/contest/results_winner_banner.bin.lz"); +const u32 gContestResults_Interface_Tilemap[] = INCBIN_U32("graphics/contest/results_interface.bin.lz"); +const u32 gContestResults_Bg_Tilemap[] = INCBIN_U32("graphics/contest/results_bg.bin.lz"); +const u32 gContestResults_Pal[] = INCBIN_U32("graphics/contest/results.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D17AB8_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D17AB8.bin.lz"); - -const u32 gContestMiscGfx[] = INCBIN_U32("graphics/contest/misc.4bpp.lz"); - -const u32 gContestAudienceGfx[] = INCBIN_U32("graphics/contest/audience.4bpp.lz"); - -const u32 gContestFacesSheetGfx[] = INCBIN_U32("graphics/contest/faces.4bpp.lz"); - -const u32 gContestJudgeSymbolsGfx[] = INCBIN_U32("graphics/contest/judge_symbols.4bpp.lz"); -const u32 gContestJudgeSymbolsPal[] = INCBIN_U32("graphics/contest/judge_symbols.gbapal.lz"); - -const u8 gContestHeartGfx[] = INCBIN_U8("graphics/contest/heart.4bpp"); - -const u32 gFile_graphics_unknown_unknown_D196E4_sheet[] = INCBIN_U32("graphics/unknown/unknown_D196E4.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D196E4_palette[] = INCBIN_U32("graphics/unknown/unknown_D196E4.gbapal.lz"); - -const u32 gContestMisc2Gfx[] = INCBIN_U32("graphics/contest/misc_2.4bpp.lz"); - -const u32 gContestMiscTilemap1[] = INCBIN_U32("graphics/contest/misc_2_tilemap_1.bin.lz"); -const u32 gContestMiscTilemap2[] = INCBIN_U32("graphics/contest/misc_2_tilemap_2.bin.lz"); -const u32 gContestMiscTilemap3[] = INCBIN_U32("graphics/contest/misc_2_tilemap_3.bin.lz"); - -const u32 gContestMiscPal[] = INCBIN_U32("graphics/contest/misc.gbapal.lz"); const u32 gBattleAnimSpriteGfx_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.4bpp.lz"); const u32 gBattleAnimSpritePal_Impact[] = INCBIN_U32("graphics/battle_anims/sprites/impact.gbapal.lz"); @@ -532,9 +523,9 @@ const u32 gBattleAnimSpritePal_RazorLeaf[] = INCBIN_U32("graphics/battle_anims/s const u32 gBattleAnimSpriteGfx_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.4bpp.lz"); const u32 gBattleAnimSpritePal_MistCloud[] = INCBIN_U32("graphics/battle_anims/sprites/mist_cloud.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_sheet[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.4bpp.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_palette[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.gbapal.lz"); -const u32 gFile_graphics_unknown_unknown_D1BE74_tilemap[] = INCBIN_U32("graphics/unknown/unknown_D1BE74.bin.lz"); +const u32 gBattleAnimUnusedGfx_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.4bpp.lz"); +const u32 gBattleAnimUnusedPal_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.gbapal.lz"); +const u32 gBattleAnimUnusedTilemap_Lights[] = INCBIN_U32("graphics/battle_anims/unused/lights.bin.lz"); const u32 gBattleAnimSpriteGfx_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.4bpp.lz"); const u32 gBattleAnimSpritePal_WhirlwindLines[] = INCBIN_U32("graphics/battle_anims/sprites/whirlwind_lines.gbapal.lz"); @@ -1011,8 +1002,7 @@ const u32 gBattleAnimBgTilemap_Ghost[] = INCBIN_U32("graphics/battle_anims/backg const u32 gBattleAnimSpritePal_WhipHit[] = INCBIN_U32("graphics/battle_anims/sprites/whip_hit.gbapal.lz"); const u32 gBattleAnimBgPalette_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.gbapal.lz"); - -const u32 gFile_graphics_unknown_unknown_E7CFB0_tilemap[] = INCBIN_U32("graphics/unknown/unknown_E7CFB0.bin.lz"); +const u32 gBattleAnimBgTilemap_SolarBeam[] = INCBIN_U32("graphics/battle_anims/backgrounds/solarbeam.bin.lz"); // Unused const u32 gFile_graphics_berry_blender_center_sheet[] = INCBIN_U32("graphics/berry_blender/center.8bpp.lz"); diff --git a/src/pokemon_special_anim_scene.c b/src/pokemon_special_anim_scene.c index a2e58d761..e88399ea2 100644 --- a/src/pokemon_special_anim_scene.c +++ b/src/pokemon_special_anim_scene.c @@ -98,7 +98,7 @@ static const u8 *const s1_2_and_Poof_textPtrs[] = { gText_Poof, }; -static const u16 sUnref_84599A4[] = { +static const u16 sUnusedArray[] = { 0, 16, 68 }; From 55e9b04e64ae5529353f45e786d3ef0baf8d8bae Mon Sep 17 00:00:00 2001 From: GriffinR Date: Sat, 11 Mar 2023 11:25:18 -0500 Subject: [PATCH 21/29] Add missing task data define use --- src/field_poison.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/field_poison.c b/src/field_poison.c index 34640489e..ddba9b255 100644 --- a/src/field_poison.c +++ b/src/field_poison.c @@ -62,7 +62,7 @@ static void Task_TryFieldPoisonWhiteOut(u8 taskId) { FaintFromFieldPoison(tPartyId); ShowFieldMessage(gText_PkmnFainted3); - data[0]++; + tState++; return; } } From 7a322ba04e1293719a3ca9b6be19e25ae351203a Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Mon, 13 Mar 2023 23:09:19 +0800 Subject: [PATCH 22/29] Document more of src/graphics.c --- ...unknown_D2EC24.bin => unused_level_up.bin} | Bin ...unknown_D2EC24.png => unused_level_up.png} | Bin ...ner_memo_pal1.pal => trainer_memo_pal.pal} | 34 +++++++++++++++++- graphics/interface/trainer_memo_pal2.pal | 19 ---------- graphics/interface/trainer_memo_pal3.pal | 19 ---------- .../item_menu/{bag_tilemap1.bin => bg.bin} | Bin graphics/item_menu/{bag_tiles.png => bg.png} | Bin .../{bag_tilemap2.bin => bg_item_pc.bin} | Bin graphics/teachy_tv/border.png | Bin 0 -> 307 bytes graphics/unknown/unknown_E861A8.bin | Bin 512 -> 0 bytes .../gray_palette.pal} | 0 .../red_palette.pal} | 0 graphics_file_rules.mk | 4 +-- include/graphics.h | 6 ++-- src/graphics.c | 23 +++++------- src/item_menu.c | 6 ++-- src/pokemon_summary_screen.c | 20 +++++------ 17 files changed, 60 insertions(+), 71 deletions(-) rename graphics/battle_anims/masks/{unknown_D2EC24.bin => unused_level_up.bin} (100%) rename graphics/battle_anims/masks/{unknown_D2EC24.png => unused_level_up.png} (100%) rename graphics/interface/{trainer_memo_pal1.pal => trainer_memo_pal.pal} (71%) delete mode 100644 graphics/interface/trainer_memo_pal2.pal delete mode 100644 graphics/interface/trainer_memo_pal3.pal rename graphics/item_menu/{bag_tilemap1.bin => bg.bin} (100%) rename graphics/item_menu/{bag_tiles.png => bg.png} (100%) rename graphics/item_menu/{bag_tilemap2.bin => bg_item_pc.bin} (100%) create mode 100644 graphics/teachy_tv/border.png delete mode 100644 graphics/unknown/unknown_E861A8.bin rename graphics/{unknown/unknown_E87010.pal => unused/gray_palette.pal} (100%) rename graphics/{unknown/unknown_E9BD08.pal => unused/red_palette.pal} (100%) diff --git a/graphics/battle_anims/masks/unknown_D2EC24.bin b/graphics/battle_anims/masks/unused_level_up.bin similarity index 100% rename from graphics/battle_anims/masks/unknown_D2EC24.bin rename to graphics/battle_anims/masks/unused_level_up.bin diff --git a/graphics/battle_anims/masks/unknown_D2EC24.png b/graphics/battle_anims/masks/unused_level_up.png similarity index 100% rename from graphics/battle_anims/masks/unknown_D2EC24.png rename to graphics/battle_anims/masks/unused_level_up.png diff --git a/graphics/interface/trainer_memo_pal1.pal b/graphics/interface/trainer_memo_pal.pal similarity index 71% rename from graphics/interface/trainer_memo_pal1.pal rename to graphics/interface/trainer_memo_pal.pal index 44fe49317..a574f8c50 100644 --- a/graphics/interface/trainer_memo_pal1.pal +++ b/graphics/interface/trainer_memo_pal.pal @@ -1,6 +1,6 @@ JASC-PAL 0100 -80 +112 255 0 255 0 123 197 230 222 156 @@ -81,3 +81,35 @@ JASC-PAL 123 131 148 255 255 255 98 106 123 +255 0 255 +255 255 255 +230 230 238 +106 230 230 +98 106 123 +90 213 213 +230 205 255 +205 172 238 +255 0 255 +255 0 255 +255 255 255 +213 213 213 +222 222 222 +230 230 230 +246 246 246 +246 246 246 +255 0 255 +0 123 197 +230 222 156 +230 205 255 +0 74 148 +123 156 156 +197 189 115 +106 197 205 +106 230 230 +90 213 213 +205 172 238 +180 139 213 +255 180 0 +123 131 148 +255 255 255 +98 106 123 diff --git a/graphics/interface/trainer_memo_pal2.pal b/graphics/interface/trainer_memo_pal2.pal deleted file mode 100644 index 22efdfee5..000000000 --- a/graphics/interface/trainer_memo_pal2.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 0 255 -255 255 255 -230 230 238 -106 230 230 -98 106 123 -90 213 213 -230 205 255 -205 172 238 -255 0 255 -255 0 255 -255 255 255 -213 213 213 -222 222 222 -230 230 230 -246 246 246 -246 246 246 diff --git a/graphics/interface/trainer_memo_pal3.pal b/graphics/interface/trainer_memo_pal3.pal deleted file mode 100644 index 7f6927b5f..000000000 --- a/graphics/interface/trainer_memo_pal3.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 0 255 -0 123 197 -230 222 156 -230 205 255 -0 74 148 -123 156 156 -197 189 115 -106 197 205 -106 230 230 -90 213 213 -205 172 238 -180 139 213 -255 180 0 -123 131 148 -255 255 255 -98 106 123 diff --git a/graphics/item_menu/bag_tilemap1.bin b/graphics/item_menu/bg.bin similarity index 100% rename from graphics/item_menu/bag_tilemap1.bin rename to graphics/item_menu/bg.bin diff --git a/graphics/item_menu/bag_tiles.png b/graphics/item_menu/bg.png similarity index 100% rename from graphics/item_menu/bag_tiles.png rename to graphics/item_menu/bg.png diff --git a/graphics/item_menu/bag_tilemap2.bin b/graphics/item_menu/bg_item_pc.bin similarity index 100% rename from graphics/item_menu/bag_tilemap2.bin rename to graphics/item_menu/bg_item_pc.bin diff --git a/graphics/teachy_tv/border.png b/graphics/teachy_tv/border.png new file mode 100644 index 0000000000000000000000000000000000000000..08fa27da6c847939c93b82cb77cd1c7f26997525 GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv_7YEDSN7-3JZutj+p6YP0fod% zTq8ibrPy~PaG)&ISmybKL3le4p1dV2md z{0E``Tfd*vyf#Omzh5*FsFyLx+uensgH_f8$O-p!aSW-Llbn&@z~0o<>YSW6kA%3y8w#AA7g|ZQ`osv@OlUChG4^q|Ikj;D!zw;Dwd4{;;Zv+LF6O8@ nHLyA>i1;>$Iy0QTrpUwaMu#uyflS#6pcM?Bu6{1-oD!M<89-r= literal 0 HcmV?d00001 diff --git a/graphics/unknown/unknown_E861A8.bin b/graphics/unknown/unknown_E861A8.bin deleted file mode 100644 index deae79449574294ae3ed9108efe3e5b02fb77957..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 512 zcmd6i!3n@H2t~aJJ?aLH6STTOAr8<(vi~a8o>Is)&<8Jw20v~PFf(xxVl^tY(dkIq vAWe#hshOL558mGRR7dcRFd2>CrZp+TZejg;M0C2E%(&7x>rQcX;=lGk*I^Fn diff --git a/graphics/unknown/unknown_E87010.pal b/graphics/unused/gray_palette.pal similarity index 100% rename from graphics/unknown/unknown_E87010.pal rename to graphics/unused/gray_palette.pal diff --git a/graphics/unknown/unknown_E9BD08.pal b/graphics/unused/red_palette.pal similarity index 100% rename from graphics/unknown/unknown_E9BD08.pal rename to graphics/unused/red_palette.pal diff --git a/graphics_file_rules.mk b/graphics_file_rules.mk index be3f9d58f..2b3f4ea83 100644 --- a/graphics_file_rules.mk +++ b/graphics_file_rules.mk @@ -194,7 +194,7 @@ $(BTLANMSPRGFXDIR)/spark.4bpp: $(BTLANMSPRGFXDIR)/spark_0.4bpp \ $(BTLANMSPRGFXDIR)/spark_1.4bpp @cat $^ >$@ -$(MASKSGFXDIR)/unknown_D2EC24.4bpp: %.4bpp: %.png +$(MASKSGFXDIR)/unused_level_up.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 14 -Wnum_tiles $(BATTRANSGFXDIR)/vs_frame.4bpp: %.4bpp: %.png @@ -503,7 +503,7 @@ graphics/pokemon/heracross/unk_icon.4bpp: %.4bpp: %.png graphics/misc/emoticons.4bpp: %.4bpp: %.png $(GFX) $< $@ -mwidth 2 -mheight 2 -$(ITEMMENUGFXDIR)/bag_tiles.4bpp: %.4bpp: %.png +$(ITEMMENUGFXDIR)/bg.4bpp: %.4bpp: %.png $(GFX) $< $@ -num_tiles 55 -Wnum_tiles $(INTROGFXDIR)/scene_1/grass.4bpp: %.4bpp: %.png diff --git a/include/graphics.h b/include/graphics.h index 065132441..15b4ce3cc 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4866,9 +4866,9 @@ extern const u16 gBattleInterface_Healthbox_Pal[]; extern const u16 gBattleInterface_Healthbar_Pal[]; // item_menu -extern const u32 gUnknown_8E830CC[]; -extern const u32 gUnknown_8E832C0[]; -extern const u32 gUnknown_8E83444[]; +extern const u32 gBagBg_Gfx[]; +extern const u32 gBagBg_Tilemap[]; +extern const u32 gBagBg_ItemPC_Tilemap[]; extern const u32 gBagBgPalette[]; extern const u32 gBagBgPalette_FemaleOverride[]; diff --git a/src/graphics.c b/src/graphics.c index 01ed0161b..31d3a8e2c 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -883,8 +883,8 @@ const u32 gBattleAnimSpriteGfx_TagHand[] = INCBIN_U32("graphics/battle_anims/spr const u32 gBattleAnimSpriteGfx_NoiseLine[] = INCBIN_U32("graphics/battle_anims/sprites/noise_line.4bpp.lz"); -const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.4bpp.lz"); -const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unknown_D2EC24.bin.lz"); +const u32 gUnusedLevelupAnimationGfx[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.4bpp.lz"); +const u32 gUnusedLevelupAnimationTilemap[] = INCBIN_U32("graphics/battle_anims/masks/unused_level_up.bin.lz"); const u32 gBattleAnimSpriteGfx_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.4bpp.lz"); const u32 gBattleAnimSpritePal_SmallRedEye[] = INCBIN_U32("graphics/battle_anims/sprites/small_red_eye.gbapal.lz"); @@ -1075,11 +1075,9 @@ const u32 gPartyMenuPokeball_Pal[] = INCBIN_U32("graphics/party_menu/pokeball.gb const u32 gStatusGfx_Icons[] = INCBIN_U32("graphics/interface/status_icons.4bpp.lz"); const u32 gStatusPal_Icons[] = INCBIN_U32("graphics/interface/status_icons.gbapal.lz"); -const u32 gUnknown_8E830CC[] = INCBIN_U32("graphics/item_menu/bag_tiles.4bpp.lz"); - -const u32 gUnknown_8E832C0[] = INCBIN_U32("graphics/item_menu/bag_tilemap1.bin.lz"); // bag menu -const u32 gUnknown_8E83444[] = INCBIN_U32("graphics/item_menu/bag_tilemap2.bin.lz"); // PC deposit items - +const u32 gBagBg_Gfx[] = INCBIN_U32("graphics/item_menu/bg.4bpp.lz"); +const u32 gBagBg_Tilemap[] = INCBIN_U32("graphics/item_menu/bg.bin.lz"); +const u32 gBagBg_ItemPC_Tilemap[] = INCBIN_U32("graphics/item_menu/bg_item_pc.bin.lz"); const u32 gBagBgPalette[] = INCBIN_U32("graphics/item_menu/bag_pal1.gbapal.lz"); // palette 1 (Boy + misc Pal) const u32 gBagBgPalette_FemaleOverride[] = INCBIN_U32("graphics/item_menu/bag_pal2.gbapal.lz"); // palette 2 (Girl) @@ -1115,14 +1113,13 @@ const u32 gBuyMenuFrame_Tilemap[] = INCBIN_U32("graphics/shop_menu/shop_tilemap. const u32 gBuyMenuFrame_TmHmTilemap[] = INCBIN_U32("graphics/shop_menu/shop_tm_hm_tilemap.bin.lz"); const u32 gBuyMenuFrame_Pal[] = INCBIN_U32("graphics/shop_menu/shop_menu.gbapal.lz"); -const u32 gUnknown_8E861A8[] = INCBIN_U32("graphics/unknown/unknown_E861A8.bin.lz"); - +const u8 gTeachyTv_Border_Gfx[] = INCBIN_U8("graphics/teachy_tv/border.4bpp.lz"); // Unused const u8 gTeachyTv_Gfx[] = INCBIN_U8("graphics/teachy_tv/tiles.4bpp.lz"); const u8 gTeachyTvScreen_Tilemap[] = INCBIN_U8("graphics/teachy_tv/screen.bin.lz"); const u8 gTeachyTvTitle_Tilemap[] = INCBIN_U8("graphics/teachy_tv/title.bin.lz"); const u32 gTeachyTv_Pal[] = INCBIN_U32("graphics/teachy_tv/tiles.gbapal.lz"); -const u32 gUnknown_8E87010[] = INCBIN_U32("graphics/unknown/unknown_E87010.gbapal.lz"); +const u32 gUnusedGrayPalette[] = INCBIN_U32("graphics/unused/gray_palette.gbapal.lz"); #include "data/graphics/items.h" @@ -1195,9 +1192,7 @@ const u32 gEasyChatButtonWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/button_wi const u32 gEasyChatMode_Gfx[] = INCBIN_U32("graphics/easy_chat/mode.4bpp.lz"); const u32 gPokeSumBgTiles[] = INCBIN_U32("graphics/interface/trainer_memo.4bpp.lz"); -const u32 gTrainerMemoPal1[] = INCBIN_U32("graphics/interface/trainer_memo_pal1.gbapal"); -const u32 gUnknown_8E9B3B0[] = INCBIN_U32("graphics/interface/trainer_memo_pal2.gbapal"); -const u32 gUnknown_8E9B3D0[] = INCBIN_U32("graphics/interface/trainer_memo_pal3.gbapal"); +const u32 gTrainerMemoPal[] = INCBIN_U32("graphics/interface/trainer_memo_pal.gbapal"); const u32 gPokeSummary_ExpBarTiles[] = INCBIN_U32("graphics/interface/summary_exp_bar.4bpp.lz"); const u32 gPokeSummary_HpBarTiles[] = INCBIN_U32("graphics/interface/summary_hp_bar.4bpp.lz"); @@ -1209,7 +1204,7 @@ const u32 gBgTilemap_PokeSum_MovesListForDelete[] = INCBIN_U32("graphics/interfa const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_4.bin.lz"); const u32 gBgTilemap_TrainerMemo_Egg[] = INCBIN_U32("graphics/interface/trainer_memo_5.bin.lz"); -const u16 gUnknown_8E9BD08[] = INCBIN_U16("graphics/unknown/unknown_E9BD08.gbapal"); +const u16 gUnusedRedPalette[] = INCBIN_U16("graphics/unused/red_palette.gbapal"); const u32 gEasyChatRectangleCursor_Gfx[] = INCBIN_U32("graphics/easy_chat/rectangle_cursor.4bpp.lz"); const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/status_ailment_icons.gbapal"); diff --git a/src/item_menu.c b/src/item_menu.c index f9b2a9f1a..4b31cfab0 100644 --- a/src/item_menu.c +++ b/src/item_menu.c @@ -562,16 +562,16 @@ static bool8 DoLoadBagGraphics(void) { case 0: ResetTempTileDataBuffers(); - DecompressAndCopyTileDataToVram(1, gUnknown_8E830CC, 0, 0, 0); + DecompressAndCopyTileDataToVram(1, gBagBg_Gfx, 0, 0, 0); sBagMenuDisplay->data[0]++; break; case 1: if (FreeTempTileDataBuffersIfPossible() != TRUE) { if (gBagMenuState.location != ITEMMENULOCATION_ITEMPC) - LZDecompressWram(gUnknown_8E832C0, sBagBgTilemapBuffer); + LZDecompressWram(gBagBg_Tilemap, sBagBgTilemapBuffer); else - LZDecompressWram(gUnknown_8E83444, sBagBgTilemapBuffer); + LZDecompressWram(gBagBg_ItemPC_Tilemap, sBagBgTilemapBuffer); sBagMenuDisplay->data[0]++; } break; diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index c56f243b2..01518a96f 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -332,7 +332,7 @@ extern const u32 gBgTilemap_PokeSum_MovesListForDelete[]; extern const u32 gBgTilemap_TrainerMemo_Details[]; extern const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[]; extern const u32 gBgTilemap_TrainerMemo_Egg[]; -extern const u16 gTrainerMemoPal1[]; +extern const u16 gTrainerMemoPal[]; extern const u32 gPokeSumBgTiles[]; extern const u16 gPokeSummary_ExpBarPals[]; extern const u32 gPokeSummary_StatusAilmentIconTiles[]; @@ -2007,16 +2007,16 @@ static u8 PokeSum_HandleLoadBgGfx(void) switch (sMonSummaryScreen->loadBgGfxStep) { case 0: - LoadPalette(gTrainerMemoPal1, 0, 0x20 * 5); + LoadPalette(gTrainerMemoPal, 0, 0x20 * 5); if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 6], 0, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 0], 0, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 1], 0x10, 0x20); } break; @@ -5079,13 +5079,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal1[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 5], 0x10, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 6], 0, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal1[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal1[16 * 1], 0x10, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 0], 0, 0x20); + LoadPalette(&gTrainerMemoPal[16 * 1], 0x10, 0x20); } sMonSummaryScreen->switchMonTaskState++; From 62f745d646c50bdd474509e8a25718114caa7f15 Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:12:02 +0800 Subject: [PATCH 23/29] Rename summary screen graphics --- .../interface/pokesummary_unk_8463B00.pal | 19 -- .../interface/pokesummary_unk_8463B44.pal | 19 -- .../bg.pal} | 0 .../bg.png} | Bin .../exp_bar.png} | Bin .../hp_bar.png} | Bin .../hp_bar_red.pal} | 0 .../hp_bar_yellow.pal} | 0 .../marking.pal} | 0 .../move_selection_cursor.pal} | 0 .../move_selection_cursor_left.png} | Bin .../move_selection_cursor_right.png} | Bin .../moves_info_page.bin} | Bin .../moves_page.bin} | Bin .../page_egg.bin} | Bin .../page_info.bin} | Bin .../page_moves.bin} | Bin .../page_moves_info.bin} | Bin .../page_skills.bin} | Bin .../pokerus_cured.png} | Bin .../shiny_star.png} | Bin .../status_ailment_icons.png | Bin .../text_header.pal} | 0 .../text_moves.pal} | 0 src/graphics.c | 26 +- src/pokemon_summary_screen.c | 247 +++++++++--------- 26 files changed, 135 insertions(+), 176 deletions(-) delete mode 100644 graphics/interface/pokesummary_unk_8463B00.pal delete mode 100644 graphics/interface/pokesummary_unk_8463B44.pal rename graphics/{interface/trainer_memo_pal.pal => summary_screen/bg.pal} (100%) rename graphics/{interface/trainer_memo.png => summary_screen/bg.png} (100%) rename graphics/{interface/summary_exp_bar.png => summary_screen/exp_bar.png} (100%) rename graphics/{interface/summary_hp_bar.png => summary_screen/hp_bar.png} (100%) rename graphics/{interface/pokesummary_unk_8463ACC.pal => summary_screen/hp_bar_red.pal} (100%) rename graphics/{interface/pokesummary_unk_8463AAC.pal => summary_screen/hp_bar_yellow.pal} (100%) rename graphics/{interface/pokesummary_unk_84636E0.pal => summary_screen/marking.pal} (100%) rename graphics/{interface/pokesummary_unk_8463720.pal => summary_screen/move_selection_cursor.pal} (100%) rename graphics/{interface/pokesummary_unk_8463740.png => summary_screen/move_selection_cursor_left.png} (100%) rename graphics/{interface/pokesummary_unk_846386C.png => summary_screen/move_selection_cursor_right.png} (100%) rename graphics/{interface/pokesummary_unk_8463B88.bin => summary_screen/moves_info_page.bin} (100%) rename graphics/{interface/pokesummary_unk_8463C80.bin => summary_screen/moves_page.bin} (100%) rename graphics/{interface/trainer_memo_5.bin => summary_screen/page_egg.bin} (100%) rename graphics/{interface/trainer_memo.bin => summary_screen/page_info.bin} (100%) rename graphics/{interface/trainer_memo_3.bin => summary_screen/page_moves.bin} (100%) rename graphics/{interface/trainer_memo_4.bin => summary_screen/page_moves_info.bin} (100%) rename graphics/{interface/trainer_memo_2.bin => summary_screen/page_skills.bin} (100%) rename graphics/{interface/pokesummary_unk_8463B20.png => summary_screen/pokerus_cured.png} (100%) rename graphics/{interface/pokesummary_unk_8463B64.png => summary_screen/shiny_star.png} (100%) rename graphics/{interface => summary_screen}/status_ailment_icons.png (100%) rename graphics/{interface/pokesummary_unk_84636C0.pal => summary_screen/text_header.pal} (100%) rename graphics/{interface/pokesummary_unk_8463700.pal => summary_screen/text_moves.pal} (100%) diff --git a/graphics/interface/pokesummary_unk_8463B00.pal b/graphics/interface/pokesummary_unk_8463B00.pal deleted file mode 100644 index 61af05b25..000000000 --- a/graphics/interface/pokesummary_unk_8463B00.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 164 164 -106 106 106 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/pokesummary_unk_8463B44.pal b/graphics/interface/pokesummary_unk_8463B44.pal deleted file mode 100644 index 37aafef66..000000000 --- a/graphics/interface/pokesummary_unk_8463B44.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 213 82 -189 148 16 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/interface/trainer_memo_pal.pal b/graphics/summary_screen/bg.pal similarity index 100% rename from graphics/interface/trainer_memo_pal.pal rename to graphics/summary_screen/bg.pal diff --git a/graphics/interface/trainer_memo.png b/graphics/summary_screen/bg.png similarity index 100% rename from graphics/interface/trainer_memo.png rename to graphics/summary_screen/bg.png diff --git a/graphics/interface/summary_exp_bar.png b/graphics/summary_screen/exp_bar.png similarity index 100% rename from graphics/interface/summary_exp_bar.png rename to graphics/summary_screen/exp_bar.png diff --git a/graphics/interface/summary_hp_bar.png b/graphics/summary_screen/hp_bar.png similarity index 100% rename from graphics/interface/summary_hp_bar.png rename to graphics/summary_screen/hp_bar.png diff --git a/graphics/interface/pokesummary_unk_8463ACC.pal b/graphics/summary_screen/hp_bar_red.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463ACC.pal rename to graphics/summary_screen/hp_bar_red.pal diff --git a/graphics/interface/pokesummary_unk_8463AAC.pal b/graphics/summary_screen/hp_bar_yellow.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463AAC.pal rename to graphics/summary_screen/hp_bar_yellow.pal diff --git a/graphics/interface/pokesummary_unk_84636E0.pal b/graphics/summary_screen/marking.pal similarity index 100% rename from graphics/interface/pokesummary_unk_84636E0.pal rename to graphics/summary_screen/marking.pal diff --git a/graphics/interface/pokesummary_unk_8463720.pal b/graphics/summary_screen/move_selection_cursor.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463720.pal rename to graphics/summary_screen/move_selection_cursor.pal diff --git a/graphics/interface/pokesummary_unk_8463740.png b/graphics/summary_screen/move_selection_cursor_left.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463740.png rename to graphics/summary_screen/move_selection_cursor_left.png diff --git a/graphics/interface/pokesummary_unk_846386C.png b/graphics/summary_screen/move_selection_cursor_right.png similarity index 100% rename from graphics/interface/pokesummary_unk_846386C.png rename to graphics/summary_screen/move_selection_cursor_right.png diff --git a/graphics/interface/pokesummary_unk_8463B88.bin b/graphics/summary_screen/moves_info_page.bin similarity index 100% rename from graphics/interface/pokesummary_unk_8463B88.bin rename to graphics/summary_screen/moves_info_page.bin diff --git a/graphics/interface/pokesummary_unk_8463C80.bin b/graphics/summary_screen/moves_page.bin similarity index 100% rename from graphics/interface/pokesummary_unk_8463C80.bin rename to graphics/summary_screen/moves_page.bin diff --git a/graphics/interface/trainer_memo_5.bin b/graphics/summary_screen/page_egg.bin similarity index 100% rename from graphics/interface/trainer_memo_5.bin rename to graphics/summary_screen/page_egg.bin diff --git a/graphics/interface/trainer_memo.bin b/graphics/summary_screen/page_info.bin similarity index 100% rename from graphics/interface/trainer_memo.bin rename to graphics/summary_screen/page_info.bin diff --git a/graphics/interface/trainer_memo_3.bin b/graphics/summary_screen/page_moves.bin similarity index 100% rename from graphics/interface/trainer_memo_3.bin rename to graphics/summary_screen/page_moves.bin diff --git a/graphics/interface/trainer_memo_4.bin b/graphics/summary_screen/page_moves_info.bin similarity index 100% rename from graphics/interface/trainer_memo_4.bin rename to graphics/summary_screen/page_moves_info.bin diff --git a/graphics/interface/trainer_memo_2.bin b/graphics/summary_screen/page_skills.bin similarity index 100% rename from graphics/interface/trainer_memo_2.bin rename to graphics/summary_screen/page_skills.bin diff --git a/graphics/interface/pokesummary_unk_8463B20.png b/graphics/summary_screen/pokerus_cured.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463B20.png rename to graphics/summary_screen/pokerus_cured.png diff --git a/graphics/interface/pokesummary_unk_8463B64.png b/graphics/summary_screen/shiny_star.png similarity index 100% rename from graphics/interface/pokesummary_unk_8463B64.png rename to graphics/summary_screen/shiny_star.png diff --git a/graphics/interface/status_ailment_icons.png b/graphics/summary_screen/status_ailment_icons.png similarity index 100% rename from graphics/interface/status_ailment_icons.png rename to graphics/summary_screen/status_ailment_icons.png diff --git a/graphics/interface/pokesummary_unk_84636C0.pal b/graphics/summary_screen/text_header.pal similarity index 100% rename from graphics/interface/pokesummary_unk_84636C0.pal rename to graphics/summary_screen/text_header.pal diff --git a/graphics/interface/pokesummary_unk_8463700.pal b/graphics/summary_screen/text_moves.pal similarity index 100% rename from graphics/interface/pokesummary_unk_8463700.pal rename to graphics/summary_screen/text_moves.pal diff --git a/src/graphics.c b/src/graphics.c index 31d3a8e2c..90dbb1849 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1191,24 +1191,22 @@ const u16 gEasyChatButtonWindow_Pal[] = INCBIN_U16("graphics/easy_chat/button_wi const u32 gEasyChatButtonWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/button_window.4bpp.lz"); const u32 gEasyChatMode_Gfx[] = INCBIN_U32("graphics/easy_chat/mode.4bpp.lz"); -const u32 gPokeSumBgTiles[] = INCBIN_U32("graphics/interface/trainer_memo.4bpp.lz"); -const u32 gTrainerMemoPal[] = INCBIN_U32("graphics/interface/trainer_memo_pal.gbapal"); - -const u32 gPokeSummary_ExpBarTiles[] = INCBIN_U32("graphics/interface/summary_exp_bar.4bpp.lz"); -const u32 gPokeSummary_HpBarTiles[] = INCBIN_U32("graphics/interface/summary_hp_bar.4bpp.lz"); -const u16 gPokeSummary_ExpBarPals[] = INCBIN_U16("graphics/interface/summary_exp_bar.gbapal"); // hp bar uses this too - -const u32 gBgTilemap_TrainerMemo_Details[] = INCBIN_U32("graphics/interface/trainer_memo.bin.lz"); -const u32 gBgTilemap_TrainerMemo_Stats[] = INCBIN_U32("graphics/interface/trainer_memo_2.bin.lz"); -const u32 gBgTilemap_PokeSum_MovesListForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_3.bin.lz"); -const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_4.bin.lz"); -const u32 gBgTilemap_TrainerMemo_Egg[] = INCBIN_U32("graphics/interface/trainer_memo_5.bin.lz"); +const u32 gSummaryScreen_Bg_Gfx[] = INCBIN_U32("graphics/summary_screen/bg.4bpp.lz"); +const u32 gSummaryScreen_Bg_Pal[] = INCBIN_U32("graphics/summary_screen/bg.gbapal"); +const u32 gSummaryScreen_ExpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/exp_bar.4bpp.lz"); +const u32 gSummaryScreen_HpBar_Gfx[] = INCBIN_U32("graphics/summary_screen/hp_bar.4bpp.lz"); +const u16 gSummaryScreen_HpExpBar_Pal[] = INCBIN_U16("graphics/summary_screen/exp_bar.gbapal"); // hp bar uses this too +const u32 gSummaryScreen_PageInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_info.bin.lz"); +const u32 gSummaryScreen_PageSkills_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_skills.bin.lz"); +const u32 gSummaryScreen_PageMoves_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves.bin.lz"); +const u32 gSummaryScreen_PageMovesInfo_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_moves_info.bin.lz"); +const u32 gSummaryScreen_PageEgg_Tilemap[] = INCBIN_U32("graphics/summary_screen/page_egg.bin.lz"); const u16 gUnusedRedPalette[] = INCBIN_U16("graphics/unused/red_palette.gbapal"); const u32 gEasyChatRectangleCursor_Gfx[] = INCBIN_U32("graphics/easy_chat/rectangle_cursor.4bpp.lz"); -const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/status_ailment_icons.gbapal"); -const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/status_ailment_icons.4bpp.lz"); +const u16 gSummaryScreen_StatusAilmentIcon_Pal[] = INCBIN_U16("graphics/summary_screen/status_ailment_icons.gbapal"); +const u32 gSummaryScreen_StatusAilmentIcon_Gfx[] = INCBIN_U32("graphics/summary_screen/status_ailment_icons.4bpp.lz"); const u16 gDexScreen_TopMenuIconPals_AtoZ[] = INCBIN_U16("graphics/pokedex/cat_icon_abc.gbapal"); const u32 gDexScreen_TopMenuIconTiles_AtoZ[] = INCBIN_U32("graphics/pokedex/cat_icon_abc.4bpp.lz"); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index 01518a96f..bba8c7d5a 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -58,7 +58,7 @@ static void PokeSum_SetHelpContext(void); static void Task_HandleInput_SelectMove(u8 id); static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void); static void PokeSum_CopyNewBgTilemapBeforePageFlip(void); -static void PokeSum_DrawBg3Tilemap(void); +static void PokeSum_DrawPageProgressTiles(void); static void PokeSum_PrintRightPaneText(void); static void PokeSum_PrintBottomPaneText(void); static void PokeSum_PrintAbilityDataOrMoveTypes(void); @@ -327,26 +327,25 @@ static EWRAM_DATA u8 sMoveSelectionCursorPos = 0; static EWRAM_DATA u8 sMoveSwapCursorPos = 0; static EWRAM_DATA struct MonPicBounceState * sMonPicBounceState = NULL; -extern const u32 gBgTilemap_TrainerMemo_Stats[]; -extern const u32 gBgTilemap_PokeSum_MovesListForDelete[]; -extern const u32 gBgTilemap_TrainerMemo_Details[]; -extern const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[]; -extern const u32 gBgTilemap_TrainerMemo_Egg[]; -extern const u16 gTrainerMemoPal[]; -extern const u32 gPokeSumBgTiles[]; -extern const u16 gPokeSummary_ExpBarPals[]; -extern const u32 gPokeSummary_StatusAilmentIconTiles[]; -extern const u16 gPokeSummary_StatusAilmentIconPals[]; -extern const u32 gPokeSummary_HpBarTiles[]; -extern const u32 gPokeSummary_ExpBarTiles[]; -extern const u16 gPokeSummary_ExpBarPals[]; +extern const u32 gSummaryScreen_PageSkills_Tilemap[]; +extern const u32 gSummaryScreen_PageMoves_Tilemap[]; +extern const u32 gSummaryScreen_PageInfo_Tilemap[]; +extern const u32 gSummaryScreen_PageMovesInfo_Tilemap[]; +extern const u32 gSummaryScreen_PageEgg_Tilemap[]; +extern const u16 gSummaryScreen_Bg_Pal[]; +extern const u32 gSummaryScreen_Bg_Gfx[]; +extern const u16 gSummaryScreen_HpExpBar_Pal[]; +extern const u32 gSummaryScreen_StatusAilmentIcon_Gfx[]; +extern const u16 gSummaryScreen_StatusAilmentIcon_Pal[]; +extern const u32 gSummaryScreen_HpBar_Gfx[]; +extern const u32 gSummaryScreen_ExpBar_Gfx[]; -static const u32 sBgPal7[] = INCBIN_U32("graphics/interface/pokesummary_unk_84636C0.gbapal"); -static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/interface/pokesummary_unk_84636E0.gbapal"); -static const u32 sBgPal8[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463700.gbapal"); -static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463720.gbapal"); -static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463740.4bpp.lz"); -static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/interface/pokesummary_unk_846386C.4bpp.lz"); +static const u32 sTextHeaderPalette[] = INCBIN_U32("graphics/summary_screen/text_header.gbapal"); +static const u16 sMonMarkingSpritePalette[] = INCBIN_U16("graphics/summary_screen/marking.gbapal"); +static const u32 sTextMovesPalette[] = INCBIN_U32("graphics/summary_screen/text_moves.gbapal"); +static const u16 sMoveSelectionCursorPals[] = INCBIN_U16("graphics/summary_screen/move_selection_cursor.gbapal"); +static const u32 sMoveSelectionCursorTiles_Left[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_left.4bpp.lz"); +static const u32 sMoveSelectionCursorTiles_Right[] = INCBIN_U32("graphics/summary_screen/move_selection_cursor_right.4bpp.lz"); static const struct OamData sMoveSelectionCursorOamData = { @@ -560,8 +559,8 @@ static const union AnimCmd * const sHpOrExpBarAnimTable[] = sHpOrExpAnim_11 }; -static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463AAC.gbapal"); -static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463ACC.gbapal"); +static const u16 sPokeSummary_HpBarPalYellow[] = INCBIN_U16("graphics/summary_screen/hp_bar_yellow.gbapal"); +static const u16 sPokeSummary_HpBarPalRed[] = INCBIN_U16("graphics/summary_screen/hp_bar_red.gbapal"); static const struct OamData sPokerusIconObjOamData = { .y = 0, @@ -589,8 +588,8 @@ static const union AnimCmd * const sPokerusIconObjAnimTable[] = sPokerusIconObjAnim0 }; -static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/interface/pokesummary_unk_8463B00.gbapal"); -static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/interface/pokesummary_unk_8463B20.4bpp.lz"); +static const u16 sPokerusIconObjPal[] = INCBIN_U16("graphics/summary_screen/pokerus_cured.gbapal"); +static const u32 sPokerusIconObjTiles[] = INCBIN_U32("graphics/summary_screen/pokerus_cured.4bpp.lz"); static const struct OamData sStarObjOamData = { @@ -619,10 +618,10 @@ static const union AnimCmd * const sStarObjAnimTable[] = sStarObjAnim0 }; -static const u16 sStarObjPal[] = INCBIN_U16( "graphics/interface/pokesummary_unk_8463B44.gbapal"); -static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B64.4bpp.lz"); -static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463B88.bin.lz"); -static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/interface/pokesummary_unk_8463C80.bin.lz"); +static const u16 sStarObjPal[] = INCBIN_U16( "graphics/summary_screen/shiny_star.gbapal"); +static const u32 sStarObjTiles[] = INCBIN_U32( "graphics/summary_screen/shiny_star.4bpp.lz"); +static const u32 sBgTilemap_MovesInfoPage[] = INCBIN_U32( "graphics/summary_screen/moves_info_page.bin.lz"); +static const u32 sBgTilemap_MovesPage[] = INCBIN_U32( "graphics/summary_screen/moves_page.bin.lz"); #include "data/text/nature_names.h" @@ -959,7 +958,7 @@ static const s8 sEggPicShakeXDelta_AlmostReadyToHatch[] = static const u16 * const sHpBarPals[] = { - gPokeSummary_ExpBarPals, + gSummaryScreen_HpExpBar_Pal, sPokeSummary_HpBarPalYellow, sPokeSummary_HpBarPalRed, }; @@ -1262,7 +1261,7 @@ static void Task_PokeSum_FlipPages(u8 taskId) case 2: PokeSum_CopyNewBgTilemapBeforePageFlip_2(); PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex); break; case 3: @@ -1358,7 +1357,7 @@ static void Task_FlipPages_FromInfo(u8 taskId) PokeSum_HideSpritesBeforePageFlip(); PokeSum_UpdateWin1ActiveFlag(sMonSummaryScreen->curPageIndex); PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_CopyNewBgTilemapBeforePageFlip_2(); break; case 3: @@ -1510,7 +1509,7 @@ static void Task_BackOutOfSelectMove(u8 taskId) break; case 10: PokeSum_CopyNewBgTilemapBeforePageFlip(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); CopyBgTilemapBufferToVram(3); PokeSum_ShowSpritesBeforePageFlip(); break; @@ -1838,24 +1837,24 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip_2(void) switch (newPage) { case PSS_PAGE_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_SKILLS: if (sMonSummaryScreen->pageFlipDirection == 1) - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); else - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); break; case PSS_PAGE_MOVES: if (sMonSummaryScreen->pageFlipDirection == 1) - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0); else - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_MOVES_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); break; } } @@ -1872,7 +1871,7 @@ static void PokeSum_CopyNewBgTilemapBeforePageFlip(void) switch (newPage) { case PSS_PAGE_INFO: - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); break; case PSS_PAGE_SKILLS: break; @@ -1933,22 +1932,22 @@ static void CB2_SetUpPSS(void) else CopyToBgTilemapBuffer(3, sBgTilemap_MovesInfoPage, 0, 0); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); break; case 11: if (sMonSummaryScreen->isEgg) - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0); else { if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE || sMonSummaryScreen->mode == PSS_MODE_FORGET_MOVE) { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_PokeSum_MovesListForDelete, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_PokeSum_MoveDetailsForDelete, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageMoves_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageMovesInfo_Tilemap, 0, 0); } else { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } } @@ -2007,28 +2006,28 @@ static u8 PokeSum_HandleLoadBgGfx(void) switch (sMonSummaryScreen->loadBgGfxStep) { case 0: - LoadPalette(gTrainerMemoPal, 0, 0x20 * 5); + LoadPalette(gSummaryScreen_Bg_Pal, 0, 0x20 * 5); if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal[16 * 5], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal[16 * 1], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20); } break; case 1: ListMenuLoadStdPalAt(0x60, 1); - LoadPalette(sBgPal7, 0x70, 0x20); + LoadPalette(sTextHeaderPalette, 0x70, 0x20); break; case 2: ResetTempTileDataBuffers(); break; case 3: - DecompressAndCopyTileDataToVram(2, gPokeSumBgTiles, 0, 0, 0); + DecompressAndCopyTileDataToVram(2, gSummaryScreen_Bg_Gfx, 0, 0, 0); break; case 4: if (FreeTempTileDataBuffersIfPossible() == TRUE) @@ -2040,7 +2039,7 @@ static u8 PokeSum_HandleLoadBgGfx(void) break; default: - LoadPalette(sBgPal8, 0x80, 0x20); + LoadPalette(sTextMovesPalette, 0x80, 0x20); return TRUE; } @@ -3272,86 +3271,86 @@ static u8 PokeSum_BufferOtName_IsEqualToCurrentOwner(struct Pokemon * mon) return TRUE; } -#define SUB_8138538_BASE_TILE_NUM (345) +#define PAGE_PROGRESS_BASE_TILE_NUM (345) -static void PokeSum_DrawBg3Tilemap(void) +static void PokeSum_DrawPageProgressTiles(void) { switch (sMonSummaryScreen->curPageIndex) { case PSS_PAGE_INFO: if (!sMonSummaryScreen->isEgg) { - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 20 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 36 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 20 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 36 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); } else { - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 2 + SUB_8138538_BASE_TILE_NUM, 15, 0, 4, 2, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 2 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 4, 2, 0); } break; case PSS_PAGE_SKILLS: - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 16 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 32 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 18 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 34 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 21 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 37 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 16 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 32 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 18 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 34 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 21 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 37 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; case PSS_PAGE_MOVES: - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 17 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 33 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 17 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 33 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; case PSS_PAGE_MOVES_INFO: if (sMonSummaryScreen->mode == PSS_MODE_SELECT_MOVE) { - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 13, 0, 4, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 13, 1, 4, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 4, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 4, 1, 0); } else { - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 13, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 13, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 14, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 14, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 49 + SUB_8138538_BASE_TILE_NUM, 15, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 65 + SUB_8138538_BASE_TILE_NUM, 15, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 1 + SUB_8138538_BASE_TILE_NUM, 16, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 19 + SUB_8138538_BASE_TILE_NUM, 16, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 13, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 14, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 49 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 65 + PAGE_PROGRESS_BASE_TILE_NUM, 15, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 1 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 19 + PAGE_PROGRESS_BASE_TILE_NUM, 16, 1, 1, 1, 0); } - FillBgTilemapBufferRect(3, 50 + SUB_8138538_BASE_TILE_NUM, 17, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 66 + SUB_8138538_BASE_TILE_NUM, 17, 1, 1, 1, 0); - FillBgTilemapBufferRect(3, 48 + SUB_8138538_BASE_TILE_NUM, 18, 0, 1, 1, 0); - FillBgTilemapBufferRect(3, 64 + SUB_8138538_BASE_TILE_NUM, 18, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 50 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 66 + PAGE_PROGRESS_BASE_TILE_NUM, 17, 1, 1, 1, 0); + FillBgTilemapBufferRect(3, 48 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 0, 1, 1, 0); + FillBgTilemapBufferRect(3, 64 + PAGE_PROGRESS_BASE_TILE_NUM, 18, 1, 1, 1, 0); break; } } @@ -4309,7 +4308,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag) sStatusIcon = AllocZeroed(sizeof(struct MonStatusIconObj)); gfxBufferPtr = AllocZeroed(0x20 * 32); - LZ77UnCompWram(gPokeSummary_StatusAilmentIconTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_StatusAilmentIcon_Gfx, gfxBufferPtr); if (sStatusIcon != NULL) { @@ -4319,7 +4318,7 @@ static void CreateMonStatusIconObj(u16 tileTag, u16 palTag) .tag = tileTag }; - struct SpritePalette palette = {.data = gPokeSummary_StatusAilmentIconPals, .tag = palTag}; + struct SpritePalette palette = {.data = gSummaryScreen_StatusAilmentIcon_Pal, .tag = palTag}; struct SpriteTemplate template = { .tileTag = tileTag, .paletteTag = palTag, @@ -4401,7 +4400,7 @@ static void CreateHpBarObjs(u16 tileTag, u16 palTag) sHpBarObjs = AllocZeroed(sizeof(struct HpBarObjs)); gfxBufferPtr = AllocZeroed(0x20 * 12); - LZ77UnCompWram(gPokeSummary_HpBarTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_HpBar_Gfx, gfxBufferPtr); curHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_HP); maxHp = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MAX_HP); @@ -4559,7 +4558,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag) sExpBarObjs = AllocZeroed(sizeof(struct ExpBarObjs)); gfxBufferPtr = AllocZeroed(0x20 * 12); - LZ77UnCompWram(gPokeSummary_ExpBarTiles, gfxBufferPtr); + LZ77UnCompWram(gSummaryScreen_ExpBar_Gfx, gfxBufferPtr); if (gfxBufferPtr != NULL) { struct SpriteSheet sheet = { @@ -4568,7 +4567,7 @@ static void CreateExpBarObjs(u16 tileTag, u16 palTag) .tag = tileTag }; - struct SpritePalette palette = {.data = gPokeSummary_ExpBarPals, .tag = palTag}; + struct SpritePalette palette = {.data = gSummaryScreen_HpExpBar_Pal, .tag = palTag}; LoadSpriteSheet(&sheet); LoadSpritePalette(&palette); } @@ -5079,13 +5078,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) if (IsMonShiny(&sMonSummaryScreen->currentMon) == TRUE && !sMonSummaryScreen->isEgg) { - LoadPalette(&gTrainerMemoPal[16 * 6], 0, 0x20); - LoadPalette(&gTrainerMemoPal[16 * 5], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 6], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 5], 0x10, 0x20); } else { - LoadPalette(&gTrainerMemoPal[16 * 0], 0, 0x20); - LoadPalette(&gTrainerMemoPal[16 * 1], 0x10, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 0], 0, 0x20); + LoadPalette(&gSummaryScreen_Bg_Pal[16 * 1], 0x10, 0x20); } sMonSummaryScreen->switchMonTaskState++; @@ -5095,13 +5094,13 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) { if (sMonSummaryScreen->isEgg) { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Egg, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageEgg_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } else { - CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gBgTilemap_TrainerMemo_Details, 0, 0); - CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gBgTilemap_TrainerMemo_Stats, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->skillsPageBgNum, gSummaryScreen_PageInfo_Tilemap, 0, 0); + CopyToBgTilemapBuffer(sMonSummaryScreen->infoAndMovesPageBgNum, gSummaryScreen_PageSkills_Tilemap, 0, 0); } } sMonSummaryScreen->switchMonTaskState++; @@ -5130,7 +5129,7 @@ static void Task_PokeSum_SwitchDisplayedPokemon(u8 taskId) break; case 9: PokeSum_PrintMonTypeIcons(); - PokeSum_DrawBg3Tilemap(); + PokeSum_DrawPageProgressTiles(); PokeSum_PrintPageHeaderText(sMonSummaryScreen->curPageIndex); sMonSummaryScreen->switchMonTaskState++; break; From 981d4a34d8a6669ffc3e0d93f0be84d9eaa5567f Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:13:05 +0800 Subject: [PATCH 24/29] Rename union room chat graphics --- .../bg.bin} | Bin .../bg.png} | Bin ...45AED8.png => character_select_cursor.png} | Bin .../icons.png} | Bin .../{unk_845AA64.pal => messages.pal} | 0 .../{unk_845AC14.pal => objects.pal} | 0 .../panel.bin} | Bin .../panel.png} | Bin .../{unk_845AF04.png => r_button.png} | Bin .../{unk_845AC34.png => selector_cursor.png} | Bin .../{unk_845AA24.pal => text_entry.pal} | 0 ...{unk_845AEB8.png => text_entry_cursor.png} | Bin .../{unk_845AA44.pal => unused.pal} | 0 include/graphics.h | 14 ++--- src/graphics.c | 14 ++--- src/union_room_chat_display.c | 24 ++++---- src/union_room_chat_objects.c | 58 +++++++++++++----- 17 files changed, 69 insertions(+), 41 deletions(-) rename graphics/{interface/union_room_chat.bin => union_room_chat/bg.bin} (100%) rename graphics/{interface/union_room_chat.png => union_room_chat/bg.png} (100%) rename graphics/union_room_chat/{unk_845AED8.png => character_select_cursor.png} (100%) rename graphics/{interface/union_room_chat_icons.png => union_room_chat/icons.png} (100%) rename graphics/union_room_chat/{unk_845AA64.pal => messages.pal} (100%) rename graphics/union_room_chat/{unk_845AC14.pal => objects.pal} (100%) rename graphics/{interface/union_room_chat_panel.bin => union_room_chat/panel.bin} (100%) rename graphics/{interface/union_room_chat_panel.png => union_room_chat/panel.png} (100%) rename graphics/union_room_chat/{unk_845AF04.png => r_button.png} (100%) rename graphics/union_room_chat/{unk_845AC34.png => selector_cursor.png} (100%) rename graphics/union_room_chat/{unk_845AA24.pal => text_entry.pal} (100%) rename graphics/union_room_chat/{unk_845AEB8.png => text_entry_cursor.png} (100%) rename graphics/union_room_chat/{unk_845AA44.pal => unused.pal} (100%) diff --git a/graphics/interface/union_room_chat.bin b/graphics/union_room_chat/bg.bin similarity index 100% rename from graphics/interface/union_room_chat.bin rename to graphics/union_room_chat/bg.bin diff --git a/graphics/interface/union_room_chat.png b/graphics/union_room_chat/bg.png similarity index 100% rename from graphics/interface/union_room_chat.png rename to graphics/union_room_chat/bg.png diff --git a/graphics/union_room_chat/unk_845AED8.png b/graphics/union_room_chat/character_select_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AED8.png rename to graphics/union_room_chat/character_select_cursor.png diff --git a/graphics/interface/union_room_chat_icons.png b/graphics/union_room_chat/icons.png similarity index 100% rename from graphics/interface/union_room_chat_icons.png rename to graphics/union_room_chat/icons.png diff --git a/graphics/union_room_chat/unk_845AA64.pal b/graphics/union_room_chat/messages.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA64.pal rename to graphics/union_room_chat/messages.pal diff --git a/graphics/union_room_chat/unk_845AC14.pal b/graphics/union_room_chat/objects.pal similarity index 100% rename from graphics/union_room_chat/unk_845AC14.pal rename to graphics/union_room_chat/objects.pal diff --git a/graphics/interface/union_room_chat_panel.bin b/graphics/union_room_chat/panel.bin similarity index 100% rename from graphics/interface/union_room_chat_panel.bin rename to graphics/union_room_chat/panel.bin diff --git a/graphics/interface/union_room_chat_panel.png b/graphics/union_room_chat/panel.png similarity index 100% rename from graphics/interface/union_room_chat_panel.png rename to graphics/union_room_chat/panel.png diff --git a/graphics/union_room_chat/unk_845AF04.png b/graphics/union_room_chat/r_button.png similarity index 100% rename from graphics/union_room_chat/unk_845AF04.png rename to graphics/union_room_chat/r_button.png diff --git a/graphics/union_room_chat/unk_845AC34.png b/graphics/union_room_chat/selector_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AC34.png rename to graphics/union_room_chat/selector_cursor.png diff --git a/graphics/union_room_chat/unk_845AA24.pal b/graphics/union_room_chat/text_entry.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA24.pal rename to graphics/union_room_chat/text_entry.pal diff --git a/graphics/union_room_chat/unk_845AEB8.png b/graphics/union_room_chat/text_entry_cursor.png similarity index 100% rename from graphics/union_room_chat/unk_845AEB8.png rename to graphics/union_room_chat/text_entry_cursor.png diff --git a/graphics/union_room_chat/unk_845AA44.pal b/graphics/union_room_chat/unused.pal similarity index 100% rename from graphics/union_room_chat/unk_845AA44.pal rename to graphics/union_room_chat/unused.pal diff --git a/include/graphics.h b/include/graphics.h index 15b4ce3cc..9c0330215 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -4873,15 +4873,15 @@ extern const u32 gBagBgPalette[]; extern const u32 gBagBgPalette_FemaleOverride[]; // union_room_chat_display -extern const u16 gUnionRoomChatPanelBgPal_7[]; -extern const u32 gUnionRoomChatPanelBgTiles[]; -extern const u32 gUnionRoomChatPanelBgMap[]; -extern const u16 gLinkMiscMenu_Pal[]; -extern const u32 gLinkMiscMenu_Gfx[]; -extern const u32 gLinkMiscMenu_Tilemap[]; +extern const u16 gUnionRoomChat_Panel_Pal[]; +extern const u32 gUnionRoomChat_Panel_Gfx[]; +extern const u32 gUnionRoomChat_Panel_Tilemap[]; +extern const u16 gUnionRoomChat_Bg_Pal[]; +extern const u32 gUnionRoomChat_Bg_Gfx[]; +extern const u32 gUnionRoomChat_Bg_Tilemap[]; // union_room_chat_objects -extern const u32 gUnionRoomChatIcons[]; +extern const u32 gUnionRoomChat_Icons_Gfx[]; // battle_bg extern const u32 gFile_graphics_battle_transitions_vs_frame_sheet[]; diff --git a/src/graphics.c b/src/graphics.c index 90dbb1849..04f431469 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1232,10 +1232,10 @@ const u16 gFameCheckerBgTiles[] = INCBIN_U16("graphics/fame_checker/bg.4bpp"); const u16 gFameCheckerBg3Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap3.bin"); const u16 gFameCheckerBg2Tilemap[] = INCBIN_U16("graphics/fame_checker/tilemap2.bin"); -const u16 gLinkMiscMenu_Pal[] = INCBIN_U16("graphics/interface/union_room_chat.gbapal"); -const u32 gLinkMiscMenu_Gfx[] = INCBIN_U32("graphics/interface/union_room_chat.4bpp.lz"); -const u32 gLinkMiscMenu_Tilemap[] = INCBIN_U32("graphics/interface/union_room_chat.bin.lz"); -const u32 gUnionRoomChatIcons[] = INCBIN_U32("graphics/interface/union_room_chat_icons.4bpp.lz"); +const u16 gUnionRoomChat_Bg_Pal[] = INCBIN_U16("graphics/union_room_chat/bg.gbapal"); +const u32 gUnionRoomChat_Bg_Gfx[] = INCBIN_U32("graphics/union_room_chat/bg.4bpp.lz"); +const u32 gUnionRoomChat_Bg_Tilemap[] = INCBIN_U32("graphics/union_room_chat/bg.bin.lz"); +const u32 gUnionRoomChat_Icons_Gfx[] = INCBIN_U32("graphics/union_room_chat/icons.4bpp.lz"); const u16 gTilesetPalettes_General[][16] = { @@ -1322,9 +1322,9 @@ const u16 gTilesetPalettes_DepartmentStore[][16] = const u32 gTilesetTiles_DepartmentStore[] = INCBIN_U32("data/tilesets/secondary/department_store/tiles.4bpp.lz"); -const u16 gUnionRoomChatPanelBgPal_7[] = INCBIN_U16("graphics/interface/union_room_chat_panel.gbapal"); -const u32 gUnionRoomChatPanelBgTiles[] = INCBIN_U32("graphics/interface/union_room_chat_panel.4bpp.lz"); -const u32 gUnionRoomChatPanelBgMap[] = INCBIN_U32("graphics/interface/union_room_chat_panel.bin.lz"); +const u16 gUnionRoomChat_Panel_Pal[] = INCBIN_U16("graphics/union_room_chat/panel.gbapal"); +const u32 gUnionRoomChat_Panel_Gfx[] = INCBIN_U32("graphics/union_room_chat/panel.4bpp.lz"); +const u32 gUnionRoomChat_Panel_Tilemap[] = INCBIN_U32("graphics/union_room_chat/panel.bin.lz"); const u16 gCreditsMonPokeball_Pals[][16] = { diff --git a/src/union_room_chat_display.c b/src/union_room_chat_display.c index ab789ca83..6ded7d3af 100644 --- a/src/union_room_chat_display.c +++ b/src/union_room_chat_display.c @@ -119,9 +119,9 @@ static void InitScanlineEffect(void); static void FillScanlineEffectWithValue1col(s16 a0); static void FillScanlineEffectWithValue2col(s16 a0); -static const u16 sUnionRoomChatPanelBgPal_C[] = INCBIN_U16("graphics/union_room_chat/unk_845AA24.gbapal"); -static const u16 sBg1Pal8[] = INCBIN_U16("graphics/union_room_chat/unk_845AA44.gbapal"); -static const u16 sWin0PalF[] = INCBIN_U16("graphics/union_room_chat/unk_845AA64.gbapal"); +static const u16 sUnionRoomChat_TextEntry_Pal[] = INCBIN_U16("graphics/union_room_chat/text_entry.gbapal"); +static const u16 gUnionRoomChat_Unused_Pal[] = INCBIN_U16("graphics/union_room_chat/unused.gbapal"); // Loaded, but nothing uses it +static const u16 sUnionRoomChat_Messages_Pal[] = INCBIN_U16("graphics/union_room_chat/messages.gbapal"); static const struct BgTemplate sBgTemplates[] = { { @@ -1259,10 +1259,10 @@ static void ClearBg0(void) static void LoadUnionRoomChatPanelGfx(void) { - LoadPalette(gUnionRoomChatPanelBgPal_7, 0x70, 0x20); - LoadPalette(sUnionRoomChatPanelBgPal_C, 0xC0, 0x20); - DecompressAndCopyTileDataToVram(1, gUnionRoomChatPanelBgTiles, 0, 0, 0); - CopyToBgTilemapBuffer(1, gUnionRoomChatPanelBgMap, 0, 0); + LoadPalette(gUnionRoomChat_Panel_Pal, 0x70, 0x20); + LoadPalette(sUnionRoomChat_TextEntry_Pal, 0xC0, 0x20); + DecompressAndCopyTileDataToVram(1, gUnionRoomChat_Panel_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(1, gUnionRoomChat_Panel_Tilemap, 0, 0); CopyBgTilemapBufferToVram(1); } @@ -1270,21 +1270,21 @@ static void LoadLinkMiscMenuGfx(void) { u8 *ptr; - LoadPalette(gLinkMiscMenu_Pal, 0, 0x20); - ptr = DecompressAndCopyTileDataToVram(2, gLinkMiscMenu_Gfx, 0, 0, 0); - CopyToBgTilemapBuffer(2, gLinkMiscMenu_Tilemap, 0, 0); + LoadPalette(gUnionRoomChat_Bg_Pal, 0, 0x20); + ptr = DecompressAndCopyTileDataToVram(2, gUnionRoomChat_Bg_Gfx, 0, 0, 0); + CopyToBgTilemapBuffer(2, gUnionRoomChat_Bg_Tilemap, 0, 0); CopyBgTilemapBufferToVram(2); } static void LoadBg1Pal8(void) { - LoadPalette(sBg1Pal8, 0x80, 0x20); + LoadPalette(gUnionRoomChat_Unused_Pal, 0x80, 0x20); RequestDma3Fill(0, (void *)BG_CHAR_ADDR(1) + 0x20, 0x20, DMA3_32BIT); } static void LoadWin0(void) { - LoadPalette(sWin0PalF, 0xF0, 0x20); + LoadPalette(sUnionRoomChat_Messages_Pal, 0xF0, 0x20); PutWindowTilemap(0); FillWindowPixelBuffer(0, PIXEL_FILL(1)); CopyWindowToVram(0, COPYWIN_FULL); diff --git a/src/union_room_chat_objects.c b/src/union_room_chat_objects.c index 24590c67a..23837d2e3 100644 --- a/src/union_room_chat_objects.c +++ b/src/union_room_chat_objects.c @@ -4,6 +4,14 @@ #include "graphics.h" #include "union_room_chat.h" +enum { + GFXTAG_SELECTOR_CURSOR, + GFXTAG_CHAR_SELECT_CURSOR, + GFXTAG_TEXT_ENTRY_CURSOR, + GFXTAG_R_BUTTON, + GFXTAG_ICONS, +}; + struct UnionRoomChat3 { struct Sprite *selectorCursorSprite; @@ -19,18 +27,38 @@ static EWRAM_DATA struct UnionRoomChat3 *sWork = NULL; 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"); -static const u32 sHorizontalBarGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AEB8.4bpp.lz"); -static const u32 sMenuCursorGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AED8.4bpp.lz"); -static const u32 sRButtonGfxTiles[] = INCBIN_U32("graphics/union_room_chat/unk_845AF04.4bpp.lz"); +static const u16 sUnionRoomChatInterfacePal[] = INCBIN_U16("graphics/union_room_chat/objects.gbapal"); +static const u32 sSelectorCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/selector_cursor.4bpp.lz"); +static const u32 sTextEntryCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/text_entry_cursor.4bpp.lz"); +static const u32 sCharacterSelectCursor_Gfx[] = INCBIN_U32("graphics/union_room_chat/character_select_cursor.4bpp.lz"); +static const u32 sRButton_Gfx[] = INCBIN_U32("graphics/union_room_chat/r_button.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheets[] = { - {sSelectorCursorGfxTiles, 0x1000, 0}, - {sMenuCursorGfxTiles, 0x0040, 1}, - {sHorizontalBarGfxTiles, 0x0040, 2}, - {sRButtonGfxTiles, 0x0080, 3}, - {gUnionRoomChatIcons, 0x0400, 4} + { + .data = sSelectorCursor_Gfx, + .size = 128 * TILE_SIZE_4BPP, + .tag = GFXTAG_SELECTOR_CURSOR + }, + { + .data = sCharacterSelectCursor_Gfx, + .size = 2 * TILE_SIZE_4BPP, + .tag = GFXTAG_CHAR_SELECT_CURSOR + }, + { + .data = sTextEntryCursor_Gfx, + .size = 2 * TILE_SIZE_4BPP, + .tag = GFXTAG_TEXT_ENTRY_CURSOR + }, + { + .data = sRButton_Gfx, + .size = 4 * TILE_SIZE_4BPP, + .tag = GFXTAG_R_BUTTON + }, + { + .data = gUnionRoomChat_Icons_Gfx, + .size = 32 * TILE_SIZE_4BPP, + .tag = GFXTAG_ICONS + }, }; static const struct SpritePalette sSpritePalette = { @@ -71,7 +99,7 @@ static const union AnimCmd *const sSpriteAnims_SelectorCursor[] = { }; static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = { - .tileTag = 0, + .tileTag = GFXTAG_SELECTOR_CURSOR, .paletteTag = 0, .oam = &sOamData_64x32_1, .anims = sSpriteAnims_SelectorCursor, @@ -86,7 +114,7 @@ static const struct OamData sOamData_8x16_2 = { }; static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { - .tileTag = 2, + .tileTag = GFXTAG_TEXT_ENTRY_CURSOR, .paletteTag = 0, .oam = &sOamData_8x16_2, .anims = gDummySpriteAnimTable, @@ -95,7 +123,7 @@ static const struct SpriteTemplate sSpriteTemplate_TextEntryCursor = { }; static const struct SpriteTemplate sSpriteTemplate_CharacterSelectCursor = { - .tileTag = 1, + .tileTag = GFXTAG_CHAR_SELECT_CURSOR, .paletteTag = 0, .oam = &sOamData_8x16_2, .anims = gDummySpriteAnimTable, @@ -143,7 +171,7 @@ static const union AnimCmd *const sSpriteAnimTable_UnionRoomChatIcons[] = { }; static const struct SpriteTemplate sSpriteTemplate_RButton = { - .tileTag = 3, + .tileTag = GFXTAG_R_BUTTON, .paletteTag = 0, .oam = &sOamData_16x16_2, .anims = gDummySpriteAnimTable, @@ -152,7 +180,7 @@ static const struct SpriteTemplate sSpriteTemplate_RButton = { }; static const struct SpriteTemplate sSpriteTemplate_UnionRoomChatIcons = { - .tileTag = 4, + .tileTag = GFXTAG_ICONS, .paletteTag = 0, .oam = &sOamData_32x16_2, .anims = sSpriteAnimTable_UnionRoomChatIcons, From fed868ddf6f65269e77410d7663e56fef588a32b Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:14:14 +0800 Subject: [PATCH 25/29] Rename special anim scene graphics --- .../{unk_845973C.bin => bg.bin} | Bin .../{unk_845963C.pal => bg.pal} | 0 .../{unk_845967C.png => bg.png} | Bin .../{unk_845965C.pal => bg_tm_hm.pal} | 0 .../{unk_8459888.png => level_up.png} | Bin ...nk_8459960.png => outward_spiral_dots.png} | Bin .../{unk_84598C4.png => star.png} | Bin graphics/pokemon_special_anim/unk_8459868.pal | 19 -------- graphics/pokemon_special_anim/unk_84598A4.pal | 19 -------- graphics/pokemon_special_anim/unk_8459940.pal | 19 -------- src/pokemon_special_anim_scene.c | 42 +++++++++--------- 11 files changed, 21 insertions(+), 78 deletions(-) rename graphics/pokemon_special_anim/{unk_845973C.bin => bg.bin} (100%) rename graphics/pokemon_special_anim/{unk_845963C.pal => bg.pal} (100%) rename graphics/pokemon_special_anim/{unk_845967C.png => bg.png} (100%) rename graphics/pokemon_special_anim/{unk_845965C.pal => bg_tm_hm.pal} (100%) rename graphics/pokemon_special_anim/{unk_8459888.png => level_up.png} (100%) rename graphics/pokemon_special_anim/{unk_8459960.png => outward_spiral_dots.png} (100%) rename graphics/pokemon_special_anim/{unk_84598C4.png => star.png} (100%) delete mode 100644 graphics/pokemon_special_anim/unk_8459868.pal delete mode 100644 graphics/pokemon_special_anim/unk_84598A4.pal delete mode 100644 graphics/pokemon_special_anim/unk_8459940.pal diff --git a/graphics/pokemon_special_anim/unk_845973C.bin b/graphics/pokemon_special_anim/bg.bin similarity index 100% rename from graphics/pokemon_special_anim/unk_845973C.bin rename to graphics/pokemon_special_anim/bg.bin diff --git a/graphics/pokemon_special_anim/unk_845963C.pal b/graphics/pokemon_special_anim/bg.pal similarity index 100% rename from graphics/pokemon_special_anim/unk_845963C.pal rename to graphics/pokemon_special_anim/bg.pal diff --git a/graphics/pokemon_special_anim/unk_845967C.png b/graphics/pokemon_special_anim/bg.png similarity index 100% rename from graphics/pokemon_special_anim/unk_845967C.png rename to graphics/pokemon_special_anim/bg.png diff --git a/graphics/pokemon_special_anim/unk_845965C.pal b/graphics/pokemon_special_anim/bg_tm_hm.pal similarity index 100% rename from graphics/pokemon_special_anim/unk_845965C.pal rename to graphics/pokemon_special_anim/bg_tm_hm.pal diff --git a/graphics/pokemon_special_anim/unk_8459888.png b/graphics/pokemon_special_anim/level_up.png similarity index 100% rename from graphics/pokemon_special_anim/unk_8459888.png rename to graphics/pokemon_special_anim/level_up.png diff --git a/graphics/pokemon_special_anim/unk_8459960.png b/graphics/pokemon_special_anim/outward_spiral_dots.png similarity index 100% rename from graphics/pokemon_special_anim/unk_8459960.png rename to graphics/pokemon_special_anim/outward_spiral_dots.png diff --git a/graphics/pokemon_special_anim/unk_84598C4.png b/graphics/pokemon_special_anim/star.png similarity index 100% rename from graphics/pokemon_special_anim/unk_84598C4.png rename to graphics/pokemon_special_anim/star.png diff --git a/graphics/pokemon_special_anim/unk_8459868.pal b/graphics/pokemon_special_anim/unk_8459868.pal deleted file mode 100644 index 9448351d8..000000000 --- a/graphics/pokemon_special_anim/unk_8459868.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -255 255 255 -230 230 255 -213 213 255 -197 197 255 -180 180 255 -164 164 255 -148 148 255 -131 131 255 -115 115 255 -98 98 255 -82 82 255 -65 65 255 -49 49 255 -32 32 255 -16 16 255 diff --git a/graphics/pokemon_special_anim/unk_84598A4.pal b/graphics/pokemon_special_anim/unk_84598A4.pal deleted file mode 100644 index a13a09ed3..000000000 --- a/graphics/pokemon_special_anim/unk_84598A4.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -0 0 0 -98 90 8 -197 189 24 -246 246 0 -148 139 16 -246 238 32 -222 213 0 -213 197 0 -180 164 0 -49 41 0 -172 148 32 -189 164 49 -0 0 0 -0 0 0 -0 0 0 -0 0 0 diff --git a/graphics/pokemon_special_anim/unk_8459940.pal b/graphics/pokemon_special_anim/unk_8459940.pal deleted file mode 100644 index 7354e267b..000000000 --- a/graphics/pokemon_special_anim/unk_8459940.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -65 106 255 -255 255 255 -230 230 230 -213 213 213 -197 197 197 -180 180 180 -164 164 164 -148 148 148 -131 131 131 -115 115 115 -98 98 98 -82 82 82 -65 65 65 -49 49 49 -32 32 32 -16 16 16 diff --git a/src/pokemon_special_anim_scene.c b/src/pokemon_special_anim_scene.c index e88399ea2..216966921 100644 --- a/src/pokemon_special_anim_scene.c +++ b/src/pokemon_special_anim_scene.c @@ -49,16 +49,16 @@ static void Task_LevelUpVerticalSprites(u8 taskId); static void CreateLevelUpVerticalSprite(u8 taskId, s16 *data); 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"); -static const u32 sBg3Tiles_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845967C.4bpp.lz"); -static const u32 sBg3Map_PSA[] = INCBIN_U32("graphics/pokemon_special_anim/unk_845973C.bin.lz"); -static const u16 sSpritePals_LevelUpVertical[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459868.gbapal"); -static const u32 sSpriteTiles_LevelUpVertical[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459888.4bpp.lz"); -static const u16 sSpritePals_Star[] = INCBIN_U16("graphics/pokemon_special_anim/unk_84598A4.gbapal"); -static const u32 sSpriteTiles_Star[] = INCBIN_U32("graphics/pokemon_special_anim/unk_84598C4.4bpp.lz"); -static const u16 sSpritePals_UseItem_OutwardSpiralDots[] = INCBIN_U16("graphics/pokemon_special_anim/unk_8459940.gbapal"); -static const u32 sSpriteTiles_UseItem_OutwardSpiralDots[] = INCBIN_U32("graphics/pokemon_special_anim/unk_8459960.4bpp.lz"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg.gbapal"); +static const u16 sBg_TmHm_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/bg_tm_hm.gbapal"); +static const u32 sBg_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/bg.4bpp.lz"); +static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/pokemon_special_anim/bg.bin.lz"); +static const u16 sLevelUp_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/level_up.gbapal"); +static const u32 sLevelUp_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/level_up.4bpp.lz"); +static const u16 sStar_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/star.gbapal"); +static const u32 sStar_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/star.4bpp.lz"); +static const u16 sOutwardSpiralDots_Pal[] = INCBIN_U16("graphics/pokemon_special_anim/outward_spiral_dots.gbapal"); +static const u32 sOutwardSpiralDots_Gfx[] = INCBIN_U32("graphics/pokemon_special_anim/outward_spiral_dots.4bpp.lz"); static const struct BgTemplate sBgTemplates[] = { { @@ -116,24 +116,24 @@ static const s8 sStarCoordOffsets[][2] = { }; static const struct CompressedSpriteSheet sSpriteSheet_Star = { - sSpriteTiles_Star, + sStar_Gfx, 0x80, 2 }; static const struct SpritePalette sSpritePalette_Star = { - sSpritePals_Star, + sStar_Pal, 2 }; static const struct CompressedSpriteSheet sSpriteSheet_UseItem_OutwardSpiralDots = { - sSpriteTiles_UseItem_OutwardSpiralDots, + sOutwardSpiralDots_Gfx, 0x60, 5 }; static const struct SpritePalette sSpritePalette_UseItem_OutwardSpiralDots = { - sSpritePals_UseItem_OutwardSpiralDots, + sOutwardSpiralDots_Pal, 5 }; @@ -633,12 +633,12 @@ bool8 PSA_IsCopyingLevelUpWindowToVram(void) static void LoadBgGfxByAnimType(u16 animType) { - CopyToBgTilemapBuffer(3, sBg3Map_PSA, 0, 0x000); - DecompressAndCopyTileDataToVram(3, sBg3Tiles_PSA, 0, 0x000, 0); + CopyToBgTilemapBuffer(3, sBg_Tilemap, 0, 0x000); + DecompressAndCopyTileDataToVram(3, sBg_Gfx, 0, 0x000, 0); if (animType != 4) - LoadPalette(sBgPals_PSA_Any, 0x00, 0x20); + LoadPalette(sBg_Pal, 0x00, 0x20); else - LoadPalette(sBgPals_PSA_Anim4, 0x00, 0x20); + LoadPalette(sBg_TmHm_Pal, 0x00, 0x20); } void PSA_CreateMonSpriteAtCloseness(u8 closeness) @@ -1382,9 +1382,9 @@ void CreateLevelUpVerticalSpritesTask(u16 x, u16 y, u16 tileTag, u16 paletteTag, static struct SpritePalette spritePalette; u8 taskId; spriteSheet.tag = tileTag; - spriteSheet.data = sSpriteTiles_LevelUpVertical; - spriteSheet.size = sSpriteTiles_LevelUpVertical[0] >> 8; - spritePalette.data = sSpritePals_LevelUpVertical; + spriteSheet.data = sLevelUp_Gfx; + spriteSheet.size = sLevelUp_Gfx[0] >> 8; + spritePalette.data = sLevelUp_Pal; spritePalette.tag = paletteTag; LoadCompressedSpriteSheet(&spriteSheet); LoadSpritePalette(&spritePalette); From dd7ff3194c73d7a059e9b6d67e445d1edb24a67d Mon Sep 17 00:00:00 2001 From: cbt6 <91667135+cbt6@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:15:44 +0800 Subject: [PATCH 26/29] Rename all other graphics --- .../{unk_83E6C18.pal => unused/flying.pal} | 0 .../{unk_83FF33C.pal => unused/unknown.pal} | 0 .../{unk_83E4874.bin => unused/water.bin} | Bin .../{unk_83E44F4.png => unused/water.png} | Bin .../sparkle.png} | Bin ...F5F50.pal => champion_room_lighting_0.pal} | 0 ...F60F0.pal => champion_room_lighting_1.pal} | 0 ...F6110.pal => champion_room_lighting_2.pal} | 0 ...F6130.pal => champion_room_lighting_3.pal} | 0 ...F6150.pal => champion_room_lighting_4.pal} | 0 ...F6170.pal => champion_room_lighting_5.pal} | 0 ...F6190.pal => champion_room_lighting_6.pal} | 0 ...F61B0.pal => champion_room_lighting_7.pal} | 0 ...F60B0.pal => champion_room_lighting_8.pal} | 0 .../{unk_83F6206.pal => deoxys_rock_0.pal} | 0 .../{unk_83F6226.pal => deoxys_rock_1.pal} | 0 .../{unk_83F6346.pal => deoxys_rock_10.pal} | 0 .../{unk_83F6246.pal => deoxys_rock_2.pal} | 0 .../{unk_83F6266.pal => deoxys_rock_3.pal} | 0 .../{unk_83F6286.pal => deoxys_rock_4.pal} | 0 .../{unk_83F62A6.pal => deoxys_rock_5.pal} | 0 .../{unk_83F62C6.pal => deoxys_rock_6.pal} | 0 .../{unk_83F62E6.pal => deoxys_rock_7.pal} | 0 .../{unk_83F6306.pal => deoxys_rock_8.pal} | 0 .../{unk_83F6326.pal => deoxys_rock_9.pal} | 0 ..._83F60D0.pal => elite_four_lighting_0.pal} | 0 ..._83F5F70.pal => elite_four_lighting_1.pal} | 0 ...83F6090.pal => elite_four_lighting_10.pal} | 0 ...83F61D0.pal => elite_four_lighting_11.pal} | 0 ..._83F5F90.pal => elite_four_lighting_2.pal} | 0 ..._83F5FB0.pal => elite_four_lighting_3.pal} | 0 ..._83F5FD0.pal => elite_four_lighting_4.pal} | 0 ..._83F5FF0.pal => elite_four_lighting_5.pal} | 0 ..._83F6010.pal => elite_four_lighting_6.pal} | 0 ..._83F6030.pal => elite_four_lighting_7.pal} | 0 ..._83F6050.pal => elite_four_lighting_8.pal} | 0 ..._83F6070.pal => elite_four_lighting_9.pal} | 0 .../main_menu/{unk_8234648.pal => bg.pal} | 0 .../{unk_8234668.pal => textbox.pal} | 0 .../minigame_countdown.png} | Bin .../misc/{unk_83cc2e4.pal => option_menu.pal} | 0 graphics/misc/unk_8.pal | 19 ---- include/graphics.h | 107 ------------------ src/battle_anim_effects_3.c | 2 +- src/battle_anim_flying.c | 2 +- src/battle_anim_water.c | 4 +- src/evolution_graphics.c | 4 +- src/field_specials.c | 64 +++++------ src/main_menu.c | 8 +- src/minigame_countdown.c | 4 +- src/option_menu.c | 2 +- 51 files changed, 45 insertions(+), 171 deletions(-) rename graphics/battle_anims/{unk_83E6C18.pal => unused/flying.pal} (100%) rename graphics/battle_anims/{unk_83FF33C.pal => unused/unknown.pal} (100%) rename graphics/battle_anims/{unk_83E4874.bin => unused/water.bin} (100%) rename graphics/battle_anims/{unk_83E44F4.png => unused/water.png} (100%) rename graphics/{misc/evolution_sprite_841EEA4.png => evolution_scene/sparkle.png} (100%) rename graphics/field_specials/{unk_83F5F50.pal => champion_room_lighting_0.pal} (100%) rename graphics/field_specials/{unk_83F60F0.pal => champion_room_lighting_1.pal} (100%) rename graphics/field_specials/{unk_83F6110.pal => champion_room_lighting_2.pal} (100%) rename graphics/field_specials/{unk_83F6130.pal => champion_room_lighting_3.pal} (100%) rename graphics/field_specials/{unk_83F6150.pal => champion_room_lighting_4.pal} (100%) rename graphics/field_specials/{unk_83F6170.pal => champion_room_lighting_5.pal} (100%) rename graphics/field_specials/{unk_83F6190.pal => champion_room_lighting_6.pal} (100%) rename graphics/field_specials/{unk_83F61B0.pal => champion_room_lighting_7.pal} (100%) rename graphics/field_specials/{unk_83F60B0.pal => champion_room_lighting_8.pal} (100%) rename graphics/field_specials/{unk_83F6206.pal => deoxys_rock_0.pal} (100%) rename graphics/field_specials/{unk_83F6226.pal => deoxys_rock_1.pal} (100%) rename graphics/field_specials/{unk_83F6346.pal => deoxys_rock_10.pal} (100%) rename graphics/field_specials/{unk_83F6246.pal => deoxys_rock_2.pal} (100%) rename graphics/field_specials/{unk_83F6266.pal => deoxys_rock_3.pal} (100%) rename graphics/field_specials/{unk_83F6286.pal => deoxys_rock_4.pal} (100%) rename graphics/field_specials/{unk_83F62A6.pal => deoxys_rock_5.pal} (100%) rename graphics/field_specials/{unk_83F62C6.pal => deoxys_rock_6.pal} (100%) rename graphics/field_specials/{unk_83F62E6.pal => deoxys_rock_7.pal} (100%) rename graphics/field_specials/{unk_83F6306.pal => deoxys_rock_8.pal} (100%) rename graphics/field_specials/{unk_83F6326.pal => deoxys_rock_9.pal} (100%) rename graphics/field_specials/{unk_83F60D0.pal => elite_four_lighting_0.pal} (100%) rename graphics/field_specials/{unk_83F5F70.pal => elite_four_lighting_1.pal} (100%) rename graphics/field_specials/{unk_83F6090.pal => elite_four_lighting_10.pal} (100%) rename graphics/field_specials/{unk_83F61D0.pal => elite_four_lighting_11.pal} (100%) rename graphics/field_specials/{unk_83F5F90.pal => elite_four_lighting_2.pal} (100%) rename graphics/field_specials/{unk_83F5FB0.pal => elite_four_lighting_3.pal} (100%) rename graphics/field_specials/{unk_83F5FD0.pal => elite_four_lighting_4.pal} (100%) rename graphics/field_specials/{unk_83F5FF0.pal => elite_four_lighting_5.pal} (100%) rename graphics/field_specials/{unk_83F6010.pal => elite_four_lighting_6.pal} (100%) rename graphics/field_specials/{unk_83F6030.pal => elite_four_lighting_7.pal} (100%) rename graphics/field_specials/{unk_83F6050.pal => elite_four_lighting_8.pal} (100%) rename graphics/field_specials/{unk_83F6070.pal => elite_four_lighting_9.pal} (100%) rename graphics/main_menu/{unk_8234648.pal => bg.pal} (100%) rename graphics/main_menu/{unk_8234668.pal => textbox.pal} (100%) rename graphics/{link_games/unk_847a348.png => misc/minigame_countdown.png} (100%) rename graphics/misc/{unk_83cc2e4.pal => option_menu.pal} (100%) delete mode 100644 graphics/misc/unk_8.pal diff --git a/graphics/battle_anims/unk_83E6C18.pal b/graphics/battle_anims/unused/flying.pal similarity index 100% rename from graphics/battle_anims/unk_83E6C18.pal rename to graphics/battle_anims/unused/flying.pal diff --git a/graphics/battle_anims/unk_83FF33C.pal b/graphics/battle_anims/unused/unknown.pal similarity index 100% rename from graphics/battle_anims/unk_83FF33C.pal rename to graphics/battle_anims/unused/unknown.pal diff --git a/graphics/battle_anims/unk_83E4874.bin b/graphics/battle_anims/unused/water.bin similarity index 100% rename from graphics/battle_anims/unk_83E4874.bin rename to graphics/battle_anims/unused/water.bin diff --git a/graphics/battle_anims/unk_83E44F4.png b/graphics/battle_anims/unused/water.png similarity index 100% rename from graphics/battle_anims/unk_83E44F4.png rename to graphics/battle_anims/unused/water.png diff --git a/graphics/misc/evolution_sprite_841EEA4.png b/graphics/evolution_scene/sparkle.png similarity index 100% rename from graphics/misc/evolution_sprite_841EEA4.png rename to graphics/evolution_scene/sparkle.png diff --git a/graphics/field_specials/unk_83F5F50.pal b/graphics/field_specials/champion_room_lighting_0.pal similarity index 100% rename from graphics/field_specials/unk_83F5F50.pal rename to graphics/field_specials/champion_room_lighting_0.pal diff --git a/graphics/field_specials/unk_83F60F0.pal b/graphics/field_specials/champion_room_lighting_1.pal similarity index 100% rename from graphics/field_specials/unk_83F60F0.pal rename to graphics/field_specials/champion_room_lighting_1.pal diff --git a/graphics/field_specials/unk_83F6110.pal b/graphics/field_specials/champion_room_lighting_2.pal similarity index 100% rename from graphics/field_specials/unk_83F6110.pal rename to graphics/field_specials/champion_room_lighting_2.pal diff --git a/graphics/field_specials/unk_83F6130.pal b/graphics/field_specials/champion_room_lighting_3.pal similarity index 100% rename from graphics/field_specials/unk_83F6130.pal rename to graphics/field_specials/champion_room_lighting_3.pal diff --git a/graphics/field_specials/unk_83F6150.pal b/graphics/field_specials/champion_room_lighting_4.pal similarity index 100% rename from graphics/field_specials/unk_83F6150.pal rename to graphics/field_specials/champion_room_lighting_4.pal diff --git a/graphics/field_specials/unk_83F6170.pal b/graphics/field_specials/champion_room_lighting_5.pal similarity index 100% rename from graphics/field_specials/unk_83F6170.pal rename to graphics/field_specials/champion_room_lighting_5.pal diff --git a/graphics/field_specials/unk_83F6190.pal b/graphics/field_specials/champion_room_lighting_6.pal similarity index 100% rename from graphics/field_specials/unk_83F6190.pal rename to graphics/field_specials/champion_room_lighting_6.pal diff --git a/graphics/field_specials/unk_83F61B0.pal b/graphics/field_specials/champion_room_lighting_7.pal similarity index 100% rename from graphics/field_specials/unk_83F61B0.pal rename to graphics/field_specials/champion_room_lighting_7.pal diff --git a/graphics/field_specials/unk_83F60B0.pal b/graphics/field_specials/champion_room_lighting_8.pal similarity index 100% rename from graphics/field_specials/unk_83F60B0.pal rename to graphics/field_specials/champion_room_lighting_8.pal diff --git a/graphics/field_specials/unk_83F6206.pal b/graphics/field_specials/deoxys_rock_0.pal similarity index 100% rename from graphics/field_specials/unk_83F6206.pal rename to graphics/field_specials/deoxys_rock_0.pal diff --git a/graphics/field_specials/unk_83F6226.pal b/graphics/field_specials/deoxys_rock_1.pal similarity index 100% rename from graphics/field_specials/unk_83F6226.pal rename to graphics/field_specials/deoxys_rock_1.pal diff --git a/graphics/field_specials/unk_83F6346.pal b/graphics/field_specials/deoxys_rock_10.pal similarity index 100% rename from graphics/field_specials/unk_83F6346.pal rename to graphics/field_specials/deoxys_rock_10.pal diff --git a/graphics/field_specials/unk_83F6246.pal b/graphics/field_specials/deoxys_rock_2.pal similarity index 100% rename from graphics/field_specials/unk_83F6246.pal rename to graphics/field_specials/deoxys_rock_2.pal diff --git a/graphics/field_specials/unk_83F6266.pal b/graphics/field_specials/deoxys_rock_3.pal similarity index 100% rename from graphics/field_specials/unk_83F6266.pal rename to graphics/field_specials/deoxys_rock_3.pal diff --git a/graphics/field_specials/unk_83F6286.pal b/graphics/field_specials/deoxys_rock_4.pal similarity index 100% rename from graphics/field_specials/unk_83F6286.pal rename to graphics/field_specials/deoxys_rock_4.pal diff --git a/graphics/field_specials/unk_83F62A6.pal b/graphics/field_specials/deoxys_rock_5.pal similarity index 100% rename from graphics/field_specials/unk_83F62A6.pal rename to graphics/field_specials/deoxys_rock_5.pal diff --git a/graphics/field_specials/unk_83F62C6.pal b/graphics/field_specials/deoxys_rock_6.pal similarity index 100% rename from graphics/field_specials/unk_83F62C6.pal rename to graphics/field_specials/deoxys_rock_6.pal diff --git a/graphics/field_specials/unk_83F62E6.pal b/graphics/field_specials/deoxys_rock_7.pal similarity index 100% rename from graphics/field_specials/unk_83F62E6.pal rename to graphics/field_specials/deoxys_rock_7.pal diff --git a/graphics/field_specials/unk_83F6306.pal b/graphics/field_specials/deoxys_rock_8.pal similarity index 100% rename from graphics/field_specials/unk_83F6306.pal rename to graphics/field_specials/deoxys_rock_8.pal diff --git a/graphics/field_specials/unk_83F6326.pal b/graphics/field_specials/deoxys_rock_9.pal similarity index 100% rename from graphics/field_specials/unk_83F6326.pal rename to graphics/field_specials/deoxys_rock_9.pal diff --git a/graphics/field_specials/unk_83F60D0.pal b/graphics/field_specials/elite_four_lighting_0.pal similarity index 100% rename from graphics/field_specials/unk_83F60D0.pal rename to graphics/field_specials/elite_four_lighting_0.pal diff --git a/graphics/field_specials/unk_83F5F70.pal b/graphics/field_specials/elite_four_lighting_1.pal similarity index 100% rename from graphics/field_specials/unk_83F5F70.pal rename to graphics/field_specials/elite_four_lighting_1.pal diff --git a/graphics/field_specials/unk_83F6090.pal b/graphics/field_specials/elite_four_lighting_10.pal similarity index 100% rename from graphics/field_specials/unk_83F6090.pal rename to graphics/field_specials/elite_four_lighting_10.pal diff --git a/graphics/field_specials/unk_83F61D0.pal b/graphics/field_specials/elite_four_lighting_11.pal similarity index 100% rename from graphics/field_specials/unk_83F61D0.pal rename to graphics/field_specials/elite_four_lighting_11.pal diff --git a/graphics/field_specials/unk_83F5F90.pal b/graphics/field_specials/elite_four_lighting_2.pal similarity index 100% rename from graphics/field_specials/unk_83F5F90.pal rename to graphics/field_specials/elite_four_lighting_2.pal diff --git a/graphics/field_specials/unk_83F5FB0.pal b/graphics/field_specials/elite_four_lighting_3.pal similarity index 100% rename from graphics/field_specials/unk_83F5FB0.pal rename to graphics/field_specials/elite_four_lighting_3.pal diff --git a/graphics/field_specials/unk_83F5FD0.pal b/graphics/field_specials/elite_four_lighting_4.pal similarity index 100% rename from graphics/field_specials/unk_83F5FD0.pal rename to graphics/field_specials/elite_four_lighting_4.pal diff --git a/graphics/field_specials/unk_83F5FF0.pal b/graphics/field_specials/elite_four_lighting_5.pal similarity index 100% rename from graphics/field_specials/unk_83F5FF0.pal rename to graphics/field_specials/elite_four_lighting_5.pal diff --git a/graphics/field_specials/unk_83F6010.pal b/graphics/field_specials/elite_four_lighting_6.pal similarity index 100% rename from graphics/field_specials/unk_83F6010.pal rename to graphics/field_specials/elite_four_lighting_6.pal diff --git a/graphics/field_specials/unk_83F6030.pal b/graphics/field_specials/elite_four_lighting_7.pal similarity index 100% rename from graphics/field_specials/unk_83F6030.pal rename to graphics/field_specials/elite_four_lighting_7.pal diff --git a/graphics/field_specials/unk_83F6050.pal b/graphics/field_specials/elite_four_lighting_8.pal similarity index 100% rename from graphics/field_specials/unk_83F6050.pal rename to graphics/field_specials/elite_four_lighting_8.pal diff --git a/graphics/field_specials/unk_83F6070.pal b/graphics/field_specials/elite_four_lighting_9.pal similarity index 100% rename from graphics/field_specials/unk_83F6070.pal rename to graphics/field_specials/elite_four_lighting_9.pal diff --git a/graphics/main_menu/unk_8234648.pal b/graphics/main_menu/bg.pal similarity index 100% rename from graphics/main_menu/unk_8234648.pal rename to graphics/main_menu/bg.pal diff --git a/graphics/main_menu/unk_8234668.pal b/graphics/main_menu/textbox.pal similarity index 100% rename from graphics/main_menu/unk_8234668.pal rename to graphics/main_menu/textbox.pal diff --git a/graphics/link_games/unk_847a348.png b/graphics/misc/minigame_countdown.png similarity index 100% rename from graphics/link_games/unk_847a348.png rename to graphics/misc/minigame_countdown.png diff --git a/graphics/misc/unk_83cc2e4.pal b/graphics/misc/option_menu.pal similarity index 100% rename from graphics/misc/unk_83cc2e4.pal rename to graphics/misc/option_menu.pal diff --git a/graphics/misc/unk_8.pal b/graphics/misc/unk_8.pal deleted file mode 100644 index d7d8f43b7..000000000 --- a/graphics/misc/unk_8.pal +++ /dev/null @@ -1,19 +0,0 @@ -JASC-PAL -0100 -16 -255 24 0 -0 131 213 -32 205 255 -115 106 164 -74 156 49 -16 106 65 -238 8 8 -16 164 16 -32 32 205 -74 65 90 -139 0 74 -90 32 49 -0 115 0 -255 90 65 -24 172 164 -246 106 49 diff --git a/include/graphics.h b/include/graphics.h index 9c0330215..eceb39598 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -2751,113 +2751,6 @@ extern const u16 gFireRedMenuElements2_Pal[]; extern const u8 gItemIcon_QuestionMark[]; extern const u8 gItemIconPalette_QuestionMark[]; -extern const u8 gUnknown_08DB7AA0[]; -extern const u8 gUnknown_08DB7B34[]; -extern const u8 gUnknown_08DB7B5C[]; -extern const u8 gUnknown_08DB7BEC[]; -extern const u8 gUnknown_08DB7C08[]; -extern const u8 gUnknown_08DB7CE8[]; -extern const u8 gUnknown_08DB7D08[]; -extern const u8 gUnknown_08DB7DCC[]; -extern const u8 gUnknown_08DB7DF4[]; -extern const u8 gUnknown_08DB7EA0[]; -extern const u8 gUnknown_08DB7EC4[]; -extern const u8 gUnknown_08DB7F60[]; -extern const u8 gUnknown_08DB7F7C[]; -extern const u8 gUnknown_08DB8070[]; -extern const u8 gUnknown_08DB808C[]; -extern const u8 gUnknown_08DB8138[]; -extern const u8 gUnknown_08DB8160[]; -extern const u8 gUnknown_08DB8218[]; -extern const u8 gUnknown_08DB823C[]; -extern const u8 gUnknown_08DB8300[]; -extern const u8 gUnknown_08DB8328[]; -extern const u8 gUnknown_08DB8430[]; -extern const u8 gUnknown_08DB8458[]; -extern const u8 gUnknown_08DB8528[]; -extern const u8 gUnknown_08DB854C[]; -extern const u8 gUnknown_08DB862C[]; -extern const u8 gUnknown_08DB8654[]; -extern const u8 gUnknown_08DB86C4[]; -extern const u8 gUnknown_08DB86E0[]; -extern const u8 gUnknown_08DB8750[]; -extern const u8 gUnknown_08DB876C[]; -extern const u8 gUnknown_08DB87DC[]; -extern const u8 gUnknown_08DB87F8[]; -extern const u8 gUnknown_08DB88D8[]; -extern const u8 gUnknown_08DB8900[]; -extern const u8 gUnknown_08DB89E0[]; -extern const u8 gUnknown_08DB8A08[]; -extern const u8 gUnknown_08DB8A68[]; -extern const u8 gUnknown_08DB8A84[]; -extern const u8 gUnknown_08DB8B40[]; -extern const u8 gUnknown_08DB8B68[]; -extern const u8 gUnknown_08DB8C40[]; -extern const u8 gUnknown_08DB8C5C[]; -extern const u8 gUnknown_08DB8CF4[]; -extern const u8 gUnknown_08DB8D18[]; -extern const u8 gUnknown_08DB8DB0[]; -extern const u8 gUnknown_08DB8DD4[]; -extern const u8 gUnknown_08DB8E80[]; -extern const u8 gUnknown_08DB8EA0[]; -extern const u8 gUnknown_08DB8F58[]; -extern const u8 gUnknown_08DB8F7C[]; -extern const u8 gUnknown_08DB9038[]; -extern const u8 gUnknown_08DB9058[]; -extern const u8 gUnknown_08DB9130[]; -extern const u8 gUnknown_08DB9154[]; -extern const u8 gUnknown_08DB9218[]; -extern const u8 gUnknown_08DB9234[]; -extern const u8 gUnknown_08DB92FC[]; -extern const u8 gUnknown_08DB931C[]; -extern const u8 gUnknown_08DB93E8[]; -extern const u8 gUnknown_08DB940C[]; -extern const u8 gUnknown_08DB94CC[]; -extern const u8 gUnknown_08DB94E8[]; -extern const u8 gUnknown_08DB95AC[]; -extern const u8 gUnknown_08DB95D0[]; -extern const u8 gUnknown_08DB96C4[]; -extern const u8 gUnknown_08DB96EC[]; -extern const u8 gUnknown_08DB97F4[]; -extern const u8 gUnknown_08DB981C[]; -extern const u8 gUnknown_08DB9908[]; -extern const u8 gUnknown_08DB9930[]; -extern const u8 gUnknown_08DB9A54[]; -extern const u8 gUnknown_08DB9A7C[]; -extern const u8 gUnknown_08DB9B7C[]; -extern const u8 gUnknown_08DB9BA4[]; -extern const u8 gUnknown_08DB9CB0[]; -extern const u8 gUnknown_08DB9CD8[]; -extern const u8 gUnknown_08DB9DAC[]; -extern const u8 gUnknown_08DB9DD4[]; -extern const u8 gUnknown_08DB9EE4[]; -extern const u8 gUnknown_08DB9F08[]; -extern const u8 gUnknown_08DB9FFC[]; -extern const u8 gUnknown_08DBA020[]; -extern const u8 gUnknown_08DBA12C[]; -extern const u8 gUnknown_08DCC05C[]; -extern const u16 gUnknown_08DCC01C[]; -extern const u16 gUnknown_08DCC03C[]; -extern const u8 gUnknown_08DCC648[]; -extern const u8 gUnknown_08DCC908[]; -extern const u8 gUnknown_08DD87C0[]; -extern const u8 gUnknown_08DD8EE0[]; -extern const u16 gUnknown_08DD8780[]; -extern const u8 gUnknown_08DD90E0[]; -extern const u8 gUnknown_08DD9718[]; -extern const u16 gUnknown_08DD9080[]; -extern const u8 gUnknown_08DD98B4[]; -extern const u8 gUnknown_08DD9E58[]; -extern const u16 gUnknown_08DD9874[]; -extern const u8 gUnknown_08DDA02C[]; -extern const u8 gUnknown_08DDA63C[]; -extern const u16 gUnknown_08DD9FEC[]; -extern const u8 gUnknown_08DDA840[]; -extern const u8 gUnknown_08DDAE40[]; -extern const u16 gUnknown_08DDA800[]; -extern const u8 gUnknown_08DDB020[]; -extern const u8 gUnknown_08DDB2C4[]; -extern const u16 gUnknown_08DDAFE0[]; // fame_checker extern const u16 gFameCheckerBgPals[0x30]; diff --git a/src/battle_anim_effects_3.c b/src/battle_anim_effects_3.c index d0493ef96..9ae958193 100644 --- a/src/battle_anim_effects_3.c +++ b/src/battle_anim_effects_3.c @@ -706,7 +706,7 @@ const struct SpriteTemplate gSweetScentPetalSpriteTemplate = .callback = AnimSweetScentPetal, }; -static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unk_83FF33C.gbapal"); //Unused +static const u16 sUnusedPalette[] = INCBIN_U16("graphics/battle_anims/unused/unknown.gbapal"); static const union AnimCmd sPainSplitAnimCmds[] = { diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 0bc84e523..371aa631e 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -177,7 +177,7 @@ const struct SpriteTemplate gFallingFeatherSpriteTemplate = .callback = AnimFallingFeather, }; -static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unk_83E6C18.gbapal"); +static const u16 sUnusedPal[] = INCBIN_U16("graphics/battle_anims/unused/flying.gbapal"); static const struct SpriteTemplate sUnusedBubbleThrowSpriteTemplate = { diff --git a/src/battle_anim_water.c b/src/battle_anim_water.c index 03d65358d..390ab38f3 100644 --- a/src/battle_anim_water.c +++ b/src/battle_anim_water.c @@ -53,8 +53,8 @@ static void AnimTask_WaterSport_Step(u8); static void CreateWaterSportDroplet(struct Task *); static void CreateWaterPulseRingBubbles(struct Sprite *, s32, s32); -static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unk_83E44F4.4bpp"); -static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unk_83E4874.bin"); +static const u8 sUnusedWater_Gfx[] = INCBIN_U8("graphics/battle_anims/unused/water.4bpp"); +static const u8 sUnusedWater[] = INCBIN_U8("graphics/battle_anims/unused/water.bin"); static const union AnimCmd sAnim_RainDrop[] = { diff --git a/src/evolution_graphics.c b/src/evolution_graphics.c index 3b52e06d1..5bb28ed28 100644 --- a/src/evolution_graphics.c +++ b/src/evolution_graphics.c @@ -29,8 +29,8 @@ static void EvoTask_ShrinkOrExpandEvoSprites(u8 taskId); static void PreEvoInvisible_PostEvoVisible_KillTask(u8 taskId); static void PreEvoVisible_PostEvoInvisible_KillTask(u8 taskId); -static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/misc/evolution_sprite_841EEA4.gbapal"); -static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/misc/evolution_sprite_841EEA4.4bpp.lz"); +static const u16 sEvolutionSparklesPalData[] = INCBIN_U16("graphics/evolution_scene/sparkle.gbapal"); +static const u32 sEvolutionSparklesTileData[] = INCBIN_U32("graphics/evolution_scene/sparkle.4bpp.lz"); static const struct CompressedSpriteSheet sSpriteSheet_EvolutionSparkles[] = { { sEvolutionSparklesTileData, 0x20, 1001 }, diff --git a/src/field_specials.c b/src/field_specials.c index ba8d70cd3..b2a45b715 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -2077,30 +2077,30 @@ void DaisyMassageServices(void) } static const u16 sEliteFourLightingPalettes[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F5F50.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5F70.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5F90.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FB0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FD0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F5FF0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6010.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6030.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6050.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6070.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6090.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F60B0.gbapal") + INCBIN_U16("graphics/field_specials/elite_four_lighting_0.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_1.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_2.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_3.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_4.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_5.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_6.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_7.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_8.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_9.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_10.gbapal"), + INCBIN_U16("graphics/field_specials/elite_four_lighting_11.gbapal") }; static const u16 sChampionRoomLightingPalettes[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F60D0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F60F0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6110.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6130.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6150.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6170.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6190.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F61B0.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F61D0.gbapal") + INCBIN_U16("graphics/field_specials/champion_room_lighting_0.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_1.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_2.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_3.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_4.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_5.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_6.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_7.gbapal"), + INCBIN_U16("graphics/field_specials/champion_room_lighting_8.gbapal") }; static const u8 sEliteFourLightingTimers[] = { @@ -2319,17 +2319,17 @@ void CutMoveOpenDottedHoleDoor(void) } static const u16 sDeoxysObjectPals[][16] = { - INCBIN_U16("graphics/field_specials/unk_83F6206.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6226.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6246.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6266.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6286.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62A6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62C6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F62E6.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6306.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6326.gbapal"), - INCBIN_U16("graphics/field_specials/unk_83F6346.gbapal") + INCBIN_U16("graphics/field_specials/deoxys_rock_0.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_1.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_2.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_3.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_4.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_5.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_6.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_7.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_8.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_9.gbapal"), + INCBIN_U16("graphics/field_specials/deoxys_rock_10.gbapal") }; static const u8 sDeoxysCoords[][2] = { diff --git a/src/main_menu.c b/src/main_menu.c index d3a7619a5..057553a2e 100644 --- a/src/main_menu.c +++ b/src/main_menu.c @@ -120,8 +120,8 @@ static const struct WindowTemplate sWindowTemplate[] = { [MAIN_MENU_WINDOW_COUNT] = DUMMY_WIN_TEMPLATE }; -static const u16 sBgPal00[] = INCBIN_U16("graphics/main_menu/unk_8234648.gbapal"); -static const u16 sBgPal15[] = INCBIN_U16("graphics/main_menu/unk_8234668.gbapal"); +static const u16 sBg_Pal[] = INCBIN_U16("graphics/main_menu/bg.gbapal"); +static const u16 sTextbox_Pal[] = INCBIN_U16("graphics/main_menu/textbox.gbapal"); static const u8 sTextColor1[] = { 10, 11, 12 }; @@ -196,8 +196,8 @@ static bool32 MainMenuGpuInit(u8 a0) ChangeBgY(2, 0, 0); InitWindows(sWindowTemplate); DeactivateAllTextPrinters(); - LoadPalette(sBgPal00, 0x00, 0x20); - LoadPalette(sBgPal15, 0xF0, 0x20); + LoadPalette(sBg_Pal, 0x00, 0x20); + LoadPalette(sTextbox_Pal, 0xF0, 0x20); SetGpuReg(REG_OFFSET_WIN0H, 0); SetGpuReg(REG_OFFSET_WIN0V, 0); SetGpuReg(REG_OFFSET_WININ, 0); diff --git a/src/minigame_countdown.c b/src/minigame_countdown.c index b7495c328..e6fd9705c 100644 --- a/src/minigame_countdown.c +++ b/src/minigame_countdown.c @@ -210,8 +210,8 @@ static void SpriteCB_Start(struct Sprite *sprite) } } -static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.gbapal"); -static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/link_games/unk_847a348.4bpp.lz"); +static const u16 sSpritePal_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.gbapal"); +static const u16 sSpriteSheet_321Start[] = INCBIN_U16("graphics/misc/minigame_countdown.4bpp.lz"); static void Load321StartGfx(u16 tilesTag, u16 palTag) { diff --git a/src/option_menu.c b/src/option_menu.c index 7921a1212..9a70614aa 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -130,7 +130,7 @@ static const struct BgTemplate sOptionMenuBgTemplates[] = }, }; -static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/unk_83cc2e4.gbapal"); +static const u16 sOptionMenuPalette[] = INCBIN_U16("graphics/misc/option_menu.gbapal"); static const u16 sOptionMenuItemCounts[MENUITEM_COUNT] = {3, 2, 2, 2, 3, 10, 0}; static const u8 *const sOptionMenuItemsNames[MENUITEM_COUNT] = From ac9bd3ec8f9f8847e6adc6306cea69f77c4b3f63 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Thu, 16 Mar 2023 12:46:46 -0400 Subject: [PATCH 27/29] Treat map data as const --- include/fieldmap.h | 4 ++-- include/global.fieldmap.h | 22 ++++++++++---------- src/event_object_movement.c | 40 ++++++++++++++++++------------------- src/field_control_avatar.c | 8 ++++---- src/fieldmap.c | 30 ++++++++++++++-------------- src/itemfinder.c | 6 +++--- src/teachy_tv.c | 4 ++-- 7 files changed, 57 insertions(+), 57 deletions(-) diff --git a/include/fieldmap.h b/include/fieldmap.h index 65ab57a1e..a23b6c428 100644 --- a/include/fieldmap.h +++ b/include/fieldmap.h @@ -33,8 +33,8 @@ void GetCameraCoords(u16 *, u16 *); bool8 MapGridGetCollisionAt(s32, s32); s32 GetMapBorderIdAt(s32, s32); bool32 CanCameraMoveInDirection(s32); -const struct MapHeader * GetMapHeaderFromConnection(struct MapConnection * connection); -struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); +const struct MapHeader * GetMapHeaderFromConnection(const struct MapConnection * connection); +const struct MapConnection * GetMapConnectionAtPos(s16 x, s16 y); void ApplyGlobalTintToPaletteSlot(u8 slot, u8 count); void SaveMapView(void); u32 ExtractMetatileAttribute(u32 attributes, u8 attributeType); diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index dad5e1d62..e2828ec0c 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -92,10 +92,10 @@ struct MapLayout { /*0x00*/ s32 width; /*0x04*/ s32 height; - /*0x08*/ u16 *border; - /*0x0c*/ u16 *map; - /*0x10*/ struct Tileset *primaryTileset; - /*0x14*/ struct Tileset *secondaryTileset; + /*0x08*/ const u16 *border; + /*0x0c*/ const u16 *map; + /*0x10*/ const struct Tileset *primaryTileset; + /*0x14*/ const struct Tileset *secondaryTileset; /*0x18*/ u8 borderWidth; /*0x19*/ u8 borderHeight; }; @@ -148,7 +148,7 @@ struct CoordEvent u8 elevation; u16 trigger; u16 index; - u8 *script; + const u8 *script; }; struct BgEvent @@ -157,7 +157,7 @@ struct BgEvent u8 elevation; u8 kind; // The "kind" field determines how to access bgUnion union below. union { - u8 *script; + const u8 *script; u32 hiddenItem; // Contains all the hidden item data. See GET_HIDDEN_ITEM_* defines further up } bgUnion; }; @@ -168,10 +168,10 @@ struct MapEvents u8 warpCount; u8 coordEventCount; u8 bgEventCount; - struct ObjectEventTemplate *objectEvents; - struct WarpEvent *warps; - struct CoordEvent *coordEvents; - struct BgEvent *bgEvents; + const struct ObjectEventTemplate *objectEvents; + const struct WarpEvent *warps; + const struct CoordEvent *coordEvents; + const struct BgEvent *bgEvents; }; struct MapConnection @@ -185,7 +185,7 @@ struct MapConnection struct MapConnections { s32 count; - struct MapConnection *connections; + const struct MapConnection *connections; }; struct MapHeader diff --git a/src/event_object_movement.c b/src/event_object_movement.c index 0b3caa398..591574afc 100644 --- a/src/event_object_movement.c +++ b/src/event_object_movement.c @@ -67,9 +67,9 @@ static void SetObjectEventDynamicGraphicsId(struct ObjectEvent *); static void RemoveObjectEventInternal(struct ObjectEvent *); static u16 GetObjectEventFlagIdByObjectEventId(u8); static void UpdateObjectEventVisibility(struct ObjectEvent *, struct Sprite *); -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); +static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *, struct SpriteTemplate *, const struct SubspriteTable **); static void GetObjectEventMovingCameraOffset(s16 *, s16 *); -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8, u8, u8); static void LoadObjectEventPalette(u16); static void RemoveObjectEventIfOutsideView(struct ObjectEvent *); static void SpawnObjectEventOnReturnToField(u8 objectEventId, s16 x, s16 y); @@ -84,13 +84,13 @@ static void ObjectCB_CameraObject(struct Sprite *); static void CameraObject_0(struct Sprite *); static void CameraObject_1(struct Sprite *); static void CameraObject_2(struct Sprite *); -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count); +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count); static void ClearObjectEventMovement(struct ObjectEvent *, struct Sprite *); static void ObjectEventSetSingleMovement(struct ObjectEvent *, struct Sprite *, u8); -static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *, u8, s16, s16); -static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *, s16, s16); -static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *, s16, s16); -static void SetHideObstacleFlag(struct ObjectEventTemplate *); +static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *, u8, s16, s16); +static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *, s16, s16); +static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *, s16, s16); +static void SetHideObstacleFlag(const struct ObjectEventTemplate *); static bool8 MovementType_Disguise_Callback(struct ObjectEvent *, struct Sprite *); static bool8 MovementType_Buried_Callback(struct ObjectEvent *, struct Sprite *); static u8 MovementType_RaiseHandAndStop_Callback(struct ObjectEvent *, struct Sprite *); @@ -1309,7 +1309,7 @@ static u8 GetObjectEventIdByLocalId(u8 localId) return OBJECT_EVENTS_COUNT; } -static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) +static u8 InitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, u8 mapNum, u8 mapGroup) { struct ObjectEvent *objectEvent; const struct MapHeader *mapHeader; @@ -1388,7 +1388,7 @@ static u8 InitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, return objectEventId; } -static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y) +static bool8 ShouldInitObjectEventStateFromTemplate(const struct ObjectEventTemplate *template, bool8 isClone, s16 x, s16 y) { if (isClone && !TemplateIsObstacleAndWithinView(template, x, y)) return FALSE; @@ -1399,7 +1399,7 @@ static bool8 ShouldInitObjectEventStateFromTemplate(struct ObjectEventTemplate * return TRUE; } -static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *template, s16 x, s16 y) +static bool8 TemplateIsObstacleAndWithinView(const struct ObjectEventTemplate *template, s16 x, s16 y) { if (template->graphicsId == OBJ_EVENT_GFX_CUT_TREE || template->graphicsId == OBJ_EVENT_GFX_ROCK_SMASH_ROCK) { @@ -1422,7 +1422,7 @@ static bool8 TemplateIsObstacleAndWithinView(struct ObjectEventTemplate *templat return TRUE; } -static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTemplate *template, s16 unused1, s16 unused2) +static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(const struct ObjectEventTemplate *template, s16 unused1, s16 unused2) { if (IsMapTypeOutdoors(GetCurrentMapType())) { @@ -1459,7 +1459,7 @@ static bool8 TemplateIsObstacleAndVisibleFromConnectingMap(struct ObjectEventTem return TRUE; } -static void SetHideObstacleFlag(struct ObjectEventTemplate *template) +static void SetHideObstacleFlag(const struct ObjectEventTemplate *template) { if (template->flagId >= FLAG_TEMP_11 && template->flagId <= FLAG_TEMP_1F) FlagSet(template->flagId); @@ -1549,7 +1549,7 @@ void Unref_RemoveAllObjectEventsExceptPlayer(void) } } -static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySetupObjectEventSprite(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 spriteId; u8 objectEventId; @@ -1599,7 +1599,7 @@ static u8 TrySetupObjectEventSprite(struct ObjectEventTemplate *objectEventTempl return objectEventId; } -static u8 TrySpawnObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) +static u8 TrySpawnObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, u8 mapNum, u8 mapGroup, s16 cameraX, s16 cameraY) { u8 objectEventId; struct SpriteTemplate spriteTemplate; @@ -1653,7 +1653,7 @@ int SpawnSpecialObjectEventParameterized(u8 graphicsId, u8 movementBehavior, u8 u8 TrySpawnObjectEvent(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *objectEventTemplate; + const struct ObjectEventTemplate *objectEventTemplate; s16 cameraX, cameraY; objectEventTemplate = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); @@ -1691,7 +1691,7 @@ static void CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(u16 graphics CopyObjectGraphicsInfoToSpriteTemplate(graphicsId, sMovementTypeCallbacks[movementType], spriteTemplate, subspriteTables); } -static void MakeObjectTemplateFromObjectEventTemplate(struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) +static void MakeObjectTemplateFromObjectEventTemplate(const struct ObjectEventTemplate *objectEventTemplate, struct SpriteTemplate *spriteTemplate, const struct SubspriteTable **subspriteTables) { CopyObjectGraphicsInfoToSpriteTemplate_WithMovementType(objectEventTemplate->graphicsId, objectEventTemplate->objUnion.normal.movementType, spriteTemplate, subspriteTables); } @@ -2516,7 +2516,7 @@ const u8 *GetObjectEventScriptPointerByObjectEventId(u8 objectEventId) static u16 GetObjectEventFlagIdByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); + const struct ObjectEventTemplate *obj = GetObjectEventTemplateByLocalIdAndMap(localId, mapNum, mapGroup); #ifdef UBFIX // BUG: The function may return NULL, and attempting to read from NULL may freeze the game using modern compilers. if (obj == NULL) @@ -2571,9 +2571,9 @@ u8 GetObjectEventBerryTreeId(u8 objectEventId) return gObjectEvents[objectEventId].trainerRange_berryTreeId; } -static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) +static const struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 localId, u8 mapNum, u8 mapGroup) { - struct ObjectEventTemplate *templates; + const struct ObjectEventTemplate *templates; const struct MapHeader *mapHeader; u8 count; @@ -2591,7 +2591,7 @@ static struct ObjectEventTemplate *GetObjectEventTemplateByLocalIdAndMap(u8 loca return FindObjectEventTemplateByLocalId(localId, templates, count); } -static struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, struct ObjectEventTemplate *templates, u8 count) +static const struct ObjectEventTemplate *FindObjectEventTemplateByLocalId(u8 localId, const struct ObjectEventTemplate *templates, u8 count) { u8 i; diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 1216bec21..41ef6ab9c 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -1008,7 +1008,7 @@ static bool8 TryDoorWarp(struct MapPosition *position, u16 metatileBehavior, u8 static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct WarpEvent *warpEvent = mapHeader->events->warps; + const struct WarpEvent *warpEvent = mapHeader->events->warps; u8 warpCount = mapHeader->events->warpCount; for (i = 0; i < warpCount; i++, warpEvent++) @@ -1022,7 +1022,7 @@ static s8 GetWarpEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 e return -1; } -static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) +static const u8 *TryRunCoordEventScript(const struct CoordEvent *coordEvent) { if (coordEvent != NULL) { @@ -1045,7 +1045,7 @@ static const u8 *TryRunCoordEventScript(struct CoordEvent *coordEvent) static const u8 *GetCoordEventScriptAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { s32 i; - struct CoordEvent *coordEvents = mapHeader->events->coordEvents; + const struct CoordEvent *coordEvents = mapHeader->events->coordEvents; u8 coordEventCount = mapHeader->events->coordEventCount; for (i = 0; i < coordEventCount; i++) @@ -1101,7 +1101,7 @@ const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position) static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation) { u8 i; - struct BgEvent *bgEvents = mapHeader->events->bgEvents; + const struct BgEvent *bgEvents = mapHeader->events->bgEvents; u8 bgEventCount = mapHeader->events->bgEventCount; for (i = 0; i < bgEventCount; i++) diff --git a/src/fieldmap.c b/src/fieldmap.c index c2362f6b9..e10f1af11 100644 --- a/src/fieldmap.c +++ b/src/fieldmap.c @@ -24,15 +24,15 @@ EWRAM_DATA u8 gGlobalFieldTintMode = QL_TINT_NONE; static const struct ConnectionFlags sDummyConnectionFlags = {}; static void InitMapLayoutData(struct MapHeader *); -static void InitBackupMapLayoutData(u16 *, u16, u16); +static void InitBackupMapLayoutData(const u16 *, u16, u16); static void InitBackupMapLayoutConnections(struct MapHeader *); static void FillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillWestConnection(struct MapHeader const *, struct MapHeader const *, s32); static void FillEastConnection(struct MapHeader const *, struct MapHeader const *, s32); static void LoadSavedMapView(void); -static struct MapConnection *GetIncomingConnection(u8, s32, s32); -static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, struct MapConnection *); +static const struct MapConnection *GetIncomingConnection(u8, s32, s32); +static bool8 IsPosInIncomingConnectingMap(u8, s32, s32, const struct MapConnection *); static bool8 IsCoordInIncomingConnectingMap(s32, s32, s32, s32); static u32 GetAttributeByMetatileIdAndMapLayout(const struct MapLayout *, u16, u8); @@ -82,7 +82,7 @@ static const u8 sMetatileAttrShifts[METATILE_ATTRIBUTE_COUNT] = { [METATILE_ATTRIBUTE_7] = 31 }; -const struct MapHeader * GetMapHeaderFromConnection(struct MapConnection * connection) +const struct MapHeader * GetMapHeaderFromConnection(const struct MapConnection * connection) { return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum); } @@ -112,7 +112,7 @@ static void InitMapLayoutData(struct MapHeader * mapHeader) InitBackupMapLayoutConnections(mapHeader); } -static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) +static void InitBackupMapLayoutData(const u16 *map, u16 width, u16 height) { s32 y; u16 *dest = VMap.map; @@ -129,7 +129,7 @@ static void InitBackupMapLayoutData(u16 *map, u16 width, u16 height) static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; s32 i; gMapConnectionFlags = sDummyConnectionFlags; @@ -173,7 +173,7 @@ static void InitBackupMapLayoutConnections(struct MapHeader *mapHeader) static void FillConnection(s32 x, s32 y, const struct MapHeader *connectedMapHeader, s32 x2, s32 y2, s32 width, s32 height) { s32 i; - u16 *src; + const u16 *src; u16 *dest; s32 mapWidth; @@ -628,7 +628,7 @@ bool32 CanCameraMoveInDirection(s32 direction) return TRUE; } -static void SetPositionFromConnection(struct MapConnection *connection, int direction, s32 x, s32 y) +static void SetPositionFromConnection(const struct MapConnection *connection, int direction, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -656,7 +656,7 @@ static void SetPositionFromConnection(struct MapConnection *connection, int dire bool8 CameraMove(s32 x, s32 y) { s32 direction; - struct MapConnection *connection; + const struct MapConnection *connection; s32 old_x, old_y; gCamera.active = FALSE; direction = GetPostCameraMoveMapBorderId(x, y); @@ -683,10 +683,10 @@ bool8 CameraMove(s32 x, s32 y) return gCamera.active; } -struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) +const struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; const struct MapConnections *connections = gMapHeader.connections; s32 i; @@ -705,7 +705,7 @@ struct MapConnection *GetIncomingConnection(u8 direction, s32 x, s32 y) } -static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, struct MapConnection *connection) +static bool8 IsPosInIncomingConnectingMap(u8 direction, s32 x, s32 y, const struct MapConnection *connection) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -742,7 +742,7 @@ static bool32 IsCoordInConnectingMap(s32 coord, s32 max) return FALSE; } -static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y) +static s32 IsPosInConnectingMap(const struct MapConnection *connection, s32 x, s32 y) { struct MapHeader const *mapHeader; mapHeader = GetMapHeaderFromConnection(connection); @@ -758,10 +758,10 @@ static s32 IsPosInConnectingMap(struct MapConnection *connection, s32 x, s32 y) return FALSE; } -struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) +const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y) { s32 count; - struct MapConnection *connection; + const struct MapConnection *connection; s32 i; u8 direction; if (!gMapHeader.connections) diff --git a/src/itemfinder.c b/src/itemfinder.c index 7819b3944..deaa02661 100644 --- a/src/itemfinder.c +++ b/src/itemfinder.c @@ -287,7 +287,7 @@ static void SetNormalHiddenItem(u8 taskId) static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y) { u8 bgEventCount = events->bgEventCount; - struct BgEvent * bgEvents = events->bgEvents; + const struct BgEvent * bgEvents = events->bgEvents; u16 eventFlag; int i; @@ -309,7 +309,7 @@ static bool8 HiddenItemAtPos(const struct MapEvents * events, s16 x, s16 y) return FALSE; } -static bool8 HiddenItemInConnectedMapAtPos(struct MapConnection * connection, s32 x, s32 y) +static bool8 HiddenItemInConnectedMapAtPos(const struct MapConnection * connection, s32 x, s32 y) { const struct MapHeader * mapHeader; u16 localX, localY; @@ -372,7 +372,7 @@ static void FindHiddenItemsInConnectedMaps(u8 taskId) || var2 > curY || curY >= height) { - struct MapConnection * conn = GetMapConnectionAtPos(curX, curY); + const struct MapConnection * conn = GetMapConnectionAtPos(curX, curY); if (conn != NULL && HiddenItemInConnectedMapAtPos(conn, curX, curY) == TRUE) RegisterHiddenItemRelativeCoordsIfCloser(taskId, curX - x, curY - y); } diff --git a/src/teachy_tv.c b/src/teachy_tv.c index 0f4e79099..0d4c31434 100644 --- a/src/teachy_tv.c +++ b/src/teachy_tv.c @@ -95,7 +95,7 @@ static u8 TeachyTvGrassAnimationCheckIfNeedsToGenerateGrassObj(s16 x, s16 y); static void TeachyTvGrassAnimationObjCallback(struct Sprite *sprite); static void TeachyTvRestorePlayerPartyCallback(void); static void TeachyTvPreBattleAnimAndSetBattleCallback(u8 taskId); -static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size); +static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size); static void TeachyTvPushBackNewMapPalIndexArrayEntry(const struct MapLayout *mStruct, u16 *buf1, u8 *palIndexArray, u16 mapEntry, u16 offset); static void TeachyTvComputeMapTilesFromTilesetAndMetaTiles(const u16 *metaTilesArray, u8 *blockBuf, u8 *tileset); static void TeachyTvComputeSingleMapTileBlockFromTilesetAndMetaTiles(u8 *blockBuf, u8 *tileset, u8 metaTile); @@ -1276,7 +1276,7 @@ static void TeachyTvLoadBg3Map(u16 *buffer) Free(blockIndicesBuffer); } -static void TeachyTvLoadMapTilesetToBuffer(struct Tileset *ts, u8 *dstBuffer, u16 size) +static void TeachyTvLoadMapTilesetToBuffer(const struct Tileset *ts, u8 *dstBuffer, u16 size) { if (ts) { From adf1437074b10052c35d0f93f25611e8767b1589 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 21 Mar 2023 13:09:32 -0400 Subject: [PATCH 28/29] Format metatile labels --- include/constants/metatile_labels.h | 526 ++++++++++++++-------------- 1 file changed, 263 insertions(+), 263 deletions(-) diff --git a/include/constants/metatile_labels.h b/include/constants/metatile_labels.h index 4816800fe..86873cbf4 100644 --- a/include/constants/metatile_labels.h +++ b/include/constants/metatile_labels.h @@ -1,298 +1,298 @@ #ifndef GUARD_METATILE_LABELS_H #define GUARD_METATILE_LABELS_H -// gTileset_General -#define METATILE_General_Plain_Mowed 0x001 -#define METATILE_General_ThinTreeTop_Grass 0x00A -#define METATILE_General_WideTreeTopLeft_Grass 0x00B -#define METATILE_General_WideTreeTopRight_Grass 0x00C -#define METATILE_General_Plain_Grass 0x00D -#define METATILE_General_WideTreeTopLeft_Mowed 0x00E -#define METATILE_General_WideTreeTopRight_Mowed 0x00F -#define METATILE_General_ThinTreeTop_Mowed 0x013 -#define METATILE_General_CalmWater 0x12B -#define METATILE_General_Door 0x03D -#define METATILE_General_SlidingSingleDoor 0x062 -#define METATILE_General_SlidingDoubleDoor 0x15B - // gTileset_Building -#define METATILE_Building_PCOff 0x062 -#define METATILE_Building_PCOn 0x063 - -// gTileset_GenericBuilding1 -#define METATILE_GenericBuilding1_PlayersPCOn 0x28A -#define METATILE_GenericBuilding1_PlayersPCOff 0x28F - -// gTileset_Mart -#define METATILE_Mart_CounterMid_Top 0x2BF -#define METATILE_Mart_CounterMid_Bottom 0x2C0 - -// gTileset_PokemonCenter -#define METATILE_PokemonCenter_Floor_ShadeLeft 0x2C5 -#define METATILE_PokemonCenter_CounterBarrier 0x2F9 -#define METATILE_PokemonCenter_NetworkMachine_ScreenLeft_On 0x35A -#define METATILE_PokemonCenter_NetworkMachine_ScreenRight_On 0x35B -#define METATILE_PokemonCenter_NetworkMachine_Ruby 0x35D -#define METATILE_PokemonCenter_NetworkMachine_Sapphire 0x35F -#define METATILE_PokemonCenter_Escalator_Top_Normal 0x2E4 -#define METATILE_PokemonCenter_Escalator_Top_Transition1 0x317 -#define METATILE_PokemonCenter_Escalator_Top_Transition2 0x315 -#define METATILE_PokemonCenter_Escalator_TopNext_Normal 0x2E3 -#define METATILE_PokemonCenter_Escalator_TopNext_Transition1 0x316 -#define METATILE_PokemonCenter_Escalator_TopNext_Transition2 0x314 -#define METATILE_PokemonCenter_Escalator_TopNextRail_Normal 0x2EB -#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition1 0x31E -#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition2 0x31C -#define METATILE_PokemonCenter_Escalator_Bottom_Normal 0x2D9 -#define METATILE_PokemonCenter_Escalator_Bottom_Transition1 0x313 -#define METATILE_PokemonCenter_Escalator_Bottom_Transition2 0x311 -#define METATILE_PokemonCenter_Escalator_BottomRail_Normal 0x2D1 -#define METATILE_PokemonCenter_Escalator_BottomRail_Transition1 0x30B -#define METATILE_PokemonCenter_Escalator_BottomRail_Transition2 0x309 -#define METATILE_PokemonCenter_Escalator_BottomNext_Normal 0x2D8 -#define METATILE_PokemonCenter_Escalator_BottomNext_Transition1 0x312 -#define METATILE_PokemonCenter_Escalator_BottomNext_Transition2 0x310 -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Normal 0x2D0 -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition1 0x30A -#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition2 0x308 -#define METATILE_PokemonCenter_CableClubDoor 0x2DE +#define METATILE_Building_PCOff 0x062 +#define METATILE_Building_PCOn 0x063 // gTileset_Cave -#define METATILE_Cave_Floor_Ledge_Top 0x2D1 -#define METATILE_Cave_Floor_Ledge_Bottom 0x2E1 -#define METATILE_Cave_RockBarrier_Top 0x307 -#define METATILE_Cave_RockBarrier_Bottom 0x317 +#define METATILE_Cave_Floor_Ledge_Bottom 0x2E1 +#define METATILE_Cave_Floor_Ledge_Top 0x2D1 +#define METATILE_Cave_RockBarrier_Bottom 0x317 +#define METATILE_Cave_RockBarrier_Top 0x307 -// gTileset_PalletTown -#define METATILE_PalletTown_Door 0x2A3 -#define METATILE_PalletTown_OaksLabDoor 0x2AC - -// gTileset_ViridianCity -#define METATILE_ViridianCity_Door 0x299 - -// gTileset_ViridianForest -#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 -#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 - -// gTileset_PewterCity -#define METATILE_PewterCity_Door 0x2CE +// gTileset_CeladonCity +#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 +#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E +#define METATILE_CeladonCity_DeptStoreDoor 0x294 // gTileset_CeruleanCity -#define METATILE_CeruleanCity_Door 0x298 - -// gTileset_SeaCottage -#define METATILE_SeaCottage_Teleporter_Light_Green 0x28A -#define METATILE_SeaCottage_Teleporter_Light_Yellow 0x2B5 -#define METATILE_SeaCottage_Teleporter_Light_Red 0x2B6 -#define METATILE_SeaCottage_Teleporter_Cable_Top 0x285 -#define METATILE_SeaCottage_Teleporter_Cable_Bottom 0x2B4 -#define METATILE_SeaCottage_Teleporter_CableBall_Top 0x2B9 -#define METATILE_SeaCottage_Teleporter_CableBall_Bottom 0x2BA -#define METATILE_SeaCottage_Teleporter_Door 0x296 -#define METATILE_SeaCottage_Teleporter_Door_HalfGlowing 0x2B7 -#define METATILE_SeaCottage_Teleporter_Door_FullGlowing 0x2B8 - -// gTileset_VermilionCity -#define METATILE_VermilionCity_Door 0x29E -#define METATILE_VermilionCity_SSAnneWarp 0x2E1 - -// gTileset_VermilionGym -#define METATILE_VermilionGym_Floor 0x281 -#define METATILE_VermilionGym_Beam_MidTop 0x285 -#define METATILE_VermilionGym_Beam_MidBottom 0x28D -#define METATILE_VermilionGym_Beam_Node_TopLeft_Off 0x293 -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_Off 0x294 -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_Off 0x295 -#define METATILE_VermilionGym_Beam_Node_TopRight_Off 0x296 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Off 0x29B -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_Off 0x29C -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_Off 0x29D -#define METATILE_VermilionGym_Beam_Node_BottomRight_Off 0x29E -#define METATILE_VermilionGym_Beam_Node_TopLeft_On 0x2A9 -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_On 0x2AA -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_On 0x2AB -#define METATILE_VermilionGym_Beam_Node_TopRight_On 0x2AC -#define METATILE_VermilionGym_Beam_Node_BottomLeft_On 0x2B1 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_On 0x2B2 -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_On 0x2B3 -#define METATILE_VermilionGym_Beam_Node_BottomRight_On 0x2B4 -#define METATILE_VermilionGym_Beam_Node_TopLeft_HalfOn 0x2BB -#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_HalfOn 0x2BC -#define METATILE_VermilionGym_Beam_MidTop_HalfOn 0x2BD -#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_HalfOn 0x2BE -#define METATILE_VermilionGym_Beam_Node_TopRight_HalfOn 0x2BF -#define METATILE_VermilionGym_Beam_Node_BottomLeft_HalfOn 0x2C3 -#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_HalfOn 0x2C4 -#define METATILE_VermilionGym_Beam_MidBottom_HalfOn 0x2C5 -#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_HalfOn 0x2C6 -#define METATILE_VermilionGym_Beam_Node_BottomRight_HalfOn 0x2C7 - -// gTileset_SSAnne -#define METATILE_SSAnne_Door 0x281 - -// gTileset_LavenderTown -#define METATILE_LavenderTown_Door 0x2A2 - -// gTilset_CeladonCity -#define METATILE_CeladonCity_DeptStoreDoor 0x294 -#define METATILE_CeladonCity_CyclingRoad_Grass 0x352 -#define METATILE_CeladonCity_CyclingRoad_Mowed 0x33E - -// gTileset_DepartmentStore -#define METATILE_DepartmentStore_ElevatorDoor 0x28D - -// gTileset_GameCorner -#define METATILE_GameCorner_Floor_ShadeFull 0x292 -#define METATILE_GameCorner_Floor_StairsTop 0x29D -#define METATILE_GameCorner_StairsTop 0x29E -#define METATILE_GameCorner_StairsBottom 0x29F -#define METATILE_GameCorner_PurpleWall_Floor 0x2CF -#define METATILE_GameCorner_PurpleWall_StairsTop 0x2A6 -#define METATILE_GameCorner_PurpleWall_stairsBottom 0x2A7 -#define METATILE_GameCorner_CheckeredFloor_ShadeLeft 0x2E1 -#define METATILE_GameCorner_CounterBarrier 0x2F7 - -// gTileset_SaffronCity -#define METATILE_SaffronCity_Door 0x284 -#define METATILE_SaffronCity_SilphCoDoor 0x2BC - -// gTileset_SilphCo Includes Silph Co, Rocket Hideout/Warehouse, and all Elevators -#define METATILE_SilphCo_HideoutFloor 0x281 -#define METATILE_SilphCo_HideoutFloor_ShadeFull 0x282 -#define METATILE_SilphCo_Arrow_Up 0x2A0 -#define METATILE_SilphCo_Arrow_Left 0x2A1 -#define METATILE_SilphCo_Arrow_Down 0x2A8 -#define METATILE_SilphCo_Arrow_Right 0x2A9 -#define METATILE_SilphCo_HideoutBarrier_TopLeft_Wall 0x2C6 -#define METATILE_SilphCo_HideoutBarrier_TopRight_Wall 0x2C7 -#define METATILE_SilphCo_HideoutBarrier_TopLeft_Floor 0x2CE -#define METATILE_SilphCo_HideoutBarrier_TopRight_Floor 0x2CF -#define METATILE_SilphCo_HideoutBarrier_BottomLeft 0x2D6 -#define METATILE_SilphCo_HideoutBarrier_BottomRight 0x2D7 -#define METATILE_SilphCo_HideoutElevatorDoor 0x2AB -#define METATILE_SilphCo_ElevatorDoor 0x2E2 -#define METATILE_SilphCo_ElevatorWindow_Top0 0x2E8 -#define METATILE_SilphCo_ElevatorWindow_Top1 0x2E9 -#define METATILE_SilphCo_ElevatorWindow_Top2 0x2EA -#define METATILE_SilphCo_ElevatorWindow_Mid0 0x2F0 -#define METATILE_SilphCo_ElevatorWindow_Mid1 0x2F1 -#define METATILE_SilphCo_ElevatorWindow_Mid2 0x2F2 -#define METATILE_SilphCo_ElevatorWindow_Bottom0 0x2F8 -#define METATILE_SilphCo_ElevatorWindow_Bottom1 0x2F9 -#define METATILE_SilphCo_ElevatorWindow_Bottom2 0x2FA -#define METATILE_SilphCo_Floor 0x334 -#define METATILE_SilphCo_Floor_ShadeFull 0x335 -#define METATILE_SilphCo_Floor_WallLeftCorner 0x339 -#define METATILE_SilphCo_Floor_WallRightCorner 0x33A -#define METATILE_SilphCo_Wall_RightEdge 0x346 -#define METATILE_SilphCo_Wall_LeftEdge 0x347 -#define METATILE_SilphCo_HorizontalBarrier_TopLeft 0x3B0 -#define METATILE_SilphCo_HorizontalBarrier_TopRight 0x3B1 -#define METATILE_SilphCo_HorizontalBarrier_BottomLeft 0x3B8 -#define METATILE_SilphCo_HorizontalBarrier_BottomRight 0x3B9 -#define METATILE_SilphCo_VerticalBarrier_TopLeft 0x3C0 -#define METATILE_SilphCo_VerticalBarrier_TopRight 0x3C1 -#define METATILE_SilphCo_VerticalBarrier_MidLeft 0x3C2 -#define METATILE_SilphCo_VerticalBarrier_MidRight 0x3C3 -#define METATILE_SilphCo_VerticalBarrier_BottomLeft 0x3C4 -#define METATILE_SilphCo_VerticalBarrier_BottomRight 0x3C5 - -// gTileset_FuchsiaCity -#define METATILE_FuchsiaCity_Door 0x2BF -#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2 -#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 -#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 -#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 -#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 -#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 -#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 - -// gTileset_CinnabarIsland -#define METATILE_CinnabarIsland_LabDoor 0x2AD +#define METATILE_CeruleanCity_Door 0x298 // gTileset_CinnabarGym #define METATILE_CinnabarGym_Floor 0x281 #define METATILE_CinnabarGym_Floor_ShadeDiagonal 0x282 #define METATILE_CinnabarGym_Floor_ShadeFull 0x289 -#define METATILE_CinnabarGym_Floor_WallRightCorner 0x2C6 #define METATILE_CinnabarGym_Floor_WallLeftCorner 0x2C7 -#define METATILE_CinnabarGym_Floor_WallRightEdge 0x2CE #define METATILE_CinnabarGym_Floor_WallLeftEdge 0x2CF +#define METATILE_CinnabarGym_Floor_WallRightCorner 0x2C6 +#define METATILE_CinnabarGym_Floor_WallRightEdge 0x2CE #define METATILE_CinnabarGym_Wall_RetractedBarrier 0x2D1 -// gTileset_PokemonMansion -#define METATILE_PokemonMansion_Floor 0x284 -#define METATILE_PokemonMansion_Floor_ShadeFull 0x285 -#define METATILE_PokemonMansion_BasementFloor 0x286 -#define METATILE_PokemonMansion_BasementFloor_ShadeFull 0x287 -#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5 -#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD -#define METATILE_PokemonMansion_Wall_EndCap_Basement 0x2B0 -#define METATILE_PokemonMansion_Wall_EndCap 0x2B5 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopLeft 0x2F8 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopMid 0x2F9 -#define METATILE_PokemonMansion_Barrier_Horizontal_TopRight 0x2FA -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft 0x300 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid 0x301 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight 0x302 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft_Basement 0x354 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid_Basement 0x355 -#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight_Basement 0x356 -#define METATILE_PokemonMansion_Barrier_Vertical_TopWall 0x350 -#define METATILE_PokemonMansion_Barrier_Vertical_TopBase 0x358 -#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow 0x360 -#define METATILE_PokemonMansion_Barrier_Vertical_Mid 0x368 -#define METATILE_PokemonMansion_Barrier_Vertical_Bottom 0x370 -#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow_Basement 0x362 -#define METATILE_PokemonMansion_Barrier_Vertical_Mid_Basement 0x36A -#define METATILE_PokemonMansion_Barrier_Vertical_Bottom_Basement 0x372 -#define METATILE_PokemonMansion_Statue_BlackEyes 0x314 -#define METATILE_PokemonMansion_Statue_BlackEyes_Shade 0x315 -#define METATILE_PokemonMansion_Statue_BlackEyes_Basement 0x316 -#define METATILE_PokemonMansion_Statue_RedEyes 0x34D -#define METATILE_PokemonMansion_Statue_RedEyes_Shade 0x34E -#define METATILE_PokemonMansion_Statue_RedEyes_Basement 0x34F +// gTileset_CinnabarIsland +#define METATILE_CinnabarIsland_LabDoor 0x2AD -// gTileset_PokemonLeague -#define METATILE_PokemonLeague_Door_Top_Open 0x28E -#define METATILE_PokemonLeague_Door_Mid_Open 0x296 -#define METATILE_PokemonLeague_Entry_TopLeft_Closed 0x29D -#define METATILE_PokemonLeague_Entry_TopMid_Closed 0x29E -#define METATILE_PokemonLeague_Entry_TopRight_Closed 0x29F -#define METATILE_PokemonLeague_Entry_BottomLeft_Closed 0x2A5 -#define METATILE_PokemonLeague_Entry_BottomMid_Closed 0x2A6 -#define METATILE_PokemonLeague_Entry_BottomRight_Closed 0x2A7 -#define METATILE_PokemonLeague_Floor_ShadeFull_Lance 0x311 +// gTileset_DepartmentStore +#define METATILE_DepartmentStore_ElevatorDoor 0x28D + +// gTileset_FuchsiaCity +#define METATILE_FuchsiaCity_Door 0x2BF +#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Grass 0x300 +#define METATILE_FuchsiaCity_SafariZoneTreeTopLeft_Mowed 0x310 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Grass 0x301 +#define METATILE_FuchsiaCity_SafariZoneTreeTopMiddle_Mowed 0x311 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Grass 0x302 +#define METATILE_FuchsiaCity_SafariZoneTreeTopRight_Mowed 0x312 + +// gTileset_GameCorner +#define METATILE_GameCorner_CheckeredFloor_ShadeLeft 0x2E1 +#define METATILE_GameCorner_CounterBarrier 0x2F7 +#define METATILE_GameCorner_Floor_ShadeFull 0x292 +#define METATILE_GameCorner_Floor_StairsTop 0x29D +#define METATILE_GameCorner_PurpleWall_Floor 0x2CF +#define METATILE_GameCorner_PurpleWall_StairsTop 0x2A6 +#define METATILE_GameCorner_PurpleWall_stairsBottom 0x2A7 +#define METATILE_GameCorner_StairsBottom 0x29F +#define METATILE_GameCorner_StairsTop 0x29E + +// gTileset_General +#define METATILE_General_CalmWater 0x12B +#define METATILE_General_Door 0x03D +#define METATILE_General_Plain_Grass 0x00D +#define METATILE_General_Plain_Mowed 0x001 +#define METATILE_General_SlidingDoubleDoor 0x15B +#define METATILE_General_SlidingSingleDoor 0x062 +#define METATILE_General_ThinTreeTop_Grass 0x00A +#define METATILE_General_ThinTreeTop_Mowed 0x013 +#define METATILE_General_WideTreeTopLeft_Grass 0x00B +#define METATILE_General_WideTreeTopLeft_Mowed 0x00E +#define METATILE_General_WideTreeTopRight_Grass 0x00C +#define METATILE_General_WideTreeTopRight_Mowed 0x00F + +// gTileset_GenericBuilding1 +#define METATILE_GenericBuilding1_PlayersPCOff 0x28F +#define METATILE_GenericBuilding1_PlayersPCOn 0x28A + +// gTileset_LavenderTown +#define METATILE_LavenderTown_Door 0x2A2 + +// gTileset_Mart +#define METATILE_Mart_CounterMid_Bottom 0x2C0 +#define METATILE_Mart_CounterMid_Top 0x2BF // gTileset_MtEmber #define METATILE_MtEmber_CaveEntrance 0x346 -// gTileset_SeafoamIslands -#define METATILE_SeafoamIslands_SlidingIce 0x34B -#define METATILE_SeafoamIslands_UncrackedIce 0x359 -#define METATILE_SeafoamIslands_CrackedIce 0x35A -#define METATILE_SeafoamIslands_IceHole 0x35B +// gTileset_PalletTown +#define METATILE_PalletTown_Door 0x2A3 +#define METATILE_PalletTown_OaksLabDoor 0x2AC -// gTileset_TrainerTower -#define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 -#define METATILE_TrainerTower_CounterBarrier 0x2B4 -#define METATILE_TrainerTower_LobbyElevatorDoor 0x2C3 -#define METATILE_TrainerTower_RoofElevatorDoor 0x356 +// gTileset_PewterCity +#define METATILE_PewterCity_Door 0x2CE + +// gTileset_PokemonCenter +#define METATILE_PokemonCenter_CableClubDoor 0x2DE +#define METATILE_PokemonCenter_CounterBarrier 0x2F9 +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Normal 0x2D0 +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition1 0x30A +#define METATILE_PokemonCenter_Escalator_BottomNextRail_Transition2 0x308 +#define METATILE_PokemonCenter_Escalator_BottomNext_Normal 0x2D8 +#define METATILE_PokemonCenter_Escalator_BottomNext_Transition1 0x312 +#define METATILE_PokemonCenter_Escalator_BottomNext_Transition2 0x310 +#define METATILE_PokemonCenter_Escalator_BottomRail_Normal 0x2D1 +#define METATILE_PokemonCenter_Escalator_BottomRail_Transition1 0x30B +#define METATILE_PokemonCenter_Escalator_BottomRail_Transition2 0x309 +#define METATILE_PokemonCenter_Escalator_Bottom_Normal 0x2D9 +#define METATILE_PokemonCenter_Escalator_Bottom_Transition1 0x313 +#define METATILE_PokemonCenter_Escalator_Bottom_Transition2 0x311 +#define METATILE_PokemonCenter_Escalator_TopNextRail_Normal 0x2EB +#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition1 0x31E +#define METATILE_PokemonCenter_Escalator_TopNextRail_Transition2 0x31C +#define METATILE_PokemonCenter_Escalator_TopNext_Normal 0x2E3 +#define METATILE_PokemonCenter_Escalator_TopNext_Transition1 0x316 +#define METATILE_PokemonCenter_Escalator_TopNext_Transition2 0x314 +#define METATILE_PokemonCenter_Escalator_Top_Normal 0x2E4 +#define METATILE_PokemonCenter_Escalator_Top_Transition1 0x317 +#define METATILE_PokemonCenter_Escalator_Top_Transition2 0x315 +#define METATILE_PokemonCenter_Floor_ShadeLeft 0x2C5 +#define METATILE_PokemonCenter_NetworkMachine_Ruby 0x35D +#define METATILE_PokemonCenter_NetworkMachine_Sapphire 0x35F +#define METATILE_PokemonCenter_NetworkMachine_ScreenLeft_On 0x35A +#define METATILE_PokemonCenter_NetworkMachine_ScreenRight_On 0x35B + +// gTileset_PokemonLeague +#define METATILE_PokemonLeague_Door_Mid_Open 0x296 +#define METATILE_PokemonLeague_Door_Top_Open 0x28E +#define METATILE_PokemonLeague_Entry_BottomLeft_Closed 0x2A5 +#define METATILE_PokemonLeague_Entry_BottomMid_Closed 0x2A6 +#define METATILE_PokemonLeague_Entry_BottomRight_Closed 0x2A7 +#define METATILE_PokemonLeague_Entry_TopLeft_Closed 0x29D +#define METATILE_PokemonLeague_Entry_TopMid_Closed 0x29E +#define METATILE_PokemonLeague_Entry_TopRight_Closed 0x29F +#define METATILE_PokemonLeague_Floor_ShadeFull_Lance 0x311 + +// gTileset_PokemonMansion +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft 0x300 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomLeft_Basement 0x354 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid 0x301 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomMid_Basement 0x355 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight 0x302 +#define METATILE_PokemonMansion_Barrier_Horizontal_BottomRight_Basement 0x356 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopLeft 0x2F8 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopMid 0x2F9 +#define METATILE_PokemonMansion_Barrier_Horizontal_TopRight 0x2FA +#define METATILE_PokemonMansion_Barrier_Vertical_Bottom 0x370 +#define METATILE_PokemonMansion_Barrier_Vertical_Bottom_Basement 0x372 +#define METATILE_PokemonMansion_Barrier_Vertical_Mid 0x368 +#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow 0x360 +#define METATILE_PokemonMansion_Barrier_Vertical_MidShadow_Basement 0x362 +#define METATILE_PokemonMansion_Barrier_Vertical_Mid_Basement 0x36A +#define METATILE_PokemonMansion_Barrier_Vertical_TopBase 0x358 +#define METATILE_PokemonMansion_Barrier_Vertical_TopWall 0x350 +#define METATILE_PokemonMansion_BasementFloor 0x286 +#define METATILE_PokemonMansion_BasementFloor_ShadeFull 0x287 +#define METATILE_PokemonMansion_Floor 0x284 +#define METATILE_PokemonMansion_Floor_ShadeFull 0x285 +#define METATILE_PokemonMansion_Statue_BlackEyes 0x314 +#define METATILE_PokemonMansion_Statue_BlackEyes_Basement 0x316 +#define METATILE_PokemonMansion_Statue_BlackEyes_Shade 0x315 +#define METATILE_PokemonMansion_Statue_RedEyes 0x34D +#define METATILE_PokemonMansion_Statue_RedEyes_Basement 0x34F +#define METATILE_PokemonMansion_Statue_RedEyes_Shade 0x34E +#define METATILE_PokemonMansion_Wall_EndCap 0x2B5 +#define METATILE_PokemonMansion_Wall_EndCap_Basement 0x2B0 +#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD +#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5 + +// gTileset_SSAnne +#define METATILE_SSAnne_Door 0x281 + +// gTileset_SaffronCity +#define METATILE_SaffronCity_Door 0x284 +#define METATILE_SaffronCity_SilphCoDoor 0x2BC + +// gTileset_SeaCottage +#define METATILE_SeaCottage_Teleporter_CableBall_Bottom 0x2BA +#define METATILE_SeaCottage_Teleporter_CableBall_Top 0x2B9 +#define METATILE_SeaCottage_Teleporter_Cable_Bottom 0x2B4 +#define METATILE_SeaCottage_Teleporter_Cable_Top 0x285 +#define METATILE_SeaCottage_Teleporter_Door 0x296 +#define METATILE_SeaCottage_Teleporter_Door_FullGlowing 0x2B8 +#define METATILE_SeaCottage_Teleporter_Door_HalfGlowing 0x2B7 +#define METATILE_SeaCottage_Teleporter_Light_Green 0x28A +#define METATILE_SeaCottage_Teleporter_Light_Red 0x2B6 +#define METATILE_SeaCottage_Teleporter_Light_Yellow 0x2B5 + +// gTileset_SeafoamIslands +#define METATILE_SeafoamIslands_CrackedIce 0x35A +#define METATILE_SeafoamIslands_IceHole 0x35B +#define METATILE_SeafoamIslands_SlidingIce 0x34B +#define METATILE_SeafoamIslands_UncrackedIce 0x359 // gTileset_SeviiIslands123 -#define METATILE_SeviiIslands123_Door 0x297 -#define METATILE_SeviiIslands123_GameCornerDoor 0x29B -#define METATILE_SeviiIslands123_PokeCenterDoor 0x2EB +#define METATILE_SeviiIslands123_Door 0x297 +#define METATILE_SeviiIslands123_GameCornerDoor 0x29B +#define METATILE_SeviiIslands123_PokeCenterDoor 0x2EB // gTileset_SeviiIslands45 -#define METATILE_SeviiIslands45_Door 0x29A -#define METATILE_SeviiIslands45_DayCareDoor 0x2B9 -#define METATILE_SeviiIslands45_RocketWarehouseDoor_Locked 0x30B -#define METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked 0x2AF +#define METATILE_SeviiIslands45_DayCareDoor 0x2B9 +#define METATILE_SeviiIslands45_Door 0x29A +#define METATILE_SeviiIslands45_RocketWarehouseDoor_Locked 0x30B +#define METATILE_SeviiIslands45_RocketWarehouseDoor_Unlocked 0x2AF // gTileset_SeviiIslands67 #define METATILE_SeviiIslands67_Door 0x30C #define METATILE_SeviiIslands67_DottedHoleDoor_Closed 0x357 #define METATILE_SeviiIslands67_DottedHoleDoor_Open 0x358 +// gTileset_SilphCo +#define METATILE_SilphCo_Arrow_Down 0x2A8 +#define METATILE_SilphCo_Arrow_Left 0x2A1 +#define METATILE_SilphCo_Arrow_Right 0x2A9 +#define METATILE_SilphCo_Arrow_Up 0x2A0 +#define METATILE_SilphCo_ElevatorDoor 0x2E2 +#define METATILE_SilphCo_ElevatorWindow_Bottom0 0x2F8 +#define METATILE_SilphCo_ElevatorWindow_Bottom1 0x2F9 +#define METATILE_SilphCo_ElevatorWindow_Bottom2 0x2FA +#define METATILE_SilphCo_ElevatorWindow_Mid0 0x2F0 +#define METATILE_SilphCo_ElevatorWindow_Mid1 0x2F1 +#define METATILE_SilphCo_ElevatorWindow_Mid2 0x2F2 +#define METATILE_SilphCo_ElevatorWindow_Top0 0x2E8 +#define METATILE_SilphCo_ElevatorWindow_Top1 0x2E9 +#define METATILE_SilphCo_ElevatorWindow_Top2 0x2EA +#define METATILE_SilphCo_Floor 0x334 +#define METATILE_SilphCo_Floor_ShadeFull 0x335 +#define METATILE_SilphCo_Floor_WallLeftCorner 0x339 +#define METATILE_SilphCo_Floor_WallRightCorner 0x33A +#define METATILE_SilphCo_HideoutBarrier_BottomLeft 0x2D6 +#define METATILE_SilphCo_HideoutBarrier_BottomRight 0x2D7 +#define METATILE_SilphCo_HideoutBarrier_TopLeft_Floor 0x2CE +#define METATILE_SilphCo_HideoutBarrier_TopLeft_Wall 0x2C6 +#define METATILE_SilphCo_HideoutBarrier_TopRight_Floor 0x2CF +#define METATILE_SilphCo_HideoutBarrier_TopRight_Wall 0x2C7 +#define METATILE_SilphCo_HideoutElevatorDoor 0x2AB +#define METATILE_SilphCo_HideoutFloor 0x281 +#define METATILE_SilphCo_HideoutFloor_ShadeFull 0x282 +#define METATILE_SilphCo_HorizontalBarrier_BottomLeft 0x3B8 +#define METATILE_SilphCo_HorizontalBarrier_BottomRight 0x3B9 +#define METATILE_SilphCo_HorizontalBarrier_TopLeft 0x3B0 +#define METATILE_SilphCo_HorizontalBarrier_TopRight 0x3B1 +#define METATILE_SilphCo_VerticalBarrier_BottomLeft 0x3C4 +#define METATILE_SilphCo_VerticalBarrier_BottomRight 0x3C5 +#define METATILE_SilphCo_VerticalBarrier_MidLeft 0x3C2 +#define METATILE_SilphCo_VerticalBarrier_MidRight 0x3C3 +#define METATILE_SilphCo_VerticalBarrier_TopLeft 0x3C0 +#define METATILE_SilphCo_VerticalBarrier_TopRight 0x3C1 +#define METATILE_SilphCo_Wall_LeftEdge 0x347 +#define METATILE_SilphCo_Wall_RightEdge 0x346 + +// gTileset_TrainerTower +#define METATILE_TrainerTower_CounterBarrier 0x2B4 +#define METATILE_TrainerTower_Floor_ShadeBottomLeft 0x287 +#define METATILE_TrainerTower_LobbyElevatorDoor 0x2C3 +#define METATILE_TrainerTower_RoofElevatorDoor 0x356 + +// gTileset_VermilionCity +#define METATILE_VermilionCity_Door 0x29E +#define METATILE_VermilionCity_SSAnneWarp 0x2E1 + +// gTileset_VermilionGym +#define METATILE_VermilionGym_Beam_MidBottom 0x28D +#define METATILE_VermilionGym_Beam_MidBottom_HalfOn 0x2C5 +#define METATILE_VermilionGym_Beam_MidTop 0x285 +#define METATILE_VermilionGym_Beam_MidTop_HalfOn 0x2BD +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_HalfOn 0x2C4 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_Off 0x29C +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Edge_On 0x2B2 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_HalfOn 0x2C3 +#define METATILE_VermilionGym_Beam_Node_BottomLeft_Off 0x29B +#define METATILE_VermilionGym_Beam_Node_BottomLeft_On 0x2B1 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_HalfOn 0x2C6 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_Off 0x29D +#define METATILE_VermilionGym_Beam_Node_BottomRight_Edge_On 0x2B3 +#define METATILE_VermilionGym_Beam_Node_BottomRight_HalfOn 0x2C7 +#define METATILE_VermilionGym_Beam_Node_BottomRight_Off 0x29E +#define METATILE_VermilionGym_Beam_Node_BottomRight_On 0x2B4 +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_HalfOn 0x2BC +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_Off 0x294 +#define METATILE_VermilionGym_Beam_Node_TopLeft_Edge_On 0x2AA +#define METATILE_VermilionGym_Beam_Node_TopLeft_HalfOn 0x2BB +#define METATILE_VermilionGym_Beam_Node_TopLeft_Off 0x293 +#define METATILE_VermilionGym_Beam_Node_TopLeft_On 0x2A9 +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_HalfOn 0x2BE +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_Off 0x295 +#define METATILE_VermilionGym_Beam_Node_TopRight_Edge_On 0x2AB +#define METATILE_VermilionGym_Beam_Node_TopRight_HalfOn 0x2BF +#define METATILE_VermilionGym_Beam_Node_TopRight_Off 0x296 +#define METATILE_VermilionGym_Beam_Node_TopRight_On 0x2AC +#define METATILE_VermilionGym_Floor 0x281 + +// gTileset_ViridianCity +#define METATILE_ViridianCity_Door 0x299 + +// gTileset_ViridianForest +#define METATILE_ViridianForest_HugeTreeTopMiddle_Grass 0x284 +#define METATILE_ViridianForest_HugeTreeTopMiddle_Mowed 0x281 + #endif // GUARD_METATILE_LABELS_H From 59101819de915a2bb36aafc5bf7939205633bfc1 Mon Sep 17 00:00:00 2001 From: Frank Date: Mon, 10 Apr 2023 08:51:24 -0400 Subject: [PATCH 29/29] Added constants for nature and species length --- src/data/text/nature_names.h | 3 +- src/data/text/species_names.h | 826 +++++++++++++++++----------------- 2 files changed, 414 insertions(+), 415 deletions(-) diff --git a/src/data/text/nature_names.h b/src/data/text/nature_names.h index d0d217d9b..4c387a64c 100644 --- a/src/data/text/nature_names.h +++ b/src/data/text/nature_names.h @@ -24,8 +24,7 @@ static const u8 sSassyNatureName[] = _("SASSY"); static const u8 sCarefulNatureName[] = _("CAREFUL"); static const u8 sQuirkyNatureName[] = _("QUIRKY"); -const u8 *const gNatureNamePointers[] = -{ +const u8 *const gNatureNamePointers[NUM_NATURES] = { [NATURE_HARDY] = sHardyNatureName, [NATURE_LONELY] = sLonelyNatureName, [NATURE_BRAVE] = sBraveNatureName, diff --git a/src/data/text/species_names.h b/src/data/text/species_names.h index f30fe2969..25f2c9aa2 100644 --- a/src/data/text/species_names.h +++ b/src/data/text/species_names.h @@ -1,414 +1,414 @@ -const u8 gSpeciesNames[][11] = { - _("??????????"), - _("BULBASAUR"), - _("IVYSAUR"), - _("VENUSAUR"), - _("CHARMANDER"), - _("CHARMELEON"), - _("CHARIZARD"), - _("SQUIRTLE"), - _("WARTORTLE"), - _("BLASTOISE"), - _("CATERPIE"), - _("METAPOD"), - _("BUTTERFREE"), - _("WEEDLE"), - _("KAKUNA"), - _("BEEDRILL"), - _("PIDGEY"), - _("PIDGEOTTO"), - _("PIDGEOT"), - _("RATTATA"), - _("RATICATE"), - _("SPEAROW"), - _("FEAROW"), - _("EKANS"), - _("ARBOK"), - _("PIKACHU"), - _("RAICHU"), - _("SANDSHREW"), - _("SANDSLASH"), - _("NIDORAN♀"), - _("NIDORINA"), - _("NIDOQUEEN"), - _("NIDORAN♂"), - _("NIDORINO"), - _("NIDOKING"), - _("CLEFAIRY"), - _("CLEFABLE"), - _("VULPIX"), - _("NINETALES"), - _("JIGGLYPUFF"), - _("WIGGLYTUFF"), - _("ZUBAT"), - _("GOLBAT"), - _("ODDISH"), - _("GLOOM"), - _("VILEPLUME"), - _("PARAS"), - _("PARASECT"), - _("VENONAT"), - _("VENOMOTH"), - _("DIGLETT"), - _("DUGTRIO"), - _("MEOWTH"), - _("PERSIAN"), - _("PSYDUCK"), - _("GOLDUCK"), - _("MANKEY"), - _("PRIMEAPE"), - _("GROWLITHE"), - _("ARCANINE"), - _("POLIWAG"), - _("POLIWHIRL"), - _("POLIWRATH"), - _("ABRA"), - _("KADABRA"), - _("ALAKAZAM"), - _("MACHOP"), - _("MACHOKE"), - _("MACHAMP"), - _("BELLSPROUT"), - _("WEEPINBELL"), - _("VICTREEBEL"), - _("TENTACOOL"), - _("TENTACRUEL"), - _("GEODUDE"), - _("GRAVELER"), - _("GOLEM"), - _("PONYTA"), - _("RAPIDASH"), - _("SLOWPOKE"), - _("SLOWBRO"), - _("MAGNEMITE"), - _("MAGNETON"), - _("FARFETCH'D"), - _("DODUO"), - _("DODRIO"), - _("SEEL"), - _("DEWGONG"), - _("GRIMER"), - _("MUK"), - _("SHELLDER"), - _("CLOYSTER"), - _("GASTLY"), - _("HAUNTER"), - _("GENGAR"), - _("ONIX"), - _("DROWZEE"), - _("HYPNO"), - _("KRABBY"), - _("KINGLER"), - _("VOLTORB"), - _("ELECTRODE"), - _("EXEGGCUTE"), - _("EXEGGUTOR"), - _("CUBONE"), - _("MAROWAK"), - _("HITMONLEE"), - _("HITMONCHAN"), - _("LICKITUNG"), - _("KOFFING"), - _("WEEZING"), - _("RHYHORN"), - _("RHYDON"), - _("CHANSEY"), - _("TANGELA"), - _("KANGASKHAN"), - _("HORSEA"), - _("SEADRA"), - _("GOLDEEN"), - _("SEAKING"), - _("STARYU"), - _("STARMIE"), - _("MR. MIME"), - _("SCYTHER"), - _("JYNX"), - _("ELECTABUZZ"), - _("MAGMAR"), - _("PINSIR"), - _("TAUROS"), - _("MAGIKARP"), - _("GYARADOS"), - _("LAPRAS"), - _("DITTO"), - _("EEVEE"), - _("VAPOREON"), - _("JOLTEON"), - _("FLAREON"), - _("PORYGON"), - _("OMANYTE"), - _("OMASTAR"), - _("KABUTO"), - _("KABUTOPS"), - _("AERODACTYL"), - _("SNORLAX"), - _("ARTICUNO"), - _("ZAPDOS"), - _("MOLTRES"), - _("DRATINI"), - _("DRAGONAIR"), - _("DRAGONITE"), - _("MEWTWO"), - _("MEW"), - _("CHIKORITA"), - _("BAYLEEF"), - _("MEGANIUM"), - _("CYNDAQUIL"), - _("QUILAVA"), - _("TYPHLOSION"), - _("TOTODILE"), - _("CROCONAW"), - _("FERALIGATR"), - _("SENTRET"), - _("FURRET"), - _("HOOTHOOT"), - _("NOCTOWL"), - _("LEDYBA"), - _("LEDIAN"), - _("SPINARAK"), - _("ARIADOS"), - _("CROBAT"), - _("CHINCHOU"), - _("LANTURN"), - _("PICHU"), - _("CLEFFA"), - _("IGGLYBUFF"), - _("TOGEPI"), - _("TOGETIC"), - _("NATU"), - _("XATU"), - _("MAREEP"), - _("FLAAFFY"), - _("AMPHAROS"), - _("BELLOSSOM"), - _("MARILL"), - _("AZUMARILL"), - _("SUDOWOODO"), - _("POLITOED"), - _("HOPPIP"), - _("SKIPLOOM"), - _("JUMPLUFF"), - _("AIPOM"), - _("SUNKERN"), - _("SUNFLORA"), - _("YANMA"), - _("WOOPER"), - _("QUAGSIRE"), - _("ESPEON"), - _("UMBREON"), - _("MURKROW"), - _("SLOWKING"), - _("MISDREAVUS"), - _("UNOWN"), - _("WOBBUFFET"), - _("GIRAFARIG"), - _("PINECO"), - _("FORRETRESS"), - _("DUNSPARCE"), - _("GLIGAR"), - _("STEELIX"), - _("SNUBBULL"), - _("GRANBULL"), - _("QWILFISH"), - _("SCIZOR"), - _("SHUCKLE"), - _("HERACROSS"), - _("SNEASEL"), - _("TEDDIURSA"), - _("URSARING"), - _("SLUGMA"), - _("MAGCARGO"), - _("SWINUB"), - _("PILOSWINE"), - _("CORSOLA"), - _("REMORAID"), - _("OCTILLERY"), - _("DELIBIRD"), - _("MANTINE"), - _("SKARMORY"), - _("HOUNDOUR"), - _("HOUNDOOM"), - _("KINGDRA"), - _("PHANPY"), - _("DONPHAN"), - _("PORYGON2"), - _("STANTLER"), - _("SMEARGLE"), - _("TYROGUE"), - _("HITMONTOP"), - _("SMOOCHUM"), - _("ELEKID"), - _("MAGBY"), - _("MILTANK"), - _("BLISSEY"), - _("RAIKOU"), - _("ENTEI"), - _("SUICUNE"), - _("LARVITAR"), - _("PUPITAR"), - _("TYRANITAR"), - _("LUGIA"), - _("HO-OH"), - _("CELEBI"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("?"), - _("TREECKO"), - _("GROVYLE"), - _("SCEPTILE"), - _("TORCHIC"), - _("COMBUSKEN"), - _("BLAZIKEN"), - _("MUDKIP"), - _("MARSHTOMP"), - _("SWAMPERT"), - _("POOCHYENA"), - _("MIGHTYENA"), - _("ZIGZAGOON"), - _("LINOONE"), - _("WURMPLE"), - _("SILCOON"), - _("BEAUTIFLY"), - _("CASCOON"), - _("DUSTOX"), - _("LOTAD"), - _("LOMBRE"), - _("LUDICOLO"), - _("SEEDOT"), - _("NUZLEAF"), - _("SHIFTRY"), - _("NINCADA"), - _("NINJASK"), - _("SHEDINJA"), - _("TAILLOW"), - _("SWELLOW"), - _("SHROOMISH"), - _("BRELOOM"), - _("SPINDA"), - _("WINGULL"), - _("PELIPPER"), - _("SURSKIT"), - _("MASQUERAIN"), - _("WAILMER"), - _("WAILORD"), - _("SKITTY"), - _("DELCATTY"), - _("KECLEON"), - _("BALTOY"), - _("CLAYDOL"), - _("NOSEPASS"), - _("TORKOAL"), - _("SABLEYE"), - _("BARBOACH"), - _("WHISCASH"), - _("LUVDISC"), - _("CORPHISH"), - _("CRAWDAUNT"), - _("FEEBAS"), - _("MILOTIC"), - _("CARVANHA"), - _("SHARPEDO"), - _("TRAPINCH"), - _("VIBRAVA"), - _("FLYGON"), - _("MAKUHITA"), - _("HARIYAMA"), - _("ELECTRIKE"), - _("MANECTRIC"), - _("NUMEL"), - _("CAMERUPT"), - _("SPHEAL"), - _("SEALEO"), - _("WALREIN"), - _("CACNEA"), - _("CACTURNE"), - _("SNORUNT"), - _("GLALIE"), - _("LUNATONE"), - _("SOLROCK"), - _("AZURILL"), - _("SPOINK"), - _("GRUMPIG"), - _("PLUSLE"), - _("MINUN"), - _("MAWILE"), - _("MEDITITE"), - _("MEDICHAM"), - _("SWABLU"), - _("ALTARIA"), - _("WYNAUT"), - _("DUSKULL"), - _("DUSCLOPS"), - _("ROSELIA"), - _("SLAKOTH"), - _("VIGOROTH"), - _("SLAKING"), - _("GULPIN"), - _("SWALOT"), - _("TROPIUS"), - _("WHISMUR"), - _("LOUDRED"), - _("EXPLOUD"), - _("CLAMPERL"), - _("HUNTAIL"), - _("GOREBYSS"), - _("ABSOL"), - _("SHUPPET"), - _("BANETTE"), - _("SEVIPER"), - _("ZANGOOSE"), - _("RELICANTH"), - _("ARON"), - _("LAIRON"), - _("AGGRON"), - _("CASTFORM"), - _("VOLBEAT"), - _("ILLUMISE"), - _("LILEEP"), - _("CRADILY"), - _("ANORITH"), - _("ARMALDO"), - _("RALTS"), - _("KIRLIA"), - _("GARDEVOIR"), - _("BAGON"), - _("SHELGON"), - _("SALAMENCE"), - _("BELDUM"), - _("METANG"), - _("METAGROSS"), - _("REGIROCK"), - _("REGICE"), - _("REGISTEEL"), - _("KYOGRE"), - _("GROUDON"), - _("RAYQUAZA"), - _("LATIAS"), - _("LATIOS"), - _("JIRACHI"), - _("DEOXYS"), - _("CHIMECHO") +const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1] = { + [SPECIES_NONE] = _("??????????"), + [SPECIES_BULBASAUR] = _("BULBASAUR"), + [SPECIES_IVYSAUR] = _("IVYSAUR"), + [SPECIES_VENUSAUR] = _("VENUSAUR"), + [SPECIES_CHARMANDER] = _("CHARMANDER"), + [SPECIES_CHARMELEON] = _("CHARMELEON"), + [SPECIES_CHARIZARD] = _("CHARIZARD"), + [SPECIES_SQUIRTLE] = _("SQUIRTLE"), + [SPECIES_WARTORTLE] = _("WARTORTLE"), + [SPECIES_BLASTOISE] = _("BLASTOISE"), + [SPECIES_CATERPIE] = _("CATERPIE"), + [SPECIES_METAPOD] = _("METAPOD"), + [SPECIES_BUTTERFREE] = _("BUTTERFREE"), + [SPECIES_WEEDLE] = _("WEEDLE"), + [SPECIES_KAKUNA] = _("KAKUNA"), + [SPECIES_BEEDRILL] = _("BEEDRILL"), + [SPECIES_PIDGEY] = _("PIDGEY"), + [SPECIES_PIDGEOTTO] = _("PIDGEOTTO"), + [SPECIES_PIDGEOT] = _("PIDGEOT"), + [SPECIES_RATTATA] = _("RATTATA"), + [SPECIES_RATICATE] = _("RATICATE"), + [SPECIES_SPEAROW] = _("SPEAROW"), + [SPECIES_FEAROW] = _("FEAROW"), + [SPECIES_EKANS] = _("EKANS"), + [SPECIES_ARBOK] = _("ARBOK"), + [SPECIES_PIKACHU] = _("PIKACHU"), + [SPECIES_RAICHU] = _("RAICHU"), + [SPECIES_SANDSHREW] = _("SANDSHREW"), + [SPECIES_SANDSLASH] = _("SANDSLASH"), + [SPECIES_NIDORAN_F] = _("NIDORAN♀"), + [SPECIES_NIDORINA] = _("NIDORINA"), + [SPECIES_NIDOQUEEN] = _("NIDOQUEEN"), + [SPECIES_NIDORAN_M] = _("NIDORAN♂"), + [SPECIES_NIDORINO] = _("NIDORINO"), + [SPECIES_NIDOKING] = _("NIDOKING"), + [SPECIES_CLEFAIRY] = _("CLEFAIRY"), + [SPECIES_CLEFABLE] = _("CLEFABLE"), + [SPECIES_VULPIX] = _("VULPIX"), + [SPECIES_NINETALES] = _("NINETALES"), + [SPECIES_JIGGLYPUFF] = _("JIGGLYPUFF"), + [SPECIES_WIGGLYTUFF] = _("WIGGLYTUFF"), + [SPECIES_ZUBAT] = _("ZUBAT"), + [SPECIES_GOLBAT] = _("GOLBAT"), + [SPECIES_ODDISH] = _("ODDISH"), + [SPECIES_GLOOM] = _("GLOOM"), + [SPECIES_VILEPLUME] = _("VILEPLUME"), + [SPECIES_PARAS] = _("PARAS"), + [SPECIES_PARASECT] = _("PARASECT"), + [SPECIES_VENONAT] = _("VENONAT"), + [SPECIES_VENOMOTH] = _("VENOMOTH"), + [SPECIES_DIGLETT] = _("DIGLETT"), + [SPECIES_DUGTRIO] = _("DUGTRIO"), + [SPECIES_MEOWTH] = _("MEOWTH"), + [SPECIES_PERSIAN] = _("PERSIAN"), + [SPECIES_PSYDUCK] = _("PSYDUCK"), + [SPECIES_GOLDUCK] = _("GOLDUCK"), + [SPECIES_MANKEY] = _("MANKEY"), + [SPECIES_PRIMEAPE] = _("PRIMEAPE"), + [SPECIES_GROWLITHE] = _("GROWLITHE"), + [SPECIES_ARCANINE] = _("ARCANINE"), + [SPECIES_POLIWAG] = _("POLIWAG"), + [SPECIES_POLIWHIRL] = _("POLIWHIRL"), + [SPECIES_POLIWRATH] = _("POLIWRATH"), + [SPECIES_ABRA] = _("ABRA"), + [SPECIES_KADABRA] = _("KADABRA"), + [SPECIES_ALAKAZAM] = _("ALAKAZAM"), + [SPECIES_MACHOP] = _("MACHOP"), + [SPECIES_MACHOKE] = _("MACHOKE"), + [SPECIES_MACHAMP] = _("MACHAMP"), + [SPECIES_BELLSPROUT] = _("BELLSPROUT"), + [SPECIES_WEEPINBELL] = _("WEEPINBELL"), + [SPECIES_VICTREEBEL] = _("VICTREEBEL"), + [SPECIES_TENTACOOL] = _("TENTACOOL"), + [SPECIES_TENTACRUEL] = _("TENTACRUEL"), + [SPECIES_GEODUDE] = _("GEODUDE"), + [SPECIES_GRAVELER] = _("GRAVELER"), + [SPECIES_GOLEM] = _("GOLEM"), + [SPECIES_PONYTA] = _("PONYTA"), + [SPECIES_RAPIDASH] = _("RAPIDASH"), + [SPECIES_SLOWPOKE] = _("SLOWPOKE"), + [SPECIES_SLOWBRO] = _("SLOWBRO"), + [SPECIES_MAGNEMITE] = _("MAGNEMITE"), + [SPECIES_MAGNETON] = _("MAGNETON"), + [SPECIES_FARFETCHD] = _("FARFETCH'D"), + [SPECIES_DODUO] = _("DODUO"), + [SPECIES_DODRIO] = _("DODRIO"), + [SPECIES_SEEL] = _("SEEL"), + [SPECIES_DEWGONG] = _("DEWGONG"), + [SPECIES_GRIMER] = _("GRIMER"), + [SPECIES_MUK] = _("MUK"), + [SPECIES_SHELLDER] = _("SHELLDER"), + [SPECIES_CLOYSTER] = _("CLOYSTER"), + [SPECIES_GASTLY] = _("GASTLY"), + [SPECIES_HAUNTER] = _("HAUNTER"), + [SPECIES_GENGAR] = _("GENGAR"), + [SPECIES_ONIX] = _("ONIX"), + [SPECIES_DROWZEE] = _("DROWZEE"), + [SPECIES_HYPNO] = _("HYPNO"), + [SPECIES_KRABBY] = _("KRABBY"), + [SPECIES_KINGLER] = _("KINGLER"), + [SPECIES_VOLTORB] = _("VOLTORB"), + [SPECIES_ELECTRODE] = _("ELECTRODE"), + [SPECIES_EXEGGCUTE] = _("EXEGGCUTE"), + [SPECIES_EXEGGUTOR] = _("EXEGGUTOR"), + [SPECIES_CUBONE] = _("CUBONE"), + [SPECIES_MAROWAK] = _("MAROWAK"), + [SPECIES_HITMONLEE] = _("HITMONLEE"), + [SPECIES_HITMONCHAN] = _("HITMONCHAN"), + [SPECIES_LICKITUNG] = _("LICKITUNG"), + [SPECIES_KOFFING] = _("KOFFING"), + [SPECIES_WEEZING] = _("WEEZING"), + [SPECIES_RHYHORN] = _("RHYHORN"), + [SPECIES_RHYDON] = _("RHYDON"), + [SPECIES_CHANSEY] = _("CHANSEY"), + [SPECIES_TANGELA] = _("TANGELA"), + [SPECIES_KANGASKHAN] = _("KANGASKHAN"), + [SPECIES_HORSEA] = _("HORSEA"), + [SPECIES_SEADRA] = _("SEADRA"), + [SPECIES_GOLDEEN] = _("GOLDEEN"), + [SPECIES_SEAKING] = _("SEAKING"), + [SPECIES_STARYU] = _("STARYU"), + [SPECIES_STARMIE] = _("STARMIE"), + [SPECIES_MR_MIME] = _("MR. MIME"), + [SPECIES_SCYTHER] = _("SCYTHER"), + [SPECIES_JYNX] = _("JYNX"), + [SPECIES_ELECTABUZZ] = _("ELECTABUZZ"), + [SPECIES_MAGMAR] = _("MAGMAR"), + [SPECIES_PINSIR] = _("PINSIR"), + [SPECIES_TAUROS] = _("TAUROS"), + [SPECIES_MAGIKARP] = _("MAGIKARP"), + [SPECIES_GYARADOS] = _("GYARADOS"), + [SPECIES_LAPRAS] = _("LAPRAS"), + [SPECIES_DITTO] = _("DITTO"), + [SPECIES_EEVEE] = _("EEVEE"), + [SPECIES_VAPOREON] = _("VAPOREON"), + [SPECIES_JOLTEON] = _("JOLTEON"), + [SPECIES_FLAREON] = _("FLAREON"), + [SPECIES_PORYGON] = _("PORYGON"), + [SPECIES_OMANYTE] = _("OMANYTE"), + [SPECIES_OMASTAR] = _("OMASTAR"), + [SPECIES_KABUTO] = _("KABUTO"), + [SPECIES_KABUTOPS] = _("KABUTOPS"), + [SPECIES_AERODACTYL] = _("AERODACTYL"), + [SPECIES_SNORLAX] = _("SNORLAX"), + [SPECIES_ARTICUNO] = _("ARTICUNO"), + [SPECIES_ZAPDOS] = _("ZAPDOS"), + [SPECIES_MOLTRES] = _("MOLTRES"), + [SPECIES_DRATINI] = _("DRATINI"), + [SPECIES_DRAGONAIR] = _("DRAGONAIR"), + [SPECIES_DRAGONITE] = _("DRAGONITE"), + [SPECIES_MEWTWO] = _("MEWTWO"), + [SPECIES_MEW] = _("MEW"), + [SPECIES_CHIKORITA] = _("CHIKORITA"), + [SPECIES_BAYLEEF] = _("BAYLEEF"), + [SPECIES_MEGANIUM] = _("MEGANIUM"), + [SPECIES_CYNDAQUIL] = _("CYNDAQUIL"), + [SPECIES_QUILAVA] = _("QUILAVA"), + [SPECIES_TYPHLOSION] = _("TYPHLOSION"), + [SPECIES_TOTODILE] = _("TOTODILE"), + [SPECIES_CROCONAW] = _("CROCONAW"), + [SPECIES_FERALIGATR] = _("FERALIGATR"), + [SPECIES_SENTRET] = _("SENTRET"), + [SPECIES_FURRET] = _("FURRET"), + [SPECIES_HOOTHOOT] = _("HOOTHOOT"), + [SPECIES_NOCTOWL] = _("NOCTOWL"), + [SPECIES_LEDYBA] = _("LEDYBA"), + [SPECIES_LEDIAN] = _("LEDIAN"), + [SPECIES_SPINARAK] = _("SPINARAK"), + [SPECIES_ARIADOS] = _("ARIADOS"), + [SPECIES_CROBAT] = _("CROBAT"), + [SPECIES_CHINCHOU] = _("CHINCHOU"), + [SPECIES_LANTURN] = _("LANTURN"), + [SPECIES_PICHU] = _("PICHU"), + [SPECIES_CLEFFA] = _("CLEFFA"), + [SPECIES_IGGLYBUFF] = _("IGGLYBUFF"), + [SPECIES_TOGEPI] = _("TOGEPI"), + [SPECIES_TOGETIC] = _("TOGETIC"), + [SPECIES_NATU] = _("NATU"), + [SPECIES_XATU] = _("XATU"), + [SPECIES_MAREEP] = _("MAREEP"), + [SPECIES_FLAAFFY] = _("FLAAFFY"), + [SPECIES_AMPHAROS] = _("AMPHAROS"), + [SPECIES_BELLOSSOM] = _("BELLOSSOM"), + [SPECIES_MARILL] = _("MARILL"), + [SPECIES_AZUMARILL] = _("AZUMARILL"), + [SPECIES_SUDOWOODO] = _("SUDOWOODO"), + [SPECIES_POLITOED] = _("POLITOED"), + [SPECIES_HOPPIP] = _("HOPPIP"), + [SPECIES_SKIPLOOM] = _("SKIPLOOM"), + [SPECIES_JUMPLUFF] = _("JUMPLUFF"), + [SPECIES_AIPOM] = _("AIPOM"), + [SPECIES_SUNKERN] = _("SUNKERN"), + [SPECIES_SUNFLORA] = _("SUNFLORA"), + [SPECIES_YANMA] = _("YANMA"), + [SPECIES_WOOPER] = _("WOOPER"), + [SPECIES_QUAGSIRE] = _("QUAGSIRE"), + [SPECIES_ESPEON] = _("ESPEON"), + [SPECIES_UMBREON] = _("UMBREON"), + [SPECIES_MURKROW] = _("MURKROW"), + [SPECIES_SLOWKING] = _("SLOWKING"), + [SPECIES_MISDREAVUS] = _("MISDREAVUS"), + [SPECIES_UNOWN] = _("UNOWN"), + [SPECIES_WOBBUFFET] = _("WOBBUFFET"), + [SPECIES_GIRAFARIG] = _("GIRAFARIG"), + [SPECIES_PINECO] = _("PINECO"), + [SPECIES_FORRETRESS] = _("FORRETRESS"), + [SPECIES_DUNSPARCE] = _("DUNSPARCE"), + [SPECIES_GLIGAR] = _("GLIGAR"), + [SPECIES_STEELIX] = _("STEELIX"), + [SPECIES_SNUBBULL] = _("SNUBBULL"), + [SPECIES_GRANBULL] = _("GRANBULL"), + [SPECIES_QWILFISH] = _("QWILFISH"), + [SPECIES_SCIZOR] = _("SCIZOR"), + [SPECIES_SHUCKLE] = _("SHUCKLE"), + [SPECIES_HERACROSS] = _("HERACROSS"), + [SPECIES_SNEASEL] = _("SNEASEL"), + [SPECIES_TEDDIURSA] = _("TEDDIURSA"), + [SPECIES_URSARING] = _("URSARING"), + [SPECIES_SLUGMA] = _("SLUGMA"), + [SPECIES_MAGCARGO] = _("MAGCARGO"), + [SPECIES_SWINUB] = _("SWINUB"), + [SPECIES_PILOSWINE] = _("PILOSWINE"), + [SPECIES_CORSOLA] = _("CORSOLA"), + [SPECIES_REMORAID] = _("REMORAID"), + [SPECIES_OCTILLERY] = _("OCTILLERY"), + [SPECIES_DELIBIRD] = _("DELIBIRD"), + [SPECIES_MANTINE] = _("MANTINE"), + [SPECIES_SKARMORY] = _("SKARMORY"), + [SPECIES_HOUNDOUR] = _("HOUNDOUR"), + [SPECIES_HOUNDOOM] = _("HOUNDOOM"), + [SPECIES_KINGDRA] = _("KINGDRA"), + [SPECIES_PHANPY] = _("PHANPY"), + [SPECIES_DONPHAN] = _("DONPHAN"), + [SPECIES_PORYGON2] = _("PORYGON2"), + [SPECIES_STANTLER] = _("STANTLER"), + [SPECIES_SMEARGLE] = _("SMEARGLE"), + [SPECIES_TYROGUE] = _("TYROGUE"), + [SPECIES_HITMONTOP] = _("HITMONTOP"), + [SPECIES_SMOOCHUM] = _("SMOOCHUM"), + [SPECIES_ELEKID] = _("ELEKID"), + [SPECIES_MAGBY] = _("MAGBY"), + [SPECIES_MILTANK] = _("MILTANK"), + [SPECIES_BLISSEY] = _("BLISSEY"), + [SPECIES_RAIKOU] = _("RAIKOU"), + [SPECIES_ENTEI] = _("ENTEI"), + [SPECIES_SUICUNE] = _("SUICUNE"), + [SPECIES_LARVITAR] = _("LARVITAR"), + [SPECIES_PUPITAR] = _("PUPITAR"), + [SPECIES_TYRANITAR] = _("TYRANITAR"), + [SPECIES_LUGIA] = _("LUGIA"), + [SPECIES_HO_OH] = _("HO-OH"), + [SPECIES_CELEBI] = _("CELEBI"), + [SPECIES_OLD_UNOWN_B] = _("?"), + [SPECIES_OLD_UNOWN_C] = _("?"), + [SPECIES_OLD_UNOWN_D] = _("?"), + [SPECIES_OLD_UNOWN_E] = _("?"), + [SPECIES_OLD_UNOWN_F] = _("?"), + [SPECIES_OLD_UNOWN_G] = _("?"), + [SPECIES_OLD_UNOWN_H] = _("?"), + [SPECIES_OLD_UNOWN_I] = _("?"), + [SPECIES_OLD_UNOWN_J] = _("?"), + [SPECIES_OLD_UNOWN_K] = _("?"), + [SPECIES_OLD_UNOWN_L] = _("?"), + [SPECIES_OLD_UNOWN_M] = _("?"), + [SPECIES_OLD_UNOWN_N] = _("?"), + [SPECIES_OLD_UNOWN_O] = _("?"), + [SPECIES_OLD_UNOWN_P] = _("?"), + [SPECIES_OLD_UNOWN_Q] = _("?"), + [SPECIES_OLD_UNOWN_R] = _("?"), + [SPECIES_OLD_UNOWN_S] = _("?"), + [SPECIES_OLD_UNOWN_T] = _("?"), + [SPECIES_OLD_UNOWN_U] = _("?"), + [SPECIES_OLD_UNOWN_V] = _("?"), + [SPECIES_OLD_UNOWN_W] = _("?"), + [SPECIES_OLD_UNOWN_X] = _("?"), + [SPECIES_OLD_UNOWN_Y] = _("?"), + [SPECIES_OLD_UNOWN_Z] = _("?"), + [SPECIES_TREECKO] = _("TREECKO"), + [SPECIES_GROVYLE] = _("GROVYLE"), + [SPECIES_SCEPTILE] = _("SCEPTILE"), + [SPECIES_TORCHIC] = _("TORCHIC"), + [SPECIES_COMBUSKEN] = _("COMBUSKEN"), + [SPECIES_BLAZIKEN] = _("BLAZIKEN"), + [SPECIES_MUDKIP] = _("MUDKIP"), + [SPECIES_MARSHTOMP] = _("MARSHTOMP"), + [SPECIES_SWAMPERT] = _("SWAMPERT"), + [SPECIES_POOCHYENA] = _("POOCHYENA"), + [SPECIES_MIGHTYENA] = _("MIGHTYENA"), + [SPECIES_ZIGZAGOON] = _("ZIGZAGOON"), + [SPECIES_LINOONE] = _("LINOONE"), + [SPECIES_WURMPLE] = _("WURMPLE"), + [SPECIES_SILCOON] = _("SILCOON"), + [SPECIES_BEAUTIFLY] = _("BEAUTIFLY"), + [SPECIES_CASCOON] = _("CASCOON"), + [SPECIES_DUSTOX] = _("DUSTOX"), + [SPECIES_LOTAD] = _("LOTAD"), + [SPECIES_LOMBRE] = _("LOMBRE"), + [SPECIES_LUDICOLO] = _("LUDICOLO"), + [SPECIES_SEEDOT] = _("SEEDOT"), + [SPECIES_NUZLEAF] = _("NUZLEAF"), + [SPECIES_SHIFTRY] = _("SHIFTRY"), + [SPECIES_NINCADA] = _("NINCADA"), + [SPECIES_NINJASK] = _("NINJASK"), + [SPECIES_SHEDINJA] = _("SHEDINJA"), + [SPECIES_TAILLOW] = _("TAILLOW"), + [SPECIES_SWELLOW] = _("SWELLOW"), + [SPECIES_SHROOMISH] = _("SHROOMISH"), + [SPECIES_BRELOOM] = _("BRELOOM"), + [SPECIES_SPINDA] = _("SPINDA"), + [SPECIES_WINGULL] = _("WINGULL"), + [SPECIES_PELIPPER] = _("PELIPPER"), + [SPECIES_SURSKIT] = _("SURSKIT"), + [SPECIES_MASQUERAIN] = _("MASQUERAIN"), + [SPECIES_WAILMER] = _("WAILMER"), + [SPECIES_WAILORD] = _("WAILORD"), + [SPECIES_SKITTY] = _("SKITTY"), + [SPECIES_DELCATTY] = _("DELCATTY"), + [SPECIES_KECLEON] = _("KECLEON"), + [SPECIES_BALTOY] = _("BALTOY"), + [SPECIES_CLAYDOL] = _("CLAYDOL"), + [SPECIES_NOSEPASS] = _("NOSEPASS"), + [SPECIES_TORKOAL] = _("TORKOAL"), + [SPECIES_SABLEYE] = _("SABLEYE"), + [SPECIES_BARBOACH] = _("BARBOACH"), + [SPECIES_WHISCASH] = _("WHISCASH"), + [SPECIES_LUVDISC] = _("LUVDISC"), + [SPECIES_CORPHISH] = _("CORPHISH"), + [SPECIES_CRAWDAUNT] = _("CRAWDAUNT"), + [SPECIES_FEEBAS] = _("FEEBAS"), + [SPECIES_MILOTIC] = _("MILOTIC"), + [SPECIES_CARVANHA] = _("CARVANHA"), + [SPECIES_SHARPEDO] = _("SHARPEDO"), + [SPECIES_TRAPINCH] = _("TRAPINCH"), + [SPECIES_VIBRAVA] = _("VIBRAVA"), + [SPECIES_FLYGON] = _("FLYGON"), + [SPECIES_MAKUHITA] = _("MAKUHITA"), + [SPECIES_HARIYAMA] = _("HARIYAMA"), + [SPECIES_ELECTRIKE] = _("ELECTRIKE"), + [SPECIES_MANECTRIC] = _("MANECTRIC"), + [SPECIES_NUMEL] = _("NUMEL"), + [SPECIES_CAMERUPT] = _("CAMERUPT"), + [SPECIES_SPHEAL] = _("SPHEAL"), + [SPECIES_SEALEO] = _("SEALEO"), + [SPECIES_WALREIN] = _("WALREIN"), + [SPECIES_CACNEA] = _("CACNEA"), + [SPECIES_CACTURNE] = _("CACTURNE"), + [SPECIES_SNORUNT] = _("SNORUNT"), + [SPECIES_GLALIE] = _("GLALIE"), + [SPECIES_LUNATONE] = _("LUNATONE"), + [SPECIES_SOLROCK] = _("SOLROCK"), + [SPECIES_AZURILL] = _("AZURILL"), + [SPECIES_SPOINK] = _("SPOINK"), + [SPECIES_GRUMPIG] = _("GRUMPIG"), + [SPECIES_PLUSLE] = _("PLUSLE"), + [SPECIES_MINUN] = _("MINUN"), + [SPECIES_MAWILE] = _("MAWILE"), + [SPECIES_MEDITITE] = _("MEDITITE"), + [SPECIES_MEDICHAM] = _("MEDICHAM"), + [SPECIES_SWABLU] = _("SWABLU"), + [SPECIES_ALTARIA] = _("ALTARIA"), + [SPECIES_WYNAUT] = _("WYNAUT"), + [SPECIES_DUSKULL] = _("DUSKULL"), + [SPECIES_DUSCLOPS] = _("DUSCLOPS"), + [SPECIES_ROSELIA] = _("ROSELIA"), + [SPECIES_SLAKOTH] = _("SLAKOTH"), + [SPECIES_VIGOROTH] = _("VIGOROTH"), + [SPECIES_SLAKING] = _("SLAKING"), + [SPECIES_GULPIN] = _("GULPIN"), + [SPECIES_SWALOT] = _("SWALOT"), + [SPECIES_TROPIUS] = _("TROPIUS"), + [SPECIES_WHISMUR] = _("WHISMUR"), + [SPECIES_LOUDRED] = _("LOUDRED"), + [SPECIES_EXPLOUD] = _("EXPLOUD"), + [SPECIES_CLAMPERL] = _("CLAMPERL"), + [SPECIES_HUNTAIL] = _("HUNTAIL"), + [SPECIES_GOREBYSS] = _("GOREBYSS"), + [SPECIES_ABSOL] = _("ABSOL"), + [SPECIES_SHUPPET] = _("SHUPPET"), + [SPECIES_BANETTE] = _("BANETTE"), + [SPECIES_SEVIPER] = _("SEVIPER"), + [SPECIES_ZANGOOSE] = _("ZANGOOSE"), + [SPECIES_RELICANTH] = _("RELICANTH"), + [SPECIES_ARON] = _("ARON"), + [SPECIES_LAIRON] = _("LAIRON"), + [SPECIES_AGGRON] = _("AGGRON"), + [SPECIES_CASTFORM] = _("CASTFORM"), + [SPECIES_VOLBEAT] = _("VOLBEAT"), + [SPECIES_ILLUMISE] = _("ILLUMISE"), + [SPECIES_LILEEP] = _("LILEEP"), + [SPECIES_CRADILY] = _("CRADILY"), + [SPECIES_ANORITH] = _("ANORITH"), + [SPECIES_ARMALDO] = _("ARMALDO"), + [SPECIES_RALTS] = _("RALTS"), + [SPECIES_KIRLIA] = _("KIRLIA"), + [SPECIES_GARDEVOIR] = _("GARDEVOIR"), + [SPECIES_BAGON] = _("BAGON"), + [SPECIES_SHELGON] = _("SHELGON"), + [SPECIES_SALAMENCE] = _("SALAMENCE"), + [SPECIES_BELDUM] = _("BELDUM"), + [SPECIES_METANG] = _("METANG"), + [SPECIES_METAGROSS] = _("METAGROSS"), + [SPECIES_REGIROCK] = _("REGIROCK"), + [SPECIES_REGICE] = _("REGICE"), + [SPECIES_REGISTEEL] = _("REGISTEEL"), + [SPECIES_KYOGRE] = _("KYOGRE"), + [SPECIES_GROUDON] = _("GROUDON"), + [SPECIES_RAYQUAZA] = _("RAYQUAZA"), + [SPECIES_LATIAS] = _("LATIAS"), + [SPECIES_LATIOS] = _("LATIOS"), + [SPECIES_JIRACHI] = _("JIRACHI"), + [SPECIES_DEOXYS] = _("DEOXYS"), + [SPECIES_CHIMECHO] = _("CHIMECHO"), };