void preport(void)
{
- int iknow = 0, i;
+ bool iknow = false;
+ int i;
skip(1);
chew();
prout("Spock- \"Planet report follows, Captain.\"");
for (i = 0; i < game.inplan; i++) {
if ((game.state.plnets[i].known != unknown
&& game.state.plnets[i].crystals != 0)
-#ifdef DEBUG
- || ( game.idebug && game.state.plnets[i].x !=0)
-#endif
+ || (idebug && game.state.plnets[i].w.x !=0)
) {
- iknow = 1;
-#ifdef DEBUG
- if (game.idebug && game.state.plnets[i].known==unknown) proutn("(Unknown) ");
-#endif
+ iknow = true;
+ if (idebug && game.state.plnets[i].known==unknown)
+ proutn("(Unknown) ");
proutn(cramlc(quadrant, game.state.plnets[i].w));
proutn(" class ");
proutn(classes[game.state.plnets[i].pclass]);
{
skip(1);
chew();
- if (game.inorbit!=0) {
+ if (game.inorbit) {
prout("Already in standard orbit.");
return;
}
if (consumeTime()) return;
game.height = (1400.0+7200.0*Rand());
prout("Sulu- \"Entered orbit at altitude %.2f kilometers.\"", game.height);
- game.inorbit = 1;
- game.ididit=1;
+ game.inorbit = true;
+ game.ididit = true;
}
void sensor(void)
}
return;
}
- if (game.inorbit==0) {
+ if (!game.inorbit) {
crmshp();
prout(" not in standard orbit.");
return;
else prout("Shuttle craft is now serving Big Macs.");
return;
}
- if (game.inorbit==0) {
+ if (!game.inorbit) {
crmshp();
prout(" not in standard orbit.");
return;
prouts("Sulu- \"Captain! It's working!\"");
skip(2);
while (game.nenhere > 0)
- deadkl(game.ks[1].x,game.ks[1].y,game.quad[game.ks[1].x][game.ks[1].y],game.ks[1].x,game.ks[1].y);
+ deadkl(game.ks[1], game.quad[game.ks[1].x][game.ks[1].y],game.ks[1].x,game.ks[1].y);
prout("Ensign Chekov- \"Congratulations, Captain!\"");
if (KLINGREM == 0) finish(FWON);
if ((game.options & OPTION_PLAIN) == 0) {
return;
}
-char *systemname(planet *planet)
+char *systemname(int pindx)
{
static char *names[NINHAB] =
{
"Exo III", /* TOS: "What Are Little Girls Made Of?" (Class P) */
};
- return names[planet->inhabited];
+ return names[pindx];
}