diff --git a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc index 4347c4773..463d652b3 100644 --- a/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc +++ b/data/maps/MauvilleCity_PokemonCenter_1F/scripts.inc @@ -12,7 +12,7 @@ MauvilleCity_PokemonCenter_1F_OnTransition: end MauvilleCity_PokemonCenter_1F_EventScript_SetMauvilleOldManGfx:: - special ScrSpecial_SetMauvilleOldManObjEventGfx + special SetMauvilleOldManObjEventGfx end MauvilleCity_PokemonCenter_1F_EventScript_Nurse:: diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index a9c008e5e..b34f84e8e 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -1,5 +1,5 @@ MauvilleCity_PokemonCenter_1F_EventScript_MauvilleOldMan:: - special ScrSpecial_GetCurrentMauvilleMan + special Script_GetCurrentMauvilleMan switch VAR_RESULT case MAUVILLE_MAN_BARD, MauvilleCity_PokemonCenter_1F_EventScript_Bard case MAUVILLE_MAN_HIPSTER, MauvilleCity_PokemonCenter_1F_EventScript_Hipster @@ -21,9 +21,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_Bard:: MauvilleCity_PokemonCenter_1F_EventScript_PlaySong:: setvar VAR_0x8004, 0 - special ScrSpecial_PlayBardSong + special PlayBardSong delay 60 - special ScrSpecial_HasBardSongBeenChanged + special HasBardSongBeenChanged compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AskToWriteLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_WishICouldPlaySongForOthers, MSGBOX_DEFAULT @@ -52,12 +52,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics:: goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineWritingLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_LetMeSingItForYou, MSGBOX_DEFAULT setvar VAR_0x8004, 1 - special ScrSpecial_PlayBardSong + special PlayBardSong delay 60 msgbox MauvilleCity_PokemonCenter_1F_Text_ThatHowYouWantedSongToGo, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_WriteLyrics - special ScrSpecial_SaveBardSongLyrics + special SaveBardSongLyrics msgbox MauvilleCity_PokemonCenter_1F_Text_IllSingThisSongForAWhile, MSGBOX_DEFAULT release end @@ -73,7 +73,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: faceplayer setflag FLAG_SYS_HIPSTER_MEET msgbox MauvilleCity_PokemonCenter_1F_Text_TeachWhatsHipAndHappening, MSGBOX_DEFAULT - special ScrSpecial_GetHipsterSpokenFlag + special GetHipsterSpokenFlag compare VAR_RESULT, FALSE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IAlreadyTaughtYou, MSGBOX_DEFAULT @@ -81,7 +81,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Hipster:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: - special ScrSpecial_HipsterTeachWord + special HipsterTryTeachWord compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TeachWord msgbox MauvilleCity_PokemonCenter_1F_Text_IveGotNothingNewToTeach, MSGBOX_DEFAULT @@ -90,7 +90,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTeachWord:: MauvilleCity_PokemonCenter_1F_EventScript_TeachWord:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouHeardOfPhrase, MSGBOX_DEFAULT - special ScrSpecial_SetHipsterSpokenFlag + special SetHipsterSpokenFlag release end @@ -160,7 +160,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Trader:: msgbox MauvilleCity_PokemonCenter_1F_Text_WantToTradeDecor, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineTrade - special ScrSpecial_GetTraderTradedFlag + special GetTraderTradedFlag compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded message MauvilleCity_PokemonCenter_1F_Text_PickADecorItem @@ -179,7 +179,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_AlreadyTraded:: end MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: - special ScrSpecial_TraderMenuGetDecoration + special TraderMenuGetDecoration waitstate compare VAR_0x8004, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelPickDecor @@ -188,7 +188,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToReceive:: msgbox MauvilleCity_PokemonCenter_1F_Text_OnceBelongedToPlayerDoYouWantIt, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDifferentDecor - special ScrSpecial_DoesPlayerHaveNoDecorations + special DoesPlayerHaveNoDecorations compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor goto MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive @@ -218,19 +218,19 @@ MauvilleCity_PokemonCenter_1F_EventScript_DontHaveAnyDecor:: MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive:: msgbox MauvilleCity_PokemonCenter_1F_Text_PickTheDecorToTrade, MSGBOX_DEFAULT - special ScrSpecial_TraderMenuGiveDecoration + special TraderShowDecorationMenu waitstate compare VAR_0x8006, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelGiveDecor compare VAR_0x8006, 0xFFFF goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DecorInUse - special ScrSpecial_IsDecorationFull + special IsDecorationCategoryFull compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_NoRoomForDecor msgbox MauvilleCity_PokemonCenter_1F_Text_SoWellTradeTheseDecor, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_PickDecorToGive - special ScrSpecial_TraderDoDecorationTrade + special TraderDoDecorationTrade msgbox MauvilleCity_PokemonCenter_1F_Text_SendDecorToYourPC, MSGBOX_DEFAULT release end @@ -818,20 +818,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_Storyteller:: msgbox MauvilleCity_PokemonCenter_1F_Text_WillYouHearMyTale, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller - specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot + specialvar VAR_RESULT, StorytellerGetFreeStorySlot compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_KnowNoTales message MauvilleCity_PokemonCenter_1F_Text_WhichTaleToTell waitmessage - special ScrSpecial_StorytellerStoryListMenu + special StorytellerStoryListMenu waitstate compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection setvar VAR_0x8008, 1 - special ScrSpecial_StorytellerDisplayStory + special Script_StorytellerDisplayStory waitmessage waitbuttonpress - specialvar VAR_RESULT, ScrSpecial_StorytellerUpdateStat + specialvar VAR_RESULT, StorytellerUpdateStat compare VAR_RESULT, 0 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales goto MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale @@ -842,7 +842,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_CancelStorySelection:: MauvilleCity_PokemonCenter_1F_EventScript_AreThereOtherTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_CouldThereBeOtherLegends, MSGBOX_DEFAULT - specialvar VAR_RESULT, ScrSpecial_HasStorytellerAlreadyRecorded + specialvar VAR_RESULT, HasStorytellerAlreadyRecorded compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_StorytellerEnd goto MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales @@ -853,7 +853,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_DoYouHaveAnyTales:: msgbox MauvilleCity_PokemonCenter_1F_Text_HaveYouAnyLegendaryTales, MSGBOX_YESNO compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_DeclineStoryteller - specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat + specialvar VAR_RESULT, Script_StorytellerInitializeRandomStat compare VAR_RESULT, 1 goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TellPlayersTale msgbox MauvilleCity_PokemonCenter_1F_Text_NotWorthyOfLegend, MSGBOX_DEFAULT @@ -909,7 +909,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_Giddy:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: - special ScrSpecial_GiddyShouldTellAnotherTale + special GiddyShouldTellAnotherTale compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale compare VAR_RESULT, FALSE @@ -917,7 +917,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_TryTellTale:: end MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale:: - special ScrSpecial_GiddyShouldTellAnotherTale + special GiddyShouldTellAnotherTale compare VAR_RESULT, TRUE goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale compare VAR_RESULT, FALSE @@ -929,15 +929,16 @@ MauvilleCity_PokemonCenter_1F_EventScript_GiddyStartNewTale:: goto MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale end -@ Regardless of whether yes or no is selected below, Giddy will continue to tell stories until he's told 10 +@ Giddy will continue to tell stories regardless of whether yes or no is selected below. +@ Each story there is a 10% chance it will be his last. Otherwise he will stop at 10 stories. MauvilleCity_PokemonCenter_1F_EventScript_GiddyTellTale:: - special ScrSpecial_GenerateGiddyLine + special GenerateGiddyLine special ShowFieldMessageStringVar4 waitmessage yesnobox 20, 8 - compare VAR_RESULT, 1 + compare VAR_RESULT, YES goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale - compare VAR_RESULT, 0 + compare VAR_RESULT, NO goto_if_eq MauvilleCity_PokemonCenter_1F_EventScript_TryTellNewTale end diff --git a/data/specials.inc b/data/specials.inc index 81b25c14d..0b053b774 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -108,28 +108,28 @@ gSpecials:: def_special DoWateringBerryTreeAnim def_special ShowEasyChatScreen def_special ShowEasyChatProfile - def_special ScrSpecial_GetCurrentMauvilleMan - def_special ScrSpecial_HasBardSongBeenChanged - def_special ScrSpecial_SaveBardSongLyrics - def_special ScrSpecial_GetHipsterSpokenFlag - def_special ScrSpecial_SetHipsterSpokenFlag - def_special ScrSpecial_HipsterTeachWord - def_special ScrSpecial_PlayBardSong - def_special ScrSpecial_SetMauvilleOldManObjEventGfx - def_special ScrSpecial_GenerateGiddyLine - def_special ScrSpecial_GiddyShouldTellAnotherTale - def_special ScrSpecial_StorytellerGetFreeStorySlot - def_special ScrSpecial_StorytellerDisplayStory - def_special ScrSpecial_StorytellerStoryListMenu - def_special ScrSpecial_StorytellerUpdateStat - def_special ScrSpecial_StorytellerInitializeRandomStat - def_special ScrSpecial_HasStorytellerAlreadyRecorded - def_special ScrSpecial_TraderMenuGetDecoration - def_special ScrSpecial_GetTraderTradedFlag - def_special ScrSpecial_DoesPlayerHaveNoDecorations - def_special ScrSpecial_IsDecorationFull - def_special ScrSpecial_TraderMenuGiveDecoration - def_special ScrSpecial_TraderDoDecorationTrade + def_special Script_GetCurrentMauvilleMan + def_special HasBardSongBeenChanged + def_special SaveBardSongLyrics + def_special GetHipsterSpokenFlag + def_special SetHipsterSpokenFlag + def_special HipsterTryTeachWord + def_special PlayBardSong + def_special SetMauvilleOldManObjEventGfx + def_special GenerateGiddyLine + def_special GiddyShouldTellAnotherTale + def_special StorytellerGetFreeStorySlot + def_special Script_StorytellerDisplayStory + def_special StorytellerStoryListMenu + def_special StorytellerUpdateStat + def_special Script_StorytellerInitializeRandomStat + def_special HasStorytellerAlreadyRecorded + def_special TraderMenuGetDecoration + def_special GetTraderTradedFlag + def_special DoesPlayerHaveNoDecorations + def_special IsDecorationCategoryFull + def_special TraderShowDecorationMenu + def_special TraderDoDecorationTrade def_special GetSeedotSizeRecordInfo def_special CompareSeedotSize def_special GetLotadSizeRecordInfo diff --git a/include/constants/global.h b/include/constants/global.h index 1cece7975..6d3fa936d 100644 --- a/include/constants/global.h +++ b/include/constants/global.h @@ -95,6 +95,7 @@ #define BARD_SONG_LENGTH 6 #define NUM_STORYTELLER_TALES 4 #define NUM_TRADER_ITEMS 4 +#define GIDDY_MAX_TALES 10 #define OPTIONS_BUTTON_MODE_NORMAL 0 #define OPTIONS_BUTTON_MODE_LR 1 diff --git a/include/global.h b/include/global.h index d14aa60f4..dcec2c4db 100644 --- a/include/global.h +++ b/include/global.h @@ -639,7 +639,7 @@ struct MauvilleManGiddy /*0x00*/ u8 id; /*0x01*/ u8 taleCounter; /*0x02*/ u8 questionNum; - /*0x04*/ u16 randomWords[10]; + /*0x04*/ u16 randomWords[GIDDY_MAX_TALES]; /*0x18*/ u8 questionList[8]; /*0x20*/ u8 language; }; /*size = 0x2C*/ diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h index 603d585da..23a3cabfb 100644 --- a/include/mauville_old_man.h +++ b/include/mauville_old_man.h @@ -5,7 +5,7 @@ extern struct BardSong gBardSong; void SetMauvilleOldMan(void); u8 GetCurrentMauvilleOldMan(void); -void ScrSpecial_SetMauvilleOldManObjEventGfx(void); +void SetMauvilleOldManObjEventGfx(void); u8 sub_81201C8(void); void SanitizeMauvilleOldManForRuby(OldMan *dest); void sub_8120670(void); diff --git a/include/wild_encounter.h b/include/wild_encounter.h index 55bbaa7dd..09525beff 100644 --- a/include/wild_encounter.h +++ b/include/wild_encounter.h @@ -33,7 +33,6 @@ extern const struct WildPokemonHeader gWildMonHeaders[]; void DisableWildEncounters(bool8 disabled); bool8 StandardWildEncounter(u16 currMetaTileBehavior, u16 previousMetaTileBehavior); -void ScrSpecial_RockSmashWildEncounter(void); bool8 SweetScentWildEncounter(void); bool8 DoesCurrentMapHaveFishingMons(void); void FishingWildEncounter(u8 rod); diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index d3c41236c..d202bc638 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -21,12 +21,11 @@ #include "field_message_box.h" #include "script_menu.h" #include "trader.h" +#include "m4a.h" #include "constants/mauville_old_man.h" #define CHAR_SONG_WORD_SEPARATOR 0x37 -extern struct MusicPlayerInfo gMPlayInfo_SE2; - static void InitGiddyTaleList(void); static void StartBardSong(bool8 useTemporaryLyrics); static void Task_BardSong(u8 taskId); @@ -120,46 +119,41 @@ void SetMauvilleOldMan(void) // Determine man based on the last digit of the player's trainer ID. switch ((trainerId % 10) / 2) { - case MAUVILLE_MAN_BARD: - SetupBard(); - break; - case MAUVILLE_MAN_HIPSTER: - SetupHipster(); - break; - case MAUVILLE_MAN_TRADER: - SetupTrader(); - break; - case MAUVILLE_MAN_STORYTELLER: - SetupStoryteller(); - break; - case MAUVILLE_MAN_GIDDY: - SetupGiddy(); - break; + case MAUVILLE_MAN_BARD: + SetupBard(); + break; + case MAUVILLE_MAN_HIPSTER: + SetupHipster(); + break; + case MAUVILLE_MAN_TRADER: + SetupTrader(); + break; + case MAUVILLE_MAN_STORYTELLER: + SetupStoryteller(); + break; + case MAUVILLE_MAN_GIDDY: + SetupGiddy(); + break; } - ScrSpecial_SetMauvilleOldManObjEventGfx(); + SetMauvilleOldManObjEventGfx(); } u8 GetCurrentMauvilleOldMan(void) { - struct MauvilleManCommon *common = &gSaveBlock1Ptr->oldMan.common; - - return common->id; + return gSaveBlock1Ptr->oldMan.common.id; } -void ScrSpecial_GetCurrentMauvilleMan(void) +void Script_GetCurrentMauvilleMan(void) { gSpecialVar_Result = GetCurrentMauvilleOldMan(); } -void ScrSpecial_HasBardSongBeenChanged(void) +void HasBardSongBeenChanged(void) { - u16 *scriptResult = &gSpecialVar_Result; // why?? - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - - *scriptResult = bard->hasChangedSong; + gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.bard)->hasChangedSong; } -void ScrSpecial_SaveBardSongLyrics(void) +void SaveBardSongLyrics(void) { u16 i; struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; @@ -225,28 +219,23 @@ static void PrepareSongText(void) } } -void ScrSpecial_PlayBardSong(void) +void PlayBardSong(void) { StartBardSong(gSpecialVar_0x8004); ScriptContext1_Stop(); } -void ScrSpecial_GetHipsterSpokenFlag(void) +void GetHipsterSpokenFlag(void) { - u16 *scriptResult = &gSpecialVar_Result; // again?? - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - *scriptResult = hipster->alreadySpoken; + gSpecialVar_Result = (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken; } -void ScrSpecial_SetHipsterSpokenFlag(void) +void SetHipsterSpokenFlag(void) { - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - hipster->alreadySpoken = TRUE; + (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = TRUE; } -void ScrSpecial_HipsterTeachWord(void) +void HipsterTryTeachWord(void) { u16 phrase = GetNewHipsterPhraseToTeach(); @@ -261,11 +250,11 @@ void ScrSpecial_HipsterTeachWord(void) } } -void ScrSpecial_GiddyShouldTellAnotherTale(void) +void GiddyShouldTellAnotherTale(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; - if (giddy->taleCounter == 10) + if (giddy->taleCounter == GIDDY_MAX_TALES) { gSpecialVar_Result = FALSE; giddy->taleCounter = 0; @@ -276,7 +265,7 @@ void ScrSpecial_GiddyShouldTellAnotherTale(void) } } -void ScrSpecial_GenerateGiddyLine(void) +void GenerateGiddyLine(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; @@ -300,7 +289,7 @@ void ScrSpecial_GenerateGiddyLine(void) } if (!(Random() % 10)) - giddy->taleCounter = 10; + giddy->taleCounter = GIDDY_MAX_TALES; else giddy->taleCounter++; @@ -310,7 +299,7 @@ void ScrSpecial_GenerateGiddyLine(void) static void InitGiddyTaleList(void) { struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy; - u16 arr[][2] = { + u16 wordGroupsAndCount[][2] = { {EC_GROUP_POKEMON, 0}, {EC_GROUP_LIFESTYLE, 0}, {EC_GROUP_HOBBIES, 0}, @@ -323,27 +312,25 @@ static void InitGiddyTaleList(void) u16 r7; u16 r1; + // Shuffle question list for (i = 0; i < 8; i++) giddy->questionList[i] = i; - for (i = 0; i < 8; i++) { r1 = Random() % (i + 1); - r7 = giddy->questionList[i]; - giddy->questionList[i] = giddy->questionList[r1]; - giddy->questionList[r1] = r7; + SWAP(giddy->questionList[i], giddy->questionList[r1], r7); } r10 = 0; for (i = 0; i < 6; i++) { - arr[i][1] = EasyChat_GetNumWordsInGroup(arr[i][0]); - r10 += arr[i][1]; + wordGroupsAndCount[i][1] = EasyChat_GetNumWordsInGroup(wordGroupsAndCount[i][0]); + r10 += wordGroupsAndCount[i][1]; } giddy->questionNum = 0; r7 = 0; - for (i = 0; i < 10; i++) + for (i = 0; i < GIDDY_MAX_TALES; i++) { r1 = Random() % 10; if (r1 < 3 && r7 < 8) @@ -355,26 +342,22 @@ static void InitGiddyTaleList(void) { s16 r2 = Random() % r10; for (r1 = 0; i < 6; r1++) - if ((r2 -= arr[r1][1]) <= 0) + if ((r2 -= wordGroupsAndCount[r1][1]) <= 0) break; if (r1 == 6) r1 = 0; - giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(arr[r1][0]); + giddy->randomWords[i] = GetRandomEasyChatWordFromUnlockedGroup(wordGroupsAndCount[r1][0]); } } } static void ResetBardFlag(void) { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - - bard->hasChangedSong = FALSE; + (&gSaveBlock1Ptr->oldMan.bard)->hasChangedSong = FALSE; } static void ResetHipsterFlag(void) { - struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster; - - hipster->alreadySpoken = FALSE; + (&gSaveBlock1Ptr->oldMan.hipster)->alreadySpoken = FALSE; } static void ResetTraderFlag(void) @@ -391,22 +374,22 @@ void ResetMauvilleOldManFlag(void) { switch (GetCurrentMauvilleOldMan()) { - case MAUVILLE_MAN_BARD: - ResetBardFlag(); - break; - case MAUVILLE_MAN_HIPSTER: - ResetHipsterFlag(); - break; - case MAUVILLE_MAN_STORYTELLER: - ResetStorytellerFlag(); - break; - case MAUVILLE_MAN_TRADER: - ResetTraderFlag(); - break; - case MAUVILLE_MAN_GIDDY: - break; + case MAUVILLE_MAN_BARD: + ResetBardFlag(); + break; + case MAUVILLE_MAN_HIPSTER: + ResetHipsterFlag(); + break; + case MAUVILLE_MAN_STORYTELLER: + ResetStorytellerFlag(); + break; + case MAUVILLE_MAN_TRADER: + ResetTraderFlag(); + break; + case MAUVILLE_MAN_GIDDY: + break; } - ScrSpecial_SetMauvilleOldManObjEventGfx(); + SetMauvilleOldManObjEventGfx(); } @@ -430,15 +413,15 @@ static void EnableTextPrinters(void) gDisableTextPrinters = FALSE; } -static void BardSong_DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) +static void DisableTextPrinters(struct TextPrinterTemplate * printer, u16 a1) { gDisableTextPrinters = TRUE; } -static void sub_8120708(const u8 * src) +static void sub_8120708(const u8 * str) { DrawDialogueFrame(0, 0); - AddTextPrinterParameterized(0, 1, src, 0, 1, 1, BardSong_DisableTextPrinters); + AddTextPrinterParameterized(0, 1, str, 0, 1, 1, DisableTextPrinters); gDisableTextPrinters = TRUE; CopyWindowToVram(0, 3); } @@ -447,233 +430,233 @@ static void BardSing(struct Task *task, struct BardSong *song) { switch (task->tState) { - case 0: // Initialize song - { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - u16 *lyrics; - s32 i; + case 0: // Initialize song + { + struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; + u16 *lyrics; + s32 i; - // Copy lyrics - if (gSpecialVar_0x8004 == 0) - lyrics = bard->songLyrics; - else - lyrics = bard->temporaryLyrics; - for (i = 0; i < BARD_SONG_LENGTH; i++) - song->lyrics[i] = lyrics[i]; - song->currWord = 0; - } - break; - case 1: // Wait for BGM to end - break; - case 2: // Initialize word + // Copy lyrics + if (gSpecialVar_0x8004 == 0) + lyrics = bard->songLyrics; + else + lyrics = bard->temporaryLyrics; + for (i = 0; i < BARD_SONG_LENGTH; i++) + song->lyrics[i] = lyrics[i]; + song->currWord = 0; + } + break; + case 1: // Wait for BGM to end + break; + case 2: // Initialize word + { + u16 word = song->lyrics[song->currWord]; + song->sound = GetWordSounds(word); + GetWordPhonemes(song, MACRO1(word)); + song->currWord++; + if (song->sound->var00 != 0xFF) + song->state = 0; + else { - u16 word = song->lyrics[song->currWord]; - song->sound = GetWordSounds(word); - GetWordPhonemes(song, MACRO1(word)); - song->currWord++; - if (song->sound->var00 != 0xFF) - song->state = 0; - else + song->state = 3; + song->phonemeTimer = 2; + } + break; + } + case 3: + case 4: + { + const struct BardSound *sound = &song->sound[song->currPhoneme]; + + switch (song->state) + { + case 0: + song->phonemeTimer = song->phonemes[song->currPhoneme].length; + if (sound->var00 <= 50) { - song->state = 3; - song->phonemeTimer = 2; + u8 num = sound->var00 / 3; + m4aSongNumStart(PH_TRAP_HELD + 3 * num); + } + song->state = 2; + song->phonemeTimer--; + break; + case 2: + song->state = 1; + if (sound->var00 <= 50) + { + song->volume = 0x100 + sound->volume * 16; + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); + song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch; + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); + } + break; + case 1: + if (song->voiceInflection > 10) + song->volume -= 2; + if (song->voiceInflection & 1) + song->pitch += 64; + else + song->pitch -= 64; + m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); + m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); + song->voiceInflection++; + song->phonemeTimer--; + if (song->phonemeTimer == 0) + { + song->currPhoneme++; + if (song->currPhoneme != 6 && song->sound[song->currPhoneme].var00 != 0xFF) + song->state = 0; + else + { + song->state = 3; + song->phonemeTimer = 2; + } } break; - } case 3: - case 4: - { - const struct BardSound *sound = &song->sound[song->currPhoneme]; - - switch (song->state) + song->phonemeTimer--; + if (song->phonemeTimer == 0) { - case 0: - song->phonemeTimer = song->phonemes[song->currPhoneme].length; - if (sound->var00 <= 50) - { - u8 num = sound->var00 / 3; - m4aSongNumStart(PH_TRAP_HELD + 3 * num); - } - song->state = 2; - song->phonemeTimer--; - break; - case 2: - song->state = 1; - if (sound->var00 <= 50) - { - song->volume = 0x100 + sound->volume * 16; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); - song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch; - m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); - } - break; - case 1: - if (song->voiceInflection > 10) - song->volume -= 2; - if (song->voiceInflection & 1) - song->pitch += 64; - else - song->pitch -= 64; - m4aMPlayVolumeControl(&gMPlayInfo_SE2, TRACKS_ALL, song->volume); - m4aMPlayPitchControl(&gMPlayInfo_SE2, TRACKS_ALL, song->pitch); - song->voiceInflection++; - song->phonemeTimer--; - if (song->phonemeTimer == 0) - { - song->currPhoneme++; - if (song->currPhoneme != 6 && song->sound[song->currPhoneme].var00 != 0xFF) - song->state = 0; - else - { - song->state = 3; - song->phonemeTimer = 2; - } - } - break; - case 3: - song->phonemeTimer--; - if (song->phonemeTimer == 0) - { - m4aMPlayStop(&gMPlayInfo_SE2); - song->state = 4; - } - break; + m4aMPlayStop(&gMPlayInfo_SE2); + song->state = 4; } + break; } - break; - case 5: - break; + } + break; + case 5: + break; } } static void Task_BardSong(u8 taskId) { - struct Task *task = &gTasks[taskId]; // r5 + struct Task *task = &gTasks[taskId]; BardSing(task, &gBardSong); switch (task->tState) { - case 0: // Initialize song - PrepareSongText(); - sub_8120708(gStringVar4); - task->data[1] = 0; - task->data[2] = 0; - task->tCharIndex = 0; - task->tCurrWord = 0; - FadeOutBGMTemporarily(4); - task->tState = 1; - break; - case 1: // Wait for BGM to end - if (IsBGMPausedOrStopped()) - task->tState = 2; - break; - case 2: // Initialize word + case 0: // Initialize song + PrepareSongText(); + sub_8120708(gStringVar4); + task->data[1] = 0; + task->data[2] = 0; + task->tCharIndex = 0; + task->tCurrWord = 0; + FadeOutBGMTemporarily(4); + task->tState = 1; + break; + case 1: // Wait for BGM to end + if (IsBGMPausedOrStopped()) + task->tState = 2; + break; + case 2: // Initialize word + { + struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; + u8 *str = gStringVar4 + task->tCharIndex; + u16 wordLen = 0; + + while (*str != CHAR_SPACE + && *str != CHAR_NEWLINE + && *str != EXT_CTRL_CODE_BEGIN + && *str != EOS) { - struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard; - u8 *str = gStringVar4 + task->tCharIndex; - u16 wordLen = 0; + str++; + wordLen++; + } + if (!task->tUseTemporaryLyrics) + sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); + else + sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]); - while (*str != CHAR_SPACE - && *str != CHAR_NEWLINE - && *str != EXT_CTRL_CODE_BEGIN - && *str != EOS) + gBardSong.length /= wordLen; + if (gBardSong.length <= 0) + gBardSong.length = 1; + task->tCurrWord++; + + if (task->data[2] == 0) + { + task->tState = 3; + task->data[1] = 0; + } + else + { + task->tState = 5; + task->data[1] = 0; + } + } + break; + case 5: + if (task->data[2] == 0) + task->tState = 3; + else + task->data[2]--; + break; + case 3: + if (gStringVar4[task->tCharIndex] == EOS) + { + FadeInBGM(6); + m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2); + EnableBothScriptContexts(); + DestroyTask(taskId); + } + else if (gStringVar4[task->tCharIndex] == CHAR_SPACE) + { + + EnableTextPrinters(); + task->tCharIndex++; + task->tState = 2; + task->data[2] = 0; + } + else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE) + { + task->tCharIndex++; + task->tState = 2; + task->data[2] = 0; + } + else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN) + { + task->tCharIndex += 2; // skip over control codes + task->tState = 2; + task->data[2] = 8; + } + else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR) + { + gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space + EnableTextPrinters(); + task->tCharIndex++; + task->data[2] = 0; + } + else + { + switch (task->data[1]) { - str++; - wordLen++; - } - if (!task->tUseTemporaryLyrics) - sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]); - else - sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]); - - gBardSong.length /= wordLen; - if (gBardSong.length <= 0) - gBardSong.length = 1; - task->tCurrWord++; - - if (task->data[2] == 0) - { - task->tState = 3; - task->data[1] = 0; - } - else - { - task->tState = 5; + case 0: + EnableTextPrinters(); + task->data[1]++; + break; + case 1: + task->data[1]++; + break; + case 2: + task->tCharIndex++; task->data[1] = 0; + task->data[2] = gBardSong.length; + task->tState = 4; + break; } } - break; - case 5: - if (task->data[2] == 0) - task->tState = 3; - else - task->data[2]--; - break; - case 3: - if (gStringVar4[task->tCharIndex] == EOS) - { - FadeInBGM(6); - m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2); - EnableBothScriptContexts(); - DestroyTask(taskId); - } - else if (gStringVar4[task->tCharIndex] == CHAR_SPACE) - { - - EnableTextPrinters(); - task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; - } - else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE) - { - task->tCharIndex++; - task->tState = 2; - task->data[2] = 0; - } - else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN) - { - task->tCharIndex += 2; // skip over control codes - task->tState = 2; - task->data[2] = 8; - } - else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR) - { - gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space - EnableTextPrinters(); - task->tCharIndex++; - task->data[2] = 0; - } - else - { - switch (task->data[1]) - { - case 0: - EnableTextPrinters(); - task->data[1]++; - break; - case 1: - task->data[1]++; - break; - case 2: - task->tCharIndex++; - task->data[1] = 0; - task->data[2] = gBardSong.length; - task->tState = 4; - break; - } - } - break; - case 4: - task->data[2]--; - if (task->data[2] == 0) - task->tState = 3; - break; + break; + case 4: + task->data[2]--; + if (task->data[2] == 0) + task->tState = 3; + break; } RunTextPrintersAndIsPrinter0Active(); } -void ScrSpecial_SetMauvilleOldManObjEventGfx(void) +void SetMauvilleOldManObjEventGfx(void) { VarSet(VAR_OBJ_GFX_ID_0, OBJ_EVENT_GFX_BARD); } @@ -720,76 +703,69 @@ void SanitizeMauvilleOldManForRuby(union OldMan * oldMan) } } -void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3) +// Unused +static void SetMauvilleOldManLanguage(union OldMan * oldMan, u32 language1, u32 language2, u32 language3) { s32 i; switch (oldMan->common.id) { - case MAUVILLE_MAN_TRADER: - { - struct MauvilleOldManTrader * trader = &oldMan->trader; + case MAUVILLE_MAN_TRADER: + { + struct MauvilleOldManTrader * trader = &oldMan->trader; - for (i = 0; i < NUM_TRADER_ITEMS; i++) - { - if (IsStringJapanese(trader->playerNames[i])) - { - trader->language[i] = r8; - } - else - { - trader->language[i] = r7; - } - } - } - break; - case MAUVILLE_MAN_STORYTELLER: + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - - for (i = 0; i < NUM_STORYTELLER_TALES; i++) - { - if (IsStringJapanese(storyteller->trainerNames[i])) - { - storyteller->language[i] = r8; - } - else - { - storyteller->language[i] = r7; - } - } - } - break; - case MAUVILLE_MAN_BARD: - { - struct MauvilleManBard * bard = &oldMan->bard; - - if (r3 == LANGUAGE_JAPANESE) - bard->language = r8; + if (IsStringJapanese(trader->playerNames[i])) + trader->language[i] = language1; else - bard->language = r7; + trader->language[i] = language2; } - break; - case MAUVILLE_MAN_HIPSTER: - { - struct MauvilleManHipster * hipster = &oldMan->hipster; + } + break; + case MAUVILLE_MAN_STORYTELLER: + { + struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - if (r3 == LANGUAGE_JAPANESE) - hipster->language = r8; - else - hipster->language = r7; - } - break; - case MAUVILLE_MAN_GIDDY: + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { - struct MauvilleManGiddy * giddy = &oldMan->giddy; - - if (r3 == LANGUAGE_JAPANESE) - giddy->language = r8; + if (IsStringJapanese(storyteller->trainerNames[i])) + storyteller->language[i] = language1; else - giddy->language = r7; + storyteller->language[i] = language2; } - break; + } + break; + case MAUVILLE_MAN_BARD: + { + struct MauvilleManBard * bard = &oldMan->bard; + + if (language3 == LANGUAGE_JAPANESE) + bard->language = language1; + else + bard->language = language2; + } + break; + case MAUVILLE_MAN_HIPSTER: + { + struct MauvilleManHipster * hipster = &oldMan->hipster; + + if (language3 == LANGUAGE_JAPANESE) + hipster->language = language1; + else + hipster->language = language2; + } + break; + case MAUVILLE_MAN_GIDDY: + { + struct MauvilleManGiddy * giddy = &oldMan->giddy; + + if (language3 == LANGUAGE_JAPANESE) + giddy->language = language1; + else + giddy->language = language2; + } + break; } } @@ -822,83 +798,83 @@ void SanitizeReceivedRubyOldMan(union OldMan * oldMan, u32 version, u32 language switch (oldMan->common.id) { - case MAUVILLE_MAN_TRADER: - { - struct MauvilleOldManTrader * trader = &oldMan->trader; - s32 i; + case MAUVILLE_MAN_TRADER: + { + struct MauvilleOldManTrader * trader = &oldMan->trader; + s32 i; - if (isRuby) + if (isRuby) + { + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - for (i = 0; i < NUM_TRADER_ITEMS; i++) + u8 * str = trader->playerNames[i]; + if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) { - u8 * str = trader->playerNames[i]; - if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN) - { - StripExtCtrlCodes(str); - trader->language[i] = LANGUAGE_JAPANESE; - } - else - trader->language[i] = language; + StripExtCtrlCodes(str); + trader->language[i] = LANGUAGE_JAPANESE; } + else + trader->language[i] = language; } - else + } + else + { + for (i = 0; i < NUM_TRADER_ITEMS; i++) { - for (i = 0; i < NUM_TRADER_ITEMS; i++) + if (trader->language[i] == LANGUAGE_JAPANESE) { - if (trader->language[i] == LANGUAGE_JAPANESE) - { - StripExtCtrlCodes(trader->playerNames[i]); - } + StripExtCtrlCodes(trader->playerNames[i]); } } } - break; - case MAUVILLE_MAN_STORYTELLER: + } + break; + case MAUVILLE_MAN_STORYTELLER: + { + + struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; + s32 i; + + if (isRuby) { - - struct MauvilleManStoryteller * storyteller = &oldMan->storyteller; - s32 i; - - if (isRuby) + for (i = 0; i < NUM_STORYTELLER_TALES; i++) { - for (i = 0; i < NUM_STORYTELLER_TALES; i++) - { - if (storyteller->gameStatIDs[i] != 0) - storyteller->language[i] = language; - } + if (storyteller->gameStatIDs[i] != 0) + storyteller->language[i] = language; } } - break; - case MAUVILLE_MAN_BARD: - { - struct MauvilleManBard * bard = &oldMan->bard; + } + break; + case MAUVILLE_MAN_BARD: + { + struct MauvilleManBard * bard = &oldMan->bard; - if (isRuby) - { - bard->language = language; - } - } - break; - case MAUVILLE_MAN_HIPSTER: + if (isRuby) { - struct MauvilleManHipster * hipster = &oldMan->hipster; - - if (isRuby) - { - hipster->language = language; - } + bard->language = language; } - break; - case MAUVILLE_MAN_GIDDY: + } + break; + case MAUVILLE_MAN_HIPSTER: + { + struct MauvilleManHipster * hipster = &oldMan->hipster; + + if (isRuby) { - struct MauvilleManGiddy * giddy = &oldMan->giddy; - - if (isRuby) - { - giddy->language = language; - } + hipster->language = language; } - break; + } + break; + case MAUVILLE_MAN_GIDDY: + { + struct MauvilleManGiddy * giddy = &oldMan->giddy; + + if (isRuby) + { + giddy->language = language; + } + } + break; } } @@ -1260,9 +1236,8 @@ static void ScrambleStatList(u8 * arr, s32 count) { u32 a = Random() % count; u32 b = Random() % count; - u8 temp = arr[a]; - arr[a] = arr[b]; - arr[b] = temp; + u8 temp; + SWAP(arr[a], arr[b], temp); } } @@ -1354,63 +1329,63 @@ static void Task_StoryListMenu(u8 taskId) switch (task->data[0]) { - case 0: - PrintStoryList(); - task->data[0]++; - break; - case 1: - selection = Menu_ProcessInput(); - if (selection == MENU_NOTHING_CHOSEN) - break; - if (selection == MENU_B_PRESSED || selection == GetFreeStorySlot()) - { - gSpecialVar_Result = 0; - } - else - { - gSpecialVar_Result = 1; - sSelectedStory = selection; - } - ClearToTransparentAndRemoveWindow(sStorytellerWindowId); - DestroyTask(taskId); - EnableBothScriptContexts(); + case 0: + PrintStoryList(); + task->data[0]++; + break; + case 1: + selection = Menu_ProcessInput(); + if (selection == MENU_NOTHING_CHOSEN) break; + if (selection == MENU_B_PRESSED || selection == GetFreeStorySlot()) + { + gSpecialVar_Result = 0; + } + else + { + gSpecialVar_Result = 1; + sSelectedStory = selection; + } + ClearToTransparentAndRemoveWindow(sStorytellerWindowId); + DestroyTask(taskId); + EnableBothScriptContexts(); + break; } } // Sets gSpecialVar_Result to TRUE if player selected a story -void ScrSpecial_StorytellerStoryListMenu(void) +void StorytellerStoryListMenu(void) { CreateTask(Task_StoryListMenu, 80); } -void ScrSpecial_StorytellerDisplayStory(void) +void Script_StorytellerDisplayStory(void) { StorytellerDisplayStory(sSelectedStory); } -u8 ScrSpecial_StorytellerGetFreeStorySlot(void) +u8 StorytellerGetFreeStorySlot(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; return GetFreeStorySlot(); } // Returns TRUE if stat has increased -bool8 ScrSpecial_StorytellerUpdateStat(void) +bool8 StorytellerUpdateStat(void) { - u8 r4; + u8 stat; sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; - r4 = sStorytellerPtr->gameStatIDs[sSelectedStory]; + stat = sStorytellerPtr->gameStatIDs[sSelectedStory]; if (HasTrainerStatIncreased(sSelectedStory) == TRUE) { - StorytellerRecordNewStat(sSelectedStory, r4); + StorytellerRecordNewStat(sSelectedStory, stat); return TRUE; } return FALSE; } -bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void) +bool8 HasStorytellerAlreadyRecorded(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; @@ -1420,7 +1395,7 @@ bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void) return TRUE; } -bool8 ScrSpecial_StorytellerInitializeRandomStat(void) +bool8 Script_StorytellerInitializeRandomStat(void) { sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller; return StorytellerInitializeRandomStat(); diff --git a/src/trader.c b/src/trader.c index f6d021dfe..98b4f464c 100644 --- a/src/trader.c +++ b/src/trader.c @@ -130,13 +130,13 @@ void Task_HandleGetDecorationMenuInput(u8 taskId) } } -void ScrSpecial_GetTraderTradedFlag(void) +void GetTraderTradedFlag(void) { struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; gSpecialVar_Result = trader->alreadyTraded; } -void ScrSpecial_DoesPlayerHaveNoDecorations(void) +void DoesPlayerHaveNoDecorations(void) { u8 i; @@ -151,7 +151,7 @@ void ScrSpecial_DoesPlayerHaveNoDecorations(void) gSpecialVar_Result = TRUE; } -void ScrSpecial_IsDecorationFull(void) +void IsDecorationCategoryFull(void) { gSpecialVar_Result = FALSE; if (gDecorations[gSpecialVar_0x8004].category != gDecorations[gSpecialVar_0x8006].category @@ -162,7 +162,7 @@ void ScrSpecial_IsDecorationFull(void) } } -void ScrSpecial_TraderMenuGiveDecoration(void) +void TraderShowDecorationMenu(void) { CreateTask(ShowDecorationCategoriesWindow, 0); } @@ -190,7 +190,7 @@ void ExitTraderMenu(u8 taskId) EnableBothScriptContexts(); } -void ScrSpecial_TraderDoDecorationTrade(void) +void TraderDoDecorationTrade(void) { struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader; @@ -202,7 +202,7 @@ void ScrSpecial_TraderDoDecorationTrade(void) trader->alreadyTraded = TRUE; } -void ScrSpecial_TraderMenuGetDecoration(void) +void TraderMenuGetDecoration(void) { u8 taskId = CreateTask(Task_HandleGetDecorationMenuInput, 0); CreateAvailableDecorationsMenu(taskId);