{ "color", 2, 0, 'C' },
{ "slowterm", 2, 0, 'S' },
{ "keys", 1, 0, 'k' },
- { "rules", 0, 0, 'R' },
{ "info", 0, 0, 'H' },
{ "help", 0, 0, 'h' },
{ 0, 0, 0, 0 }
static char lastadd;
-void handle_setkeys(char *newKeys)
+static void handle_setkeys(char *newKeys)
{
int i, k, ch;
char used[256];
exit(1);
}
-void Usage(void)
+static void Usage(void)
{
Header();
fprintf(stderr,
"\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"
);
}
-void handle_arg(char tag, char *value)
+static void handle_arg(char tag, char *value)
{
switch (tag) {
case 'a': //ascii
Header();
DistInfo();
exit(0);
- case 'R': //rules
- Rules();
- exit(0);
case 'h': //help
Usage();
exit(0);
}
}
-void handle_conffile(char *filename)
+static void handle_conffile(char *filename)
{
FILE *file_in;
char buf[513];
} //defaults
}
-int game_piece(int scr, char shape)
+static int game_piece(int scr, char shape)
{
Players[scr].score.pieces++;
{
return 1;
}
-void game_setpaused(void)
+static void game_setpaused(void)
{ //check whether anyone paused the game
int i;
paused |= (Players[i].flags & SCF_paused) != 0;
}
-void game_reset(void)
+static void game_reset(void)
{ //init new game
int i;
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)
} //lines cleared
}
-void game_loop(void)
+static void game_loop(void)
{
bool changed = 0;
short gameStatus = 2; //2=loop; 1=new piece; 0=quit
} //new piece
while (gameStatus == 2) {
for (i = 1; i < MAX_SCREENS; i++)
- if (Players[i].alive > 0 && PlayerDisp[i])
+ if (Players[i].alive > 0 && window[i].shown)
changed |= RefreshBoard(i);
if (changed) {
if (!paused) ShowTime();
// else
handle_conffile(CONFIG_FILE);
while ((ch = getopt_long(
- argc, argv, "hHRk:c:n:oSCap:i:l:t:", options, NULL
+ argc, argv, "hHk:c:n:oSCap:i:l:t:", options, NULL
)) != -1)
handle_arg(ch, optarg);
if (optind < argc) {