summary refs log tree commit diff homepage
path: root/torus.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--torus.h17
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;
 };
eco' href='/libretls/tag/?h=3.3.1p1'>3.3.1p1June McEnroe 2021-03-05build: Add OpenSSL includes to libcompatJune McEnroe Some compat sources (getentropy_linux.c for example) require OpenSSL. Reported by Robert Scheck. 2020-12-15Import LibreSSL 3.3.1June McEnroe 2020-11-24Import LibreSSL 3.3.0June McEnroe 2020-10-22Import LibreSSL 3.2.2June McEnroe 2020-09-29Import LibreSSL 3.2.1June McEnroe 2020-09-29import: Add m4/ax_add_fortify_source.m4June McEnroe 2020-08-05build: Add README.7 to EXTRA_DIST 3.2.0June McEnroe 2020-08-03doc: Indicate that only OpenSSL 1.1.1b and newer workJune McEnroe