24 lines
511 B
C
24 lines
511 B
C
#ifndef WORLD_H
|
|
#define WORLD_H
|
|
|
|
#include "entity.h"
|
|
|
|
struct world {
|
|
u64 tick_id; /* Starts at 1 */
|
|
u64 tick_published_ts;
|
|
|
|
f64 dt;
|
|
f64 time;
|
|
|
|
struct v2 player_move_dir; /* Player movement direction */
|
|
struct v2 player_focus; /* Mouse cursor pos in world coordinates */
|
|
|
|
struct entity_store entity_store;
|
|
};
|
|
|
|
void world_alloc(struct world *world);
|
|
void world_copy_replace(struct world *dest, struct world *src);
|
|
struct entity_array world_get_entities(struct world *world);
|
|
|
|
#endif
|