Define follow mon struct in field sys

This commit is contained in:
PikalaxALT 2022-02-09 15:31:59 -05:00
parent 7628a40405
commit b1849dc134
20 changed files with 131 additions and 114 deletions

View File

@ -20,7 +20,7 @@ sub_020699F8: ; 0x020699F8
str r1, [sp, #0x14] str r1, [sp, #0x14]
str r2, [sp, #0x18] str r2, [sp, #0x18]
str r3, [sp, #0x1c] str r3, [sp, #0x1c]
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
add r4, r0, #0 add r4, r0, #0
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl SavArray_PlayerParty_get bl SavArray_PlayerParty_get
@ -31,10 +31,10 @@ sub_020699F8: ; 0x020699F8
add r0, #0xe4 add r0, #0xe4
bl sub_0206A06C bl sub_0206A06C
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #0 mov r0, #0
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
cmp r6, #0 cmp r6, #0
bne _02069A34 bne _02069A34
b _02069B6C b _02069B6C
@ -107,7 +107,7 @@ _02069A4C:
add r0, r4, #0 add r0, r4, #0
add r1, r6, #0 add r1, r6, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
bl sub_02069F3C bl FollowPokeFsysParamSet
mov r1, #0 mov r1, #0
add r0, r5, #0 add r0, r5, #0
add r2, r1, #0 add r2, r1, #0
@ -128,19 +128,19 @@ _02069A4C:
bne _02069B08 bne _02069B08
_02069AF8: _02069AF8:
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #1 mov r0, #1
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
b _02069B58 b _02069B58
_02069B08: _02069B08:
cmp r0, #1 cmp r0, #1
bne _02069B2E bne _02069B2E
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #2 mov r0, #2
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
add r0, r4, #0 add r0, r4, #0
bl sub_0206A054 bl sub_0206A054
add r0, r4, #0 add r0, r4, #0
@ -152,10 +152,10 @@ _02069B2E:
cmp r0, #2 cmp r0, #2
bne _02069B54 bne _02069B54
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #2 mov r0, #2
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
add r0, r4, #0 add r0, r4, #0
bl sub_0206A054 bl sub_0206A054
add r0, r4, #0 add r0, r4, #0
@ -167,8 +167,8 @@ _02069B54:
bl GF_AssertFail bl GF_AssertFail
_02069B58: _02069B58:
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
bl sub_0202ED68 bl SavFollowPoke_GetInhibitFlagState
cmp r0, #0 cmp r0, #0
beq _02069B6C beq _02069B6C
add r0, r4, #0 add r0, r4, #0
@ -185,7 +185,7 @@ sub_02069B74: ; 0x02069B74
push {r4, r5, r6, r7, lr} push {r4, r5, r6, r7, lr}
sub sp, #0x14 sub sp, #0x14
add r7, r1, #0 add r7, r1, #0
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
add r5, r0, #0 add r5, r0, #0
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl SavArray_PlayerParty_get bl SavArray_PlayerParty_get
@ -263,13 +263,13 @@ _02069BF0:
add r0, r5, #0 add r0, r5, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
add r3, r6, #0 add r3, r6, #0
bl sub_02069F3C bl FollowPokeFsysParamSet
lsl r2, r7, #0x18 lsl r2, r7, #0x18
ldr r0, [sp, #4] ldr r0, [sp, #4]
add r1, r4, #0 add r1, r4, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
add r3, r6, #0 add r3, r6, #0
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
lsl r1, r7, #0x10 lsl r1, r7, #0x10
ldr r2, [sp, #8] ldr r2, [sp, #8]
add r0, r4, #0 add r0, r4, #0
@ -288,19 +288,19 @@ _02069BF0:
bne _02069C72 bne _02069C72
_02069C62: _02069C62:
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #1 mov r0, #1
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
b _02069CB6 b _02069CB6
_02069C72: _02069C72:
cmp r0, #1 cmp r0, #1
bne _02069C92 bne _02069C92
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #2 mov r0, #2
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
add r0, r5, #0 add r0, r5, #0
add r0, #0xe4 add r0, #0xe4
ldr r0, [r0] ldr r0, [r0]
@ -311,10 +311,10 @@ _02069C92:
cmp r0, #2 cmp r0, #2
bne _02069CB2 bne _02069CB2
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
mov r0, #2 mov r0, #2
bl sub_0202ED48 bl SavFollowPoke_SetUnused2bitField
add r0, r5, #0 add r0, r5, #0
add r0, #0xe4 add r0, #0xe4
ldr r0, [r0] ldr r0, [r0]
@ -337,8 +337,8 @@ _02069CB6:
bl sub_0206A040 bl sub_0206A040
_02069CD0: _02069CD0:
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
bl sub_0202ED68 bl SavFollowPoke_GetInhibitFlagState
cmp r0, #0 cmp r0, #0
beq _02069CE4 beq _02069CE4
add r0, r5, #0 add r0, r5, #0
@ -374,13 +374,13 @@ _02069CF2:
add r1, r4, #0 add r1, r4, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
add r3, r6, #0 add r3, r6, #0
bl sub_02069F3C bl FollowPokeFsysParamSet
lsl r2, r7, #0x18 lsl r2, r7, #0x18
ldr r0, [sp, #0xc] ldr r0, [sp, #0xc]
add r1, r4, #0 add r1, r4, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
add r3, r6, #0 add r3, r6, #0
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
lsl r1, r7, #0x10 lsl r1, r7, #0x10
ldr r2, [sp, #0x10] ldr r2, [sp, #0x10]
add r0, r4, #0 add r0, r4, #0
@ -628,8 +628,8 @@ sub_02069ED4: ; 0x02069ED4
pop {r3, pc} pop {r3, pc}
thumb_func_end sub_02069ED4 thumb_func_end sub_02069ED4
thumb_func_start sub_02069EE8 thumb_func_start FollowPokeMapObjectSetParams
sub_02069EE8: ; 0x02069EE8 FollowPokeMapObjectSetParams: ; 0x02069EE8
push {r4, r5, r6, lr} push {r4, r5, r6, lr}
add r4, r1, #0 add r4, r1, #0
add r5, r0, #0 add r5, r0, #0
@ -639,13 +639,13 @@ sub_02069EE8: ; 0x02069EE8
add r0, r5, #0 add r0, r5, #0
add r1, r4, #0 add r1, r4, #0
add r2, r6, #0 add r2, r6, #0
bl sub_0206A0E0 bl FollowingPoke_SetObjectFormeParam
add r0, r5, #0 add r0, r5, #0
add r1, r4, #0 add r1, r4, #0
mov r2, #0 mov r2, #0
bl MapObject_SetParam bl MapObject_SetParam
pop {r4, r5, r6, pc} pop {r4, r5, r6, pc}
thumb_func_end sub_02069EE8 thumb_func_end FollowPokeMapObjectSetParams
thumb_func_start sub_02069F0C thumb_func_start sub_02069F0C
sub_02069F0C: ; 0x02069F0C sub_02069F0C: ; 0x02069F0C
@ -663,7 +663,7 @@ sub_02069F0C: ; 0x02069F0C
add r0, r5, #0 add r0, r5, #0
add r1, r4, #0 add r1, r4, #0
add r2, r6, #0 add r2, r6, #0
bl sub_0206A0E0 bl FollowingPoke_SetObjectFormeParam
add r0, r5, #0 add r0, r5, #0
add r1, r4, #0 add r1, r4, #0
mov r2, #0 mov r2, #0
@ -671,8 +671,8 @@ sub_02069F0C: ; 0x02069F0C
pop {r3, r4, r5, r6, r7, pc} pop {r3, r4, r5, r6, r7, pc}
thumb_func_end sub_02069F0C thumb_func_end sub_02069F0C
thumb_func_start sub_02069F3C thumb_func_start FollowPokeFsysParamSet
sub_02069F3C: ; 0x02069F3C FollowPokeFsysParamSet: ; 0x02069F3C
push {r3, r4} push {r3, r4}
add r4, r0, #0 add r4, r0, #0
add r4, #0xf4 add r4, #0xf4
@ -692,7 +692,7 @@ sub_02069F3C: ; 0x02069F3C
bx lr bx lr
nop nop
_02069F60: .word 0xFFFFFFF8 _02069F60: .word 0xFFFFFFF8
thumb_func_end sub_02069F3C thumb_func_end FollowPokeFsysParamSet
thumb_func_start sub_02069F64 thumb_func_start sub_02069F64
sub_02069F64: ; 0x02069F64 sub_02069F64: ; 0x02069F64
@ -768,8 +768,8 @@ sub_02069FD4: ; 0x02069FD4
push {r3, r4, r5, lr} push {r3, r4, r5, lr}
add r5, r0, #0 add r5, r0, #0
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
bl sub_0202ED44 bl SavFollowPoke_GetMapId
add r5, #0xe4 add r5, #0xe4
add r4, r0, #0 add r4, r0, #0
ldr r0, [r5] ldr r0, [r5]
@ -923,8 +923,8 @@ _0206A0DA:
.balign 4, 0 .balign 4, 0
thumb_func_end sub_0206A0A4 thumb_func_end sub_0206A0A4
thumb_func_start sub_0206A0E0 thumb_func_start FollowingPoke_SetObjectFormeParam
sub_0206A0E0: ; 0x0206A0E0 FollowingPoke_SetObjectFormeParam: ; 0x0206A0E0
push {r3, r4, r5, r6, r7, lr} push {r3, r4, r5, r6, r7, lr}
add r6, r1, #0 add r6, r1, #0
add r7, r0, #0 add r7, r0, #0
@ -958,7 +958,7 @@ _0206A106:
mov r2, #1 mov r2, #1
bl MapObject_SetParam bl MapObject_SetParam
pop {r3, r4, r5, r6, r7, pc} pop {r3, r4, r5, r6, r7, pc}
thumb_func_end sub_0206A0E0 thumb_func_end FollowingPoke_SetObjectFormeParam
thumb_func_start CreateFollowingSpriteFieldObject thumb_func_start CreateFollowingSpriteFieldObject
CreateFollowingSpriteFieldObject: ; 0x0206A128 CreateFollowingSpriteFieldObject: ; 0x0206A128
@ -1006,7 +1006,7 @@ _0206A15A:
add r0, r4, #0 add r0, r4, #0
add r1, r5, #0 add r1, r5, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
mov r1, #0 mov r1, #0
add r0, r4, #0 add r0, r4, #0
mvn r1, r1 mvn r1, r1
@ -1268,8 +1268,6 @@ _0206A358: .word NATIONAL_DEX_COUNT
_0206A35C: .word _020FECAE _0206A35C: .word _020FECAE
thumb_func_end OverworldModelLookupHasFemaleForme thumb_func_end OverworldModelLookupHasFemaleForme
; File boundary after here
.rodata .rodata
_020FE8D4: _020FE8D4:

View File

@ -207,7 +207,7 @@ _0205E23E:
add r4, r0, #0 add r4, r0, #0
beq _0205E290 beq _0205E290
add r0, r5, #0 add r0, r5, #0
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
add r2, r0, #0 add r2, r0, #0
add r0, r4, #0 add r0, r4, #0
add r1, r6, #0 add r1, r6, #0
@ -336,7 +336,7 @@ sub_0205E34C: ; 0x0205E34C
bl ObjectEventTemplate_GetFlagID bl ObjectEventTemplate_GetFlagID
add r4, r0, #0 add r4, r0, #0
add r0, r5, #0 add r0, r5, #0
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
lsl r1, r4, #0x10 lsl r1, r4, #0x10
lsr r1, r1, #0x10 lsr r1, r1, #0x10
bl FlagGet bl FlagGet
@ -1129,7 +1129,7 @@ sub_0205EA08: ; 0x0205EA08
push {r3, r4, r5, r6, r7, lr} push {r3, r4, r5, r6, r7, lr}
add r5, r0, #0 add r5, r0, #0
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
add r6, r5, #0 add r6, r5, #0
ldr r4, [r5, #0x10] ldr r4, [r5, #0x10]
add r7, r0, #0 add r7, r0, #0
@ -2198,13 +2198,13 @@ MapObjectMan_SetFieldSysPtr: ; 0x0205F1DC
bx lr bx lr
thumb_func_end MapObjectMan_SetFieldSysPtr thumb_func_end MapObjectMan_SetFieldSysPtr
thumb_func_start sub_0205F1E4 thumb_func_start MapObjectMan_GetFieldSysPtr
sub_0205F1E4: ; 0x0205F1E4 MapObjectMan_GetFieldSysPtr: ; 0x0205F1E4
mov r1, #0x4a mov r1, #0x4a
lsl r1, r1, #2 lsl r1, r1, #2
ldr r0, [r0, r1] ldr r0, [r0, r1]
bx lr bx lr
thumb_func_end sub_0205F1E4 thumb_func_end MapObjectMan_GetFieldSysPtr
thumb_func_start FldObjSys_SetMModelNarc thumb_func_start FldObjSys_SetMModelNarc
FldObjSys_SetMModelNarc: ; 0x0205F1EC FldObjSys_SetMModelNarc: ; 0x0205F1EC
@ -2955,7 +2955,7 @@ sub_0205F524: ; 0x0205F524
MapObject_GetFieldSysPtr: ; 0x0205F52C MapObject_GetFieldSysPtr: ; 0x0205F52C
push {r3, lr} push {r3, lr}
bl sub_0205F364 bl sub_0205F364
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
pop {r3, pc} pop {r3, pc}
thumb_func_end MapObject_GetFieldSysPtr thumb_func_end MapObject_GetFieldSysPtr

View File

@ -972,7 +972,7 @@ sub_0206AEC0: ; 0x0206AEC0
add r0, r4, #0 add r0, r4, #0
add r1, r5, #0 add r1, r5, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
add r0, r4, #0 add r0, r4, #0
add sp, #8 add sp, #8
pop {r4, r5, r6, pc} pop {r4, r5, r6, pc}

View File

@ -4384,7 +4384,7 @@
.short 782 .short 782
.endm .endm
.macro scrcmd_783 arg0 .macro set_follow_poke_inhibit_state arg0
.short 783 .short 783
.byte \arg0 .byte \arg0
.endm .endm

View File

@ -37668,7 +37668,7 @@ _021F7522:
_021F7524: _021F7524:
add r0, r5, #0 add r0, r5, #0
bl sub_0205F35C bl sub_0205F35C
bl sub_0205F1E4 bl MapObjectMan_GetFieldSysPtr
str r0, [sp, #0x10] str r0, [sp, #0x10]
ldr r0, [r0, #0xc] ldr r0, [r0, #0xc]
bl SavArray_PlayerParty_get bl SavArray_PlayerParty_get
@ -37704,7 +37704,7 @@ _021F7524:
ldr r3, [sp, #4] ldr r3, [sp, #4]
add r0, r5, #0 add r0, r5, #0
add r1, r7, #0 add r1, r7, #0
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
ldr r1, [sp, #0x14] ldr r1, [sp, #0x14]
add r0, r5, #0 add r0, r5, #0
bl MapObject_SetGfxID bl MapObject_SetGfxID
@ -37776,7 +37776,7 @@ _021F761C:
ldr r3, [sp, #4] ldr r3, [sp, #4]
add r1, r7, #0 add r1, r7, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
bl sub_02069F3C bl FollowPokeFsysParamSet
add r0, r5, #0 add r0, r5, #0
mov r1, #1 mov r1, #1
bl MapObject_ForceSetFacingDirection bl MapObject_ForceSetFacingDirection

View File

@ -26451,7 +26451,7 @@ _0225244E:
ldrb r3, [r4] ldrb r3, [r4]
ldr r0, [r0] ldr r0, [r0]
lsl r1, r1, #2 lsl r1, r1, #2
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
ldr r0, [r5] ldr r0, [r5]
add r0, r0, #1 add r0, r0, #1
str r0, [r5] str r0, [r5]

View File

@ -53,7 +53,7 @@ _020F64C4:
.word 0x0000001E, 0x00000000, Sav2_EasyChat_sizeof, Sav2_EasyChat_init .word 0x0000001E, 0x00000000, Sav2_EasyChat_sizeof, Sav2_EasyChat_init
.word 0x0000001F, 0x00000000, sub_0203170C, sub_02031710 .word 0x0000001F, 0x00000000, sub_0203170C, sub_02031710
.word 0x00000020, 0x00000000, sub_020318C8, sub_020318CC .word 0x00000020, 0x00000000, sub_020318C8, sub_020318CC
.word 0x00000021, 0x00000000, sub_0202ED18, sub_0202ED1C .word 0x00000021, 0x00000000, Sav2_FollowPoke_sizeof, Sav2_FollowPoke_init
.word 0x00000022, 0x00000000, SaveData_GSPlayerMisc_sizeof, SaveData_GSPlayerMisc_init .word 0x00000022, 0x00000000, SaveData_GSPlayerMisc_sizeof, SaveData_GSPlayerMisc_init
.word 0x00000023, 0x00000000, Save_SafariZone_sizeof, Save_SafariZone_init .word 0x00000023, 0x00000000, Save_SafariZone_sizeof, Save_SafariZone_init
.word 0x00000024, 0x00000000, Save_PhotoAlbum_sizeof, Save_PhotoAlbum_init .word 0x00000024, 0x00000000, Save_PhotoAlbum_sizeof, Save_PhotoAlbum_init

View File

@ -833,7 +833,7 @@ gScriptCmdTable:
.word ScrCmd_CasinoGame ; 780 .word ScrCmd_CasinoGame ; 780
.word ScrCmd_781 ; 781 .word ScrCmd_781 ; 781
.word ScrCmd_MartSell ; 782 .word ScrCmd_MartSell ; 782
.word ScrCmd_783 ; 783 .word ScrCmd_SetFollowPokeInhibitState ; 783
.word ScrCmd_ScriptOverlayCmd ; 784 .word ScrCmd_ScriptOverlayCmd ; 784
.word ScrCmd_BugContestAction ; 785 .word ScrCmd_BugContestAction ; 785
.word ScrCmd_BufferBugContestWinner ; 786 .word ScrCmd_BufferBugContestWinner ; 786
@ -15947,8 +15947,8 @@ ScrCmd_769: ; 0x02047C54
.balign 4, 0 .balign 4, 0
thumb_func_end ScrCmd_769 thumb_func_end ScrCmd_769
thumb_func_start ScrCmd_783 thumb_func_start ScrCmd_SetFollowPokeInhibitState
ScrCmd_783: ; 0x02047C64 ScrCmd_SetFollowPokeInhibitState: ; 0x02047C64
push {r4, lr} push {r4, lr}
ldr r4, [r0, #8] ldr r4, [r0, #8]
add r1, r4, #1 add r1, r4, #1
@ -15956,12 +15956,12 @@ ScrCmd_783: ; 0x02047C64
add r0, #0x80 add r0, #0x80
ldr r0, [r0] ldr r0, [r0]
ldr r0, [r0, #0xc] ldr r0, [r0, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
ldrb r1, [r4] ldrb r1, [r4]
bl sub_0202ED58 bl SavFollowPoke_SetInhibitFlagState
mov r0, #0 mov r0, #0
pop {r4, pc} pop {r4, pc}
thumb_func_end ScrCmd_783 thumb_func_end ScrCmd_SetFollowPokeInhibitState
; Loads an overlay containing additional script ; Loads an overlay containing additional script
; commands or data ; commands or data

View File

@ -505,7 +505,7 @@ _0204CF44:
add r0, r4, #0 add r0, r4, #0
add r1, r6, #0 add r1, r6, #0
lsr r2, r2, #0x18 lsr r2, r2, #0x18
bl sub_02069EE8 bl FollowPokeMapObjectSetParams
mov r1, #0 mov r1, #0
add r0, r4, #0 add r0, r4, #0
mvn r1, r1 mvn r1, r1

View File

@ -3,14 +3,14 @@
.text .text
thumb_func_start sub_0202ED18 thumb_func_start Sav2_FollowPoke_sizeof
sub_0202ED18: ; 0x0202ED18 Sav2_FollowPoke_sizeof: ; 0x0202ED18
mov r0, #8 mov r0, #8
bx lr bx lr
thumb_func_end sub_0202ED18 thumb_func_end Sav2_FollowPoke_sizeof
thumb_func_start sub_0202ED1C thumb_func_start Sav2_FollowPoke_init
sub_0202ED1C: ; 0x0202ED1C Sav2_FollowPoke_init: ; 0x0202ED1C
mov r1, #0 mov r1, #0
strb r1, [r0] strb r1, [r0]
strb r1, [r0, #1] strb r1, [r0, #1]
@ -23,31 +23,31 @@ sub_0202ED1C: ; 0x0202ED1C
str r1, [r0] str r1, [r0]
bx lr bx lr
.balign 4, 0 .balign 4, 0
thumb_func_end sub_0202ED1C thumb_func_end Sav2_FollowPoke_init
thumb_func_start sub_0202ED34 thumb_func_start Sav2_FollowPoke_get
sub_0202ED34: ; 0x0202ED34 Sav2_FollowPoke_get: ; 0x0202ED34
ldr r3, _0202ED3C ; =SavArray_get ldr r3, _0202ED3C ; =SavArray_get
mov r1, #0x21 mov r1, #0x21
bx r3 bx r3
nop nop
_0202ED3C: .word SavArray_get _0202ED3C: .word SavArray_get
thumb_func_end sub_0202ED34 thumb_func_end Sav2_FollowPoke_get
thumb_func_start sub_0202ED40 thumb_func_start SavFollowPoke_SetMapId
sub_0202ED40: ; 0x0202ED40 SavFollowPoke_SetMapId: ; 0x0202ED40
str r0, [r1] str r0, [r1]
bx lr bx lr
thumb_func_end sub_0202ED40 thumb_func_end SavFollowPoke_SetMapId
thumb_func_start sub_0202ED44 thumb_func_start SavFollowPoke_GetMapId
sub_0202ED44: ; 0x0202ED44 SavFollowPoke_GetMapId: ; 0x0202ED44
ldr r0, [r0] ldr r0, [r0]
bx lr bx lr
thumb_func_end sub_0202ED44 thumb_func_end SavFollowPoke_GetMapId
thumb_func_start sub_0202ED48 thumb_func_start SavFollowPoke_SetUnused2bitField
sub_0202ED48: ; 0x0202ED48 SavFollowPoke_SetUnused2bitField: ; 0x0202ED48
ldr r3, [r1, #4] ldr r3, [r1, #4]
mov r2, #3 mov r2, #3
bic r3, r2 bic r3, r2
@ -56,10 +56,10 @@ sub_0202ED48: ; 0x0202ED48
orr r0, r3 orr r0, r3
str r0, [r1, #4] str r0, [r1, #4]
bx lr bx lr
thumb_func_end sub_0202ED48 thumb_func_end SavFollowPoke_SetUnused2bitField
thumb_func_start sub_0202ED58 thumb_func_start SavFollowPoke_SetInhibitFlagState
sub_0202ED58: ; 0x0202ED58 SavFollowPoke_SetInhibitFlagState: ; 0x0202ED58
ldr r3, [r0, #4] ldr r3, [r0, #4]
mov r2, #4 mov r2, #4
lsl r1, r1, #0x1f lsl r1, r1, #0x1f
@ -68,14 +68,14 @@ sub_0202ED58: ; 0x0202ED58
orr r1, r3 orr r1, r3
str r1, [r0, #4] str r1, [r0, #4]
bx lr bx lr
thumb_func_end sub_0202ED58 thumb_func_end SavFollowPoke_SetInhibitFlagState
thumb_func_start sub_0202ED68 thumb_func_start SavFollowPoke_GetInhibitFlagState
sub_0202ED68: ; 0x0202ED68 SavFollowPoke_GetInhibitFlagState: ; 0x0202ED68
ldr r0, [r0, #4] ldr r0, [r0, #4]
lsl r0, r0, #0x1d lsl r0, r0, #0x1d
asr r0, r0, #0x1f asr r0, r0, #0x1f
lsl r0, r0, #0x18 lsl r0, r0, #0x18
lsr r0, r0, #0x18 lsr r0, r0, #0x18
bx lr bx lr
thumb_func_end sub_0202ED68 thumb_func_end SavFollowPoke_GetInhibitFlagState

View File

@ -287,9 +287,9 @@ _02053134:
add r0, #0x78 add r0, #0x78
strh r1, [r0] strh r1, [r0]
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
mov r1, #0 mov r1, #0
bl sub_0202ED58 bl SavFollowPoke_SetInhibitFlagState
ldr r0, [r4, #0xc] ldr r0, [r4, #0xc]
bl SavArray_Flags_get bl SavArray_Flags_get
bl sub_02066A2C bl sub_02066A2C

View File

@ -381,11 +381,11 @@ _02055E76:
bl ov01_022057D0 bl ov01_022057D0
_02055EB2: _02055EB2:
ldr r0, [r5, #0xc] ldr r0, [r5, #0xc]
bl sub_0202ED34 bl Sav2_FollowPoke_get
add r1, r0, #0 add r1, r0, #0
ldr r0, [r5, #0x20] ldr r0, [r5, #0x20]
ldr r0, [r0] ldr r0, [r0]
bl sub_0202ED40 bl SavFollowPoke_SetMapId
ldr r0, [r5, #0x20] ldr r0, [r5, #0x20]
ldr r0, [r0] ldr r0, [r0]
str r0, [r4, #0x20] str r0, [r4, #0x20]

View File

@ -111,7 +111,7 @@ scr_seq_T02GYM0101_001:
goto_if_eq _0186 goto_if_eq _0186
npc_msg msg_0454_T02GYM0101_00006 npc_msg msg_0454_T02GYM0101_00006
scrcmd_600 scrcmd_600
scrcmd_783 1 set_follow_poke_inhibit_state 1
scrcmd_607 scrcmd_607
scrcmd_109 253, 56 scrcmd_109 253, 56
setvar VAR_UNK_4127, 1 setvar VAR_UNK_4127, 1
@ -235,7 +235,7 @@ _037B:
wait_movement wait_movement
_037D: _037D:
scrcmd_600 scrcmd_600
scrcmd_783 1 set_follow_poke_inhibit_state 1
scrcmd_607 scrcmd_607
scrcmd_109 253, 56 scrcmd_109 253, 56
setvar VAR_UNK_4127, 1 setvar VAR_UNK_4127, 1

View File

@ -56,7 +56,7 @@ _0091:
touchscreen_menu_show touchscreen_menu_show
compare VAR_SPECIAL_RESULT, 1 compare VAR_SPECIAL_RESULT, 1
goto_if_eq _00ED goto_if_eq _00ED
scrcmd_783 1 set_follow_poke_inhibit_state 1
setvar VAR_UNK_412E, 5 setvar VAR_UNK_412E, 5
callstd std_prompt_save callstd std_prompt_save
copyvar VAR_SPECIAL_RESULT, VAR_TEMP_x4000 copyvar VAR_SPECIAL_RESULT, VAR_TEMP_x4000
@ -76,7 +76,7 @@ _0091:
end end
_00ED: _00ED:
scrcmd_783 0 set_follow_poke_inhibit_state 0
npc_msg msg_0458_T02R0302_00003 npc_msg msg_0458_T02R0302_00003
closemsg closemsg
scrcmd_602 0 scrcmd_602 0
@ -108,7 +108,7 @@ scr_seq_T02R0302_001:
closemsg closemsg
apply_movement obj_player, _0184 apply_movement obj_player, _0184
wait_movement wait_movement
scrcmd_783 0 set_follow_poke_inhibit_state 0
scrcmd_606 scrcmd_606
scrcmd_109 253, 48 scrcmd_109 253, 48
setvar VAR_UNK_412E, 3 setvar VAR_UNK_412E, 3

View File

@ -185,7 +185,7 @@ scr_seq_T30GYM0101_003:
goto_if_set FLAG_UNK_0D1, _0291 goto_if_set FLAG_UNK_0D1, _0291
npc_msg msg_0631_T30GYM0101_00000 npc_msg msg_0631_T30GYM0101_00000
scrcmd_600 scrcmd_600
scrcmd_783 1 set_follow_poke_inhibit_state 1
scrcmd_607 scrcmd_607
scrcmd_109 253, 56 scrcmd_109 253, 56
setvar VAR_UNK_4120, 1 setvar VAR_UNK_4120, 1
@ -244,7 +244,7 @@ _0350:
wait_movement wait_movement
_0352: _0352:
scrcmd_600 scrcmd_600
scrcmd_783 1 set_follow_poke_inhibit_state 1
scrcmd_607 scrcmd_607
scrcmd_109 253, 56 scrcmd_109 253, 56
setvar VAR_UNK_4120, 1 setvar VAR_UNK_4120, 1

View File

@ -2463,7 +2463,7 @@
.public ScrCmd_CasinoGame .public ScrCmd_CasinoGame
.public ScrCmd_781 .public ScrCmd_781
.public ScrCmd_MartSell .public ScrCmd_MartSell
.public ScrCmd_783 .public ScrCmd_SetFollowPokeInhibitState
.public ScrCmd_ScriptOverlayCmd .public ScrCmd_ScriptOverlayCmd
.public ScrCmd_BugContestAction .public ScrCmd_BugContestAction
.public ScrCmd_BufferBugContestWinner .public ScrCmd_BufferBugContestWinner
@ -27524,14 +27524,14 @@
.public sub_0202EC70 .public sub_0202EC70
.public sub_0202EC98 .public sub_0202EC98
.public UpdatePokedexWithReceivedSpecies .public UpdatePokedexWithReceivedSpecies
.public sub_0202ED18 .public Sav2_FollowPoke_sizeof
.public sub_0202ED1C .public Sav2_FollowPoke_init
.public sub_0202ED34 .public Sav2_FollowPoke_get
.public sub_0202ED40 .public SavFollowPoke_SetMapId
.public sub_0202ED44 .public SavFollowPoke_GetMapId
.public sub_0202ED48 .public SavFollowPoke_SetUnused2bitField
.public sub_0202ED58 .public SavFollowPoke_SetInhibitFlagState
.public sub_0202ED68 .public SavFollowPoke_GetInhibitFlagState
.public SaveData_GSPlayerMisc_sizeof .public SaveData_GSPlayerMisc_sizeof
.public SaveData_GSPlayerMisc_get .public SaveData_GSPlayerMisc_get
.public SaveData_GetPhoneRematches .public SaveData_GetPhoneRematches
@ -28803,7 +28803,7 @@
.public MapObjectMan_GetArray .public MapObjectMan_GetArray
.public sub_0205F1C4 .public sub_0205F1C4
.public sub_0205F1D0 .public sub_0205F1D0
.public sub_0205F1E4 .public MapObjectMan_GetFieldSysPtr
.public FldObjSys_SetMModelNarc .public FldObjSys_SetMModelNarc
.public FldObjSys_GetMModelNarc .public FldObjSys_GetMModelNarc
.public MapObject_SetBits .public MapObject_SetBits
@ -29262,9 +29262,9 @@
.public sub_02069EAC .public sub_02069EAC
.public sub_02069EC0 .public sub_02069EC0
.public sub_02069ED4 .public sub_02069ED4
.public sub_02069EE8 .public FollowPokeMapObjectSetParams
.public sub_02069F0C .public sub_02069F0C
.public sub_02069F3C .public FollowPokeFsysParamSet
.public sub_02069F64 .public sub_02069F64
.public sub_02069F7C .public sub_02069F7C
.public FollowingPokemon_IsActive .public FollowingPokemon_IsActive

View File

@ -810,7 +810,7 @@ BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT* ctx); BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_781(SCRIPTCONTEXT* ctx); BOOL ScrCmd_781(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_MartSell(SCRIPTCONTEXT* ctx); BOOL ScrCmd_MartSell(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_783(SCRIPTCONTEXT* ctx); BOOL ScrCmd_SetFollowPokeInhibitState(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT* ctx); BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT* ctx); BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT* ctx);
BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT* ctx); BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT* ctx);

View File

@ -152,6 +152,21 @@ typedef struct Location {
int direction; int direction;
} Location; } Location;
typedef struct FollowMon {
LocalMapObject *mapObject;
u32 unk4;
u32 unk8;
u32 unkC;
u32 species;
u8 gender;
u8 unk15;
u8 active;
u8 shiny;
u16 forme;
u16 dummy;
u32 unk1C;
} FollowMon;
struct FieldSystem { struct FieldSystem {
u8 unk0[0x8]; u8 unk0[0x8];
void* bg_config; void* bg_config;
@ -169,7 +184,11 @@ struct FieldSystem {
u32 unkAC; u32 unkAC;
u8 unkB0[0x4]; u8 unkB0[0x4];
s64 unkB4; s64 unkB4;
u8 unkBC[0x38]; u8 unkBC[0x28];
FollowMon unkE4;
u8 unk104[4];
void *unk108;
u8 filler_10C[8];
struct UnkFsysSub_114* unk114; struct UnkFsysSub_114* unk114;
BUGCONTEST* bugContest; BUGCONTEST* bugContest;
u8 unk11C[0xC]; u8 unk11C[0xC];

View File

@ -783,7 +783,7 @@ extern BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_781(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_781(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_MartSell(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_MartSell(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_783(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_SetFollowPokeInhibitState(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT *ctx);
extern BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT *ctx);
@ -1638,7 +1638,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
ScrCmd_CasinoGame, ScrCmd_CasinoGame,
ScrCmd_781, ScrCmd_781,
ScrCmd_MartSell, ScrCmd_MartSell,
ScrCmd_783, ScrCmd_SetFollowPokeInhibitState,
ScrCmd_ScriptOverlayCmd, ScrCmd_ScriptOverlayCmd,
ScrCmd_BugContestAction, ScrCmd_BugContestAction,
ScrCmd_BufferBugContestWinner, ScrCmd_BufferBugContestWinner,

View File

@ -4901,7 +4901,7 @@
"args": [] "args": []
}, },
{ {
"name": "scrcmd_783", "name": "set_follow_poke_inhibit_state",
"args": [ "args": [
1 1
] ]