summaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h
index 0595b37..26c4cf1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,3 +1,23 @@
-//#include <SDL2/SDL.h>
-extern void /*SDL_Window*/ *window;
-extern void /*SDL_Renderer*/ *renderer;
+#include <SDL2/SDL.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];