X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=src%2Freports.c;h=0e3ad48ca9ac8fe1c63d549ff0ba80c8eb7800f3;hb=f5a89916bc70a66b6fa6a3abc4c36023503cd380;hp=6120d02f40d6bb85828612b62c48b1b4ac8b1430;hpb=2ea1ffb97cc0cdb13d8f4d42547a4e15245adfb2;p=super-star-trek.git diff --git a/src/reports.c b/src/reports.c index 6120d02..0e3ad48 100644 --- a/src/reports.c +++ b/src/reports.c @@ -35,24 +35,24 @@ void report(void) char *s1,*s2,*s3; chew(); - s1 = (game.thawed?"thawed ":""); + s1 = (game.thawed?_("thawed "):""); switch (game.length) { - case 1: s2="short"; break; - case 2: s2="medium"; break; - case 4: s2="long"; break; - default: s2="unknown length"; break; + case 1: s2=_("short"); break; + case 2: s2=_("medium"); break; + case 4: s2=_("long"); break; + default: s2=_("unknown length"); break; } switch (game.skill) { - case SKILL_NOVICE: s3="novice"; break; - case SKILL_FAIR: s3="fair"; break; - case SKILL_GOOD: s3="good"; break; - case SKILL_EXPERT: s3="expert"; break; - case SKILL_EMERITUS: s3="emeritus"; break; - default: s3="skilled"; break; + case SKILL_NOVICE: s3=_("novice"); break; + case SKILL_FAIR: s3=_("fair"); break; + case SKILL_GOOD: s3=_("good"); break; + case SKILL_EXPERT: s3=_("expert"); break; + case SKILL_EMERITUS: s3=_("emeritus"); break; + default: s3=_("skilled"); break; } prout(""); - prout(_("You %s playing a %s%s %s game."), - game.alldone? _("were") : _("are now"), s1, s2, s3); + prout(_("You %s a %s%s %s game."), + game.alldone? _("were playing") : _("are playing"), s1, s2, s3); if (game.skill>SKILL_GOOD && game.thawed && !game.alldone) prout(_("No plaque is allowed.")); if (game.tourn) prout(_("This is tournament game %d."), game.tourn); prout(_("Your secret password is \"%s\""),game.passwd); @@ -270,11 +270,11 @@ static void status(int req) case 2: if (game.condition != docked) newcnd(); switch (game.condition) { - case red: cp = "RED"; break; - case green: cp = "GREEN"; break; - case yellow: cp = "YELLOW"; break; - case docked: cp = "DOCKED"; break; - case dead: cp="DEAD"; break; + case red: cp = _("RED"); break; + case green: cp = _("GREEN"); break; + case yellow: cp = _("YELLOW"); break; + case docked: cp = _("DOCKED"); break; + case dead: cp = _("DEAD"); break; } for (t=0;t0) @@ -325,7 +325,7 @@ static void status(int req) if (game.options & OPTION_WORLDS) { int plnet = game.state.galaxy[game.quadrant.x][game.quadrant.y].planet; if (plnet != NOPLANET && game.state.plnets[plnet].inhabited != UNINHABITED) - proutn(_("Major system %s"), systemname(plnet)); + proutn(_("Major system %s"), systnames[plnet]); else proutn(_("Sector is uninhabited")); } @@ -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 */ @@ -379,9 +379,9 @@ int srscan(int l) break; if (req > sizeof(requests)/sizeof(requests[0])) { prout(_("UNRECOGNIZED REQUEST. Legal requests are:")); - prout(_(" date, condition, position, lsupport, warpfactor,")); - prout(_(" energy, torpedoes, shields, klingons, time, system, bases.")); - return false; + prout((" date, condition, position, lsupport, warpfactor,")); + prout((" energy, torpedoes, shields, klingons, time, system, bases.")); + 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