double angle, deltax, deltay, bigger, x, y,\r
finald, finalx, finaly, stopegy;\r
int trbeam = 0, n, l, ix, iy, kink, kinks, iquad;\r
double angle, deltax, deltay, bigger, x, y,\r
finald, finalx, finaly, stopegy;\r
int trbeam = 0, n, l, ix, iy, kink, kinks, iquad;\r
- proutn("\nEntering");\r
- cramlc(1, quadx, quady);\r
- skip(1);\r
+ prout("");\r
+ prout("Entering %s.",\r
+ cramlc(quadrant, quadx, quady));\r
- cramf(stopegy, 0, 2);\r
- prout(" units of energy.");\r
+ prout("%2d units of energy.", (int)stopegy);\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
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
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
- 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
if (Time >= 0.8*game.state.remtime) {\r
skip(1);\r
prout("First Officer Spock- \"Captain, I compute that such");\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
prout(" percent of our");\r
prout(" remaining time. Are you sure this is wise?\"");\r
if (ja() == 0) { ididit = 0; return;}\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
- proutn("Warp factor set to ");\r
- cramf(warpfac, 1, 1);\r
- skip(1);\r
+ prout("Warp factor set to %d", (int)warpfac);\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
/* Make sure Galileo is consistant -- Snapshot may have been taken\r
when on planet, which would give us two Galileos! */\r
gotit = 0;\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
/* cheat to make sure no tractor beams occur during time warp */\r
game.future[FTBEAM] += Time;\r
game.damage[DRADIO] += Time;\r
/* cheat to make sure no tractor beams occur during time warp */\r
game.future[FTBEAM] += Time;\r
game.damage[DRADIO] += Time;\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