Skip to content

Commit

Permalink
Remove Scott from the SS Tidal
Browse files Browse the repository at this point in the history
...which effectively removes access to the Battle Frontier.
- Also renaming some functions.
  • Loading branch information
tustin2121 committed May 19, 2019
1 parent 8f030cd commit e43cb56
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F173:: @ 825F173
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185
setvar VAR_0x8004, 3
special sub_813AA18
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
special sub_813AA44
switch VAR_RESULT
Expand Down Expand Up @@ -206,7 +206,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F37C:: @ 825F37C
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E
setvar VAR_0x8004, 4
special sub_813AA18
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
special sub_813AA44
switch VAR_RESULT
Expand Down Expand Up @@ -275,7 +275,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F49F:: @ 825F49F
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1
setvar VAR_0x8004, 5
special sub_813AA18
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
special sub_813AA44
switch VAR_RESULT
Expand Down Expand Up @@ -354,7 +354,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5F0:: @ 825F5F0
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602
setvar VAR_0x8004, 6
special sub_813AA18
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
special sub_813AA44
switch VAR_RESULT
Expand Down
8 changes: 4 additions & 4 deletions data/maps/BattleFrontier_Lounge7/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ BattleFrontier_Lounge7_EventScript_265284:: @ 8265284
setvar VAR_TEMP_E, 0
setvar VAR_0x8004, 9
setvar VAR_0x8006, 0
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
Expand All @@ -47,7 +47,7 @@ BattleFrontier_Lounge7_EventScript_26532F:: @ 826532F
setvar VAR_TEMP_E, 0
setvar VAR_0x8004, 9
setvar VAR_0x8006, 1
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
Expand Down Expand Up @@ -137,7 +137,7 @@ BattleFrontier_Lounge7_EventScript_265474:: @ 8265474
setvar VAR_TEMP_E, 1
setvar VAR_0x8004, 10
setvar VAR_0x8006, 0
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
Expand All @@ -161,7 +161,7 @@ BattleFrontier_Lounge7_EventScript_26551F:: @ 826551F
setvar VAR_TEMP_E, 1
setvar VAR_0x8004, 10
setvar VAR_0x8006, 1
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
switch VAR_RESULT
Expand Down
2 changes: 1 addition & 1 deletion data/maps/BattleFrontier_ReceptionGate/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ BattleFrontier_ReceptionGate_EventScript_266320:: @ 8266320
message BattleFrontier_ReceptionGate_Text_26689D
waitmessage
setvar VAR_0x8004, 8
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
switch VAR_RESULT
case 0, BattleFrontier_ReceptionGate_EventScript_2663AE
Expand Down
2 changes: 1 addition & 1 deletion data/maps/LilycoveCity_PokemonTrainerFanClub/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_21CE4D:: @ 821CE4D
message LilycoveCity_PokemonTrainerFanClub_Text_281C95
waitmessage
setvar VAR_0x8004, 2
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
setvar VAR_0x8004, 8
switch VAR_RESULT
Expand Down
2 changes: 1 addition & 1 deletion data/maps/Route113_GlassWorkshop/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Route113_GlassWorkshop_EventScript_26ED9D:: @ 826ED9D
Route113_GlassWorkshop_EventScript_26EDA7:: @ 826EDA7
setvar VAR_0x8009, 0
setvar VAR_0x8004, 1
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
switch VAR_RESULT
case 0, Route113_GlassWorkshop_EventScript_26EE1E
Expand Down
40 changes: 21 additions & 19 deletions data/maps/SSTidalCorridor/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,29 @@ SSTidalCorridor_EventScript_23C218:: @ 823C218
return

SSTidalCorridor_EventScript_23C219:: @ 823C219
lockall
applymovement 5, SSTidalCorridor_Movement_23C26D
waitmovement 0
applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
waitmovement 0
msgbox SSTidalCorridor_Text_23C28F, MSGBOX_DEFAULT
closemessage
applymovement EVENT_OBJ_ID_PLAYER, SSTidalCorridor_Movement_23C27D
applymovement 1, SSTidalCorridor_Movement_23C284
applymovement 5, SSTidalCorridor_Movement_23C275
waitmovement 0
playse SE_KAIDAN
waitse
removeobject 5
applymovement 1, SSTidalCorridor_Movement_23C28B
waitmovement 0
delay 30
setflag FLAG_MET_SCOTT_ON_SS_TIDAL
setvar VAR_SS_TIDAL_SCOTT_STATE, 1
releaseall
end
@ lockall
@ applymovement 5, SSTidalCorridor_Movement_23C26D
@ waitmovement 0
@ applymovement EVENT_OBJ_ID_PLAYER, Common_Movement_WalkInPlaceRight
@ waitmovement 0
@ msgbox SSTidalCorridor_Text_23C28F, MSGBOX_DEFAULT
@ closemessage
@ applymovement EVENT_OBJ_ID_PLAYER, SSTidalCorridor_Movement_23C27D
@ applymovement 1, SSTidalCorridor_Movement_23C284
@ applymovement 5, SSTidalCorridor_Movement_23C275
@ waitmovement 0
@ playse SE_KAIDAN
@ waitse
@ removeobject 5
@ applymovement 1, SSTidalCorridor_Movement_23C28B
@ waitmovement 0
@ delay 30
@ setflag FLAG_MET_SCOTT_ON_SS_TIDAL
@ setvar VAR_SS_TIDAL_SCOTT_STATE, 1
@ releaseall
@ end

