Skip to content

Commit

Permalink
scr_seq: Disassemble dead goto commands
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsm committed Dec 13, 2023
1 parent 08eb935 commit 0e8e8f2
Show file tree
Hide file tree
Showing 41 changed files with 643 additions and 194 deletions.
5 changes: 4 additions & 1 deletion files/fielddata/script/scr_seq/scr_seq_0002.s
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ _013D:
goto_if_lt _013D
setvar VAR_SPECIAL_x8004, 0
goto _013D
.byte 0x16, 0x00, 0x41, 0x00, 0x00, 0x00

_0189:
goto _01D0

_018F:
compare VAR_SPECIAL_x8003, 65534
goto_if_ne _01D0
Expand Down
10 changes: 8 additions & 2 deletions files/fielddata/script/scr_seq/scr_seq_0008_D02R0102.s
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ scr_seq_D02R0102_000:
compare VAR_TEMP_x4000, 1
goto_if_ne _002E
goto _004F
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0028:
goto _004D

_002E:
compare VAR_TEMP_x4000, 2
goto_if_ne _0047
goto _008E
.byte 0x16, 0x00, 0x06, 0x00, 0x00, 0x00

_0041:
goto _004D

_0047:
goto _004D

Expand Down
23 changes: 17 additions & 6 deletions files/fielddata/script/scr_seq/scr_seq_0010_D02R0104.s
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,22 @@ scr_seq_D02R0104_000:
compare VAR_TEMP_x4000, 1
goto_if_ne _003B
goto _0060
.byte 0x16, 0x00, 0x23, 0x00, 0x00, 0x00

_0035:
goto _005E

_003B:
compare VAR_TEMP_x4000, 2
goto_if_ne _0054
goto _007D
.byte 0x16, 0x00
.byte 0x0a, 0x00, 0x00, 0x00

_004E:
goto _005E

_0054:
setvar VAR_UNK_40F6, 1
setflag FLAG_UNK_26E
_005E:
end

_0060:
Expand Down Expand Up @@ -57,13 +63,18 @@ scr_seq_D02R0104_005:
compare VAR_TEMP_x4000, 1
goto_if_ne _00C3
goto _0113
.byte 0x16, 0x00, 0x1f
.byte 0x00, 0x00, 0x00

_00BD:
goto _00E2

_00C3:
compare VAR_TEMP_x4000, 2
goto_if_ne _00DC
goto _012A
.byte 0x16, 0x00, 0x06, 0x00, 0x00, 0x00

_00D6:
goto _00E2

_00DC:
goto _00E2

Expand Down
5 changes: 4 additions & 1 deletion files/fielddata/script/scr_seq/scr_seq_0029_D23R0101.s
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ _004D:
compare VAR_SCENE_ROCKET_TAKEOVER, 4
goto_if_ne _0066
goto _008B
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0060:
goto _0085

_0066:
compare VAR_SCENE_ROCKET_TAKEOVER, 3
goto_if_ne _0081
Expand Down
26 changes: 20 additions & 6 deletions files/fielddata/script/scr_seq/scr_seq_0076_D32.s
Original file line number Diff line number Diff line change
Expand Up @@ -594,18 +594,26 @@ _0AB1:
compare VAR_SPECIAL_x8007, 0
goto_if_ne _0ACA
goto _04D1
.byte 0x16, 0x00, 0x38, 0x00, 0x00, 0x00

_0AC4:
goto _0B02

_0ACA:
compare VAR_SPECIAL_x8007, 1
goto_if_ne _0AE3
goto _0630
.byte 0x16, 0x00, 0x1f
.byte 0x00, 0x00, 0x00

_0ADD:
goto _0B02

_0AE3:
compare VAR_SPECIAL_x8007, 2
goto_if_ne _0AFC
goto _0762
.byte 0x16, 0x00, 0x06, 0x00, 0x00, 0x00

_0AF6:
goto _0B02

_0AFC:
goto _08C1

Expand Down Expand Up @@ -829,12 +837,18 @@ _0F76:
compare VAR_SPECIAL_x8007, 0
goto_if_ne _0F8F
goto _0BA4
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0F89:
goto scr_seq_D32_023

_0F8F:
compare VAR_SPECIAL_x8007, 1
goto_if_ne _0FA8
goto _0CFA
.byte 0x16, 0x00, 0x06, 0x00, 0x00, 0x00

_0FA2:
goto scr_seq_D32_023

_0FA8:
goto _0DEA

Expand Down
83 changes: 64 additions & 19 deletions files/fielddata/script/scr_seq/scr_seq_0089_D35R0102.s
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ scr_seq_D35R0102_000:
goto_if_ne _02C4
addvar VAR_TEMP_x4001, 1
goto _02D0
.byte 0x16, 0x00
.byte 0x0c, 0x00, 0x00, 0x00

_02BE:
goto _02D0

