summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-05-23 16:19:35 -0500
committerGitHub <noreply@github.com>2021-05-23 16:19:35 -0500
commiteaa141c612dd1689936a21bd57018a55ff686b69 (patch)
treefafe2a9a562af6a8e36716ff76a5b3e8b30d4411 /include
parentf402e46cd3c8b7236673d6edbae77903a7cc0618 (diff)
Keep on keepin on (#38)
* end of may dump of work * move save text to src * decomp a little more
Diffstat (limited to 'include')
-rw-r--r--include/code_8041D5C.h4
-rw-r--r--include/constants/species.h2
-rw-r--r--include/gUnknown_203B46C.h21
-rw-r--r--include/kecleon_items.h2
-rw-r--r--include/memory.h3
-rw-r--r--include/pokemon.h51
-rw-r--r--include/save.h6
7 files changed, 83 insertions, 6 deletions
diff --git a/include/code_8041D5C.h b/include/code_8041D5C.h
index 712aa2f..39df243 100644
--- a/include/code_8041D5C.h
+++ b/include/code_8041D5C.h
@@ -7,14 +7,14 @@ struct subStruct_8048524
u8 unk6;
u8 unk7;
u8 fill8[0xE - 0x8];
- s16 unkE; // HP??
+ /* 0xE */ s16 HP; // HP??
s16 unk10;
u8 fill12[0x46 - 0x12];
u8 unk46;
u8 fill47[0xA4 - 0x47];
u8 unkA4;
u8 fillA5[0xAC - 0xA5];
- u8 unkAC;
+ /* 0xAC */ u8 statusCondition;
u8 fillAD[0xFB - 0xAD];
u8 unkFB;
u8 fillFC[0x112 - 0xFC];
diff --git a/include/constants/species.h b/include/constants/species.h
index 1822200..36d3501 100644
--- a/include/constants/species.h
+++ b/include/constants/species.h
@@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_SPECIES_H
#define GUARD_CONSTANTS_SPECIES_H
+#define NUM_SPECIES 413
+
#define SPECIES_NONE 0
#define SPECIES_BULBASAUR 1
#define SPECIES_IVYSAUR 2
diff --git a/include/gUnknown_203B46C.h b/include/gUnknown_203B46C.h
new file mode 100644
index 0000000..c733174
--- /dev/null
+++ b/include/gUnknown_203B46C.h
@@ -0,0 +1,21 @@
+#ifndef GUARD_GUNKNOWN_203B46C_H
+#define GUARD_GUNKNOWN_203B46C_H
+
+struct UnkSaveStruct1
+{
+ /* 0x0 */ u8 unk0;
+ /* 0x1 */ u8 unk1;
+ /* 0x2 */ u8 unk2;
+ /* 0x3 */ u8 unk3;
+ /* 0x4 */ u8 unk4;
+ /* 0x5 */ u8 unk5;
+ /* 0x6 */ u8 unk6;
+ /* 0x7 */ u8 unk7;
+ /* 0x8 */ u8 unk8;
+ /* 0x9 */ u8 unk9;
+ /* 0xA */ u8 unkA;
+ /* 0xB */ u8 playerGender;
+ /* 0xC */ u8 unkC;
+};
+
+#endif
diff --git a/include/kecleon_items.h b/include/kecleon_items.h
index f9added..0a190a3 100644
--- a/include/kecleon_items.h
+++ b/include/kecleon_items.h
@@ -28,7 +28,7 @@ struct unkStruct_203B210
u8 fill34[0x84 - 0x34];
u32 unk84;
u8 fill88[0xD4 - 0x88];
- struct OpenedFile *unkD4;
+ struct OpenedFile *faceFile;
u8 *unkD8;
u16 unkDC;
u16 unkDE;
diff --git a/include/memory.h b/include/memory.h
index 4b1e587..ef99757 100644
--- a/include/memory.h
+++ b/include/memory.h
@@ -52,5 +52,8 @@ void MemoryCopy32(u32 *dest, u32 *src, s32 size);
void InitHeapInternal(void);
void DoInitHeap(struct HeapDescriptor *, struct HeapSettings *, struct HeapFreeListElement *, u32);
void InitSubHeap(struct HeapDescriptor *, struct HeapMemoryBlock *, u32);
+s32 _LocateSet(struct HeapDescriptor *heap, s32 size, s32 param_3);
+void *MemoryAlloc(s32 size, s32 b);
+void MemoryFree(void *a);
#endif // GUARD_MEMORY_H
diff --git a/include/pokemon.h b/include/pokemon.h
index 8014015..1c51eab 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -3,6 +3,57 @@
#include "file_system.h"
+struct PokemonStruct
+{
+ // size: 0x58
+ u16 unk0; // recruited??
+ u8 unk2;
+ u8 unk3;
+ u8 fill4[0x8 - 0x4];
+ s16 unk8; // species #
+ u8 fillA[0x14 - 0xA];
+ u16 unk14;
+ u16 unk16; // HP
+ u8 unk18; // attack
+ u8 unk19; // sp attack
+ u8 unk1A; // def
+ u8 unk1B; // spdef
+ u32 unk1C;
+ u32 unk20;
+ u8 unk24;
+ u8 fill25[3];
+ u8 unk28;
+ u8 fill29[3];
+ u32 unk2C;
+ u8 fill30[0x4C - 0x30];
+ /* 0x4C */ u8 name[0xA];
+};
+
+struct PokemonStruct2
+{
+ // size 0x64
+ u16 unk0;
+ u8 fill[0x62];
+};
+
+struct PokemonStruct3
+{
+ // size: 0x58
+ u16 unk0;
+ u16 unk2;
+ u16 unk4;
+ u16 unk6;
+ u16 unk8;
+ u8 fill[0x4E];
+};
+
+struct unkStruct_203B45C
+{
+ struct PokemonStruct pokemon[0x19D];
+ struct PokemonStruct2 pokemon2[4];
+ struct PokemonStruct3 pokemon3[4];
+};
+
struct EvolveStruct1
{
/* 0x34 */ u16 evolve_from;
diff --git a/include/save.h b/include/save.h
index da23b47..6ed2765 100644
--- a/include/save.h
+++ b/include/save.h
@@ -36,7 +36,7 @@ struct UnkStruct_sub_8011DAC {
struct UnkStruct_203B184 {
/* 0x0 */ u32 *unk0;
- /* 0x4 */ u32 *unk4;
+ /* 0x4 */ u32 *recruitedPokemon;
/* 0x8 */ u8 *unk8;
/* 0xC */ u8 *unkC;
/* 0x10 */ u32 *unk10;
@@ -46,7 +46,7 @@ struct UnkStruct_203B184 {
/* 0x20 */ u32 unk20;
/* 0x24 */ struct ExclusivePokemonData *ExclusivePokemon;
/* 0x28 */ u8 *BoughtFriendAreas;
- /* 0x2C */ u32 unk2C;
+ /* 0x2C */ u32 gameOptions;
/* 0x30 */ struct PlayTimeStruct *playTime;
u32 unk34;
u32 unk38;
@@ -89,7 +89,7 @@ void sub_80129FC(void);
void sub_8012298();
void sub_80122D0();
void sub_80122F4();
-void sub_8012300();
+void InitializePlayerData();
void sub_80122A8();
u32 ReadSaveSector(s32 *a, u8 *dest, s32 size);