diff --git a/data/scripts/debug.inc b/data/scripts/debug.inc index fe86197c8..9463164ac 100644 --- a/data/scripts/debug.inc +++ b/data/scripts/debug.inc @@ -52,7 +52,7 @@ Debug_FlagsNotSetMessage:: Debug_FlagsNotSetMessage_Text: .string "Feature unavailable!\n" .string "Please define a usable flag in:\l" - .string "'include/constants/debug{UNDERSCORE}config.h'!$" + .string "'include/constants/overworld{UNDERSCORE}config.h'!$" Debug_Script_1:: end diff --git a/include/constants/battle_config.h b/include/constants/battle_config.h index ad7775b67..461829e26 100644 --- a/include/constants/battle_config.h +++ b/include/constants/battle_config.h @@ -138,8 +138,8 @@ #define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water. #define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles. #define B_SMART_WILD_AI_FLAG 0 // If not 0, you can set this flag in a script to enable smart wild pokemon -#define B_FLAG_NO_BAG_USE 0 // If this flag is set, the debug function in the Utility submenu to disable the bag in battle can be used. -#define B_FLAG_NO_CATCHING 0 // If this flag is set, the debug function in the Utility submenu to disable catching of wild Pokémon can be used. +#define B_FLAG_NO_BAG_USE 0 // If this flag is set, the ability to use the bag in battle is disabled. +#define B_FLAG_NO_CATCHING 0 // If this flag is set, the ability to catch wild Pokémon is disabled. // Var Settings // To use the following features in scripting, replace the 0s with the var ID you're assigning it to. diff --git a/src/battle_main.c b/src/battle_main.c index 39deaca27..69335532c 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -16,7 +16,6 @@ #include "berry.h" #include "bg.h" #include "data.h" -#include "debug.h" #include "decompress.h" #include "dma3.h" #include "event_data.h" diff --git a/src/debug.c b/src/debug.c index 81e30cff0..5d861640c 100644 --- a/src/debug.c +++ b/src/debug.c @@ -151,7 +151,6 @@ enum { //Sound // EWRAM static EWRAM_DATA struct DebugMonData *sDebugMonData = NULL; - // ******************************* struct DebugMonData { @@ -172,7 +171,6 @@ struct DebugMonData u16 mon_move_3; }; - // ******************************* // Define functions static void Debug_ShowMenu(void (*HandleInput)(u8), struct ListMenuTemplate LMtemplate); @@ -285,12 +283,6 @@ extern u8 Debug_ShowFieldMessageStringVar4[]; extern u8 Debug_CheatStart[]; extern u8 PlayersHouse_2F_EventScript_SetWallClock[]; extern u8 PlayersHouse_2F_EventScript_CheckWallClock[]; -#ifdef BATTLE_ENGINE -#define ABILITY_NAME_LENGTH 16 -#else -#define ABILITY_NAME_LENGTH 12 -#endif -extern const u8 gAbilityNames[][ABILITY_NAME_LENGTH + 1]; // ******************************* @@ -299,108 +291,108 @@ static const u8 MAP_GROUP_COUNT[] = {57, 5, 5, 6, 7, 8, 9, 7, 7, 14, 8, 17, 10, // Text // Main Menu -static const u8 gDebugText_Utilities[] = _("Utilities"); -static const u8 gDebugText_Scripts[] = _("Scripts"); -static const u8 gDebugText_Flags[] = _("Flags"); -static const u8 gDebugText_Vars[] = _("Variables"); -static const u8 gDebugText_Give[] = _("Give X"); -static const u8 gDebugText_Sound[] = _("Sound"); -static const u8 gDebugText_Cancel[] = _("Cancel"); +static const u8 gDebugText_Utilities[] = _("Utilities"); +static const u8 gDebugText_Scripts[] = _("Scripts"); +static const u8 gDebugText_Flags[] = _("Flags"); +static const u8 gDebugText_Vars[] = _("Variables"); +static const u8 gDebugText_Give[] = _("Give X"); +static const u8 gDebugText_Sound[] = _("Sound"); +static const u8 gDebugText_Cancel[] = _("Cancel"); // Script menu -static const u8 gDebugText_Util_Script_1[] = _("Script 1"); -static const u8 gDebugText_Util_Script_2[] = _("Script 2"); -static const u8 gDebugText_Util_Script_3[] = _("Script 3"); -static const u8 gDebugText_Util_Script_4[] = _("Script 4"); -static const u8 gDebugText_Util_Script_5[] = _("Script 5"); -static const u8 gDebugText_Util_Script_6[] = _("Script 6"); -static const u8 gDebugText_Util_Script_7[] = _("Script 7"); -static const u8 gDebugText_Util_Script_8[] = _("Script 8"); +static const u8 gDebugText_Util_Script_1[] = _("Script 1"); +static const u8 gDebugText_Util_Script_2[] = _("Script 2"); +static const u8 gDebugText_Util_Script_3[] = _("Script 3"); +static const u8 gDebugText_Util_Script_4[] = _("Script 4"); +static const u8 gDebugText_Util_Script_5[] = _("Script 5"); +static const u8 gDebugText_Util_Script_6[] = _("Script 6"); +static const u8 gDebugText_Util_Script_7[] = _("Script 7"); +static const u8 gDebugText_Util_Script_8[] = _("Script 8"); // Util Menu -static const u8 gDebugText_Util_HealParty[] = _("Heal Party"); -static const u8 gDebugText_Util_Fly[] = _("Fly to map"); -static const u8 gDebugText_Util_WarpToMap[] = _("Warp to map warp"); -static const u8 gDebugText_Util_WarpToMap_SelectMapGroup[] =_("Group: {STR_VAR_1} \n \n\n{STR_VAR_3} "); -static const u8 gDebugText_Util_WarpToMap_SelectMap[] = _("Map: {STR_VAR_1} \nMapSec: \n{STR_VAR_2} \n{STR_VAR_3} "); -static const u8 gDebugText_Util_WarpToMap_SelectWarp[] = _("Warp: \n{STR_VAR_1} \n \n{STR_VAR_3} "); -static const u8 gDebugText_Util_WarpToMap_SelMax[] = _("{STR_VAR_1} / {STR_VAR_2}"); -static const u8 gDebugText_Util_RunningShoes[] = _("Toggle Running Shoes"); -static const u8 gDebugText_Util_PoisonMons[] = _("Poison all mons"); -static const u8 gDebugText_Util_SaveBlockSpace[] = _("SaveBlock Space"); -static const u8 gDebugText_Util_CheckWallClock[] = _("Check Wall Clock"); -static const u8 gDebugText_Util_SetWallClock[] = _("Set Wall Clock"); -static const u8 gDebugText_Util_CheckWeekDay[] = _("Check Week Day"); -static const u8 gDebugText_Util_WatchCredits[] = _("Watch Credits"); -static const u8 gDebugText_Util_Trainer_Name[] = _("Trainer name"); -static const u8 gDebugText_Util_Trainer_Gender[] = _("Toggle T. Gender"); -static const u8 gDebugText_Util_Trainer_Id[] = _("New Trainer Id"); +static const u8 gDebugText_Util_HealParty[] = _("Heal Party"); +static const u8 gDebugText_Util_Fly[] = _("Fly to map"); +static const u8 gDebugText_Util_WarpToMap[] = _("Warp to map warp"); +static const u8 gDebugText_Util_WarpToMap_SelectMapGroup[] = _("Group: {STR_VAR_1} \n \n\n{STR_VAR_3} "); +static const u8 gDebugText_Util_WarpToMap_SelectMap[] = _("Map: {STR_VAR_1} \nMapSec: \n{STR_VAR_2} \n{STR_VAR_3} "); +static const u8 gDebugText_Util_WarpToMap_SelectWarp[] = _("Warp: \n{STR_VAR_1} \n \n{STR_VAR_3} "); +static const u8 gDebugText_Util_WarpToMap_SelMax[] = _("{STR_VAR_1} / {STR_VAR_2}"); +static const u8 gDebugText_Util_RunningShoes[] = _("Toggle Running Shoes"); +static const u8 gDebugText_Util_PoisonMons[] = _("Poison all mons"); +static const u8 gDebugText_Util_SaveBlockSpace[] = _("SaveBlock Space"); +static const u8 gDebugText_Util_CheckWallClock[] = _("Check Wall Clock"); +static const u8 gDebugText_Util_SetWallClock[] = _("Set Wall Clock"); +static const u8 gDebugText_Util_CheckWeekDay[] = _("Check Week Day"); +static const u8 gDebugText_Util_WatchCredits[] = _("Watch Credits"); +static const u8 gDebugText_Util_Trainer_Name[] = _("Trainer name"); +static const u8 gDebugText_Util_Trainer_Gender[] = _("Toggle T. Gender"); +static const u8 gDebugText_Util_Trainer_Id[] = _("New Trainer Id"); // Flags Menu -static const u8 gDebugText_Flags_Flags[] = _("Set Flag XXXX"); -static const u8 gDebugText_Flags_SetPokedexFlags[] = _("All Pokédex Flags"); -static const u8 gDebugText_Flags_SwitchDex[] = _("Pokédex ON/OFF"); -static const u8 gDebugText_Flags_SwitchNationalDex[] = _("NatDex ON/OFF"); -static const u8 gDebugText_Flags_SwitchPokeNav[] = _("PokéNav ON/OFF"); -static const u8 gDebugText_Flags_ToggleFlyFlags[] = _("Fly Flags ON/OFF"); -static const u8 gDebugText_Flags_ToggleAllBadges[] = _("All badges ON/OFF"); -static const u8 gDebugText_Flags_ToggleFrontierPass[] = _("Frontier Pass ON/OFF"); -static const u8 gDebugText_Flags_SwitchCollision[] = _("Collision ON/OFF"); -static const u8 gDebugText_Flags_SwitchEncounter[] = _("Encounter ON/OFF"); -static const u8 gDebugText_Flags_SwitchTrainerSee[] = _("TrainerSee ON/OFF"); -static const u8 gDebugText_Flags_SwitchBagUse[] = _("BagUse ON/OFF"); -static const u8 gDebugText_Flags_SwitchCatching[] = _("Catching ON/OFF"); -static const u8 gDebugText_Flags_Flag[] = _("Flag: {STR_VAR_1} \n{STR_VAR_2} \n{STR_VAR_3}"); -static const u8 gDebugText_Flags_FlagHex[] = _("{STR_VAR_1} \n0x{STR_VAR_2} "); -static const u8 gDebugText_Flags_FlagSet[] = _("TRUE"); -static const u8 gDebugText_Flags_FlagUnset[] = _("FALSE"); +static const u8 gDebugText_Flags_Flags[] = _("Set Flag XXXX"); +static const u8 gDebugText_Flags_SetPokedexFlags[] = _("All Pokédex Flags"); +static const u8 gDebugText_Flags_SwitchDex[] = _("Pokédex ON/OFF"); +static const u8 gDebugText_Flags_SwitchNationalDex[] = _("NatDex ON/OFF"); +static const u8 gDebugText_Flags_SwitchPokeNav[] = _("PokéNav ON/OFF"); +static const u8 gDebugText_Flags_ToggleFlyFlags[] = _("Fly Flags ON/OFF"); +static const u8 gDebugText_Flags_ToggleAllBadges[] = _("All badges ON/OFF"); +static const u8 gDebugText_Flags_ToggleFrontierPass[] = _("Frontier Pass ON/OFF"); +static const u8 gDebugText_Flags_SwitchCollision[] = _("Collision ON/OFF"); +static const u8 gDebugText_Flags_SwitchEncounter[] = _("Encounter ON/OFF"); +static const u8 gDebugText_Flags_SwitchTrainerSee[] = _("TrainerSee ON/OFF"); +static const u8 gDebugText_Flags_SwitchBagUse[] = _("BagUse ON/OFF"); +static const u8 gDebugText_Flags_SwitchCatching[] = _("Catching ON/OFF"); +static const u8 gDebugText_Flags_Flag[] = _("Flag: {STR_VAR_1} \n{STR_VAR_2} \n{STR_VAR_3}"); +static const u8 gDebugText_Flags_FlagHex[] = _("{STR_VAR_1} \n0x{STR_VAR_2} "); +static const u8 gDebugText_Flags_FlagSet[] = _("TRUE"); +static const u8 gDebugText_Flags_FlagUnset[] = _("FALSE"); // Variables Menu -static const u8 gDebugText_Vars_Vars[] = _("Set Vars XXXX"); -static const u8 gDebugText_Vars_VariableHex[] = _("{STR_VAR_1} \n0x{STR_VAR_2} "); -static const u8 gDebugText_Vars_Variable[] = _("Var: {STR_VAR_1} \nVal: {STR_VAR_3} \n{STR_VAR_2}"); -static const u8 gDebugText_Vars_VariableValueSet[] = _("Var: {STR_VAR_1} \nVal: {STR_VAR_3} \n{STR_VAR_2}"); +static const u8 gDebugText_Vars_Vars[] = _("Set Vars XXXX"); +static const u8 gDebugText_Vars_VariableHex[] = _("{STR_VAR_1} \n0x{STR_VAR_2} "); +static const u8 gDebugText_Vars_Variable[] = _("Var: {STR_VAR_1} \nVal: {STR_VAR_3} \n{STR_VAR_2}"); +static const u8 gDebugText_Vars_VariableValueSet[] = _("Var: {STR_VAR_1} \nVal: {STR_VAR_3} \n{STR_VAR_2}"); // Give Menu -static const u8 gDebugText_Give_GiveItem[] = _("Give item XXXX"); -static const u8 gDebugText_ItemQuantity[] = _("Quantity: \n{STR_VAR_1} \n\n{STR_VAR_2}"); -static const u8 gDebugText_ItemID[] = _("Item Id: {STR_VAR_3}\n{STR_VAR_1} \n\n{STR_VAR_2}"); -static const u8 gDebugText_Give_AllTMs[] = _("Give all TMs"); -static const u8 gDebugText_Give_GivePokemonSimple[] = _("Pkm(lvl)"); -static const u8 gDebugText_Give_GivePokemonComplex[] = _("Pkm(l,s,n,a,IV,mov)"); -static const u8 gDebugText_PokemonID[] = _("Species: {STR_VAR_3}\n{STR_VAR_1} \n\n{STR_VAR_2}"); -static const u8 gDebugText_PokemonLevel[] = _("Level: \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonShiny[] = _("Shiny: \n {STR_VAR_2} \n \n "); -static const u8 gDebugText_PokemonNature[] = _("NatureId: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonAbility[] = _("AbilityNum: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonIVs[] = _("All IVs: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_0[] = _("IV HP: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_1[] = _("IV Attack: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_2[] = _("IV Defense: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_3[] = _("IV Speed: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_4[] = _("IV Sp. Attack: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonIV_5[] = _("IV Sp. Defense: \n {STR_VAR_3} \n \n{STR_VAR_2} "); -static const u8 gDebugText_PokemonMove_0[] = _("Move 0: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonMove_1[] = _("Move 1: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonMove_2[] = _("Move 2: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_PokemonMove_3[] = _("Move 3: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); -static const u8 gDebugText_Give_MaxMoney[] = _("Max Money"); -static const u8 gDebugText_Give_MaxCoins[] = _("Max Coins"); -static const u8 gDebugText_Give_BattlePoints[] = _("Max Battle Points"); -static const u8 gDebugText_Give_DaycareEgg[] = _("Daycare Egg"); -static const u8 gDebugText_Give_FillPc[] = _("Fill Pc"); -static const u8 gDebugText_Give_GiveCHEAT[] = _("CHEAT Start"); -static const u8 gDebugText_AccessPC[] = _("Access PC"); +static const u8 gDebugText_Give_GiveItem[] = _("Give item XXXX"); +static const u8 gDebugText_ItemQuantity[] = _("Quantity: \n{STR_VAR_1} \n\n{STR_VAR_2}"); +static const u8 gDebugText_ItemID[] = _("Item Id: {STR_VAR_3}\n{STR_VAR_1} \n\n{STR_VAR_2}"); +static const u8 gDebugText_Give_AllTMs[] = _("Give all TMs"); +static const u8 gDebugText_Give_GivePokemonSimple[] = _("Pkm(lvl)"); +static const u8 gDebugText_Give_GivePokemonComplex[] = _("Pkm(l,s,n,a,IV,mov)"); +static const u8 gDebugText_PokemonID[] = _("Species: {STR_VAR_3}\n{STR_VAR_1} \n\n{STR_VAR_2}"); +static const u8 gDebugText_PokemonLevel[] = _("Level: \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonShiny[] = _("Shiny: \n {STR_VAR_2} \n \n "); +static const u8 gDebugText_PokemonNature[] = _("NatureId: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonAbility[] = _("AbilityNum: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonIVs[] = _("All IVs: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_0[] = _("IV HP: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_1[] = _("IV Attack: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_2[] = _("IV Defense: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_3[] = _("IV Speed: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_4[] = _("IV Sp. Attack: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonIV_5[] = _("IV Sp. Defense: \n {STR_VAR_3} \n \n{STR_VAR_2} "); +static const u8 gDebugText_PokemonMove_0[] = _("Move 0: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonMove_1[] = _("Move 1: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonMove_2[] = _("Move 2: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_PokemonMove_3[] = _("Move 3: {STR_VAR_3} \n{STR_VAR_1} \n \n{STR_VAR_2}"); +static const u8 gDebugText_Give_MaxMoney[] = _("Max Money"); +static const u8 gDebugText_Give_MaxCoins[] = _("Max Coins"); +static const u8 gDebugText_Give_BattlePoints[] = _("Max Battle Points"); +static const u8 gDebugText_Give_DaycareEgg[] = _("Daycare Egg"); +static const u8 gDebugText_Give_FillPc[] = _("Fill Pc"); +static const u8 gDebugText_Give_GiveCHEAT[] = _("CHEAT Start"); +static const u8 gDebugText_AccessPC[] = _("Access PC"); // Sound Mneu -static const u8 gDebugText_Sound_SE[] = _("Effects"); -static const u8 gDebugText_Sound_SE_ID[] = _("Sound Id: {STR_VAR_3}\n{STR_VAR_1} \n{STR_VAR_2}"); -static const u8 gDebugText_Sound_MUS[] = _("Music"); -static const u8 gDebugText_Sound_MUS_ID[] = _("Music Id: {STR_VAR_3}\n{STR_VAR_1} \n{STR_VAR_2}"); -static const u8 gDebugText_Sound_Empty[] = _(""); +static const u8 gDebugText_Sound_SE[] = _("Effects"); +static const u8 gDebugText_Sound_SE_ID[] = _("Sound Id: {STR_VAR_3}\n{STR_VAR_1} \n{STR_VAR_2}"); +static const u8 gDebugText_Sound_MUS[] = _("Music"); +static const u8 gDebugText_Sound_MUS_ID[] = _("Music Id: {STR_VAR_3}\n{STR_VAR_1} \n{STR_VAR_2}"); +static const u8 gDebugText_Sound_Empty[] = _(""); -static const u8 digitInidicator_1[] = _("{LEFT_ARROW}+1{RIGHT_ARROW} "); -static const u8 digitInidicator_10[] = _("{LEFT_ARROW}+10{RIGHT_ARROW} "); -static const u8 digitInidicator_100[] = _("{LEFT_ARROW}+100{RIGHT_ARROW} "); -static const u8 digitInidicator_1000[] = _("{LEFT_ARROW}+1000{RIGHT_ARROW} "); -static const u8 digitInidicator_10000[] = _("{LEFT_ARROW}+10000{RIGHT_ARROW} "); -static const u8 digitInidicator_100000[] = _("{LEFT_ARROW}+100000{RIGHT_ARROW} "); -static const u8 digitInidicator_1000000[] = _("{LEFT_ARROW}+1000000{RIGHT_ARROW} "); -static const u8 digitInidicator_10000000[] = _("{LEFT_ARROW}+10000000{RIGHT_ARROW} "); +static const u8 digitInidicator_1[] = _("{LEFT_ARROW}+1{RIGHT_ARROW} "); +static const u8 digitInidicator_10[] = _("{LEFT_ARROW}+10{RIGHT_ARROW} "); +static const u8 digitInidicator_100[] = _("{LEFT_ARROW}+100{RIGHT_ARROW} "); +static const u8 digitInidicator_1000[] = _("{LEFT_ARROW}+1000{RIGHT_ARROW} "); +static const u8 digitInidicator_10000[] = _("{LEFT_ARROW}+10000{RIGHT_ARROW} "); +static const u8 digitInidicator_100000[] = _("{LEFT_ARROW}+100000{RIGHT_ARROW} "); +static const u8 digitInidicator_1000000[] = _("{LEFT_ARROW}+1000000{RIGHT_ARROW} "); +static const u8 digitInidicator_10000000[] = _("{LEFT_ARROW}+10000000{RIGHT_ARROW} "); const u8 * const gText_DigitIndicator[] = { digitInidicator_1, @@ -430,158 +422,156 @@ static const s32 sPowersOfTen[] = // List Menu Items static const struct ListMenuItem sDebugMenu_Items_Main[] = { - [DEBUG_MENU_ITEM_UTILITIES] = {gDebugText_Utilities, DEBUG_MENU_ITEM_UTILITIES}, - [DEBUG_MENU_ITEM_SCRIPTS] = {gDebugText_Scripts, DEBUG_MENU_ITEM_SCRIPTS}, - [DEBUG_MENU_ITEM_FLAGS] = {gDebugText_Flags, DEBUG_MENU_ITEM_FLAGS}, - [DEBUG_MENU_ITEM_VARS] = {gDebugText_Vars, DEBUG_MENU_ITEM_VARS}, - [DEBUG_MENU_ITEM_GIVE] = {gDebugText_Give, DEBUG_MENU_ITEM_GIVE}, - [DEBUG_MENU_ITEM_SOUND] = {gDebugText_Sound, DEBUG_MENU_ITEM_SOUND}, - [DEBUG_MENU_ITEM_ACCESS_PC] = {gDebugText_AccessPC, DEBUG_MENU_ITEM_ACCESS_PC}, - [DEBUG_MENU_ITEM_CANCEL] = {gDebugText_Cancel, DEBUG_MENU_ITEM_CANCEL} + [DEBUG_MENU_ITEM_UTILITIES] = {gDebugText_Utilities, DEBUG_MENU_ITEM_UTILITIES}, + [DEBUG_MENU_ITEM_SCRIPTS] = {gDebugText_Scripts, DEBUG_MENU_ITEM_SCRIPTS}, + [DEBUG_MENU_ITEM_FLAGS] = {gDebugText_Flags, DEBUG_MENU_ITEM_FLAGS}, + [DEBUG_MENU_ITEM_VARS] = {gDebugText_Vars, DEBUG_MENU_ITEM_VARS}, + [DEBUG_MENU_ITEM_GIVE] = {gDebugText_Give, DEBUG_MENU_ITEM_GIVE}, + [DEBUG_MENU_ITEM_SOUND] = {gDebugText_Sound, DEBUG_MENU_ITEM_SOUND}, + [DEBUG_MENU_ITEM_ACCESS_PC] = {gDebugText_AccessPC, DEBUG_MENU_ITEM_ACCESS_PC}, + [DEBUG_MENU_ITEM_CANCEL] = {gDebugText_Cancel, DEBUG_MENU_ITEM_CANCEL} }; static const struct ListMenuItem sDebugMenu_Items_Utilities[] = { - [DEBUG_UTIL_MENU_ITEM_HEAL_PARTY] = {gDebugText_Util_HealParty, DEBUG_UTIL_MENU_ITEM_HEAL_PARTY}, - [DEBUG_UTIL_MENU_ITEM_FLY] = {gDebugText_Util_Fly, DEBUG_UTIL_MENU_ITEM_FLY}, - [DEBUG_UTIL_MENU_ITEM_WARP] = {gDebugText_Util_WarpToMap, DEBUG_UTIL_MENU_ITEM_WARP}, - [DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES] = {gDebugText_Util_RunningShoes, DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES}, - [DEBUG_UTIL_MENU_ITEM_POISON_MONS] = {gDebugText_Util_PoisonMons, DEBUG_UTIL_MENU_ITEM_POISON_MONS}, - [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = {gDebugText_Util_SaveBlockSpace, DEBUG_UTIL_MENU_ITEM_SAVEBLOCK}, - [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = {gDebugText_Util_CheckWallClock, DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK}, - [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = {gDebugText_Util_SetWallClock, DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK}, - [DEBUG_UTIL_MENU_ITEM_CHECKWEEKDAY] = {gDebugText_Util_CheckWeekDay, DEBUG_UTIL_MENU_ITEM_CHECKWEEKDAY}, - [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = {gDebugText_Util_WatchCredits, DEBUG_UTIL_MENU_ITEM_WATCHCREDITS}, - [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = {gDebugText_Util_Trainer_Name, DEBUG_UTIL_MENU_ITEM_TRAINER_NAME}, - [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = {gDebugText_Util_Trainer_Gender, DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER}, - [DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = {gDebugText_Util_Trainer_Id, DEBUG_UTIL_MENU_ITEM_TRAINER_ID}, + [DEBUG_UTIL_MENU_ITEM_HEAL_PARTY] = {gDebugText_Util_HealParty, DEBUG_UTIL_MENU_ITEM_HEAL_PARTY}, + [DEBUG_UTIL_MENU_ITEM_FLY] = {gDebugText_Util_Fly, DEBUG_UTIL_MENU_ITEM_FLY}, + [DEBUG_UTIL_MENU_ITEM_WARP] = {gDebugText_Util_WarpToMap, DEBUG_UTIL_MENU_ITEM_WARP}, + [DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES] = {gDebugText_Util_RunningShoes, DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES}, + [DEBUG_UTIL_MENU_ITEM_POISON_MONS] = {gDebugText_Util_PoisonMons, DEBUG_UTIL_MENU_ITEM_POISON_MONS}, + [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = {gDebugText_Util_SaveBlockSpace, DEBUG_UTIL_MENU_ITEM_SAVEBLOCK}, + [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = {gDebugText_Util_CheckWallClock, DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK}, + [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = {gDebugText_Util_SetWallClock, DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK}, + [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = {gDebugText_Util_WatchCredits, DEBUG_UTIL_MENU_ITEM_WATCHCREDITS}, + [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = {gDebugText_Util_Trainer_Name, DEBUG_UTIL_MENU_ITEM_TRAINER_NAME}, + [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = {gDebugText_Util_Trainer_Gender, DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER}, + [DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = {gDebugText_Util_Trainer_Id, DEBUG_UTIL_MENU_ITEM_TRAINER_ID}, }; static const struct ListMenuItem sDebugMenu_Items_Scripts[] = { - [DEBUG_UTIL_MENU_ITEM_SCRIPT_1] = {gDebugText_Util_Script_1, DEBUG_UTIL_MENU_ITEM_SCRIPT_1}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_2] = {gDebugText_Util_Script_2, DEBUG_UTIL_MENU_ITEM_SCRIPT_2}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_3] = {gDebugText_Util_Script_3, DEBUG_UTIL_MENU_ITEM_SCRIPT_3}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_4] = {gDebugText_Util_Script_4, DEBUG_UTIL_MENU_ITEM_SCRIPT_4}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_5] = {gDebugText_Util_Script_5, DEBUG_UTIL_MENU_ITEM_SCRIPT_5}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_6] = {gDebugText_Util_Script_6, DEBUG_UTIL_MENU_ITEM_SCRIPT_6}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_7] = {gDebugText_Util_Script_7, DEBUG_UTIL_MENU_ITEM_SCRIPT_7}, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_8] = {gDebugText_Util_Script_8, DEBUG_UTIL_MENU_ITEM_SCRIPT_8}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_1] = {gDebugText_Util_Script_1, DEBUG_UTIL_MENU_ITEM_SCRIPT_1}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_2] = {gDebugText_Util_Script_2, DEBUG_UTIL_MENU_ITEM_SCRIPT_2}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_3] = {gDebugText_Util_Script_3, DEBUG_UTIL_MENU_ITEM_SCRIPT_3}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_4] = {gDebugText_Util_Script_4, DEBUG_UTIL_MENU_ITEM_SCRIPT_4}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_5] = {gDebugText_Util_Script_5, DEBUG_UTIL_MENU_ITEM_SCRIPT_5}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_6] = {gDebugText_Util_Script_6, DEBUG_UTIL_MENU_ITEM_SCRIPT_6}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_7] = {gDebugText_Util_Script_7, DEBUG_UTIL_MENU_ITEM_SCRIPT_7}, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_8] = {gDebugText_Util_Script_8, DEBUG_UTIL_MENU_ITEM_SCRIPT_8}, }; static const struct ListMenuItem sDebugMenu_Items_Flags[] = { - [DEBUG_FLAG_MENU_ITEM_FLAGS] = {gDebugText_Flags_Flags, DEBUG_FLAG_MENU_ITEM_FLAGS}, - [DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS] = {gDebugText_Flags_SetPokedexFlags, DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS}, - [DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF] = {gDebugText_Flags_SwitchDex, DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF}, - [DEBUG_FLAG_MENU_ITEM_NATDEXONOFF] = {gDebugText_Flags_SwitchNationalDex, DEBUG_FLAG_MENU_ITEM_NATDEXONOFF}, - [DEBUG_FLAG_MENU_ITEM_POKENAVONOFF] = {gDebugText_Flags_SwitchPokeNav, DEBUG_FLAG_MENU_ITEM_POKENAVONOFF}, - [DEBUG_FLAG_MENU_ITEM_FLYANYWHERE] = {gDebugText_Flags_ToggleFlyFlags, DEBUG_FLAG_MENU_ITEM_FLYANYWHERE}, - [DEBUG_FLAG_MENU_ITEM_GETALLBADGES] = {gDebugText_Flags_ToggleAllBadges, DEBUG_FLAG_MENU_ITEM_GETALLBADGES}, - [DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS] = {gDebugText_Flags_ToggleFrontierPass, DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS}, - [DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF] = {gDebugText_Flags_SwitchCollision, DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF}, - [DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF] = {gDebugText_Flags_SwitchEncounter, DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF}, - [DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF]= {gDebugText_Flags_SwitchTrainerSee, DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF}, - [DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF] = {gDebugText_Flags_SwitchBagUse, DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF}, - [DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF] = {gDebugText_Flags_SwitchCatching, DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF}, + [DEBUG_FLAG_MENU_ITEM_FLAGS] = {gDebugText_Flags_Flags, DEBUG_FLAG_MENU_ITEM_FLAGS}, + [DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS] = {gDebugText_Flags_SetPokedexFlags, DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS}, + [DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF] = {gDebugText_Flags_SwitchDex, DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF}, + [DEBUG_FLAG_MENU_ITEM_NATDEXONOFF] = {gDebugText_Flags_SwitchNationalDex, DEBUG_FLAG_MENU_ITEM_NATDEXONOFF}, + [DEBUG_FLAG_MENU_ITEM_POKENAVONOFF] = {gDebugText_Flags_SwitchPokeNav, DEBUG_FLAG_MENU_ITEM_POKENAVONOFF}, + [DEBUG_FLAG_MENU_ITEM_FLYANYWHERE] = {gDebugText_Flags_ToggleFlyFlags, DEBUG_FLAG_MENU_ITEM_FLYANYWHERE}, + [DEBUG_FLAG_MENU_ITEM_GETALLBADGES] = {gDebugText_Flags_ToggleAllBadges, DEBUG_FLAG_MENU_ITEM_GETALLBADGES}, + [DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS] = {gDebugText_Flags_ToggleFrontierPass, DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS}, + [DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF] = {gDebugText_Flags_SwitchCollision, DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF}, + [DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF] = {gDebugText_Flags_SwitchEncounter, DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF}, + [DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF] = {gDebugText_Flags_SwitchTrainerSee, DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF}, + [DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF] = {gDebugText_Flags_SwitchBagUse, DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF}, + [DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF] = {gDebugText_Flags_SwitchCatching, DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF}, }; static const struct ListMenuItem sDebugMenu_Items_Vars[] = { - [DEBUG_VARS_MENU_ITEM_VARS] = {gDebugText_Vars_Vars, DEBUG_FLAG_MENU_ITEM_FLAGS}, + [DEBUG_VARS_MENU_ITEM_VARS] = {gDebugText_Vars_Vars, DEBUG_FLAG_MENU_ITEM_FLAGS}, }; static const struct ListMenuItem sDebugMenu_Items_Give[] = { - [DEBUG_GIVE_MENU_ITEM_ITEM_X] = {gDebugText_Give_GiveItem, DEBUG_GIVE_MENU_ITEM_ITEM_X}, - [DEBUG_GIVE_MENU_ITEM_ALLTMS] = {gDebugText_Give_AllTMs, DEBUG_GIVE_MENU_ITEM_ALLTMS}, - [DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE] = {gDebugText_Give_GivePokemonSimple, DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE}, - [DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX] = {gDebugText_Give_GivePokemonComplex, DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX}, - [DEBUG_GIVE_MENU_ITEM_MAX_MONEY] = {gDebugText_Give_MaxMoney, DEBUG_GIVE_MENU_ITEM_MAX_MONEY}, - [DEBUG_GIVE_MENU_ITEM_MAX_COINS] = {gDebugText_Give_MaxCoins, DEBUG_GIVE_MENU_ITEM_MAX_COINS}, - [DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS]= {gDebugText_Give_BattlePoints, DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS}, - [DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG] = {gDebugText_Give_DaycareEgg, DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG}, - [DEBUG_GIVE_MENU_ITEM_FILL_PC] = {gDebugText_Give_FillPc, DEBUG_GIVE_MENU_ITEM_FILL_PC}, - [DEBUG_GIVE_MENU_ITEM_CHEAT] = {gDebugText_Give_GiveCHEAT, DEBUG_GIVE_MENU_ITEM_CHEAT}, + [DEBUG_GIVE_MENU_ITEM_ITEM_X] = {gDebugText_Give_GiveItem, DEBUG_GIVE_MENU_ITEM_ITEM_X}, + [DEBUG_GIVE_MENU_ITEM_ALLTMS] = {gDebugText_Give_AllTMs, DEBUG_GIVE_MENU_ITEM_ALLTMS}, + [DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE] = {gDebugText_Give_GivePokemonSimple, DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE}, + [DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX] = {gDebugText_Give_GivePokemonComplex, DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX}, + [DEBUG_GIVE_MENU_ITEM_MAX_MONEY] = {gDebugText_Give_MaxMoney, DEBUG_GIVE_MENU_ITEM_MAX_MONEY}, + [DEBUG_GIVE_MENU_ITEM_MAX_COINS] = {gDebugText_Give_MaxCoins, DEBUG_GIVE_MENU_ITEM_MAX_COINS}, + [DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS] = {gDebugText_Give_BattlePoints, DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS}, + [DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG] = {gDebugText_Give_DaycareEgg, DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG}, + [DEBUG_GIVE_MENU_ITEM_FILL_PC] = {gDebugText_Give_FillPc, DEBUG_GIVE_MENU_ITEM_FILL_PC}, + [DEBUG_GIVE_MENU_ITEM_CHEAT] = {gDebugText_Give_GiveCHEAT, DEBUG_GIVE_MENU_ITEM_CHEAT}, }; static const struct ListMenuItem sDebugMenu_Items_Sound[] = { - [DEBUG_SOUND_MENU_ITEM_SE] = {gDebugText_Sound_SE, DEBUG_SOUND_MENU_ITEM_SE}, - [DEBUG_SOUND_MENU_ITEM_MUS] = {gDebugText_Sound_MUS, DEBUG_SOUND_MENU_ITEM_MUS}, + [DEBUG_SOUND_MENU_ITEM_SE] = {gDebugText_Sound_SE, DEBUG_SOUND_MENU_ITEM_SE}, + [DEBUG_SOUND_MENU_ITEM_MUS] = {gDebugText_Sound_MUS, DEBUG_SOUND_MENU_ITEM_MUS}, }; // ******************************* // Menu Actions static void (*const sDebugMenu_Actions_Main[])(u8) = { - [DEBUG_MENU_ITEM_UTILITIES] = DebugAction_OpenUtilitiesMenu, - [DEBUG_MENU_ITEM_SCRIPTS] = DebugAction_OpenScriptsMenu, - [DEBUG_MENU_ITEM_FLAGS] = DebugAction_OpenFlagsMenu, - [DEBUG_MENU_ITEM_VARS] = DebugAction_OpenVariablesMenu, - [DEBUG_MENU_ITEM_GIVE] = DebugAction_OpenGiveMenu, - [DEBUG_MENU_ITEM_SOUND] = DebugAction_OpenSoundMenu, - [DEBUG_MENU_ITEM_ACCESS_PC] = DebugAction_AccessPC, - [DEBUG_MENU_ITEM_CANCEL] = DebugAction_Cancel + [DEBUG_MENU_ITEM_UTILITIES] = DebugAction_OpenUtilitiesMenu, + [DEBUG_MENU_ITEM_SCRIPTS] = DebugAction_OpenScriptsMenu, + [DEBUG_MENU_ITEM_FLAGS] = DebugAction_OpenFlagsMenu, + [DEBUG_MENU_ITEM_VARS] = DebugAction_OpenVariablesMenu, + [DEBUG_MENU_ITEM_GIVE] = DebugAction_OpenGiveMenu, + [DEBUG_MENU_ITEM_SOUND] = DebugAction_OpenSoundMenu, + [DEBUG_MENU_ITEM_ACCESS_PC] = DebugAction_AccessPC, + [DEBUG_MENU_ITEM_CANCEL] = DebugAction_Cancel }; static void (*const sDebugMenu_Actions_Utilities[])(u8) = { - [DEBUG_UTIL_MENU_ITEM_HEAL_PARTY] = DebugAction_Util_HealParty, - [DEBUG_UTIL_MENU_ITEM_FLY] = DebugAction_Util_Fly, - [DEBUG_UTIL_MENU_ITEM_WARP] = DebugAction_Util_Warp_Warp, - [DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES] = DebugAction_Util_RunningShoes, - [DEBUG_UTIL_MENU_ITEM_POISON_MONS] = DebugAction_Util_PoisonMons, - [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = DebugAction_Util_CheckSaveBlock, - [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = DebugAction_Util_CheckWallClock, - [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = DebugAction_Util_SetWallClock, - [DEBUG_UTIL_MENU_ITEM_CHECKWEEKDAY] = DebugAction_Util_CheckWeekDay, - [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = DebugAction_Util_WatchCredits, - [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = DebugAction_Util_Trainer_Name, - [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = DebugAction_Util_Trainer_Gender, - [DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = DebugAction_Util_Trainer_Id, + [DEBUG_UTIL_MENU_ITEM_HEAL_PARTY] = DebugAction_Util_HealParty, + [DEBUG_UTIL_MENU_ITEM_FLY] = DebugAction_Util_Fly, + [DEBUG_UTIL_MENU_ITEM_WARP] = DebugAction_Util_Warp_Warp, + [DEBUG_UTIL_MENU_ITEM_RUNNING_SHOES] = DebugAction_Util_RunningShoes, + [DEBUG_UTIL_MENU_ITEM_POISON_MONS] = DebugAction_Util_PoisonMons, + [DEBUG_UTIL_MENU_ITEM_SAVEBLOCK] = DebugAction_Util_CheckSaveBlock, + [DEBUG_UTIL_MENU_ITEM_CHECKWALLCLOCK] = DebugAction_Util_CheckWallClock, + [DEBUG_UTIL_MENU_ITEM_SETWALLCLOCK] = DebugAction_Util_SetWallClock, + [DEBUG_UTIL_MENU_ITEM_WATCHCREDITS] = DebugAction_Util_WatchCredits, + [DEBUG_UTIL_MENU_ITEM_TRAINER_NAME] = DebugAction_Util_Trainer_Name, + [DEBUG_UTIL_MENU_ITEM_TRAINER_GENDER] = DebugAction_Util_Trainer_Gender, + [DEBUG_UTIL_MENU_ITEM_TRAINER_ID] = DebugAction_Util_Trainer_Id, }; static void (*const sDebugMenu_Actions_Scripts[])(u8) = { - [DEBUG_UTIL_MENU_ITEM_SCRIPT_1] = DebugAction_Util_Script_1, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_2] = DebugAction_Util_Script_2, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_3] = DebugAction_Util_Script_3, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_4] = DebugAction_Util_Script_4, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_5] = DebugAction_Util_Script_5, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_6] = DebugAction_Util_Script_6, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_7] = DebugAction_Util_Script_7, - [DEBUG_UTIL_MENU_ITEM_SCRIPT_8] = DebugAction_Util_Script_8, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_1] = DebugAction_Util_Script_1, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_2] = DebugAction_Util_Script_2, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_3] = DebugAction_Util_Script_3, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_4] = DebugAction_Util_Script_4, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_5] = DebugAction_Util_Script_5, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_6] = DebugAction_Util_Script_6, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_7] = DebugAction_Util_Script_7, + [DEBUG_UTIL_MENU_ITEM_SCRIPT_8] = DebugAction_Util_Script_8, }; static void (*const sDebugMenu_Actions_Flags[])(u8) = { - [DEBUG_FLAG_MENU_ITEM_FLAGS] = DebugAction_Flags_Flags, - [DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS] = DebugAction_Flags_SetPokedexFlags, - [DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF] = DebugAction_Flags_SwitchDex, - [DEBUG_FLAG_MENU_ITEM_NATDEXONOFF] = DebugAction_Flags_SwitchNatDex, - [DEBUG_FLAG_MENU_ITEM_POKENAVONOFF] = DebugAction_Flags_SwitchPokeNav, - [DEBUG_FLAG_MENU_ITEM_FLYANYWHERE] = DebugAction_Flags_ToggleFlyFlags, - [DEBUG_FLAG_MENU_ITEM_GETALLBADGES] = DebugAction_Flags_ToggleBadgeFlags, - [DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS] = DebugAction_Flags_ToggleFrontierPass, - [DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF] = DebugAction_Flags_CollisionOnOff, - [DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF] = DebugAction_Flags_EncounterOnOff, - [DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF]= DebugAction_Flags_TrainerSeeOnOff, - [DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF] = DebugAction_Flags_BagUseOnOff, - [DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF] = DebugAction_Flags_CatchingOnOff, + [DEBUG_FLAG_MENU_ITEM_FLAGS] = DebugAction_Flags_Flags, + [DEBUG_FLAG_MENU_ITEM_POKEDEXFLAGS] = DebugAction_Flags_SetPokedexFlags, + [DEBUG_FLAG_MENU_ITEM_POKEDEXONOFF] = DebugAction_Flags_SwitchDex, + [DEBUG_FLAG_MENU_ITEM_NATDEXONOFF] = DebugAction_Flags_SwitchNatDex, + [DEBUG_FLAG_MENU_ITEM_POKENAVONOFF] = DebugAction_Flags_SwitchPokeNav, + [DEBUG_FLAG_MENU_ITEM_FLYANYWHERE] = DebugAction_Flags_ToggleFlyFlags, + [DEBUG_FLAG_MENU_ITEM_GETALLBADGES] = DebugAction_Flags_ToggleBadgeFlags, + [DEBUG_FLAG_MENU_ITEM_FRONTIER_PASS] = DebugAction_Flags_ToggleFrontierPass, + [DEBUG_FLAG_MENU_ITEM_COLISSION_ONOFF] = DebugAction_Flags_CollisionOnOff, + [DEBUG_FLAG_MENU_ITEM_ENCOUNTER_ONOFF] = DebugAction_Flags_EncounterOnOff, + [DEBUG_FLAG_MENU_ITEM_TRAINER_SEE_ONOFF] = DebugAction_Flags_TrainerSeeOnOff, + [DEBUG_FLAG_MENU_ITEM_BAG_USE_ONOFF] = DebugAction_Flags_BagUseOnOff, + [DEBUG_FLAG_MENU_ITEM_CATCHING_ONOFF] = DebugAction_Flags_CatchingOnOff, }; static void (*const sDebugMenu_Actions_Vars[])(u8) = { - [DEBUG_VARS_MENU_ITEM_VARS] = DebugAction_Vars_Vars, + [DEBUG_VARS_MENU_ITEM_VARS] = DebugAction_Vars_Vars, }; static void (*const sDebugMenu_Actions_Give[])(u8) = { - [DEBUG_GIVE_MENU_ITEM_ITEM_X] = DebugAction_Give_Item, - [DEBUG_GIVE_MENU_ITEM_ALLTMS] = DebugAction_Give_AllTMs, - [DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE] = DebugAction_Give_PokemonSimple, - [DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX] = DebugAction_Give_PokemonComplex, - [DEBUG_GIVE_MENU_ITEM_MAX_MONEY] = DebugAction_Give_MaxMoney, - [DEBUG_GIVE_MENU_ITEM_MAX_COINS] = DebugAction_Give_MaxCoins, - [DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS]= DebugAction_Give_MaxBattlePoints, - [DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG] = DebugAction_Give_DayCareEgg, - [DEBUG_GIVE_MENU_ITEM_FILL_PC] = DebugAction_Give_FillPC, - [DEBUG_GIVE_MENU_ITEM_CHEAT] = DebugAction_Give_CHEAT, + [DEBUG_GIVE_MENU_ITEM_ITEM_X] = DebugAction_Give_Item, + [DEBUG_GIVE_MENU_ITEM_ALLTMS] = DebugAction_Give_AllTMs, + [DEBUG_GIVE_MENU_ITEM_POKEMON_SIMPLE] = DebugAction_Give_PokemonSimple, + [DEBUG_GIVE_MENU_ITEM_POKEMON_COMPLEX] = DebugAction_Give_PokemonComplex, + [DEBUG_GIVE_MENU_ITEM_MAX_MONEY] = DebugAction_Give_MaxMoney, + [DEBUG_GIVE_MENU_ITEM_MAX_COINS] = DebugAction_Give_MaxCoins, + [DEBUG_GIVE_MENU_ITEM_MAX_BATTLE_POINTS] = DebugAction_Give_MaxBattlePoints, + [DEBUG_GIVE_MENU_ITEM_DAYCARE_EGG] = DebugAction_Give_DayCareEgg, + [DEBUG_GIVE_MENU_ITEM_FILL_PC] = DebugAction_Give_FillPC, + [DEBUG_GIVE_MENU_ITEM_CHEAT] = DebugAction_Give_CHEAT, }; static void (*const sDebugMenu_Actions_Sound[])(u8) = { - [DEBUG_SOUND_MENU_ITEM_SE] = DebugAction_Sound_SE, - [DEBUG_SOUND_MENU_ITEM_MUS] = DebugAction_Sound_MUS, + [DEBUG_SOUND_MENU_ITEM_SE] = DebugAction_Sound_SE, + [DEBUG_SOUND_MENU_ITEM_MUS] = DebugAction_Sound_MUS, }; @@ -944,7 +934,6 @@ static void DebugAction_Util_Warp_Warp(u8 taskId) CopyWindowToVram(windowId, 3); - ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); ConvertIntToDecimalStringN(gStringVar2, MAP_GROUPS_COUNT-1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar1, gDebugText_Util_WarpToMap_SelMax); @@ -965,31 +954,31 @@ static void DebugAction_Util_Warp_SelectMapGroup(u8 taskId) if (gMain.newKeys & DPAD_ANY) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > MAP_GROUPS_COUNT-1) - gTasks[taskId].data[3] = MAP_GROUPS_COUNT-1; + if (gTasks[taskId].data[3] > MAP_GROUPS_COUNT - 1) + gTasks[taskId].data[3] = MAP_GROUPS_COUNT - 1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < 2) + if (gTasks[taskId].data[4] < 2) gTasks[taskId].data[4] += 1; } ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUPS_COUNT-1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUPS_COUNT - 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar1, gDebugText_Util_WarpToMap_SelMax); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); StringExpandPlaceholders(gStringVar4, gDebugText_Util_WarpToMap_SelectMapGroup); @@ -1003,7 +992,7 @@ static void DebugAction_Util_Warp_SelectMapGroup(u8 taskId) gTasks[taskId].data[4] = 0; ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]]-1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar1, gDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1025,31 +1014,31 @@ static void DebugAction_Util_Warp_SelectMap(u8 taskId) if (gMain.newKeys & DPAD_ANY) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > max_value-1) - gTasks[taskId].data[3] = max_value-1; + if(gTasks[taskId].data[3] > max_value - 1) + gTasks[taskId].data[3] = max_value - 1; } if(gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } if(gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { if(gTasks[taskId].data[4] < 2) gTasks[taskId].data[4] += 1; } ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, 2); - ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]]-1, STR_CONV_MODE_LEADING_ZEROS, 2); + ConvertIntToDecimalStringN(gStringVar2, MAP_GROUP_COUNT[gTasks[taskId].data[5]] - 1, STR_CONV_MODE_LEADING_ZEROS, 2); StringExpandPlaceholders(gStringVar1, gDebugText_Util_WarpToMap_SelMax); GetMapName(gStringVar2, Overworld_GetMapHeaderByGroupAndId(gTasks[taskId].data[5], gTasks[taskId].data[3])->regionMapSectionId, 0); StringCopy(gStringVar3, gText_DigitIndicator[gTasks[taskId].data[4]]); @@ -1103,7 +1092,8 @@ static void DebugAction_Util_Warp_SelectWarp(u8 taskId) { gTasks[taskId].data[7] = gTasks[taskId].data[3]; //WARP - SetWarpDestinationToMapWarp(gTasks[taskId].data[5], gTasks[taskId].data[6], gTasks[taskId].data[7]); //If not warp with the number available -> center of map + //If there's no warp with the number available, warp to the center of the map. + SetWarpDestinationToMapWarp(gTasks[taskId].data[5], gTasks[taskId].data[6], gTasks[taskId].data[7]); DoWarp(); ResetInitialPlayerAvatarState(); DebugAction_DestroyExtraWindow(taskId); @@ -1277,7 +1267,7 @@ static void DebugAction_Flags_Flags(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, 0, STR_CONV_MODE_LEADING_ZEROS, DEBUG_NUMBER_DIGITS_FLAGS); ConvertIntToHexStringN(gStringVar2, 0, STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar1, gDebugText_Flags_FlagHex); - if(FlagGet(0) == TRUE) + if (FlagGet(0) == TRUE) StringCopyPadded(gStringVar2, gDebugText_Flags_FlagSet, CHAR_SPACE, 15); else StringCopyPadded(gStringVar2, gDebugText_Flags_FlagUnset, CHAR_SPACE, 15); @@ -1301,38 +1291,38 @@ static void DebugAction_Flags_FlagsSelect(u8 taskId) return; } - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { PlaySE(SE_SELECT); gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] >= FLAGS_COUNT){ + if (gTasks[taskId].data[3] >= FLAGS_COUNT){ gTasks[taskId].data[3] = FLAGS_COUNT - 1; } } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { PlaySE(SE_SELECT); gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0){ + if (gTasks[taskId].data[3] < 0){ gTasks[taskId].data[3] = 0; } } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { PlaySE(SE_SELECT); gTasks[taskId].data[4] -= 1; - if(gTasks[taskId].data[4] < 0) + if (gTasks[taskId].data[4] < 0) { gTasks[taskId].data[4] = 0; } } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { PlaySE(SE_SELECT); gTasks[taskId].data[4] += 1; - if(gTasks[taskId].data[4] > DEBUG_NUMBER_DIGITS_FLAGS-1) + if (gTasks[taskId].data[4] > DEBUG_NUMBER_DIGITS_FLAGS - 1) { - gTasks[taskId].data[4] = DEBUG_NUMBER_DIGITS_FLAGS-1; + gTasks[taskId].data[4] = DEBUG_NUMBER_DIGITS_FLAGS - 1; } } @@ -1341,7 +1331,7 @@ static void DebugAction_Flags_FlagsSelect(u8 taskId) ConvertIntToDecimalStringN(gStringVar1, gTasks[taskId].data[3], STR_CONV_MODE_LEADING_ZEROS, DEBUG_NUMBER_DIGITS_FLAGS); ConvertIntToHexStringN(gStringVar2, gTasks[taskId].data[3], STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(gStringVar1, gDebugText_Flags_FlagHex); - if(FlagGet(gTasks[taskId].data[3]) == TRUE) + if (FlagGet(gTasks[taskId].data[3]) == TRUE) StringCopyPadded(gStringVar2, gDebugText_Flags_FlagSet, CHAR_SPACE, 15); else StringCopyPadded(gStringVar2, gDebugText_Flags_FlagUnset, CHAR_SPACE, 15); @@ -1364,44 +1354,41 @@ static void DebugAction_Flags_SetPokedexFlags(u8 taskId) } static void DebugAction_Flags_SwitchDex(u8 taskId) { - if(FlagGet(FLAG_SYS_POKEDEX_GET)) - { - FlagClear(FLAG_SYS_POKEDEX_GET); + if (FlagGet(FLAG_SYS_POKEDEX_GET)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(FLAG_SYS_POKEDEX_GET); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(FLAG_SYS_POKEDEX_GET); } static void DebugAction_Flags_SwitchNatDex(u8 taskId) { - if(IsNationalPokedexEnabled()) + if (IsNationalPokedexEnabled()) { DisableNationalPokedex(); PlaySE(SE_PC_OFF); - }else{ + } + else + { EnableNationalPokedex(); PlaySE(SE_PC_LOGIN); } } static void DebugAction_Flags_SwitchPokeNav(u8 taskId) { - if(FlagGet(FLAG_SYS_POKENAV_GET)) - { - FlagClear(FLAG_SYS_POKENAV_GET); + if (FlagGet(FLAG_SYS_POKENAV_GET)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(FLAG_SYS_POKENAV_GET); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(FLAG_SYS_POKENAV_GET); } static void DebugAction_Flags_ToggleFlyFlags(u8 taskId) { // Sound effect - if(FlagGet(FLAG_LANDMARK_BATTLE_FRONTIER)) + if (FlagGet(FLAG_LANDMARK_BATTLE_FRONTIER)) PlaySE(SE_PC_OFF); else PlaySE(SE_PC_LOGIN); + FlagToggle(FLAG_VISITED_LITTLEROOT_TOWN); FlagToggle(FLAG_VISITED_OLDALE_TOWN); FlagToggle(FLAG_VISITED_DEWFORD_TOWN); @@ -1424,10 +1411,11 @@ static void DebugAction_Flags_ToggleFlyFlags(u8 taskId) static void DebugAction_Flags_ToggleBadgeFlags(u8 taskId) { // Sound effect - if(FlagGet(FLAG_BADGE08_GET)) + if (FlagGet(FLAG_BADGE08_GET)) PlaySE(SE_PC_OFF); else PlaySE(SE_PC_LOGIN); + FlagToggle(FLAG_BADGE01_GET); FlagToggle(FLAG_BADGE02_GET); FlagToggle(FLAG_BADGE03_GET); @@ -1440,7 +1428,7 @@ static void DebugAction_Flags_ToggleBadgeFlags(u8 taskId) static void DebugAction_Flags_ToggleFrontierPass(u8 taskId) { // Sound effect - if(FlagGet(FLAG_SYS_FRONTIER_PASS)) + if (FlagGet(FLAG_SYS_FRONTIER_PASS)) PlaySE(SE_PC_OFF); else PlaySE(SE_PC_LOGIN); @@ -1453,48 +1441,39 @@ static void DebugAction_Flags_CollisionOnOff(u8 taskId) LockPlayerFieldControls(); ScriptContext_SetupScript(Debug_FlagsNotSetMessage); #else - if(FlagGet(DEBUG_FLAG_NO_COLLISION)) - { - FlagClear(DEBUG_FLAG_NO_COLLISION); + if (FlagGet(DEBUG_FLAG_NO_COLLISION)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(DEBUG_FLAG_NO_COLLISION); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(DEBUG_FLAG_NO_COLLISION); #endif } static void DebugAction_Flags_EncounterOnOff(u8 taskId) { -#if DEBUG_FLAG_NO_ENCOUNTER == 0 +#if OW_FLAG_NO_ENCOUNTER == 0 Debug_DestroyMenu(taskId); LockPlayerFieldControls(); ScriptContext_SetupScript(Debug_FlagsNotSetMessage); #else - if(FlagGet(DEBUG_FLAG_NO_ENCOUNTER)) - { - FlagClear(DEBUG_FLAG_NO_ENCOUNTER); + if (FlagGet(OW_FLAG_NO_ENCOUNTER)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(DEBUG_FLAG_NO_ENCOUNTER); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(OW_FLAG_NO_ENCOUNTER); #endif } static void DebugAction_Flags_TrainerSeeOnOff(u8 taskId) { -#if DEBUG_FLAG_NO_TRAINER_SEE == 0 +#if OW_FLAG_NO_TRAINER_SEE == 0 Debug_DestroyMenu(taskId); LockPlayerFieldControls(); ScriptContext_SetupScript(Debug_FlagsNotSetMessage); #else - if(FlagGet(DEBUG_FLAG_NO_TRAINER_SEE)) - { - FlagClear(DEBUG_FLAG_NO_TRAINER_SEE); + if (FlagGet(OW_FLAG_NO_TRAINER_SEE)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(DEBUG_FLAG_NO_TRAINER_SEE); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(OW_FLAG_NO_TRAINER_SEE); #endif } static void DebugAction_Flags_BagUseOnOff(u8 taskId) @@ -1504,14 +1483,11 @@ static void DebugAction_Flags_BagUseOnOff(u8 taskId) LockPlayerFieldControls(); ScriptContext_SetupScript(Debug_FlagsNotSetMessage); #else - if(FlagGet(B_FLAG_NO_BAG_USE)) - { - FlagClear(B_FLAG_NO_BAG_USE); + if (FlagGet(B_FLAG_NO_BAG_USE)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(B_FLAG_NO_BAG_USE); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(B_FLAG_NO_BAG_USE); #endif } static void DebugAction_Flags_CatchingOnOff(u8 taskId) @@ -1521,14 +1497,11 @@ static void DebugAction_Flags_CatchingOnOff(u8 taskId) LockPlayerFieldControls(); ScriptContext_SetupScript(Debug_FlagsNotSetMessage); #else - if(FlagGet(B_FLAG_NO_CATCHING)) - { - FlagClear(B_FLAG_NO_CATCHING); + if (FlagGet(B_FLAG_NO_CATCHING)) PlaySE(SE_PC_OFF); - }else{ - FlagSet(B_FLAG_NO_CATCHING); + else PlaySE(SE_PC_LOGIN); - } + FlagToggle(B_FLAG_NO_CATCHING); #endif } @@ -1560,42 +1533,36 @@ static void DebugAction_Vars_Vars(u8 taskId) gTasks[taskId].func = DebugAction_Vars_Select; gTasks[taskId].data[2] = windowId; - gTasks[taskId].data[3] = VARS_START; //Current Variable - gTasks[taskId].data[4] = 0; //Digit Selected + gTasks[taskId].data[3] = VARS_START; //Current Variable + gTasks[taskId].data[4] = 0; //Digit Selected gTasks[taskId].data[5] = 0; //Current Variable VALUE } static void DebugAction_Vars_Select(u8 taskId) { - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > VARS_END){ + if(gTasks[taskId].data[3] > VARS_END) gTasks[taskId].data[3] = VARS_END; - } } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < VARS_START){ + if (gTasks[taskId].data[3] < VARS_START) gTasks[taskId].data[3] = VARS_START; - } } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { gTasks[taskId].data[4] -= 1; if(gTasks[taskId].data[4] < 0) - { gTasks[taskId].data[4] = 0; - } } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { gTasks[taskId].data[4] += 1; - if(gTasks[taskId].data[4] > DEBUG_NUMBER_DIGITS_VARIABLES-1) - { - gTasks[taskId].data[4] = DEBUG_NUMBER_DIGITS_VARIABLES-1; - } + if (gTasks[taskId].data[4] > DEBUG_NUMBER_DIGITS_VARIABLES - 1) + gTasks[taskId].data[4] = DEBUG_NUMBER_DIGITS_VARIABLES - 1; } if (gMain.newKeys & DPAD_ANY) @@ -1653,30 +1620,30 @@ static void DebugAction_Vars_SetValue(u8 taskId) if (gTasks[taskId].data[6] + sPowersOfTen[gTasks[taskId].data[4]] <= 32000) gTasks[taskId].data[6] += sPowersOfTen[gTasks[taskId].data[4]]; else - gTasks[taskId].data[6] = 32000-1; - if(gTasks[taskId].data[6] >= 32000){ - gTasks[taskId].data[6] = 32000-1; - } + gTasks[taskId].data[6] = 32000 - 1; + + if (gTasks[taskId].data[6] >= 32000) + gTasks[taskId].data[6] = 32000 - 1; } if(gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[6] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[6] < 0){ + if (gTasks[taskId].data[6] < 0){ gTasks[taskId].data[6] = 0; } } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { gTasks[taskId].data[4] -= 1; - if(gTasks[taskId].data[4] < 0) + if (gTasks[taskId].data[4] < 0) { gTasks[taskId].data[4] = 0; } } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { gTasks[taskId].data[4] += 1; - if(gTasks[taskId].data[4] > 4) + if (gTasks[taskId].data[4] > 4) { gTasks[taskId].data[4] = 4; } @@ -1751,26 +1718,26 @@ static void DebugAction_Give_Item_SelectId(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; if(gTasks[taskId].data[3] >= ITEMS_COUNT) gTasks[taskId].data[3] = ITEMS_COUNT - 1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 1) + if (gTasks[taskId].data[3] < 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { if(gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS-1) + if (gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS - 1) gTasks[taskId].data[4] += 1; } @@ -1822,26 +1789,26 @@ static void DebugAction_Give_Item_SelectQuantity(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] >= 100) + if (gTasks[taskId].data[3] >= 100) gTasks[taskId].data[3] = 99; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 1) + if (gTasks[taskId].data[3] < 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < 2) + if (gTasks[taskId].data[4] < 2) gTasks[taskId].data[4] += 1; } @@ -1880,9 +1847,11 @@ static void DebugAction_Give_AllTMs(u8 taskId) { u16 i; PlayFanfare(MUS_OBTAIN_TMHM); - for (i = ITEM_TM01; i <= ITEM_TM50; i++) - if(!CheckBagHasItem(i, 1)) + for (i = ITEM_TM01; i <= ITEM_HM08; i++) + { + if (ItemIdToBattleMoveId(i) != MOVE_NONE && !CheckBagHasItem(i, 1)) AddBagItem(i, 1); + } Debug_DestroyMenu(taskId); ScriptContext_Enable(); } @@ -1937,12 +1906,7 @@ static void DebugAction_Give_PokemonSimple(u8 taskId) gTasks[taskId].data[5] = 0; //Complex? FreeMonIconPalettes(); //Free space for new pallete LoadMonIconPalette(gTasks[taskId].data[3]); //Loads pallete for current mon - #ifndef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0, TRUE); //Create pokemon sprite - #endif - #ifdef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite - #endif + gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite gSprites[gTasks[taskId].data[6]].oam.priority = 0; //Mon Icon ID } static void DebugAction_Give_PokemonComplex(u8 taskId) @@ -1972,7 +1936,6 @@ static void DebugAction_Give_PokemonComplex(u8 taskId) StringExpandPlaceholders(gStringVar4, gDebugText_PokemonID); AddTextPrinterParameterized(windowId, 1, gStringVar4, 1, 1, 0, NULL); - gTasks[taskId].func = DebugAction_Give_Pokemon_SelectId; gTasks[taskId].data[2] = windowId; gTasks[taskId].data[3] = 1; //Current ID @@ -1980,12 +1943,7 @@ static void DebugAction_Give_PokemonComplex(u8 taskId) gTasks[taskId].data[5] = 1; //Complex? FreeMonIconPalettes(); //Free space for new palletes LoadMonIconPalette(gTasks[taskId].data[3]); //Loads pallete for current mon - #ifndef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0, TRUE); //Create pokemon sprite - #endif - #ifdef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite - #endif + gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite gSprites[gTasks[taskId].data[6]].oam.priority = 0; //Mon Icon ID gTasks[taskId].data[7] = 0; //iterator } @@ -1996,30 +1954,26 @@ static void DebugAction_Give_Pokemon_SelectId(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > SPECIES_CELEBI && gTasks[taskId].data[3] < SPECIES_TREECKO) - gTasks[taskId].data[3] = SPECIES_TREECKO; - if(gTasks[taskId].data[3] >= NUM_SPECIES) + if (gTasks[taskId].data[3] >= NUM_SPECIES) gTasks[taskId].data[3] = NUM_SPECIES - 1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < SPECIES_TREECKO && gTasks[taskId].data[3] > SPECIES_CELEBI) - gTasks[taskId].data[3] = SPECIES_CELEBI; - if(gTasks[taskId].data[3] < 1) + if (gTasks[taskId].data[3] < 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS-1) + if (gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS - 1) gTasks[taskId].data[4] += 1; } @@ -2033,12 +1987,7 @@ static void DebugAction_Give_Pokemon_SelectId(u8 taskId) FreeAndDestroyMonIconSprite(&gSprites[gTasks[taskId].data[6]]); FreeMonIconPalettes(); //Free space for new pallete LoadMonIconPalette(gTasks[taskId].data[3]); //Loads pallete for current mon - #ifndef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0, TRUE); //Create pokemon sprite - #endif - #ifdef POKEMON_EXPANSION - gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite - #endif + gTasks[taskId].data[6] = CreateMonIcon(gTasks[taskId].data[3], SpriteCB_MonIcon, DEBUG_NUMBER_ICON_X, DEBUG_NUMBER_ICON_Y, 4, 0); //Create pokemon sprite gSprites[gTasks[taskId].data[6]].oam.priority = 0; } @@ -2071,26 +2020,26 @@ static void DebugAction_Give_Pokemon_SelectLevel(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > 100) + if (gTasks[taskId].data[3] > 100) gTasks[taskId].data[3] = 100; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 1) + if (gTasks[taskId].data[3] < 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < 2) + if (gTasks[taskId].data[4] < 2) gTasks[taskId].data[4] += 1; } @@ -2143,20 +2092,20 @@ static void DebugAction_Give_Pokemon_SelectShiny(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > 1) + if (gTasks[taskId].data[3] > 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } - if(gTasks[taskId].data[3] == 1) + if (gTasks[taskId].data[3] == 1) StringCopyPadded(gStringVar2, gDebugText_Flags_FlagSet, CHAR_SPACE, 15); else StringCopyPadded(gStringVar2, gDebugText_Flags_FlagUnset, CHAR_SPACE, 15); @@ -2194,13 +2143,13 @@ static void DebugAction_Give_Pokemon_SelectNature(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > NUM_NATURES-1) + if (gTasks[taskId].data[3] > NUM_NATURES-1) gTasks[taskId].data[3] = NUM_NATURES-1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; if(gTasks[taskId].data[3] < 0) @@ -2242,26 +2191,23 @@ static void DebugAction_Give_Pokemon_SelectNature(u8 taskId) static void DebugAction_Give_Pokemon_SelectAbility(u8 taskId) { u8 abilityId; - u8 abilityCount = 2 - 1; //-1 for proper iteration + u8 abilityCount = NUM_ABILITY_SLOTS - 1; //-1 for proper iteration u8 i = 0; - #ifdef POKEMON_EXPANSION - abilityCount = NUM_ABILITY_SLOTS - 1; - #endif if (gMain.newKeys & DPAD_ANY) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > abilityCount) + if (gTasks[taskId].data[3] > abilityCount) gTasks[taskId].data[3] = abilityCount; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } @@ -2305,26 +2251,26 @@ static void DebugAction_Give_Pokemon_SelectIVs(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > 31) + if (gTasks[taskId].data[3] > 31) gTasks[taskId].data[3] = 31; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < 2) + if (gTasks[taskId].data[4] < 2) gTasks[taskId].data[4] += 1; } @@ -2444,26 +2390,26 @@ static void DebugAction_Give_Pokemon_Move(u8 taskId) { PlaySE(SE_SELECT); - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] >= MOVES_COUNT) + if (gTasks[taskId].data[3] >= MOVES_COUNT) gTasks[taskId].data[3] = MOVES_COUNT - 1; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 0) + if (gTasks[taskId].data[3] < 0) gTasks[taskId].data[3] = 0; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < 3) + if (gTasks[taskId].data[4] < 3) gTasks[taskId].data[4] += 1; } @@ -2583,12 +2529,11 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu IVs[4] = sDebugMonData->mon_iv_satk; IVs[5] = sDebugMonData->mon_iv_sdef; - //Nature if (nature == NUM_NATURES || nature == 0xFF) nature = Random() % NUM_NATURES; - //Shinyness + //Shininess if (isShiny == 1) { u32 personality; @@ -2608,21 +2553,9 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu else CreateMonWithNature(&mon, species, level, 32, nature); - //EVs/IVs + //IVs for (i = 0; i < NUM_STATS; i++) { - // ev - // if (evs[i] != 0xFF && evTotal < 510) - // { - // // only up to 510 evs - // if ((evTotal + evs[i]) > 510) - // evs[i] = (510 - evTotal); - - // evTotal += evs[i]; - // SetMonData(&mon, MON_DATA_HP_EV + i, &evs[i]); - // } - - // iv iv_val = IVs[i]; if (iv_val != 32 && iv_val != 0xFF) SetMonData(&mon, MON_DATA_HP_IV + i, &iv_val); @@ -2648,17 +2581,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu SetMonData(&mon, MON_DATA_ABILITY_NUM, &abilityNum); - //ball - // if (ball <= POKEBALL_COUNT) - // SetMonData(&mon, MON_DATA_POKEBALL, &ball); - - //item - // heldItem[0] = item; - // heldItem[1] = item >> 8; - // SetMonData(&mon, MON_DATA_HELD_ITEM, heldItem); - // give player the mon - //sentToPc = GiveMonToPlayer(&mon); SetMonData(&mon, MON_DATA_OT_NAME, gSaveBlock2Ptr->playerName); SetMonData(&mon, MON_DATA_OT_GENDER, &gSaveBlock2Ptr->playerGender); for (i = 0; i < PARTY_SIZE; i++) @@ -2805,26 +2728,26 @@ static void DebugAction_Sound_SE_SelectId(u8 taskId) { if (gMain.newKeys & DPAD_ANY) { - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > END_SE) + if (gTasks[taskId].data[3] > END_SE) gTasks[taskId].data[3] = END_SE; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < 1) + if (gTasks[taskId].data[3] < 1) gTasks[taskId].data[3] = 1; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS-1) + if (gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS - 1) gTasks[taskId].data[4] += 1; } @@ -2882,26 +2805,26 @@ static void DebugAction_Sound_MUS_SelectId(u8 taskId) { if (gMain.newKeys & DPAD_ANY) { - if(gMain.newKeys & DPAD_UP) + if (gMain.newKeys & DPAD_UP) { gTasks[taskId].data[3] += sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] > END_MUS) + if (gTasks[taskId].data[3] > END_MUS) gTasks[taskId].data[3] = END_MUS; } - if(gMain.newKeys & DPAD_DOWN) + if (gMain.newKeys & DPAD_DOWN) { gTasks[taskId].data[3] -= sPowersOfTen[gTasks[taskId].data[4]]; - if(gTasks[taskId].data[3] < START_MUS) + if (gTasks[taskId].data[3] < START_MUS) gTasks[taskId].data[3] = START_MUS; } - if(gMain.newKeys & DPAD_LEFT) + if (gMain.newKeys & DPAD_LEFT) { - if(gTasks[taskId].data[4] > 0) + if (gTasks[taskId].data[4] > 0) gTasks[taskId].data[4] -= 1; } - if(gMain.newKeys & DPAD_RIGHT) + if (gMain.newKeys & DPAD_RIGHT) { - if(gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS-1) + if (gTasks[taskId].data[4] < DEBUG_NUMBER_DIGITS_ITEMS - 1) gTasks[taskId].data[4] += 1; } diff --git a/src/item_use.c b/src/item_use.c index a0b4233ff..cb85ae3e3 100755 --- a/src/item_use.c +++ b/src/item_use.c @@ -9,7 +9,6 @@ #include "bike.h" #include "coins.h" #include "data.h" -#include "debug.h" #include "event_data.h" #include "event_object_lock.h" #include "event_object_movement.h" diff --git a/src/trainer_see.c b/src/trainer_see.c index d44e5e46f..b720a59d9 100644 --- a/src/trainer_see.c +++ b/src/trainer_see.c @@ -1,6 +1,5 @@ #include "global.h" #include "battle_setup.h" -#include "debug.h" #include "event_data.h" #include "event_object_movement.h" #include "field_effect.h"