summaryrefslogtreecommitdiff
path: root/include/entity.h
diff options
context:
space:
mode:
authorHenny022p <73211432+Henny022p@users.noreply.github.com>2026-02-08 18:32:38 +0100
committerGitHub <noreply@github.com>2026-02-08 18:32:38 +0100
commit5ab63f00e522ff69c5bc987e379f0163943f2833 (patch)
tree53622222ac729c6ab6dc75ef7f9bafa8031daf18 /include/entity.h
parent73901a0a012d55ebb66a4627dcb246d19737fcb5 (diff)
parent5b2cafdc894823d57beee8f3947a391d881d91de (diff)
Merge pull request #701 from Henny022p/cleanup/250302HEADmaster
Various code cleanup changes
Diffstat (limited to 'include/entity.h')
-rw-r--r--include/entity.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/entity.h b/include/entity.h
index d1d08517..7361d119 100644
--- a/include/entity.h
+++ b/include/entity.h
@@ -3,7 +3,6 @@
#define ENTITY_H
#include "global.h"
-#include "color.h"
#include "sprite.h"
#define MAX_ENTITIES 72
@@ -325,10 +324,7 @@ bool32 ProcessMovement0(Entity*);
Entity* GetEmptyEntity(void);
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* CreateAuxPlayerEntity(void);
-Entity* CreateFx(Entity* parent, u32 type, u32 type2);
/// @}
/**
@@ -540,6 +536,16 @@ typedef struct {
} CarriedEntity;
extern CarriedEntity gCarriedEntity;
+typedef struct {
+ u8 event_priority; /**< system requested priority @see Priority */
+ u8 ent_priority; /**< entity requested priority @see Priority */
+ u8 queued_priority; /**< @see Priority */
+ u8 queued_priority_reset; /**< @see Priority */
+ Entity* requester;
+ u16 priority_timer;
+} PriorityHandler;
+extern PriorityHandler gPriorityHandler;
+
/**
* Current number of entities.
* @see Entity
@@ -560,7 +566,7 @@ extern u8 gManagerCount;
#define TILE(x, y) (((((x)-gRoomControls.origin_x) >> 4) & 0x3F) | ((((y)-gRoomControls.origin_y) >> 4) & 0x3F) << 6)
// Calculate tilePos from x and y coordinates where x and y are already relative to the current room.
#define TILE_LOCAL(x, y) ((((x) >> 4) & 0x3F) | (((y) >> 4) & 0x3F) << 6)
-#define TILE_POS(x, y) (x + (y << 6))
+#define TILE_POS(x, y) ((x) + ((y) << 6))
#define TILE_POS_X_COMPONENT 0x3f
#define TILE_POS_Y_COMPONENT 0xfc0
#define COORD_TO_TILE(entity) TILE((entity)->x.HALF.HI, (entity)->y.HALF.HI)