aboutsummaryrefslogtreecommitdiff
path: root/world.h
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-03 07:32:34 +1000
committerquou <quou@disroot.org>2023-05-03 07:32:34 +1000
commit199a5e6e9ddb13af0bb557b6ebbb2c4b8f4ce873 (patch)
tree2253af9926b3d0d1e3065d910cf16db957b2eedf /world.h
parent65fa1051585f5345c3270db73ab53b7a0dbbaa50 (diff)
Basic player movement.
Diffstat (limited to 'world.h')
-rw-r--r--world.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/world.h b/world.h
index 7f19520..7dbcb4d 100644
--- a/world.h
+++ b/world.h
@@ -2,19 +2,24 @@
#define world_h
#include "components.h"
+#include "player.h"
#define max_entities 256
typedef int Entity;
-typedef struct {
+typedef struct World World;
+
+struct World {
int entity_count;
unsigned char bitmask[max_entities];
CSprite sprites[max_entities];
CPosition positions[max_entities];
-} World;
+
+ Player player;
+};
void init_world(World* world);
Entity new_entity(World* world);