diff --git a/include/constants/wild_encounters.h b/include/constants/wild_encounters.h index 24d919c1d8..44c8546444 100644 --- a/include/constants/wild_encounters.h +++ b/include/constants/wild_encounters.h @@ -14,7 +14,7 @@ enum ENCOUNTER_TYPE { ENCOUNTER_TYPE_FISHING }; -enum ENCOUNTER_FISHING_ROD_TYPE { +enum EncounterFishingRodType { FISHING_TYPE_OLD_ROD = 0, FISHING_TYPE_GOOD_ROD, FISHING_TYPE_SUPER_ROD diff --git a/include/overlay005/fishing.h b/include/overlay005/fishing.h index edcb42c9cf..f951f69aad 100644 --- a/include/overlay005/fishing.h +++ b/include/overlay005/fishing.h @@ -7,9 +7,9 @@ #include "field_task.h" #include "sys_task_manager.h" -void *FishingContext_Init(FieldSystem *fieldSystem, u32 heapID, enum ENCOUNTER_FISHING_ROD_TYPE rodType); +void *FishingContext_Init(FieldSystem *fieldSystem, u32 heapID, enum EncounterFishingRodType rodType); BOOL FieldTask_Fishing(FieldTask *param0); -SysTask *StartFishingTask(FieldSystem *fieldSystem, enum ENCOUNTER_FISHING_ROD_TYPE rodType, BOOL isFishEncountered); +SysTask *StartFishingTask(FieldSystem *fieldSystem, enum EncounterFishingRodType rodType, BOOL isFishEncountered); void FishingSysTask_Free(SysTask *param0); #endif // POKEPLATINUM_FISHING_H diff --git a/include/overlay006/wild_encounters.h b/include/overlay006/wild_encounters.h index 5f9dc5fdde..bc88a14321 100644 --- a/include/overlay006/wild_encounters.h +++ b/include/overlay006/wild_encounters.h @@ -53,7 +53,7 @@ typedef struct WildEncounters { void WildEncounters_ReplaceTimedEncounters(const WildEncounters *encounterData, int *param1, int *param2); BOOL WildEncounters_TryWildEncounter(FieldSystem *fieldSystem); -BOOL WildEncounters_TryFishingEncounter(FieldSystem *fieldSystem, enum ENCOUNTER_FISHING_ROD_TYPE fishingRodType, FieldBattleDTO **param2); +BOOL WildEncounters_TryFishingEncounter(FieldSystem *fieldSystem, enum EncounterFishingRodType fishingRodType, FieldBattleDTO **param2); BOOL WildEncounters_TrySweetScentEncounter(FieldSystem *fieldSystem, FieldTask *param1); BOOL WildEncounters_TryMudEncounter(FieldSystem *fieldSystem, FieldBattleDTO **param1); void CreateWildMon_HoneyTree(FieldSystem *fieldSystem, FieldBattleDTO *param1); diff --git a/res/text/common_strings.json b/res/text/common_strings.json index 4c37eb4428..f53ac04db5 100644 --- a/res/text/common_strings.json +++ b/res/text/common_strings.json @@ -381,19 +381,19 @@ ] }, { - "id": "FishingMessage_NoNibbles", + "id": "CommonStrings_Text_NotEvenANibble", "en_US": "Not even a nibble..." }, { - "id": "FishingMessage_FishGotAway", + "id": "CommonStrings_Text_ThePokemonGotAway", "en_US": "The Pokémon got away..." }, { - "id": "FishingMessage_TooFast", + "id": "CommonStrings_Text_ReeledItInTooQuickly", "en_US": "Reeled it in too quickly..." }, { - "id": "FishingMessage_CaughtFish", + "id": "CommonStrings_Text_LandedAPokemon", "en_US": "Landed a Pokémon!" }, { diff --git a/src/overlay005/fishing.c b/src/overlay005/fishing.c index 38db76afa6..c5ffe7e86e 100644 --- a/src/overlay005/fishing.c +++ b/src/overlay005/fishing.c @@ -66,7 +66,7 @@ typedef struct { int state; u32 fishingRodItemID; BOOL isFishEncountered; - enum ENCOUNTER_FISHING_ROD_TYPE rodType; + enum EncounterFishingRodType rodType; FieldBattleDTO *fishEncounterDTO; SysTask *sysTask; } FishingContext; @@ -79,7 +79,7 @@ typedef struct { int counter; int fishDelayCounter; int fishHookedCounter; - enum ENCOUNTER_FISHING_ROD_TYPE rodType; + enum EncounterFishingRodType rodType; FieldSystem *fieldSystem; UnkStruct_ov101_021D5D90 *unk_24; u8 printerID; @@ -99,14 +99,14 @@ static void FishingTask_Free(FishingTask *fishingTask); static void ShowFishingWindow(FishingTask *fishingTask); static void PrintFishingMessage(FishingTask *fishingTask, u32 messageID); static int TryCloseFishingMessage(FishingTask *fishingTask); -static u16 ConvertRodTypeToRodItem(enum ENCOUNTER_FISHING_ROD_TYPE rodType); +static u16 ConvertRodTypeToRodItem(enum EncounterFishingRodType rodType); static BOOL IsDoneFishing(SysTask *task); static int HasCaughtFish(SysTask *task); BOOL (*const sFishingActions[])(FishingTask *, PlayerAvatar *, MapObject *); const int sRodTypeHookTimingWindow[]; -void *FishingContext_Init(FieldSystem *fieldSystem, u32 heapID, enum ENCOUNTER_FISHING_ROD_TYPE rodType) +void *FishingContext_Init(FieldSystem *fieldSystem, u32 heapID, enum EncounterFishingRodType rodType) { FishingContext *fishingContext = Heap_AllocFromHeapAtEnd(heapID, sizeof(FishingContext)); @@ -164,7 +164,7 @@ BOOL FieldTask_Fishing(FieldTask *taskMan) return FALSE; } -SysTask *StartFishingTask(FieldSystem *fieldSystem, enum ENCOUNTER_FISHING_ROD_TYPE rodType, BOOL isFishEncountered) +SysTask *StartFishingTask(FieldSystem *fieldSystem, enum EncounterFishingRodType rodType, BOOL isFishEncountered) { SysTask *task; FishingTask *fishingTask = FishingTask_New(sizeof(FishingTask)); @@ -322,7 +322,7 @@ static BOOL FishingTask_ReelFishIn(FishingTask *fishingTask, PlayerAvatar *playe if (fishingTask->counter > 15) { fishingTask->counter = 0; fishingTask->fishingTask = FUNC_FishingTask_WaitCloseFishingMessage; - PrintFishingMessage(fishingTask, FishingMessage_CaughtFish); + PrintFishingMessage(fishingTask, CommonStrings_Text_LandedAPokemon); } return FALSE; @@ -349,7 +349,7 @@ static BOOL FishingTask_SetCaughtFish(FishingTask *fishingTask, PlayerAvatar *pl static BOOL FishingTask_ReeledInEarly(FishingTask *fishingTask, PlayerAvatar *playerAvatar, MapObject *playerMapObject) { sub_02062A0C(playerMapObject, MAP_OBJ_UNK_A0_00); - PrintFishingMessage(fishingTask, FishingMessage_TooFast); + PrintFishingMessage(fishingTask, CommonStrings_Text_ReeledItInTooQuickly); fishingTask->counter = 16; fishingTask->fishingTask = FUNC_FishingTask_WaitCloseMessage; @@ -360,7 +360,7 @@ static BOOL FishingTask_ReeledInEarly(FishingTask *fishingTask, PlayerAvatar *pl static BOOL FishingTask_FishGotAway(FishingTask *fishingTask, PlayerAvatar *playerAvatar, MapObject *playerMapObject) { sub_02062A0C(playerMapObject, MAP_OBJ_UNK_A0_00); - PrintFishingMessage(fishingTask, FishingMessage_FishGotAway); + PrintFishingMessage(fishingTask, CommonStrings_Text_ThePokemonGotAway); fishingTask->counter = 16; fishingTask->fishingTask = FUNC_FishingTask_WaitCloseMessage; @@ -394,7 +394,7 @@ static BOOL FishingTask_WaitForNoFish(FishingTask *fishingTask, PlayerAvatar *pl } sub_02062A0C(playerMapObject, MAP_OBJ_UNK_A0_00); - PrintFishingMessage(fishingTask, FishingMessage_NoNibbles); + PrintFishingMessage(fishingTask, CommonStrings_Text_NotEvenANibble); fishingTask->counter = 16; fishingTask->fishingTask = FUNC_FishingTask_WaitCloseMessage; @@ -559,7 +559,7 @@ static int TryCloseFishingMessage(FishingTask *fishingTask) return FALSE; } -static u16 ConvertRodTypeToRodItem(enum ENCOUNTER_FISHING_ROD_TYPE rodType) +static u16 ConvertRodTypeToRodItem(enum EncounterFishingRodType rodType) { switch (rodType) { default: diff --git a/src/overlay006/wild_encounters.c b/src/overlay006/wild_encounters.c index 280d0059f9..3102300b7e 100644 --- a/src/overlay006/wild_encounters.c +++ b/src/overlay006/wild_encounters.c @@ -377,7 +377,7 @@ BOOL WildEncounters_TryWildEncounter(FieldSystem *fieldSystem) return gettingEncounter; } -BOOL WildEncounters_TryFishingEncounter(FieldSystem *fieldSystem, enum ENCOUNTER_FISHING_ROD_TYPE fishingRodType, FieldBattleDTO **battleParams) +BOOL WildEncounters_TryFishingEncounter(FieldSystem *fieldSystem, enum EncounterFishingRodType fishingRodType, FieldBattleDTO **battleParams) { EncounterSlot encounterTable[MAX_GRASS_ENCOUNTERS];