Sync pc.inc

This commit is contained in:
GriffinR 2020-04-29 14:56:39 -04:00
parent 9604fa3936
commit 788dc307d4
8 changed files with 87 additions and 154 deletions

View File

@ -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

78
data/event_scripts.s vendored
View File

@ -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

66
data/scripts/pc.inc vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -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);

View File

@ -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)

View File

@ -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);
}

View File

@ -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]