_02C4:
subvar VAR_TEMP_x4001, 1
goto _036C
Expand Down Expand Up @@ -313,7 +315,10 @@ scr_seq_D35R0102_005:
goto_if_ne _04F7
addvar VAR_TEMP_x4001, 1
goto _0503
.byte 0x16, 0x00, 0x0c, 0x00, 0x00, 0x00

_04F1:
goto _0503

_04F7:
subvar VAR_TEMP_x4001, 1
goto _05A9
Expand Down Expand Up @@ -475,7 +480,10 @@ scr_seq_D35R0102_006:
goto_if_ne _073B
addvar VAR_TEMP_x4001, 1
goto _0747
.byte 0x16, 0x00, 0x0c, 0x00, 0x00, 0x00

_0735:
goto _0747

_073B:
subvar VAR_TEMP_x4001, 1
goto _07ED
Expand Down Expand Up @@ -565,7 +573,10 @@ scr_seq_D35R0102_007:
goto_if_ne _08EC
addvar VAR_TEMP_x4001, 1
goto _08F8
.byte 0x16, 0x00, 0x0c, 0x00, 0x00, 0x00

_08E6:
goto _08F8

_08EC:
subvar VAR_TEMP_x4001, 1
goto _099E
Expand Down Expand Up @@ -654,7 +665,10 @@ scr_seq_D35R0102_008:
goto_if_ne _0A99
addvar VAR_TEMP_x4001, 1
goto _0AA5
.byte 0x16, 0x00, 0x0c, 0x00, 0x00, 0x00

_0A93:
goto _0AA5

_0A99:
subvar VAR_TEMP_x4001, 1
goto _0B4B
Expand Down Expand Up @@ -741,13 +755,19 @@ scr_seq_D35R0102_001:
goto_if_ne _0C2B
npc_msg msg_0112_D35R0102_00002
goto _0C4A
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0C25:
goto _0C4A

_0C2B:
compare VAR_UNK_40AD, 1
goto_if_ne _0C47
npc_msg msg_0112_D35R0102_00003
goto _0C4A
.byte 0x16, 0x00, 0x03, 0x00, 0x00, 0x00

_0C41:
goto _0C4A

_0C47:
npc_msg msg_0112_D35R0102_00004
_0C4A:
Expand All @@ -763,16 +783,22 @@ scr_seq_D35R0102_009:
goto_if_ne _0C74
npc_msg msg_0112_D35R0102_00002
goto _0C4A
.byte 0x16, 0x00
.byte 0x1f, 0x00, 0x00, 0x00

_0C6E:
goto _0C93

_0C74:
compare VAR_UNK_40AE, 1
goto_if_ne _0C90
npc_msg msg_0112_D35R0102_00003
goto _0C4A
.byte 0x16, 0x00, 0x03, 0x00, 0x00, 0x00

_0C8A:
goto _0C93

_0C90:
npc_msg msg_0112_D35R0102_00004
_0C93:
goto _0C4A

scr_seq_D35R0102_010:
Expand All @@ -782,15 +808,22 @@ scr_seq_D35R0102_010:
goto_if_ne _0CBB
npc_msg msg_0112_D35R0102_00002
goto _0C4A
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0CB5:
goto _0CDA

_0CBB:
compare VAR_UNK_40AF, 1
goto_if_ne _0CD7
npc_msg msg_0112_D35R0102_00003
goto _0C4A
.byte 0x16, 0x00, 0x03, 0x00, 0x00, 0x00

_0CD1:
goto _0CDA

_0CD7:
npc_msg msg_0112_D35R0102_00004
_0CDA:
goto _0C4A

scr_seq_D35R0102_011:
Expand All @@ -800,16 +833,22 @@ scr_seq_D35R0102_011:
goto_if_ne _0D02
npc_msg msg_0112_D35R0102_00002
goto _0C4A
.byte 0x16, 0x00, 0x1f, 0x00
.byte 0x00, 0x00

_0CFC:
goto _0D21

_0D02:
compare VAR_UNK_40B0, 1
goto_if_ne _0D1E
npc_msg msg_0112_D35R0102_00003
goto _0C4A
.byte 0x16, 0x00, 0x03, 0x00, 0x00, 0x00

_0D08:
goto _0D21

_0D1E:
npc_msg msg_0112_D35R0102_00004
_0D21:
goto _0C4A

scr_seq_D35R0102_012:
Expand All @@ -819,16 +858,22 @@ scr_seq_D35R0102_012:
goto_if_ne _0D49
npc_msg msg_0112_D35R0102_00002
goto _0C4A
.byte 0x16, 0x00, 0x1f, 0x00, 0x00, 0x00

_0D43:
goto _0D68

_0D49:
compare VAR_UNK_40B1, 1
goto_if_ne _0D65
npc_msg msg_0112_D35R0102_00003
goto _0C4A
.byte 0x16
.byte 0x00, 0x03, 0x00, 0x00, 0x00

_0D5F:
goto _0D68

_0D65:
npc_msg msg_0112_D35R0102_00004
_0D68:
goto _0C4A

scr_seq_D35R0102_002:
Expand Down
Loading

0 comments on commit 0e8e8f2

Please sign in to comment.