quady = (iy+9)/10;\r
sectx = ix - 10*(quadx-1);\r
secty = iy - 10*(quady-1);\r
- proutn("\nEntering");\r
- cramlc(1, quadx, quady);\r
- skip(1);\r
+ prout("");\r
+ prout("Entering %s.",\r
+ cramlc(quadrant, quadx, quady));\r
game.quad[sectx][secty] = ship;\r
newqad(0);\r
return;\r
skip(1);\r
proutn("***");\r
crmshp();\r
- proutn(" pulled into black hole at");\r
- cramlc(2, ix, iy);\r
- skip(1);\r
+ proutn(" pulled into black hole at ");\r
+ prout(cramlc(sector, ix, iy));\r
finish(FHOLE);\r
return;\r
default:\r
skip(1);\r
crmshp();\r
if (iquad == IHWEB)\r
- proutn(" encounters Tholian web at");\r
+ proutn(" encounters Tholian web at ");\r
else\r
- proutn(" blocked by object at");\r
- cramlc(2, ix,iy);\r
+ proutn(" blocked by object at ");\r
+ proutn(cramlc(sector, ix,iy));\r
prout(";");\r
proutn("Emergency stop required ");\r
- cramf(stopegy, 0, 2);\r
- prout(" units of energy.");\r
+ prout("%2d units of energy.", (int)stopegy);\r
energy -= stopegy;\r
finalx = x-deltax+0.5;\r
sectx = finalx;\r
if (!isprobe) {\r
if (itemp) {\r
if (iprompt) {\r
- proutn("Helmsman Sulu- \"Course locked in for");\r
- cramlc(2, irows, icols);\r
- prout(".\"");\r
+ proutn("Helmsman Sulu- \"Course locked in for %s.\"",\r
+ cramlc(sector, irows, icols));\r
}\r
}\r
else prout("Ensign Chekov- \"Course laid in, Captain.\"");\r
prout("First Officer Spock- \"Captain, the impulse engines");\r
prout("require 20.0 units to engage, plus 100.0 units per");\r
if (energy > 30) {\r
- proutn("quadrant. We can go, therefore, a maximum of ");\r
- cramf(0.01 * (energy-20.0)-0.05, 0, 1);\r
+ proutn("quadrant. We can go, therefore, a maximum of %d", \r
+ (int)(0.01 * (energy-20.0)-0.05));\r
prout(" quadrants.\"");\r
}\r
else {\r
prout("We can't do it, Captain. We haven't the energy.");\r
}\r
else {\r
- proutn("We haven't the energy, but we could do it at warp ");\r
- crami(iwarp, 1);\r
- if (shldup)\r
- prout(",\nif you'll lower the shields.");\r
+ proutn("We haven't the energy, but we could do it at warp %d", iwarp);\r
+ if (shldup) {\r
+ prout(",");\r
+ prout("if you'll lower the shields.");\r
+ }\r
else\r
prout(".");\r
}\r
if (Time >= 0.8*game.state.remtime) {\r
skip(1);\r
prout("First Officer Spock- \"Captain, I compute that such");\r
- proutn(" a trip would require approximately ");\r
- cramf(100.0*Time/game.state.remtime, 0, 2);\r
+ proutn(" a trip would require approximately %2.0f",\r
+ 100.0*Time/game.state.remtime);\r
prout(" percent of our");\r
prout(" remaining time. Are you sure this is wise?\"");\r
if (ja() == 0) { ididit = 0; return;}\r
warpfac = aaitem;\r
wfacsq=warpfac*warpfac;\r
if (warpfac <= oldfac || warpfac <= 6.0) {\r
- proutn("Helmsman Sulu- \"Warp factor ");\r
- cramf(warpfac, 0, 1);\r
- prout(", Captain.\"");\r
+ proutn("Helmsman Sulu- \"Warp factor %do, Captain.\"", \r
+ (int)warpfac);\r
return;\r
}\r
if (warpfac < 8.00) {\r
}\r
warpfac = 6.0+2.0*Rand();\r
wfacsq = warpfac * warpfac;\r
- proutn("Warp factor set to ");\r
- cramf(warpfac, 1, 1);\r
- skip(1);\r
+ prout("Warp factor set to %d", (int)warpfac);\r
power = 0.75*energy;\r
dist = power/(warpfac*warpfac*warpfac*(shldup+1));\r
distreq = 1.4142+Rand();\r
prout("***TIME WARP ENTERED.");\r
if (game.state.snap && Rand() < 0.5) {\r
/* Go back in time */\r
- proutn("You are traveling backwards in time ");\r
- cramf(game.state.date-game.snapsht.date, 0, 2);\r
- prout(" stardates.");\r
+ prout("You are traveling backwards in time %d stardates.",\r
+ (int)(game.state.date-game.snapsht.date));\r
game.state = game.snapsht;\r
game.state.snap = 0;\r
if (game.state.remcom) {\r
/* Make sure Galileo is consistant -- Snapshot may have been taken\r
when on planet, which would give us two Galileos! */\r
gotit = 0;\r
- for (l = 1; l <= inplan; l++) {\r
+ for (l = 0; l < inplan; l++) {\r
if (game.state.plnets[l].known == shuttle_down) {\r
gotit = 1;\r
if (iscraft==1 && ship==IHE) {\r
else {\r
/* Go forward in time */\r
Time = -0.5*intime*log(Rand());\r
- proutn("You are traveling forward in time ");\r
- cramf(Time, 1, 2);\r
- prout(" stardates.");\r
+ prout("You are traveling forward in time %d stardates.", (int)Time);\r
/* cheat to make sure no tractor beams occur during time warp */\r
game.future[FTBEAM] += Time;\r
game.damage[DRADIO] += Time;\r
\r
if (key == IHEOL) {\r
/* slow mode, so let Kirk know how many probes there are left */\r
- crami(nprobes,1);\r
- prout(nprobes==1 ? " probe left." : " probes left.");\r
+ prout(nprobes==1 ? "%d probe left." : "%d probes left.", nprobes);\r
proutn("Are you sure you want to fire a probe? ");\r
if (ja()==0) return;\r
}\r
}\r
/* dematerialize starship */\r
game.quad[sectx][secty]=IHDOT;\r
- proutn("Starbase in");\r
- cramlc(1, quadx, quady);\r
- proutn(" responds--");\r
+ proutn("Starbase in %s responds--", cramlc(quadrant, quadx, quady));\r
+ proutn("");\r
crmshp();\r
prout(" dematerializes.");\r
/* Give starbase three chances to rematerialize starship */\r