there is now a player character and the world renders using a cammera

This commit is contained in:
2026-04-09 13:11:55 -07:00
parent 09c310cb4a
commit af639e62c3
47 changed files with 1737 additions and 83 deletions

View File

@@ -3,12 +3,13 @@
#include "vector.h"
#include "tile.h"
typedef short entity_id;
typedef int(*entity_func)(void*);
typedef int(*entity_update_func)(int, void*);
// Entity network transaction.
typedef struct {
int id;
entity_id id;
int action;
int userdataSize;
void* userdata;
@@ -23,19 +24,22 @@ typedef struct {
// Entity Struct
typedef struct {
int id;
entity_id id;
const char* name;
const char* description;
tile tile;
vec2 position;
void* userdata;
void* data;
void* world;
entity_callbacks callback;
entity_transaction ta;
unsigned char cleanup;
} entity;
entity* CreateEntity(const char* name, const char* description);
int EntityAddCallbacks(entity* e, entity_callbacks cb);
int EntitySetUserdat(entity* e, void* userdata);
int EntityMove(entity* e, vec2 pos);
// Gets
const char* GetEntityDescription(entity* e);