:
#
-# Netris -- A free networked version of Tetris
-# Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+# Netris -- A free networked version of T*tris
+# Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: Configure,v 1.16 1995/07/11 08:55:42 mhw Exp $
+# $Id: Configure,v 1.17 1996/02/09 08:22:03 mhw Exp $
#
CC="gcc"
Now do a 'make'
END
+
+# vi: ts=4 ai
# Netris
# Frequently asked questions
#
-# $Id: FAQ,v 1.1 1995/07/11 07:50:43 mhw Exp $
+# $Id: FAQ,v 1.3 1996/02/09 08:47:23 mhw Exp $
#
-Contents
-========
+Questions
+=========
[1] Where can I find the latest version?
[2] The pieces look bizarre in my xterm window, and don't erase
properly. What's up?
-c player?
[6] I'm using a slow terminal, and the game response is sluggish.
What can I do?
+[7] Why can't my terminal hide the cursor?
Answers
=======
[1] Where can I find the latest version?
- My machine doesn't currently have a constant hostname, but you can
- usually find the hostname from `finger mhw@cs.brown.edu`, at least
- until the Fall of 1995.
+ ftp://ftp.netris.org/pub/netris/
- If you find my machine, you can get the latest version via
- anonymous ftp from the /pub directory. If anonymous ftp isn't
- working, it's probably not my machine, so please don't badger it
- with lots of retry attempts.
-
- Unfortunately that is not a permanent site. If that machine
- doesn't exist, try mailing me.
+ The latest version is available via anonymous ftp from
+ ftp.netris.org in /pub/netris.
+
+ Unfortunately this machine is currently on the far end of a
+ 14.4kbps modem connection, and may go away at any time without
+ notice, but I'll do my best to keep it up. If you have trouble
+ contacting the ftp server, try mailing me at <mhw@netris.org>.
[2] The pieces look bizarre in my xterm window, and don't erase
properly. What's up?
Try the -S option. This disables use of standout mode (bold/inverse),
which require control sequences to be sent twice (or more) per line.
- This looks nice, but can make the game unplayable on a slow terminal.
+ Standout mode makes the pieces look much more like blocks, but can
+ make the game unplayable on a slow terminal.
Also, you can type 's' to toggle spying (updating your view of the
opponent's board).
+
+[7] Why can't my terminal hide the cursor?
+
+ Netris uses the termcap library to look up the "vi" and "ve"
+ capabilities, which make the cursor invisible/visible
+ respectively. These capabilities aren't very consistently
+ reported among un*xes, so I use compiled-in vt220 codes for
+ several vt100-like terminals. Most emulators probably won't
+ support the codes, but they'll probably ignore them quietly.
+
+ Try setting the TERM environment variable to "vt100" or "vt220"
+ before running Netris. If that doesn't work, your terminal
+ probably doesn't support cursor invisibility.
+
+# vi: tw=70 ai
#
-# Netris -- A free networked version of Tetris
-# Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+# Netris -- A free networked version of T*tris
+# Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
-# $Id: README,v 1.19 1995/07/11 07:50:45 mhw Exp $
+# $Id: README,v 1.20 1996/02/09 08:22:06 mhw Exp $
#
This is an unfinished developmental version of Netris, a free
-networked version of Tetris. It is distributed under the terms
+networked version of T*tris. It is distributed under the terms
of the GNU General Public License, which is described in the
file "COPYING" included with this distribution.
It's been built and tested on at least the following systems:
- NetBSD-1.0
- NetBSD-current July 9, 1995
+ NetBSD 1.0, 1.1
Linux
- SunOS 4.1.1, 4.1.3, 5.3
+ SunOS 4.1.1, 4.1.3
+ Solaris 2.3, 2.4
HP-UX
If Netris doesn't build on your favorite system "out-of-the-box",
I encourage you to mail me context diffs to fix the problem so I
can fold it into the next version.
+Netris should build cleanly on 64-bit systems such as the Alpha,
+although you might need to edit the definitions for netint{2,4},
+hton{2,4}, and ntoh{2,4} in netris.h. Alpha users, please let me know
+how it goes, and send me diffs if needed!
+
See the FAQ in this directory if you have any problems.
+
+NEW IN VERSION 0.4
+==================
+- Netris now attempts to make the cursor invisible for terminals that
+ support it. Xterm no, vt220 yes, vt100 maybe?
+- Ctrl-L (by default) will now redraw the screen.
+- Various cleanup and documentation changes.
+
+
INSTALLATION
============
1. Run "./Configure" to create a Makefile and config.h appropriate
Try "./Configure -h" for more options
+
RUNNING
=======
To start a two-player game, do the following:
1. Player 1 types "netris -w". This means "wait for challenge".
2. Player 2 types "netris -c <host>" where <host> is the hostname
- of Player 1. This means "challenge". Player 1 must be waiting
- when this command is typed.
+ of Player 1. This means "challenge".
To start a one-player game, run netris with no parameters.
One-player mode is a tad boring at the moment, because it never
gets any faster, and there's no scoring. This will be rectified
-at some point.
-
-To get usage, type "netris -h".
-To use a port number other than the default, use the -p option.
-To provide compatibility with the older protocol version, use
- the -o option.
+at some point. For now, use the "f" key (by default) to make the
+game go faster. Speedups cannot be reversed for the remainder of
+the game.
-I plan on implementing a server that Netris players can connect to
-to find other players with similar skill across the globe.
+Unlike standard T*tris, Netris gives you a little extra time after
+dropping a piece before it solidifies. This allows you to slide the
+piece into a notch without waiting for it to fall the whole way down.
+In fact, if you can even slide it off a cliff and it'll start falling
+again. If you think it should automatically drop again in this case,
+use the -D option.
The keys are:
'j' left
'm' down faster
's' toggle spying on the other player
'p' pause
- 'f' make game faster
+ 'f' make game faster (irreversable)
+ Ctrl-L redraw the screen
-You can remap the keys using the -k option. The default is:
- netris -k "jkl mspf"
+To see usage information, type "netris -h".
+To see distribution/warranty information, type "netris -H".
+To see the rules, type "netris -R".
+To use a port number other than the default, use the -p option.
-This version now at least partially supports robots. A rough description
+You can remap the keys with "-k <keys>", where <keys> is a string
+containing the keys in the order listed above. The default is:
+ netris -k "jkl mspf^l"
+
+You needn't specify all of the keys, for example -k "asd" will only
+change the main three keys. "^x" notation can be used for control
+characters.
+
+The "m" key moves the falling piece down one block, in addition to the
+usual step-down timer. Use this in repetition when "drop" would go
+too far but you don't want to wait for the piece of fall.
+
+
+RUMORS
+======
+At some point I may implement a server that Netris players can connect
+to to find other players with similar skill across the globe.
+
+This version at least partially supports robots. A rough description
of the protocol is in "robot_desc", and a sample robot is in sr.c.
+
+The source code should be viewed with tab stops set every 4 columns,
+eg, "less -x4 game.c".
+
+# vi: tw=70 ai
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: board.c,v 1.13 1995/07/11 08:53:20 mhw Exp $
+ * $Id: board.c,v 1.14 1996/02/09 08:22:08 mhw Exp $
*/
#include "netris.h"
curY[scr] += count;
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: curses.c,v 1.29 1995/07/11 08:53:21 mhw Exp $
+ * $Id: curses.c,v 1.32 1996/02/09 08:47:25 mhw Exp $
*/
#include "netris.h"
static int boardYPos[MAX_SCREENS], boardXPos[MAX_SCREENS];
static int statusYPos, statusXPos;
+static char *term_vi; /* String to make cursor invisible */
+static char *term_ve; /* String to make cursor visible */
+
ExtFunc void InitScreens(void)
{
MySigSet oldMask;
+ GetTermcapInfo();
+
+ /*
+ * Do this atomically. Otherwise a badly timed Ctrl-C during
+ * initialization will leave your terminal in a bad state.
+ */
BlockSignals(&oldMask, SIGINT, 0);
initscr();
AtExit(CleanupScreens);
RestoreSignals(NULL, &oldMask);
+
cbreak();
noecho();
+ OutputTermStr(term_vi, 0);
AddEventGen(&keyGen);
+
move(0, 0);
addstr("Netris ");
addstr(version_string);
- addstr(" (C) 1994,1995 Mark Weaver "
- "\"netris -h\" for more info");
+ addstr(" (C) 1994,1995,1996 Mark H. Weaver "
+ "\"netris -h\" for more info");
statusYPos = 22;
statusXPos = 0;
}
{
RemoveEventGen(&keyGen);
endwin();
+ OutputTermStr(term_ve, 1);
+}
+
+ExtFunc void GetTermcapInfo(void)
+{
+ char *term, *buf, *data;
+ int bufSize = 10240;
+
+ if (!(term = getenv("TERM")))
+ return;
+ if (tgetent(scratch, term) == 1) {
+ /*
+ * Make the buffer HUGE, since tgetstr is unsafe.
+ * Allocate it on the heap too.
+ */
+ data = buf = malloc(bufSize);
+
+ /*
+ * There is no standard include file for tgetstr, no prototype
+ * definitions. I like casting better than using my own prototypes
+ * because if I guess the prototype, I might be wrong, especially
+ * with regards to "const".
+ */
+ term_vi = (char *)tgetstr("vi", &data);
+ term_ve = (char *)tgetstr("ve", &data);
+
+ /* Okay, so I'm paranoid; I just don't like unsafe routines */
+ if (data > buf + bufSize)
+ fatal("tgetstr overflow, you must have a very sick termcap");
+
+ /* Trim off the unused portion of buffer */
+ buf = realloc(buf, data - buf);
+ }
+
+ /*
+ * If that fails, use hardcoded vt220 codes.
+ * They don't seem to do anything bad on vt100's, so
+ * we'll try them just in case they work.
+ */
+ if (!term_vi || !term_ve) {
+ static char *vts[] = {
+ "vt100", "vt101", "vt102",
+ "vt200", "vt220", "vt300",
+ "vt320", "vt400", "vt420",
+ "screen", "xterm", NULL };
+ int i;
+
+ for (i = 0; vts[i]; i++)
+ if (!strcmp(term, vts[i]))
+ {
+ term_vi = "\033[?25l";
+ term_ve = "\033[?25h";
+ break;
+ }
+ }
+ if (!term_vi || !term_ve)
+ term_vi = term_ve = NULL;
+}
+
+ExtFunc void OutputTermStr(char *str, int flush)
+{
+ if (str) {
+ fputs(str, stdout);
+ if (flush)
+ fflush(stdout);
+ }
}
ExtFunc void InitScreen(int scr)
ExtFunc void ShowDisplayInfo(void)
{
move(statusYPos - 9, statusXPos);
- printw("Seed = %d", initSeed);
+ printw("Seed: %d", initSeed);
clrtoeol();
move(statusYPos - 8, statusXPos);
- printw("Speed = %dms", speed / 1000);
+ printw("Speed: %dms", speed / 1000);
clrtoeol();
if (robotEnable) {
move(statusYPos - 6, statusXPos);
refresh();
}
+ExtFunc void ScheduleFullRedraw(void)
+{
+ touchwin(stdscr);
+}
+
static MyEventType KeyGenFunc(EventGenRec *gen, MyEvent *event)
{
if (MyRead(gen->fd, &event->u.key, 1))
return E_none;
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: game.c,v 1.37 1995/07/11 08:53:23 mhw Exp $
+ * $Id: game.c,v 1.38 1996/02/09 08:22:11 mhw Exp $
*/
#define NOEXT
#include <sys/types.h>
#include <netinet/in.h>
-enum { KT_left, KT_rotate, KT_right, KT_drop,
- KT_down, KT_toggleSpy, KT_pause, KT_faster, KT_numKeys };
+enum { KT_left, KT_rotate, KT_right, KT_drop, KT_down,
+ KT_toggleSpy, KT_pause, KT_faster, KT_redraw, KT_numKeys };
static char *keyNames[KT_numKeys+1] = {
"Left", "Rotate", "Right", "Drop", "Down", "ToggleSpy", "Pause",
- "Faster", NULL };
+ "Faster", "Redraw", NULL };
static char *gameNames[GT_len] = { "OnePlayer", "ClassicTwo" };
-static char keyTable[KT_numKeys+1] = "jkl mspf";
+static char keyTable[KT_numKeys+1];
static int dropModeEnable = 0;
static char *robotProg;
+ExtFunc void MapKeys(char *newKeys)
+{
+ int i, k, ch;
+ char used[256];
+ int errs = 0;
+
+ /* XXX assumptions about ASCII encoding here */
+ for (i = k = 0; newKeys[i] && k < KT_numKeys; i++,k++) {
+ if (newKeys[i] == '^' && newKeys[i+1])
+ keyTable[k] = toupper(newKeys[++i]) - ('A' - 1);
+ else
+ keyTable[k] = newKeys[i];
+ }
+ memset(used, 0, sizeof(used));
+ for (k = 0; k < KT_numKeys; k++) {
+ ch = (unsigned char) keyTable[k];
+ if (used[ch]) {
+ if (iscntrl(ch) && ch < ' ')
+ sprintf(scratch, "Ctrl-%c", ch + ('A' - 1));
+ else if (isprint(ch))
+ sprintf(scratch, "\"%c\"", ch);
+ else
+ sprintf(scratch, "0x%X", ch);
+ if (!errs)
+ fprintf(stderr, "Duplicate key mappings:\n");
+ errs++;
+ fprintf(stderr, " %s mapped to both %s and %s\n",
+ scratch, keyNames[used[ch]-1], keyNames[k]);
+ }
+ used[ch] = k + 1;
+ }
+ if (errs)
+ exit(1);
+}
+
ExtFunc int StartNewPiece(int scr, Shape *shape)
{
curShape[scr] = shape;
if (!p)
break;
keyEvent:
- if (paused && (key != KT_pause))
+ if (paused && (key != KT_pause) && (key != KT_redraw))
break;
switch(key) {
case KT_left:
ShowDisplayInfo();
changed = 1;
break;
+ case KT_redraw:
+ ScheduleFullRedraw();
+ if (paused)
+ RefreshScreen();
+ break;
}
if (dropMode && DropPiece(scr) > 0) {
if (spied)
standoutEnable = 1;
stepDownInterval = DEFAULT_INTERVAL;
+ MapKeys(DEFAULT_KEYS);
while ((ch = getopt(argc, argv, "hHRs:r:Fk:c:woDSp:i:")) != -1)
switch (ch) {
case 'c':
case 'S':
standoutEnable = 0;
break;
+ case 'k':
+ MapKeys(optarg);
+ break;
case 'H':
DistInfo();
exit(0);
case 'R':
Rules();
exit(0);
- case 'k':
- {
- int i;
-
- for (i=0;optarg[i] && i < KT_numKeys;i++)
- keyTable[i] = optarg[i];
- break;
- }
case 'h':
Usage();
exit(0);
return 0;
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: inet.c,v 1.17 1995/07/11 08:53:25 mhw Exp $
+ * $Id: inet.c,v 1.18 1996/02/09 08:22:13 mhw Exp $
*/
#include "netris.h"
RemoveEventGen(&netGen);
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: netris.h,v 1.26 1995/07/11 08:53:26 mhw Exp $
+ * $Id: netris.h,v 1.27 1996/02/09 08:22:14 mhw Exp $
*/
#ifndef NETRIS_H
#define DEFAULT_PORT 9284 /* Very arbitrary */
+#define DEFAULT_KEYS "jkl mspf^l"
+
/* Protocol versions */
#define MAJOR_VERSION 1
#define PROTOCOL_VERSION 3
#endif /* NETRIS_H */
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: robot.c,v 1.7 1995/07/11 08:53:28 mhw Exp $
+ * $Id: robot.c,v 1.8 1996/02/09 08:22:15 mhw Exp $
*/
#include "netris.h"
return E_robot;
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
-$Id: robot_desc,v 1.2 1994/12/12 22:42:42 mhw Exp $
+$Id: robot_desc,v 1.3 1996/02/09 08:22:16 mhw Exp $
GENERAL PROTOCOL
TimeStamp 1.326
[...]
Exit
+
+
+# vi: tw=70 ai
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: shapes.c,v 1.14 1995/07/11 08:53:29 mhw Exp $
+ * $Id: shapes.c,v 1.15 1996/02/09 08:22:17 mhw Exp $
*/
#include "netris.h"
return netMapping[num];
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
* sr -- A sample robot for Netris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: sr.c,v 1.9 1995/07/11 08:53:30 mhw Exp $
+ * $Id: sr.c,v 1.10 1996/02/09 08:22:20 mhw Exp $
*/
#include <stdio.h>
return 0;
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */
/*
- * Netris -- A free networked version of Tetris
- * Copyright (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>
+ * Netris -- A free networked version of T*tris
+ * Copyright (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: util.c,v 1.26 1995/07/11 08:53:32 mhw Exp $
+ * $Id: util.c,v 1.27 1996/02/09 08:22:23 mhw Exp $
*/
#include "netris.h"
ExtFunc void Usage(void)
{
fprintf(stderr,
- "Netris version %s (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>\n"
- "Usage: netris <options>\n"
- " -h Print usage information\n"
- " -w Wait for connection\n"
- " -c <host> Initiate connection\n"
- " -p <port> Set port number (default is %d)\n"
- " -k <keys> Remap keys. The argument is a string containing\n"
- " the keys in order: left, rotate, right, drop,\n"
- " down-faster, toggle-spying, pause\n"
- " -i <sec> Set the step-down interval, in seconds\n"
- " -r <robot> Execute <robot> (a command) as a robot controlling\n"
- " the game instead of the keyboard\n"
- " -F Use fair robot interface\n"
- " -s <seed> Start with given random seed\n"
- " -D Drops go into drop mode\n"
- " This means that sliding off a cliff after a drop causes\n"
- " another drop automatically\n"
- " -S Disable standout mode (inverse/bold) for slow terminals\n"
- " -H Show distribution and warranty information\n"
- " -R Show rules\n",
- version_string, DEFAULT_PORT);
+ "Netris version %s (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>\n"
+ "Usage: netris <options>\n"
+ " -h Print usage information\n"
+ " -w Wait for connection\n"
+ " -c <host> Initiate connection\n"
+ " -p <port> Set port number (default is %d)\n"
+ " -k <keys> Remap keys. The argument is a prefix of the string\n"
+ " containing the keys in order: left, rotate, right, drop,\n"
+ " down-faster, toggle-spying, pause, faster, redraw.\n"
+ " \"^\" prefixes controls. (default is \"%s\")\n"
+ " -i <sec> Set the step-down interval, in seconds\n"
+ " -r <robot> Execute <robot> (a command) as a robot controlling\n"
+ " the game instead of the keyboard\n"
+ " -F Use fair robot interface\n"
+ " -s <seed> Start with given random seed\n"
+ " -D Drops go into drop mode\n"
+ " This means that sliding off a cliff after a drop causes\n"
+ " another drop automatically\n"
+ " -S Disable standout mode (inverse/bold) for slow terminals\n"
+ " -H Show distribution and warranty information\n"
+ " -R Show rules\n",
+ version_string, DEFAULT_PORT, DEFAULT_KEYS);
}
ExtFunc void DistInfo(void)
{
fprintf(stderr,
- "Netris version %s (C) 1994,1995 Mark Weaver <Mark_Weaver@brown.edu>\n"
- "\n"
- "This program is free software; you can redistribute it and/or modify\n"
- "it under the terms of the GNU General Public License as published by\n"
- "the Free Software Foundation; either version 2 of the License, or\n"
- "(at your option) any later version.\n"
- "\n"
- "This program is distributed in the hope that it will be useful,\n"
- "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- "GNU General Public License for more details.\n"
- "\n"
- "You should have received a copy of the GNU General Public License\n"
- "along with this program; if not, write to the Free Software\n"
- "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n",
- version_string);
+ "Netris version %s (C) 1994,1995,1996 Mark H. Weaver <mhw@netris.org>\n"
+ "\n"
+ "This program is free software; you can redistribute it and/or modify\n"
+ "it under the terms of the GNU General Public License as published by\n"
+ "the Free Software Foundation; either version 2 of the License, or\n"
+ "(at your option) any later version.\n"
+ "\n"
+ "This program is distributed in the hope that it will be useful,\n"
+ "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "GNU General Public License for more details.\n"
+ "\n"
+ "You should have received a copy of the GNU General Public License\n"
+ "along with this program; if not, write to the Free Software\n"
+ "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n",
+ version_string);
}
ExtFunc void Rules(void)
{
fprintf(stderr,
- "Netris version %s rules\n"
- "\n"
- "Two player mode\n"
- "---------------\n"
- "It's just like normal Tetris except that when you clear more than\n"
- "one row with a single piece, the other player's board is moved up\n"
- "and junk rows are added to the bottom. If you clear 2, 3 or 4\n"
- "rows, 1, 2 or 4 junk rows are added to your opponent's board,\n"
- "respectively. The junk rows have exactly one empty column.\n"
- "For each group of junk rows given, the empty columns will line\n"
- "up. This is intentional.\n"
- "\n"
- "The longest surviving player wins the game.\n"
- "\n"
- "One player mode\n"
- "---------------\n"
- "This mode is currently very boring, because there's no scoring\n"
- "and it never gets any faster. This will be rectified at some point.\n"
- "I'm not very motivated to do it right now because I'm sick of one\n"
- "player Tetris.\n",
- version_string);
+ "Netris version %s rules\n"
+ "\n"
+ "Two player mode\n"
+ "---------------\n"
+ "It's just like normal T*tris except that when you clear more than\n"
+ "one row with a single piece, the other player's board is moved up\n"
+ "and junk rows are added to the bottom. If you clear 2, 3 or 4\n"
+ "rows, 1, 2 or 4 junk rows are added to your opponent's board,\n"
+ "respectively. The junk rows have exactly one empty column.\n"
+ "For each group of junk rows given, the empty columns will line\n"
+ "up. This is intentional.\n"
+ "\n"
+ "The longest surviving player wins the game.\n"
+ "\n"
+ "One player mode\n"
+ "---------------\n"
+ "This mode is currently very boring, because there's no scoring\n"
+ "and it never gets any faster. This will be rectified at some point.\n"
+ "I'm not very motivated to do it right now because I'm sick of one\n"
+ "player T*tris. For now, use the \"f\" key (by default) to make the\n"
+ "game go faster. Speedups cannot be reversed for the remainder of\n"
+ "the game.\n",
+ version_string);
}
/*
}
}
+/*
+ * vi: ts=4 ai
+ * vim: noai si
+ */