ididit = 1;\r
#if 0\r
/* Don't wory about this */\r
- if (future[FTBEAM] <= d.date+Time && d.remcom != 0 && condit != IHDOCKED) {\r
+ if (future[FTBEAM] <= state.date+Time && state.remcom != 0 && condit != IHDOCKED) {\r
/* We are about to be tractor beamed -- operation fails */\r
return 1;\r
}\r
events(); /* Used to avoid if future[FSCMOVE] within time */\r
// future[FSNOVA] = asave;\r
/*fails if game over, quadrant super-novas or we've moved to new quadrant*/\r
- if (alldone || d.galaxy[quadx][quady] == 1000 || justin != 0) return 1;\r
+ if (alldone || state.galaxy[quadx][quady] == 1000 || justin != 0) return 1;\r
return 0;\r
}\r
\r
prout("Spock- \"Planet report follows, Captain.\"");\r
skip(1);\r
for (i = 1; i <= inplan; i++) {\r
- if (d.plnets[i].known\r
+ if (state.plnets[i].known\r
#ifdef DEBUG\r
- || ( idebug && d.plnets[i].x !=0)\r
+ || ( idebug && state.plnets[i].x !=0)\r
#endif\r
) {\r
iknow = 1;\r
#ifdef DEBUG\r
- if (idebug && d.plnets[i].known==0) proutn("(Unknown) ");\r
+ if (idebug && state.plnets[i].known==0) proutn("(Unknown) ");\r
#endif\r
- cramlc(1, d.plnets[i].x, d.plnets[i].y);\r
+ cramlc(1, state.plnets[i].x, state.plnets[i].y);\r
proutn(" class ");\r
- proutn(classes[d.plnets[i].pclass]);\r
+ proutn(classes[state.plnets[i].pclass]);\r
proutn(" ");\r
- if (d.plnets[i].crystals == 0) proutn("no ");\r
+ if (state.plnets[i].crystals == 0) proutn("no ");\r
prout("dilithium crystals present.");\r
- if (d.plnets[i].known==2) \r
+ if (state.plnets[i].known==2) \r
prout(" Shuttle Craft Galileo on surface.");\r
}\r
}\r
proutn(" Planet at");\r
cramlc(2, plnetx, plnety);\r
proutn(" is of class ");\r
- proutn(classes[d.plnets[iplnet].pclass]);\r
+ proutn(classes[state.plnets[iplnet].pclass]);\r
prout(".");\r
- if (d.plnets[iplnet].known==2) \r
+ if (state.plnets[iplnet].known==2) \r
prout(" Sensors show Galileo still on surface.");\r
proutn(" Readings indicate");\r
- if (d.plnets[iplnet].crystals == 0) proutn(" no");\r
+ if (state.plnets[iplnet].crystals == 0) proutn(" no");\r
prout(" dilithium crystals present.\"");\r
- if (d.plnets[iplnet].known == 0) d.plnets[iplnet].known = 1;\r
+ if (state.plnets[iplnet].known == 0) state.plnets[iplnet].known = 1;\r
return;\r
}\r
\r
skip(1);\r
if (damage[DTRANSP] != 0) {\r
prout("Transporter damaged.");\r
- if (damage[DSHUTTL]==0 && (d.plnets[iplnet].known==2 || iscraft == 1)) {\r
+ if (damage[DSHUTTL]==0 && (state.plnets[iplnet].known==2 || iscraft == 1)) {\r
skip(1);\r
prout("Spock- \"May I suggest the shuttle craft, Sir?\" ");\r
if (ja() != 0) shuttle();\r
prout("Impossible to transport through shields.");\r
return;\r
}\r
- if (d.plnets[iplnet].known==0) {\r
+ if (state.plnets[iplnet].known==0) {\r
prout("Spock- \"Captain, we have no information on this planet");\r
prout(" and Starfleet Regulations clearly state that in this situation");\r
prout(" you may not go down.\"");\r
}\r
if (landed==1) {\r
/* Coming from planet */\r
- if (d.plnets[iplnet].known==2) {\r
+ if (state.plnets[iplnet].known==2) {\r
proutn("Spock- \"Wouldn't you rather take the Galileo?\" ");\r
if (ja() != 0) {\r
chew();\r
}\r
else {\r
/* Going to planet */\r
- if (d.plnets[iplnet].crystals==0) {\r
+ if (state.plnets[iplnet].crystals==0) {\r
prout("Spock- \"Captain, I fail to see the logic in");\r
prout(" exploring a planet with no dilithium crystals.");\r
proutn(" Are you sure this is wise?\" ");\r
skip(2);\r
prout("Transport complete.");\r
landed = -landed;\r
- if (landed==1 && d.plnets[iplnet].known==2) {\r
+ if (landed==1 && state.plnets[iplnet].known==2) {\r
prout("The shuttle craft Galileo is here!");\r
}\r
if (landed!=1 && imine==1) {\r
prout("Mining party not on planet.");\r
return;\r
}\r
- if (d.plnets[iplnet].crystals == 0) {\r
+ if (state.plnets[iplnet].crystals == 0) {\r
prout("No dilithium crystals on this planet.");\r
return;\r
}\r
prout("there's no reason to mine more at this time.");\r
return;\r
}\r
- Time = (0.1+0.2*Rand())*d.plnets[iplnet].pclass;\r
+ Time = (0.1+0.2*Rand())*state.plnets[iplnet].pclass;\r
if (consumeTime()) return;\r
prout("Mining operation complete.");\r
imine = 1;\r
ididit = 0;\r
if(damage[DSHUTTL] != 0.0) {\r
if (damage[DSHUTTL] == -1.0) {\r
- if (inorbit && d.plnets[iplnet].known == 2)\r
+ if (inorbit && state.plnets[iplnet].known == 2)\r
prout("Ye Faerie Queene has no shuttle craft bay to dock it at.");\r
else\r
prout("Ye Faerie Queene had no shuttle craft.");\r
}\r
else if (damage[DSHUTTL] > 0)\r
prout("The Galileo is damaged.");\r
- else prout("Shuttle craft is now serving Big Mac's.");\r
+ else prout("Shuttle craft is now serving Big Macs.");\r
return;\r
}\r
if (inorbit==0) {\r
prout(" not in standard orbit.");\r
return;\r
}\r
- if ((d.plnets[iplnet].known != 2) && iscraft != 1) {\r
+ if ((state.plnets[iplnet].known != 2) && iscraft != 1) {\r
prout("Shuttle craft not currently available.");\r
return;\r
}\r
- if (landed==-1 && d.plnets[iplnet].known==2) {\r
+ if (landed==-1 && state.plnets[iplnet].known==2) {\r
prout("You will have to beam down to retrieve the shuttle craft.");\r
return;\r
}\r
prout("Shuttle craft cannot pass through shields.");\r
return;\r
}\r
- if (d.plnets[iplnet].known==0) {\r
+ if (state.plnets[iplnet].known==0) {\r
prout("Spock- \"Captain, we have no information on this planet");\r
prout(" and Starfleet Regulations clearly state that in this situation");\r
prout(" you may not fly down.\"");\r
return;\r
}\r
Time = 3.0e-5*height;\r
- if (Time >= 0.8*d.remtime) {\r
+ if (Time >= 0.8*state.remtime) {\r
prout("First Officer Spock- \"Captain, I compute that such");\r
- prout(" a maneuver would require aproximately ");\r
- cramf(100*Time/d.remtime,0,4);\r
+ prout(" a maneuver would require approximately ");\r
+ cramf(100*Time/state.remtime,0,4);\r
prout("% of our");\r
prout("remaining time.");\r
prout("Are you sure this is wise?\" ");\r
iscraft = 0;\r
skip(1);\r
if (consumeTime()) return;\r
- d.plnets[iplnet].known=2;\r
+ state.plnets[iplnet].known=2;\r
prout("Trip complete.");\r
return;\r
}\r
prout("shuttle craft for the trip back to the Enterprise.");\r
skip(1);\r
prout("The short hop begins . . .");\r
- d.plnets[iplnet].known=1;\r
+ state.plnets[iplnet].known=1;\r
icraft = 1;\r
skip(1);\r
landed = -1;\r
icraft = 1;\r
iscraft = 0;\r
if (consumeTime()) return;\r
- d.plnets[iplnet].known = 2;\r
+ state.plnets[iplnet].known = 2;\r
landed = 1;\r
icraft = 0;\r
prout("Trip complete");\r
prouts("Sulu- \"Captain! It's working!\"");\r
skip(2);\r
while (nenhere > 0)\r
- deadkl(kx[1],ky[1],quad[kx[1]][ky[1]],kx[1],ky[1]);\r
+ deadkl(kx[1],ky[1],frozen.quad[kx[1]][ky[1]],kx[1],ky[1]);\r
prout("Ensign Chekov- \"Congratulations, Captain!\"");\r
- if (d.remkl == 0) finish(FWON);\r
+ if (state.remkl == 0) finish(FWON);\r
prout("Spock- \"Captain, I believe the `Experimental Death Ray'");\r
if (Rand() <= 0.05) {\r
prout(" is still operational.\"");\r
prout(" Mr. Sulu.");\r
for (i=1; i<=10; i++)\r
for (j=1; j<=10; j++)\r
- if (quad[i][j] == IHDOT) quad[i][j] = IHQUEST;\r
+ if (frozen.quad[i][j] == IHDOT) frozen.quad[i][j] = IHQUEST;\r
prout(" Captain, our quadrant is now infested with");\r
prouts(" - - - - - - *THINGS*.");\r
skip(1);\r