Sync some scrcmd with Diamond

This commit is contained in:
PikalaxALT 2021-11-02 10:45:21 -04:00
parent e8da304ab8
commit f25657b4d2
21 changed files with 236 additions and 222 deletions

View File

@ -153,52 +153,65 @@ _020FA558:
.byte 0xE3, 0x00, 0x01, 0x00, 0x00, 0x00, 0xE5, 0x00, 0x35, 0x00, 0x01, 0x00, 0x00, 0x00, 0xE6, 0x00
sNumScriptCmds:
.word 0x00000355
.public _020FAC94
_020FAC94:
.byte 0x03, 0x19, 0x0D, 0x06, 0x04, 0x0D, 0x1F, 0x02
.public _020FAC9C
_020FAC9C:
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00
.byte 0x01, 0x00, 0x00
.byte 0x00, 0x01, 0x00
.byte 0x00, 0x00, 0x01
.byte 0x01, 0x01, 0x00
.byte 0x00, 0x01, 0x01
.byte 0x01, 0x00, 0x01
.public _020FACB0
.balign 4, 0
_020FACB0:
.byte 0x14, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00
.byte 0x19, 0x00, 0x00, 0x00
.word SDK_OVERLAY_OVY_20_ID
.word SDK_OVERLAY_OVY_24_ID
.word SDK_OVERLAY_OVY_21_ID
.word SDK_OVERLAY_OVY_22_ID
.word SDK_OVERLAY_OVY_25_ID
.public _020FACC4
_020FACC4:
.byte 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07
.byte 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0x07
.public _020FACDC
_020FACDC:
.byte 0x00, 0x30, 0x08, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0xD0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x10, 0x04, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00
gScriptCmdTable:
.word ScrCmd_000
.word ScrCmd_001
.word ScrCmd_002
.word ScrCmd_003
.word ScrCmd_004
.word ScrCmd_005
.word ScrCmd_006
.word ScrCmd_007
.word ScrCmd_008
.word ScrCmd_009
.word ScrCmd_010
.word ScrCmd_011
.word ScrCmd_012
.word ScrCmd_013
.word ScrCmd_014
.word ScrCmd_015
.word ScrCmd_016
.word ScrCmd_017
.word ScrCmd_018
.word ScrCmd_019
.word ScrCmd_020
.word ScrCmd_021
.word ScrCmd_022
.word ScrCmd_023
.word ScrCmd_024
.word ScrCmd_025
.word ScrCmd_026
.word ScrCmd_027
.word ScrCmd_028
.word ScrCmd_029
.word ScrCmd_Nop
.word ScrCmd_Dummy
.word ScrCmd_End
.word ScrCmd_Wait
.word ScrCmd_LoadByte
.word ScrCmd_LoadWord
.word ScrCmd_LoadByteFromAddr
.word ScrCmd_WriteByteToAddr
.word ScrCmd_SetPtrByte
.word ScrCmd_CopyLocal
.word ScrCmd_CopyByte
.word ScrCmd_CompareLocalToLocal
.word ScrCmd_CompareLocalToValue
.word ScrCmd_CompareLocalToAddr
.word ScrCmd_CompareAddrToLocal
.word ScrCmd_CompareAddrToValue
.word ScrCmd_CompareAddrToAddr
.word ScrCmd_CompareVarToValue
.word ScrCmd_CompareVarToVar
.word ScrCmd_RunScript
.word ScrCmd_RunScriptWait
.word ScrCmd_RestartCurrentScript
.word ScrCmd_GoTo
.word ScrCmd_ObjectGoTo
.word ScrCmd_BgGoTo
.word ScrCmd_DirectionGoTo
.word ScrCmd_Call
.word ScrCmd_Return
.word ScrCmd_GoToIf
.word ScrCmd_CallIf
.word ScrCmd_030
.word ScrCmd_031
.word ScrCmd_032
@ -606,7 +619,7 @@ gScriptCmdTable:
.word ScrCmd_434
.word ScrCmd_435
.word ScrCmd_436
.word ScrCmd_437
.word ScrCmd_DebugWatch
.word ScrCmd_438
.word ScrCmd_439
.word ScrCmd_440
@ -655,7 +668,7 @@ gScriptCmdTable:
.word ScrCmd_483
.word ScrCmd_484
.word ScrCmd_485
.word ScrCmd_001
.word ScrCmd_Dummy
.word ScrCmd_487
.word ScrCmd_488
.word ScrCmd_489

View File

@ -27409,7 +27409,7 @@ _021F4A60:
_021F4A88:
mov r0, #0
mov r1, #4
bl sub_02005F50
bl GF_SndStartFadeOutBGM
b _021F4A98
_021F4A92:
mov r0, #2

View File

