about summary refs log tree commit diff homepage
path: root/client.c
diff options
context:
space:
mode:
authorJune McEnroe <programble@gmail.com>2017-08-28 23:38:40 -0400
committerJune McEnroe <programble@gmail.com>2017-08-28 23:38:40 -0400
commit66761cd30ee1da5b820c89c38fac6caf42fbe715 (patch)
tree2471ddbdfc0bc4dfc84998521cb175048d7282fe /client.c
parentMove license above includes (diff)
downloadtorus-66761cd30ee1da5b820c89c38fac6caf42fbe715.tar.gz
torus-66761cd30ee1da5b820c89c38fac6caf42fbe715.zip
Add respawning
Diffstat (limited to '')
-rw-r--r--client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/client.c b/client.c
index 2a8c8c5..5e70b17 100644
--- a/client.c
+++ b/client.c
@@ -65,6 +65,11 @@ static void clientPut(uint8_t color, char cell) {
     clientMessage(&msg);
 }
 
+static void clientSpawn(void) {
+    struct ClientMessage msg = { .type = CLIENT_SPAWN };
+    clientMessage(&msg);
+}
+
 static uint8_t inputColor = COLOR_WHITE;
 
 static void colorFg(uint8_t fg) {
@@ -180,6 +185,7 @@ static void readInput(void) {
         case ESC: mode = MODE_NORMAL; break;
 
         case 'q': endwin(); exit(EX_OK);
+        case 'Q': clientSpawn(); break;
 
         case 'a': clientMove(1, 0); // fallthrough
         case 'i': insertMode(1, 0); break;