through ScrCmd_fadeinbgm
This commit is contained in:
+2
-2
@@ -745,9 +745,9 @@ _080BD5F8:
|
||||
cmp r0, 0
|
||||
beq _080BD618
|
||||
adds r0, r4, 0
|
||||
bl sub_8055E78
|
||||
bl Overworld_SetSavedMusic
|
||||
adds r0, r4, 0
|
||||
bl sub_8055F48
|
||||
bl Overworld_ChangeMusicTo
|
||||
_080BD618:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
|
||||
@@ -2195,7 +2195,7 @@ mapheader_run_first_tag2_script_list_match_conditionally: @ 806D964
|
||||
adds r1, r5, 0
|
||||
adds r2, r7, 0
|
||||
bl sub_806DC54
|
||||
bl sub_807E438
|
||||
bl DoWarp
|
||||
movs r0, 0x1
|
||||
b _0806DA02
|
||||
.align 2, 0
|
||||
@@ -2331,7 +2331,7 @@ _0806DAC4:
|
||||
lsrs r0, 24
|
||||
cmp r0, 0x1
|
||||
bne _0806DAE4
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
ldr r0, _0806DAE0 @ =gUnknown_81C1361
|
||||
bl ScriptContext1_SetupScript
|
||||
movs r0, 0x1
|
||||
@@ -2339,7 +2339,7 @@ _0806DAC4:
|
||||
.align 2, 0
|
||||
_0806DAE0: .4byte gUnknown_81C1361
|
||||
_0806DAE4:
|
||||
bl sub_807E438
|
||||
bl DoWarp
|
||||
movs r0, 0x1
|
||||
b _0806DAEE
|
||||
_0806DAEC:
|
||||
@@ -2638,7 +2638,7 @@ map_warp_consider_2_to_inside: @ 806DCD0
|
||||
adds r1, r4, 0
|
||||
adds r2, r6, 0
|
||||
bl sub_806DC54
|
||||
bl sub_807E4DC
|
||||
bl DoDoorWarp
|
||||
movs r0, 0x1
|
||||
b _0806DD32
|
||||
.align 2, 0
|
||||
@@ -2990,7 +2990,7 @@ _0806DF98:
|
||||
cmp r0, 0
|
||||
beq _0806DFB0
|
||||
bl sub_8055A08
|
||||
bl sp13E_warp_to_last_warp
|
||||
bl DoDiveWarp
|
||||
movs r0, 0xE2
|
||||
bl PlaySE
|
||||
movs r0, 0x1
|
||||
|
||||
+1
-1
@@ -6955,7 +6955,7 @@ sub_8086944: @ 8086944
|
||||
cmp r0, 0
|
||||
beq _08086978
|
||||
adds r0, r4, 0
|
||||
bl sub_8055F48
|
||||
bl Overworld_ChangeMusicTo
|
||||
_08086978:
|
||||
movs r0, 0
|
||||
pop {r4}
|
||||
|
||||
+13
-13
@@ -1153,8 +1153,8 @@ _0807E434:
|
||||
bx r1
|
||||
thumb_func_end sub_807E418
|
||||
|
||||
thumb_func_start sub_807E438
|
||||
sub_807E438: @ 807E438
|
||||
thumb_func_start DoWarp
|
||||
DoWarp: @ 807E438
|
||||
push {lr}
|
||||
bl ScriptContext2_Enable
|
||||
bl sub_8055F88
|
||||
@@ -1174,10 +1174,10 @@ sub_807E438: @ 807E438
|
||||
_0807E464: .4byte gUnknown_3005020
|
||||
_0807E468: .4byte sub_807DF64
|
||||
_0807E46C: .4byte sub_807E718
|
||||
thumb_func_end sub_807E438
|
||||
thumb_func_end DoWarp
|
||||
|
||||
thumb_func_start sp13E_warp_to_last_warp
|
||||
sp13E_warp_to_last_warp: @ 807E470
|
||||
thumb_func_start DoDiveWarp
|
||||
DoDiveWarp: @ 807E470
|
||||
push {lr}
|
||||
bl ScriptContext2_Enable
|
||||
bl sub_8055F88
|
||||
@@ -1195,7 +1195,7 @@ sp13E_warp_to_last_warp: @ 807E470
|
||||
_0807E494: .4byte gUnknown_3005020
|
||||
_0807E498: .4byte sub_807DF64
|
||||
_0807E49C: .4byte sub_807E718
|
||||
thumb_func_end sp13E_warp_to_last_warp
|
||||
thumb_func_end DoDiveWarp
|
||||
|
||||
thumb_func_start sub_807E4A0
|
||||
sub_807E4A0: @ 807E4A0
|
||||
@@ -1228,8 +1228,8 @@ _0807E4D4: .4byte sub_807E980
|
||||
_0807E4D8: .4byte gTasks
|
||||
thumb_func_end sub_807E4A0
|
||||
|
||||
thumb_func_start sub_807E4DC
|
||||
sub_807E4DC: @ 807E4DC
|
||||
thumb_func_start DoDoorWarp
|
||||
DoDoorWarp: @ 807E4DC
|
||||
push {lr}
|
||||
bl ScriptContext2_Enable
|
||||
ldr r0, _0807E4F4 @ =gUnknown_3005020
|
||||
@@ -1244,7 +1244,7 @@ sub_807E4DC: @ 807E4DC
|
||||
_0807E4F4: .4byte gUnknown_3005020
|
||||
_0807E4F8: .4byte sub_807DF64
|
||||
_0807E4FC: .4byte sub_807E80C
|
||||
thumb_func_end sub_807E4DC
|
||||
thumb_func_end DoDoorWarp
|
||||
|
||||
thumb_func_start sub_807E500
|
||||
sub_807E500: @ 807E500
|
||||
@@ -1282,10 +1282,10 @@ _0807E540: .4byte sub_807DF64
|
||||
_0807E544: .4byte sub_807E784
|
||||
thumb_func_end sub_807E524
|
||||
|
||||
thumb_func_start sp13F_fall_to_last_warp
|
||||
sp13F_fall_to_last_warp: @ 807E548
|
||||
thumb_func_start DoFallWarp
|
||||
DoFallWarp: @ 807E548
|
||||
push {lr}
|
||||
bl sp13E_warp_to_last_warp
|
||||
bl DoDiveWarp
|
||||
ldr r1, _0807E558 @ =gUnknown_3005020
|
||||
ldr r0, _0807E55C @ =sub_8084454
|
||||
str r0, [r1]
|
||||
@@ -1294,7 +1294,7 @@ sp13F_fall_to_last_warp: @ 807E548
|
||||
.align 2, 0
|
||||
_0807E558: .4byte gUnknown_3005020
|
||||
_0807E55C: .4byte sub_8084454
|
||||
thumb_func_end sp13F_fall_to_last_warp
|
||||
thumb_func_end DoFallWarp
|
||||
|
||||
thumb_func_start sub_807E560
|
||||
sub_807E560: @ 807E560
|
||||
|
||||
@@ -33,9 +33,9 @@ _080CA644:
|
||||
movs r4, 0x8D
|
||||
lsls r4, 1
|
||||
adds r0, r4, 0
|
||||
bl sub_8055E78
|
||||
bl Overworld_SetSavedMusic
|
||||
adds r0, r4, 0
|
||||
bl sub_8055F48
|
||||
bl Overworld_ChangeMusicTo
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
||||
+3
-3
@@ -2804,8 +2804,8 @@ sav1_get_weather_probably: @ 807B130
|
||||
_0807B13C: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sav1_get_weather_probably
|
||||
|
||||
thumb_func_start sub_807B140
|
||||
sub_807B140: @ 807B140
|
||||
thumb_func_start SetSav1WeatherFromCurrMapHeader
|
||||
SetSav1WeatherFromCurrMapHeader: @ 807B140
|
||||
push {r4,r5,lr}
|
||||
ldr r4, _0807B16C @ =gSaveBlock1Ptr
|
||||
ldr r0, [r4]
|
||||
@@ -2828,7 +2828,7 @@ sub_807B140: @ 807B140
|
||||
.align 2, 0
|
||||
_0807B16C: .4byte gSaveBlock1Ptr
|
||||
_0807B170: .4byte gMapHeader
|
||||
thumb_func_end sub_807B140
|
||||
thumb_func_end SetSav1WeatherFromCurrMapHeader
|
||||
|
||||
thumb_func_start SetWeather
|
||||
SetWeather: @ 807B174
|
||||
|
||||
+2
-2
@@ -1459,8 +1459,8 @@ sub_80F2934: @ 80F2934
|
||||
movs r1, 0x9
|
||||
movs r3, 0xB
|
||||
bl Overworld_SetWarpDestination
|
||||
bl sub_807E438
|
||||
bl sub_80559E4
|
||||
bl DoWarp
|
||||
bl ResetInitialPlayerAvatarState
|
||||
add sp, 0x4
|
||||
pop {r0}
|
||||
bx r0
|
||||
|
||||
+1
-1
@@ -1597,7 +1597,7 @@ sub_80A1C44: @ 80A1C44
|
||||
adds r4, r0, 0
|
||||
lsls r4, 24
|
||||
lsrs r4, 24
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
bl sub_8085620
|
||||
adds r0, r4, 0
|
||||
bl DestroyTask
|
||||
|
||||
+1
-1
@@ -3366,7 +3366,7 @@ sub_8117440: @ 8117440
|
||||
str r5, [sp, 0x4]
|
||||
movs r0, 0
|
||||
mov r3, r8
|
||||
bl saved_warp2_set_2
|
||||
bl SetDynamicWarpWithCoords
|
||||
bl warp_in
|
||||
add sp, 0x8
|
||||
pop {r3}
|
||||
|
||||
+37
-37
@@ -118,7 +118,7 @@ _08054C9C: .4byte gUnknown_826D29E
|
||||
thumb_func_start sub_8054CA0
|
||||
sub_8054CA0: @ 8054CA0
|
||||
push {lr}
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
movs r0, 0x83
|
||||
lsls r0, 4
|
||||
bl FlagClear
|
||||
@@ -157,7 +157,7 @@ _08054D04: .4byte 0x0000404d
|
||||
thumb_func_start sub_8054D08
|
||||
sub_8054D08: @ 8054D08
|
||||
push {lr}
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
movs r0, 0x83
|
||||
lsls r0, 4
|
||||
bl FlagClear
|
||||
@@ -196,7 +196,7 @@ _08054D6C: .4byte 0x0000404d
|
||||
thumb_func_start sub_8054D70
|
||||
sub_8054D70: @ 8054D70
|
||||
push {lr}
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
movs r0, 0x83
|
||||
lsls r0, 4
|
||||
bl FlagClear
|
||||
@@ -235,7 +235,7 @@ _08054DD4: .4byte 0x0000404d
|
||||
thumb_func_start sub_8054DD8
|
||||
sub_8054DD8: @ 8054DD8
|
||||
push {lr}
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
movs r0, 0x83
|
||||
lsls r0, 4
|
||||
bl FlagClear
|
||||
@@ -1084,8 +1084,8 @@ saved_warp2_set: @ 80553E8
|
||||
_08055418: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end saved_warp2_set
|
||||
|
||||
thumb_func_start saved_warp2_set_2
|
||||
saved_warp2_set_2: @ 805541C
|
||||
thumb_func_start SetDynamicWarpWithCoords
|
||||
SetDynamicWarpWithCoords: @ 805541C
|
||||
push {r4,r5,lr}
|
||||
sub sp, 0x8
|
||||
ldr r4, [sp, 0x14]
|
||||
@@ -1112,7 +1112,7 @@ saved_warp2_set_2: @ 805541C
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08055450: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end saved_warp2_set_2
|
||||
thumb_func_end SetDynamicWarpWithCoords
|
||||
|
||||
thumb_func_start copy_saved_warp2_bank_and_enter_x_to_warp1
|
||||
copy_saved_warp2_bank_and_enter_x_to_warp1: @ 8055454
|
||||
@@ -1281,7 +1281,7 @@ sub_805550C: @ 805550C
|
||||
lsls r4, 24
|
||||
asrs r4, 24
|
||||
str r4, [sp]
|
||||
bl sub_80555A0
|
||||
bl SetEscapeWarp
|
||||
_08055590:
|
||||
add sp, 0x4
|
||||
pop {r4-r7}
|
||||
@@ -1292,8 +1292,8 @@ _08055598: .4byte gUnknown_2031DBC
|
||||
_0805559C: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sub_805550C
|
||||
|
||||
thumb_func_start sub_80555A0
|
||||
sub_80555A0: @ 80555A0
|
||||
thumb_func_start SetEscapeWarp
|
||||
SetEscapeWarp: @ 80555A0
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
@@ -1325,7 +1325,7 @@ sub_80555A0: @ 80555A0
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_080555DC: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sub_80555A0
|
||||
thumb_func_end SetEscapeWarp
|
||||
|
||||
thumb_func_start sub_80555E0
|
||||
sub_80555E0: @ 80555E0
|
||||
@@ -1342,8 +1342,8 @@ _080555F0: .4byte gUnknown_2031DBC
|
||||
_080555F4: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sub_80555E0
|
||||
|
||||
thumb_func_start sub_80555F8
|
||||
sub_80555F8: @ 80555F8
|
||||
thumb_func_start SetFixedDiveWarp
|
||||
SetFixedDiveWarp: @ 80555F8
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
@@ -1373,7 +1373,7 @@ sub_80555F8: @ 80555F8
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08055630: .4byte gUnknown_2031DC4
|
||||
thumb_func_end sub_80555F8
|
||||
thumb_func_end SetFixedDiveWarp
|
||||
|
||||
thumb_func_start warp1_set_to_warp2
|
||||
warp1_set_to_warp2: @ 8055634
|
||||
@@ -1389,8 +1389,8 @@ _08055644: .4byte gUnknown_2031DBC
|
||||
_08055648: .4byte gUnknown_2031DC4
|
||||
thumb_func_end warp1_set_to_warp2
|
||||
|
||||
thumb_func_start sub_805564C
|
||||
sub_805564C: @ 805564C
|
||||
thumb_func_start SetFixedHoleWarp
|
||||
SetFixedHoleWarp: @ 805564C
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x8
|
||||
adds r4, r0, 0
|
||||
@@ -1420,10 +1420,10 @@ sub_805564C: @ 805564C
|
||||
bx r0
|
||||
.align 2, 0
|
||||
_08055684: .4byte gUnknown_2031DCC
|
||||
thumb_func_end sub_805564C
|
||||
thumb_func_end SetFixedHoleWarp
|
||||
|
||||
thumb_func_start sub_8055688
|
||||
sub_8055688: @ 8055688
|
||||
thumb_func_start SetWarpDestinationToFixedHoleWarp
|
||||
SetWarpDestinationToFixedHoleWarp: @ 8055688
|
||||
push {r4-r6,lr}
|
||||
sub sp, 0x4
|
||||
lsls r0, 16
|
||||
@@ -1464,7 +1464,7 @@ _080556D6:
|
||||
pop {r4-r6}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8055688
|
||||
thumb_func_end SetWarpDestinationToFixedHoleWarp
|
||||
|
||||
thumb_func_start warp1_set_to_sav1w
|
||||
warp1_set_to_sav1w: @ 80556E0
|
||||
@@ -1712,7 +1712,7 @@ sub_8055864: @ 8055864
|
||||
adds r0, r5, 0
|
||||
adds r1, r4, 0
|
||||
bl sub_810C578
|
||||
bl sub_807B140
|
||||
bl SetSav1WeatherFromCurrMapHeader
|
||||
bl sub_805610C
|
||||
bl sub_8055CB8
|
||||
bl sav1_reset_battle_music_maybe
|
||||
@@ -1784,7 +1784,7 @@ sub_8055920: @ 8055920
|
||||
lsls r1, 16
|
||||
lsrs r1, 16
|
||||
bl sub_810C578
|
||||
bl sub_807B140
|
||||
bl SetSav1WeatherFromCurrMapHeader
|
||||
bl sub_805610C
|
||||
cmp r4, 0
|
||||
beq _08055974
|
||||
@@ -1817,7 +1817,7 @@ sub_80559A8: @ 80559A8
|
||||
ldrb r0, [r0, 0x17]
|
||||
bl is_light_level_1_2_3_5_or_6
|
||||
bl TrySetMapSaveWarpStatus
|
||||
bl sub_807B140
|
||||
bl SetSav1WeatherFromCurrMapHeader
|
||||
bl sub_805610C
|
||||
bl sub_8055CB8
|
||||
bl sub_8110920
|
||||
@@ -1830,8 +1830,8 @@ sub_80559A8: @ 80559A8
|
||||
_080559E0: .4byte gMapHeader
|
||||
thumb_func_end sub_80559A8
|
||||
|
||||
thumb_func_start sub_80559E4
|
||||
sub_80559E4: @ 80559E4
|
||||
thumb_func_start ResetInitialPlayerAvatarState
|
||||
ResetInitialPlayerAvatarState: @ 80559E4
|
||||
ldr r0, _080559F4 @ =gUnknown_2031DD4
|
||||
movs r2, 0
|
||||
movs r1, 0x1
|
||||
@@ -1841,7 +1841,7 @@ sub_80559E4: @ 80559E4
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_080559F4: .4byte gUnknown_2031DD4
|
||||
thumb_func_end sub_80559E4
|
||||
thumb_func_end ResetInitialPlayerAvatarState
|
||||
|
||||
thumb_func_start sub_80559F8
|
||||
sub_80559F8: @ 80559F8
|
||||
@@ -2295,8 +2295,8 @@ sav1_get_flash_used_on_map: @ 8055D30
|
||||
_08055D3C: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sav1_get_flash_used_on_map
|
||||
|
||||
thumb_func_start sub_8055D40
|
||||
sub_8055D40: @ 8055D40
|
||||
thumb_func_start SetCurrentMapLayout
|
||||
SetCurrentMapLayout: @ 8055D40
|
||||
push {lr}
|
||||
ldr r1, _08055D54 @ =gSaveBlock1Ptr
|
||||
ldr r1, [r1]
|
||||
@@ -2309,7 +2309,7 @@ sub_8055D40: @ 8055D40
|
||||
.align 2, 0
|
||||
_08055D54: .4byte gSaveBlock1Ptr
|
||||
_08055D58: .4byte gMapHeader
|
||||
thumb_func_end sub_8055D40
|
||||
thumb_func_end SetCurrentMapLayout
|
||||
|
||||
thumb_func_start sub_8055D5C
|
||||
sub_8055D5C: @ 8055D5C
|
||||
@@ -2464,15 +2464,15 @@ _08055E6C:
|
||||
_08055E74: .4byte 0x00000131
|
||||
thumb_func_end sub_8055DC4
|
||||
|
||||
thumb_func_start sub_8055E78
|
||||
sub_8055E78: @ 8055E78
|
||||
thumb_func_start Overworld_SetSavedMusic
|
||||
Overworld_SetSavedMusic: @ 8055E78
|
||||
ldr r1, _08055E80 @ =gSaveBlock1Ptr
|
||||
ldr r1, [r1]
|
||||
strh r0, [r1, 0x2C]
|
||||
bx lr
|
||||
.align 2, 0
|
||||
_08055E80: .4byte gSaveBlock1Ptr
|
||||
thumb_func_end sub_8055E78
|
||||
thumb_func_end Overworld_SetSavedMusic
|
||||
|
||||
thumb_func_start sav1_reset_battle_music_maybe
|
||||
sav1_reset_battle_music_maybe: @ 8055E84
|
||||
@@ -2573,8 +2573,8 @@ _08055F42:
|
||||
bx r0
|
||||
thumb_func_end Overworld_ChangeMusicToDefault
|
||||
|
||||
thumb_func_start sub_8055F48
|
||||
sub_8055F48: @ 8055F48
|
||||
thumb_func_start Overworld_ChangeMusicTo
|
||||
Overworld_ChangeMusicTo: @ 8055F48
|
||||
push {r4,lr}
|
||||
lsls r0, 16
|
||||
lsrs r4, r0, 16
|
||||
@@ -2590,7 +2590,7 @@ _08055F62:
|
||||
pop {r4}
|
||||
pop {r0}
|
||||
bx r0
|
||||
thumb_func_end sub_8055F48
|
||||
thumb_func_end Overworld_ChangeMusicTo
|
||||
|
||||
thumb_func_start GetMapMusicFadeoutSpeed
|
||||
GetMapMusicFadeoutSpeed: @ 8055F68
|
||||
@@ -3494,7 +3494,7 @@ CB2_NewGame: @ 8056644
|
||||
bl StopMapMusic
|
||||
bl sub_8056420
|
||||
bl sub_8054A60
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
bl PlayTimeCounter_Start
|
||||
bl ScriptContext1_Init
|
||||
bl ScriptContext2_Disable
|
||||
@@ -4705,7 +4705,7 @@ mli4_mapscripts_and_other: @ 805709C
|
||||
bl InitPlayerAvatar
|
||||
ldrb r0, [r5]
|
||||
bl SetPlayerAvatarTransitionFlags
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
movs r0, 0
|
||||
movs r1, 0
|
||||
bl sub_805EC30
|
||||
|
||||
-1107
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -371,7 +371,7 @@ _08147150:
|
||||
bl warp_in
|
||||
ldr r0, _081471BC @ =sub_805671C
|
||||
bl SetMainCallback2
|
||||
bl sub_80559E4
|
||||
bl ResetInitialPlayerAvatarState
|
||||
bl sub_81473A0
|
||||
ldr r0, _081471C0 @ =gUnknown_203F3D0
|
||||
ldr r0, [r0]
|
||||
|
||||
+15
-15
@@ -45,28 +45,28 @@ gScriptCmdTable:: @ 815F9B4
|
||||
.4byte ScrCmd_setflag
|
||||
.4byte ScrCmd_clearflag
|
||||
.4byte ScrCmd_checkflag
|
||||
.4byte sub_806A9D4
|
||||
.4byte sub_806A9D8
|
||||
.4byte sub_806A9DC
|
||||
.4byte ScrCmd_initclock
|
||||
.4byte ScrCmd_dodailyevents
|
||||
.4byte ScrCmd_gettime
|
||||
.4byte ScrCmd_playse
|
||||
.4byte sub_806B094
|
||||
.4byte ScrCmd_waitse
|
||||
.4byte ScrCmd_playfanfare
|
||||
.4byte sub_806B0CC
|
||||
.4byte sub_806B0E0
|
||||
.4byte sub_806B120
|
||||
.4byte sub_806B134
|
||||
.4byte sub_806B154
|
||||
.4byte sub_806B17C
|
||||
.4byte sub_806B1C8
|
||||
.4byte ScrCmd_waitfanfare
|
||||
.4byte ScrCmd_playbgm
|
||||
.4byte ScrCmd_savebgm
|
||||
.4byte ScrCmd_fadedefaultbgm
|
||||
.4byte ScrCmd_fadenewbgm
|
||||
.4byte ScrCmd_fadeoutbgm
|
||||
.4byte ScrCmd_fadeinbgm
|
||||
.4byte ScrCmd_warp
|
||||
.4byte ScrCmd_warpsilent
|
||||
.4byte ScrCmd_warpdoor
|
||||
.4byte ScrCmd_warphole
|
||||
.4byte sub_806AC70
|
||||
.4byte ScrCmd_warpteleport
|
||||
.4byte ScrCmd_setwarp
|
||||
.4byte ScrCmd_setdynamicwarp
|
||||
.4byte sub_806AE90
|
||||
.4byte sub_806AF10
|
||||
.4byte ScrCmd_setdivewarp
|
||||
.4byte ScrCmd_setholewarp
|
||||
.4byte ScrCmd_getplayerxy
|
||||
.4byte ScrCmd_getpartysize
|
||||
.4byte ScrCmd_giveitem
|
||||
@@ -210,7 +210,7 @@ gScriptCmdTable:: @ 815F9B4
|
||||
.4byte ScrCmd_checkmonobedience
|
||||
.4byte sub_806A28C
|
||||
.4byte sub_806A8C0
|
||||
.4byte sub_806ACF8
|
||||
.4byte ScrCmd_warpD7
|
||||
.4byte sub_806C844
|
||||
.4byte sub_806BC40
|
||||
.4byte sub_806BD90
|
||||
|
||||
+2
-2
@@ -327,8 +327,8 @@ gSpecials:: @ 815FD60
|
||||
def_special nullsub_75
|
||||
def_special nullsub_75
|
||||
def_special sub_807B6C0
|
||||
def_special sp13E_warp_to_last_warp
|
||||
def_special sp13F_fall_to_last_warp
|
||||
def_special DoDiveWarp
|
||||
def_special DoFallWarp
|
||||
def_special nullsub_75
|
||||
def_special nullsub_75
|
||||
def_special sub_80E5E70
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
void sub_80AF734(void);
|
||||
void sp13E_warp_to_last_warp(void);
|
||||
void sub_80AF7D0(void);
|
||||
void sp13F_fall_to_last_warp(void);
|
||||
|
||||
void sub_80AF848(void);
|
||||
void sub_80AF87C(void);
|
||||
void sub_807DF64(void);
|
||||
void sub_807DF7C(void);
|
||||
void DoWarp(void);
|
||||
void DoDiveWarp(void);
|
||||
void DoDoorWarp(void);
|
||||
|
||||
void DoFallWarp(void);
|
||||
void sub_807E59C(void);
|
||||
void sub_807E500(void);
|
||||
void sub_807DF64(void);
|
||||
|
||||
#endif // GUARD_FIELD_FADETRANSITION_H
|
||||
|
||||
@@ -20,5 +20,6 @@ u8 sub_805C808(u8);
|
||||
void SetPlayerAvatarStateMask(u8 mask);
|
||||
void sub_805D9C4(struct Sprite *sprite);
|
||||
void sub_805D154(u8 direction);
|
||||
void sub_805DAE4(u8 direction);
|
||||
|
||||
#endif //GUARD_FIELD_PLAYER_AVATAR_H
|
||||
|
||||
@@ -10,6 +10,7 @@ u8 GetSav1Weather(void);
|
||||
void sub_80AEDBC(void);
|
||||
|
||||
void DoCurrentWeather(void);
|
||||
void SetSav1WeatherFromCurrMapHeader(void);
|
||||
void sub_807B0C4(u16 *, u16 *, u32);
|
||||
|
||||
#endif // GUARD_WEATHER_H
|
||||
|
||||
+8
-2
@@ -35,7 +35,10 @@ void Overworld_SetMapObjTemplateMovementType(u8, u8);
|
||||
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
|
||||
void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetDynamicWarpWithCoords(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void Overworld_SetHealLocationWarp(u8);
|
||||
void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void sub_8084E2C(s8, s8, s8, s8, s8);
|
||||
@@ -81,7 +84,10 @@ void sub_8055DC4(void);
|
||||
|
||||
u8 sav1_map_get_name(void);
|
||||
|
||||
void sub_8055D40(u16 mapDataId);
|
||||
void SetCurrentMapLayout(u16 mapDataId);
|
||||
void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y);
|
||||
|
||||
void ResetInitialPlayerAvatarState(void);
|
||||
|
||||
extern u8 gUnknown_2031DD8;
|
||||
extern u8 gUnknown_2036E28;
|
||||
|
||||
@@ -23,4 +23,6 @@ void sub_8112720(u8);
|
||||
void sub_8113550(u16, const u16 *);
|
||||
void sub_8115748(u16);
|
||||
|
||||
extern u8 gUnknown_203ADFA;
|
||||
|
||||
#endif //GUARD_QUEST_LOG_H
|
||||
|
||||
+347
-1
@@ -11,6 +11,10 @@
|
||||
#include "quest_log.h"
|
||||
#include "map_preview_screen.h"
|
||||
#include "field_weather.h"
|
||||
#include "field_tasks.h"
|
||||
#include "field_fadetransition.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "sound.h"
|
||||
|
||||
extern u16 (*const gSpecials[])(void);
|
||||
extern u16 (*const gSpecialsEnd[])(void);
|
||||
@@ -19,7 +23,7 @@ extern const u8 *const gStdScriptsEnd[];
|
||||
|
||||
EWRAM_DATA ptrdiff_t gVScriptOffset = 0;
|
||||
EWRAM_DATA u8 gUnknown_20370AC = 0;
|
||||
EWRAM_DATA u16 gUnknown_20370AE = 0;
|
||||
EWRAM_DATA u16 sPauseCounter = 0;
|
||||
EWRAM_DATA u16 gUnknown_20370B0 = 0;
|
||||
EWRAM_DATA u16 gUnknown_20370B2 = 0;
|
||||
EWRAM_DATA u16 gUnknown_20370B4 = 0;
|
||||
@@ -620,3 +624,345 @@ SCRCMD_DEF(ScrCmd_fadescreenspeed)
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bool8 RunPauseTimer(void)
|
||||
{
|
||||
sPauseCounter--;
|
||||
|
||||
if (sPauseCounter == 0)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_delay)
|
||||
{
|
||||
sPauseCounter = ScriptReadHalfword(ctx);
|
||||
SetupNativeScript(ctx, RunPauseTimer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_initclock)
|
||||
{
|
||||
// u8 hour = VarGet(ScriptReadHalfword(ctx));
|
||||
// u8 minute = VarGet(ScriptReadHalfword(ctx));
|
||||
//
|
||||
// RtcInitLocalTimeOffset(hour, minute);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_dodailyevents)
|
||||
{
|
||||
// DoTimeBasedEvents();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_gettime)
|
||||
{
|
||||
// RtcCalcLocalTime();
|
||||
// gSpecialVar_0x8000 = gLocalTime.hours;
|
||||
// gSpecialVar_0x8001 = gLocalTime.minutes;
|
||||
// gSpecialVar_0x8002 = gLocalTime.seconds;
|
||||
gSpecialVar_0x8000 = 0;
|
||||
gSpecialVar_0x8001 = 0;
|
||||
gSpecialVar_0x8002 = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setweather)
|
||||
{
|
||||
u16 weather = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetSav1Weather(weather);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_resetweather)
|
||||
{
|
||||
SetSav1WeatherFromCurrMapHeader();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_doweather)
|
||||
{
|
||||
DoCurrentWeather();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setstepcallback)
|
||||
{
|
||||
ActivatePerStepCallback(ScriptReadByte(ctx));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setmaplayoutindex)
|
||||
{
|
||||
u16 value = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetCurrentMapLayout(value);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
DoWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warpsilent)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
DoDiveWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warpdoor)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
DoDoorWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warphole)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u16 x;
|
||||
u16 y;
|
||||
|
||||
PlayerGetDestCoords(&x, &y);
|
||||
if (mapGroup == 0xFF && mapNum == 0xFF)
|
||||
SetWarpDestinationToFixedHoleWarp(x - 7, y - 7);
|
||||
else
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7);
|
||||
DoFallWarp();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warpteleport)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
sub_807E59C();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_warpD7)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
sub_805DAE4(player_get_direction_lower_nybble());
|
||||
sub_807E500();
|
||||
ResetInitialPlayerAvatarState();
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setwarp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setdynamicwarp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetDynamicWarpWithCoords(0, mapGroup, mapNum, warpId, x, y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setdivewarp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetFixedDiveWarp(mapGroup, mapNum, warpId, x, y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setholewarp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetFixedHoleWarp(mapGroup, mapNum, warpId, x, y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_setescapewarp)
|
||||
{
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
u8 warpId = ScriptReadByte(ctx);
|
||||
u16 x = VarGet(ScriptReadHalfword(ctx));
|
||||
u16 y = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetEscapeWarp(mapGroup, mapNum, warpId, x, y);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_getplayerxy)
|
||||
{
|
||||
u16 *pX = GetVarPointer(ScriptReadHalfword(ctx));
|
||||
u16 *pY = GetVarPointer(ScriptReadHalfword(ctx));
|
||||
|
||||
*pX = gSaveBlock1Ptr->pos.x;
|
||||
*pY = gSaveBlock1Ptr->pos.y;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_getpartysize)
|
||||
{
|
||||
gSpecialVar_Result = CalculatePlayerPartyCount();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_playse)
|
||||
{
|
||||
PlaySE(ScriptReadHalfword(ctx));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 WaitForSoundEffectFinish(void)
|
||||
{
|
||||
if (!IsSEPlaying())
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_waitse)
|
||||
{
|
||||
SetupNativeScript(ctx, WaitForSoundEffectFinish);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_playfanfare)
|
||||
{
|
||||
PlayFanfare(ScriptReadHalfword(ctx));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool8 WaitForFanfareFinish(void)
|
||||
{
|
||||
return IsFanfareTaskInactive();
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_waitfanfare)
|
||||
{
|
||||
SetupNativeScript(ctx, WaitForFanfareFinish);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_playbgm)
|
||||
{
|
||||
u16 songId = ScriptReadHalfword(ctx);
|
||||
bool8 val = ScriptReadByte(ctx);
|
||||
|
||||
if (gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)
|
||||
return FALSE;
|
||||
if (val == TRUE)
|
||||
Overworld_SetSavedMusic(songId);
|
||||
PlayNewMapMusic(songId);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_savebgm)
|
||||
{
|
||||
Overworld_SetSavedMusic(ScriptReadHalfword(ctx));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_fadedefaultbgm)
|
||||
{
|
||||
if (gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)
|
||||
return FALSE;
|
||||
Overworld_ChangeMusicToDefault();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_fadenewbgm)
|
||||
{
|
||||
u16 music = ScriptReadHalfword(ctx);
|
||||
if (gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)
|
||||
return FALSE;
|
||||
Overworld_ChangeMusicTo(music);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_fadeoutbgm)
|
||||
{
|
||||
u8 speed = ScriptReadByte(ctx);
|
||||
|
||||
if (gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)
|
||||
return FALSE;
|
||||
if (speed != 0)
|
||||
FadeOutBGMTemporarily(4 * speed);
|
||||
else
|
||||
FadeOutBGMTemporarily(4);
|
||||
SetupNativeScript(ctx, IsBGMPausedOrStopped);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
SCRCMD_DEF(ScrCmd_fadeinbgm)
|
||||
{
|
||||
u8 speed = ScriptReadByte(ctx);
|
||||
|
||||
if (gUnknown_203ADFA == 2 || gUnknown_203ADFA == 3)
|
||||
return FALSE;
|
||||
if (speed != 0)
|
||||
FadeInBGM(4 * speed);
|
||||
else
|
||||
FadeInBGM(4);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+2
-2
@@ -430,12 +430,12 @@ void sub_815DD44(void)
|
||||
if (gMapHeader.mapDataId - 0x129 > gUnknown_203F458->unk_0004.unk_0000.unk0)
|
||||
{
|
||||
gSpecialVar_Result = 3;
|
||||
sub_8055D40(0x132);
|
||||
SetCurrentMapLayout(0x132);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSpecialVar_Result = gUnknown_203F458->unk_0004.unk_0008[gUnknown_203F458->unk_0000].unk_002;
|
||||
sub_8055D40(gUnknown_847A284[gUnknown_203F458->unk_0000][gSpecialVar_Result]);
|
||||
SetCurrentMapLayout(gUnknown_847A284[gUnknown_203F458->unk_0000][gSpecialVar_Result]);
|
||||
sub_815DDB0();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user