diff options
author | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-03-12 03:03:05 +0000 |
---|---|---|
committer | Paul Janzen <pjanzen@cvs.openbsd.org> | 1999-03-12 03:03:05 +0000 |
commit | 464bf5d98ce6a9a142dc8e4bccc76cef3d94369f (patch) | |
tree | d7abc7ea470c535eda2dc6951e05d019d7e9a4ee /games/trek | |
parent | b252f8d0f6dc726b14efb8b561a77780f984c6dc (diff) |
Correct documentation, remove useless code, remove duplicate documentation,
don't compile with xTRACE defined, and trim things.
Diffstat (limited to 'games/trek')
-rw-r--r-- | games/trek/DOC/trekmanual.nr | 896 | ||||
-rw-r--r-- | games/trek/Makefile | 4 | ||||
-rw-r--r-- | games/trek/USD.doc/trek.me | 41 | ||||
-rw-r--r-- | games/trek/abandon.c | 6 | ||||
-rw-r--r-- | games/trek/cgetc.c | 52 | ||||
-rw-r--r-- | games/trek/computer.c | 6 | ||||
-rw-r--r-- | games/trek/destruct.c | 19 | ||||
-rw-r--r-- | games/trek/dumpgame.c | 6 | ||||
-rw-r--r-- | games/trek/getpar.c | 16 | ||||
-rw-r--r-- | games/trek/main.c | 79 | ||||
-rw-r--r-- | games/trek/move.c | 7 | ||||
-rw-r--r-- | games/trek/phaser.c | 6 | ||||
-rw-r--r-- | games/trek/srscan.c | 8 | ||||
-rw-r--r-- | games/trek/torped.c | 6 | ||||
-rw-r--r-- | games/trek/trek.6 | 15 | ||||
-rw-r--r-- | games/trek/trek.h | 10 |
16 files changed, 73 insertions, 1104 deletions
diff --git a/games/trek/DOC/trekmanual.nr b/games/trek/DOC/trekmanual.nr deleted file mode 100644 index 0ef506368d7..00000000000 --- a/games/trek/DOC/trekmanual.nr +++ /dev/null @@ -1,896 +0,0 @@ -.\" $NetBSD: trekmanual.nr,v 1.2 1995/04/22 10:59:45 cgd Exp $ -.br -.po 10 -.if n \!. -.sp 15 -.tr ^ \" -.ce 88 -^****^^^^*****^^^^^^*^^^^^^****^ -*^^^^^^^^^^*^^^^^^^*^*^^^^^*^^^* -^***^^^^^^^*^^^^^^*****^^^^****^ -^^^^*^^^^^^*^^^^^^*^^^*^^^^*^^*^ -****^^^^^^^*^^^^^^*^^^*^^^^*^^^* - - -*****^^^^****^^^^^*****^^^^*^^^* -^^*^^^^^^*^^^*^^^^*^^^^^^^^*^^*^ -^^*^^^^^^****^^^^^***^^^^^^***^^ -^^*^^^^^^*^^*^^^^^*^^^^^^^^*^^*^ -^^*^^^^^^*^^^*^^^^*****^^^^*^^^* - - -by - -Eric Allman -University of California -Berkeley -.ce 0 -.tr ^^ -.de HE -'sp 4 -'tl 'STAR TREK''%' -'sp 3 -.. -.de FO -'bp -.. -.wh 0 HE -.wh -5 FO -.de pp -.sp -.ti +4 -.. -.bp 1 -.ce -INTRODUCTION -.pp -Well, the federation is once again at war with the Klingon empire. -It is up to you, -as captain of the U.S.S. Enterprise, -to wipe out the invasion fleet and save the Federation. -.pp -For the purposes of the game -the galaxy is divided into 64 quadrants -on an eight by eight grid, -with quadrant 0,0 in the upper left hand corner. -Each quadrant is divided into 100 sectors -on a ten by ten grid. -Each sector contains one object -(e.g., the Enterprise, a Klingon, or a star). -.pp -Navigation is handled in degrees, -with zero being straight up -and ninty being to the right. -Distances are measured in quadrants. -One tenth quadrant is one sector. -.pp -The galaxy contains starbases, -at which you can dock to refuel, -repair damages, etc. -The galaxy also contains stars. -Stars usually have a knack for getting in your way, -but they can be triggered into going nova -by shooting a photon torpedo at one, -thereby (hopefully) destroying any adjacent Klingons. -This is not a good practice however, -because you are penalized for destroying stars. -Also, a star will sometimes go supernova, -which obliterates an entire quadrant. -You must never stop in a supernova quadrant, -although you may "jump over" one. -.pp -Some starsystems -have inhabited planets. -Klingons can attack inhabited planets -and enslave the populace, -which they then put to work building more Klingon battle cruisers. -.bp -.ce -STARTING UP THE GAME -.pp -To request the game, issue the command -.sp -.ti +12 -/usr/games/trek -.sp -from the shell. -If a filename is stated, -a log of the game is written -onto that file. -If omitted, -the file is not written. -If the "-a" flag is stated before the filename, -that file is appended to -rather than created. -.pp -The game will ask you what length game -you would like. -Valid responses are "short", "medium", and "long". -Ideally the length of the game does not -affect the difficulty, -but currently the shorter games -tend to be harder than the longer ones. -You may also type "restart", -which restarts a previously saved game. -.pp -You will then be prompted for the skill, -to which you must respond -"novice", "fair", "good", "expert", -"commadore", or "impossible". -You should start out with a novice -and work up, -but if you really want to see how fast -you can be slaughtered, -start out with an impossible game. -.pp -In general, -throughout the game, -if you forget what is appropriate -the game will tell you what it expects -if you just type in -a question mark. -.pp -To get a copy of these rules, -execute the command -.sp -.ti +12 -nroff /usr/games/trekmanual.nr -.sp -.bp -.ce -ISSUING COMMANDS -.pp -If the game expects you to enter a command, -.hc ^ -it will say ^"Command:\ " -and wait for your response. -Most commands can be abbreviated. -.pp -At almost any time you can type more than one thing on a line. -For example, -to move straight up one quadrant, -you can type -.ti +12 -move 0 1 -.br -or you could just type -.ti +12 -move -.br -and the game would prompt you with -.ti +12 -Course: -.br -to which you could type -.ti +12 -0 1 -.br -The "1" is the distance, -which could be put on still another line. -Also, the "move" command -could have been abbreviated -"mov", "mo", or just "m". -.pp -If you are partway through a command -and you change your mind, -you can usually type "-1" -to cancel the command. -.pp -Klingons generally cannot hit you -if you don't consume anything -(e.g., time or energy), -so some commands are considered "free". -As soon as you consume anything though -- POW! -.bp -.de ** -.if \\n+l .** -.as x * -.. -.de bl -.nr l \\w'\\$1' -\\w'*' -.ds x **** -.** -.sp 3 -.ne 3 -\\*x -.br -.if t *\h'\w'*'u'\fB\\$1\fP\h'\w'*'u'* -.if n * \\$1 * -.br -\\*x -.sp -.in +8 -.nf -.. -.de FF -.in -8 -.fi -.. -.if !\n(.V .ta \w'Full Commands: '+1 -.if \n(.V .ta \w'Full Commands: 'u -.ce -THE COMMANDS -.bl "Short Range Scan" -Mnemonic: srscan -Shortest Appreviation: s -Full Commands: srscan - srscan yes/no -Consumes: nothing -.FF -.pp -The short range scan -gives you a picture -of the quadrant you are in, -and (if you say "yes") -a status report -which tells you -a whole bunch -of interesting stuff. -You can get a status report alone -by using the -.ul -status -command. -An example follows: -.sp -.nf -.in +4 -Short range sensor scan - 0 1 2 3 4 5 6 7 8 9 -0 . . . . . . . * . * 0 stardate 3702.16 -1 . . E . . . . . . . 1 condition RED -2 . . . . . . . . . * 2 position 0,3/1,2 -3 * . . . . # . . . . 3 warp factor 5.0 -4 . . . . . . . . . . 4 total energy 4376 -5 . . * . * . . . . . 5 torpedoes 9 -6 . . . @ . . . . . 6 shields down, 78% -7 . . . . . . . . . . 7 Klingons left 3 -8 . . . K . . . . . . 8 time left 6.43 -9 . . . . . . * . . . 9 life support damaged, reserves = 2.4 - 0 1 2 3 4 5 6 7 8 9 -Distressed Starsystem Marcus XII - -.in +8 -.ti -8 -The cast of characters is as follows: -E the hero -K the villain -# the starbase -* stars -@ inhabited starsystem -\&. empty space - a black hole -.in -12 -.fi -.pp -The name of the starsystem is listed underneath -the short range scan. -The word "distressed", if present, -means that the starsystem -is under attack. -.pp -Short range scans are absolutely free. -They use no time, no energy, -and they don't give the Klingons -another chance to hit you. -.bl "Status Report" -Mnemonic: status -Shortest Abbreviation: st -Consumes: nothing -.FF -.pp -This command gives you information -about the current status -of the game and your ship, as follows: -.in +8 -.de qq -.sp -.ti -4 -.. -.qq -Stardate -- The current stardate. -.qq -Condition -- as follows: -.in +4 -.nf -RED -- in battle -YELLOW -- low on energy -GREEN -- normal state -DOCKED -- docked at starbase -CLOAKED -- the cloaking device is activated -.fi -.in -4 -.qq -Position -- Your current quadrant and sector. -.qq -Warp Factor -- The speed you will move at -when you move under warp power -(with the -.ul -move -command). -.qq -Total Energy -- Your energy reserves. -If they drop to zero, -you die. -Energy regenerates, -but the higher the skill of the game, -the slower it regenerates. -.qq -Torpedoes -- How many photon torpedoes you have left. -.qq -Shields -- Whether your shields are up or down, -and how effective they are if up -(what percentage of a hit they will absorb). -.qq -Klingons Left -- Guess. -.qq -Time Left -- How long the Federation can hold out -if you sit on your fat ass and do nothing. -If you kill Klingons quickly, -this number goes up, -otherwise, -it goes down. -If it hits zero, -the Federation is conquered. -.qq -Life Support -- If "active", everything is fine. -If "damaged", your reserves tell you -how long you have -to repair your life support -or get to a starbase -before you starve, suffocate, -or something equally unpleasant. -.qq -Current Crew -- The number of crew members -left. -This figures does not include officers. -.qq -Brig Space -- The space left in your brig -for Klingon captives. -.qq -Klingon Power -- The number of units -needed to kill a Klingon. -Remember, as Klingons fire at you -they use up their own energy, -so you probably need somewhat less -than this. -.qq -Skill, Length -- The skill and length -of the game you are playing. -.in -8 -.pp -Status information is absolutely free. -.bl "Long Range Scan" -Mnemonic: lrscan -Shortest Abbreviation: l -Consumes: nothing -.FF -.pp -Long range scan gives you information about the -eight quadrants -that surround the quadrant -you're in. -A sample long range scan follows: -.sp -.in +12 -.nf -Long range scan for quadrant 0,3 - - 2 3 4 - ------------------- - ! * ! * ! * ! - ------------------- -0 ! 108 ! 6 ! 19 ! - ------------------- -1 ! 9 ! /// ! 8 ! - ------------------- -.sp -.in -12 -.fi -.pp -The three digit numbers -tell the number of objects -in the quadrants. -The units digit tells the number of stars, -the tens digit the number of starbases, -and the hundreds digit is the number of Klingons. -"*" indicates the negative energy barrier -at the edge of the galaxy, -which you cannot enter. -"///" means that that is a supernova quadrant -and must not be entered. -.bl "Damage Report" -Mnemonic: damages -Shortest Abbreviation: da -Consumes: nothing -.FF -.pp -A damage report tells you what devices are damaged -and how long it will take to repair them. -Repairs proceed faster -when you are docked -at a starbase. -.bl "Set Warp Factor" -Mnemonic: warp -Shortest Abbreviation: w -Full Command: warp factor -Consumes: nothing -.FF -.pp -The warp factor tells the speed of your starship -when you move under warp power -(with the -.ul -move -command). -The higher the warp factor, -the faster you go, -and the more energy you use. -.pp -The minimum warp factor is 1.0 -and the maximum is 10.0. -At speeds above warp 6 -there is danger of the warp engines -being damaged. -The probability of this -increases at higher warp speeds. -Above warp 9.0 there is a chance of entering -a time warp. -.bl "Move Under Warp Power" -Mnemonic: move -Shortest Abbreviation: m -Full Command: move course distance -Consumes: time and energy -.FF -.pp -This is the usual way of moving. -The course is in degrees and the distance is in quadrants. -To move one sector specify a distance of 0.1. -.pp -Time is consumed proportionately to -the inverse of the warp factor squared, -and directly to the distance. -Energy is consumed as the warp factor cubed, -and directly to the distance. -If you move with your shields up -it doubles the amount of energy consumed. -.pp -When you move in a quadrant containing Klingons, -they get a chance to attack you. -.pp -The computer detects navigation errors. -If the computer is out, -you run the risk of running into things. -.pp -The course is determined by the -Space Inertial Navigation System -[SINS]. -As described in -Star Fleet Technical Order TO:02:06:12, -the SINS is calibrated, -after which it becomes the base for navigation. -If damaged, -navigation becomes inaccurate. -When it is fixed, -Spock recalibrates it, -however, -it cannot be calibrated extremely accurately -until you dock at starbase. -.bl "Move Under Impulse Power" -Mnemonic: impulse -Shortest Abbreviation: i -Full Command: impulse course distance -Consumes: time and energy -.FF -.pp -The impulse engines give you a chance to maneuver -when your warp engines are damaged; -however, they are incredibly slow -(0.095 quadrants/stardate). -They require 20 units of energy to engage, -and ten units per sector to move. -.pp -The same comments about the computer and the SINS -apply as above. -.pp -There is no penalty to move under impulse power -with shields up. -.bl "Deflector Shields" -Mnemonic: shields -Shortest Abbreviation: sh -Full Command: shields up/down -Consumes: energy -.FF -.pp -Shields protect you from Klingon attack -and nearby novas. -As they protect you, -they weaken. -A shield which is 78% effective -will absorb 78% of a hit -and let 22% in to hurt you. -.pp -The Klingons have a chance to attack you -every time you raise or lower shields. -Shields do not rise and lower -instantaneously, -so the hit you receive -will be computed with the shields -at an intermediate effectiveness. -.pp -It takes energy to raise shields, -but not to drop them. -.bl "Cloaking Device" -Mnemonic: cloak -Shortest Abbreviation: cl -Full Command: cloak up/down -Consumes: energy -.FF -.pp -When you are cloaked, -Klingons cannot see you, -and hence they do not fire at you. -They are useful for entering -a quadrant -and selecting a good position, -however, -weapons cannot be fired through -the cloak -due to the huge energy drain -that it requires. -.pp -The cloak up command -only starts the cloaking process; -Klingons will continue -to fire at you -until you do something -which consumes time. -.bl "Fire Phasers" -Mnmemonic: phasers -Shortest Abbreviation: p -Full Commands: phasers automatic amount - phasers manual amt1 course1 spread1 ... -Consumes: energy -.FF -.pp -Phasers are energy weapons; -the energy comes from your ship's reserves -("total energy" on a srscan). -It takes about 250 units of hits -to kill a Klingon. -Hits are cumulative as long as you stay -in the quadrant. -.pp -Phasers become less effective -the further from a Klingon you are. -Adjacent Klingons receive about -90% of what you fire, -at five sectors about 60%, -and at ten sectors about 35%. -They have no effect outside of the quadrant. -.pp -Phasers cannot be fired while shields are up; -to do so would fry you. -They have no effect on starbases or stars. -.pp -In automatic mode -the computer decides how to divide up the energy -among the Klingons present; -in manual mode you do that yourself. -.pp -In manual mode firing -you specify a direction, -amount (number of units to fire) -and spread (0 -> 1.0) -for each of the six phaser banks. -A zero amount -terminates the manual input. -.bl "Fire Photon Torpedoes" -Mnemonic: torpedo -Shortest Abbreviation: t -Full Command: torpedo course [yes/no] [burst angle] -Consumes: torpedoes -.FF -.pp -Torpedoes are projectile weapons -- there are no partial hits. -You either hit your target or you don't. -A hit on a Klingon destroys him. -A hit on a starbase destroys that starbase -(woops!). -Hitting a star usually causes it to go nova, -and occasionally supernova. -.pp -Photon torpedoes cannot be aimed precisely. -They can be fired with shields up, -but they get even more random -as they pass through the shields. -.pp -Torpedoes may be fired in bursts of three. -If this is desired, -the burst angle is the angle -between the three shots, -which may vary from one to fifteen. -The word "no" -says that a burst is not wanted; -the word "yes" -(which may be omitted -if stated on the same line as the course) -says that a burst is wanted. -.pp -Photon torpedoes -have no effect -outside the quadrant. -.bl "Onboard Computer Request" -Mnemonic: computer -Shortest Abbreviation: c -Full Command: computer request; request;... -Consumes: nothing -.FF -.pp -The computer command gives you access to the facilities -of the onboard computer, -which allows you to do all sorts of fascinating stuff. -Computer requests are: -.in +8 -.qq -score -- Shows your current score. -.qq -course quad/sect -- Computes the course and distance from whereever -you are to the given location. -If you type "course /x,y" -you will be given the course -to sector x,y in the current quadrant. -.qq -move quad/sect -- Identical to the course -request, -except that the move is executed. -.qq -chart -- prints a chart of the known galaxy, -i.e., -everything that you have seen with a long range scan. -The format is the same as on a long range scan, -except that "..." means -that you don't yet know what is there, -and ".1." means that you know that a starbase -exists, but you don't know anything else. -"$$$" mans the quadrant -that you are currently in. -.qq -trajectory -- prints the course and distance -to all the Klingons in the quadrant. -.qq -warpcost dist warp_factor -- computes the cost in time and energy -to move `dist' quadrants at warp `warp_factor'. -.qq -impcost dist -- same as warpcost for impulse engines. -.qq -pheff range -- tells how effective your phasers are -at a given range. -.qq -distresslist -- gives a list of currently distressed -starbases -and starsystems. -.in -8 -.pp -More than one request may be stated -on a line -by seperating them -with semicolons. -.bl "Dock at Starbase" -Mnemonic: dock -Shortest Abbreviation: do -Consumes: nothing -.FF -.pp -You may dock at a starbase -when you are in one of the eight -adjacent sectors. -.pp -When you dock you are resupplied -with energy, photon torpedoes, and life support reserves. -Repairs are also done faster at starbase. -Any prisoners you have taken -are unloaded. -You do not recieve points -for taking prisoners -until this time. -.pp -Starbases have their own deflector shields, -so you are safe from attack while docked. -.bl "Undock from Starbase" -Mnemonic: undock -Shortest Abbreviation: u -Consumes: nothing -.FF -.pp -This just allows you to leave starbase -so that you may proceed on your way. -.bl "Rest" -Mnemonic: rest -Shortest Abbreviation: r -Full Command: rest time -Consumes: time -.FF -.pp -This command allows you to rest to repair damages. -It is not advisable to rest while under attack. -.bl "Call Starbase For Help" -Mnemonic: help -Shortest Abbreviation: help -Consumes: nothing -.FF -.pp -You may call starbase for help via your subspace radio. -Starbase has long range transporter beams to get you. -Problem is, -they can't always rematerialize you. -.pp -You should avoid using this command unless absolutely necessary, -for the above reason and because it counts heavily against you -in the scoring. -.bl "Capture Klingon" -Mnemonic: capture -Shortest Abbreviation: ca -Consumes: time -.FF -.pp -You may request that a Klingon surrender -to you. -If he accepts, -you get to take captives -(but only as many as your brig -can hold). -It is good if you do this, -because you get points for captives. -Also, -if you ever get captured, -you want to be sure that the Federation -has prisoners to exchange for you. -.pp -You must go to a starbase -to turn over your prisoners -to Federation authorities. -.bl "Visual Scan" -Mnemonic: visual -Shortest Abbreviation: v -Full Command: visual course -Consumes: time -.FF -.pp -When your short range scanners are out, -you can still see what is out "there" -by doing a visual scan. -Unfortunately, -you can only see three sectors at one time, -and it takes 0.005 stardates to perform. -.pp -The three sectors in the general direction -of the course specified -are examined -and displayed. -.bl "Abandon Ship" -Mnemonic: abandon -Shortest Abbreviation: abandon -Consumes: nothing -.FF -.pp -The officers escape the Enterprise in the shuttlecraft. -If the transporter is working -and there is an inhabitable starsystem -in the area, -the crew beams down, -otherwise you leave them to die. -You are given an old but still usable ship, -the Faire Queene. -.bl "Ram" -Mnemonic: ram -Shortest Abbreviation: ram -Full Command: ram course distance -Consumes: time and energy -.FF -.pp -This command is identical to "move", -except that the computer -doesn't stop you -from making navigation errors. -.pp -You get very nearly slaughtered -if you ram anything. -.bl "Self Destruct" -Mnemonic: destruct -Shortest Abbreviation: destruct -Consumes: everything -.FF -.pp -Your starship is self-destructed. -Chances are you will destroy -any Klingons -(and stars, -and starbases) -left in your quadrant. -.bl "Terminate the Game" -Mnemonic: terminate -Shortest Abbreviation: terminate -Full Command: terminate yes/no -.FF -.pp -Cancels the current game. -No score is computed. -If you answer yes, -a new game will be started, -otherwise trek exits. -.bl "Call the Shell" -Mnemonic: shell -Shortest Abbreviation: shell -.FF -.pp -Temporarily escapes to the shell. -When you log out of the shell -you will return to the game. -.bp -.ce -SCORING -.in +4 -.pp -The scoring algorithm is rather complicated. -Basically, -you get points for each Klingon you kill, -for your Klingon per stardate kill rate, -and a bonus if you win the game. -You lose -points for the number of Klingons left -in the galaxy -at the end of the game, -for getting killed, -for each star, starbase, or inhabited starsystem -you destroy, -for calling for help, -and for each casualty you incur. -.pp -You will be promoted -if you play very well. -You will never get a promotion if you -call for help, -abandon the Enterprise, -get killed, -destroy a starbase or inhabited starsystem, -or destroy too many stars. -.bp -.ce -REFERENCE PAGE -.sp 2 -.ta 36 56 -.nf -.ul -Command Uses Consumes - -ABANDON shuttlecraft, - - transporter -CApture subspace radio time -CLoak Up/Down cloaking device energy -Computer request; request;... computer - -DAmages - - -DESTRUCT computer - -DOck - - -HELP subspace radio - -Impulse course distance impulse engines, time, energy - computer, SINS -Lrscan L.R. sensors - -Move course distance warp engines, time, energy - computer, SINS -Phasers Automatic amount phasers, computer energy -Phasers Manual amt1 course1 spread1 ... phasers energy -Torpedo course [Yes] angle/No torpedo tubes torpedoes -RAM course distance warp engines, time, energy - computer, SINS -Rest time - time -SHELL - - -SHields Up/Down shields energy -Srscan [Yes/No] S.R. sensors - -STatus - - -TERMINATE Yes/No - - -Undock - - -Visual course - time -Warp warp_factor - - -.fi diff --git a/games/trek/Makefile b/games/trek/Makefile index d4c1e917871..1338ff2daea 100644 --- a/games/trek/Makefile +++ b/games/trek/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 1998/08/19 07:41:08 pjanzen Exp $ +# $OpenBSD: Makefile,v 1.4 1999/03/12 03:02:37 pjanzen Exp $ PROG= trek SRCS= abandon.c attack.c autover.c capture.c check_out.c checkcond.c \ @@ -7,7 +7,7 @@ SRCS= abandon.c attack.c autover.c capture.c check_out.c checkcond.c \ getcodi.c getpar.c help.c impulse.c initquad.c kill.c klmove.c \ lose.c lrscan.c main.c move.c nova.c out.c phaser.c play.c ram.c \ ranf.c rest.c schedule.c score.c setup.c setwarp.c shield.c \ - snova.c srscan.c systemname.c torped.c visual.c warp.c win.c cgetc.c + snova.c srscan.c systemname.c torped.c visual.c warp.c win.c MAN= trek.6 DPADD= ${LIBM} LDADD= -lm diff --git a/games/trek/USD.doc/trek.me b/games/trek/USD.doc/trek.me index a287c84abaa..80f8b3a4ef8 100644 --- a/games/trek/USD.doc/trek.me +++ b/games/trek/USD.doc/trek.me @@ -1,3 +1,4 @@ +.\" $OpenBSD: trek.me,v 1.2 1999/03/12 03:03:04 pjanzen Exp $ .\" $NetBSD: trek.me,v 1.2 1995/04/22 10:59:49 cgd Exp $ .\" .\" Copyright (c) 1980, 1993 @@ -148,20 +149,20 @@ To request the game, issue the command .ft .sp from the shell. -If a filename is supplied, -a log of the game is written onto that file. -(Otherwise, no -file is written.) -If the -``\fB\-a\fP'' flag is stated before the filename, -the log of the game is appended to the file. +.\"If a filename is supplied, +.\"a log of the game is written onto that file. +.\"(Otherwise, no +.\"file is written.) +.\"If the +.\"``\fB\-a\fP'' flag is stated before the filename, +.\"the log of the game is appended to the file. .pp The game will ask you what length game you would like. Valid responses are "short", "medium", and "long". You may also type "restart", -which restarts a previously saved game. -Ideally, +which restarts a previously saved game, \*f./trek.dump\fR, if +it exists. Ideally, the length of the game does not affect the difficulty, but currently the shorter games tend to be harder than the longer ones. .pp @@ -884,6 +885,14 @@ any Klingons (and stars, and starbases) left in your quadrant. +.bl "Save the Game" +Mnemonic: dump +Shortest Abbreviation: dump +.FF +.pp +Saves the current game in \*f./trek.dump\fR +if possible. Game play continues after +the dump. .bl "Terminate the Game" Mnemonic: terminate Shortest Abbreviation: terminate @@ -893,16 +902,8 @@ Full Command: terminate yes/no Cancels the current game. No score is computed. If you answer yes, -a new game will be started, -otherwise trek exits. -.bl "Call the Shell" -Mnemonic: shell -Shortest Abbreviation: shell -.FF -.pp -Temporarily escapes to the shell. -When you exit the shell -you will return to the game. +a new game will be started; +otherwise, trek exits. \".bp .ce \*fSCORING\fR @@ -946,6 +947,7 @@ Command Requires Consumes \*fda\fRmages - - \*fdestruct\fR computer - \*fdo\fRck - - +\*fdump\fR - - \*fhelp\fR subspace radio - \*fi\fRmpulse course distance impulse engines, time, energy computer, SINS @@ -958,7 +960,6 @@ Command Requires Consumes \*fram\fR course distance warp engines, time, energy computer, SINS \*fr\fRest time - time -\*fshell\fR - - \*fsh\fRields \*fu\fRp/\*fd\fRown shields energy \*fs\fRrscan [\*fy\fRes/\*fn\fRo] S.R. sensors - \*fst\fRatus - - diff --git a/games/trek/abandon.c b/games/trek/abandon.c index 48f36a88ce4..7bdecb82abc 100644 --- a/games/trek/abandon.c +++ b/games/trek/abandon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: abandon.c,v 1.2 1998/08/19 07:41:09 pjanzen Exp $ */ +/* $OpenBSD: abandon.c,v 1.3 1999/03/12 03:02:38 pjanzen Exp $ */ /* $NetBSD: abandon.c,v 1.3 1995/04/22 10:58:24 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)abandon.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: abandon.c,v 1.2 1998/08/19 07:41:09 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: abandon.c,v 1.3 1999/03/12 03:02:38 pjanzen Exp $"; #endif #endif /* not lint */ @@ -66,8 +66,6 @@ static char rcsid[] = "$OpenBSD: abandon.c,v 1.2 1998/08/19 07:41:09 pjanzen Exp ** is at least one starbase, you are returned to the ** Federation in a prisoner of war exchange. Of course, this ** can't happen unless you have taken some prisoners. -** -** Uses trace flag 40 */ void diff --git a/games/trek/cgetc.c b/games/trek/cgetc.c deleted file mode 100644 index 9e1f10ceaf8..00000000000 --- a/games/trek/cgetc.c +++ /dev/null @@ -1,52 +0,0 @@ -/* $OpenBSD: cgetc.c,v 1.2 1998/08/19 07:41:15 pjanzen Exp $ */ -/* $NetBSD: cgetc.c,v 1.3 1995/04/22 10:58:34 cgd Exp $ */ - -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lint -#if 0 -static char sccsid[] = "@(#)cgetc.c 8.1 (Berkeley) 5/31/93"; -#else -static char rcsid[] = "$OpenBSD: cgetc.c,v 1.2 1998/08/19 07:41:15 pjanzen Exp $"; -#endif -#endif /* not lint */ - -#include <stdio.h> - -char -cgetc(i) - int i; -{ - return ( getchar() ); -} diff --git a/games/trek/computer.c b/games/trek/computer.c index c036a1f592f..79ae886a814 100644 --- a/games/trek/computer.c +++ b/games/trek/computer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: computer.c,v 1.2 1998/08/19 07:41:20 pjanzen Exp $ */ +/* $OpenBSD: computer.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $ */ /* $NetBSD: computer.c,v 1.4 1995/04/24 12:25:51 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)computer.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: computer.c,v 1.2 1998/08/19 07:41:20 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: computer.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $"; #endif #endif /* not lint */ @@ -299,7 +299,7 @@ computer(v) /* skip to next semicolon or newline. Semicolon * means get new computer request; newline means * exit computer mode. */ - while ((i = cgetc(0)) != ';') + while ((i = getchar()) != ';') { if (i == '\0') exit(1); diff --git a/games/trek/destruct.c b/games/trek/destruct.c index 132d058b322..fe1e5ead687 100644 --- a/games/trek/destruct.c +++ b/games/trek/destruct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: destruct.c,v 1.2 1998/08/19 07:41:25 pjanzen Exp $ */ +/* $OpenBSD: destruct.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $ */ /* $NetBSD: destruct.c,v 1.3 1995/04/22 10:58:44 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)destruct.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: destruct.c,v 1.2 1998/08/19 07:41:25 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: destruct.c,v 1.3 1999/03/12 03:02:40 pjanzen Exp $"; #endif #endif /* not lint */ @@ -59,12 +59,12 @@ static char rcsid[] = "$OpenBSD: destruct.c,v 1.2 1998/08/19 07:41:25 pjanzen Ex ** possible to win the game by destructing if you take the last ** Klingon with you. ** -** By the way, the \032 in the message is a ^Z, which is because -** the terminal in my office is an ADM-3, which uses that char- -** acter to clear the screen. I also stick in a \014 (form feed) -** because that clears some other screens. -** -** Uses trace flag 41 +** There used to be a \032 in the message (^Z), which is because +** the terminal in Allman's office was an ADM-3, which uses that char- +** acter to clear the screen. There was also a \014 (form feed) +** because that clears some other screens. Now there is nothing. +** Presumably the most general screen clear today would be +** ESC [2J */ void @@ -110,7 +110,8 @@ destruct(v) printf("%d\n", i); } sleep(2); - printf("\032\014***** %s destroyed *****\n", Ship.shipname); + /* printf("\032\014***** %s destroyed *****\n", Ship.shipname); */ + printf("\n\n\n\n***** %s destroyed *****\n", Ship.shipname); Game.killed = 1; /* let's see what we can blow up!!!! */ zap = 20.0 * Ship.energy; diff --git a/games/trek/dumpgame.c b/games/trek/dumpgame.c index e3ade385fdb..319af6c155b 100644 --- a/games/trek/dumpgame.c +++ b/games/trek/dumpgame.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dumpgame.c,v 1.3 1998/11/29 19:45:11 pjanzen Exp $ */ +/* $OpenBSD: dumpgame.c,v 1.4 1999/03/12 03:02:41 pjanzen Exp $ */ /* $NetBSD: dumpgame.c,v 1.4 1995/04/24 12:25:54 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dumpgame.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: dumpgame.c,v 1.3 1998/11/29 19:45:11 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: dumpgame.c,v 1.4 1999/03/12 03:02:41 pjanzen Exp $"; #endif #endif /* not lint */ @@ -49,7 +49,7 @@ static char rcsid[] = "$OpenBSD: dumpgame.c,v 1.3 1998/11/29 19:45:11 pjanzen Ex #include "trek.h" /*** THIS CONSTANT MUST CHANGE AS THE DATA SPACES CHANGE ***/ -# define VERSION 2 +# define VERSION 3 struct dump { diff --git a/games/trek/getpar.c b/games/trek/getpar.c index eedc05b6570..8a8ac93e0cc 100644 --- a/games/trek/getpar.c +++ b/games/trek/getpar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getpar.c,v 1.2 1998/08/19 07:41:36 pjanzen Exp $ */ +/* $OpenBSD: getpar.c,v 1.3 1999/03/12 03:02:41 pjanzen Exp $ */ /* $NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: getpar.c,v 1.2 1998/08/19 07:41:36 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: getpar.c,v 1.3 1999/03/12 03:02:41 pjanzen Exp $"; #endif #endif /* not lint */ @@ -144,7 +144,7 @@ getcodpar(s, tab) if (flag) printf("%s: ", s); if (f) - cgetc(0); /* throw out the newline */ + getchar(); /* throw out the newline */ scanf("%*[ \t;]"); if ((c = scanf("%[^ \t;\n]", input)) < 0) exit(1); @@ -223,7 +223,7 @@ getstrpar(s, r, l, t) if ((f = testnl()) && s) printf("%s: ", s); if (f) - cgetc(0); + getchar(); scanf("%*[\t ;]"); i = scanf(format, r); if (i < 0) @@ -243,7 +243,7 @@ testnl() { register char c; - while ((c = cgetc(0)) != '\n') + while ((c = getchar()) != '\n') if ((c >= '0' && c <= '9') || c == '.' || c == '!' || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '-') @@ -265,7 +265,7 @@ skiptonl(c) char c; { while (c != '\n') - if (!(c = cgetc(0))) + if (!(c = getchar())) return; ungetc('\n', stdin); return; @@ -281,7 +281,7 @@ testterm() { char c; - if (!(c = cgetc(0))) + if (!(c = getchar())) return (1); if (c == '.') return (0); @@ -305,7 +305,7 @@ readdelim(d) { register char c; - while ((c = cgetc(0))) + while ((c = getchar())) { if (c == d) return (1); diff --git a/games/trek/main.c b/games/trek/main.c index cc80438a8b9..09c55591901 100644 --- a/games/trek/main.c +++ b/games/trek/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.6 1998/08/19 07:41:49 pjanzen Exp $ */ +/* $OpenBSD: main.c,v 1.7 1999/03/12 03:02:42 pjanzen Exp $ */ /* $NetBSD: main.c,v 1.4 1995/04/22 10:59:10 cgd Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.6 1998/08/19 07:41:49 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.7 1999/03/12 03:02:42 pjanzen Exp $"; #endif #endif /* not lint */ @@ -58,10 +58,6 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.6 1998/08/19 07:41:49 pjanzen Exp $" #include "trek.h" #include "getpar.h" -# define PRIO 00 /* default priority */ - -int Mother = 51 + (51 << 8); - /* ** #### ##### # #### ##### #### ##### # # ** # # # # # # # # # # # # @@ -130,31 +126,8 @@ int Mother = 51 + (51 << 8); ** NOTES TO THE MAINTAINER: ** ** There is a compilation option xTRACE which must be set for any -** trace information to be generated. It is probably defined in -** the version that you get. It can be removed, however, if you -** have trouble finding room in core. -** -** Many things in trek are not as clear as they might be, but are -** done to reduce space. I compile with the -f and -O flags. I -** am constrained to running with non-seperated I/D space, since -** we don't have doubleing point hardware here; even if we did, I -** would like trek to be available to the large number of people -** who either have an 11/40 or do not have FP hardware. I also -** found it desirable to make the code run reentrant, so this -** added even more space constraints. -** -** I use the portable C library to do my I/O. This is done be- -** cause I wanted the game easily transportable to other C -** implementations, and because I was too lazy to do the doubleing -** point input myself. Little did I know. The portable C library -** released by Bell Labs has more bugs than you would believe, so -** I ended up rewriting the whole blessed thing. Trek excercises -** many of the bugs in it, as well as bugs in some of the section -** III UNIX routines. We have fixed them here. One main problem -** was a bug in alloc() that caused it to always ask for a large -** hunk of memory, which worked fine unless you were almost out, -** which I inevitably was. If you want the code for all of this -** stuff, it is also available through me. +** trace information to be generated (the -t option must also be +** set on the command line). It is no longer defined by default. ** *********************************************************************** */ @@ -167,12 +140,8 @@ main(argc, argv) char **argv; { time_t curtime; - /* extern FILE *f_log; */ - register char opencode; - int prio; register int ac; register char **av; - struct termios argp; /* revoke privs */ setegid(getgid()); @@ -183,59 +152,25 @@ main(argc, argv) av++; time(&curtime); srandom((long)curtime); - opencode = 'w'; - prio = PRIO; - - if (tcgetattr(1, &argp) == 0) - { - if (cfgetispeed(&argp) < B1200) - Etc.fast++; - } +#ifdef xTRACE + Trace = 0; while (ac > 1 && av[0][0] == '-') { switch (av[0][1]) { - case 'a': /* append to log file */ - opencode = 'a'; - break; - - case 'f': /* set fast mode */ - Etc.fast++; - break; - - case 's': /* set slow mode */ - Etc.fast = 0; - break; - -# ifdef xTRACE case 't': /* trace */ - if (getuid() != Mother) - goto badflag; Trace++; break; -# endif - - case 'p': /* set priority */ - if (getuid() != Mother) - goto badflag; - prio = atoi(av[0] + 2); - break; default: - badflag: printf("Invalid option: %s\n", av[0]); } ac--; av++; } - if (ac > 2) - errx(1, "arg count"); - /* - if (ac > 1) - f_log = fopen(av[0], opencode); - */ +#endif printf("\n * * * S T A R T R E K * * *\n\nPress return to continue.\n"); diff --git a/games/trek/move.c b/games/trek/move.c index 2a0ac6e1466..fa7a2fce807 100644 --- a/games/trek/move.c +++ b/games/trek/move.c @@ -1,4 +1,4 @@ -/* $OpenBSD: move.c,v 1.2 1998/08/19 07:41:50 pjanzen Exp $ */ +/* $OpenBSD: move.c,v 1.3 1999/03/12 03:02:42 pjanzen Exp $ */ /* $NetBSD: move.c,v 1.3 1995/04/22 10:59:12 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)move.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: move.c,v 1.2 1998/08/19 07:41:50 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: move.c,v 1.3 1999/03/12 03:02:42 pjanzen Exp $"; #endif #endif /* not lint */ @@ -76,9 +76,6 @@ static char rcsid[] = "$OpenBSD: move.c,v 1.2 1998/08/19 07:41:50 pjanzen Exp $" ** By the way, they also try to follow you (heh heh). ** ** Return value is the actual amount of time used. -** -** -** Uses trace flag 4. */ double diff --git a/games/trek/phaser.c b/games/trek/phaser.c index e10b28661ef..754d7861053 100644 --- a/games/trek/phaser.c +++ b/games/trek/phaser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: phaser.c,v 1.2 1998/08/19 07:41:54 pjanzen Exp $ */ +/* $OpenBSD: phaser.c,v 1.3 1999/03/12 03:02:43 pjanzen Exp $ */ /* $NetBSD: phaser.c,v 1.4 1995/04/24 12:26:02 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)phaser.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: phaser.c,v 1.2 1998/08/19 07:41:54 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: phaser.c,v 1.3 1999/03/12 03:02:43 pjanzen Exp $"; #endif #endif /* not lint */ @@ -76,8 +76,6 @@ static char rcsid[] = "$OpenBSD: phaser.c,v 1.2 1998/08/19 07:41:54 pjanzen Exp ** fairly large spread. ** ** Phasers spread slightly, even if you specify zero spread. -** -** Uses trace flag 30 */ struct cvntab Matab[] = diff --git a/games/trek/srscan.c b/games/trek/srscan.c index 2d02b00de47..9b2599f48c2 100644 --- a/games/trek/srscan.c +++ b/games/trek/srscan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: srscan.c,v 1.2 1998/08/19 07:42:08 pjanzen Exp $ */ +/* $OpenBSD: srscan.c,v 1.3 1999/03/12 03:02:44 pjanzen Exp $ */ /* $NetBSD: srscan.c,v 1.3 1995/04/22 10:59:31 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)srscan.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: srscan.c,v 1.2 1998/08/19 07:42:08 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: srscan.c,v 1.3 1999/03/12 03:02:44 pjanzen Exp $"; #endif #endif /* not lint */ @@ -91,11 +91,7 @@ srscan(f) statinfo = Etc.statreport; } if (f > 0) - { Etc.statreport = 1; - if (!Etc.fast) - return; - } if (f >= 0) { printf("\nShort range sensor scan\n"); diff --git a/games/trek/torped.c b/games/trek/torped.c index 7eec2a78001..88a2972b758 100644 --- a/games/trek/torped.c +++ b/games/trek/torped.c @@ -1,4 +1,4 @@ -/* $OpenBSD: torped.c,v 1.2 1998/08/19 07:42:11 pjanzen Exp $ */ +/* $OpenBSD: torped.c,v 1.3 1999/03/12 03:02:44 pjanzen Exp $ */ /* $NetBSD: torped.c,v 1.3 1995/04/22 10:59:34 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)torped.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: torped.c,v 1.2 1998/08/19 07:42:11 pjanzen Exp $"; +static char rcsid[] = "$OpenBSD: torped.c,v 1.3 1999/03/12 03:02:44 pjanzen Exp $"; #endif #endif /* not lint */ @@ -112,7 +112,7 @@ torped(v) /* see if the user wants one */ if (!testnl()) { - k = ungetc(cgetc(0), stdin); + k = ungetc(getchar(), stdin); if (k >= '0' && k <= '9') burst = 1; } diff --git a/games/trek/trek.6 b/games/trek/trek.6 index c172fcb57d3..b12310e03aa 100644 --- a/games/trek/trek.6 +++ b/games/trek/trek.6 @@ -1,3 +1,4 @@ +.\" $OpenBSD: trek.6,v 1.5 1999/03/12 03:02:44 pjanzen Exp $ .\" $NetBSD: trek.6,v 1.4 1995/04/22 10:59:35 cgd Exp $ .\" .\" Copyright (c) 1980, 1993 @@ -41,10 +42,6 @@ .Nd trekkie game .Sh SYNOPSIS .Nm trek -.Oo -.Op Fl a -.Ar file -.Oc .Sh DESCRIPTION .Nm is a game of space glory and war. Below is a summary of commands. @@ -52,11 +49,6 @@ For complete documentation, see .Em Trek by Eric Allman. .Pp -If a filename is given, a log of the game is written onto that file. -If the -.Fl a -flag is given before the filename, that file is appended to, not truncated. -.Pp The game will ask you what length game you would like. Valid responses are .Dq short , @@ -100,6 +92,9 @@ Eric Allman .It .Ic do Ns ck .It +.Ic dump No (save game to +.Pa ./trek.dump ) +.It .Ic help .It .Ic i Ns mpulse course distance @@ -122,8 +117,6 @@ amt1 course1 spread1 ... .It .Ic r Ns est time .It -.Ic shell -.It .Ic sh Ns ields .Ic u Ns p/ Ns Ic d Ns own .It diff --git a/games/trek/trek.h b/games/trek/trek.h index 08f9bea1067..ca53e92de1d 100644 --- a/games/trek/trek.h +++ b/games/trek/trek.h @@ -1,4 +1,4 @@ -/* $OpenBSD: trek.h,v 1.3 1998/08/19 07:42:12 pjanzen Exp $ */ +/* $OpenBSD: trek.h,v 1.4 1999/03/12 03:02:45 pjanzen Exp $ */ /* $NetBSD: trek.h,v 1.3 1995/04/22 10:59:36 cgd Exp $ */ /* @@ -337,7 +337,6 @@ struct struct kling klingon[MAXKLQUAD]; /* sorted Klingon list */ short nkling; /* number of Klingons in this sector */ /* < 0 means automatic override mode */ - char fast; /* set if speed > 300 baud */ struct xy starbase; /* starbase in current quadrant */ char snapshot[sizeof Quad + sizeof Event + sizeof Now]; /* snapshot for time warp */ char statreport; /* set to get a status report on a srscan */ @@ -374,8 +373,10 @@ struct /****************** COMPILE OPTIONS ***********************/ /* Trace info */ -#define xTRACE 1 +/* #define xTRACE 1 */ +#ifdef xTRACE int Trace; +#endif /* abandon.c */ void abandon __P((int)); @@ -390,9 +391,6 @@ void autover __P((void)); void capture __P((int)); struct kling *selectklingon __P((void)); -/* cgetc.c */ -char cgetc __P((int)); - /* check_out.c */ int check_out __P((int)); |