definition streamlining

This commit is contained in:
theo
2020-06-12 21:55:38 -07:00
parent 55345bca65
commit a3be262635
56 changed files with 514 additions and 462 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef AREA_H
#define AREA_H
#include "global.h"
typedef struct {
u8 areaMetadata;
u32 locationIndex;
u8 unk;
u16 localFlagOffset;
u8 filler[19];
u8 fadeOut;
u8 filler[14];
} Area;
extern Area gArea;
#endif
+30
View File
@@ -0,0 +1,30 @@
#ifndef FLAGS_H
#define FLAGS_H
#include "global.h"
extern u32 CheckFlags(u32);
extern u32 CheckGlobalFlag(u32);
extern u32 CheckGlobalFlags(u32);
extern u32 CheckLocalFlag(u32);
extern u32 CheckLocalFlagByOffset(u32, u32);
extern u32 CheckLocalFlags(u32);
extern u32 CheckLocalFlagsByOffset(u32, u32);
extern u32 CheckRoomFlag(u32);
extern u32 CheckRoomFlags(u32);
extern void ClearFlag(u32);
extern void ClearGlobalFlag(u32);
extern void ClearLocalFlag(u32);
extern void ClearLocalFlagByOffset(u32, u32);
extern void ClearRoomFlag(u32);
extern void SetFlag(u32);
extern void SetGlobalFlag(u32);
extern void SetLocalFlag(u32);
extern void SetLocalFlagByOffset(u32, u32);
extern void SetRoomFlag(u32);
extern u32 gGlobalFlags;
#endif
+21
View File
@@ -2,6 +2,7 @@
#define LINK_H
#include "global.h"
#include "entity.h"
typedef struct {
u8 filler[2];
@@ -47,5 +48,25 @@ typedef struct {
u8 unk7;
} LinkState;
typedef struct {
u8 walletType;
u8 heartPieces;
u8 health;
u8 maxHealth;
u8 bombCount;
u8 arrowCount;
u8 bombBagType;
u8 quiverType;
u8 filler[4];
u8 itemOnA;
u8 itemonB;
u8 filler2[10];
u16 rupees;
u8 filler3[12];
} Stats;
extern LinkState gLinkState;
extern Stats gStats;
extern Entity gLinkEntity;
#endif
+8
View File
@@ -0,0 +1,8 @@
#ifndef RANDOM_H
#define RANDOM_H
extern u32 Random(void);
extern u32 gRand;
#endif
-24
View File
@@ -1,24 +0,0 @@
#ifndef STATS_H
#define STATS_H
#include "global.h"
#include "item.h"
typedef struct {
u8 walletType;
u8 heartPieces;
u8 health;
u8 maxHealth;
u8 bombCount;
u8 arrowCount;
u8 bombBagType;
u8 quiverType;
u8 filler[4];
u8 itemOnA;
u8 itemonB;
u8 filler2[10];
u16 rupees;
u8 filler3[12];
} Stats;
#endif
+2
View File
@@ -16,4 +16,6 @@ typedef struct {
u16 unk2; //HI?
} TextBox;
extern TextBox gTextBox;
#endif