- commandhook(commands[i].name, TRUE);
- switch (i) { /* command switch */
- case SRSCAN: // srscan
- srscan(SCAN_FULL);
- break;
- case STATUS: // status
- srscan(SCAN_STATUS);
- break;
- case REQUEST: // status request
- srscan(SCAN_REQUEST);
- break;
- case LRSCAN: // lrscan
- lrscan();
- break;
- case PHASERS: // phasers
- phasers();
- if (ididit) hitme = TRUE;
- break;
- case TORPEDO: // photons
- photon();
- if (ididit) hitme = TRUE;
- break;
- case MOVE: // move
- warp(1);
- break;
- case SHIELDS: // shields
- doshield(1);
- if (ididit) {
- hitme=TRUE;
- shldchg = 0;
- }
- break;
- case DOCK: // dock
- dock(1);
- if (ididit) attack(0);
- break;
- case DAMAGES: // damages
- dreprt();
- break;
- case CHART: // chart
- chart(0);
- break;
- case IMPULSE: // impulse
- impuls();
- break;
- case REST: // rest
- wait();
- if (ididit) hitme = TRUE;
- break;
- case WARP: // warp
- setwrp();
- break;
- case SCORE: // score
- score();
- break;
- case SENSORS: // sensors
- sensor();
- break;
- case ORBIT: // orbit
- orbit();
- if (ididit) hitme = TRUE;
- break;
- case TRANSPORT: // transport "beam"
- beam();
- break;
- case MINE: // mine
- mine();
- if (ididit) hitme = TRUE;
- break;
- case CRYSTALS: // crystals
- usecrystals();
- if (ididit) hitme = TRUE;
- break;
- case SHUTTLE: // shuttle
- shuttle();
- if (ididit) hitme = TRUE;
- break;
- case PLANETS: // Planet list
- preport();
- break;
- case REPORT: // Game Report
- report();
- break;
- case COMPUTER: // use COMPUTER!
- eta();
- break;
- case COMMANDS:
- listCommands(usecurses);
- break;
- case EMEXIT: // Emergency exit
- clrscr(); // Hide screen
- freeze(TRUE); // forced save
- exit(1); // And quick exit
- break;
- case PROBE:
- probe(); // Launch probe
- if (ididit) hitme = TRUE;
- break;
- case ABANDON: // Abandon Ship
- abandn();
- break;
- case DESTRUCT: // Self Destruct
- dstrct();
- break;
- case SAVE: // Save Game
- freeze(FALSE);
- clrscr();
- if (skill > 3)
- prout("WARNING--Saved games produce no plaques!");
- break;
- case DEATHRAY: // Try a desparation measure
- deathray();
- if (ididit) hitme = TRUE;
- break;
- case DEBUGCMD: // What do we want for debug???
+ if (i < NUMCOMMANDS && (!commands[i].option || (commands[i].option & game.options)))
+ break;
+ listCommands();
+ }
+ commandhook(commands[i].name, TRUE);
+ switch (v) { /* command switch */
+ case SRSCAN: // srscan
+ srscan(SCAN_FULL);
+ break;
+ case STATUS: // status
+ srscan(SCAN_STATUS);
+ break;
+ case REQUEST: // status request
+ srscan(SCAN_REQUEST);
+ break;
+ case LRSCAN: // lrscan
+ lrscan();
+ break;
+ case PHASERS: // phasers
+ phasers();
+ if (ididit) hitme = TRUE;
+ break;
+ case TORPEDO: // photons
+ photon();
+ if (ididit) hitme = TRUE;
+ break;
+ case MOVE: // move
+ warp(1);
+ break;
+ case SHIELDS: // shields
+ doshield(1);
+ if (ididit) {
+ hitme=TRUE;
+ shldchg = 0;
+ }
+ break;
+ case DOCK: // dock
+ dock(1);
+ if (ididit) attack(0);
+ break;
+ case DAMAGES: // damages
+ dreprt();
+ break;
+ case CHART: // chart
+ chart(0);
+ break;
+ case IMPULSE: // impulse
+ impuls();
+ break;
+ case REST: // rest
+ wait();
+ if (ididit) hitme = TRUE;
+ break;
+ case WARP: // warp
+ setwrp();
+ break;
+ case SCORE: // score
+ score();
+ break;
+ case SENSORS: // sensors
+ sensor();
+ break;
+ case ORBIT: // orbit
+ orbit();
+ if (ididit) hitme = TRUE;
+ break;
+ case TRANSPORT: // transport "beam"
+ beam();
+ break;
+ case MINE: // mine
+ mine();
+ if (ididit) hitme = TRUE;
+ break;
+ case CRYSTALS: // crystals
+ usecrystals();
+ if (ididit) hitme = TRUE;
+ break;
+ case SHUTTLE: // shuttle
+ shuttle();
+ if (ididit) hitme = TRUE;
+ break;
+ case PLANETS: // Planet list
+ preport();
+ break;
+ case REPORT: // Game Report
+ report();
+ break;
+ case COMPUTER: // use COMPUTER!
+ eta();
+ break;
+ case COMMANDS:
+ listCommands();
+ break;
+ case EMEXIT: // Emergency exit
+ clrscr(); // Hide screen
+ freeze(TRUE); // forced save
+ exit(1); // And quick exit
+ break;
+ case PROBE:
+ probe(); // Launch probe
+ if (ididit) hitme = TRUE;
+ break;
+ case ABANDON: // Abandon Ship
+ abandn();
+ break;
+ case DESTRUCT: // Self Destruct
+ dstrct();
+ break;
+ case SAVE: // Save Game
+ freeze(FALSE);
+ clrscr();
+ if (skill > SKILL_GOOD)
+ prout("WARNING--Saved games produce no plaques!");
+ break;
+ case DEATHRAY: // Try a desparation measure
+ deathray();
+ if (ididit) hitme = TRUE;
+ break;
+ case DEBUGCMD: // What do we want for debug???