diff --git a/include/config/battle.h b/include/config/battle.h index 9ed3fb639..b4745b3e3 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -273,6 +273,7 @@ #define NO_BAG_RESTRICTION 0 #define NO_BAG_AGAINST_TRAINER 1 #define NO_BAG_IN_BATTLE 2 +#define NO_BAG_INVALID_VALUE 3 #define B_VAR_NO_BAG_USE 0 // If 1, the ability to use the bag in battle is disabled in trainer battles. If 2, it is also disabled in wild battles. diff --git a/include/config/debug.h b/include/config/debug.h index 3786161fc..b3ccd1ddf 100644 --- a/include/config/debug.h +++ b/include/config/debug.h @@ -2,16 +2,16 @@ #define GUARD_CONFIG_DEBUG_H // Overworld Debug -#define DEBUG_OVERWORLD_MENU TRUE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. +#define DEBUG_OVERWORLD_MENU DISABLED_ON_RELEASE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default. #define DEBUG_OVERWORLD_HELD_KEYS (B_BUTTON) // The keys required to be held to open the debug menu. #define DEBUG_OVERWORLD_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_OVERWORLD_HELD_KEYS. #define DEBUG_OVERWORLD_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex). // Battle Debug Menu -#define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. +#define DEBUG_BATTLE_MENU DISABLED_ON_RELEASE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button. #define DEBUG_AI_DELAY_TIMER FALSE // If set to TRUE, displays the number of frames it takes for the AI to choose a move. Replaces the "What will PKMN do" text. Useful for devs or anyone who modifies the AI code and wants to see if it doesn't take too long to run. // Pokémon Debug -#define DEBUG_POKEMON_SPRITE_VISUALIZER TRUE // Enables a debug menu for Pokémon sprites and icons, accessed by pressing Select in the summary screen. +#define DEBUG_POKEMON_SPRITE_VISUALIZER DISABLED_ON_RELEASE // Enables a debug menu for Pokémon sprites and icons, accessed by pressing Select in the summary screen. #endif // GUARD_CONFIG_DEBUG_H diff --git a/include/config/general.h b/include/config/general.h index b10736263..96835f0c6 100644 --- a/include/config/general.h +++ b/include/config/general.h @@ -6,11 +6,16 @@ // still has them in the ROM. This is because the developers forgot // to define NDEBUG before release, however this has been changed as // Ruby's actual debug build does not use the AGBPrint features. -// #define NDEBUG +// +// Use `make release` to automatically enable NDEBUG. +#ifdef RELEASE +#define NDEBUG +#endif -// To enable printf debugging, comment out "#define NDEBUG". This allows +// printf debugging is now enabled by default. This allows // the various AGBPrint functions to be used. (See include/gba/isagbprint.h). // See below for enabling different pretty printing versions. +// To disable printf debugging, build a release build using `make release`. #ifndef NDEBUG #define PRETTY_PRINT_OFF (0) @@ -72,10 +77,8 @@ // General settings #define EXPANSION_INTRO TRUE // If TRUE, a custom RHH intro will play after the vanilla copyright screen. -#define SUMMARY_SCREEN_NATURE_COLORS TRUE // If TRUE, nature-based stat boosts and reductions will be red and blue in the summary screen. #define HQ_RANDOM TRUE // If TRUE, replaces the default RNG with an implementation of SFC32 RNG. May break code that relies on RNG. -#define AUTO_SCROLL_TEXT FALSE // If TRUE, text will automatically scroll to the next line after NUM_FRAMES_AUTO_SCROLL_DELAY. Players can still press A_BUTTON or B_BUTTON to scroll on their own. -#define NUM_FRAMES_AUTO_SCROLL_DELAY 49 +#define PHONEMES_SHARED FALSE // If TRUE, bard phonemes all reference the same sound (sound/direct_sound_samples/phonemes/shared.bin) to save ROM space. // Measurement system constants to be used for UNITS #define UNITS_IMPERIAL 0 // Inches, feet, pounds @@ -87,5 +90,4 @@ // Naming Screen #define AUTO_LOWERCASE_KEYBOARD GEN_LATEST // Starting in GEN_6, after entering the first uppercase character, the keyboard switches to lowercase letters. -#define SAVE_TYPE_ERROR_SCREEN FALSE // When enabled, this shows an error message when the game is loaded on a cart without a flash chip or on an emulator with the wrong save type setting instead of crashing. #endif // GUARD_CONFIG_GENERAL_H diff --git a/include/config/item.h b/include/config/item.h index 96156b0db..a995407d3 100644 --- a/include/config/item.h +++ b/include/config/item.h @@ -12,7 +12,7 @@ #define I_GRISEOUS_ORB_FORM_CHANGE GEN_LATEST // In Gen9+, the Griseous Orb no longer changes Giratina's form when held. #define I_GEM_BOOST_POWER GEN_LATEST // In Gen6+, the Gem boost power was reduced from 50% to 30%. #define I_USE_EVO_HELD_ITEMS_FROM_BAG FALSE // If TRUE, items such as Razor Claw or Electirizer will be usable from the bag to evolve a Pokémon just like in LA. -#define I_TYPE_BOOST_POWER GEN_LATEST // In Gen4+, all regular type boosting held items had their power increased from 10% to 20%. eg. Charcoal +#define I_TYPE_BOOST_POWER GEN_LATEST // In Gen4+, type-enhancing held items (such as Charcoal) had their multiplier increased from 1.1x to 1.2x. Sea Incense was changed from 1.05x to 1.2x. #define I_SELL_VALUE_FRACTION GEN_LATEST // In Gen9+, items sell for 1/4 of their value instead of 1/2. #define I_PRICE GEN_LATEST // Some items have varied in value across generations. #define I_BERRY_PRICE GEN_7 // Since Berries have become unplantable (Gen8+), their price has gone up. @@ -20,6 +20,7 @@ #define I_PREMIER_BALL_BONUS GEN_LATEST // In LGPE onwards (Gen8+ here), you are given a Premier Ball for every 10 Poké Balls of any type and in the same purchase. Previously, it only applied to regular Poké Balls and only 1 could be obtained per purchase. #define I_ROTOM_CATALOG_THUNDER_SHOCK GEN_LATEST // In Gen9+, reverting Rotom to its base form will teach it Thunder Shock even if it knows another move. #define I_REPEL_INCLUDE_FAINTED GEN_LATEST // In Gen1 and Gen6+, Repels always use the level of the first member of the party to check which wild Pokémon to prevent encounters with, even if that member is fainted. In Gen2-5, it only uses the level of the first non-fainted Pokémon. +#define I_LAX_INCENSE_BOOST GEN_LATEST // In Gen4+, Lax Incense increases evasion by 10% instead of 5%. // TM config #define I_REUSABLE_TMS FALSE // In Gen5-8, TMs are reusable. Setting this to TRUE will make all vanilla TMs reusable, though they can also be cherry-picked by setting their importance to 1. @@ -36,15 +37,18 @@ #define I_REPEL_LURE_MENU TRUE // If TRUE, the player is able to choose which Repel/Lure to use once the previous one runs out. Cursor position is saved by VAR_LAST_REPEL_LURE_USED if not 0. // Vs. Seeker -#define I_VS_SEEKER_CHARGING 0 // If this flag is assigned, the Vs Seeker functionality will be enabled. When the player has the Vs. Seeker, Match Call rematch functions will stop working. +#define I_VS_SEEKER_CHARGING 0 // If this flag is assigned, the Vs Seeker functionality will be enabled. When the player has the Vs. Seeker, Match Call rematch functions will stop working. Documentation for the Vs. Seeker can be found in docs/tutorials/vs_seeker.md. +#define I_SHOW_NO_ID_TRAINER DISABLED_ON_RELEASE // If TRUE, object events with a trainer type but no visible trainer id will be shown with a question mark. You may want to add vsseeker_rematchid TRAINER_ID as the top of the script to let the VS seeker know what reaction it's supposed to show. -// Fishing -#define I_FISHING_BITE_ODDS GEN_LATEST // In Gen 1 and Gen 2, the Old Rod has a 100% chance for a bite, Good Rod has a 66% chance for a bite, and Super Rod has a 50% chance for a bite. In Gen 3, all rods have a base 50% chance for a bite. In Gen 4 onwards, the Old Rod has a base 25% chance for a bite, Good Rod has a 50% chance for a bite, and Super Rod has a 75% chance for a bite. -#define I_FISHING_MINIGAME GEN_3 // Each generation uses a variation of reeling in Pokémon once they have been hooked. NOTE: Only the Gen 1/2 and Gen 3 minigames are implemented right now! -#define I_FISHING_ENVIRONMENT GEN_LATEST // In Gen 3, the battle environment when fighting a hooked Pokémon is based on the tile the player is standing on. In Gen 4 onwards, the environment is based on tile that is being fished in, resulting in it usually being a water environment. -#define I_FISHING_STICKY_BOOST GEN_LATEST // In Gen 3, a Pokemon with Suction Cups or Sticky Hold in the first slot of the party causes the chance for a bite to increase by about 35%. In Gen 4 onwards, it doubles the base bite chance. -#define I_FISHING_FOLLOWER_BOOST FALSE // In HGSS, fishing bite odds are increased depending on the friendship of the current following Pokémon. -#define I_FISHING_CHAIN FALSE // Introduced in XY, hooking the same Pokémon repeatedly will increase the odds of that mon being shiny. NOTE: This implementation is an approximation of the actual feature, as XY have not been throughoutly documented or datamined. -#define I_FISHING_PROXIMITY FALSE // Introduced in XY, fishing away from other people in enclosed areas will increase the chances of a Pokémon being hooked. NOTE: This implementation is an approximation of the actual feature, as XY have not been throughoutly documented or datamined. +// ORAS Dowsing Machine +#define I_ORAS_DOWSING_FLAG 0 // Replace 0 with an unused flag to enable the Dowsing Machine mechanic from ORAS. +#define I_ORAS_DOWSING_SOUNDS TRUE // If TRUE, the Dowsing Machine will make sounds based on how far away the hidden item is. +#define I_ORAS_DOWSING_COLOR_PAL 15 // The color within the palette that will change based on proximity to the item. +// Color values for the ORAS dowsing distances/anims +#define I_ORAS_DOWSING_COLOR_NONE RGB_GRAY +#define I_ORAS_DOWSING_COLOR_SLOW RGB2GBA(56, 120, 255) +#define I_ORAS_DOWSING_COLOR_NORMAL RGB2GBA(24, 216, 24) +#define I_ORAS_DOWSING_COLOR_FAST RGB2GBA(255, 255, 40) +#define I_ORAS_DOWSING_COLOR_FASTER RGB_RED #endif // GUARD_CONFIG_ITEM_H diff --git a/include/config/save.h b/include/config/save.h index 11836396a..5e6e17243 100644 --- a/include/config/save.h +++ b/include/config/save.h @@ -1,9 +1,13 @@ #ifndef GUARD_CONFIG_SAVE_H #define GUARD_CONFIG_SAVE_H +// Menu configs +#define SKIP_SAVE_CONFIRMATION FALSE // If TRUE, skips the "There is already a saved file" confirmation when overwriting a save. + // SaveBlock1 configs #define FREE_EXTRA_SEEN_FLAGS_SAVEBLOCK1 FALSE // Free up unused Pokédex seen flags (52 bytes). #define FREE_TRAINER_HILL FALSE // Frees up Trainer Hill data (28 bytes). +#define FREE_TRAINER_TOWER FALSE // Frees up Trainer Tower data (x bytes). #define FREE_MYSTERY_EVENT_BUFFERS FALSE // Frees up ramScript (1104 bytes). #define FREE_MATCH_CALL FALSE // Frees up match call and rematch / VS Seeker data. (104 bytes). #define FREE_UNION_ROOM_CHAT FALSE // Frees up union room chat (212 bytes). diff --git a/include/config/species_enabled.h b/include/config/species_enabled.h index 8b6b9d87b..5866d2439 100644 --- a/include/config/species_enabled.h +++ b/include/config/species_enabled.h @@ -1,9 +1,6 @@ #ifndef GUARD_CONFIG_SPECIES_ENABLED_H #define GUARD_CONFIG_SPECIES_ENABLED_H -// WARNING: For some reason, using 1/0 instead of TRUE/FALSE causes cry IDs to be shifted. -// Please use TRUE/FALSE when using the family toggles. - // Modifying the latest generation WILL change the saveblock due to Dex flags and will require a new save file. // Generations of Pokémon are defined by the first member introduced, // so Pikachu depends on the Gen 1 setting despite Pichu being the lowest member of the evolution tree. diff --git a/include/config/summary_screen.h b/include/config/summary_screen.h index e76cd478b..d0051aec9 100644 --- a/include/config/summary_screen.h +++ b/include/config/summary_screen.h @@ -38,7 +38,7 @@ Info taken from https://bulbapedia.bulbagarden.net/wiki/Stats_judge. #define P_ENABLE_ALL_LEVEL_UP_MOVES FALSE // If TRUE, it enables the Pokémon to learn all level up moves, regardless of its level. // TM Relearner -#define P_TM_MOVES_RELEARNER TRUE // If TRUE, enables machine move relearner. +#define P_TM_MOVES_RELEARNER FALSE // If TRUE, enables machine move relearner. #define P_ENABLE_ALL_TM_MOVES FALSE // If TRUE, it enables the Pokémon to learn all TMs its compatible with, regardless of it being in the bag. // Relearner flags - Redundant if P_ENABLE_MOVE_RELEARNERS is TRUE, but still added here incase you don't want all relearners unlocked at the same time. diff --git a/include/constants/global.h b/include/constants/global.h index eb4c5f0e7..0f993c406 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -1,6 +1,21 @@ #ifndef GUARD_CONSTANTS_GLOBAL_H #define GUARD_CONSTANTS_GLOBAL_H +// You can use the ENABLED_ON_RELEASE and DISABLED_ON_RELEASE macros to +// control whether a feature is enabled or disabled when making a release build. +// +// For example, the overworld debug menu is enabled by default, but when using +// `make release`, it will be automatically disabled. +// +// #define DEBUG_OVERWORLD_MENU DISABLED_ON_RELEASE +#ifdef RELEASE +#define ENABLED_ON_RELEASE TRUE +#define DISABLED_ON_RELEASE FALSE +#else +#define ENABLED_ON_RELEASE FALSE +#define DISABLED_ON_RELEASE TRUE +#endif + #include "config/general.h" #include "config/battle.h" #include "config/caps.h" diff --git a/include/field_player_avatar.h b/include/field_player_avatar.h index b60bb86b5..dd0818a84 100644 --- a/include/field_player_avatar.h +++ b/include/field_player_avatar.h @@ -20,7 +20,6 @@ void StopPlayerAvatar(void); void GetXYCoordsOneStepInFrontOfPlayer(s16 *xPtr, s16 *yPtr); u8 GetPlayerAvatarGraphicsIdByStateId(u8); void SetPlayerAvatarStateMask(u8 mask); -void AlignFishingAnimationFrames(); void CreateStopSurfingTask_NoMusicChange(u8 direction); void SavePlayerFacingDirectionForTeleport(u8 direction); void SetPlayerAvatarTransitionFlags(u16 flags); diff --git a/include/strings.h b/include/strings.h index edcb63b6b..ac670c217 100644 --- a/include/strings.h +++ b/include/strings.h @@ -1377,12 +1377,6 @@ extern const u8 gText_LevelUp_Speed[]; extern const u8 gText_LevelUp_Minus[]; extern const u8 gText_LevelUp_Plus[]; -// field_player_avatar -extern const u8 gText_OhABite[]; -extern const u8 gText_PokemonOnHook[]; -extern const u8 gText_NotEvenANibble[]; -extern const u8 gText_ItGotAway[]; - // pokemon_summary_screen extern const u8 gText_PokeSum_PageName_KnownMoves[]; extern const u8 gText_PokeSum_Controls_PickSwitch[]; diff --git a/include/wild_encounter.h b/include/wild_encounter.h index af1a8ad20..cd78c5fc8 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -56,7 +56,7 @@ struct WildPokemonHeader extern const struct WildPokemonHeader gWildMonHeaders[]; extern bool8 gIsFishingEncounter; extern bool8 gIsSurfingEncounter; -extern u16 gChainFishingDexNavStreak; +extern u8 gChainFishingDexNavStreak; void DisableWildEncounters(bool8 disabled); bool8 StandardWildEncounter(u32 currMetatileAttrs, u16 previousMetaTileBehavior); diff --git a/src/fishing.c b/src/fishing.c index bf175f891..a62651be1 100644 --- a/src/fishing.c +++ b/src/fishing.c @@ -1,9 +1,10 @@ #include "global.h" -#include "main.h" #include "event_object_movement.h" -#include "fieldmap.h" #include "field_effect_helpers.h" #include "field_player_avatar.h" +#include "fieldmap.h" +#include "fishing.h" +#include "main.h" #include "menu.h" #include "metatile_behavior.h" #include "random.h" @@ -11,7 +12,6 @@ #include "strings.h" #include "task.h" #include "text.h" -// #include "tv.h" #include "wild_encounter.h" #include "config/fishing.h" @@ -60,6 +60,11 @@ static u32 CalculateFishingTimeOfDayBoost(void); #define FISHING_SUPER_ROD_ODDS 50 #endif +static const u8 sText_OhABite[] = _("Oh! A bite!"); +static const u8 sText_PokemonOnHook[] = _("A POKéMON's on the hook!{PAUSE_UNTIL_PRESS}"); +static const u8 sText_NotEvenANibble[] = _("Not even a nibble‥{PAUSE_UNTIL_PRESS}"); +static const u8 sText_ItGotAway[] = _("It got away‥{PAUSE_UNTIL_PRESS}"); + struct FriendshipHookChanceBoost { u8 threshold; @@ -262,7 +267,7 @@ static bool32 Fishing_CheckForBite(struct Task *task) firstMonHasSuctionOrSticky = Fishing_DoesFirstMonInPartyHaveSuctionCupsOrStickyHold(); - if(firstMonHasSuctionOrSticky && I_FISHING_STICKY_BOOST < GEN_4) + if (firstMonHasSuctionOrSticky && I_FISHING_STICKY_BOOST < GEN_4) bite = RandomPercentage(RNG_FISHING_GEN3_STICKY, FISHING_GEN3_STICKY_CHANCE); if (!bite) @@ -280,7 +285,7 @@ static bool32 Fishing_CheckForBite(struct Task *task) static bool32 Fishing_GotBite(struct Task *task) { AlignFishingAnimationFrames(); - AddTextPrinterParameterized(0, FONT_NORMAL, gText_OhABite, 0, 17, 0, NULL); + AddTextPrinterParameterized(0, FONT_NORMAL, sText_OhABite, 0, 17, 0, NULL); task->tStep = FISHING_CHANGE_MINIGAME; task->tFrameCounter = 0; return FALSE; @@ -290,14 +295,14 @@ static bool32 Fishing_ChangeMinigame(struct Task *task) { switch (I_FISHING_MINIGAME) { - case GEN_1: - case GEN_2: - task->tStep = FISHING_A_PRESS_NO_MINIGAME; - break; - case GEN_3: - default: - task->tStep = FISHING_WAIT_FOR_A; - break; + case GEN_1: + case GEN_2: + task->tStep = FISHING_A_PRESS_NO_MINIGAME; + break; + case GEN_3: + default: + task->tStep = FISHING_WAIT_FOR_A; + break; } return TRUE; } @@ -359,7 +364,7 @@ static bool32 Fishing_MonOnHook(struct Task *task) { AlignFishingAnimationFrames(); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, FONT_NORMAL, gText_PokemonOnHook, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_NORMAL, sText_PokemonOnHook, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep = FISHING_START_ENCOUNTER; task->tFrameCounter = 0; return FALSE; @@ -395,7 +400,6 @@ static bool32 Fishing_StartEncounter(struct Task *task) gPlayerAvatar.preventStep = FALSE; UnlockPlayerFieldControls(); FishingWildEncounter(task->tFishingRod); - // RecordFishingAttemptForTV(TRUE); DestroyTask(FindTaskIdByFunc(Task_Fishing)); } return FALSE; @@ -407,7 +411,7 @@ static bool32 Fishing_NotEvenNibble(struct Task *task) AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, FONT_NORMAL, gText_NotEvenANibble, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_NORMAL, sText_NotEvenANibble, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep = FISHING_NO_MON; return TRUE; } @@ -418,7 +422,7 @@ static bool32 Fishing_GotAway(struct Task *task) AlignFishingAnimationFrames(); StartSpriteAnim(&gSprites[gPlayerAvatar.spriteId], GetFishingNoCatchDirectionAnimNum(GetPlayerFacingDirection())); FillWindowPixelBuffer(0, PIXEL_FILL(1)); - AddTextPrinterParameterized2(0, FONT_NORMAL, gText_ItGotAway, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); + AddTextPrinterParameterized2(0, FONT_NORMAL, sText_ItGotAway, 1, 0, TEXT_COLOR_DARK_GRAY, TEXT_COLOR_WHITE, TEXT_COLOR_LIGHT_GRAY); task->tStep = FISHING_NO_MON; return TRUE; } @@ -457,7 +461,6 @@ static bool32 Fishing_EndNoMon(struct Task *task) UnlockPlayerFieldControls(); UnfreezeObjectEvents(); ClearDialogWindowAndFrame(0, TRUE); - // RecordFishingAttemptForTV(FALSE); DestroyTask(FindTaskIdByFunc(Task_Fishing)); } return FALSE; @@ -465,13 +468,13 @@ static bool32 Fishing_EndNoMon(struct Task *task) static bool32 DoesFishingMinigameAllowCancel(void) { - switch(I_FISHING_MINIGAME) + switch (I_FISHING_MINIGAME) { - case GEN_1: - case GEN_2: - return FALSE; - case GEN_3: - default: + case GEN_1: + case GEN_2: + return FALSE; + case GEN_3: + default: return TRUE; } } @@ -535,7 +538,8 @@ static u32 CalculateFishingFollowerBoost() static u32 CalculateFishingProximityBoost() { s16 bobber_x, bobber_y, tile_x, tile_y; - u32 direction, facingDirection, numQualifyingTile = 0; + enum Direction direction, facingDirection; + u32 numQualifyingTile = 0; struct ObjectEvent *objectEvent; if (!I_FISHING_PROXIMITY) @@ -561,7 +565,7 @@ static u32 CalculateFishingProximityBoost() numQualifyingTile++; else if (MapGridGetCollisionAt(tile_x, tile_y)) numQualifyingTile++; - else if (GetMapBorderIdAt(tile_x, tile_y) == -1) + else if (GetMapBorderIdAt(tile_x, tile_y) == CONNECTION_INVALID) numQualifyingTile++; } @@ -646,4 +650,4 @@ u32 CalculateChainFishingShinyRolls(void) bool32 ShouldUseFishingEnvironmentInBattle() { return (I_FISHING_ENVIRONMENT >= GEN_4 && gIsFishingEncounter); -} \ No newline at end of file +} diff --git a/src/quest_log_player.c b/src/quest_log_player.c index b6cf47eda..764b91cda 100644 --- a/src/quest_log_player.c +++ b/src/quest_log_player.c @@ -1,13 +1,14 @@ #include "global.h" #include "bike.h" +#include "event_object_movement.h" +#include "field_effect_helpers.h" +#include "field_effect.h" +#include "field_player_avatar.h" +#include "fishing.h" +#include "quest_log_player.h" +#include "quest_log.h" #include "script.h" #include "task.h" -#include "field_player_avatar.h" -#include "event_object_movement.h" -#include "field_effect.h" -#include "field_effect_helpers.h" -#include "quest_log.h" -#include "quest_log_player.h" static void QL_GfxTransition_Normal(void); static void QL_GfxTransition_Bike(void); diff --git a/src/strings.c b/src/strings.c index 7765c6b6d..fe67cf5ef 100644 --- a/src/strings.c +++ b/src/strings.c @@ -932,10 +932,6 @@ ALIGNED(4) const u8 gText_PressingPowerRankings[] = _("Pressing-Power Rankings") const u8 gText_PressingSpeedRankings[] = _("Pressing-Speed Rankings"); const u8 gText_Var1Players[] = _("{STR_VAR_1} PLAYERS"); ALIGNED(4) const u8 gText_Ghost[] = _("GHOST"); -const u8 gText_OhABite[] = _("Oh! A bite!"); -const u8 gText_PokemonOnHook[] = _("A POKéMON's on the hook!{PAUSE_UNTIL_PRESS}"); -const u8 gText_NotEvenANibble[] = _("Not even a nibble‥{PAUSE_UNTIL_PRESS}"); -const u8 gText_ItGotAway[] = _("It got away‥{PAUSE_UNTIL_PRESS}"); ALIGNED(4) const u8 gString_PokemonFireRed_Staff[] = _("Pokémon FireRed Version\nStaff"); ALIGNED(4) const u8 gString_PokemonLeafGreen_Staff[] = _("Pokémon LeafGreen Version\nStaff"); ALIGNED(4) const u8 gCreditsString_Director[] = _("\n\nDirector\n\n\n\n"); diff --git a/src/wild_encounter.c b/src/wild_encounter.c index ca0d87b46..a7a50219b 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -7,6 +7,7 @@ #include "event_scripts.h" #include "field_player_avatar.h" #include "fieldmap.h" +#include "fishing.h" #include "follower_npc.h" #include "link.h" #include "metatile_behavior.h" @@ -48,10 +49,9 @@ static EWRAM_DATA struct WildEncounterData sWildEncounterData = {}; static EWRAM_DATA bool8 sWildEncountersDisabled = FALSE; EWRAM_DATA bool8 gIsFishingEncounter = 0; EWRAM_DATA bool8 gIsSurfingEncounter = 0; -EWRAM_DATA u16 gChainFishingDexNavStreak = 0; +EWRAM_DATA u8 gChainFishingDexNavStreak = 0; static bool8 UnlockedTanobyOrAreNotInTanoby(void); -static void UpdateChainFishingStreak(); static bool8 IsWildLevelAllowedByRepel(u8 level); static void ApplyFluteEncounterRateMod(u32 *rate); static u8 GetMaxLevelOfSpeciesInWildTable(const struct WildPokemon *wildMon, enum Species species, u8 area); @@ -793,17 +793,6 @@ bool8 DoesCurrentMapHaveFishingMons(void) return TRUE; } -static void UpdateChainFishingStreak() -{ - if (!I_FISHING_CHAIN) - return; - - if (gChainFishingDexNavStreak >= FISHING_CHAIN_LENGTH_MAX) - return; - - gChainFishingDexNavStreak++; -} - void FishingWildEncounter(u8 rod) { u32 headerId = GetCurrentMapWildMonHeaderId();