From f9b6621f257430312a8ffdc1a3f1eaa6c8dee4fd Mon Sep 17 00:00:00 2001 From: red031000 Date: Fri, 30 Jun 2023 21:09:13 +0100 Subject: [PATCH] some renaming --- asm/include/overlay_01_021F3F50.inc | 8 ++++---- asm/include/overlay_74_thumb.inc | 2 +- asm/overlay_01_021F3F50.s | 24 ++++++++++++------------ asm/overlay_74_thumb.s | 2 +- include/overlay_01.h | 8 ++++---- include/sav_system_info.h | 6 +++--- src/sav_system_info.c | 8 ++++---- src/scrcmd_c.c | 10 +++++----- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/asm/include/overlay_01_021F3F50.inc b/asm/include/overlay_01_021F3F50.inc index 85341f8e3..ee9fe4ae0 100644 --- a/asm/include/overlay_01_021F3F50.inc +++ b/asm/include/overlay_01_021F3F50.inc @@ -43,10 +43,10 @@ .public PlayerAvatar_GetFacingDirection .public GetPlayerXCoord .public GetPlayerYCoord -.public SaveStatsPrinter_Print -.public SaveStatsPrinter_RemoveFromScreen -.public Field_CreateSaveStatsPrinter -.public SaveStatsPrinter_Delete +.public Field_SaveStatsPrinter_Print +.public Field_SaveStatsPrinter_RemoveFromScreen +.public Field_SaveStatsPrinter_New +.public Field_SaveStatsPrinter_Delete .public ov01_021F42F8 .public ov01_021F434C .public ov01_021F4360 diff --git a/asm/include/overlay_74_thumb.inc b/asm/include/overlay_74_thumb.inc index 0189ba24a..ff479acbe 100644 --- a/asm/include/overlay_74_thumb.inc +++ b/asm/include/overlay_74_thumb.inc @@ -195,7 +195,7 @@ .public SaveSubstruct_AssertCRC .public SaveSubstruct_UpdateCRC .public Save_SysInfo_Get -.public Save_SysInfo_GetField48 +.public Save_SysInfo_GetMysteryGiftActive .public Save_PlayerData_GetProfileAddr .public Save_PlayerData_GetOptionsAddr .public Save_PlayerData_GetIGTAddr diff --git a/asm/overlay_01_021F3F50.s b/asm/overlay_01_021F3F50.s index 4c9796807..3fe9974cb 100644 --- a/asm/overlay_01_021F3F50.s +++ b/asm/overlay_01_021F3F50.s @@ -248,8 +248,8 @@ _021F4124: .word ov01_02206AF4 _021F4128: .word ov01_02206AE4 thumb_func_end ov01_021F4048 - thumb_func_start SaveStatsPrinter_Print -SaveStatsPrinter_Print: ; 0x021F412C + thumb_func_start Field_SaveStatsPrinter_Print +Field_SaveStatsPrinter_Print: ; 0x021F412C push {r3, r4, lr} sub sp, #0x14 add r4, r0, #0 @@ -302,10 +302,10 @@ SaveStatsPrinter_Print: ; 0x021F412C .balign 4, 0 _021F419C: .word 0x00000189 _021F41A0: .word 0x000003D9 - thumb_func_end SaveStatsPrinter_Print + thumb_func_end Field_SaveStatsPrinter_Print - thumb_func_start SaveStatsPrinter_RemoveFromScreen -SaveStatsPrinter_RemoveFromScreen: ; 0x021F41A4 + thumb_func_start Field_SaveStatsPrinter_RemoveFromScreen +Field_SaveStatsPrinter_RemoveFromScreen: ; 0x021F41A4 push {r4, lr} add r4, r0, #0 ldr r0, [r4, #0x10] @@ -317,10 +317,10 @@ SaveStatsPrinter_RemoveFromScreen: ; 0x021F41A4 bl FreeToHeap pop {r4, pc} .balign 4, 0 - thumb_func_end SaveStatsPrinter_RemoveFromScreen + thumb_func_end Field_SaveStatsPrinter_RemoveFromScreen - thumb_func_start Field_CreateSaveStatsPrinter -Field_CreateSaveStatsPrinter: ; 0x021F41C0 + thumb_func_start Field_SaveStatsPrinter_New +Field_SaveStatsPrinter_New: ; 0x021F41C0 push {r3, r4, r5, r6, r7, lr} add r5, r1, #0 add r6, r0, #0 @@ -361,10 +361,10 @@ Field_CreateSaveStatsPrinter: ; 0x021F41C0 pop {r3, r4, r5, r6, r7, pc} .balign 4, 0 _021F4218: .word 0x000001A7 - thumb_func_end Field_CreateSaveStatsPrinter + thumb_func_end Field_SaveStatsPrinter_New - thumb_func_start SaveStatsPrinter_Delete -SaveStatsPrinter_Delete: ; 0x021F421C + thumb_func_start Field_SaveStatsPrinter_Delete +Field_SaveStatsPrinter_Delete: ; 0x021F421C push {r4, lr} add r4, r0, #0 ldr r0, [r4, #0x18] @@ -374,7 +374,7 @@ SaveStatsPrinter_Delete: ; 0x021F421C add r0, r4, #0 bl FreeToHeap pop {r4, pc} - thumb_func_end SaveStatsPrinter_Delete + thumb_func_end Field_SaveStatsPrinter_Delete thumb_func_start ov01_021F4234 ov01_021F4234: ; 0x021F4234 diff --git a/asm/overlay_74_thumb.s b/asm/overlay_74_thumb.s index a1eb8868a..cd63bf584 100644 --- a/asm/overlay_74_thumb.s +++ b/asm/overlay_74_thumb.s @@ -2127,7 +2127,7 @@ ov74_MainMenu_PrintMysteryGiftButton: ; 0x022280B4 _022280D4: ldr r0, [r5, #4] bl Save_SysInfo_Get - bl Save_SysInfo_GetField48 + bl Save_SysInfo_GetMysteryGiftActive cmp r0, #1 bne _022280E6 mov r0, #1 diff --git a/include/overlay_01.h b/include/overlay_01.h index ebe83a987..377c9af36 100644 --- a/include/overlay_01.h +++ b/include/overlay_01.h @@ -97,10 +97,10 @@ void Field_PlayerMovementSavingClear(int state); struct SaveStatsPrinter; -struct SaveStatsPrinter *Field_CreateSaveStatsPrinter(FieldSystem *fsys, HeapID x, int y); -void SaveStatsPrinter_Print(struct SaveStatsPrinter *printer); -void SaveStatsPrinter_RemoveFromScreen(struct SaveStatsPrinter *printer); -void SaveStatsPrinter_Delete(struct SaveStatsPrinter *printer); +struct SaveStatsPrinter *Field_SaveStatsPrinter_New(FieldSystem *fsys, HeapID x, int y); +void Field_SaveStatsPrinter_Print(struct SaveStatsPrinter *printer); +void Field_SaveStatsPrinter_RemoveFromScreen(struct SaveStatsPrinter *printer); +void Field_SaveStatsPrinter_Delete(struct SaveStatsPrinter *printer); void ov01_02203AB4(FieldSystem *fsys, LocalMapObject *partnerPokeObj, int a2); void ov01_02205AEC(FieldSystem *fsys); void ov01_02205720(LocalMapObject *playerObj, LocalMapObject *tsurePokeObj, int a2, int a3); diff --git a/include/sav_system_info.h b/include/sav_system_info.h index 86fd6721a..3c5c6df84 100644 --- a/include/sav_system_info.h +++ b/include/sav_system_info.h @@ -20,7 +20,7 @@ typedef struct SYSINFO { u8 birth_month; u8 birth_day; SYSINFO_RTC rtc_info; - u8 unk48; + u8 mysteryGiftActive; void* unk4C; u8 unk50[0xC]; } SYSINFO; @@ -34,8 +34,8 @@ BOOL Save_SysInfo_MacAddressIsMine(SYSINFO* sys_info); BOOL Save_SysInfo_RTCOffsetIsMine(SYSINFO* sys_info); u8 Save_SysInfo_GetBirthMonth(SYSINFO* sys_info); u8 Save_SysInfo_GetBirthDay(SYSINFO* sys_info); -u8 Save_SysInfo_GetField48(SYSINFO* sys_info); -void Save_SysInfo_SetField48(SYSINFO* sys_info, u8); +u8 Save_SysInfo_GetMysteryGiftActive(SYSINFO* sys_info); +void Save_SysInfo_SetMysteryGiftActive(SYSINFO* sys_info, u8); void* Save_SysInfo_GetField4C(SYSINFO* sys_info); void Save_SysInfo_SetField4C(SYSINFO* sys_info, void*); void Save_SysInfo_RTC_Init(SYSINFO_RTC* rtc_info); diff --git a/src/sav_system_info.c b/src/sav_system_info.c index 521038bb8..9ef6dfc2c 100644 --- a/src/sav_system_info.c +++ b/src/sav_system_info.c @@ -57,12 +57,12 @@ u8 Save_SysInfo_GetBirthDay(SYSINFO* sys_info) { return sys_info->birth_day; } -u8 Save_SysInfo_GetField48(SYSINFO* sys_info) { - return sys_info->unk48; +u8 Save_SysInfo_GetMysteryGiftActive(SYSINFO* sys_info) { + return sys_info->mysteryGiftActive; } -void Save_SysInfo_SetField48(SYSINFO* sys_info, u8 a1) { - sys_info->unk48 = a1; +void Save_SysInfo_SetMysteryGiftActive(SYSINFO* sys_info, u8 a1) { + sys_info->mysteryGiftActive = a1; } void* Save_SysInfo_GetField4C(SYSINFO* sys_info) { diff --git a/src/scrcmd_c.c b/src/scrcmd_c.c index 52efd995d..88ff035b2 100644 --- a/src/scrcmd_c.c +++ b/src/scrcmd_c.c @@ -4055,7 +4055,7 @@ BOOL ScrCmd_571(ScriptContext *ctx) { } BOOL ScrCmd_573(ScriptContext *ctx) { - Save_SysInfo_SetField48(Save_SysInfo_Get(ctx->fsys->savedata), 1); + Save_SysInfo_SetMysteryGiftActive(Save_SysInfo_Get(ctx->fsys->savedata), 1); return FALSE; } @@ -4115,8 +4115,8 @@ BOOL ScrCmd_ShowSaveStats(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; struct SaveStatsPrinter **saveStatsPrinter = FieldSysGetAttrAddr(fsys, SCRIPTENV_SAVE_STATS_PRINTER); if (!Save_FileDoesNotBelongToPlayer(fsys->savedata)) { - *saveStatsPrinter = Field_CreateSaveStatsPrinter(fsys, HEAP_ID_4, 3); - SaveStatsPrinter_Print(*saveStatsPrinter); + *saveStatsPrinter = Field_SaveStatsPrinter_New(fsys, HEAP_ID_4, 3); + Field_SaveStatsPrinter_Print(*saveStatsPrinter); } return FALSE; } @@ -4125,8 +4125,8 @@ BOOL ScrCmd_HideSaveStats(ScriptContext *ctx) { FieldSystem *fsys = ctx->fsys; struct SaveStatsPrinter **saveStatsPrinter = FieldSysGetAttrAddr(fsys, SCRIPTENV_SAVE_STATS_PRINTER); if (!Save_FileDoesNotBelongToPlayer(fsys->savedata)) { - SaveStatsPrinter_RemoveFromScreen(*saveStatsPrinter); - SaveStatsPrinter_Delete(*saveStatsPrinter); + Field_SaveStatsPrinter_RemoveFromScreen(*saveStatsPrinter); + Field_SaveStatsPrinter_Delete(*saveStatsPrinter); } return FALSE; }