summary refs log tree commit diff
path: root/src/entity.h
diff options
context:
space:
mode:
authorzlago2024-10-04 21:38:14 +0200
committerzlago2024-10-04 21:39:03 +0200
commit99ab9bd22be2506c23d1e379f35583ddab4eadf6 (patch)
tree9020eaaf55ec6ce38a50f14e5815cbf8a572d7c0 /src/entity.h
parent54ff18bd32c932b47aa77497bc8a6fb6344894b6 (diff)
map transitions
Diffstat (limited to 'src/entity.h')
-rw-r--r--src/entity.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/entity.h b/src/entity.h
index 354fbc1..fe76feb 100644
--- a/src/entity.h
+++ b/src/entity.h
@@ -9,6 +9,7 @@ struct entity {
 	int (*update)(struct entity *self);
 	int (*hurt)(struct entity *self, int damage);
 	int (*draw)(struct entity *self, int camx, int camy);
+	void (*free)(struct entity *self);
 	int x, y; // unsigned results in a bunch of weird edge cases
 	struct velocity {
 		signed x, y;
@@ -29,3 +30,13 @@ struct entity {
 	void *texture;
 	void *ext;
 };
+
+struct warp {
+	int (*update)(struct warp *);
+	unsigned x, y;
+	unsigned w, h;
+	unsigned tox, toy;
+	struct hitbox hitbox;
+	unsigned timer;
+	void *ext;
+};