message window needs to show at least 2 history lines
[netris.git] / client.c
index 64acecc6928b6afae51fd8bdd642570a6d013216..a1e284d39475f5e9d282120ccf1dc1a05487db3d 100644 (file)
--- a/client.c
+++ b/client.c
@@ -31,7 +31,7 @@
 #include "board.h"
 #include "curses.h"
 #include "inet.h"
-#include "msg.en.h"
+#include "msg.h"
 
 static struct option options[] = {
        { "ascii",              2, 0, 'a' },
@@ -105,18 +105,34 @@ void MapKeys(char *newKeys)
                exit(1);
 }
 
-void WriteConf(void)
+void Usage(void)
 {
-       FILE *file_out;
-
-       file_out = fopen(CONFIG_FILE, "w");
-       if (file_out == NULL)
-               die("Error writing config file");
-
-       fprintf(file_out, "### NETRIS %s Config file ###\n\n", version_string);
-
-       fclose(file_out);
-       fprintf(stderr, "Wrote new game configuration to %s\n", CONFIG_FILE);
+       Header();
+       fprintf(stderr,
+               "Usage: netris <options>\n"
+               "\n"
+               "  -h, --help\t\tPrint this usage information\n"
+               "  -H, --info\t\tShow distribution and warranty information\n"
+               "  -R, --rules\t\tShow game rules\n"
+               "\n"
+               "  -S, --slowterm\tDisable inverse/bold/color for slow terminals\n"
+               "  -a, --ascii\t\tUse ascii characters\n"
+               "  -C, --color=0\t\tDisable color\n"
+               "\n"
+               "  -c, --connect <host>\tInitiate connection\n"
+               "  -p, --port <port>\tSet port number (default is %d)\n"
+               "\n"
+               "  -t, --team <team>\tJoin a team (don't receive lines from your teammates)\n"
+               "  -l, --level <lvl>\tBegin at a higher level (can be used as handicap)\n"
+               "  -k, --keys <keys>\tRemap keys (default is \"%s\" for cursors)\n"
+               "  -d, --dropmode\tDrops go into drop mode\n"
+               "  -D, --instadrop\tInstant drop\n"
+               "\n"
+               "  -r, --robot <cmd>\tExecute program to control the game instead of keyboard\n"
+               "  -F, --fair-robot\tUse fair robot interface\n"
+               "\n",
+               DEFAULT_PORT, DEFAULT_KEYS
+       );
 }
 
 void HandleOption(char tag, char *value)