super-star-trek.git
13 years agoSilence some compile warnings.
Eric S. Raymond [Tue, 14 Sep 2010 21:54:31 +0000 (21:54 +0000)]
Silence some compile warnings.

13 years agoRemnove some generated autotools stuff from the repo.
Eric S. Raymond [Tue, 14 Sep 2010 21:16:49 +0000 (21:16 +0000)]
Remnove some generated autotools stuff from the repo.

13 years agoSet ignore properties correctly for subdirectories.
Eric S. Raymond [Tue, 14 Sep 2010 21:11:37 +0000 (21:11 +0000)]
Set ignore properties correctly for subdirectories.

13 years agoTweak some ignores.
Eric S. Raymond [Tue, 14 Sep 2010 21:07:00 +0000 (21:07 +0000)]
Tweak some ignores.

13 years agoIgnore some generated files.
Eric S. Raymond [Tue, 14 Sep 2010 21:04:19 +0000 (21:04 +0000)]
Ignore some generated files.

13 years agoFollow through on a command name change.
Eric S. Raymond [Tue, 14 Sep 2010 20:59:01 +0000 (20:59 +0000)]
Follow through on a command name change.

13 years agoCatch the help up with what the game uses.
Eric S. Raymond [Tue, 14 Sep 2010 20:50:46 +0000 (20:50 +0000)]
Catch the help up with what the game uses.

13 years agoFixed the Python help command.
Eric S. Raymond [Tue, 14 Sep 2010 20:43:11 +0000 (20:43 +0000)]
Fixed the Python help command.

13 years agoInfrastructure for color in the Python version (currently disabled).
Eric S. Raymond [Tue, 14 Sep 2010 20:05:46 +0000 (20:05 +0000)]
Infrastructure for color in the Python version (currently disabled).

13 years agoComment fix.
Eric S. Raymond [Tue, 14 Sep 2010 07:20:48 +0000 (07:20 +0000)]
Comment fix.

13 years agoSmall refactoring step.
Eric S. Raymond [Mon, 13 Sep 2010 22:23:45 +0000 (22:23 +0000)]
Small refactoring step.

13 years agoAdd sanity check.
Eric S. Raymond [Mon, 13 Sep 2010 22:19:19 +0000 (22:19 +0000)]
Add sanity check.

13 years agoVon Mises variate isn't actually a good idea.
Eric S. Raymond [Mon, 13 Sep 2010 17:17:16 +0000 (17:17 +0000)]
Von Mises variate isn't actually a good idea.

...it's uniformly distributed when we want something more like a
Gaussian.

13 years agoForward-porting to Python 2.6 exposed a bug.
Eric S. Raymond [Mon, 13 Sep 2010 15:58:55 +0000 (15:58 +0000)]
Forward-porting to Python 2.6 exposed a bug.

13 years agoEnable environment variable TMPDIR to set the log temporary directory.
Eric S. Raymond [Mon, 13 Sep 2010 15:49:11 +0000 (15:49 +0000)]
Enable environment variable TMPDIR to set the log temporary directory.

13 years agoTypo fix.
Eric S. Raymond [Mon, 13 Sep 2010 15:31:34 +0000 (15:31 +0000)]
Typo fix.

15 years agoforgotten piece of the prev commit.
Stas Sergeev [Thu, 8 May 2008 11:51:50 +0000 (11:51 +0000)]
forgotten piece of the prev commit.

15 years agoStarchart and base-attack tweaks.
Stas Sergeev [Thu, 8 May 2008 11:15:44 +0000 (11:15 +0000)]
Starchart and base-attack tweaks.

- Allow startchart updates by sr and lr scans.
Otherwise if you kill the enemies in the quadrant
and the radio is not working, the evemies are still
on a chart, etc.
- Fix bug that the message about base under attack
sticks when the base is killed by supernova.

16 years agoTranslation and score tweaks.
Stas Sergeev [Fri, 14 Mar 2008 14:44:09 +0000 (14:44 +0000)]
Translation and score tweaks.

- Update translation
- Fix score calculation for romulans and worlds
- Rewrite the score calculation of C version

16 years agoFix buggy processing of shield energy change request.
Eric S. Raymond [Fri, 14 Dec 2007 00:15:51 +0000 (00:15 +0000)]
Fix buggy processing of shield energy change request.

