Skip to content

Commit

Permalink
some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
red031000 committed Jun 30, 2023
1 parent 6df5e87 commit f9b6621
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions asm/include/overlay_01_021F3F50.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asm/include/overlay_74_thumb.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions asm/overlay_01_021F3F50.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion asm/overlay_74_thumb.s
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions include/overlay_01.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions include/sav_system_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/sav_system_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions src/scrcmd_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit f9b6621

Please sign in to comment.