}
else prout(_("(Shields not currently useable.)"));
}
- newqad(0);
+ newqad(false);
/* Adjust finish time to time of tractor beaming */
fintim = game.state.date+game.optime;
attack(0);
skip(1);
prout(_("Entering %s."), cramlc(quadrant, game.quadrant));
game.quad[game.sector.x][game.sector.y] = game.ship;
- newqad(0);
+ newqad(false);
if (game.skill>SKILL_NOVICE) attack(0);
return;
}
postpone(FTBEAM, game.optime);
game.damage[DRADIO] += game.optime;
}
- newqad(0);
+ newqad(false);
events(); /* Stas Sergeev added this -- do pending events */
}
}
/* Since starbase not in quadrant, set up new quadrant */
game.quadrant = game.state.baseq[line];
- newqad(1);
+ newqad(true);
}
/* dematerialize starship */
game.quad[game.sector.x][game.sector.y]=IHDOT;
char *systemname(int pindx)
{
- /* the below array shoud not be static, or it won't gettextize
+ static char copy[BUFSIZ];
+ /* the below array should not be static, or it won't gettextize
* because of the early initialization. */
- char *names[NINHAB] =
+ char *names[NINHAB+1] =
{
/*
* I used <http://www.memory-alpha.org> to find planets
_("Marcos XII"), /* TOS: "And the Children Shall Lead", */
_("Omega IV"), /* TOS: "The Omega Glory" */
_("Regulus V"), /* TOS: "Amok Time */
- _("Deeva"), /* TOS: "Operation -- Annihilate!" */
+ _("Deneva"), /* TOS: "Operation -- Annihilate!" */
/* Worlds from BSD Trek */
_("Rigel II"), /* TOS: "Shore Leave" ("III" in BSD) */
_("Beta III"), /* TOS: "The Return of the Archons" */
_("Coridan (Desotriana)"), /* TOS: "Journey to Babel" */
_("Iotia"), /* TOS: "A Piece of the Action" */
#endif
- };
+ };
- return names[pindx];
+ strcpy(copy, names[pindx]);
+ return copy;
}
prout("the Federation in a prisoner-of-war exchange.");
nb = Rand()*game.state.rembase+1;
/* Set up quadrant and position FQ adjacient to base */
- if (game.quadrant.x!=game.state.baseq[nb].x || game.quadrant.y!=game.state.baseq[nb].y) {
- game.quadrant.x = game.state.baseq[nb].x;
- game.quadrant.y = game.state.baseq[nb].y;
+ if (!same(game.quadrant, game.state.baseq[nb])) {
+ game.quadrant = game.state.baseq[nb];
game.sector.x = game.sector.y = 5;
- newqad(1);
+ newqad(true);
}
for (;;) {
/* position next to base by trial and error */
if (l < QUADSIZE+1) break; /* found a spot */
game.sector.x=QUADSIZE/2;
game.sector.y=QUADSIZE/2;
- newqad(1);
+ newqad(true);
}
}
/* Get new commission */
prout("Good Luck!");
if (game.state.nscrem) prout(" YOU'LL NEED IT.");
waitfor();
- newqad(0);
+ newqad(false);
if (game.nenhere-iqhere-game.ithere) game.shldup = true;
if (game.neutz) attack(0); // bad luck to start in a Romulan Neutral Zone
}
game.kpower[i] = Rand()*150.0 +300.0 +25.0*game.skill;
}
-void newqad(int shutup)
+void newqad(bool shutup)
{
int i, j;
coord w;
void prout(char *, ...);
void proutn(char *, ...);
void stars(void);
-void newqad(int);
+void newqad(bool);
bool ja(void);
void cramen(int);
void crmshp(void);