From 3fd878483f38145cb4311d377f99545f25af52a8 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 10 Feb 2019 00:50:46 -0500 Subject: Start renaming symbols I finally figured out what the code is trying to do. I have a foothold; the rest should follow. --- data/scripts/cable_club.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index b73d7e1fa..b1e34278f 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -914,14 +914,14 @@ RecordCorner_EventScript_277471:: @ 8277471 releaseall end -EventScript_TradeRoom_ReadTrainerCard1:: @ 827747E +EventScript_TradeRoom_ReadTrainerCard_NoColor:: @ 827747E msgbox Text_278452, MSGBOX_DEFAULT fadescreen 1 special sp02A_crash_sound waitstate end -EventScript_TradeRoom_ReadTrainerCard2:: @ 827748D +EventScript_TradeRoom_ReadTrainerCard_Normal:: @ 827748D msgbox Text_27847B, MSGBOX_DEFAULT fadescreen 1 special sp02A_crash_sound -- cgit v1.2.3 From f2f1b1978ba3423a519df66d4f382dd68ac8b185 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 10 Feb 2019 03:54:50 -0500 Subject: Done documenting link code in overworld.c --- data/scripts/cable_club.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index b1e34278f..c5e8a41a7 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -967,7 +967,7 @@ RecordCorner_EventScript_2774E0:: @ 82774E0 closemessage end -gUnknown_082774EF:: @ 82774EF +gEventScript_ConfirmLeaveTradeRoom:: @ 82774EF msgbox Text_2783A8, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq gUnknown_08277509 -- cgit v1.2.3 From e75f45dbcfcd65901035fbc7e3793332670eb306 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 10 Feb 2019 20:42:50 -0500 Subject: Reverse engineered many of the multiplayer events Some corrections to the way events are handled and identified. --- data/scripts/cable_club.inc | 100 ++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 49 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index c5e8a41a7..dbd664dbc 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -791,116 +791,118 @@ EventScript_CableBoxResults:: @ 8277365 releaseall end -gUnknown_08277374:: @ 8277374 +gEventScript_SingleBattleColosseum_PlayerSpot0:: @ 8277374 setvar VAR_0x8005, 0 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -gUnknown_0827737E:: @ 827737E +gEventScript_SingleBattleColosseum_PlayerSpot1:: @ 827737E setvar VAR_0x8005, 1 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -gUnknown_08277388:: @ 8277388 +gEventScript_DoubleBattleColosseum_PlayerSpot0:: @ 8277388 fadescreen 1 - special sub_80F9438 + special EventScript_ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq DoubleBattleColosseum_EventScript_2773F4 + goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 0 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -gUnknown_082773A3:: @ 82773A3 +gEventScript_DoubleBattleColosseum_PlayerSpot1:: @ 82773A3 fadescreen 1 - special sub_80F9438 + special EventScript_ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq DoubleBattleColosseum_EventScript_2773F4 + goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 1 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -gUnknown_082773BE:: @ 82773BE +gEventScript_DoubleBattleColosseum_PlayerSpot2:: @ 82773BE fadescreen 1 - special sub_80F9438 + special EventScript_ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq DoubleBattleColosseum_EventScript_2773F4 + goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 2 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -gUnknown_082773D9:: @ 82773D9 +gEventScript_DoubleBattleColosseum_PlayerSpot3:: @ 82773D9 fadescreen 1 - special sub_80F9438 + special EventScript_ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq DoubleBattleColosseum_EventScript_2773F4 + goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 3 - special sub_80B3968 + special EventScript_ColosseumPlayerSpotTriggered waitstate end -DoubleBattleColosseum_EventScript_2773F4:: @ 82773F4 +gEventScript_DoubleBattleColosseum_CancelSpotTrigger:: @ 82773F4 end -gUnknown_082773F5:: @ 82773F5 +gEventScript_TradeCenter_Chair0:: @ 82773F5 setvar VAR_0x8005, 0 - special sub_80B3924 + special EventScript_PlayerEnteredTradeSeat waitstate end -gUnknown_082773FF:: @ 82773FF +gEventScript_TradeCenter_Chair1:: @ 82773FF setvar VAR_0x8005, 1 - special sub_80B3924 + special EventScript_PlayerEnteredTradeSeat waitstate end -gUnknown_08277409:: @ 8277409 +/* Never used */ +gEventScript_TradeCenter_Chair2:: @ 8277409 setvar VAR_0x8005, 2 - special sub_80B3924 + special EventScript_PlayerEnteredTradeSeat waitstate end -gUnknown_08277413:: @ 8277413 +/* Never used */ +gEventScript_TradeCenter_Chair3:: @ 8277413 setvar VAR_0x8005, 3 - special sub_80B3924 + special EventScript_PlayerEnteredTradeSeat waitstate end -gUnknown_0827741D:: @ 827741D +gEventScript_RecordCenter_Spot0:: @ 827741D setvar VAR_0x8005, 0 - special sub_80E6BE8 + special EventScript_RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gUnknown_08277432:: @ 8277432 +gEventScript_RecordCenter_Spot1:: @ 8277432 setvar VAR_0x8005, 1 - special sub_80E6BE8 + special EventScript_RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gUnknown_08277447:: @ 8277447 +gEventScript_RecordCenter_Spot2:: @ 8277447 setvar VAR_0x8005, 2 - special sub_80E6BE8 + special EventScript_RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gUnknown_0827745C:: @ 827745C +gEventScript_RecordCenter_Spot3:: @ 827745C setvar VAR_0x8005, 3 - special sub_80E6BE8 + special EventScript_RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 @@ -914,21 +916,21 @@ RecordCorner_EventScript_277471:: @ 8277471 releaseall end -EventScript_TradeRoom_ReadTrainerCard_NoColor:: @ 827747E +gEventScript_TradeRoom_ReadTrainerCard_NoColor:: @ 827747E msgbox Text_278452, MSGBOX_DEFAULT fadescreen 1 special sp02A_crash_sound waitstate end -EventScript_TradeRoom_ReadTrainerCard_Normal:: @ 827748D +gEventScript_TradeRoom_ReadTrainerCard_Normal:: @ 827748D msgbox Text_27847B, MSGBOX_DEFAULT fadescreen 1 special sp02A_crash_sound waitstate end -EventScript_TradeRoom_TooBusyToNotice:: @ 827749C +gEventScript_TradeRoom_TooBusyToNotice:: @ 827749C msgbox Text_27842E, MSGBOX_DEFAULT closemessage end @@ -968,21 +970,21 @@ RecordCorner_EventScript_2774E0:: @ 82774E0 end gEventScript_ConfirmLeaveTradeRoom:: @ 82774EF - msgbox Text_2783A8, MSGBOX_YESNO + msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq gUnknown_08277509 + goto_if_eq gEventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall end -gUnknown_08277509:: @ 8277509 - messageautoscroll Text_2783E9 +gEventScript_TerminateLink:: @ 8277509 + messageautoscroll Text_TerminateLinkPleaseWait waitmessage - special sub_80B371C + special EventScript_ExitLinkRoom end -EventScript_277513:: @ 8277513 - special sub_80B36EC +gEventScript_DoLinkRoomExit:: @ 8277513 + special EventScript_CleanupLinkRoomState special sub_80AF9F8 waitstate end @@ -1736,11 +1738,11 @@ OldaleTown_PokemonCenter_2F_Text_278372: @ 8278372 .string "Please confirm the number of\n" .string "players and start again.$" -Text_2783A8: @ 82783A8 +Text_TerminateLinkConfirmation: @ 82783A8 .string "The link will be terminated if you\n" .string "leave the room. Is that okay?$" -Text_2783E9: @ 82783E9 +Text_TerminateLinkPleaseWait: @ 82783E9 .string "Terminating link…\n" .string "You will be escorted out of\l" .string "the room. Please wait.$" -- cgit v1.2.3 From 08579edbcd596c9659fe25490480c6f96e2b4288 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 18 Feb 2019 01:03:44 -0500 Subject: Clean up mistakes and bad formatting --- data/scripts/cable_club.inc | 86 ++++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 43 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index dbd664dbc..5c413a7c1 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -791,118 +791,118 @@ EventScript_CableBoxResults:: @ 8277365 releaseall end -gEventScript_SingleBattleColosseum_PlayerSpot0:: @ 8277374 +EventScript_SingleBattleColosseum_PlayerSpot0:: @ 8277374 setvar VAR_0x8005, 0 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_SingleBattleColosseum_PlayerSpot1:: @ 827737E +EventScript_SingleBattleColosseum_PlayerSpot1:: @ 827737E setvar VAR_0x8005, 1 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_DoubleBattleColosseum_PlayerSpot0:: @ 8277388 +EventScript_DoubleBattleColosseum_PlayerSpot0:: @ 8277388 fadescreen 1 - special EventScript_ChooseHalfPartyForBattle + special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger + goto_if_eq EventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 0 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_DoubleBattleColosseum_PlayerSpot1:: @ 82773A3 +EventScript_DoubleBattleColosseum_PlayerSpot1:: @ 82773A3 fadescreen 1 - special EventScript_ChooseHalfPartyForBattle + special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger + goto_if_eq EventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 1 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_DoubleBattleColosseum_PlayerSpot2:: @ 82773BE +EventScript_DoubleBattleColosseum_PlayerSpot2:: @ 82773BE fadescreen 1 - special EventScript_ChooseHalfPartyForBattle + special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger + goto_if_eq EventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 2 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_DoubleBattleColosseum_PlayerSpot3:: @ 82773D9 +EventScript_DoubleBattleColosseum_PlayerSpot3:: @ 82773D9 fadescreen 1 - special EventScript_ChooseHalfPartyForBattle + special ChooseHalfPartyForBattle waitstate compare VAR_RESULT, 0 - goto_if_eq gEventScript_DoubleBattleColosseum_CancelSpotTrigger + goto_if_eq EventScript_DoubleBattleColosseum_CancelSpotTrigger setvar VAR_0x8005, 3 - special EventScript_ColosseumPlayerSpotTriggered + special ColosseumPlayerSpotTriggered waitstate end -gEventScript_DoubleBattleColosseum_CancelSpotTrigger:: @ 82773F4 +EventScript_DoubleBattleColosseum_CancelSpotTrigger:: @ 82773F4 end -gEventScript_TradeCenter_Chair0:: @ 82773F5 +EventScript_TradeCenter_Chair0:: @ 82773F5 setvar VAR_0x8005, 0 - special EventScript_PlayerEnteredTradeSeat + special PlayerEnteredTradeSeat waitstate end -gEventScript_TradeCenter_Chair1:: @ 82773FF +EventScript_TradeCenter_Chair1:: @ 82773FF setvar VAR_0x8005, 1 - special EventScript_PlayerEnteredTradeSeat + special PlayerEnteredTradeSeat waitstate end /* Never used */ -gEventScript_TradeCenter_Chair2:: @ 8277409 +EventScript_TradeCenter_Chair2:: @ 8277409 setvar VAR_0x8005, 2 - special EventScript_PlayerEnteredTradeSeat + special PlayerEnteredTradeSeat waitstate end /* Never used */ -gEventScript_TradeCenter_Chair3:: @ 8277413 +EventScript_TradeCenter_Chair3:: @ 8277413 setvar VAR_0x8005, 3 - special EventScript_PlayerEnteredTradeSeat + special PlayerEnteredTradeSeat waitstate end -gEventScript_RecordCenter_Spot0:: @ 827741D +EventScript_RecordCenter_Spot0:: @ 827741D setvar VAR_0x8005, 0 - special EventScript_RecordMixingPlayerSpotTriggered + special RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gEventScript_RecordCenter_Spot1:: @ 8277432 +EventScript_RecordCenter_Spot1:: @ 8277432 setvar VAR_0x8005, 1 - special EventScript_RecordMixingPlayerSpotTriggered + special RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gEventScript_RecordCenter_Spot2:: @ 8277447 +EventScript_RecordCenter_Spot2:: @ 8277447 setvar VAR_0x8005, 2 - special EventScript_RecordMixingPlayerSpotTriggered + special RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 end -gEventScript_RecordCenter_Spot3:: @ 827745C +EventScript_RecordCenter_Spot3:: @ 827745C setvar VAR_0x8005, 3 - special EventScript_RecordMixingPlayerSpotTriggered + special RecordMixingPlayerSpotTriggered waitstate compare VAR_TEMP_1, 0 goto_if_ne RecordCorner_EventScript_277471 @@ -969,22 +969,22 @@ RecordCorner_EventScript_2774E0:: @ 82774E0 closemessage end -gEventScript_ConfirmLeaveTradeRoom:: @ 82774EF +EventScript_ConfirmLeaveTradeRoom:: @ 82774EF msgbox Text_TerminateLinkConfirmation, MSGBOX_YESNO compare VAR_RESULT, 1 - goto_if_eq gEventScript_TerminateLink + goto_if_eq EventScript_TerminateLink erasebox 0, 0, 29, 19 releaseall end -gEventScript_TerminateLink:: @ 8277509 +EventScript_TerminateLink:: @ 8277509 messageautoscroll Text_TerminateLinkPleaseWait waitmessage - special EventScript_ExitLinkRoom + special ExitLinkRoom end -gEventScript_DoLinkRoomExit:: @ 8277513 - special EventScript_CleanupLinkRoomState +EventScript_DoLinkRoomExit:: @ 8277513 + special CleanupLinkRoomState special sub_80AF9F8 waitstate end -- cgit v1.2.3 From 4b9e93850c50a2fbd380c061e129c76d33f6e452 Mon Sep 17 00:00:00 2001 From: Marcus Huderle Date: Wed, 27 Feb 2019 12:45:31 -0600 Subject: Document easy chat screen types --- data/scripts/apprentice.inc | 4 ++-- data/scripts/gabby_and_ty.inc | 4 ++-- data/scripts/mauville_man.inc | 4 ++-- data/scripts/mystery_event_club.inc | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/apprentice.inc b/data/scripts/apprentice.inc index ac4bd1979..d6713cde4 100644 --- a/data/scripts/apprentice.inc +++ b/data/scripts/apprentice.inc @@ -269,8 +269,8 @@ BattleFrontier_BattleTowerLobby_EventScript_2B6DD4: apprentice_msg TRUE, 11 setvar VAR_0x8004, 25 special CallApprenticeFunction - setvar VAR_0x8004, 19 - call BattleFrontier_BattleTowerLobby_EventScript_271E7C + setvar VAR_0x8004, EASY_CHAT_TYPE_APPRENTICE + call Common_ShowEasyChatScreen lock faceplayer setvar VAR_0x8004, 21 diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index ee0e533bc..31000539c 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -313,8 +313,8 @@ Route111_EventScript_28D0A7:: @ 828D0A7 compare VAR_RESULT, 0 goto_if_eq Route111_EventScript_28D0E1 msgbox Route111_Text_28B433, MSGBOX_DEFAULT - setvar VAR_0x8004, 10 - call Route111_EventScript_271E7C + setvar VAR_0x8004, EASY_CHAT_TYPE_GABBY_AND_TY + call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index 2791e5d9f..0ab47ea80 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -43,8 +43,8 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E0F4:: @ 828E0F4 end MauvilleCity_PokemonCenter_1F_EventScript_28E113:: @ 828E113 - setvar VAR_0x8004, 6 - call MauvilleCity_PokemonCenter_1F_EventScript_271E7C + setvar VAR_0x8004, EASY_CHAT_TYPE_BARD_SONG + call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc index ea805edc4..cc189a96b 100644 --- a/data/scripts/mystery_event_club.inc +++ b/data/scripts/mystery_event_club.inc @@ -24,8 +24,8 @@ PetalburgCity_PokemonCenter_1F_EventScript_291591:: @ 8291591 PetalburgCity_PokemonCenter_1F_EventScript_29159F:: @ 829159F msgbox PetalburgCity_PokemonCenter_1F_Text_291969, MSGBOX_DEFAULT closemessage - setvar VAR_0x8004, 0 - call PetalburgCity_PokemonCenter_1F_EventScript_271E7C + setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE + call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 @@ -76,8 +76,8 @@ PetalburgCity_PokemonCenter_1F_EventScript_291642:: @ 8291642 PetalburgCity_PokemonCenter_1F_EventScript_291650:: @ 8291650 msgbox PetalburgCity_PokemonCenter_1F_Text_291A6B, MSGBOX_DEFAULT closemessage - setvar VAR_0x8004, 0 - call PetalburgCity_PokemonCenter_1F_EventScript_271E7C + setvar VAR_0x8004, EASY_CHAT_TYPE_PROFILE + call Common_ShowEasyChatScreen lock faceplayer compare VAR_RESULT, 0 -- cgit v1.2.3 From 648fc3d4f33b0df553b0fd3737843a1495351993 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Wed, 27 Feb 2019 15:18:56 -0500 Subject: Name more unknown vars --- data/scripts/cable_club.inc | 2 +- data/scripts/secret_base.inc | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 0858dfabb..7293cdad3 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -74,7 +74,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276B23:: @ 8276B23 msgbox gUnknown_08273594, MSGBOX_DEFAULT giveitem_std ITEM_EON_TICKET setflag FLAG_SYS_HAS_EON_TICKET - setvar VAR_0x403F, 0 + setvar VAR_ALWAYS_ZERO_0x403F, 0 msgbox gUnknown_082735F2, MSGBOX_DEFAULT release end diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index 770bc9a5b..95e9a2fc5 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -430,21 +430,21 @@ EventScript_275B4D:: @ 8275B4D EventScript_275B5B:: @ 8275B5B closemessage playse SE_KAIDAN - setvar VAR_0x4097, 0 + setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 0 setflag FLAG_DECORATION_0 special sub_80E8E18 special sub_80E9068 setvar VAR_0x8004, 0 setvar VAR_0x8005, 0 special sub_80E933C - setvar VAR_0x4089, 1 + setvar VAR_SECRET_BASE_INITIALIZED, 1 waitstate end SecretBase_RedCave1_EventScript_275B81:: @ 8275B81 applymovement EVENT_OBJ_ID_PLAYER, SecretBase_RedCave1_Movement_275BB4 waitmovement 0 - setvar VAR_0x4097, 1 + setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 1 msgbox SecretBase_RedCave1_Text_23B759, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq SecretBase_RedCave1_EventScript_275BAB @@ -467,21 +467,21 @@ SecretBase_RedCave1_Movement_275BB4: @ 8275BB4 EventScript_275BB7:: @ 8275BB7 lockall - setvar VAR_0x4097, 1 + setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 1 playse SE_KAIDAN special sub_80E9744 compare VAR_RESULT, 0 goto_if_eq EventScript_275BDB clearflag FLAG_DECORATION_0 special sub_80E9068 - setvar VAR_0x4089, 0 + setvar VAR_SECRET_BASE_INITIALIZED, 0 waitstate end EventScript_275BDB:: @ 8275BDB setflag FLAG_DECORATION_0 special sub_80E9068 - setvar VAR_0x4089, 0 + setvar VAR_SECRET_BASE_INITIALIZED, 0 waitstate end @@ -570,7 +570,7 @@ EventScript_275D0C:: @ 8275D0C setvar VAR_0x8004, 0 setvar VAR_0x8005, 0 special sub_80E933C - setvar VAR_0x4089, 1 + setvar VAR_SECRET_BASE_INITIALIZED, 1 end EventScript_275D1F:: @ 8275D1F -- cgit v1.2.3 From e77e7844ea6b6cdba1a6386f144aa712aea1807b Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Wed, 27 Feb 2019 20:25:09 -0500 Subject: Name several vars, document some related events --- data/scripts/cable_club.inc | 4 ++-- data/scripts/players_house.inc | 3 ++- data/scripts/tv.inc | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 7293cdad3..9cf435ade 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -197,7 +197,7 @@ RustboroCity_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B SlateportCity_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B SootopolisCity_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B VerdanturfTown_PokemonCenter_2F_MapScript2_276C3B: @ 8276C3B - map_script_2 VAR_0x40CD, 1, OldaleTown_PokemonCenter_2F_EventScript_276DE0 + map_script_2 VAR_CABLE_CLUB_TUTORIAL_STATE, 1, OldaleTown_PokemonCenter_2F_EventScript_276DE0 map_script_2 VAR_CABLE_CLUB_STATE, 1, OldaleTown_PokemonCenter_2F_EventScript_276C85 map_script_2 VAR_CABLE_CLUB_STATE, 2, OldaleTown_PokemonCenter_2F_EventScript_276C85 map_script_2 VAR_CABLE_CLUB_STATE, 5, OldaleTown_PokemonCenter_2F_EventScript_276C85 @@ -336,7 +336,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276DE0:: @ 8276DE0 waitmovement 0 delay 30 msgbox OldaleTown_PokemonCenter_2F_Text_279718, MSGBOX_DEFAULT - setvar VAR_0x40CD, 2 + setvar VAR_CABLE_CLUB_TUTORIAL_STATE, 2 releaseall end diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index 306157561..c4a5ffe86 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -510,7 +510,7 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 multichoice 22, 8, 108, 1 copyvar VAR_0x8004, VAR_RESULT special InitRoamer - copyvar VAR_0x40D5, VAR_RESULT + copyvar VAR_ROAMER_POKEMON, VAR_RESULT msgbox LittlerootTown_BrendansHouse_1F_Text_1F83A1, MSGBOX_DEFAULT closemessage setvar VAR_LITTLEROOT_HOUSES_STATE, 4 @@ -518,6 +518,7 @@ LittlerootTown_MaysHouse_1F_EventScript_292AF2:: @ 8292AF2 releaseall end +@ Never called. LittlerootTown_BrendansHouse_1F_EventScript_292C72:: @ 8292C72 setflag FLAG_SYS_TV_LATIAS_LATIOS return diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index acc75f76a..9f197515d 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -42,6 +42,9 @@ EventScript_27EE9A:: @ 827EE9A EventScript_27EEA4:: @ 827EEA4 msgbox LittlerootTown_BrendansHouse_1F_Text_1F826F, MSGBOX_DEFAULT + @ This is a junk call. Its input var (VAR_0x8004) hasn't been set, and + @ It's called again when Mom actually asks for the color, overwriting + @ whatever it does here. special InitRoamer clearflag FLAG_SYS_TV_LATIAS_LATIOS setflag FLAG_LATIOS_OR_LATIAS_ROAMING -- cgit v1.2.3 From a7e5852f1d95dd2b438e94fbf31b865196c6e951 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Fri, 1 Mar 2019 01:49:11 -0500 Subject: More minor fixes --- data/scripts/secret_base.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/secret_base.inc b/data/scripts/secret_base.inc index 95e9a2fc5..6302a33a8 100644 --- a/data/scripts/secret_base.inc +++ b/data/scripts/secret_base.inc @@ -430,7 +430,7 @@ EventScript_275B4D:: @ 8275B4D EventScript_275B5B:: @ 8275B5B closemessage playse SE_KAIDAN - setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 0 + setvar VAR_INIT_SECRET_BASE, 0 setflag FLAG_DECORATION_0 special sub_80E8E18 special sub_80E9068 @@ -444,7 +444,7 @@ EventScript_275B5B:: @ 8275B5B SecretBase_RedCave1_EventScript_275B81:: @ 8275B81 applymovement EVENT_OBJ_ID_PLAYER, SecretBase_RedCave1_Movement_275BB4 waitmovement 0 - setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 1 + setvar VAR_INIT_SECRET_BASE, 1 msgbox SecretBase_RedCave1_Text_23B759, MSGBOX_YESNO compare VAR_RESULT, 1 goto_if_eq SecretBase_RedCave1_EventScript_275BAB @@ -467,7 +467,7 @@ SecretBase_RedCave1_Movement_275BB4: @ 8275BB4 EventScript_275BB7:: @ 8275BB7 lockall - setvar VAR_SECRET_BASE_SHOULD_BE_INIT, 1 + setvar VAR_INIT_SECRET_BASE, 1 playse SE_KAIDAN special sub_80E9744 compare VAR_RESULT, 0 -- cgit v1.2.3 From 25050b99444538535a67ba51b7aaf3d0bf90c50e Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 04:13:27 -0500 Subject: Fix tabs, do suggested rename --- data/scripts/tv.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data/scripts') diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index 9f197515d..4a276ffc0 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -42,9 +42,9 @@ EventScript_27EE9A:: @ 827EE9A EventScript_27EEA4:: @ 827EEA4 msgbox LittlerootTown_BrendansHouse_1F_Text_1F826F, MSGBOX_DEFAULT - @ This is a junk call. Its input var (VAR_0x8004) hasn't been set, and - @ It's called again when Mom actually asks for the color, overwriting - @ whatever it does here. + @ This is a junk call. Its input var (VAR_0x8004) hasn't been set, and + @ It's called again when Mom actually asks for the color, overwriting + @ whatever it does here. special InitRoamer clearflag FLAG_SYS_TV_LATIAS_LATIOS setflag FLAG_LATIOS_OR_LATIAS_ROAMING -- cgit v1.2.3