some clean up

This commit is contained in:
ghoulslash 2025-01-02 09:00:56 -05:00
parent 85787aaa36
commit 7a9e847fd4
7 changed files with 15 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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[];

View file

@ -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

View file

@ -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;

View file

@ -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)

View file

@ -329,7 +329,7 @@ static void AddStartMenuAction(u8 action)
}
static void BuildNormalStartMenu(void)
{
{
if (FlagGet(FLAG_SYS_POKEDEX_GET) == TRUE)
AddStartMenuAction(MENU_ACTION_POKEDEX);