@ -19406,7 +19406,7 @@ ov112_021EF568: ; 0x021EF568
bl sub_0200FA24
mov r0, #0
mov r1, #0x10
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #2
add sp, #0xc
pop {pc}

View File

@ -83917,7 +83917,7 @@ _022603A6:
bl sub_020090E4
mov r0, #0
mov r1, #0x10
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldrb r0, [r5, #6]
add r0, r0, #1
strb r0, [r5, #6]
@ -85165,7 +85165,7 @@ _02260DAE:
_02260DD2:
mov r0, #0
mov r1, #0x10
bl sub_02005F50
bl GF_SndStartFadeOutBGM
_02260DDA:
ldrb r0, [r5, #6]
add r0, r0, #1

View File

@ -11245,7 +11245,7 @@ ov44_0222F830: ; 0x0222F830
bne _0222F878
mov r0, #0
mov r1, #0x1e
bl sub_02005F50
bl GF_SndStartFadeOutBGM
b _0222F894
_0222F878:
cmp r4, #0x10

View File

@ -4043,7 +4043,7 @@ ov45_0222BB60: ; 0x0222BB60
bne _0222BBA6
mov r0, #0
mov r1, #0x7f
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #1
strb r0, [r5, #0xe]
b _0222BBA6

View File

@ -3592,7 +3592,7 @@ _021E760C:
bne _021E76A0
add r0, r5, #0
mov r1, #6
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #0x2f
str r0, [r4, #0xc]
b _021E7CF8

View File

@ -200,7 +200,7 @@ _021E5A94:
strh r1, [r4, r0]
mov r0, #0
mov r1, #0x3c
bl sub_02005F50
bl GF_SndStartFadeOutBGM
#ifdef HEARTGOLD
mov r0, #0xfa ; HO-OH
#else
@ -283,7 +283,7 @@ _021E5B2A:
bl GX_EngineAToggleLayers
mov r0, #0
mov r1, #0x3c
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #5
str r0, [r5]
b _021E5C8E

View File

@ -77,7 +77,7 @@ ov62_021E5900: ; 0x021E5900
bl ov62_021E5A5C
mov r0, #0
mov r1, #0xa
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #1
pop {r4, pc}
nop

View File

@ -348,7 +348,7 @@ _021E5BC4:
bl sub_0200FA24
mov r0, #0
mov r1, #0x1a
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldr r0, [r4]
add r0, r0, #1
str r0, [r4]

View File

@ -13216,7 +13216,7 @@ _021EBAAA:
bl sub_0200FA24
mov r0, #0
mov r1, #0x5a
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldr r0, _021EBAF8 ; =0x000008DD
bl PlaySE
ldrb r0, [r4]
@ -14101,7 +14101,7 @@ _021EC1D0:
bl sub_0200FA24
mov r0, #0
mov r1, #0x1e
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldrb r0, [r4]
add r0, r0, #1
strb r0, [r4]
@ -22172,7 +22172,7 @@ _021F00BC:
_021F00C2:
mov r0, #0
mov r1, #0x18
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #0x18
str r0, [sp]
mov r0, #1
@ -38196,7 +38196,7 @@ _021F801E:
bl sub_0200FA24
mov r0, #0
mov r1, #0xc
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldrb r0, [r7]
add r0, r0, #1
strb r0, [r7]

View File

@ -8,29 +8,29 @@ _021D415C:
.text
thumb_func_start ScrCmd_000
ScrCmd_000: ; 0x02040890
thumb_func_start ScrCmd_Nop
ScrCmd_Nop: ; 0x02040890
mov r0, #0
bx lr
thumb_func_end ScrCmd_000
thumb_func_end ScrCmd_Nop
thumb_func_start ScrCmd_001
ScrCmd_001: ; 0x02040894
thumb_func_start ScrCmd_Dummy
ScrCmd_Dummy: ; 0x02040894
mov r0, #0
bx lr
thumb_func_end ScrCmd_001
thumb_func_end ScrCmd_Dummy
thumb_func_start ScrCmd_002
ScrCmd_002: ; 0x02040898
thumb_func_start ScrCmd_End
ScrCmd_End: ; 0x02040898
push {r3, lr}
bl StopScript
mov r0, #0
pop {r3, pc}
.balign 4, 0
thumb_func_end ScrCmd_002
thumb_func_end ScrCmd_End
thumb_func_start ScrCmd_003
ScrCmd_003: ; 0x020408A4
thumb_func_start ScrCmd_Wait
ScrCmd_Wait: ; 0x020408A4
push {r3, r4, r5, r6, r7, lr}
add r5, r0, #0
add r1, r5, #0
@ -45,18 +45,18 @@ ScrCmd_003: ; 0x020408A4
add r1, r4, #0
bl GetVarPointer
strh r7, [r0]
ldr r1, _020408D4 ; =sub_020408D8
ldr r1, _020408D4 ; =RunPauseTimer
add r0, r5, #0
str r4, [r5, #0x64]
bl SetupNativeScript
mov r0, #1
pop {r3, r4, r5, r6, r7, pc}
.balign 4, 0
_020408D4: .word sub_020408D8
thumb_func_end ScrCmd_003
_020408D4: .word RunPauseTimer
thumb_func_end ScrCmd_Wait
thumb_func_start sub_020408D8
sub_020408D8: ; 0x020408D8
thumb_func_start RunPauseTimer
RunPauseTimer: ; 0x020408D8
push {r3, lr}
add r1, r0, #0
ldr r1, [r1, #0x64]
@ -77,10 +77,10 @@ _020408FA:
mov r0, #0
pop {r3, pc}
.balign 4, 0
thumb_func_end sub_020408D8
thumb_func_end RunPauseTimer
thumb_func_start ScrCmd_437
ScrCmd_437: ; 0x02040900
thumb_func_start ScrCmd_DebugWatch
ScrCmd_DebugWatch: ; 0x02040900
push {r4, lr}
add r4, r0, #0
bl ScriptReadHalfword
@ -91,10 +91,10 @@ ScrCmd_437: ; 0x02040900
mov r0, #0
pop {r4, pc}
.balign 4, 0
thumb_func_end ScrCmd_437
thumb_func_end ScrCmd_DebugWatch
thumb_func_start ScrCmd_004
ScrCmd_004: ; 0x02040918
thumb_func_start ScrCmd_LoadByte
ScrCmd_LoadByte: ; 0x02040918
ldr r1, [r0, #8]
add r2, r1, #1
str r2, [r0, #8]
@ -107,10 +107,10 @@ ScrCmd_004: ; 0x02040918
str r2, [r0, #0x64]
mov r0, #0
bx lr
thumb_func_end ScrCmd_004
thumb_func_end ScrCmd_LoadByte
thumb_func_start ScrCmd_005
ScrCmd_005: ; 0x02040930
thumb_func_start ScrCmd_LoadWord
ScrCmd_LoadWord: ; 0x02040930
push {r3, r4, r5, lr}
add r4, r0, #0
ldr r2, [r4, #8]
@ -124,10 +124,10 @@ ScrCmd_005: ; 0x02040930
mov r0, #0
pop {r3, r4, r5, pc}
.balign 4, 0
thumb_func_end ScrCmd_005
thumb_func_end ScrCmd_LoadWord
thumb_func_start ScrCmd_006
ScrCmd_006: ; 0x0204094C
thumb_func_start ScrCmd_LoadByteFromAddr
ScrCmd_LoadByteFromAddr: ; 0x0204094C
push {r3, r4, r5, lr}
add r5, r0, #0
ldr r2, [r5, #8]
@ -141,10 +141,10 @@ ScrCmd_006: ; 0x0204094C
str r1, [r0, #0x64]
mov r0, #0
pop {r3, r4, r5, pc}
thumb_func_end ScrCmd_006
thumb_func_end ScrCmd_LoadByteFromAddr
thumb_func_start ScrCmd_007
ScrCmd_007: ; 0x02040968
thumb_func_start ScrCmd_WriteByteToAddr
ScrCmd_WriteByteToAddr: ; 0x02040968
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -156,10 +156,10 @@ ScrCmd_007: ; 0x02040968
mov r0, #0
pop {r4, pc}
.balign 4, 0
thumb_func_end ScrCmd_007
thumb_func_end ScrCmd_WriteByteToAddr
thumb_func_start ScrCmd_008
ScrCmd_008: ; 0x02040980
thumb_func_start ScrCmd_SetPtrByte
ScrCmd_SetPtrByte: ; 0x02040980
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -173,10 +173,10 @@ ScrCmd_008: ; 0x02040980
strb r1, [r0]
mov r0, #0
pop {r4, pc}
thumb_func_end ScrCmd_008
thumb_func_end ScrCmd_SetPtrByte
thumb_func_start ScrCmd_009
ScrCmd_009: ; 0x0204099C
thumb_func_start ScrCmd_CopyLocal
ScrCmd_CopyLocal: ; 0x0204099C
ldr r1, [r0, #8]
add r2, r1, #1
str r2, [r0, #8]
@ -193,10 +193,10 @@ ScrCmd_009: ; 0x0204099C
mov r0, #0
bx lr
.balign 4, 0
thumb_func_end ScrCmd_009
thumb_func_end ScrCmd_CopyLocal
thumb_func_start ScrCmd_010
ScrCmd_010: ; 0x020409BC
thumb_func_start ScrCmd_CopyByte
ScrCmd_CopyByte: ; 0x020409BC
push {r3, r4, r5, lr}
add r5, r0, #0
bl ScriptReadWord
@ -207,10 +207,10 @@ ScrCmd_010: ; 0x020409BC
strb r0, [r4]
mov r0, #0
pop {r3, r4, r5, pc}
thumb_func_end ScrCmd_010
thumb_func_end ScrCmd_CopyByte
thumb_func_start sub_020409D4
sub_020409D4: ; 0x020409D4
thumb_func_start Compare
Compare: ; 0x020409D4
cmp r0, r1
bhs _020409DC
mov r0, #0
@ -223,10 +223,10 @@ _020409DC:
_020409E4:
mov r0, #2
bx lr
thumb_func_end sub_020409D4
thumb_func_end Compare
thumb_func_start ScrCmd_011
ScrCmd_011: ; 0x020409E8
thumb_func_start ScrCmd_CompareLocalToLocal
ScrCmd_CompareLocalToLocal: ; 0x020409E8
push {r4, lr}
add r4, r0, #0
ldr r0, [r4, #8]
@ -246,14 +246,14 @@ ScrCmd_011: ; 0x020409E8
ldr r1, [r1, #0x64]
lsl r1, r1, #0x18
lsr r1, r1, #0x18
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r4, pc}
thumb_func_end ScrCmd_011
thumb_func_end ScrCmd_CompareLocalToLocal
thumb_func_start ScrCmd_012
ScrCmd_012: ; 0x02040A18
thumb_func_start ScrCmd_CompareLocalToValue
ScrCmd_CompareLocalToValue: ; 0x02040A18
push {r4, lr}
add r4, r0, #0
ldr r0, [r4, #8]
@ -268,15 +268,15 @@ ScrCmd_012: ; 0x02040A18
ldrb r1, [r1]
lsl r0, r0, #0x18
lsr r0, r0, #0x18
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r4, pc}
.balign 4, 0
thumb_func_end ScrCmd_012
thumb_func_end ScrCmd_CompareLocalToValue
thumb_func_start ScrCmd_013
ScrCmd_013: ; 0x02040A40
thumb_func_start ScrCmd_CompareLocalToAddr
ScrCmd_CompareLocalToAddr: ; 0x02040A40
push {r3, r4, r5, lr}
add r4, r0, #0
ldr r2, [r4, #8]
@ -291,14 +291,14 @@ ScrCmd_013: ; 0x02040A40
bl ScriptReadWord
ldrb r1, [r0]
add r0, r5, #0
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r3, r4, r5, pc}
thumb_func_end ScrCmd_013
thumb_func_end ScrCmd_CompareLocalToAddr
thumb_func_start ScrCmd_014
ScrCmd_014: ; 0x02040A68
thumb_func_start ScrCmd_CompareAddrToLocal
ScrCmd_CompareAddrToLocal: ; 0x02040A68
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -312,15 +312,15 @@ ScrCmd_014: ; 0x02040A68
ldr r1, [r1, #0x64]
lsl r1, r1, #0x18
lsr r1, r1, #0x18
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r4, pc}
.balign 4, 0
thumb_func_end ScrCmd_014
thumb_func_end ScrCmd_CompareAddrToLocal
thumb_func_start ScrCmd_015
ScrCmd_015: ; 0x02040A90
thumb_func_start ScrCmd_CompareAddrToValue
ScrCmd_CompareAddrToValue: ; 0x02040A90
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -329,14 +329,14 @@ ScrCmd_015: ; 0x02040A90
add r1, r2, #1
str r1, [r4, #8]
ldrb r1, [r2]
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r4, pc}
thumb_func_end ScrCmd_015
thumb_func_end ScrCmd_CompareAddrToValue
thumb_func_start ScrCmd_016
ScrCmd_016: ; 0x02040AAC
thumb_func_start ScrCmd_CompareAddrToAddr
ScrCmd_CompareAddrToAddr: ; 0x02040AAC
push {r3, r4, r5, lr}
add r5, r0, #0
bl ScriptReadWord
@ -345,15 +345,15 @@ ScrCmd_016: ; 0x02040AAC
bl ScriptReadWord
ldrb r1, [r0]
add r0, r4, #0
bl sub_020409D4
bl Compare
strb r0, [r5, #2]
mov r0, #0
pop {r3, r4, r5, pc}
.balign 4, 0
thumb_func_end ScrCmd_016
thumb_func_end ScrCmd_CompareAddrToAddr
thumb_func_start ScrCmd_017
ScrCmd_017: ; 0x02040ACC
thumb_func_start ScrCmd_CompareVarToValue
ScrCmd_CompareVarToValue: ; 0x02040ACC
push {r3, r4, r5, lr}
add r4, r0, #0
bl ScriptReadHalfword
@ -367,15 +367,15 @@ ScrCmd_017: ; 0x02040ACC
bl ScriptReadHalfword
add r1, r0, #0
add r0, r5, #0
bl sub_020409D4
bl Compare
strb r0, [r4, #2]
mov r0, #0
pop {r3, r4, r5, pc}
.balign 4, 0
thumb_func_end ScrCmd_017
thumb_func_end ScrCmd_CompareVarToValue
thumb_func_start ScrCmd_018
ScrCmd_018: ; 0x02040AF8
thumb_func_start ScrCmd_CompareVarToVar
ScrCmd_CompareVarToVar: ; 0x02040AF8
push {r3, r4, r5, lr}
add r5, r0, #0
bl ScriptReadHalfword
@ -395,14 +395,14 @@ ScrCmd_018: ; 0x02040AF8
add r1, r0, #0
ldrh r0, [r4]
ldrh r1, [r1]
bl sub_020409D4
bl Compare
strb r0, [r5, #2]
mov r0, #0
pop {r3, r4, r5, pc}
thumb_func_end ScrCmd_018
thumb_func_end ScrCmd_CompareVarToVar
thumb_func_start ScrCmd_019
ScrCmd_019: ; 0x02040B30
thumb_func_start ScrCmd_RunScript
ScrCmd_RunScript: ; 0x02040B30
push {r3, r4, r5, r6, r7, lr}
add r7, r0, #0
add r0, #0x80
@ -427,10 +427,10 @@ ScrCmd_019: ; 0x02040B30
mov r0, #1
pop {r3, r4, r5, r6, r7, pc}
.balign 4, 0
thumb_func_end ScrCmd_019
thumb_func_end ScrCmd_RunScript
thumb_func_start ScrCmd_020
ScrCmd_020: ; 0x02040B68
thumb_func_start ScrCmd_RunScriptWait
ScrCmd_RunScriptWait: ; 0x02040B68
push {r3, r4, r5, r6, r7, lr}
add r6, r0, #0
add r0, #0x80
@ -474,7 +474,7 @@ ScrCmd_020: ; 0x02040B68
pop {r3, r4, r5, r6, r7, pc}
nop
_02040BC8: .word sub_02040BCC
thumb_func_end ScrCmd_020
thumb_func_end ScrCmd_RunScriptWait
thumb_func_start sub_02040BCC
sub_02040BCC: ; 0x02040BCC
@ -503,8 +503,8 @@ _02040BF8:
.balign 4, 0
thumb_func_end sub_02040BCC
thumb_func_start ScrCmd_021
ScrCmd_021: ; 0x02040BFC
thumb_func_start ScrCmd_RestartCurrentScript
ScrCmd_RestartCurrentScript: ; 0x02040BFC
push {r4, r5, r6, lr}
add r5, r0, #0
add r0, #0x80
@ -527,10 +527,10 @@ ScrCmd_021: ; 0x02040BFC
mov r0, #0
pop {r4, r5, r6, pc}
.balign 4, 0
thumb_func_end ScrCmd_021
thumb_func_end ScrCmd_RestartCurrentScript
thumb_func_start ScrCmd_022
ScrCmd_022: ; 0x02040C2C
thumb_func_start ScrCmd_GoTo
ScrCmd_GoTo: ; 0x02040C2C
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -541,10 +541,10 @@ ScrCmd_022: ; 0x02040C2C
bl ScriptJump
mov r0, #0
pop {r4, pc}
thumb_func_end ScrCmd_022
thumb_func_end ScrCmd_GoTo
thumb_func_start ScrCmd_023
ScrCmd_023: ; 0x02040C44
thumb_func_start ScrCmd_ObjectGoTo
ScrCmd_ObjectGoTo: ; 0x02040C44
push {r3, r4, r5, r6, r7, lr}
add r5, r0, #0
add r0, #0x80
@ -570,10 +570,10 @@ ScrCmd_023: ; 0x02040C44
_02040C78:
mov r0, #0
pop {r3, r4, r5, r6, r7, pc}
thumb_func_end ScrCmd_023
thumb_func_end ScrCmd_ObjectGoTo
thumb_func_start ScrCmd_024
ScrCmd_024: ; 0x02040C7C
thumb_func_start ScrCmd_BgGoTo
ScrCmd_BgGoTo: ; 0x02040C7C
push {r4, r5, r6, lr}
add r5, r0, #0
ldr r0, [r5, #0x74]
@ -596,10 +596,10 @@ _02040CA6:
mov r0, #0
pop {r4, r5, r6, pc}
.balign 4, 0
thumb_func_end ScrCmd_024
thumb_func_end ScrCmd_BgGoTo
thumb_func_start ScrCmd_025
ScrCmd_025: ; 0x02040CAC
thumb_func_start ScrCmd_DirectionGoTo
ScrCmd_DirectionGoTo: ; 0x02040CAC
push {r4, r5, r6, lr}
add r5, r0, #0
add r0, #0x80
@ -624,10 +624,10 @@ ScrCmd_025: ; 0x02040CAC
_02040CDC:
mov r0, #0
pop {r4, r5, r6, pc}
thumb_func_end ScrCmd_025
thumb_func_end ScrCmd_DirectionGoTo
thumb_func_start ScrCmd_026
ScrCmd_026: ; 0x02040CE0
thumb_func_start ScrCmd_Call
ScrCmd_Call: ; 0x02040CE0
push {r4, lr}
add r4, r0, #0
bl ScriptReadWord
@ -638,19 +638,19 @@ ScrCmd_026: ; 0x02040CE0
bl ScriptCall
mov r0, #0
pop {r4, pc}
thumb_func_end ScrCmd_026
thumb_func_end ScrCmd_Call
thumb_func_start ScrCmd_027
ScrCmd_027: ; 0x02040CF8
thumb_func_start ScrCmd_Return
ScrCmd_Return: ; 0x02040CF8
push {r3, lr}
bl ScriptReturn
mov r0, #0
pop {r3, pc}
.balign 4, 0
thumb_func_end ScrCmd_027
thumb_func_end ScrCmd_Return
thumb_func_start ScrCmd_028
ScrCmd_028: ; 0x02040D04
thumb_func_start ScrCmd_GoToIf
ScrCmd_GoToIf: ; 0x02040D04
push {r3, r4, r5, lr}
add r5, r0, #0
ldr r2, [r5, #8]
@ -661,7 +661,7 @@ ScrCmd_028: ; 0x02040D04
add r1, r0, #0
lsl r0, r4, #1
add r3, r4, r0
ldr r0, _02040D34 ; =0x020FAC9C
ldr r0, _02040D34 ; =_020FAC9C
ldrb r2, [r5, #2]
add r0, r0, r3
ldrb r0, [r2, r0]
@ -675,11 +675,11 @@ _02040D30:
mov r0, #0
pop {r3, r4, r5, pc}
.balign 4, 0
_02040D34: .word 0x020FAC9C
thumb_func_end ScrCmd_028
_02040D34: .word _020FAC9C
thumb_func_end ScrCmd_GoToIf
thumb_func_start ScrCmd_029
ScrCmd_029: ; 0x02040D38
thumb_func_start ScrCmd_CallIf
ScrCmd_CallIf: ; 0x02040D38
push {r3, r4, r5, lr}
add r5, r0, #0
ldr r2, [r5, #8]
@ -690,7 +690,7 @@ ScrCmd_029: ; 0x02040D38
add r1, r0, #0
lsl r0, r4, #1
add r3, r4, r0
ldr r0, _02040D68 ; =0x020FAC9C
ldr r0, _02040D68 ; =_020FAC9C
ldrb r2, [r5, #2]
add r0, r0, r3
ldrb r0, [r2, r0]
@ -704,8 +704,8 @@ _02040D64:
mov r0, #0
pop {r3, r4, r5, pc}
.balign 4, 0
_02040D68: .word 0x020FAC9C
thumb_func_end ScrCmd_029
_02040D68: .word _020FAC9C
thumb_func_end ScrCmd_CallIf
thumb_func_start ScrCmd_030
ScrCmd_030: ; 0x02040D6C
@ -1936,7 +1936,7 @@ ScrCmd_063: ; 0x02041684
mov r0, #4
str r0, [sp]
ldr r0, [r4, #8]
ldr r1, _020416DC ; =0x020FAC94
ldr r1, _020416DC ; =_020FAC94
ldr r2, _020416D8 ; =0x000003D9
mov r3, #0xb
bl Std_CreateYesNoMenu
@ -1950,7 +1950,7 @@ ScrCmd_063: ; 0x02041684
pop {r3, r4, r5, r6, r7, pc}
nop
_020416D8: .word 0x000003D9
_020416DC: .word 0x020FAC94
_020416DC: .word _020FAC94
_020416E0: .word sub_020416E4
thumb_func_end ScrCmd_063
@ -10537,7 +10537,7 @@ ScrCmd_519: ; 0x020459AC
bl GetPartyCount
add r2, sp, #0x18
mov r4, #0
ldr r3, _02045A5C ; =0x020FACC4
ldr r3, _02045A5C ; =_020FACC4
str r0, [sp, #8]
add r7, r2, #0
ldmia r3!, {r0, r1}
@ -10607,7 +10607,7 @@ _02045A50:
add sp, #0x30
pop {r3, r4, r5, r6, r7, pc}
.balign 4, 0
_02045A5C: .word 0x020FACC4
_02045A5C: .word _020FACC4
thumb_func_end ScrCmd_519
thumb_func_start ScrCmd_520
@ -13794,7 +13794,7 @@ ScrCmd_621: ; 0x02047358
sub sp, #0x28
add r0, #0x80
ldr r4, [r0]
ldr r5, _020473D4 ; =0x020FACDC
ldr r5, _020473D4 ; =_020FACDC
add r3, sp, #4
mov r2, #4
_02047366:
@ -13854,7 +13854,7 @@ _020473CC:
add sp, #0x28
pop {r3, r4, r5, r6, r7, pc}
nop
_020473D4: .word 0x020FACDC
_020473D4: .word _020FACDC
thumb_func_end ScrCmd_621
thumb_func_start ScrCmd_622
@ -15065,14 +15065,14 @@ ScrCmd_784: ; 0x02047C80
_02047C98:
cmp r0, #0
bne _02047CAA
ldr r0, _02047CB8 ; =0x020FACB0
ldr r0, _02047CB8 ; =_020FACB0
lsl r1, r2, #2
ldr r0, [r0, r1]
mov r1, #2
bl HandleLoadOverlay
b _02047CB4
_02047CAA:
ldr r0, _02047CB8 ; =0x020FACB0
ldr r0, _02047CB8 ; =_020FACB0
lsl r1, r2, #2
ldr r0, [r0, r1]
bl UnloadOverlayByID
@ -15080,7 +15080,7 @@ _02047CB4:
mov r0, #0
pop {r3, pc}
.balign 4, 0
_02047CB8: .word 0x020FACB0
_02047CB8: .word _020FACB0
thumb_func_end ScrCmd_784
thumb_func_start ScrCmd_794

View File

@ -82,7 +82,7 @@ ScrCmd_084: ; 0x02049188
bl ScriptReadHalfword
add r1, r0, #0
add r0, r4, #0
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldr r1, _020491AC ; =sub_020491B0
add r0, r5, #0
bl SetupNativeScript

View File

@ -1,3 +1,4 @@
#include "constants/sndseq.h"
.include "asm/macros.inc"
.include "global.inc"
@ -135,7 +136,7 @@ sub_02001BE0: ; 0x02001BE0
add r3, r2, #0
tst r3, r5
beq _02001C06
ldr r0, _02001C90 ; =0x000005DC
ldr r0, _02001C90 ; =SEQ_SE_DP_SELECT
bl PlaySE
ldrb r0, [r4, #0x15]
ldr r1, [r4]
@ -147,7 +148,7 @@ _02001C06:
ldr r3, [r4, #0x10]
tst r3, r2
beq _02001C16
ldr r0, _02001C90 ; =0x000005DC
ldr r0, _02001C90 ; =SEQ_SE_DP_SELECT
bl PlaySE
sub r0, r5, #3
pop {r3, r4, r5, pc}
@ -155,7 +156,7 @@ _02001C16:
mov r3, #0x40
tst r3, r2
beq _02001C30
ldr r2, _02001C90 ; =0x000005DC
ldr r2, _02001C90 ; =SEQ_SE_DP_SELECT
bl sub_02001C98
cmp r0, #1
bne _02001C2A
@ -169,7 +170,7 @@ _02001C30:
mov r1, #0x80
tst r1, r2
beq _02001C4C
ldr r2, _02001C90 ; =0x000005DC
ldr r2, _02001C90 ; =SEQ_SE_DP_SELECT
add r1, r5, #0
bl sub_02001C98
cmp r0, #1
@ -184,7 +185,7 @@ _02001C4C:
mov r1, #0x20
tst r1, r2
beq _02001C68
ldr r2, _02001C90 ; =0x000005DC
ldr r2, _02001C90 ; =SEQ_SE_DP_SELECT
mov r1, #2
bl sub_02001C98
cmp r0, #1
@ -199,7 +200,7 @@ _02001C68:
mov r1, #0x10
tst r2, r1
beq _02001C84
ldr r2, _02001C90 ; =0x000005DC
ldr r2, _02001C90 ; =SEQ_SE_DP_SELECT
mov r1, #3
bl sub_02001C98
cmp r0, #1
@ -216,7 +217,7 @@ _02001C84:
pop {r3, r4, r5, pc}
nop
_02001C8C: .word gMain
_02001C90: .word 0x000005DC
_02001C90: .word SEQ_SE_DP_SELECT
thumb_func_end sub_02001BE0
thumb_func_start sub_02001C94

View File

@ -2342,7 +2342,7 @@ sub_02005AB0: ; 0x02005AB0
add r4, r0, #0
mov r0, #0
add r1, r6, #0
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #0
bl sub_02004A60
add r0, r5, #0

View File

@ -280,8 +280,8 @@ _02005F4C:
.balign 4, 0
thumb_func_end GF_SndStartFadeInBGM
thumb_func_start sub_02005F50
sub_02005F50: ; 0x02005F50
thumb_func_start GF_SndStartFadeOutBGM
GF_SndStartFadeOutBGM: ; 0x02005F50
push {r4, r5, r6, lr}
add r5, r0, #0
add r4, r1, #0
@ -305,7 +305,7 @@ _02005F80:
bl GF_SndSetState
_02005F86:
pop {r4, r5, r6, pc}
thumb_func_end sub_02005F50
thumb_func_end GF_SndStartFadeOutBGM
thumb_func_start GF_SndGetFadeTimer
GF_SndGetFadeTimer: ; 0x02005F88

View File

@ -380,7 +380,7 @@ _0205288C:
_020528CE:
mov r0, #0
mov r1, #0x14
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldr r0, [r4]
add r0, r0, #1
str r0, [r4]

View File

@ -59,7 +59,7 @@ _020529BE:
_020529DE:
mov r0, #0
mov r1, #0x14
bl sub_02005F50
bl GF_SndStartFadeOutBGM
ldr r0, [r4]
add r0, r0, #1
str r0, [r4]

View File

@ -406,7 +406,7 @@ sub_020550E4: ; 0x020550E4
beq _0205510C
mov r0, #0
mov r1, #0x28
bl sub_02005F50
bl GF_SndStartFadeOutBGM
_0205510C:
pop {r4, r5, r6, pc}
.balign 4, 0

View File

@ -14351,7 +14351,7 @@ _02097902:
bl sub_0200FA24
mov r0, #0
mov r1, #6
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #1
strb r0, [r4]
b _020979A2
@ -14589,7 +14589,7 @@ _02097AD2:
bl sub_0200FA24
mov r0, #0
mov r1, #6
bl sub_02005F50
bl GF_SndStartFadeOutBGM
mov r0, #1
strb r0, [r4]
b _02097B72

View File

@ -25103,7 +25103,7 @@
.public sub_02005E44
.public sub_02005EB4
.public GF_SndStartFadeInBGM
.public sub_02005F50
.public GF_SndStartFadeOutBGM
.public GF_SndGetFadeTimer
.public sub_02005F94
.public sub_02005FA0
@ -27246,37 +27246,37 @@
.public sub_02040614
.public sub_02040750
.public sub_020407AC
.public ScrCmd_000
.public ScrCmd_001
.public ScrCmd_002
.public ScrCmd_003
.public ScrCmd_437
.public ScrCmd_004
.public ScrCmd_005
.public ScrCmd_006
.public ScrCmd_007
.public ScrCmd_008
.public ScrCmd_009
.public ScrCmd_010
.public ScrCmd_011
.public ScrCmd_012
.public ScrCmd_013
.public ScrCmd_014
.public ScrCmd_015
.public ScrCmd_016
.public ScrCmd_017
.public ScrCmd_018
.public ScrCmd_019
.public ScrCmd_020
.public ScrCmd_021
.public ScrCmd_022
.public ScrCmd_023
.public ScrCmd_024
.public ScrCmd_025
.public ScrCmd_026
.public ScrCmd_027
.public ScrCmd_028
.public ScrCmd_029
.public ScrCmd_Nop
.public ScrCmd_Dummy
.public ScrCmd_End
.public ScrCmd_Wait
.public ScrCmd_DebugWatch
.public ScrCmd_LoadByte
.public ScrCmd_LoadWord
.public ScrCmd_LoadByteFromAddr
.public ScrCmd_WriteByteToAddr
.public ScrCmd_SetPtrByte
.public ScrCmd_CopyLocal
.public ScrCmd_CopyByte
.public ScrCmd_CompareLocalToLocal
.public ScrCmd_CompareLocalToValue
.public ScrCmd_CompareLocalToAddr
.public ScrCmd_CompareAddrToLocal
.public ScrCmd_CompareAddrToValue
.public ScrCmd_CompareAddrToAddr
.public ScrCmd_CompareVarToValue
.public ScrCmd_CompareVarToVar
.public ScrCmd_RunScript
.public ScrCmd_RunScriptWait
.public ScrCmd_RestartCurrentScript
.public ScrCmd_GoTo
.public ScrCmd_ObjectGoTo
.public ScrCmd_BgGoTo
.public ScrCmd_DirectionGoTo
.public ScrCmd_Call
.public ScrCmd_Return
.public ScrCmd_GoToIf
.public ScrCmd_CallIf
.public ScrCmd_030
.public ScrCmd_031
.public ScrCmd_032