diff --git a/asm/field_follow_poke.s b/asm/field_follow_poke.s index 804315de9..77272be0b 100644 --- a/asm/field_follow_poke.s +++ b/asm/field_follow_poke.s @@ -20,7 +20,7 @@ sub_020699F8: ; 0x020699F8 str r1, [sp, #0x14] str r2, [sp, #0x18] str r3, [sp, #0x1c] - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr add r4, r0, #0 ldr r0, [r4, #0xc] bl SavArray_PlayerParty_get @@ -31,10 +31,10 @@ sub_020699F8: ; 0x020699F8 add r0, #0xe4 bl sub_0206A06C ldr r0, [r4, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #0 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField cmp r6, #0 bne _02069A34 b _02069B6C @@ -107,7 +107,7 @@ _02069A4C: add r0, r4, #0 add r1, r6, #0 lsr r2, r2, #0x18 - bl sub_02069F3C + bl FollowPokeFsysParamSet mov r1, #0 add r0, r5, #0 add r2, r1, #0 @@ -128,19 +128,19 @@ _02069A4C: bne _02069B08 _02069AF8: ldr r0, [r4, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #1 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField b _02069B58 _02069B08: cmp r0, #1 bne _02069B2E ldr r0, [r4, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #2 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField add r0, r4, #0 bl sub_0206A054 add r0, r4, #0 @@ -152,10 +152,10 @@ _02069B2E: cmp r0, #2 bne _02069B54 ldr r0, [r4, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #2 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField add r0, r4, #0 bl sub_0206A054 add r0, r4, #0 @@ -167,8 +167,8 @@ _02069B54: bl GF_AssertFail _02069B58: ldr r0, [r4, #0xc] - bl sub_0202ED34 - bl sub_0202ED68 + bl Sav2_FollowPoke_get + bl SavFollowPoke_GetInhibitFlagState cmp r0, #0 beq _02069B6C add r0, r4, #0 @@ -185,7 +185,7 @@ sub_02069B74: ; 0x02069B74 push {r4, r5, r6, r7, lr} sub sp, #0x14 add r7, r1, #0 - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr add r5, r0, #0 ldr r0, [r5, #0xc] bl SavArray_PlayerParty_get @@ -263,13 +263,13 @@ _02069BF0: add r0, r5, #0 lsr r2, r2, #0x18 add r3, r6, #0 - bl sub_02069F3C + bl FollowPokeFsysParamSet lsl r2, r7, #0x18 ldr r0, [sp, #4] add r1, r4, #0 lsr r2, r2, #0x18 add r3, r6, #0 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams lsl r1, r7, #0x10 ldr r2, [sp, #8] add r0, r4, #0 @@ -288,19 +288,19 @@ _02069BF0: bne _02069C72 _02069C62: ldr r0, [r5, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #1 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField b _02069CB6 _02069C72: cmp r0, #1 bne _02069C92 ldr r0, [r5, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #2 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField add r0, r5, #0 add r0, #0xe4 ldr r0, [r0] @@ -311,10 +311,10 @@ _02069C92: cmp r0, #2 bne _02069CB2 ldr r0, [r5, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 mov r0, #2 - bl sub_0202ED48 + bl SavFollowPoke_SetUnused2bitField add r0, r5, #0 add r0, #0xe4 ldr r0, [r0] @@ -337,8 +337,8 @@ _02069CB6: bl sub_0206A040 _02069CD0: ldr r0, [r5, #0xc] - bl sub_0202ED34 - bl sub_0202ED68 + bl Sav2_FollowPoke_get + bl SavFollowPoke_GetInhibitFlagState cmp r0, #0 beq _02069CE4 add r0, r5, #0 @@ -374,13 +374,13 @@ _02069CF2: add r1, r4, #0 lsr r2, r2, #0x18 add r3, r6, #0 - bl sub_02069F3C + bl FollowPokeFsysParamSet lsl r2, r7, #0x18 ldr r0, [sp, #0xc] add r1, r4, #0 lsr r2, r2, #0x18 add r3, r6, #0 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams lsl r1, r7, #0x10 ldr r2, [sp, #0x10] add r0, r4, #0 @@ -628,8 +628,8 @@ sub_02069ED4: ; 0x02069ED4 pop {r3, pc} thumb_func_end sub_02069ED4 - thumb_func_start sub_02069EE8 -sub_02069EE8: ; 0x02069EE8 + thumb_func_start FollowPokeMapObjectSetParams +FollowPokeMapObjectSetParams: ; 0x02069EE8 push {r4, r5, r6, lr} add r4, r1, #0 add r5, r0, #0 @@ -639,13 +639,13 @@ sub_02069EE8: ; 0x02069EE8 add r0, r5, #0 add r1, r4, #0 add r2, r6, #0 - bl sub_0206A0E0 + bl FollowingPoke_SetObjectFormeParam add r0, r5, #0 add r1, r4, #0 mov r2, #0 bl MapObject_SetParam pop {r4, r5, r6, pc} - thumb_func_end sub_02069EE8 + thumb_func_end FollowPokeMapObjectSetParams thumb_func_start sub_02069F0C sub_02069F0C: ; 0x02069F0C @@ -663,7 +663,7 @@ sub_02069F0C: ; 0x02069F0C add r0, r5, #0 add r1, r4, #0 add r2, r6, #0 - bl sub_0206A0E0 + bl FollowingPoke_SetObjectFormeParam add r0, r5, #0 add r1, r4, #0 mov r2, #0 @@ -671,8 +671,8 @@ sub_02069F0C: ; 0x02069F0C pop {r3, r4, r5, r6, r7, pc} thumb_func_end sub_02069F0C - thumb_func_start sub_02069F3C -sub_02069F3C: ; 0x02069F3C + thumb_func_start FollowPokeFsysParamSet +FollowPokeFsysParamSet: ; 0x02069F3C push {r3, r4} add r4, r0, #0 add r4, #0xf4 @@ -692,7 +692,7 @@ sub_02069F3C: ; 0x02069F3C bx lr nop _02069F60: .word 0xFFFFFFF8 - thumb_func_end sub_02069F3C + thumb_func_end FollowPokeFsysParamSet thumb_func_start sub_02069F64 sub_02069F64: ; 0x02069F64 @@ -768,8 +768,8 @@ sub_02069FD4: ; 0x02069FD4 push {r3, r4, r5, lr} add r5, r0, #0 ldr r0, [r5, #0xc] - bl sub_0202ED34 - bl sub_0202ED44 + bl Sav2_FollowPoke_get + bl SavFollowPoke_GetMapId add r5, #0xe4 add r4, r0, #0 ldr r0, [r5] @@ -923,8 +923,8 @@ _0206A0DA: .balign 4, 0 thumb_func_end sub_0206A0A4 - thumb_func_start sub_0206A0E0 -sub_0206A0E0: ; 0x0206A0E0 + thumb_func_start FollowingPoke_SetObjectFormeParam +FollowingPoke_SetObjectFormeParam: ; 0x0206A0E0 push {r3, r4, r5, r6, r7, lr} add r6, r1, #0 add r7, r0, #0 @@ -958,7 +958,7 @@ _0206A106: mov r2, #1 bl MapObject_SetParam pop {r3, r4, r5, r6, r7, pc} - thumb_func_end sub_0206A0E0 + thumb_func_end FollowingPoke_SetObjectFormeParam thumb_func_start CreateFollowingSpriteFieldObject CreateFollowingSpriteFieldObject: ; 0x0206A128 @@ -1006,7 +1006,7 @@ _0206A15A: add r0, r4, #0 add r1, r5, #0 lsr r2, r2, #0x18 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams mov r1, #0 add r0, r4, #0 mvn r1, r1 @@ -1268,8 +1268,6 @@ _0206A358: .word NATIONAL_DEX_COUNT _0206A35C: .word _020FECAE thumb_func_end OverworldModelLookupHasFemaleForme - ; File boundary after here - .rodata _020FE8D4: diff --git a/asm/field_map_object.s b/asm/field_map_object.s index 94202b6ed..b10d32aaf 100644 --- a/asm/field_map_object.s +++ b/asm/field_map_object.s @@ -207,7 +207,7 @@ _0205E23E: add r4, r0, #0 beq _0205E290 add r0, r5, #0 - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr add r2, r0, #0 add r0, r4, #0 add r1, r6, #0 @@ -336,7 +336,7 @@ sub_0205E34C: ; 0x0205E34C bl ObjectEventTemplate_GetFlagID add r4, r0, #0 add r0, r5, #0 - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr lsl r1, r4, #0x10 lsr r1, r1, #0x10 bl FlagGet @@ -1129,7 +1129,7 @@ sub_0205EA08: ; 0x0205EA08 push {r3, r4, r5, r6, r7, lr} add r5, r0, #0 ldr r0, [r5, #0xc] - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr add r6, r5, #0 ldr r4, [r5, #0x10] add r7, r0, #0 @@ -2198,13 +2198,13 @@ MapObjectMan_SetFieldSysPtr: ; 0x0205F1DC bx lr thumb_func_end MapObjectMan_SetFieldSysPtr - thumb_func_start sub_0205F1E4 -sub_0205F1E4: ; 0x0205F1E4 + thumb_func_start MapObjectMan_GetFieldSysPtr +MapObjectMan_GetFieldSysPtr: ; 0x0205F1E4 mov r1, #0x4a lsl r1, r1, #2 ldr r0, [r0, r1] bx lr - thumb_func_end sub_0205F1E4 + thumb_func_end MapObjectMan_GetFieldSysPtr thumb_func_start FldObjSys_SetMModelNarc FldObjSys_SetMModelNarc: ; 0x0205F1EC @@ -2955,7 +2955,7 @@ sub_0205F524: ; 0x0205F524 MapObject_GetFieldSysPtr: ; 0x0205F52C push {r3, lr} bl sub_0205F364 - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr pop {r3, pc} thumb_func_end MapObject_GetFieldSysPtr diff --git a/asm/field_take_photo.s b/asm/field_take_photo.s index 03d9eae39..ae6cd3ba8 100644 --- a/asm/field_take_photo.s +++ b/asm/field_take_photo.s @@ -972,7 +972,7 @@ sub_0206AEC0: ; 0x0206AEC0 add r0, r4, #0 add r1, r5, #0 lsr r2, r2, #0x18 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams add r0, r4, #0 add sp, #8 pop {r4, r5, r6, pc} diff --git a/asm/macros/script.inc b/asm/macros/script.inc index f6d73e1f8..4bbef5c9f 100644 --- a/asm/macros/script.inc +++ b/asm/macros/script.inc @@ -4384,7 +4384,7 @@ .short 782 .endm - .macro scrcmd_783 arg0 + .macro set_follow_poke_inhibit_state arg0 .short 783 .byte \arg0 .endm diff --git a/asm/overlay_01.s b/asm/overlay_01.s index 28244640f..8141ed586 100644 --- a/asm/overlay_01.s +++ b/asm/overlay_01.s @@ -37668,7 +37668,7 @@ _021F7522: _021F7524: add r0, r5, #0 bl sub_0205F35C - bl sub_0205F1E4 + bl MapObjectMan_GetFieldSysPtr str r0, [sp, #0x10] ldr r0, [r0, #0xc] bl SavArray_PlayerParty_get @@ -37704,7 +37704,7 @@ _021F7524: ldr r3, [sp, #4] add r0, r5, #0 add r1, r7, #0 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams ldr r1, [sp, #0x14] add r0, r5, #0 bl MapObject_SetGfxID @@ -37776,7 +37776,7 @@ _021F761C: ldr r3, [sp, #4] add r1, r7, #0 lsr r2, r2, #0x18 - bl sub_02069F3C + bl FollowPokeFsysParamSet add r0, r5, #0 mov r1, #1 bl MapObject_ForceSetFacingDirection diff --git a/asm/overlay_02.s b/asm/overlay_02.s index 0c48a0629..9538f5687 100644 --- a/asm/overlay_02.s +++ b/asm/overlay_02.s @@ -26451,7 +26451,7 @@ _0225244E: ldrb r3, [r4] ldr r0, [r0] lsl r1, r1, #2 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams ldr r0, [r5] add r0, r0, #1 str r0, [r5] diff --git a/asm/save.s b/asm/save.s index 8550c8c57..ccf04e80f 100644 --- a/asm/save.s +++ b/asm/save.s @@ -53,7 +53,7 @@ _020F64C4: .word 0x0000001E, 0x00000000, Sav2_EasyChat_sizeof, Sav2_EasyChat_init .word 0x0000001F, 0x00000000, sub_0203170C, sub_02031710 .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 0x00000023, 0x00000000, Save_SafariZone_sizeof, Save_SafariZone_init .word 0x00000024, 0x00000000, Save_PhotoAlbum_sizeof, Save_PhotoAlbum_init diff --git a/asm/scrcmd.s b/asm/scrcmd.s index 883a40143..0c95c5254 100644 --- a/asm/scrcmd.s +++ b/asm/scrcmd.s @@ -833,7 +833,7 @@ gScriptCmdTable: .word ScrCmd_CasinoGame ; 780 .word ScrCmd_781 ; 781 .word ScrCmd_MartSell ; 782 - .word ScrCmd_783 ; 783 + .word ScrCmd_SetFollowPokeInhibitState ; 783 .word ScrCmd_ScriptOverlayCmd ; 784 .word ScrCmd_BugContestAction ; 785 .word ScrCmd_BufferBugContestWinner ; 786 @@ -15947,8 +15947,8 @@ ScrCmd_769: ; 0x02047C54 .balign 4, 0 thumb_func_end ScrCmd_769 - thumb_func_start ScrCmd_783 -ScrCmd_783: ; 0x02047C64 + thumb_func_start ScrCmd_SetFollowPokeInhibitState +ScrCmd_SetFollowPokeInhibitState: ; 0x02047C64 push {r4, lr} ldr r4, [r0, #8] add r1, r4, #1 @@ -15956,12 +15956,12 @@ ScrCmd_783: ; 0x02047C64 add r0, #0x80 ldr r0, [r0] ldr r0, [r0, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get ldrb r1, [r4] - bl sub_0202ED58 + bl SavFollowPoke_SetInhibitFlagState mov r0, #0 pop {r4, pc} - thumb_func_end ScrCmd_783 + thumb_func_end ScrCmd_SetFollowPokeInhibitState ; Loads an overlay containing additional script ; commands or data diff --git a/asm/scrcmd_14.s b/asm/scrcmd_14.s index c044be2e8..60ef94120 100644 --- a/asm/scrcmd_14.s +++ b/asm/scrcmd_14.s @@ -505,7 +505,7 @@ _0204CF44: add r0, r4, #0 add r1, r6, #0 lsr r2, r2, #0x18 - bl sub_02069EE8 + bl FollowPokeMapObjectSetParams mov r1, #0 add r0, r4, #0 mvn r1, r1 diff --git a/asm/unk_0202ED18.s b/asm/unk_0202ED18.s index cd3fef7c2..02f20c933 100644 --- a/asm/unk_0202ED18.s +++ b/asm/unk_0202ED18.s @@ -3,14 +3,14 @@ .text - thumb_func_start sub_0202ED18 -sub_0202ED18: ; 0x0202ED18 + thumb_func_start Sav2_FollowPoke_sizeof +Sav2_FollowPoke_sizeof: ; 0x0202ED18 mov r0, #8 bx lr - thumb_func_end sub_0202ED18 + thumb_func_end Sav2_FollowPoke_sizeof - thumb_func_start sub_0202ED1C -sub_0202ED1C: ; 0x0202ED1C + thumb_func_start Sav2_FollowPoke_init +Sav2_FollowPoke_init: ; 0x0202ED1C mov r1, #0 strb r1, [r0] strb r1, [r0, #1] @@ -23,31 +23,31 @@ sub_0202ED1C: ; 0x0202ED1C str r1, [r0] bx lr .balign 4, 0 - thumb_func_end sub_0202ED1C + thumb_func_end Sav2_FollowPoke_init - thumb_func_start sub_0202ED34 -sub_0202ED34: ; 0x0202ED34 + thumb_func_start Sav2_FollowPoke_get +Sav2_FollowPoke_get: ; 0x0202ED34 ldr r3, _0202ED3C ; =SavArray_get mov r1, #0x21 bx r3 nop _0202ED3C: .word SavArray_get - thumb_func_end sub_0202ED34 + thumb_func_end Sav2_FollowPoke_get - thumb_func_start sub_0202ED40 -sub_0202ED40: ; 0x0202ED40 + thumb_func_start SavFollowPoke_SetMapId +SavFollowPoke_SetMapId: ; 0x0202ED40 str r0, [r1] bx lr - thumb_func_end sub_0202ED40 + thumb_func_end SavFollowPoke_SetMapId - thumb_func_start sub_0202ED44 -sub_0202ED44: ; 0x0202ED44 + thumb_func_start SavFollowPoke_GetMapId +SavFollowPoke_GetMapId: ; 0x0202ED44 ldr r0, [r0] bx lr - thumb_func_end sub_0202ED44 + thumb_func_end SavFollowPoke_GetMapId - thumb_func_start sub_0202ED48 -sub_0202ED48: ; 0x0202ED48 + thumb_func_start SavFollowPoke_SetUnused2bitField +SavFollowPoke_SetUnused2bitField: ; 0x0202ED48 ldr r3, [r1, #4] mov r2, #3 bic r3, r2 @@ -56,10 +56,10 @@ sub_0202ED48: ; 0x0202ED48 orr r0, r3 str r0, [r1, #4] bx lr - thumb_func_end sub_0202ED48 + thumb_func_end SavFollowPoke_SetUnused2bitField - thumb_func_start sub_0202ED58 -sub_0202ED58: ; 0x0202ED58 + thumb_func_start SavFollowPoke_SetInhibitFlagState +SavFollowPoke_SetInhibitFlagState: ; 0x0202ED58 ldr r3, [r0, #4] mov r2, #4 lsl r1, r1, #0x1f @@ -68,14 +68,14 @@ sub_0202ED58: ; 0x0202ED58 orr r1, r3 str r1, [r0, #4] bx lr - thumb_func_end sub_0202ED58 + thumb_func_end SavFollowPoke_SetInhibitFlagState - thumb_func_start sub_0202ED68 -sub_0202ED68: ; 0x0202ED68 + thumb_func_start SavFollowPoke_GetInhibitFlagState +SavFollowPoke_GetInhibitFlagState: ; 0x0202ED68 ldr r0, [r0, #4] lsl r0, r0, #0x1d asr r0, r0, #0x1f lsl r0, r0, #0x18 lsr r0, r0, #0x18 bx lr - thumb_func_end sub_0202ED68 + thumb_func_end SavFollowPoke_GetInhibitFlagState diff --git a/asm/unk_02052F30.s b/asm/unk_02052F30.s index 40bd43b27..23dccffea 100644 --- a/asm/unk_02052F30.s +++ b/asm/unk_02052F30.s @@ -287,9 +287,9 @@ _02053134: add r0, #0x78 strh r1, [r0] ldr r0, [r4, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get mov r1, #0 - bl sub_0202ED58 + bl SavFollowPoke_SetInhibitFlagState ldr r0, [r4, #0xc] bl SavArray_Flags_get bl sub_02066A2C diff --git a/asm/unk_02055BF0.s b/asm/unk_02055BF0.s index 7c3c250f3..45c0da3b5 100644 --- a/asm/unk_02055BF0.s +++ b/asm/unk_02055BF0.s @@ -381,11 +381,11 @@ _02055E76: bl ov01_022057D0 _02055EB2: ldr r0, [r5, #0xc] - bl sub_0202ED34 + bl Sav2_FollowPoke_get add r1, r0, #0 ldr r0, [r5, #0x20] ldr r0, [r0] - bl sub_0202ED40 + bl SavFollowPoke_SetMapId ldr r0, [r5, #0x20] ldr r0, [r0] str r0, [r4, #0x20] diff --git a/files/fielddata/script/scr_seq/scr_seq_0743_T02GYM0101.s b/files/fielddata/script/scr_seq/scr_seq_0743_T02GYM0101.s index 40df50193..b6a2f088e 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0743_T02GYM0101.s +++ b/files/fielddata/script/scr_seq/scr_seq_0743_T02GYM0101.s @@ -111,7 +111,7 @@ scr_seq_T02GYM0101_001: goto_if_eq _0186 npc_msg msg_0454_T02GYM0101_00006 scrcmd_600 - scrcmd_783 1 + set_follow_poke_inhibit_state 1 scrcmd_607 scrcmd_109 253, 56 setvar VAR_UNK_4127, 1 @@ -235,7 +235,7 @@ _037B: wait_movement _037D: scrcmd_600 - scrcmd_783 1 + set_follow_poke_inhibit_state 1 scrcmd_607 scrcmd_109 253, 56 setvar VAR_UNK_4127, 1 diff --git a/files/fielddata/script/scr_seq/scr_seq_0748_T02R0302.s b/files/fielddata/script/scr_seq/scr_seq_0748_T02R0302.s index 48252e4b9..d3a33b6be 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0748_T02R0302.s +++ b/files/fielddata/script/scr_seq/scr_seq_0748_T02R0302.s @@ -56,7 +56,7 @@ _0091: touchscreen_menu_show compare VAR_SPECIAL_RESULT, 1 goto_if_eq _00ED - scrcmd_783 1 + set_follow_poke_inhibit_state 1 setvar VAR_UNK_412E, 5 callstd std_prompt_save copyvar VAR_SPECIAL_RESULT, VAR_TEMP_x4000 @@ -76,7 +76,7 @@ _0091: end _00ED: - scrcmd_783 0 + set_follow_poke_inhibit_state 0 npc_msg msg_0458_T02R0302_00003 closemsg scrcmd_602 0 @@ -108,7 +108,7 @@ scr_seq_T02R0302_001: closemsg apply_movement obj_player, _0184 wait_movement - scrcmd_783 0 + set_follow_poke_inhibit_state 0 scrcmd_606 scrcmd_109 253, 48 setvar VAR_UNK_412E, 3 diff --git a/files/fielddata/script/scr_seq/scr_seq_0943_T30GYM0101.s b/files/fielddata/script/scr_seq/scr_seq_0943_T30GYM0101.s index 1d3e7c808..9c7e9a752 100644 --- a/files/fielddata/script/scr_seq/scr_seq_0943_T30GYM0101.s +++ b/files/fielddata/script/scr_seq/scr_seq_0943_T30GYM0101.s @@ -185,7 +185,7 @@ scr_seq_T30GYM0101_003: goto_if_set FLAG_UNK_0D1, _0291 npc_msg msg_0631_T30GYM0101_00000 scrcmd_600 - scrcmd_783 1 + set_follow_poke_inhibit_state 1 scrcmd_607 scrcmd_109 253, 56 setvar VAR_UNK_4120, 1 @@ -244,7 +244,7 @@ _0350: wait_movement _0352: scrcmd_600 - scrcmd_783 1 + set_follow_poke_inhibit_state 1 scrcmd_607 scrcmd_109 253, 56 setvar VAR_UNK_4120, 1 diff --git a/global.inc b/global.inc index 3269d1318..6a0b7a81b 100644 --- a/global.inc +++ b/global.inc @@ -2463,7 +2463,7 @@ .public ScrCmd_CasinoGame .public ScrCmd_781 .public ScrCmd_MartSell -.public ScrCmd_783 +.public ScrCmd_SetFollowPokeInhibitState .public ScrCmd_ScriptOverlayCmd .public ScrCmd_BugContestAction .public ScrCmd_BufferBugContestWinner @@ -27524,14 +27524,14 @@ .public sub_0202EC70 .public sub_0202EC98 .public UpdatePokedexWithReceivedSpecies -.public sub_0202ED18 -.public sub_0202ED1C -.public sub_0202ED34 -.public sub_0202ED40 -.public sub_0202ED44 -.public sub_0202ED48 -.public sub_0202ED58 -.public sub_0202ED68 +.public Sav2_FollowPoke_sizeof +.public Sav2_FollowPoke_init +.public Sav2_FollowPoke_get +.public SavFollowPoke_SetMapId +.public SavFollowPoke_GetMapId +.public SavFollowPoke_SetUnused2bitField +.public SavFollowPoke_SetInhibitFlagState +.public SavFollowPoke_GetInhibitFlagState .public SaveData_GSPlayerMisc_sizeof .public SaveData_GSPlayerMisc_get .public SaveData_GetPhoneRematches @@ -28803,7 +28803,7 @@ .public MapObjectMan_GetArray .public sub_0205F1C4 .public sub_0205F1D0 -.public sub_0205F1E4 +.public MapObjectMan_GetFieldSysPtr .public FldObjSys_SetMModelNarc .public FldObjSys_GetMModelNarc .public MapObject_SetBits @@ -29262,9 +29262,9 @@ .public sub_02069EAC .public sub_02069EC0 .public sub_02069ED4 -.public sub_02069EE8 +.public FollowPokeMapObjectSetParams .public sub_02069F0C -.public sub_02069F3C +.public FollowPokeFsysParamSet .public sub_02069F64 .public sub_02069F7C .public FollowingPokemon_IsActive diff --git a/include/scrcmd.h b/include/scrcmd.h index 1ffc4ca58..27bc86899 100644 --- a/include/scrcmd.h +++ b/include/scrcmd.h @@ -810,7 +810,7 @@ BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT* ctx); BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT* ctx); BOOL ScrCmd_781(SCRIPTCONTEXT* ctx); BOOL ScrCmd_MartSell(SCRIPTCONTEXT* ctx); -BOOL ScrCmd_783(SCRIPTCONTEXT* ctx); +BOOL ScrCmd_SetFollowPokeInhibitState(SCRIPTCONTEXT* ctx); BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT* ctx); BOOL ScrCmd_BugContestAction(SCRIPTCONTEXT* ctx); BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT* ctx); diff --git a/include/script.h b/include/script.h index d5ba8c33f..486b2b5c4 100644 --- a/include/script.h +++ b/include/script.h @@ -152,6 +152,21 @@ typedef struct Location { int direction; } 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 { u8 unk0[0x8]; void* bg_config; @@ -169,7 +184,11 @@ struct FieldSystem { u32 unkAC; u8 unkB0[0x4]; s64 unkB4; - u8 unkBC[0x38]; + u8 unkBC[0x28]; + FollowMon unkE4; + u8 unk104[4]; + void *unk108; + u8 filler_10C[8]; struct UnkFsysSub_114* unk114; BUGCONTEST* bugContest; u8 unk11C[0xC]; diff --git a/src/data/fieldmap/script_cmd_table.h b/src/data/fieldmap/script_cmd_table.h index 2fba40621..db4f00d40 100644 --- a/src/data/fieldmap/script_cmd_table.h +++ b/src/data/fieldmap/script_cmd_table.h @@ -783,7 +783,7 @@ extern BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_781(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_BugContestAction(SCRIPTCONTEXT *ctx); extern BOOL ScrCmd_BufferBugContestWinner(SCRIPTCONTEXT *ctx); @@ -1638,7 +1638,7 @@ const ScrCmdFunc gScriptCmdTable[] = { ScrCmd_CasinoGame, ScrCmd_781, ScrCmd_MartSell, - ScrCmd_783, + ScrCmd_SetFollowPokeInhibitState, ScrCmd_ScriptOverlayCmd, ScrCmd_BugContestAction, ScrCmd_BufferBugContestWinner, diff --git a/tools/py_scripts/scrcmd.json b/tools/py_scripts/scrcmd.json index f730045c9..b655d8db6 100644 --- a/tools/py_scripts/scrcmd.json +++ b/tools/py_scripts/scrcmd.json @@ -4901,7 +4901,7 @@ "args": [] }, { - "name": "scrcmd_783", + "name": "set_follow_poke_inhibit_state", "args": [ 1 ]