From 7a9e847fd40c89ae6ccad7d0f6f1fd0633b1c22d Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Thu, 2 Jan 2025 09:00:56 -0500 Subject: [PATCH] some clean up --- include/config/dexnav.h | 6 +++--- include/dexnav.h | 4 ++-- include/event_scripts.h | 2 +- src/battle_main.c | 4 ++-- src/dexnav.c | 10 +++++----- src/pokemon.c | 2 +- src/start_menu.c | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/config/dexnav.h b/include/config/dexnav.h index c50345592c3e..20d05f7a23f7 100644 --- a/include/config/dexnav.h +++ b/include/config/dexnav.h @@ -1,14 +1,14 @@ #ifndef GUARD_CONFIG_DEXNAV_H #define GUARD_CONFIG_DEXNAV_H -#define DEXNAV_ENABLED FALSE // Whether or not dexnav is enabled. If TRUE, flags/vars below must all be non-zero +#define DEXNAV_ENABLED FALSE // Whether or not DexNav is enabled. If TRUE, flags/vars below must all be non-zero #define USE_DEXNAV_SEARCH_LEVELS FALSE /* WARNING: POSSIBLY EXCEEDS SAVEBLOCK SPACE! REQUIRES 1 BYTE PER SPECIES */ // Flag/var defines #define FLAG_SYS_DEXNAV_SEARCH 0 // Searching for mon -#define FLAG_SYS_DEXNAV_GET 0 // Dexnav shows in start menu +#define FLAG_SYS_DEXNAV_GET 0 // DexNav shows in start menu #define FLAG_SYS_DETECTOR_MODE 0 // Allow player to find hidden mons -#define VAR_DEXNAV_SPECIES 0 // Registered dexnav species +#define VAR_DEXNAV_SPECIES 0 // Registered DexNav species #define VAR_DEXNAV_STEP_COUNTER 0 // Steps for finding hidden pokemon // Search parameters diff --git a/include/dexnav.h b/include/dexnav.h index 054878ea41a8..6829e57690e9 100644 --- a/include/dexnav.h +++ b/include/dexnav.h @@ -59,7 +59,7 @@ #define LIT_STAR_TILE_TAG 0x4010 #define HELD_ITEM_TAG 0xd750 -// Dexnav search variable +// DexNav search variable #define DEXNAV_MASK_SPECIES 0x3FFF // First 14 bits #define DEXNAV_MASK_ENVIRONMENT 0xC000 // Last two bit @@ -72,6 +72,6 @@ bool8 TryFindHiddenPokemon(void); u32 CalculateDexnavShinyRolls(void); void IncrementDexNavChain(void); -extern bool8 gDexnavBattle; +extern bool8 gDexNavBattle; #endif // GUARD_DEXNAV_H diff --git a/include/event_scripts.h b/include/event_scripts.h index 7176d396f076..133d9fa98bb9 100644 --- a/include/event_scripts.h +++ b/include/event_scripts.h @@ -653,7 +653,7 @@ extern const u8 Common_Movement_FollowerSafeEnd[]; extern const u8 EventScript_CancelMessageBox[]; extern const u8 Common_EventScript_ShowPokemonCenterSign[]; extern const u8 Common_EventScript_ShowPokemartSign[]; -// Dexnav +// DexNav extern const u8 EventScript_StartDexNavBattle[]; extern const u8 EventScript_NotFoundNearby[]; extern const u8 EventScript_PokemonGotAway[]; diff --git a/src/battle_main.c b/src/battle_main.c index 9095ac34cdc6..c4b5f7484145 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -5690,12 +5690,12 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void) { gIsFishingEncounter = FALSE; gIsSurfingEncounter = FALSE; - if (gDexnavBattle && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) + if (gDexNavBattle && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT)) IncrementDexNavChain(); else gSaveBlock3Ptr->dexNavChain = 0; - gDexnavBattle = FALSE; + gDexNavBattle = FALSE; ResetSpriteData(); if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK diff --git a/src/dexnav.c b/src/dexnav.c index e28bd9c309c5..86c99b1f4325 100644 --- a/src/dexnav.c +++ b/src/dexnav.c @@ -134,7 +134,7 @@ struct DexNavGUI EWRAM_DATA static struct DexNavSearch *sDexNavSearchDataPtr = NULL; EWRAM_DATA static struct DexNavGUI *sDexNavUiDataPtr = NULL; EWRAM_DATA static u8 *sBg1TilemapBuffer = NULL; -EWRAM_DATA bool8 gDexnavBattle = FALSE; +EWRAM_DATA bool8 gDexNavBattle = FALSE; //// Function Declarations //GUI @@ -977,7 +977,7 @@ static void DexNavDrawIcons(void) ///////////////////// //// SEARCH TASK //// ///////////////////// -bool8 TryStartDexnavSearch(void) +bool8 TryStartDexNavSearch(void) { u8 taskId; u16 val = VarGet(VAR_DEXNAV_SPECIES); @@ -1110,7 +1110,7 @@ static void Task_DexNavSearch(u8 taskId) if (sDexNavSearchDataPtr->proximity < 1) { - gDexnavBattle = TRUE; + gDexNavBattle = TRUE; CreateDexNavWildMon(sDexNavSearchDataPtr->species, sDexNavSearchDataPtr->potential, sDexNavSearchDataPtr->monLevel, sDexNavSearchDataPtr->abilityNum, sDexNavSearchDataPtr->heldItem, sDexNavSearchDataPtr->moves); @@ -2326,7 +2326,7 @@ void Task_OpenDexNavFromStartMenu(u8 taskId) { if (DEXNAV_ENABLED == FALSE) { // must have it enabled to enter - DebugPrintfLevel(MGBA_LOG_ERROR, "Dexnav was opened when DEXNAV_ENABLED config was disabled! Check include/config/dexnav.h"); + DebugPrintfLevel(MGBA_LOG_ERROR, "DexNav was opened when DEXNAV_ENABLED config was disabled! Check include/config/dexnav.h"); DestroyTask(taskId); } else if (!gPaletteFade.active) @@ -2655,7 +2655,7 @@ static void DexNavDrawHiddenIcons(void) ///////////////////////// //// GENERAL UTILITY //// ///////////////////////// -u32 CalculateDexnavShinyRolls(void) +u32 CalculateDexNavShinyRolls(void) { u32 chainBonus, rndBonus; u8 chain = gSaveBlock3Ptr->dexNavChain; diff --git a/src/pokemon.c b/src/pokemon.c index eefbd7c4f017..498e91f607d6 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -1163,7 +1163,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV, totalRerolls += 1; if (I_FISHING_CHAIN && gIsFishingEncounter) totalRerolls += CalculateChainFishingShinyRolls(); - if (gDexnavBattle) + if (gDexNavBattle) totalRerolls += CalculateDexnavShinyRolls(); while (GET_SHINY_VALUE(value, personality) >= SHINY_ODDS && totalRerolls > 0) diff --git a/src/start_menu.c b/src/start_menu.c index 5e4849b26ddf..004403e659e7 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -329,7 +329,7 @@ static void AddStartMenuAction(u8 action) } static void BuildNormalStartMenu(void) -{ +{ if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE) AddStartMenuAction(MENU_ACTION_POKEDEX);