there is now a player character and the world renders using a cammera
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user