projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More magic-number chasing.
[super-star-trek.git]
/
reports.c
diff --git
a/reports.c
b/reports.c
index 4c3fd33c896b94eef7cb4063b53c6a3db5437301..8b01a6d5d00f34bddd93c189ec58387889539a97 100644
(file)
--- a/
reports.c
+++ b/
reports.c
@@
-132,9
+132,9
@@
void lrscan(void) {
if (x == 0 || x > GALSIZE || y == 0 || y > GALSIZE)
proutn(" -1");
else {
if (x == 0 || x > GALSIZE || y == 0 || y > GALSIZE)
proutn(" -1");
else {
- if (game.state.galaxy[x][y]<
1000
) proutn(" %3d", game.state.galaxy[x][y]);
+ if (game.state.galaxy[x][y]<
SUPERNOVA_PLACE
) proutn(" %3d", game.state.galaxy[x][y]);
else proutn("***");
else proutn("***");
- game.starch[x][y] = game.damage[DRADIO] > 0 ? game.state.galaxy[x][y]+
1000
: 1;
+ game.starch[x][y] = game.damage[DRADIO] > 0 ? game.state.galaxy[x][y]+
SUPERNOVA_PLACE
: 1;
}
}
prout(" ");
}
}
prout(" ");
@@
-175,7
+175,7
@@
void chart(int nn) {
stdamtim = game.state.date;
for (i=1; i <= GALSIZE ; i++)
for (j=1; j <= GALSIZE; j++)
stdamtim = game.state.date;
for (i=1; i <= GALSIZE ; i++)
for (j=1; j <= GALSIZE; j++)
- if (game.starch[i][j] == 1) game.starch[i][j] = game.state.galaxy[i][j]+
1000
;
+ if (game.starch[i][j] == 1) game.starch[i][j] = game.state.galaxy[i][j]+
SUPERNOVA_PLACE
;
}
else {
proutn("(Last surveillance update %d stardates ago.",
}
else {
proutn("(Last surveillance update %d stardates ago.",
@@
-193,7
+193,7
@@
void chart(int nn) {
strcpy(buf, ".1.");
else if (game.starch[i][j] == 0)
strcpy(buf, "...");
strcpy(buf, ".1.");
else if (game.starch[i][j] == 0)
strcpy(buf, "...");
- else if (game.state.galaxy[i][j]>=
1000
)
+ else if (game.state.galaxy[i][j]>=
SUPERNOVA_PLACE
)
strcpy(buf, "***");
else
sprintf(buf, "%03d", game.state.galaxy[i][j]);
strcpy(buf, "***");
else
sprintf(buf, "%03d", game.state.galaxy[i][j]);
@@
-227,7
+227,7
@@
int srscan(int l) {
prout(" [Using Base's sensors]");
}
else proutn(" Short-range scan\n\r");
prout(" [Using Base's sensors]");
}
else proutn(" Short-range scan\n\r");
- if (goodScan) game.starch[quadx][quady] = game.damage[DRADIO]>0.0 ? game.state.galaxy[quadx][quady]+
1000
:1;
+ if (goodScan) game.starch[quadx][quady] = game.damage[DRADIO]>0.0 ? game.state.galaxy[quadx][quady]+
SUPERNOVA_PLACE
:1;
scan();
if (isit("chart")) nn = TRUE;
if (isit("no")) rightside = FALSE;
scan();
if (isit("chart")) nn = TRUE;
if (isit("no")) rightside = FALSE;
@@
-257,11
+257,11
@@
int srscan(int l) {
break;
}
if (condit != IHDOCKED) newcnd();
break;
}
if (condit != IHDOCKED) newcnd();
- for (i = 1; i <=
10
; i++) {
+ for (i = 1; i <=
QUADSIZE
; i++) {
jj = (k!=0 ? k : i);
if (leftside) {
proutn("%2d ", i);
jj = (k!=0 ? k : i);
if (leftside) {
proutn("%2d ", i);
- for (j = 1; j <=
10
; j++) {
+ for (j = 1; j <=
QUADSIZE
; j++) {
if (goodScan || (abs(i-sectx)<= 1 && abs(j-secty) <= 1)){
if ((game.quad[i][j]==IHMATER0)||(game.quad[i][j]==IHMATER1)||(game.quad[i][j]==IHMATER2)||(game.quad[i][j]==IHE)||(game.quad[i][j]==IHF)){
switch (condit) {
if (goodScan || (abs(i-sectx)<= 1 && abs(j-secty) <= 1)){
if ((game.quad[i][j]==IHMATER0)||(game.quad[i][j]==IHMATER1)||(game.quad[i][j]==IHMATER2)||(game.quad[i][j]==IHE)||(game.quad[i][j]==IHF)){
switch (condit) {