#include "sst.h"\r
\r
-static char classes[4][2]={"","M","N","O"};\r
static int height;\r
\r
+static char *classes[] = {"M","N","O"};\r
+\r
static int consumeTime(void) {\r
/* I think most of this avoidance was caused by overlay scheme.\r
Let's see what happens if all events can occur here */\r
chew();\r
prout("Spock- \"Planet report follows, Captain.\"");\r
skip(1);\r
- for (i = 1; i <= inplan; i++) {\r
+ for (i = 0; i < inplan; i++) {\r
if (game.state.plnets[i].known != unknown\r
#ifdef DEBUG\r
|| ( idebug && game.state.plnets[i].x !=0)\r
#ifdef DEBUG\r
if (idebug && game.state.plnets[i].known==unknown) proutn("(Unknown) ");\r
#endif\r
- cramlc(1, game.state.plnets[i].x, game.state.plnets[i].y);\r
+ proutn(cramlc(quadrant, game.state.plnets[i].x, game.state.plnets[i].y));\r
proutn(" class ");\r
proutn(classes[game.state.plnets[i].pclass]);\r
proutn(" ");\r
prout("Helmsman Sulu- \"Entering standard orbit, Sir.\"");\r
newcnd();\r
if (consumeTime()) return;\r
- proutn("Sulu- \"Entered orbit at altitude ");\r
- cramf(height = (1400.+7200.*Rand()), 0, 2);\r
- prout(" kilometers.\"");\r
+ height = (1400.+7200.*Rand());\r
+ prout("Sulu- \"Entered orbit at altitude %.2f kilometers.\"", height);\r
inorbit = 1;\r
return;\r
}\r
prout("No planet in this quadrant.");\r
return;\r
}\r
- proutn("Spock- \"Sensor scan for");\r
- cramlc(1, quadx, quady);\r
- prout("-");\r
+ prout("Spock- \"Sensor scan for %s-", cramlc(quadrant, quadx, quady));\r
skip(1);\r
- proutn(" Planet at");\r
- cramlc(2, plnetx, plnety);\r
- proutn(" is of class ");\r
- proutn(classes[game.state.plnets[iplnet].pclass]);\r
- prout(".");\r
+ prout(" Planet at %s is of class %s.", \r
+ cramlc(sector, plnetx, plnety),\r
+ classes[game.state.plnets[iplnet].pclass]);\r
if (game.state.plnets[iplnet].known==shuttle_down) \r
prout(" Sensors show Galileo still on surface.");\r
proutn(" Readings indicate");\r
Time = 3.0e-5*height;\r
if (Time >= 0.8*game.state.remtime) {\r
prout("First Officer Spock- \"Captain, I compute that such");\r
- prout(" a maneuver would require approximately ");\r
- cramf(100*Time/game.state.remtime,0,4);\r
- prout("% of our");\r
+ proutn(" a maneuver would require approximately 2d%% of our",\r
+ (int)(100*Time/game.state.remtime));\r
prout("remaining time.");\r
prout("Are you sure this is wise?\" ");\r
if (ja()==0) {\r
prout(" is still operational.\"");\r
}\r
else {\r
- prout(" has been rendered disfunctional.\"");\r
+ prout(" has been rendered nonfunctional.\"");\r
game.damage[DDRAY] = 39.95;\r
}\r
return;\r