diff options
author | June McEnroe <june@causal.agency> | 2018-07-17 23:23:16 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2018-07-17 23:35:21 -0400 |
commit | 8e4d15cf8fdf389a34666b5df47255c972478209 (patch) | |
tree | f9de04153bd6592461af82bc22ba817121cdfbc3 /torus.h | |
parent | Tabify source (diff) | |
download | torus-8e4d15cf8fdf389a34666b5df47255c972478209.tar.gz torus-8e4d15cf8fdf389a34666b5df47255c972478209.zip |
Add server map generation
Diffstat (limited to '')
-rw-r--r-- | torus.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/torus.h b/torus.h index 3538213..c058a4d 100644 --- a/torus.h +++ b/torus.h @@ -88,12 +88,28 @@ static const struct { }; static const size_t SPAWNS_LEN = sizeof(SPAWNS) / sizeof(SPAWNS[0]); +enum { + MAP_ROWS = 11, + MAP_COLS = 11, +}; + +struct Map { + struct MapTile { + time_t createTime; + time_t modifyTime; + time_t accessTime; + uint32_t modifyCount; + uint32_t accessCount; + } tiles[MAP_ROWS][MAP_COLS]; +}; + struct ServerMessage { enum PACKED { SERVER_TILE, SERVER_MOVE, SERVER_PUT, SERVER_CURSOR, + SERVER_MAP, } type; union { struct { @@ -122,6 +138,7 @@ struct ClientMessage { CLIENT_MOVE, CLIENT_PUT, CLIENT_SPAWN, + CLIENT_MAP, } type; union { struct { |