diff options
author | June McEnroe <june@causal.agency> | 2017-08-29 18:33:59 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2017-08-29 18:33:59 -0400 |
commit | af645c09089d1ed8e99c760f05234ac3df402901 (patch) | |
tree | 34d0e446f96cd3c9944b651ad98cf07dfe7a3df7 /torus.h | |
parent | Add respawning (diff) | |
download | torus-af645c09089d1ed8e99c760f05234ac3df402901.tar.gz torus-af645c09089d1ed8e99c760f05234ac3df402901.zip |
Add four additional spawns
Diffstat (limited to '')
-rw-r--r-- | torus.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/torus.h b/torus.h index 85ae3d5..fe5e6b1 100644 --- a/torus.h +++ b/torus.h @@ -58,8 +58,18 @@ static_assert(offsetof(struct Tile, colors) == 2016, "stable colors offset"); #define TILE_COLS (512) #define TILES_SIZE (sizeof(struct Tile[TILE_ROWS][TILE_COLS])) -#define TILE_INIT_X (0) -#define TILE_INIT_Y (0) +static const struct { + uint32_t tileX; + uint32_t tileY; +} SPAWN[] = { + { 0, 0 }, + { TILE_COLS * 3 / 4, TILE_ROWS * 3 / 4 }, // NW + { TILE_COLS * 1 / 4, TILE_ROWS * 3 / 4 }, // NE + { TILE_COLS * 1 / 4, TILE_ROWS * 1 / 4 }, // SE + { TILE_COLS * 3 / 4, TILE_ROWS * 1 / 4 }, // SW +}; + +#define SPAWN_COUNT (sizeof(SPAWN) / sizeof(SPAWN[0])) enum ServerMessageType { SERVER_TILE, @@ -109,5 +119,8 @@ struct ClientMessage { uint8_t color; char cell; } p; + struct { + uint8_t spawn; + } s; } data; }; |