diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 5adda680a..e15639067 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -803,73 +803,7 @@ EventScript_SetBrineyLocation_Route109:: @ 819FD55 .include "data/scripts/pkmn_center_nurse.inc" .include "data/scripts/obtain_item.inc" .include "data/scripts/record_mix.inc" - -gUnknown_081A0009:: @ 81A0009 - lockall - setvar VAR_0x8004, 0 - special DoPCTurnOnEffect - playse SE_PC_ON - msgbox UnknownString_81A09EC, MSGBOX_DEFAULT - goto EventScript_1A0023 - end - -EventScript_1A0023: - message gPCText_WhichPCShouldBeAccessed - waitmessage - special ScrSpecial_CreatePCMenu - waitstate - goto EventScript_1A0033 - end - -EventScript_1A0033: - switch VAR_RESULT - case 0, EventScript_1A0085 - case 1, EventScript_1A0070 - case 2, EventScript_1A00CB - case 3, EventScript_1A00BE - case 127, EventScript_1A00BE - end - -EventScript_1A0070: - playse SE_PC_LOGON - msgbox UnknownString_81A0A54, MSGBOX_DEFAULT - special PlayerPC - waitstate - goto EventScript_1A0023 - end - -EventScript_1A0085: - playse SE_PC_LOGON - call_if_unset FLAG_SYS_PC_LANETTE, EventScript_1A00AC - call_if_set FLAG_SYS_PC_LANETTE, EventScript_1A00B5 - msgbox UnknownString_81A0A35, MSGBOX_DEFAULT - special ShowPokemonStorageSystem - waitstate - goto EventScript_1A0023 - end - -EventScript_1A00AC: - msgbox UnknownString_81A0A1E, MSGBOX_DEFAULT - return - -EventScript_1A00B5: - msgbox UnknownString_81A0A66, MSGBOX_DEFAULT - return - -EventScript_1A00BE: - setvar VAR_0x8004, 0 - playse SE_PC_OFF - special DoPCTurnOffEffect - releaseall - end - -EventScript_1A00CB: - goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_1A00BE - playse SE_PC_LOGON - special AccessHallOfFamePC - waitstate - goto EventScript_1A0033 - end + .include "data/scripts/pc.inc" FallarborTown_EventScript_1A00E1:: @ 81A00E1 FortreeCity_EventScript_1A00E1:: @ 81A00E1 @@ -1803,22 +1737,22 @@ UnusedMixRecordsPromptText: @ 81A099F UnusedMixRecordsSeeYouAgainText: @ 81A09D2 .string "Komm bald wieder!$" -UnknownString_81A09EC: @ 81A09EC +Text_BootUpPC: @ 81A09EC .string "{PLAYER} schaltet den PC ein.$" -gPCText_WhichPCShouldBeAccessed:: @ 81A0A01 +Text_WhichPCShouldBeAccessed:: @ 81A0A01 .string "Zugriff auf wessen PC?$" -UnknownString_81A0A1E: @ 81A0A1E +Text_AccessedSomeonesPC: @ 81A0A1E .string "Verbindung zu jemandes PC hergestellt.$" UnknownString_81A0A35: @ 81A0A35 .string "POKéMON-Lagerungs-System geöffnet.$" -UnknownString_81A0A54: @ 81A0A54 +Text_AccessedPlayersPC: @ 81A0A54 .string "Verbindung mit PC von {PLAYER}.$" -UnknownString_81A0A66: @ 81A0A66 +Text_AccessedLanettesPC: @ 81A0A66 .string "Verbindung zu LANETTES PC hergestellt.$" gText_NurseJoy_Welcome:: @ 81A0A7D diff --git a/data/event_scripts.s b/data/event_scripts.s index 65c1679b1..3d99e49df 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -802,73 +802,7 @@ EventScript_SetBrineyLocation_Route109:: @ 819FD55 .include "data/scripts/pkmn_center_nurse.inc" .include "data/scripts/obtain_item.inc" .include "data/scripts/record_mix.inc" - -gUnknown_081A0009:: @ 81A0009 - lockall - setvar VAR_0x8004, 0 - special DoPCTurnOnEffect - playse SE_PC_ON - msgbox UnknownString_81A09EC, MSGBOX_DEFAULT - goto EventScript_1A0023 - end - -EventScript_1A0023: - message gPCText_WhichPCShouldBeAccessed - waitmessage - special ScrSpecial_CreatePCMenu - waitstate - goto EventScript_1A0033 - end - -EventScript_1A0033: - switch VAR_RESULT - case 0, EventScript_1A0085 - case 1, EventScript_1A0070 - case 2, EventScript_1A00CB - case 3, EventScript_1A00BE - case 127, EventScript_1A00BE - end - -EventScript_1A0070: - playse SE_PC_LOGON - msgbox UnknownString_81A0A54, MSGBOX_DEFAULT - special PlayerPC - waitstate - goto EventScript_1A0023 - end - -EventScript_1A0085: - playse SE_PC_LOGON - call_if_unset FLAG_SYS_PC_LANETTE, EventScript_1A00AC - call_if_set FLAG_SYS_PC_LANETTE, EventScript_1A00B5 - msgbox UnknownString_81A0A35, MSGBOX_DEFAULT - special ShowPokemonStorageSystem - waitstate - goto EventScript_1A0023 - end - -EventScript_1A00AC: - msgbox UnknownString_81A0A1E, MSGBOX_DEFAULT - return - -EventScript_1A00B5: - msgbox UnknownString_81A0A66, MSGBOX_DEFAULT - return - -EventScript_1A00BE: - setvar VAR_0x8004, 0 - playse SE_PC_OFF - special DoPCTurnOffEffect - releaseall - end - -EventScript_1A00CB: - goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_1A00BE - playse SE_PC_LOGON - special AccessHallOfFamePC - waitstate - goto EventScript_1A0033 - end + .include "data/scripts/pc.inc" FallarborTown_EventScript_1A00E1:: @ 81A00E1 FortreeCity_EventScript_1A00E1:: @ 81A00E1 @@ -1802,22 +1736,22 @@ UnusedMixRecordsPromptText: @ 81A099F UnusedMixRecordsSeeYouAgainText: @ 81A09D2 .string "We hope to see you again!$" -UnknownString_81A09EC: @ 81A09EC +Text_BootUpPC: @ 81A09EC .string "{PLAYER} booted up the PC.$" -gPCText_WhichPCShouldBeAccessed:: @ 81A0A01 +Text_WhichPCShouldBeAccessed:: @ 81A0A01 .string "Which PC should be accessed?$" -UnknownString_81A0A1E: @ 81A0A1E +Text_AccessedSomeonesPC: @ 81A0A1E .string "Accessed someone's PC.$" UnknownString_81A0A35: @ 81A0A35 .string "POKéMON Storage System opened.$" -UnknownString_81A0A54: @ 81A0A54 +Text_AccessedPlayersPC: @ 81A0A54 .string "Accessed {PLAYER}'s PC.$" -UnknownString_81A0A66: @ 81A0A66 +Text_AccessedLanettesPC: @ 81A0A66 .string "Accessed LANETTE's PC.$" gText_NurseJoy_Welcome:: @ 81A0A7D diff --git a/data/scripts/pc.inc b/data/scripts/pc.inc new file mode 100644 index 000000000..451f7fe66 --- /dev/null +++ b/data/scripts/pc.inc @@ -0,0 +1,66 @@ +EventScript_PC:: @ 81A0009 + lockall + setvar VAR_0x8004, 0 + special DoPCTurnOnEffect + playse SE_PC_ON + msgbox Text_BootUpPC, MSGBOX_DEFAULT + goto EventScript_PCMainMenu + end + +EventScript_PCMainMenu: + message Text_WhichPCShouldBeAccessed + waitmessage + special ScriptMenu_CreatePCMultichoice + waitstate + goto EventScript_AccessPC + end + +EventScript_AccessPC: + switch VAR_RESULT + case 0, EventScript_AccessPokemonStorage + case 1, EventScript_AccessPlayersPC + case 2, EventScript_AccessHallOfFame + case 3, EventScript_TurnOffPC + case MULTI_B_PRESSED, EventScript_TurnOffPC + end + +EventScript_AccessPlayersPC: + playse SE_PC_LOGON + msgbox Text_AccessedPlayersPC, MSGBOX_DEFAULT + special PlayerPC + waitstate + goto EventScript_PCMainMenu + end + +EventScript_AccessPokemonStorage: + playse SE_PC_LOGON + call_if_unset FLAG_SYS_PC_LANETTE, EventScript_AccessSomeonesPC + call_if_set FLAG_SYS_PC_LANETTE, EventScript_AccessLanettesPC + msgbox UnknownString_81A0A35, MSGBOX_DEFAULT + special ShowPokemonStorageSystem + waitstate + goto EventScript_PCMainMenu + end + +EventScript_AccessSomeonesPC: + msgbox Text_AccessedSomeonesPC, MSGBOX_DEFAULT + return + +EventScript_AccessLanettesPC: + msgbox Text_AccessedLanettesPC, MSGBOX_DEFAULT + return + +EventScript_TurnOffPC: + setvar VAR_0x8004, 0 + playse SE_PC_OFF + special DoPCTurnOffEffect + releaseall + end + +EventScript_AccessHallOfFame: + goto_if_unset FLAG_SYS_GAME_CLEAR, EventScript_TurnOffPC + playse SE_PC_LOGON + special AccessHallOfFamePC + waitstate + goto EventScript_AccessPC + end diff --git a/data/specials.inc b/data/specials.inc index 0360cf8dd..0f6a22bce 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -270,7 +270,7 @@ gSpecials:: def_special ShowBerryBlenderRecordWindow def_special ResetTrickHouseEndRoomFlag def_special SetTrickHouseEndRoomFlag - def_special ScrSpecial_CreatePCMenu + def_special ScriptMenu_CreatePCMultichoice def_special AccessHallOfFamePC def_special ScrSpecial_ShowDiploma def_special CheckLeadMonCool diff --git a/include/script_menu.h b/include/script_menu.h index e63d03b2c..9556603cb 100644 --- a/include/script_menu.h +++ b/include/script_menu.h @@ -10,7 +10,7 @@ bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 var3, u8 var4, u8 va bool8 Multichoice(u8 var1, u8 var2, u8 var3, u8 var4); bool8 ScriptMenu_YesNo(u8 var1, u8 var2); bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount); -bool8 ScrSpecial_CreatePCMenu(void); +bool8 ScriptMenu_CreatePCMultichoice(void); void ScriptMenu_CreatePCMenu(void); void ScriptMenu_DisplayPCStartupPrompt(void); bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3); diff --git a/src/field_control_avatar.c b/src/field_control_avatar.c index 1fe046b0e..e237904fb 100644 --- a/src/field_control_avatar.c +++ b/src/field_control_avatar.c @@ -51,11 +51,10 @@ extern u8 gUnknown_0815281E[]; extern u8 gUnknown_08152C39[]; extern u8 SecretBase_EventScript_PC[]; extern u8 SecretBase_EventScript_RecordMixingPC[]; -extern u8 gUnknown_081A0009[]; +extern u8 EventScript_PC[]; extern u8 gUnknown_081C6C02[]; extern u8 EventScript_HiddenItem[]; extern u8 Event_TV[]; -extern u8 gUnknown_081A0009[]; extern u8 ClosedSootopolisDoorScript[]; extern u8 gUnknown_081A4363[]; extern u8 gUnknown_081C346A[]; @@ -320,7 +319,7 @@ static bool8 TryStartInteractionScript(struct MapPosition *position, u16 metatil && script != gUnknown_08152C39 && script != SecretBase_EventScript_PC && script != SecretBase_EventScript_RecordMixingPC - && script != gUnknown_081A0009) + && script != EventScript_PC) PlaySE(5); ScriptContext1_SetupScript(script); @@ -456,7 +455,7 @@ static u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 metatile if (MetatileBehavior_IsPlayerFacingTVScreen(metatileBehavior, direction) == TRUE) return Event_TV; if (MetatileBehavior_IsPC(metatileBehavior) == TRUE) - return gUnknown_081A0009; + return EventScript_PC; if (MetatileBehavior_IsClosedSootopolisDoor(metatileBehavior) == TRUE) return ClosedSootopolisDoorScript; if (MetatileBehavior_IsLinkBattleRecords(metatileBehavior) == TRUE) diff --git a/src/hof_pc.c b/src/hof_pc.c index ba64b5f4f..767970da7 100644 --- a/src/hof_pc.c +++ b/src/hof_pc.c @@ -29,7 +29,7 @@ static void ReshowPCMenuAfterHallOfFamePC(void) ScriptContext2_Enable(); Overworld_PlaySpecialMapMusic(); BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB(0, 0, 0)); - ScrSpecial_CreatePCMenu(); + ScriptMenu_CreatePCMultichoice(); ScriptMenu_DisplayPCStartupPrompt(); CreateTask(Task_WaitForPaletteFade, 10); } diff --git a/src/script_menu.c b/src/script_menu.c index 20787878a..03aef9813 100644 --- a/src/script_menu.c +++ b/src/script_menu.c @@ -579,7 +579,7 @@ const u8 *const gStdStrings[] = [STDSTRING_BERRIES] = OtherText_Berries, }; -extern u8 gPCText_WhichPCShouldBeAccessed[]; +extern u8 Text_WhichPCShouldBeAccessed[]; extern u16 gSpecialVar_Result; @@ -881,7 +881,7 @@ static void Task_HandleMultichoiceGridInput(u8 taskId) #undef tIgnoreBPress #undef tDoWrap -bool8 ScrSpecial_CreatePCMenu(void) +bool8 ScriptMenu_CreatePCMultichoice(void) { if (FuncIsActiveTask(Task_HandleMultichoiceInput) == TRUE) { @@ -1098,7 +1098,7 @@ _080B588C: .4byte gPCText_PlayersPC\n\ void ScriptMenu_DisplayPCStartupPrompt(void) { Menu_DisplayDialogueFrame(); - Menu_PrintText(gPCText_WhichPCShouldBeAccessed, 2, 15); + Menu_PrintText(Text_WhichPCShouldBeAccessed, 2, 15); } #define tState data[0]