summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTheo <65437533+notyourav@users.noreply.github.com>2023-12-29 01:01:37 -0800
committerGitHub <noreply@github.com>2023-12-29 01:01:37 -0800
commitc2f081600bca5c3f1f82d7bac8bc5827faf0d17a (patch)
treed7f8fb576cff5d3a1ff7c025e120d15a725a9580 /include
parent56688ac226db420c7b8ee7080f7185da58437fbc (diff)
parent72509b18a0406f93b6ffc59904cc2c09c0adbf80 (diff)
Merge pull request #676 from notyourav/v
label some asm functions
Diffstat (limited to 'include')
-rw-r--r--include/entity.h34
-rw-r--r--include/message.h4
-rw-r--r--include/player.h2
-rw-r--r--include/structures.h4
4 files changed, 27 insertions, 17 deletions
diff --git a/include/entity.h b/include/entity.h
index cbb54201..067e9ff4 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -6,7 +6,9 @@
#include "color.h"
#include "sprite.h"
-#define MAX_ENTITIES 71
+#define MAX_ENTITIES 72
+#define MAX_MANAGERS 32
+#define MAX_AUX_PLAYER_ENTITIES 7
/** Kinds of Entity's supported by the game. */
typedef enum {
@@ -38,6 +40,8 @@ typedef enum {
typedef enum {
ENT_DID_INIT = 0x1, /**< Graphics and other data loaded. */
ENT_SCRIPTED = 0x2, /**< Execute in a scripted environment. */
+ ENT_UNUSED1 = 0x4, /**< Unused delete flag. */
+ ENT_UNUSED2 = 0x8, /**< Unused delete flag. */
ENT_DELETED = 0x10, /**< Queue deletion next frame. */
ENT_PERSIST = 0x20, /**< Persist between rooms. */
ENT_COLLIDE = 0x80, /**< Collide with other Entity's. */
@@ -238,6 +242,15 @@ typedef struct LinkedList {
Entity* first;
} LinkedList;
+/**
+ * LinkedList's which point to allocate Entities.
+ * These work together with Entity.prev and Entity.next fields
+ * to allow the iteration of all Entity's.
+ */
+extern LinkedList gEntityLists[9];
+extern Entity gAuxPlayerEntities[MAX_AUX_PLAYER_ENTITIES];
+extern Entity gEntities[MAX_ENTITIES];
+
typedef void(EntityAction)(Entity*);
typedef void (*EntityActionPtr)(Entity*);
typedef void (*const* EntityActionArray)(Entity*);
@@ -283,7 +296,7 @@ Entity* CreateEnemy(u32 id, u32 type);
Entity* CreateNPC(u32 id, u32 type, u32 type2);
Entity* CreateObject(u32 id, u32 type, u32 type2);
Entity* CreateObjectWithParent(Entity* parent, u32 id, u32 type, u32 type2);
-Entity* CreateItemGetEntity(void);
+Entity* CreateAuxPlayerEntity(void);
Entity* CreateFx(Entity* parent, u32 type, u32 type2);
/// @}
@@ -389,9 +402,12 @@ Entity* FindEntity(u32 kind, u32 id, u32 listIndex, u32 type, u32 type2);
void SetEntityPriority(Entity* entity, u32 prio);
/**
- * Check if entity will be deleted next frame.
+ * Check if entity is disabled. Entities are disabled if:
+ * - They are deleted.
+ * - There is an event and the entity doesn't have priority
+ * (n/a if entity is in action 0).
*/
-bool32 EntityIsDeleted(Entity* entity);
+bool32 EntityDisabled(Entity* entity);
/**
* Check if system or entity is blocking updates.
@@ -477,18 +493,10 @@ void SetInitializationPriority(void);
/**
* Reset the system update priority.
*/
-void ResetSystemPriority(void);
+void ClearEventPriority(void);
void sub_0805E958(void);
-/**
- * LinkedList's which point to allocate Entities.
- * These work together with Entity.prev and Entity.next fields
- * to allow the iteration of all Entity's.
- */
-extern LinkedList gEntityLists[9];
-extern Entity gItemGetEntities[7];
-
typedef struct {
u8 unk_0;
u8 unk_1;
diff --git a/include/message.h b/include/message.h
index 344bf4ed..32f9f582 100644
--- a/include/message.h
+++ b/include/message.h
@@ -5,8 +5,10 @@
#include "entity.h"
#include "structures.h"
+#define MESSAGE_ACTIVE 0x7f
+
typedef struct {
- u8 doTextBox;
+ u8 state;
u8 unk;
u8 textSpeed;
u8 unk3; // HI?
diff --git a/include/player.h b/include/player.h
index db8c1f08..38e186e5 100644
--- a/include/player.h
+++ b/include/player.h
@@ -720,7 +720,7 @@ s32 AddInteractableObject(Entity*, u32, u32);
void RemoveInteractableObject(Entity*);
s32 GetInteractableObjectIndex();
void sub_08078AC0(u32, u32, u32);
-void sub_08078B48(void);
+void PausePlayer(void);
void sub_08078E84(Entity*, Entity*);
void sub_08078FB0(Entity*);
void sub_080792BC(s32, u32, u32);
diff --git a/include/structures.h b/include/structures.h
index 0cbe9c71..f4dc51cd 100644
--- a/include/structures.h
+++ b/include/structures.h
@@ -191,8 +191,8 @@ extern ItemBehavior gActiveItems[MAX_ACTIVE_ITEMS];
static_assert(sizeof(gActiveItems) == 0x70);
typedef struct {
- u8 sys_priority; // system requested priority
- u8 ent_priority; // entity requested priority
+ u8 event_priority; // system requested priority
+ u8 ent_priority; // entity requested priority
u8 queued_priority;
u8 queued_priority_reset;
Entity* requester;