summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c
index 768c8d12..497c3c37 100644
--- a/src/object.c
+++ b/src/object.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "entity.h"
+#include "manager.h"
#include "object.h"
void (*const gObjectFunctions[])(Entity*) = {
@@ -198,3 +199,17 @@ void (*const gObjectFunctions[])(Entity*) = {
[ENEMY_ITEM] = EnemyItem,
[OBJECT_C1] = ObjectC1,
};
+
+void InitObject(Entity*);
+
+void ObjectUpdate(Entity* this) {
+ if ((this->flags & ENT_DID_INIT) == 0 && this->action == 0)
+ InitObject(this);
+ if (this->iframes != 0)
+ this->iframes++;
+ if (!CheckDontUpdate(this)) {
+ gObjectFunctions[this->id](this);
+ this->bitfield &= ~0x80;
+ }
+ DrawEntity(this);
+}