projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Get rid of obnoxious visible "have we paused?" state.
[super-star-trek.git]
/
src
/
ai.c
diff --git
a/src/ai.c
b/src/ai.c
index 99024df9acddcd8b0c05c7ae222de6fad5ee2f9d..66b50d7165ded56ef8d606e8f368760c8f96b21b 100644
(file)
--- a/
src/ai.c
+++ b/
src/ai.c
@@
-267,7
+267,7
@@
static void movebaddy(coord com, int loccom, feature ienm)
}
}
}
}
-void mov
com
(void)
+void mov
eklings
(void)
/* move a commander */
{
coord w;
/* move a commander */
{
coord w;
@@
-307,7
+307,7
@@
void movcom(void)
sortkl();
}
sortkl();
}
-static bool movescom(coord iq, bool flag
, bool *ipage
)
+static bool movescom(coord iq, bool flag)
/* commander movement helper */
{
int i;
/* commander movement helper */
{
int i;
@@
-351,15
+351,13
@@
static bool movescom(coord iq, bool flag, bool *ipage)
}
/* check for a helpful planet */
for (i = 0; i < game.inplan; i++) {
}
/* check for a helpful planet */
for (i = 0; i < game.inplan; i++) {
- if (same(game.state.plnets[i].w, game.state.kscmdr) &&
- game.state.plnets[i].crystals == present) {
+ if (same(game.state.pl
a
nets[i].w, game.state.kscmdr) &&
+ game.state.pl
a
nets[i].crystals == present) {
/* destroy the planet */
/* destroy the planet */
- DESTROY(&game.state.plnets[i]);
+ DESTROY(&game.state.pl
a
nets[i]);
game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].planet = NOPLANET;
if (!damaged(DRADIO) || game.condition == docked) {
game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].planet = NOPLANET;
if (!damaged(DRADIO) || game.condition == docked) {
- if (!*ipage)
- pause_game(true);
- *ipage = true;
+ pause_game(true);
prout(_("Lt. Uhura- \"Captain, Starfleet Intelligence reports"));
proutn(_(" a planet in "));
proutn(cramlc(quadrant, game.state.kscmdr));
prout(_("Lt. Uhura- \"Captain, Starfleet Intelligence reports"));
proutn(_(" a planet in "));
proutn(cramlc(quadrant, game.state.kscmdr));
@@
-372,7
+370,7
@@
static bool movescom(coord iq, bool flag, bool *ipage)
return false; /* looks good! */
}
return false; /* looks good! */
}
-void scom(
bool *ipage
)
+void scom(
void
)
/* move the Super Commander */
{
int i, i2, j, ideltax, ideltay, ifindit, iwhichb;
/* move the Super Commander */
{
int i, i2, j, ideltax, ideltay, ifindit, iwhichb;
@@
-472,32
+470,32
@@
void scom(bool *ipage)
/* try moving in both x and y directions */
iq.x = game.state.kscmdr.x + ideltax;
iq.y = game.state.kscmdr.y + ideltax;
/* try moving in both x and y directions */
iq.x = game.state.kscmdr.x + ideltax;
iq.y = game.state.kscmdr.y + ideltax;
- if (movescom(iq, flag
, ipage
)) {
+ if (movescom(iq, flag)) {
/* failed -- try some other maneuvers */
if (ideltax==0 || ideltay==0) {
/* attempt angle move */
if (ideltax != 0) {
iq.y = game.state.kscmdr.y + 1;
/* failed -- try some other maneuvers */
if (ideltax==0 || ideltay==0) {
/* attempt angle move */
if (ideltax != 0) {
iq.y = game.state.kscmdr.y + 1;
- if (movescom(iq, flag
, ipage
)) {
+ if (movescom(iq, flag)) {
iq.y = game.state.kscmdr.y - 1;
iq.y = game.state.kscmdr.y - 1;
- movescom(iq, flag
, ipage
);
+ movescom(iq, flag);
}
}
else {
iq.x = game.state.kscmdr.x + 1;
}
}
else {
iq.x = game.state.kscmdr.x + 1;
- if (movescom(iq, flag
, ipage
)) {
+ if (movescom(iq, flag)) {
iq.x = game.state.kscmdr.x - 1;
iq.x = game.state.kscmdr.x - 1;
- movescom(iq, flag
, ipage
);
+ movescom(iq, flag);
}
}
}
else {
/* try moving just in x or y */
iq.y = game.state.kscmdr.y;
}
}
}
else {
/* try moving just in x or y */
iq.y = game.state.kscmdr.y;
- if (movescom(iq, flag
, ipage
)) {
+ if (movescom(iq, flag)) {
iq.y = game.state.kscmdr.y + ideltay;
iq.x = game.state.kscmdr.x;
iq.y = game.state.kscmdr.y + ideltay;
iq.x = game.state.kscmdr.x;
- movescom(iq, flag
, ipage
);
+ movescom(iq, flag);
}
}
}
}
}
}
@@
-518,9
+516,7
@@
void scom(bool *ipage)
if (damaged(DRADIO) && game.condition != docked)
return; /* no warning */
game.iseenit = true;
if (damaged(DRADIO) && game.condition != docked)
return; /* no warning */
game.iseenit = true;
- if (!*ipage)
- pause_game(true);
- *ipage = true;
+ pause_game(true);
proutn(_("Lt. Uhura- \"Captain, the starbase in "));
proutn(cramlc(quadrant, game.state.kscmdr));
skip(1);
proutn(_("Lt. Uhura- \"Captain, the starbase in "));
proutn(cramlc(quadrant, game.state.kscmdr));
skip(1);
@@
-544,9
+540,7
@@
void scom(bool *ipage)
(damaged(DRADIO) && game.condition != docked) ||
!game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].charted))
return;
(damaged(DRADIO) && game.condition != docked) ||
!game.state.galaxy[game.state.kscmdr.x][game.state.kscmdr.y].charted))
return;
- if (!*ipage)
- pause_game(true);
- *ipage = true;
+ pause_game(true);
prout(_("Lt. Uhura- \"Captain, Starfleet Intelligence reports"));
proutn(_(" the Super-commander is in "));
proutn(cramlc(quadrant, game.state.kscmdr));
prout(_("Lt. Uhura- \"Captain, Starfleet Intelligence reports"));
proutn(_(" the Super-commander is in "));
proutn(cramlc(quadrant, game.state.kscmdr));