16 years agoUse /tmp for logs, as /usr/tmp is not available under Ubuntu.
Eric S. Raymond [Thu, 13 Dec 2007 23:59:23 +0000 (23:59 +0000)]
Use /tmp for logs, as /usr/tmp is not available under Ubuntu.

17 years agoUse libncursesw, not libncurses
Stas Sergeev [Fri, 27 Oct 2006 19:06:09 +0000 (19:06 +0000)]
Use libncursesw, not libncurses

17 years agouse the python code as the source for the translation
Stas Sergeev [Mon, 23 Oct 2006 18:00:05 +0000 (18:00 +0000)]
use the python code as the source for the translation

17 years agoClean up and document constants.
Eric S. Raymond [Sun, 22 Oct 2006 13:13:46 +0000 (13:13 +0000)]
Clean up and document constants.

17 years agoSpot a use of normal distribution that wasn't encapsulated.
Eric S. Raymond [Sat, 21 Oct 2006 19:49:34 +0000 (19:49 +0000)]
Spot a use of normal distribution that wasn't encapsulated.

17 years agoMove a comment that really belonged in the design notes.
Eric S. Raymond [Fri, 20 Oct 2006 21:35:03 +0000 (21:35 +0000)]
Move a comment that really belonged in the design notes.

17 years agoGetv rid of some scaffolding.
Eric S. Raymond [Fri, 20 Oct 2006 20:51:15 +0000 (20:51 +0000)]
Getv rid of some scaffolding.

17 years agoUse a better way of getting the username. Also, fix a typo.
Eric S. Raymond [Fri, 20 Oct 2006 19:57:38 +0000 (19:57 +0000)]
Use a better way of getting the username.  Also, fix a typo.

17 years agoRename class members to remove old assumption that all enemies are Klingons.
Eric S. Raymond [Wed, 18 Oct 2006 01:13:00 +0000 (01:13 +0000)]
Rename class members to remove old assumption that all enemies are Klingons.

17 years agoMore documentation improvements.
Eric S. Raymond [Tue, 17 Oct 2006 17:47:37 +0000 (17:47 +0000)]
More documentation improvements.

17 years agoEquates for display character names made sense when the values were
Eric S. Raymond [Tue, 17 Oct 2006 17:31:52 +0000 (17:31 +0000)]
Equates for display character names made sense when the values were
FORTRAN literals, but in Python it makes better readability to just let the
name of the display character be itself.  Search and replace is easy.

17 years agoImprive documentation, fix a typo, add the hacking guide.
Eric S. Raymond [Tue, 17 Oct 2006 15:09:45 +0000 (15:09 +0000)]
Imprive documentation, fix a typo, add the hacking guide.

17 years agoFix an embarassing last-minute bug.
Eric S. Raymond [Tue, 17 Oct 2006 14:08:28 +0000 (14:08 +0000)]
Fix an embarassing last-minute bug.

17 years agoA bit more code compression.
Eric S. Raymond [Mon, 16 Oct 2006 14:55:36 +0000 (14:55 +0000)]
A bit more code compression.

17 years agoMore trig refactoring.
Eric S. Raymond [Mon, 16 Oct 2006 13:41:47 +0000 (13:41 +0000)]
More trig refactoring.

17 years agoPrevent torpedo wraparound.
Eric S. Raymond [Mon, 16 Oct 2006 12:39:48 +0000 (12:39 +0000)]
Prevent torpedo wraparound.

17 years agoClean up and refactor the movement code, fix minor translation bugs.
Eric S. Raymond [Mon, 16 Oct 2006 02:19:40 +0000 (02:19 +0000)]
Clean up and refactor the movement code, fix minor translation bugs.

17 years agoMake it possible to reset a course object.
Eric S. Raymond [Fri, 13 Oct 2006 17:10:08 +0000 (17:10 +0000)]
Make it possible to reset a course object.

17 years agoSubsume more trig into the course object.
Eric S. Raymond [Fri, 13 Oct 2006 16:54:21 +0000 (16:54 +0000)]
Subsume more trig into the course object.

17 years agoNavigation is finally subsumed by the course object.
Eric S. Raymond [Fri, 13 Oct 2006 12:08:36 +0000 (12:08 +0000)]
Navigation is finally subsumed by the course object.

17 years agoMore vector-arithmetic abstraction.
Eric S. Raymond [Fri, 13 Oct 2006 11:39:37 +0000 (11:39 +0000)]
More vector-arithmetic abstraction.

