summaryrefslogtreecommitdiff
path: root/include/save_block_2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/save_block_2.h')
-rw-r--r--include/save_block_2.h47
1 files changed, 38 insertions, 9 deletions
diff --git a/include/save_block_2.h b/include/save_block_2.h
index 38e11de4..fe052b1d 100644
--- a/include/save_block_2.h
+++ b/include/save_block_2.h
@@ -1,18 +1,47 @@
#ifndef POKEDIAMOND_SAVE_BLOCK_2_H
#define POKEDIAMOND_SAVE_BLOCK_2_H
-struct SaveBlock2
+#include "MATH_crc.h"
+#include "player_data.h"
+
+struct SavArrayHeader
{
- u16 playerName[OT_NAME_LENGTH + 1];
- u32 playerId;
- u8 filler_14[4];
- u8 gender;
+ u32 id;
+ u32 size;
+ u32 offset;
+ u16 field_C;
+ u16 field_E;
+};
+
+struct SaveBlock2_Sub_20464 {
+ u8 unk_0;
u8 padding[3];
- // TODO: finish this struct
+ int unk_4;
+ int unk_8;
+ u8 unk_C;
+ u8 unk_D;
+ u8 unk_E;
+ u8 padding2;
};
-struct String * FUN_020239A0(struct SaveBlock2 *, u32 heap_id);
-u32 FUN_020239BC(struct SaveBlock2 *);
-u32 FUN_020239CC(struct SaveBlock2 *);
+struct SaveBlock2
+{
+ /* 0x00000 */ int unk_00000;
+ /* 0x00004 */ int unk_00004;
+ /* 0x00008 */ int unk_00008;
+ /* 0x0000C */ int unk_0000C;
+ /* 0x00010 */ int unk_00010;
+ /* 0x00014 */ struct MATHCRC16Table unk_00014;
+ /* 0x00214 */ u8 dynamic_region[0x20000];
+ /* 0x20214 */ int unk_20214;
+ /* 0x20218 */ u8 unk_20218[8];
+ /* 0x20220 */ int unk_20220;
+ /* 0x20224 */ struct SavArrayHeader arrayHeaders[36];
+ /* 0x20464 */ struct SaveBlock2_Sub_20464 unk_20464[4];
+ /* 0x204A4 */ int unk_204A4;
+ // TODO: finish this struct
+}; // size: 0x204A8
+
+void * SavArray_get(struct SaveBlock2 *, int);
#endif //POKEDIAMOND_SAVE_BLOCK_2_H