declaration cleanup
[netris.git] / client.c
index 344a4409091fe595feded89ad1d1a6890cabb6c9..013757261d907f97c0be72555406a4228baa3c50 100644 (file)
--- a/client.c
+++ b/client.c
@@ -77,7 +77,7 @@ static bool paused = 0;
 static char lastadd;
 
 
-void handle_setkeys(char *newKeys)
+static void handle_setkeys(char *newKeys)
 {
        int i, k, ch;
        char used[256];
@@ -113,7 +113,7 @@ void handle_setkeys(char *newKeys)
                exit(1);
 }
 
-void Usage(void)
+static void Usage(void)
 {
        Header();
        fprintf(stderr,
@@ -133,15 +133,12 @@ void Usage(void)
                "  -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"
-               "\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 handle_arg(char tag, char *value)
+static void handle_arg(char tag, char *value)
 {
        switch (tag) {
        case 'a':       //ascii
@@ -192,7 +189,7 @@ void handle_arg(char tag, char *value)
        }
 }
 
-void handle_conffile(char *filename)
+static void handle_conffile(char *filename)
 {
        FILE *file_in;
        char buf[513];
@@ -225,7 +222,7 @@ void handle_conffile(char *filename)
        } //defaults
 }
 
-int game_piece(int scr, char shape)
+static int game_piece(int scr, char shape)
 {
        Players[scr].score.pieces++;
        {
@@ -245,7 +242,7 @@ int game_piece(int scr, char shape)
        return 1;
 }
 
-void game_setpaused(void)
+static void game_setpaused(void)
 { //check whether anyone paused the game
        int i;
 
@@ -254,7 +251,7 @@ void game_setpaused(void)
                paused |= (Players[i].flags & SCF_paused) != 0;
 }
 
-void game_reset(void)
+static void game_reset(void)
 { //init new game
        int i;
 
@@ -277,7 +274,7 @@ void game_reset(void)
        InitFields();
 }
 
-void game_clear(int scr)
+static void game_clear(int scr)
 { //check for full lines
        int linesCleared;
        int linevalues[] = { 40, 100, 400, 1200, }; //= 50*lines! - 10*(lines==1)
@@ -321,7 +318,7 @@ void game_clear(int scr)
        } //lines cleared
 }
 
-void game_loop(void)
+static void game_loop(void)
 {
        bool changed = 0;
        short gameStatus = 2; //2=loop; 1=new piece; 0=quit
@@ -612,9 +609,6 @@ void game_loop(void)
                } //stop game
                case NP_newPlayer:
                {
-                       char teams[10][7] = { "", "Green", "Cyan", "Blue", "Purple",
-                                                                 "Red", "Grey", "White", "*Orange" };
-
                        if (net.uid>maxPlayer) maxPlayer = net.uid;
                        memcpy(&Players[net.uid], net.data, net.size);
                        ClearField(net.uid);
@@ -623,7 +617,7 @@ void game_loop(void)
                                Message("%s joined the game", Players[net.uid].name);
                        else
                                Message("%s joined %s team", Players[net.uid].name,
-                                       teams[Players[net.uid].team]);
+                                       teamname[Players[net.uid].team]);
                        if (Players[net.uid].flags & SCF_paused) {
                                game_setpaused();
                        } //player has paused