summaryrefslogtreecommitdiff
path: root/src/save.c
diff options
context:
space:
mode:
authorPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
committerPhlosioneer <mattmdrr2@gmail.com>2019-04-07 01:56:36 -0400
commitd84d94e29a1424dd1d12ff821957bb6b1bc847d6 (patch)
treec5ba0778afca66a91f71815cd53fe9abef1bdac6 /src/save.c
parentad2a97935e1c1f4362f0dffa58ef437d191bab4e (diff)
parentc3cfd6065825ec8ddd5e1782998071518efaa322 (diff)
Merge branch 'master' into pokenav-decomp-again
Diffstat (limited to 'src/save.c')
-rw-r--r--src/save.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/save.c b/src/save.c
index 361a88e1e..45a75b5dc 100644
--- a/src/save.c
+++ b/src/save.c
@@ -849,7 +849,7 @@ u16 sub_815355C(void)
return 0;
}
-u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
+u32 TryReadSpecialSaveSection(u8 sector, u8* dst)
{
s32 i;
s32 size;
@@ -858,7 +858,7 @@ u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
return 0xFF;
ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, sizeof(struct SaveSection));
- if (*(u32*)(&gSaveDataBuffer.data[0]) != 0xB39D)
+ if (*(u32*)(&gSaveDataBuffer.data[0]) != SPECIAL_SECTION_SENTINEL)
return 0xFF;
// copies whole save section except u32 counter
i = 0;
@@ -869,18 +869,18 @@ u32 TryCopySpecialSaveSection(u8 sector, u8* dst)
return 1;
}
-u32 sub_8153634(u8 sector, u8* src)
+u32 TryWriteSpecialSaveSection(u8 sector, u8* src)
{
s32 i;
s32 size;
u8* savData;
void* savDataBuffer;
- if (sector != 30 && sector != 31)
+ if (sector != SECTOR_ID_TRAINER_HILL && sector != SECTOR_ID_RECORDED_BATTLE)
return 0xFF;
savDataBuffer = &gSaveDataBuffer;
- *(u32*)(savDataBuffer) = 0xB39D;
+ *(u32*)(savDataBuffer) = SPECIAL_SECTION_SENTINEL;
// copies whole save section except u32 counter
i = 0;