summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornotyouraveragehooman <65437533+notyouraveragehooman@users.noreply.github.com>2020-08-21 20:16:56 -0700
committerGitHub <noreply@github.com>2020-08-21 20:16:56 -0700
commitdfcd7f38768691d2d6a17c98a0f290dff9480a08 (patch)
tree39073dd527d6a10e3bf05f7b2fb8d280fe7c3f5d /include
parent6e53face6434018eeccd142f963aebab4f2d5ba7 (diff)
parentbcfae17450cb30ed57ec1a65f5170679b6bc7620 (diff)
Merge pull request #68 from Ibot02:master
ManagerB.c and Manager3.c: ok
Diffstat (limited to 'include')
-rw-r--r--include/area.h9
-rw-r--r--include/functions.h10
-rw-r--r--include/manager.h104
-rw-r--r--include/player.h6
4 files changed, 95 insertions, 34 deletions
diff --git a/include/area.h b/include/area.h
index e705944d..a683cb2a 100644
--- a/include/area.h
+++ b/include/area.h
@@ -11,7 +11,12 @@ typedef struct {
u16 localFlagOffset;
u8 filler[10];
u16 field_0x10;
- u8 filler3[7];
+ u16 field_0x12;
+ u16 field_0x14;
+ u8 field_0x16;
+ u8 field_0x17;
+ u8 field_0x18;
+ //u8 filler3[7];
u8 fadeOut;
u8 filler2[14];
u8 filler4[0x835];
@@ -25,4 +30,4 @@ typedef struct {
extern Area gArea;
-#endif \ No newline at end of file
+#endif
diff --git a/include/functions.h b/include/functions.h
index d85b2822..8743bd13 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -4,6 +4,7 @@
#include "global.h"
#include "entity.h"
+#include "manager.h"
#include "position.h"
#include "player.h"
#include "structures.h"
@@ -61,7 +62,7 @@ extern void sub_0805EC60();
extern void sub_080873D0();
extern u8 sub_080045D4(s16, s16, u16, u16);
extern void sub_0806F69C(Entity*);
-extern void sub_0805E3A0(Entity*, u32);
+extern void sub_0805E3A0(void*, u32);
extern void sub_0806D0B0(Entity*);
extern void sub_0807DD64(Entity*);
extern void sub_0807DDAC(Entity*, u32);
@@ -196,8 +197,8 @@ extern u32 sub_0807953C(void);
extern void ResetPlayer(void);
extern void sub_080A29BC(Entity*);
extern void sub_080AE068(Entity*);
-extern Entity* GetEmptyManager(void);
-extern void AppendEntityToList(Entity*, u32);
+extern Manager* GetEmptyManager(void);
+extern void AppendEntityToList(void*, u32);
extern u32 sub_0800445C(Entity*);
extern void sub_0807A108(void);
extern void sub_0801766C(Entity*);
@@ -217,7 +218,6 @@ extern void sub_0807D20C(u32, char*, u32);
extern u32 sub_0807CF88(u32, u8*);
extern u32 sub_0807D008(u32, void*);
extern void sub_0807D184(u32, char*);
-extern void sub_0805E3A0(Entity*, u32);
extern u32 sub_0806F520();
extern void sub_0806F4E8();
extern u32 sub_0806F3E4(Entity*);
@@ -255,4 +255,4 @@ extern u32 sub_080044EC(Entity*, u32);
extern u32 sub_080002B8(Entity*);
extern u32 sub_08049F84(Entity*, u32);
extern void sub_0802F45C(Entity*);
-#endif \ No newline at end of file
+#endif
diff --git a/include/manager.h b/include/manager.h
index 278a199a..bd97c1c3 100644
--- a/include/manager.h
+++ b/include/manager.h
@@ -2,6 +2,7 @@
#define MANAGER_H
#include "global.h"
+#include "entity.h"
union SplitSHWord {
s16 SHWORD;
@@ -10,14 +11,57 @@ union SplitSHWord {
} PACKED HALF;
} PACKED;
+typedef struct Manager {
+ /*0x00*/ struct Manager* previous;
+ /*0x00*/ struct Manager* next;
+ /*0x08*/ u8 type;
+ /*0x09*/ u8 subtype;
+ /*0x0a*/ u8 unk_0a;
+ /*0x0b*/ u8 unk_0b;
+ /*0x0c*/ u8 action;
+ /*0x0d*/ u8 unk_0d;
+ /*0x0e*/ u8 unk_0e;
+ /*0x0f*/ u8 unk_0f;
+ /*0x10*/ u8 unk_10[0x4];
+ /*0x14*/ struct Manager * parent;
+ /*0x18*/ u8 unk_18[0x8];
+ // union SplitHWord unk_20;
+ // u16 unk_22;
+ // u16 unk_24;
+ // u16 unk_26;
+ // u8 unk_28[0x0D];
+ // u8 unk_35;
+ // u16 unk_36;
+ // union SplitSHWord unk_38;
+ // union SplitSHWord unk_3a;
+ // u16 unk_3c;
+ // u16 unk_3e;
+} Manager;
+
typedef struct {
- u8 unk_00[0x0a];
- u8 unk_0a;
- u8 unk_0b;
- u8 unk_0c;
- u8 unk_0d;
- u8 unk_0e;
- u8 unk_0f[0x11];
+ u16 posX;
+ u16 posY;
+ u8 width;
+ u8 height;
+ u8 unk_06;
+ union {
+ u8 all;
+ struct {
+ u8 layer : 2;
+ u8 unk1 : 2;
+ u8 unk2 : 1;
+ u8 unk3 : 3;
+ } PACKED b;
+ } PACKED unk_07;
+} Manager6WarpData;
+
+typedef struct {
+ Manager manager;
+ Manager6WarpData* warpList;
+} Manager6;
+
+typedef struct {
+ Manager manager;
u16 unk_20;
u16 unk_22;
u16 unk_24;
@@ -25,28 +69,38 @@ typedef struct {
u8 unk_28[0x0D];
u8 unk_35;
u16 unk_36;
- union SplitSHWord unk_38;
- union SplitSHWord unk_3a;
+ u8 unk_38;
+ u8 unk_39;
+ u8 unk_3a;
+ u8 unk_3b;
u16 unk_3c;
u16 unk_3e;
-} Manager;
+} ManagerA;
typedef struct {
- u16 field_0x00;
- u16 field_0x02;
- u8 field_0x04;
- u8 field_0x05;
- u8 field_0x06;
- union {
- u8 all;
- struct {
- u8 layer : 2;
- u8 unk1 : 2;
- u8 unk2 : 1;
- u8 unk3 : 3;
- } PACKED b;
- } PACKED field_0x07;
-} UnkManagerHelperStruct;
+ Manager manager;
+ u8 unk_20;
+ u8 unk_21[0x14];
+ u8 unk_35;
+ u8 unk_36[0x4];
+ u16 unk_3a;
+ u16 unk_3c;
+ u16 unk_3e;
+} ManagerB;
+
+typedef struct {
+ Manager manager;
+ Entity* enemies[8];
+} ManagerBHelper;
+
+typedef struct {
+ Manager manager;
+ u8 unk_20[0x18];
+ s16 unk_38;
+ s16 unk_3a;
+ u16 unk_3c;
+ u16 unk_3e;
+} ManagerE;
typedef struct {
u16 unk_00;
diff --git a/include/player.h b/include/player.h
index 1abc8491..c3b69e43 100644
--- a/include/player.h
+++ b/include/player.h
@@ -57,7 +57,9 @@ typedef struct {
/*0x8c*/ u32 field_0x8c;
/*0x90*/ union SplitWord field_0x90;
/*0x94*/ u32 field_0x94[5];
- /*0xa8*/ u8 field_0xa8[3];
+ /*0xa8*/ u8 field_0xa8;
+ /*0xa9*/ u8 field_0xa9;
+ /*0xaa*/ u8 field_0xaa;
/*0xab*/ u8 field_0xab;
/*0xac*/ u32 field_0xac;
} PlayerState;
@@ -108,4 +110,4 @@ extern s32 ModHealth(s32);
extern void ModRupees(s32);
#endif
-// clang-format on \ No newline at end of file
+// clang-format on