condit == IHDOCKED) {\r
proutn("***");\r
cramen(ienm);\r
- proutn(" escapes to");\r
- cramlc(1, iqx, iqy);\r
- prout(" (and regains strength).");\r
+ proutn(" escapes to %s (and regains strength).",\r
+ cramlc(quadrant, iqx, iqy));\r
}\r
/* handle local matters related to escape */\r
game.kx[loccom] = game.kx[nenhere];\r
}\r
#ifdef DEBUG\r
if (idebug) {\r
- proutn("MOTION = ");\r
- cramf(motion, 1, 2);\r
- proutn(" FORCES = ");\r
- cramf(forces, 1, 2);\r
- skip(1);\r
+ proutn("MOTION = %1.2f", motion);\r
+ proutn(" FORCES = %1,2f", forces);\r
}\r
#endif\r
/* don't move if no motion */\r
nexty = looky;\r
#ifdef DEBUG\r
if (idebug) {\r
- cramlc(0, nextx, nexty);\r
- skip(1);\r
+ prout(cramlc(neither, nextx, nexty));\r
}\r
#endif\r
}\r
proutn("***");\r
cramen(ienm);\r
if (game.kdist[loccom] < dist1) proutn(" advances to");\r
- else proutn(" retreats to");\r
- cramlc(2, nextx, nexty);\r
- skip(1);\r
+ else proutn(" retreats to ");\r
+ prout(cramlc(sector, nextx, nexty));\r
}\r
}\r
}\r
if (*ipage==0) pause(1);\r
*ipage = 1;\r
prout("Lt. Uhura- \"Captain, Starfleet Intelligence reports");\r
- proutn(" a planet in");\r
- cramlc(1, game.state.isx, game.state.isy);\r
+ proutn(" a planet in ");\r
+ proutn(cramlc(quadrant, game.state.isx, game.state.isy));\r
prout(" has been destroyed");\r
prout(" by the Super-commander.\"");\r
}\r
iseenit = 1;\r
if (*ipage == 0) pause(1);\r
*ipage=1;\r
- proutn("Lt. Uhura- \"Captain, the starbase in");\r
- cramlc(1, game.state.isx, game.state.isy);\r
+ proutn("Lt. Uhura- \"Captain, the starbase in ");\r
+ proutn(cramlc(quadrant, game.state.isx, game.state.isy));\r
skip(1);\r
prout(" reports that it is under attack from the Klingon Super-commander.");\r
- proutn(" It can survive until stardate ");\r
- cramf(game.future[FSCDBAS], 0, 1);\r
- prout(" .\"");\r
+ proutn(" It can survive until stardate %d.\"",\r
+ (int)game.future[FSCDBAS]);\r
if (resting==0) return;\r
prout("Mr. Spock- \"Captain, shall we cancel the rest period?\"");\r
if (ja()==0) return;\r
if (*ipage==0) pause(1);\r
*ipage = 1;\r
prout("Lt. Uhura- \"Captain, Starfleet Intelligence reports");\r
- proutn(" the Super-commander is in");\r
- cramlc(1, game.state.isx, game.state. isy);\r
+ proutn(" the Super-commander is in ");\r
+ proutn(cramlc(quadrant, game.state.isx, game.state. isy));\r
prout(".\"");\r
return;\r
}\r
iy = y + 0.5;\r
if (iy < 1 || iy > 10) break;\r
if (l==4 || l==9) skip(1);\r
- cramf(x, 0, 1);\r
- proutn(" - ");\r
- cramf(y, 0, 1);\r
- proutn(" ");\r
+ proutn("%d - %d ", (int)x, (int)y);\r
iquad=game.quad[ix][iy];\r
if (iquad==IHDOT) continue;\r
/* hit something */\r
if (shoved) {\r
game.quad[jx][jy]=iquad;\r
game.quad[ix][iy]=IHDOT;\r
- proutn(" displaced by blast to");\r
- cramlc(2, jx, jy);\r
- skip(1);\r
+ prout(" displaced by blast to %s ", cramlc(sector, jx, jy));\r
for (ll=1; ll<=nenhere; ll++)\r
game.kdist[ll] = game.kavgd[ll] = sqrt(square(sectx-game.kx[ll])+square(secty-game.ky[ll]));\r
sortkl();\r
shields were down for some strange reason. This\r
doesn't make any sense, so I've fixed it */\r
ihurt = 1;\r
- cramf(hit, 0, 2);\r
- proutn(" unit hit");\r
+ proutn("%d unit hit", (int)hit);\r
if ((game.damage[DSRSENS] > 0 && itflag) || skill <= 2) {\r
proutn(" on the ");\r
crmshp();\r
key = scan();\r
}\r
if (key != IHREAL && nenhere != 0) {\r
- proutn("Phasers locked on target. Energy available =");\r
- cramf(ifast?energy-200.0:energy,1,2);\r
- skip(1);\r
+ prout("Phasers locked on target. Energy available = %3.2f", ifast?energy-200.0:energy);\r
}\r
do {\r
while (key != IHREAL) {\r
}\r
rpow = aaitem;\r
if (rpow >= (ifast?energy-200:energy)) {\r
- proutn("Energy available= ");\r
- cramf(ifast?energy-200:energy, 1,2);\r
+ proutn("Energy available= %3.2f",\r
+ ifast?energy-200:energy);\r
skip(1);\r
key = IHEOL;\r
}\r
prout("phaser energy.");\r
}\r
else {\r
- cramf(extra, 0, 2);\r
- prout(" expended on empty space.");\r
+ prout("%d expended on empty space.", (int)extra);\r
}\r
}\r
break;\r
int ii = game.kx[k], jj = game.ky[k];\r
int ienm = game.quad[ii][jj];\r
if (msgflag) {\r
- proutn("Energy available= ");\r
- cramf(energy-.006-(ifast?200:0), 0, 2);\r
+ proutn("Energy available= %5.2f",\r
+ energy-.006-(ifast?200:0));\r
skip(1);\r
msgflag = 0;\r
rpow = 0.0;\r
ii = game.kx[kk];\r
jj = game.ky[kk];\r
if (hit > 0.005) {\r
- cramf(hit, 0, 2);\r
- proutn(" unit hit on ");\r
+ proutn("%d unit hit on ", (int)hit);\r
}\r
else\r
proutn("Very small hit on ");\r
else /* decide whether or not to emasculate klingon */\r
if (kpow > 0 && Rand() >= 0.9 &&\r
kpow <= ((0.4 + 0.4*Rand())*kpini)) {\r
- proutn("***Mr. Spock- \"Captain, the vessel at");\r
- cramlc(2,ii,jj);\r
- skip(1);\r
+ prout("***Mr. Spock- \"Captain, the vessel at ",\r
+ cramlc(sector,ii,jj));\r
prout(" has just lost its firepower.\"");\r
game.kpower[kk] = -kpow;\r
}\r
}\r
iran10(§x, §y);\r
crmshp();\r
- proutn(" is pulled to");\r
- cramlc(1, quadx, quady);\r
+ proutn(" is pulled to ");\r
+ proutn(cramlc(quadrant, quadx, quady));\r
proutn(", ");\r
- cramlc(2, sectx, secty);\r
- skip(1);\r
+ prout(cramlc(sector, sectx, secty));\r
if (resting) {\r
prout("(Remainder of rest/repair period cancellegame.state.)");\r
resting = 0;\r
if (ipage==0) pause(1);\r
ipage = 1;\r
skip(1);\r
- proutn("Lt. Uhura- \"Captain, the starbase in");\r
- cramlc(1, batx, baty);\r
- skip(1);\r
+ proutn("Lt. Uhura- \"Captain, the starbase in ");\r
+ prout(cramlc(quadrant, batx, baty));\r
prout(" reports that it is under atttack and that it can");\r
- proutn(" hold out only until stardate ");\r
- cramf(game.future[FCDBAS],1,1);\r
+ proutn(" hold out only until stardate %d",\r
+ (int)game.future[FCDBAS]);\r
prout(".\"");\r
if (resting) {\r
skip(1);\r
ipage = 1;\r
skip(1);\r
prout("Lt. Uhura- \"Captain, Starfleet Command reports that");\r
- proutn(" the starbase in");\r
- cramlc(1, batx, baty);\r
+ proutn(" the starbase in ");\r
+ proutn(cramlc(quadrant, batx, baty));\r
prout(" has been destroyed by");\r
if (isatb==2) prout("the Klingon Super-Commander");\r
else prout("a Klingon Commander");\r
ipage = 1;\r
skip(1);\r
proutn("Lt. Uhura- \"The deep space probe is now in ");\r
- cramlc(1, probecx, probecy);\r
+ proutn(cramlc(quadrant, probecx, probecy));\r
prout(".\"");\r
}\r
}\r
do {\r
if (delay <= 0) resting = 0;\r
if (resting == 0) {\r
- cramf(game.state.remtime, 0, 2);\r
- prout(" stardates left.");\r
+ prout("%d stardates left.", (int)game.state.remtime);\r
return;\r
}\r
temp = Time = delay;\r
skip(1);\r
break;\r
}\r
- proutn(", buffeted to");\r
- cramlc(2, newcx, newcy);\r
+ proutn(", buffeted to ");\r
+ proutn(cramlc(sector, newcx, newcy));\r
game.quad[ii][jj] = IHDOT;\r
game.quad[newcx][newcy] = iquad;\r
game.kx[ll] = newcx;\r
/* it isn't here, or we just entered (treat as inroute) */\r
if (game.damage[DRADIO] == 0.0 || condit == IHDOCKED) {\r
skip(1);\r
- proutn("Message from Starfleet Command Stardate ");\r
- cramf(game.state.date, 0, 1);\r
- skip(1);\r
- proutn(" Supernova in");\r
- cramlc(1, nqx, nqy);\r
- prout("; caution advised.");\r
+ prout("Message from Starfleet Command Stardate %5.2f", game.state.date);\r
+ proutn(" Supernova in %s; caution advised.",\r
+ cramlc(quadrant, nqx, nqy));\r
}\r
}\r
else {\r
skip(1);\r
prouts("***RED ALERT! RED ALERT!");\r
skip(1);\r
- proutn("***Incipient supernova detected at");\r
- cramlc(2, nsx, nsy);\r
- skip(1);\r
+ prout("***Incipient supernova detected at ", cramlc(sector, nsx, nsy));\r
nqx = quadx;\r
nqy = quady;\r
if (square(nsx-sectx) + square(nsy-secty) <= 2.1) {\r
if (game.state.remkl==0 && (nqx != quadx || nqy != quady)) {\r
skip(2);\r
if (insx == 0) prout("Lucky you!");\r
- proutn("A supernova in");\r
- cramlc(1, nqx, nqy);\r
- prout(" has just destroyed the last Klingons.");\r
+ proutn("A supernova in %s has just destroyed the last Klingons.",\r
+ cramlc(quadrant, nqx, nqy));\r
finish(FWON);\r
return;\r
}\r
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
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
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
/* 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
#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 %4.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
\r
void attakreport(void) {\r
if (game.future[FCDBAS] < 1e30) {\r
- proutn("Starbase in ");\r
- cramlc(1, batx, baty);\r
- prout(" is currently under attack.");\r
- proutn("It can hold out until Stardate ");\r
- cramf(game.future[FCDBAS], 0,1);\r
- prout(".");\r
+ prout("Starbase in %s is currently under attack.",\r
+ cramlc(quadrant, batx, baty));\r
+ prout("It can hold out until Stardate %d.", \r
+ (int)game.future[FCDBAS]);\r
}\r
if (isatb == 1) {\r
- proutn("Starbase in ");\r
- cramlc(1, game.state.isx, game.state.isy);\r
- prout(" is under Super-commander attack.");\r
- proutn("It can hold out until Stardate ");\r
- cramf(game.future[FSCDBAS], 0, 1);\r
- prout(".");\r
+ prout("Starbase in %s is under Super-commander attack.",\r
+ cramlc(quadrant, game.state.isx, game.state.isy));\r
+ prout("It can hold out until Stardate %d.", \r
+ (int)game.future[FSCDBAS]);\r
}\r
}\r
\r
proutn("An armed deep space probe is in");\r
else\r
proutn("A deep space probe is in");\r
- cramlc(1, probecx, probecy);\r
+ proutn(cramlc(quadrant, probecx, probecy));\r
prout(".");\r
}\r
if (icrystl) {\r
skip(1);\r
proutn("Long-range scan for");\r
}\r
- cramlc(1, quadx, quady);\r
- skip(1);\r
+ prout(cramlc(quadrant, quadx, quady));\r
for (x = quadx-1; x <= quadx+1; x++) {\r
for (y = quady-1; y <= quady+1; y++) {\r
if (x == 0 || x > 8 || y == 0 || y > 8)\r
prout(" IN FLIGHT DOCKED");\r
jdam = TRUE;\r
}\r
- proutn(" %16s ", device[i]);\r
- cramf(game.damage[i]+0.05, 8, 2);\r
- proutn(" ");\r
- cramf(docfac*game.damage[i]+0.005, 8, 2);\r
- skip(1);\r
+ prout(" %16s %8.2f %8.2f", \r
+ device[i],\r
+ game.damage[i]+0.05,\r
+ docfac*game.damage[i]+0.005);\r
}\r
}\r
if (!jdam) prout("All devices functional.");\r
if (game.starch[i][j] == 1) game.starch[i][j] = game.state.galaxy[i][j]+1000;\r
}\r
else {\r
- proutn("(Last surveillance update ");\r
- cramf(game.state.date-stdamtim, 0, 1);\r
- prout(" stardates ago.)");\r
+ proutn("(Last surveillance update %d stardates ago.",\r
+ (int)(game.state.date-stdamtim));\r
}\r
}\r
if (nn ==0) skip(1);\r
if (nn == 0) {\r
skip(1);\r
crmshp();\r
- proutn(" is currently in");\r
- cramlc(1, quadx, quady);\r
- skip(1);\r
- }\r
+ prout(" is currently in %s", cramlc(quadrant, quadx, quady));\r
+}\r
}\r
\r
\r
proutn(" Condition %s", cp);\r
break;\r
case 3:\r
- proutn(" Position ");\r
- cramlc(0, quadx, quady);\r
- proutn(",");\r
- cramlc(0, sectx, secty);\r
+ proutn(" Position ");\r
+ proutn(cramlc(neither, quadx, quady));\r
+ proutn(" , ");\r
+ proutn(cramlc(neither, sectx, secty));\r
break;\r
case 4:\r
proutn(" Life Support ");\r
}\r
else\r
proutn("Remaining");\r
- proutn(" energy will be ");\r
- cramf(energy-tpower, 1, 1);\r
- prout(".");\r
+ prout(" energy will be %5.2f.", energy-tpower);\r
if (wfl) {\r
- proutn("And we will arrive at stardate ");\r
- cramf(game.state.date+ttime, 1, 1);\r
- prout(".");\r
+ prout("And we will arrive at stardate %5.2f.",\r
+ game.state.date+ttime);\r
}\r
else if (twarp==1.0)\r
prout("Any warp speed is adequate.");\r
else {\r
- proutn("Minimum warp needed is ");\r
- cramf(twarp, 1, 2);\r
- skip(1);\r
- proutn("and we will arrive at stardate ");\r
- cramf(game.state.date+ttime, 1, 2);\r
- prout(".");\r
+ prout("Minimum warp needed is %5.2f,", twarp);\r
+ prout("and we will arrive at stardate %5.2f.",\r
+ game.state.date+ttime);\r
}\r
if (game.state.remtime < ttime)\r
prout("Unfortunately, the Federation will be destroyed by then.");\r
prout("An unknown number of Romulans.");\r
if (game.state.nscrem) prout("and one (GULP) Super-Commander.");\r
prout("%d stardates.",(int)intime);\r
- proutn("%d starbases in ", inbase);\r
+ proutn("%d starbases in ", inbase);\r
}\r
for (i = 1; i <= inbase; i++) {\r
- cramlc(0, game.state.baseqx[i], game.state.baseqy[i]);\r
- if (i < inbase) proutn(" ");\r
+ proutn(cramlc(0, game.state.baseqx[i], game.state.baseqy[i]));\r
+ proutn(" ");\r
}\r
skip(2);\r
- proutn("The Enterprise is currently in");\r
- cramlc(1, quadx, quady);\r
+ proutn("The Enterprise is currently in ");\r
+ proutn(cramlc(quadrant, quadx, quady));\r
proutn(" ");\r
- cramlc(2, sectx, secty);\r
+ proutn(cramlc(sector, sectx, secty));\r
skip(2);\r
prout("Good Luck!");\r
if (game.state.nscrem) proutn(" YOU'LL NEED IT.");\r
proutn(s);\r
}\r
\r
-void cramlc(int key, int x, int y) {\r
- if (key == 1) proutn(" Quadrant");\r
- else if (key == 2) proutn(" Sector");\r
- proutn(" %d - %d", x, y);\r
+char *cramlc(enum loctype key, int x, int y) {\r
+ static char buf[32];\r
+ buf[0] = '\0';\r
+ if (key == quadrant) strcpy(buf, "Quadrant ");\r
+ else if (key == sector) strcpy(buf, "Sector ");\r
+ sprintf(buf+strlen(buf), "%d-%d", x, y);\r
+ return buf;\r
}\r
\r
void crmena(int i, int enemy, int key, int x, int y) {\r
if (i == 1) proutn("***");\r
cramen(enemy);\r
proutn(" at");\r
- cramlc(key, x, y);\r
+ proutn(cramlc(key, x, y));\r
}\r
\r
void crmshp(void) {\r
}\r
}\r
\r
-void cramf(double x, int w, int d) {\r
- char buf[64];\r
- sprintf(buf, "%*.*f", w, d, x);\r
- proutn(buf);\r
-}\r
-\r
double square(double i) { return i*i; }\r
\r
static void clearscreen(void) {\r
case FSCMOVE: proutn("SC Move "); break;\r
case FSCDBAS: proutn("SC Base Destroy "); break;\r
}\r
- cramf(future[i]-game.state.date, 8, 2);\r
+ proutn("%82.2f", future[i]-game.state.date);\r
chew();\r
proutn(" ?");\r
key = scan();\r
FMATERIALIZE, FPHASER, FLOST, FMINING, FDPLANET,\r
FPNOVA, FSSC, FSTRACTOR, FDRAY, FTRIBBLE,\r
FHOLE} FINTYPE ;\r
+enum loctype {neither, quadrant, sector};\r
\r
/* Define devices */\r
#define DSRSENS 1\r
int ja(void);\r
void cramen(int);\r
void crmshp(void);\r
-void cramlc(int, int, int);\r
+char *cramlc(enum loctype, int, int);\r
double expran(double);\r
double Rand(void);\r
void iran8(int *, int *);\r
void timwrp(void);\r
void movcom(void);\r
void torpedo(double, double, int, int, double *);\r
-void cramf(double, int, int);\r
void huh(void);\r
void pause(int);\r
void nova(int, int);\r