17 years agoCompute final member in course object.
Eric S. Raymond [Fri, 13 Oct 2006 10:32:35 +0000 (10:32 +0000)]
Compute final member in course object.

17 years agoFix two minor bugs.
Eric S. Raymond [Fri, 13 Oct 2006 10:23:21 +0000 (10:23 +0000)]
Fix two minor bugs.

17 years agoMore course-object refactoring.
Eric S. Raymond [Fri, 13 Oct 2006 02:50:47 +0000 (02:50 +0000)]
More course-object refactoring.

17 years agoAnother step in subsuming navigation into the course object.
Eric S. Raymond [Fri, 13 Oct 2006 02:46:16 +0000 (02:46 +0000)]
Another step in subsuming navigation into the course object.

17 years agoRestore some display behavior.
Eric S. Raymond [Thu, 12 Oct 2006 22:15:05 +0000 (22:15 +0000)]
Restore some display behavior.

17 years agoAnother refactoring step.
Eric S. Raymond [Thu, 12 Oct 2006 22:04:27 +0000 (22:04 +0000)]
Another refactoring step.

17 years agoSimplify the torpedo code preparatory to refactoring it.
Eric S. Raymond [Thu, 12 Oct 2006 21:48:48 +0000 (21:48 +0000)]
Simplify the torpedo code preparatory to refactoring it.

17 years agoAnother step towards pulling all trig into the course object.
Eric S. Raymond [Thu, 12 Oct 2006 13:43:31 +0000 (13:43 +0000)]
Another step towards pulling all trig into the course object.

17 years agoEliminate traces of some macros.
Eric S. Raymond [Thu, 12 Oct 2006 13:27:13 +0000 (13:27 +0000)]
Eliminate traces of some macros.

17 years agoTorpedo-track computation now done by course object.
Eric S. Raymond [Thu, 12 Oct 2006 12:01:04 +0000 (12:01 +0000)]
Torpedo-track computation now done by course object.

17 years agoProbe navigation is now handled completely by the course object.
Eric S. Raymond [Thu, 12 Oct 2006 10:37:21 +0000 (10:37 +0000)]
Probe navigation is now handled completely by the course object.

17 years agoFix the probe bug.
Eric S. Raymond [Wed, 11 Oct 2006 21:22:07 +0000 (21:22 +0000)]
Fix the probe bug.

17 years agoNew probe logic mostly looks good, but there is a glitch in the
Eric S. Raymond [Wed, 11 Oct 2006 13:04:38 +0000 (13:04 +0000)]
New probe logic mostly looks good, but there is a glitch in the
initial course computation.

This change introduces a course object.

This (someday) should unify all the messy trigonometry in one place.

17 years agoFix typo noticed while working on the Python translation.
Eric S. Raymond [Wed, 11 Oct 2006 11:17:48 +0000 (11:17 +0000)]
Fix typo noticed while working on the Python translation.

17 years agoSimplify the probe code.
Eric S. Raymond [Wed, 11 Oct 2006 00:52:25 +0000 (00:52 +0000)]
Simplify the probe code.

17 years agoInvert the sense of a test for better readability.
Eric S. Raymond [Tue, 10 Oct 2006 21:07:40 +0000 (21:07 +0000)]
Invert the sense of a test for better readability.

17 years agoLexer fixes for Stas.
Eric S. Raymond [Tue, 10 Oct 2006 20:08:59 +0000 (20:08 +0000)]
Lexer fixes for Stas.

17 years agoMinor fixes to curses interface.
Eric S. Raymond [Tue, 10 Oct 2006 17:46:03 +0000 (17:46 +0000)]
Minor fixes to curses interface.

17 years agoEnabled the gettext support.
Stas Sergeev [Tue, 10 Oct 2006 17:09:07 +0000 (17:09 +0000)]
Enabled the gettext support.

However:

1. The path is hardcoded and suits *my* configuration.
2. It is still unclear how to build the translation catalog without automake.

How can I solve these?

17 years agoGet rid of some magic numbers, simplify the scanner.
Eric S. Raymond [Tue, 10 Oct 2006 16:14:13 +0000 (16:14 +0000)]
Get rid of some magic numbers, simplify the scanner.

17 years agoDebug the logic for deep-space probes.
Eric S. Raymond [Tue, 10 Oct 2006 15:38:45 +0000 (15:38 +0000)]
Debug the logic for deep-space probes.

17 years agoBetter wrapup on replays.
Eric S. Raymond [Tue, 10 Oct 2006 10:03:10 +0000 (10:03 +0000)]
Better wrapup on replays.

