diff --git a/asm/battle_setup.s b/asm/battle_setup.s index 22247415c..d2d0eb9f2 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -378,7 +378,7 @@ sub_02051AAC: ; 0x02051AAC lsl r0, r0, #2 strb r1, [r4, r0] ldr r0, [r5, #0xc] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get mov r1, #0x45 lsl r1, r1, #2 str r0, [r4, r1] @@ -695,7 +695,7 @@ _02051E14: mov r2, #0 bl sub_02051D04 add r0, r4, #0 - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get mov r1, #0x45 lsl r1, r1, #2 str r0, [r5, r1] @@ -919,7 +919,7 @@ _02052004: bl sub_02051D04 ldr r0, [sp] ldr r0, [r0, #0xc] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get mov r1, #0x45 lsl r1, r1, #2 str r0, [r5, r1] @@ -1147,7 +1147,7 @@ _020521F6: bl sub_02051D04 ldr r0, [sp] ldr r0, [r0, #0xc] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get mov r1, #0x45 lsl r1, r1, #2 str r0, [r5, r1] diff --git a/asm/include/battle_setup.inc b/asm/include/battle_setup.inc index 3ccae6e37..642bbe7bf 100644 --- a/asm/include/battle_setup.inc +++ b/asm/include/battle_setup.inc @@ -12,7 +12,7 @@ .public String_New .public String_Delete .public String_cstr -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public Save_SysInfo_RTC_Get .public Save_PlayerData_GetProfileAddr .public Save_PlayerData_GetOptionsAddr diff --git a/asm/include/overlay_101.inc b/asm/include/overlay_101.inc index 32586d83b..3e00a7ba2 100644 --- a/asm/include/overlay_101.inc +++ b/asm/include/overlay_101.inc @@ -168,7 +168,7 @@ .public String_CountLines .public String_GetLineN .public String_RadioAddStatic -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public Save_SysInfo_RTC_Get .public Save_PlayerData_GetProfileAddr .public Save_PlayerData_GetOptionsAddr diff --git a/asm/include/overlay_112.inc b/asm/include/overlay_112.inc index 4b2a443d5..a6e0cae90 100644 --- a/asm/include/overlay_112.inc +++ b/asm/include/overlay_112.inc @@ -200,7 +200,7 @@ .public CopyStringToU16Array .public String_Cat .public String_AddChar -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public SaveGameNormal .public Save_ClearStatusFlags .public Save_PlayerData_GetProfileAddr diff --git a/asm/include/overlay_14.inc b/asm/include/overlay_14.inc index 26a96b7ce..c5f433899 100644 --- a/asm/include/overlay_14.inc +++ b/asm/include/overlay_14.inc @@ -202,7 +202,7 @@ .public sub_02025380 .public String_New .public String_Delete -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public Save_PlayerData_GetProfileAddr .public Save_PlayerData_GetOptionsAddr .public Options_GetFrame diff --git a/asm/include/overlay_40.inc b/asm/include/overlay_40.inc index 1afa6dc80..2a6551297 100644 --- a/asm/include/overlay_40.inc +++ b/asm/include/overlay_40.inc @@ -180,7 +180,7 @@ .public sub_02026E50 .public GF_3DVramMan_Create .public GF_3DVramMan_Delete -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public sub_02027134 .public SaveGameNormal .public Save_NumModifiedPCBoxesIsMany diff --git a/asm/include/overlay_97.inc b/asm/include/overlay_97.inc index de9a19969..191a24e38 100644 --- a/asm/include/overlay_97.inc +++ b/asm/include/overlay_97.inc @@ -74,7 +74,7 @@ .public String_New .public String_Delete .public CopyU16ArrayToString -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public Save_Pokeathlon_Get .public sub_020319A8 .public sub_0203A994 diff --git a/asm/include/unk_0203E348.inc b/asm/include/unk_0203E348.inc index f5979bebc..afaf90fc0 100644 --- a/asm/include/unk_0203E348.inc +++ b/asm/include/unk_0203E348.inc @@ -16,7 +16,7 @@ .public CopyU16ArrayToString .public String_cstr .public sub_020270C4 -.public Save_PCStorage_Get +.public SaveArray_PCStorage_Get .public LoadHallOfFame .public SaveArray_Get .public Save_SysInfo_Get diff --git a/asm/overlay_101.s b/asm/overlay_101.s index 2a75f3694..272c79cd4 100644 --- a/asm/overlay_101.s +++ b/asm/overlay_101.s @@ -24741,7 +24741,7 @@ _021F3634: pop {r4, r5, r6, pc} _021F3642: ldr r0, [r4, #0x1c] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r6, r0, #0 bl PCStorage_GetActiveBox add r1, r0, #0 diff --git a/asm/overlay_112.s b/asm/overlay_112.s index 607332b26..7567cee76 100644 --- a/asm/overlay_112.s +++ b/asm/overlay_112.s @@ -10118,7 +10118,7 @@ ov112_021EAC5C: ; 0x021EAC5C sub sp, #0x14 add r5, r0, #0 ldr r0, [r5, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r4, r0, #0 mov r0, #6 str r0, [sp] @@ -12781,7 +12781,7 @@ ov112_021EC134: ; 0x021EC134 mov r0, #0 str r0, [sp, #4] ldr r0, [r5, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r4, r0, #0 ldr r0, _021EC1A0 ; =0x0001E440 add r1, sp, #0 @@ -17459,7 +17459,7 @@ ov112_021EE628: ; 0x021EE628 push {r3, r4, r5, r6, r7, lr} add r5, r0, #0 ldr r0, [r5, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r7, r0, #0 ldr r0, _021EE67C ; =0x0001D770 mov r1, #2 @@ -17678,7 +17678,7 @@ ov112_021EE7A8: ; 0x021EE7A8 sub sp, #0x14 add r5, r0, #0 ldr r0, [r5, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get str r0, [sp, #4] mov r0, #0x9a bl AllocMonZeroed @@ -18079,7 +18079,7 @@ ov112_021EEAF0: ; 0x021EEAF0 add r5, r0, #0 ldr r0, [r5, #0x20] add r6, r1, #0 - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r7, r0, #0 mov r0, #0x9a bl AllocMonZeroed @@ -18672,7 +18672,7 @@ _021EEF86: add r0, r6, #0 str r1, [r5, r0] ldr r0, [r5, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r4, r0, #0 ldr r0, [r5, #0x20] bl SaveArray_Party_Get @@ -19154,7 +19154,7 @@ ov112_021EF31C: ; 0x021EF31C str r1, [r4, r0] pop {r4, r5, r6, pc} _021EF38C: - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r2, [r5, #0x10] add r1, r6, #0 bl PCStorage_GetMonByIndexPair @@ -19171,7 +19171,7 @@ _021EF38C: str r1, [r4, r0] _021EF3B0: ldr r0, [r4, #0x20] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r1, [r5, #0xc] ldr r2, [r5, #0x10] add r3, sp, #0 @@ -19311,7 +19311,7 @@ _021EF4A2: add sp, #0x60 pop {r3, r4, r5, r6, r7, pc} _021EF4D6: - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r1, r5, #0 add r2, r4, #0 add r3, sp, #4 diff --git a/asm/overlay_14.s b/asm/overlay_14.s index 2b873ead0..7b1741496 100644 --- a/asm/overlay_14.s +++ b/asm/overlay_14.s @@ -26,7 +26,7 @@ ov14_021E5900: ; 0x021E5900 bl OverlayManager_GetArgs str r0, [r4] ldr r0, [r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get str r0, [r4, #4] bl PCStorage_GetActiveBox strb r0, [r4, #0x1f] diff --git a/asm/overlay_40.s b/asm/overlay_40.s index 2ab07237f..c41e93bec 100644 --- a/asm/overlay_40.s +++ b/asm/overlay_40.s @@ -21741,7 +21741,7 @@ ov40_022365A0: ; 0x022365A0 mov r0, #0x83 lsl r0, r0, #4 ldr r0, [r5, r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get str r0, [r4] mov r0, #0x83 mov r2, #0x1a @@ -23674,7 +23674,7 @@ ov40_0223757C: ; 0x0223757C ldr r4, [r5, r0] sub r0, #0x30 ldr r0, [r5, r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r0, _0223763C ; =0x0000017A ldrb r1, [r4, r0] cmp r1, #0x10 @@ -23769,7 +23769,7 @@ ov40_02237644: ; 0x02237644 ldr r4, [r5, r0] sub r0, #0x30 ldr r0, [r5, r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r1, _022376F8 ; =0x0000017A ldrb r2, [r4, r1] cmp r2, #0x10 diff --git a/asm/overlay_97.s b/asm/overlay_97.s index 774257e2b..aada6f647 100644 --- a/asm/overlay_97.s +++ b/asm/overlay_97.s @@ -216,7 +216,7 @@ ov97_0221E700: ; 0x0221E700 mov r6, #1 _0221E76A: ldr r0, [r5] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r7, r0, #0 ldr r0, [r5] bl SaveArray_Party_Get @@ -559,7 +559,7 @@ _0221E9B4: b _0221EA6A _0221EA20: ldr r0, [r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r2, [r5, #0x14] add r1, r6, #0 add r3, sp, #0xc @@ -583,7 +583,7 @@ _0221EA20: strb r0, [r4, #0x1d] ldr r0, [r7] ldr r0, [r0] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get ldr r1, [r5, #0x10] ldr r2, [r5, #0x14] bl PCStorage_GetMonByIndexPair @@ -931,7 +931,7 @@ _0221ED04: add sp, #0xc0 pop {r3, r4, r5, r6, r7, pc} _0221ED1C: - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r1, r6, #0 add r2, r4, #0 add r3, sp, #0x2c @@ -956,7 +956,7 @@ _0221ED1C: ldrh r1, [r1, #0x3e] strb r1, [r0, #8] ldr r0, [r5, #0x2c] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get add r1, r6, #0 add r2, r4, #0 bl PCStorage_GetMonByIndexPair diff --git a/asm/unk_0203E348.s b/asm/unk_0203E348.s index f81192fa7..20acf3ef7 100644 --- a/asm/unk_0203E348.s +++ b/asm/unk_0203E348.s @@ -2891,7 +2891,7 @@ sub_0203F844: ; 0x0203F844 bl SaveArray_Get str r0, [r4, #8] ldr r0, [r5, #0xc] - bl Save_PCStorage_Get + bl SaveArray_PCStorage_Get str r0, [r4, #0xc] ldr r0, [r5, #0xc] bl Save_Pokedex_Get diff --git a/include/save_arrays.h b/include/save_arrays.h index cf123bf8f..c4b94edc8 100644 --- a/include/save_arrays.h +++ b/include/save_arrays.h @@ -33,7 +33,7 @@ extern const struct ExtraSaveChunkHeader gExtraSaveChunkHeaders[]; extern const int gNumExtraSaveChunkHeaders; struct UnkStruct_0202E474 *sub_020270C4(SaveData *saveData); -PC_STORAGE *Save_PCStorage_Get(SaveData *saveData); +PC_STORAGE *SaveArray_PCStorage_Get(SaveData *saveData); MYSTERY_GIFT_SAVE *Save_MysteryGift_Get(SaveData *saveData); struct MigratedPokemonSav *Save_MigratedPokemon_Get(SaveData *saveData); HALL_OF_FAME *LoadHallOfFame(SaveData *saveData, HeapID heapId, int *ret_p); diff --git a/src/encounter.c b/src/encounter.c index e1ea279cf..38994c210 100644 --- a/src/encounter.c +++ b/src/encounter.c @@ -457,7 +457,7 @@ static BOOL Task_SafariEncounter(TaskManager *man) { QueueScript(man, std_safari_balls_out, NULL, NULL); } } else { - PC_STORAGE *pc = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); Party *party = SaveArray_Party_Get(fieldSystem->saveData); if (PCStorage_FindFirstBoxWithEmptySlot(pc) == 18 && Party_GetCount(party) == 6) { QueueScript(man, std_safari_storage_out, NULL, NULL); diff --git a/src/overlay_bug_contest.c b/src/overlay_bug_contest.c index 6995f3c00..942fd2604 100644 --- a/src/overlay_bug_contest.c +++ b/src/overlay_bug_contest.c @@ -220,7 +220,7 @@ void BugContest_RestoreParty_RetrieveCaughtPokemon(BUGCONTEST *bugContest) { if (bugContest->caught_poke) { if (bugContest->party_cur_num >= PARTY_SIZE) { - PCStorage_PlaceMonInFirstEmptySlotInAnyBox(Save_PCStorage_Get(bugContest->saveData), Mon_GetBoxMon(bugContest->mon)); + PCStorage_PlaceMonInFirstEmptySlotInAnyBox(SaveArray_PCStorage_Get(bugContest->saveData), Mon_GetBoxMon(bugContest->mon)); } else { Party_AddMon(bugContest->party_cur, bugContest->mon); } diff --git a/src/save_arrays.c b/src/save_arrays.c index bbff92e43..39b1f4d06 100644 --- a/src/save_arrays.c +++ b/src/save_arrays.c @@ -267,7 +267,7 @@ struct UnkStruct_0202E474 *sub_020270C4(SaveData *saveData) { return SaveArray_Get(saveData, SAVE_UNK_23); } -PC_STORAGE *Save_PCStorage_Get(SaveData *saveData) { +PC_STORAGE *SaveArray_PCStorage_Get(SaveData *saveData) { return SaveArray_Get(saveData, SAVE_PCSTORAGE); } diff --git a/src/scrcmd_12.c b/src/scrcmd_12.c index baa7b79a1..115294dfc 100644 --- a/src/scrcmd_12.c +++ b/src/scrcmd_12.c @@ -54,7 +54,7 @@ BOOL ScrCmd_509(ScriptContext *ctx) { BOOL ScrCmd_510(ScriptContext *ctx) { struct MigratedPokemonSav *unkStruct = Save_MigratedPokemon_Get(ctx->fieldSystem->saveData); - PC_STORAGE *storage = Save_PCStorage_Get(ctx->fieldSystem->saveData); + PC_STORAGE *storage = SaveArray_PCStorage_Get(ctx->fieldSystem->saveData); Pokemon *mon = AllocMonZeroed(HEAP_ID_32); PlayerProfile *profile = Save_PlayerData_GetProfileAddr(ctx->fieldSystem->saveData); Pokedex *pokedex = Save_Pokedex_Get(ctx->fieldSystem->saveData); diff --git a/src/scrcmd_c.c b/src/scrcmd_c.c index 5fe72b6f6..2d1413416 100644 --- a/src/scrcmd_c.c +++ b/src/scrcmd_c.c @@ -3575,7 +3575,7 @@ BOOL ScrCmd_PrimoPasswordCheck1(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); u16 *p_ret = ScriptGetVarPointer(ctx); - PC_STORAGE *pcStorage = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); u16 a = ScriptGetVar(ctx); u16 b = ScriptGetVar(ctx); u16 c = ScriptGetVar(ctx); @@ -3597,7 +3597,7 @@ BOOL ScrCmd_PrimoPasswordCheck2(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; PlayerProfile *profile = Save_PlayerData_GetProfileAddr(FieldSystem_GetSaveData(fieldSystem)); u16 *p_ret = ScriptGetVarPointer(ctx); - PC_STORAGE *pcStorage = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE *pcStorage = SaveArray_PCStorage_Get(fieldSystem->saveData); u16 a = ScriptGetVar(ctx); u16 b = ScriptGetVar(ctx); u16 c = ScriptGetVar(ctx); @@ -3650,7 +3650,7 @@ BOOL ScrCmd_687(ScriptContext *ctx) { BOOL ScrCmd_CountPCEmptySpace(ScriptContext *ctx) { u16 *p_ret = ScriptGetVarPointer(ctx); - *p_ret = PCStorage_CountEmptySpotsInAllBoxes(Save_PCStorage_Get(ctx->fieldSystem->saveData)); + *p_ret = PCStorage_CountEmptySpotsInAllBoxes(SaveArray_PCStorage_Get(ctx->fieldSystem->saveData)); return FALSE; } @@ -4287,7 +4287,7 @@ u32 sub_020467A8(SaveData *saveData) { } } - PC_STORAGE *pcStorage = Save_PCStorage_Get(saveData); + PC_STORAGE *pcStorage = SaveArray_PCStorage_Get(saveData); for (i = 0; i < (u32)NUM_BOXES; i++) { for (j = 0; j < MONS_PER_BOX; j++) { BoxPokemon *boxMon = PCStorage_GetMonByIndexPair(pcStorage, i, j); diff --git a/src/scrcmd_lottery.c b/src/scrcmd_lottery.c index 4301a41a2..656f36e1f 100644 --- a/src/scrcmd_lottery.c +++ b/src/scrcmd_lottery.c @@ -23,7 +23,7 @@ BOOL ScrCmd_LotoIdGet(ScriptContext *ctx) { BOOL ScrCmd_LotoIdSearch(ScriptContext *ctx) { FieldSystem *fieldSystem = ctx->fieldSystem; - PC_STORAGE *storage = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE *storage = SaveArray_PCStorage_Get(fieldSystem->saveData); u16 *retPtr0 = ScriptGetVarPointer(ctx); u16 *retPtr1 = ScriptGetVarPointer(ctx); u16 *retPtr2 = ScriptGetVarPointer(ctx); diff --git a/src/scrcmd_party.c b/src/scrcmd_party.c index 2be1b0ddb..36cfd146d 100644 --- a/src/scrcmd_party.c +++ b/src/scrcmd_party.c @@ -375,7 +375,7 @@ BOOL ScrCmd_CountAliveMonsAndPC(ScriptContext *ctx) { int partyCount, count, i; FieldSystem *fieldSystem = ctx->fieldSystem; u16 *pokemonCount = ScriptGetVarPointer(ctx); - PC_STORAGE *pc = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE *pc = SaveArray_PCStorage_Get(fieldSystem->saveData); partyCount = Party_GetCount(SaveArray_Party_Get(fieldSystem->saveData)); for (i = 0, count = 0; i < partyCount; i++) { diff --git a/src/scrcmd_strbuf.c b/src/scrcmd_strbuf.c index cd63a69d5..bf8023d29 100644 --- a/src/scrcmd_strbuf.c +++ b/src/scrcmd_strbuf.c @@ -179,7 +179,7 @@ BOOL ScrCmd_BufferPartyMonNick(ScriptContext* ctx) { BOOL ScrCmd_BufferBoxMonNick(ScriptContext* ctx) { FieldSystem* fieldSystem = ctx->fieldSystem; - PC_STORAGE* pc = Save_PCStorage_Get(fieldSystem->saveData); + PC_STORAGE* pc = SaveArray_PCStorage_Get(fieldSystem->saveData); MessageFormat** msg_fmt = FieldSysGetAttrAddr(fieldSystem, SCRIPTENV_MESSAGE_FORMAT); u8 idx = ScriptReadByte(ctx); u16 box_mon_slot = ScriptGetVar(ctx); diff --git a/src/unk_02092BE8.c b/src/unk_02092BE8.c index 22ad2da21..c4dd66e5d 100644 --- a/src/unk_02092BE8.c +++ b/src/unk_02092BE8.c @@ -278,7 +278,7 @@ BOOL sub_02093070(FieldSystem* sys) { if (CheckFlagInArray(Save_VarsFlags_Get(sys->saveData), FLAG_UNK_985)) { return FALSE; } - if (PCStorage_CountEmptySpotsInAllBoxes(Save_PCStorage_Get(sys->saveData)) != 0) { + if (PCStorage_CountEmptySpotsInAllBoxes(SaveArray_PCStorage_Get(sys->saveData)) != 0) { return FALSE; } sub_02092E14(FieldSystem_GetGearPhoneRingManager(sys), 3, TRUE);