SSTidalCorridor_Movement_23C26D: @ 823C26D
walk_left
Expand Down
2 changes: 1 addition & 1 deletion data/maps/SlateportCity/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ SlateportCity_EventScript_1DD3CA:: @ 81DD3CA
message SlateportCity_Text_1DEE67
waitmessage
setvar VAR_0x8004, 7
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
switch VAR_RESULT
case 0, SlateportCity_EventScript_1DD46E
Expand Down
2 changes: 1 addition & 1 deletion data/maps/SlateportCity_Harbor/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ SlateportCity_Harbor_EventScript_20CB06:: @ 820CB06
end

SlateportCity_Harbor_EventScript_20CB1A:: @ 820CB1A
goto_if_set FLAG_MET_SCOTT_ON_SS_TIDAL, SlateportCity_Harbor_EventScript_20CB50
@goto_if_set FLAG_MET_SCOTT_ON_SS_TIDAL, SlateportCity_Harbor_EventScript_20CB50
multichoicedefault 18, 8, 56, 2, 0
switch VAR_RESULT
case 0, SlateportCity_Harbor_EventScript_20CB92
Expand Down
2 changes: 1 addition & 1 deletion data/maps/VerdanturfTown_BattleTentLobby/scripts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201B11:: @ 8201B11
message VerdanturfTown_BattleTentLobby_Text_24EF88
waitmessage
setvar VAR_0x8004, 12
special sub_813A128
special DisplaySpecialScriptChoiceList
waitstate
switch VAR_RESULT
case 0, VerdanturfTown_BattleTentLobby_EventScript_201B7E
Expand Down
2 changes: 1 addition & 1 deletion data/specials.inc
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ gSpecials:: @ 81DBA64
def_special sub_80F9134
def_special sub_80F9154
def_special sub_80B3028
def_special sub_813A128
def_special DisplaySpecialScriptChoiceList
def_special sub_813A630
def_special sub_813A080
def_special sub_81C6A94
Expand Down
2 changes: 1 addition & 1 deletion include/field_specials.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ bool32 ShouldDoRoxanneCall(void);
bool32 ShouldDoRivalRayquazaCall(void);
bool32 CountSSTidalStep(u16 delta);
u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y);
void sub_813A128(void);
void DisplaySpecialScriptChoiceList(void);
void sub_813A878(u8 a0);
u8 sub_813BADC(u8 a0);
bool8 sub_813B9C0(void);
Expand Down
14 changes: 7 additions & 7 deletions src/field_specials.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void sub_8139620(u8 taskId);
static void sub_8139AF4(u8 taskId);
static void sub_8139C2C(u16 a1, u8 a2);
static void sub_8139C80(u8 taskId);
static void sub_813A2DC(u8 taskId);
static void Task_ShowSpecialScriptChoiceList(u8 taskId);
static void sub_813AA60(u16 a0, u16 a1);
static void sub_813ACE8(u8 a0, u16 a1);
static void sub_813A42C(void);
Expand Down Expand Up @@ -2178,9 +2178,9 @@ void sub_813A080(void)
gSpecialVar_0x8006 = 12;
}

void sub_813A128(void)
void DisplaySpecialScriptChoiceList(void)
{
u8 taskId = CreateTask(sub_813A2DC, 8);
u8 taskId = CreateTask(Task_ShowSpecialScriptChoiceList, 8);
struct Task *task = &gTasks[taskId];
task->data[11] = gSpecialVar_0x8004;

Expand Down Expand Up @@ -2314,7 +2314,7 @@ void sub_813A128(void)
}
}

static const u8 *const gUnknown_085B2CF0[][16] = {
static const u8 *const sSpecialScriptChoiceLists[][16] = {
{
gText_Exit,
NULL,
Expand Down Expand Up @@ -2551,7 +2551,7 @@ static const u8 *const gUnknown_085B2CF0[][16] = {
}
};

static void sub_813A2DC(u8 taskId)
static void Task_ShowSpecialScriptChoiceList(u8 taskId)
{
u32 unk1;
u8 i, windowId;
Expand All @@ -2569,7 +2569,7 @@ static void sub_813A2DC(u8 taskId)

for (unk1 = 0, i = 0; i < task->data[1]; i++)
{
const u8 *text = gUnknown_085B2CF0[gSpecialVar_0x8004][i];
const u8 *text = sSpecialScriptChoiceLists[gSpecialVar_0x8004][i];
gUnknown_0203AB64[i].name = text;
gUnknown_0203AB64[i].id = i;
unk1 = display_text_and_get_width(text, unk1);
Expand Down Expand Up @@ -3216,7 +3216,7 @@ void sub_813ADD4(void)

for (i = 0; i < 6; i++)
{
AddTextPrinterParameterized5(task->data[13], 1, gUnknown_085B2CF0[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
AddTextPrinterParameterized5(task->data[13], 1, sSpecialScriptChoiceLists[gSpecialVar_0x8004][scrollOffset + i], 10, i * 16, TEXT_SPEED_FF, NULL, 0, 0);
}

AddTextPrinterParameterized(task->data[13], 1, gText_SelectorArrow, 0, selectedRow * 16, TEXT_SPEED_FF, NULL);
Expand Down
2 changes: 1 addition & 1 deletion src/script_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ static void sub_80E2578(void)
if (count == 7)
{
gSpecialVar_0x8004 = 11;
sub_813A128();
DisplaySpecialScriptChoiceList();
}
else
{
Expand Down

0 comments on commit e43cb56

Please sign in to comment.