17 years agoNow the Python version works, let's deep-six this.
Eric S. Raymond [Tue, 10 Oct 2006 09:41:28 +0000 (09:41 +0000)]
Now the Python version works, let's deep-six this.

...so nobody else is tempted to go through the pain...

17 years agoRemove some scaffolding, comments that were guidance for code now working.
Eric S. Raymond [Tue, 10 Oct 2006 09:38:53 +0000 (09:38 +0000)]
Remove some scaffolding, comments that were guidance for code now working.

17 years agoPut a timestamp an email in lofiles. Add the replay debugging script.
Eric S. Raymond [Tue, 10 Oct 2006 09:25:53 +0000 (09:25 +0000)]
Put a timestamp an email in lofiles.  Add the replay debugging script.

And a tiny tweak to io.c.

17 years agoFix range error in Tholian movement.
Eric S. Raymond [Tue, 10 Oct 2006 08:51:43 +0000 (08:51 +0000)]
Fix range error in Tholian movement.

17 years agoUnscramble some of the trig-formula mess.
Eric S. Raymond [Tue, 10 Oct 2006 08:38:33 +0000 (08:38 +0000)]
Unscramble some of the trig-formula mess.

17 years agoFix listCommands.
Eric S. Raymond [Tue, 10 Oct 2006 08:20:59 +0000 (08:20 +0000)]
Fix listCommands.

17 years agocurses interface seems to work!
Eric S. Raymond [Tue, 10 Oct 2006 07:57:49 +0000 (07:57 +0000)]
curses interface seems to work!

17 years agoAtexit was screwing up the Python curses bindings. Weird.
Eric S. Raymond [Tue, 10 Oct 2006 07:41:34 +0000 (07:41 +0000)]
Atexit was screwing up the Python curses bindings. Weird.

17 years agoDon't try to do color initialization in Python yet, direct C
Eric S. Raymond [Tue, 10 Oct 2006 07:22:57 +0000 (07:22 +0000)]
Don't try to do color initialization in Python yet, direct C
translation of that code doesn't work.

17 years agoTime to make curses work.
Eric S. Raymond [Tue, 10 Oct 2006 07:06:46 +0000 (07:06 +0000)]
Time to make curses work.

17 years agoSimplify tac movement, handle more torpedo input cases correctly.
Eric S. Raymond [Tue, 10 Oct 2006 06:21:55 +0000 (06:21 +0000)]
Simplify tac movement, handle more torpedo input cases correctly.

17 years agoGet rid of a duplicative variable.
Eric S. Raymond [Tue, 10 Oct 2006 02:18:09 +0000 (02:18 +0000)]
Get rid of a duplicative variable.

17 years agoMake some constants into strings for better debugging messages.
Eric S. Raymond [Tue, 10 Oct 2006 02:09:10 +0000 (02:09 +0000)]
Make some constants into strings for better debugging messages.

17 years agoFix translation error that prevented commanders from being hit by torps.
Eric S. Raymond [Tue, 10 Oct 2006 01:56:31 +0000 (01:56 +0000)]
Fix translation error that prevented commanders from being hit by torps.

17 years agoMore nomenclature fixes.
Eric S. Raymond [Tue, 10 Oct 2006 01:14:36 +0000 (01:14 +0000)]
More nomenclature fixes.

17 years agoTwo sources of vast confusion in reading the C code are these:
Eric S. Raymond [Mon, 9 Oct 2006 23:14:11 +0000 (23:14 +0000)]
Two sources of vast confusion in reading the C code are these:

(1) the code uses x and y as though they're Cartesian coordinate
variables, but (inconsistently) swaps them around so that "x"
variables usually refer to the y direction in the output charts.

(2) Coordinates in the y direction (whether they are x variables or
not) increase *downwards* (charts are printed row zero first).

There is extremely ugly and confusing code in targetcheck() and
getcourse() where two opposite sets of conventions bump up against
each other.

As a first step, towards untangling this mess, we'll change the
nomenclature so that coordinate names refer to 'i' and 'j'
directions, as in matrix indices (i vertical, increasing downwards,
and j horizontal, increasing rightwards).  This patch does that for
the coord class members, also fixing two small bugs that turned
up during testing.

More steps will be necessary...

17 years agoFix another basic error.
Eric S. Raymond [Mon, 9 Oct 2006 22:51:25 +0000 (22:51 +0000)]
Fix another basic error.

