X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=blobdiff_plain;f=src%2Freports.c;h=39fcf36cbed4df92796eb802f3db2b304390536d;hp=6120d02f40d6bb85828612b62c48b1b4ac8b1430;hb=0def1139fe1c02cd25c21fe26c9a9722debf4211;hpb=2ea1ffb97cc0cdb13d8f4d42547a4e15245adfb2 diff --git a/src/reports.c b/src/reports.c index 6120d02..39fcf36 100644 --- a/src/reports.c +++ b/src/reports.c @@ -337,7 +337,7 @@ static void status(int req) } } -int srscan(int l) +void srscan(scantype type) /* short-range scan */ { /* the "sy" request is undocumented */ @@ -346,7 +346,7 @@ int srscan(int l) int i, j, jj, req=0; int goodScan=true, leftside=true, rightside=true, title=false; - switch (l) { + switch (type) { case SCAN_FULL: // SRSCAN if (damaged(DSRSENS)) { /* Allow base's sensors if docked */ @@ -381,7 +381,7 @@ int srscan(int l) prout(_("UNRECOGNIZED REQUEST. Legal requests are:")); prout(_(" date, condition, position, lsupport, warpfactor,")); prout(_(" energy, torpedoes, shields, klingons, time, system, bases.")); - return false; + return; } // no break case SCAN_STATUS: // STATUS @@ -405,11 +405,10 @@ int srscan(int l) if (rightside) status(jj); if (i 360.0) + return; + co = (aaitem + 22) / 45; + v = &visdelta[co]; + ix = game.sector.x + v->x; + iy = game.sector.y + v->y; + if (ix < 0 || ix >= QUADSIZE || iy < 0 || iy >= QUADSIZE) + co = '?'; + else + co = game.quad[ix][iy]; + printf("%d,%d %c ", ix, iy, co); + v++; + ix = game.sector.x + v->x; + iy = game.sector.y + v->y; + if (ix < 0 || ix >= QUADSIZE || iy < 0 || iy >= QUADSIZE) + co = '?'; + else + co = game.quad[ix][iy]; + printf("%c ", co); + v++; + ix = game.sector.x + v->x; + iy = game.sector.y + v->y; + if (ix < 0 || ix >= QUADSIZE || iy < 0 || iy >= QUADSIZE) + co = '?'; + else + co = game.quad[ix][iy]; + printf("%c %d,%d\n", co, ix, iy); + game.optime = 0.5; + game.ididit = true; +} +#endif