prout(_(" surveillance reports are coming in."));
skip(1);
if (game.iseenit==0) {
- attakreport(0);
+ attakreport(false);
game.iseenit = 1;
}
rechart();
crmshp();
prout(_(" caught in long range tractor beam--"));
/* If Kirk & Co. screwing around on planet, handle */
- atover(1); /* atover(1) is Grab */
+ atover(true); /* atover(true) is Grab */
if (game.alldone) return;
if (game.icraft == 1) { /* Caught in Galileo? */
finish(FSTRACTOR);
* Things past this point have policy implications.
*/
-void drawmaps(short l)
+void drawmaps(int mode)
/* hook to be called after moving to redraw maps */
{
if (game.options & OPTION_CURSES) {
- if (l == 1)
+ if (mode == 1)
sensor();
setwnd(srscan_window);
wmove(curwnd, 0, 0);
enqueue("no");
srscan(SCAN_FULL);
- if (l != 2) {
+ if (mode != 2) {
setwnd(report_window);
wclear(report_window);
wmove(report_window, 0, 0);
if (game.options & OPTION_CURSES) {
setwnd(message_window);
wclear(message_window);
- chart(0);
+ chart(false);
}
}
(is_scheduled(FCDBAS) || game.isatb == 1) && game.iseenit == 0) {
/* get attack report from base */
prout(_("Lt. Uhura- \"Captain, an important message from the starbase:\""));
- attakreport(0);
+ attakreport(false);
game.iseenit = 1;
}
}
return;
}
-void atover(int igrab)
+void atover(bool igrab)
{
double power, distreq;
#include <stdlib.h>
#include <string.h>
-void attakreport(int curt)
+void attakreport(bool curt)
{
if (!curt) {
if (is_scheduled(FCDBAS)) {
if (!damaged(DRADIO) || game.condit == IHDOCKED || game.iseenit) {
/* Don't report this if not seen and
either the radio is dead or not at base! */
- attakreport(0);
+ attakreport(false);
game.iseenit = 1;
}
if (game.casual) prout(_("%d casualt%s suffered so far."),
}
}
-void chart(int nn)
+void chart(bool title)
{
int i,j;
chew();
rechart();
}
- if (nn == 0) prout(_(" STAR CHART FOR THE KNOWN GALAXY"));
+ if (!title) prout(_(" STAR CHART FOR THE KNOWN GALAXY"));
if (game.state.date > game.lastchart)
prout(_("(Last surveillance update %d stardates ago)."),
(int)(game.state.date-game.lastchart));
break;
case 11:
- attakreport(1);
+ attakreport(true);
break;
}
}
{"","da","co","po","ls","wa","en","to","sh","kl","sy", "ti"};
int i, j, jj, req=0;
- int goodScan=true, leftside=true, rightside=true, nn=false;
+ int goodScan=true, leftside=true, rightside=true, title=false;
switch (l) {
case SCAN_FULL: // SRSCAN
if (damaged(DSRSENS)) {
game.state.galaxy[game.quadrant.x][game.quadrant.y].charted = true;
}
scan();
- if (isit("chart")) nn = true;
+ if (isit("chart")) title = true;
if (isit("no")) rightside = false;
chew();
prout(" 1 2 3 4 5 6 7 8 9 10");
if (req!=0) return(goodScan);
}
prout("");
- if (nn) chart(1);
+ if (title) chart(true);
return(goodScan);
}
return;
}
-void setup(int needprompt)
+void setup(bool needprompt)
{
int i,j, krem, klumper;
int ix, iy;
// Decide how many of everything
if (choose(needprompt)) return; // frozen game
// Prepare the Enterprise
- game.alldone = game.gamewon = 0;
+ game.alldone = game.gamewon = false;
game.ship = IHE;
game.state.crew = FULLCREW;
game.energy = game.inenrg = 5000.0;
dreprt();
break;
case CHART: // chart
- chart(0);
+ chart(false);
break;
case IMPULSE: // impulse
impuls();
if (game.alldone) break; // Events did us in
}
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // Galaxy went Nova!
- atover(0);
+ atover(false);
continue;
}
- if (hitme && game.justin==0) {
+ if (hitme && !game.justin) {
attack(2);
if (game.alldone) break;
if (game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova) { // went NOVA!
- atover(0);
+ atover(false);
hitme = true;
continue;
}
proutn("Induce supernova here? ");
if (ja()) {
game.state.galaxy[game.quadrant.x][game.quadrant.y].supernova = true;
- atover(1);
+ atover(true);
}
}
void prelim(void);
void attack(int);
bool choose(bool);
-void setup(int);
+void setup(bool);
void score(void);
-void atover(int);
+void atover(bool);
int srscan(int);
void lrscan(void);
void phasers(void);
void doshield(int);
void dock(bool);
void dreprt(void);
-void chart(int);
+void chart(bool);
void rechart(void);
void impuls(void);
void wait(void);
void preport(void);
void orbit(void);
void sensor(void);
-void drawmaps(short);
+void drawmaps(int);
void beam(void);
void mine(void);
void usecrystals(void);
void shuttle(void);
void deathray(void);
void debugme(void);
-void attakreport(int);
+void attakreport(bool);
void movetho(void);
void probe(void);
void iostart(void);
void setwnd(WINDOW *);
void warble(void);
-void boom(int ii, int jj);
-void tracktorpedo(int ix, int iy, int l, int i, int n, int iquad);
+void boom(int, int);
+void tracktorpedo(int, int, int, int, int, int);
void cgetline(char *, int);
void waitfor(void);
void setpassword(void);