17 years agoFix a rather basic error in vector comparisons.
Eric S. Raymond [Mon, 9 Oct 2006 22:40:21 +0000 (22:40 +0000)]
Fix a rather basic error in vector comparisons.

17 years agoThis version of the Python does both navigation and torps correctly.
Eric S. Raymond [Mon, 9 Oct 2006 21:53:56 +0000 (21:53 +0000)]
This version of the Python does both navigation and torps correctly.

...but the use of trig and variables is unbelievably snarled (legacy from
the C and FORTRAN code).

17 years agoAha! Found the lurking bug in the Python torpedo code. Now to clean up.
Eric S. Raymond [Mon, 9 Oct 2006 20:59:19 +0000 (20:59 +0000)]
Aha!  Found the lurking bug in the Python torpedo code.  Now to clean up.

17 years agoGet rid of a special case in the old code.
Eric S. Raymond [Mon, 9 Oct 2006 18:53:42 +0000 (18:53 +0000)]
Get rid of a special case in the old code.

17 years agoDead-code removal.
Eric S. Raymond [Mon, 9 Oct 2006 18:33:55 +0000 (18:33 +0000)]
Dead-code removal.

17 years agoannounce doesnt ask for enter
Stas Sergeev [Mon, 9 Oct 2006 17:41:34 +0000 (17:41 +0000)]
announce doesnt ask for enter

17 years agoMore code slimming in the Python version.
Eric S. Raymond [Mon, 9 Oct 2006 13:31:30 +0000 (13:31 +0000)]
More code slimming in the Python version.

17 years agoPython logic for torpedo-salvo input seems to work now.
Eric S. Raymond [Mon, 9 Oct 2006 12:55:21 +0000 (12:55 +0000)]
Python logic for torpedo-salvo input seems to work now.

There's still a glitch in the course computation.

17 years agoAdd -s option to Python version. Fix more minor bugs.
Eric S. Raymond [Mon, 9 Oct 2006 00:51:34 +0000 (00:51 +0000)]
Add -s option to Python version.  Fix more minor bugs.

17 years agoSmall port fixes.
Eric S. Raymond [Mon, 9 Oct 2006 00:14:35 +0000 (00:14 +0000)]
Small port fixes.

17 years agoMore refactoring of the Python version.
Eric S. Raymond [Sun, 8 Oct 2006 22:28:32 +0000 (22:28 +0000)]
More refactoring of the Python version.

17 years agoUse Python list operations to get rid of a lot of FORTRANish for loops.
Eric S. Raymond [Sun, 8 Oct 2006 22:18:25 +0000 (22:18 +0000)]
Use Python list operations to get rid of a lot of FORTRANish for loops.

17 years agoFound the bad distance/direction calculation.
Eric S. Raymond [Sun, 8 Oct 2006 21:01:59 +0000 (21:01 +0000)]
Found the bad distance/direction calculation.

17 years agoVarious minor port fixes.
Eric S. Raymond [Sun, 8 Oct 2006 20:36:51 +0000 (20:36 +0000)]
Various minor port fixes.

17 years agoUse object methods for vector calculations.
Eric S. Raymond [Sun, 8 Oct 2006 09:00:09 +0000 (09:00 +0000)]
Use object methods for vector calculations.

17 years agoTorpedo logic still isn't right, but we're getting there.
Eric S. Raymond [Sun, 8 Oct 2006 07:59:35 +0000 (07:59 +0000)]
Torpedo logic still isn't right, but we're getting there.

17 years agoSimplify some corner cases in the scanner code.
Eric S. Raymond [Sun, 8 Oct 2006 06:35:38 +0000 (06:35 +0000)]
Simplify some corner cases in the scanner code.

17 years agoRefactored lexical analyzer into a scanner class.
Eric S. Raymond [Sun, 8 Oct 2006 06:19:28 +0000 (06:19 +0000)]
Refactored lexical analyzer into a scanner class.

This will make it easier to replace the parser, when we need to do that.

17 years agoOops -- fix a typo that broke the scanner.
Eric S. Raymond [Sun, 8 Oct 2006 05:49:11 +0000 (05:49 +0000)]
Oops -- fix a typo that broke the scanner.

17 years agoFix Tholian motion.
Eric S. Raymond [Sun, 8 Oct 2006 02:56:00 +0000 (02:56 +0000)]
Fix Tholian motion.