summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorzlago2024-09-30 10:52:14 +0200
committerzlago2024-09-30 10:52:14 +0200
commit45512bbc85188e3adb4eda597d0d2fa5530de651 (patch)
tree3d159b6baad17c828e42f4594353599b879cb2c8 /src/main.h
parent5ead22e91fe1165f3a9208c0d1c965b3edd104be (diff)
player animations
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/main.h b/src/main.h
index 26c4cf1..ad0951f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,23 +1,10 @@
+#pragma once
+
#include <SDL2/SDL.h>
+#include "entity.h"
extern SDL_Window *window;
extern SDL_Renderer *renderer;
extern unsigned input_now;
-extern struct entity {
- int (*update)(struct entity *self);
- int (*hurt)(struct entity *self, int damage);
- int (*draw)(struct entity *self, int camx, int camy);
- int x, y; // unsigned results in a bunch of weird edge cases
- struct velocity {
- signed x, y;
- } velocity;
- struct hitbox {
- unsigned left, right, top, bottom;
- } hitbox;
- unsigned state;
- int hp;
- int timer;
- void *texture;
- void *ext;
-} player[1];
+extern struct entity player[1];