summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-04-04 11:55:18 -0400
committerhuderlem <huderlem@gmail.com>2019-04-04 19:26:45 -0500
commitc46f271f676812b7292560f36f890010c71ef5d1 (patch)
treee5939edc3bc7de5b3c7d105b9e46625f7774ae3d /include
parentb3a4509b9a884fa5ac9619e425de498f961fe9e6 (diff)
Documentation of ereader_helpers, 1
Diffstat (limited to 'include')
-rwxr-xr-xinclude/ereader_helpers.h38
-rw-r--r--include/save.h5
2 files changed, 37 insertions, 6 deletions
diff --git a/include/ereader_helpers.h b/include/ereader_helpers.h
index 54b36ef0f..95079ff50 100755
--- a/include/ereader_helpers.h
+++ b/include/ereader_helpers.h
@@ -3,13 +3,43 @@
struct Unk81D38FC
{
- u8 unk0[0x270];
+ u8 unk0[12];
+ u8 unkC[0x148];
+ u8 unk154[0x11C];
int checksum;
};
-bool8 sub_81D3920(u8 *buffer);
-bool32 sub_81D3AB0(struct Unk81D38FC *arg0);
-bool32 sub_81D3B34(void);
+struct EReaderTrainerHillSet
+{
+ u8 unk_0;
+ u8 unk_1;
+ u8 unk_2;
+ u8 unk_3;
+ int checksum;
+ struct Unk81D38FC unk_8[6];
+ u8 unk_ec0[40];
+};
+
+struct Unk81D3998Sub
+{
+ u8 unk_000[4];
+ u8 unk_004[0x148];
+ u8 unk_14C[0x148];
+ u8 unk_294[0x124];
+};
+
+struct Unk81D3998
+{
+ u8 unk_000;
+ u8 unk_001;
+ u8 unk_002;
+ int checksum;
+ struct Unk81D3998Sub unk_008[4];
+};
+
+bool8 EReader_IsReceivedDataValid(struct EReaderTrainerHillSet *buffer);
+bool32 TryWriteTrainerHill(struct Unk81D38FC *arg0);
+bool32 ReadTrainerHillAndValidate(void);
int sub_81D3D70(u8, u32, u32*, u32*);
void sub_81D3F9C(void);
void sub_81D3FAC(void);
diff --git a/include/save.h b/include/save.h
index 88e5f2280..5e2cf7267 100644
--- a/include/save.h
+++ b/include/save.h
@@ -33,6 +33,7 @@ struct SaveSectionOffsets
#define NUM_SECTORS_PER_SLOT 16
#define UNKNOWN_CHECK_VALUE 0x8012025
+#define SPECIAL_SECTION_SENTINEL 0xB39D
// SetDamagedSectorBits states
enum
@@ -88,8 +89,8 @@ bool8 CheckSaveFile(void);
u8 Save_LoadGameData(u8 a1);
u16 sub_815355C(void);
u8 sub_81534D0(u8);
-u32 TryCopySpecialSaveSection(u8 sector, u8* dst);
-u32 sub_8153634(u8 sector, u8* src);
+u32 TryReadSpecialSaveSection(u8 sector, u8* dst);
+u32 TryWriteSpecialSaveSection(u8 sector, u8* src);
void sub_8153688(u8 taskId);
// save_failed_screen.c