diff --git a/include/safari_zone.h b/include/safari_zone.h index 5336c81057..345fa84fdb 100644 --- a/include/safari_zone.h +++ b/include/safari_zone.h @@ -2,6 +2,7 @@ #define GUARD_SAFARI_ZONE_H extern u8 gNumSafariBalls; +extern u16 gSafariZoneStepCounter; bool32 GetSafariZoneFlag(void); void SetSafariZoneFlag(void); diff --git a/include/strings.h b/include/strings.h index 3fe3b01ca8..03a716637b 100644 --- a/include/strings.h +++ b/include/strings.h @@ -186,6 +186,7 @@ extern const u8 gText_Floor6[]; extern const u8 gText_Floor7[]; extern const u8 gText_Peak[]; extern const u8 gText_SafariBallStock[]; +extern const u8 gText_MenuSafariStats[]; extern const u8 gText_BattlePyramidFloor[]; extern const u8 gText_MenuOptionPokedex[]; diff --git a/src/safari_zone.c b/src/safari_zone.c index ab4d4736ce..abe32c353e 100644 --- a/src/safari_zone.c +++ b/src/safari_zone.c @@ -29,7 +29,7 @@ extern const u8 SafariZone_EventScript_OutOfBallsMidBattle[]; extern const u8 SafariZone_EventScript_OutOfBalls[]; EWRAM_DATA u8 gNumSafariBalls = 0; -EWRAM_DATA static u16 sSafariZoneStepCounter = 0; +EWRAM_DATA u16 gSafariZoneStepCounter = 0; EWRAM_DATA static u8 sSafariZoneCaughtMons = 0; EWRAM_DATA static u8 sSafariZonePkblkUses = 0; EWRAM_DATA static struct PokeblockFeeder sPokeblockFeeders[NUM_POKEBLOCK_FEEDERS] = {0}; @@ -58,7 +58,10 @@ void EnterSafariMode(void) SetSafariZoneFlag(); ClearAllPokeblockFeeders(); gNumSafariBalls = 30; - sSafariZoneStepCounter = 500; + if (IS_FRLG) + gSafariZoneStepCounter = 600; + else + gSafariZoneStepCounter = 500; sSafariZoneCaughtMons = 0; sSafariZonePkblkUses = 0; } @@ -69,7 +72,7 @@ void ExitSafariMode(void) ResetSafariZoneFlag(); ClearAllPokeblockFeeders(); gNumSafariBalls = 0; - sSafariZoneStepCounter = 0; + gSafariZoneStepCounter = 0; } bool8 SafariZoneTakeStep(void) @@ -80,8 +83,8 @@ bool8 SafariZoneTakeStep(void) } DecrementFeederStepCounters(); - sSafariZoneStepCounter--; - if (sSafariZoneStepCounter == 0) + gSafariZoneStepCounter--; + if (gSafariZoneStepCounter == 0) { ScriptContext_SetupScript(SafariZone_EventScript_TimesUp); return TRUE; diff --git a/src/start_menu.c b/src/start_menu.c index baffeb3ecd..7f87bf584a 100644 --- a/src/start_menu.c +++ b/src/start_menu.c @@ -440,9 +440,20 @@ static void ShowSafariBallsWindow(void) sSafariBallsWindowId = AddWindow(&sWindowTemplate_SafariBalls); PutWindowTilemap(sSafariBallsWindowId); DrawStdWindowFrame(sSafariBallsWindowId, FALSE); - ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); - StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); - AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); + if (IS_FRLG) + { + ConvertIntToDecimalStringN(gStringVar1, gSafariZoneStepCounter, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar2, 600, STR_CONV_MODE_RIGHT_ALIGN, 3); + ConvertIntToDecimalStringN(gStringVar3, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); + StringExpandPlaceholders(gStringVar4, gText_MenuSafariStats); + AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 4, 3, 0xFF, NULL); + } + else + { + ConvertIntToDecimalStringN(gStringVar1, gNumSafariBalls, STR_CONV_MODE_RIGHT_ALIGN, 2); + StringExpandPlaceholders(gStringVar4, gText_SafariBallStock); + AddTextPrinterParameterized(sSafariBallsWindowId, FONT_NORMAL, gStringVar4, 0, 1, TEXT_SKIP_DRAW, NULL); + } CopyWindowToVram(sSafariBallsWindowId, COPYWIN_GFX); } diff --git a/src/strings.c b/src/strings.c index f2b76132d8..7d139586ab 100644 --- a/src/strings.c +++ b/src/strings.c @@ -984,6 +984,7 @@ const u8 gText_MenuRetire[] = _("RETIRE"); const u8 gText_MenuRest[] = _("REST"); const u8 gText_MenuDexNav[] = _("DEXNAV"); const u8 gText_SafariBallStock[] = _("SAFARI BALLS\nStock: {STR_VAR_1}"); +const u8 gText_MenuSafariStats[] = _("{STR_VAR_1}/{STR_VAR_2}\nBALLS {STR_VAR_3}"); const u8 gText_BattlePyramidFloor[] = _("Battle Pyramid\n{STR_VAR_1}"); const u8 gText_Floor1[] = _("Floor 1"); const u8 gText_Floor2[] = _("Floor 2");