{"DEBUG", DEBUGCMD, 0},
#define MAYDAY 32
{"MAYDAY", MAYDAY, 0},
- {"SOS", MAYDAY, 0},
+ //{"SOS", MAYDAY, 0},
{"CALL", MAYDAY, 0},
#define QUIT 33
{"QUIT", QUIT, 0},
};
#define NUMCOMMANDS sizeof(commands)/sizeof(commands[0])
+#define ACCEPT(i) (!commands[i].option || (commands[i].option & game.options))
static void listCommands(void) {
int i, k = 0;
proutn("LEGAL COMMANDS ARE:");
for (i = 0; i < NUMCOMMANDS; i++) {
- if (commands[i].option && !(commands[i].option & game.options))
+ if (!ACCEPT(i))
continue;
if (k % 5 == 0)
skip(1);
setwnd(message_window);
if (key == IHEOL) return;
for (i = 0; i < NUMCOMMANDS; i++) {
- if (strcasecmp(commands[i].name, citem)==0) {
+ if (ACCEPT(i) && strcasecmp(commands[i].name, citem)==0) {
i = commands[i].value;
break;
}
setwnd(message_window);
clrscr();
for (i=0; i < ABANDON; i++)
- if (isit(commands[i].name)) {
+ if (ACCEPT(i) && isit(commands[i].name)) {
v = commands[i].value;
break;
}
if (i < ABANDON && (!commands[i].option || (commands[i].option & game.options)))
break;
for (; i < NUMCOMMANDS; i++)
- if (strcasecmp(commands[i].name, citem) == 0) {
+ if (ACCEPT(i) && strcasecmp(commands[i].name, citem) == 0) {
v = commands[i].value;
break;
}
score();
break;
case SENSORS: // sensors
- sensor(TRUE);
+ sensor();
break;
case ORBIT: // orbit
orbit();
{
int i, option;
- game.options = OPTION_ALL &~ OPTION_IOMODES;
+ game.options = OPTION_ALL &~ (OPTION_IOMODES | OPTION_SHOWME);
if (getenv("TERM"))
- game.options |= OPTION_CURSES;
+ game.options |= OPTION_CURSES | OPTION_SHOWME;
else
game.options |= OPTION_TTY;
for (i=0; i < NDEVICES; i++)
if (game.damage[i] > 0.0)
game.damage[i] = 0.0;
- stdamtim = 1e30;
}
proutn("Toggle idebug? ");
if (ja() != 0) {
key = scan();
if (key == IHALPHA && isit("y")) {
game.damage[i] = 10.0;
- if (i == DRADIO) stdamtim = game.state.date;
}
}
}
int i;
for (i = 1; i < NEVENTS; i++) {
int key;
- if (game.future[i] == 1e30) continue;
+ if (game.future[i] == FOREVER) continue;
switch (i) {
case FSNOVA: proutn("Supernova "); break;
case FTBEAM: proutn("T Beam "); break;