super-star-trek.git
17 years agoReset the translation, we're going to redo it with ctopy.
Eric S. Raymond [Thu, 28 Sep 2006 09:34:55 +0000 (09:34 +0000)]
Reset the translation, we're going to redo it with ctopy.

17 years agoGet rid of obnoxious visible "have we paused?" state.
Eric S. Raymond [Thu, 28 Sep 2006 09:19:16 +0000 (09:19 +0000)]
Get rid of obnoxious visible "have we paused?" state.

This change shouldn't make any behavioral difference, but it
simplifies the call sequence and code of a couple of functions.

17 years agoChange some ugly and misleading names.
Eric S. Raymond [Thu, 28 Sep 2006 08:20:52 +0000 (08:20 +0000)]
Change some ugly and misleading names.

17 years agoClean up nasty FORTRAN-style if statements.
Eric S. Raymond [Thu, 28 Sep 2006 08:01:45 +0000 (08:01 +0000)]
Clean up nasty FORTRAN-style if statements.

E.g., with the body on the same line as the guard.  They're bad style
and make the code hard to read, and I got fed up,

17 years agoParallel cleanups in the C and scratch Python code.
Eric S. Raymond [Wed, 27 Sep 2006 21:46:35 +0000 (21:46 +0000)]
Parallel cleanups in the C and scratch Python code.

17 years agobugfix in fry() and translation
Stas Sergeev [Wed, 27 Sep 2006 16:27:49 +0000 (16:27 +0000)]
bugfix in fry() and translation

17 years agobetter fix for is_valid()
Stas Sergeev [Tue, 26 Sep 2006 17:46:57 +0000 (17:46 +0000)]
better fix for is_valid()

17 years agoYet another rollup patch.
Stas Sergeev [Tue, 26 Sep 2006 17:27:51 +0000 (17:27 +0000)]
Yet another rollup patch.

- proper localization of dreprt()
- fixed preport() which didn't work at all
- fixed a nasty bug in photon() which caused a misfired torpedo to proceed
- fixed a very nasty bug in is_valid()
- many translation fixes

17 years agofew assorted adjustments and a fix for #8883
Stas Sergeev [Mon, 25 Sep 2006 16:53:11 +0000 (16:53 +0000)]
few assorted adjustments and a fix for #8883

17 years agofix makehelp.py invocation
Stas Sergeev [Sun, 24 Sep 2006 14:20:15 +0000 (14:20 +0000)]
fix makehelp.py invocation

17 years agoTrial Python now incorporates ai.c
Eric S. Raymond [Sun, 24 Sep 2006 11:04:28 +0000 (11:04 +0000)]
Trial Python now incorporates ai.c

17 years agoAnother rollup patch.
Stas Sergeev [Fri, 22 Sep 2006 17:09:23 +0000 (17:09 +0000)]
Another rollup patch.

- use ARRAY_SIZE
- cleaned up srscan()
- introduced a separate ncurses window for status
- removed completed TODO entries
- fixed SIGSEGV in tty mode when env LINES is undefined (always!)
- made "Please enter password" message visible
- made the above message to appear for OPTION_PLAIN instead of !OPTION_CURSES
- killed enqueue()
- localized status() (added helper prstat() )
- enabled gcc to check the format arguments, which uncovered a lot of
  the real bugs!
- fixed the bugs uncovered by the gcc format checking (the last one in
  ai.c is left for Eric :)
- fixed problem with skip(): it relied on "linecount", but "linecount"
  doesn't increment when you enter the multiline answers, like, for example,
  the torpedo courses. The fix works only in curses mode though - no idea
  how to fix this for tty.
- localized prouts(), however, not very cleanly. Any help is appreciated,
  see the added comments.

17 years agoBeginning of experimental Python translation.
Eric S. Raymond [Fri, 22 Sep 2006 16:18:30 +0000 (16:18 +0000)]
Beginning of experimental Python translation.

The initial file is definitions corresponding to sst.h.

17 years agoAdded appending on development timeline.
Eric S. Raymond [Fri, 22 Sep 2006 14:11:43 +0000 (14:11 +0000)]
Added appending on development timeline.

17 years agoAbstract away the operations involving a sentinel value for coordinates.
Eric S. Raymond [Fri, 22 Sep 2006 11:38:54 +0000 (11:38 +0000)]
Abstract away the operations involving a sentinel value for coordinates.

Besides making the code more readable, the sentinel may change someday
if we go zero-origin everywhere.

17 years agoMake the "crystals' member into an enumeration.
Eric S. Raymond [Thu, 21 Sep 2006 18:16:38 +0000 (18:16 +0000)]
Make the "crystals' member into an enumeration.

Also, add explanatory comments to the attack code.  Remove some redundant
logic to push you out of dock on an attack.

17 years agoMore applications of same().
Eric S. Raymond [Thu, 21 Sep 2006 10:47:26 +0000 (10:47 +0000)]
More applications of same().

17 years agoGet rid of obnoxious iattak global.
Eric S. Raymond [Wed, 20 Sep 2006 21:18:05 +0000 (21:18 +0000)]
Get rid of obnoxious iattak global.

This was a kluge to prevent recursion through an infinit regress of
moves leading to exit attacks forcing moves, etc.

17 years agoOn Stas Sergeev's suggestion, change where the logfile is written.
Eric S. Raymond [Wed, 20 Sep 2006 20:50:53 +0000 (20:50 +0000)]
On Stas Sergeev's suggestion, change where the logfile is written.

17 years agoallow gcc to still do the bounds checking
Stas Sergeev [Wed, 20 Sep 2006 19:00:34 +0000 (19:00 +0000)]
allow gcc to still do the bounds checking

17 years agoClean up some boolean arguments.
Eric S. Raymond [Wed, 20 Sep 2006 18:10:28 +0000 (18:10 +0000)]
Clean up some boolean arguments.

17 years agoand this gettextized in while I was resolving the rejects...
Stas Sergeev [Wed, 20 Sep 2006 17:02:59 +0000 (17:02 +0000)]
and this gettextized in while I was resolving the rejects...

17 years agothis gettextized by mistake
Stas Sergeev [Wed, 20 Sep 2006 16:51:13 +0000 (16:51 +0000)]
this gettextized by mistake

17 years agoRollup patch.
Stas Sergeev [Wed, 20 Sep 2006 16:42:35 +0000 (16:42 +0000)]
Rollup patch.

- completed the first pass on the gettextization and translation
- better (IMHO) fix for the initialization of the gettextized string arrays
- do not clearscreen on exit to leave the "Galaxy Bird" message visible
- implemented scroll-pausing for "help"
- fixed enqueue() which didn't always work
- added IHW to cramen()

17 years agoIncorporate BSD-Trek visual-scan code, just in case.
Eric S. Raymond [Wed, 20 Sep 2006 16:29:48 +0000 (16:29 +0000)]
Incorporate BSD-Trek visual-scan code, just in case.

17 years agoChase more booleans and enums.
Eric S. Raymond [Wed, 20 Sep 2006 15:47:19 +0000 (15:47 +0000)]
Chase more booleans and enums.

17 years agoA bit of documentation swiped and edited from the BSD code.
Eric S. Raymond [Wed, 20 Sep 2006 09:45:17 +0000 (09:45 +0000)]
A bit of documentation swiped and edited from the BSD code.

17 years agoBSD-Trek-like critical hits with weighting.
Eric S. Raymond [Wed, 20 Sep 2006 08:55:41 +0000 (08:55 +0000)]
BSD-Trek-like critical hits with weighting.

17 years agoReplace more #defines with enums.
Eric S. Raymond [Wed, 20 Sep 2006 06:25:57 +0000 (06:25 +0000)]
Replace more #defines with enums.

17 years agoChange the condition field from an uint with #defines to an enum.
Eric S. Raymond [Wed, 20 Sep 2006 05:31:21 +0000 (05:31 +0000)]
Change the condition field from an uint with #defines to an enum.

17 years agoMore boolean-chasing and coord applications.
Eric S. Raymond [Wed, 20 Sep 2006 05:18:07 +0000 (05:18 +0000)]
More boolean-chasing and coord applications.

17 years agoStill more application of coord type.
Eric S. Raymond [Wed, 20 Sep 2006 04:35:23 +0000 (04:35 +0000)]
Still more application of coord type.

17 years agoMore uses of distance() macro. Eliminate some magic numbers.
Eric S. Raymond [Wed, 20 Sep 2006 03:57:04 +0000 (03:57 +0000)]
More uses of distance() macro. Eliminate some magic numbers.

17 years agoMore boolean cleanups. More consistent use of coord type
Eric S. Raymond [Wed, 20 Sep 2006 03:26:16 +0000 (03:26 +0000)]
More boolean cleanups.  More consistent use of coord type

Anong other things, this allows us to write a distance() macro and get
rid of a lot of gnarly expressions.

17 years agoClean up more booleans.
Eric S. Raymond [Tue, 19 Sep 2006 23:56:55 +0000 (23:56 +0000)]
Clean up more booleans.

17 years agoClean up the rather nasty logoc of snova(), and fix a minor navigation bug.
Eric S. Raymond [Tue, 19 Sep 2006 23:09:39 +0000 (23:09 +0000)]
Clean up the rather nasty logoc of snova(), and fix a minor navigation bug.

...(inability to select manual mode) introduced by a recent commit.

17 years agoMore boolean cleanups and explanator comments.
Eric S. Raymond [Tue, 19 Sep 2006 22:03:07 +0000 (22:03 +0000)]
More boolean cleanups and explanator comments.

17 years agoMore type cleanup and explanatory comments.
Eric S. Raymond [Tue, 19 Sep 2006 21:30:15 +0000 (21:30 +0000)]
More type cleanup and explanatory comments.

17 years agoMore type cleanup.
Eric S. Raymond [Tue, 19 Sep 2006 21:00:29 +0000 (21:00 +0000)]
More type cleanup.

17 years agoMore boolean cleanups.
Eric S. Raymond [Tue, 19 Sep 2006 19:35:24 +0000 (19:35 +0000)]
More boolean cleanups.

17 years agoAvoid a nasty bug in planet-name display, and fix another boolean.
Eric S. Raymond [Tue, 19 Sep 2006 19:20:43 +0000 (19:20 +0000)]
Avoid a nasty bug in planet-name display, and fix another boolean.

17 years agoMore BSD features.
Eric S. Raymond [Tue, 19 Sep 2006 19:04:35 +0000 (19:04 +0000)]
More BSD features.

You can now lose if your entire crew dies in battle.  When abandoning
ship in a game with inhabited worlds enabled, they must have one in
the quadrant to beam down to; otherwise they die in space and this
counts heavily against your score (BSD Trek had score adjustment as a
to-do).  Docking at a starbase replenishes your crew.

17 years agomore gettextizing and translating
Stas Sergeev [Tue, 19 Sep 2006 18:44:07 +0000 (18:44 +0000)]
more gettextizing and translating

17 years agoAbstract out damage checks.
Eric S. Raymond [Tue, 19 Sep 2006 18:13:35 +0000 (18:13 +0000)]
Abstract out damage checks.

Implement BSD-Trek check in abandon-ship routine that transporter is
operational and an inhabited planet is nearby before crew can beam
down, otherwise they die in space.  (But this isn't counted against
your score yet.)

17 years agoKlingon ship births are working.
Eric S. Raymond [Tue, 19 Sep 2006 10:14:04 +0000 (10:14 +0000)]
Klingon ship births are working.

17 years agoMore booleans cleanup.
Eric S. Raymond [Tue, 19 Sep 2006 09:19:41 +0000 (09:19 +0000)]
More booleans cleanup.

17 years agoFDISTR/FENSLV/FREPRO sequence looks like it's working.
Eric S. Raymond [Tue, 19 Sep 2006 08:56:52 +0000 (08:56 +0000)]
FDISTR/FENSLV/FREPRO sequence looks like it's working.

17 years agoFix two minor bugs, one in the shove code and one in debugme().
Eric S. Raymond [Tue, 19 Sep 2006 08:28:19 +0000 (08:28 +0000)]
Fix two minor bugs, one in the shove code and one in debugme().

17 years agoImprovements to the testing machinery, including the replay option.
Eric S. Raymond [Tue, 19 Sep 2006 08:05:42 +0000 (08:05 +0000)]
Improvements to the testing machinery, including the replay option.

17 years agoImprove the world list.
Eric S. Raymond [Tue, 19 Sep 2006 08:01:27 +0000 (08:01 +0000)]
Improve the world list.

17 years agoMore int-to-boolean cleanup. Make the FDISTR event work.
Eric S. Raymond [Tue, 19 Sep 2006 06:27:07 +0000 (06:27 +0000)]
More int-to-boolean cleanup.  Make the FDISTR event work.

17 years agoCheckpoint with several changes, committed so Stas can play with debug code.
Eric S. Raymond [Mon, 18 Sep 2006 19:38:35 +0000 (19:38 +0000)]
Checkpoint with several changes, committed so Stas can play with debug code.

1. Change planet member of quadrant struct back to integer so it can be saved.
2. Add code for torpedoing an inhabited world.  Score drops by 400 when you
   do that, it's the only outcome worse than being killed.
3. Events are now structures and can hold quadrant coordinates.
4. EXPERIMENTAL tag is gone, code for BSD-Trek events is in good enough
   shape to test now.
5. User input is always logged.
6. SEED command is implemented.

17 years agoInput capture to 'sst-input.log' now happens automatically when idebug is on.
Eric S. Raymond [Mon, 18 Sep 2006 08:34:16 +0000 (08:34 +0000)]
Input capture to 'sst-input.log' now happens automatically when idebug is on.

17 years agoNew debug-mode support.
Eric S. Raymond [Mon, 18 Sep 2006 08:18:50 +0000 (08:18 +0000)]
New debug-mode support.

Get rid of DEBUG, the instrumentation is cheap and we want to cut down
on the possibilities for unanticipated logic changes due to
configuration vagaries.  Take the debugging bit out of the game
structure.  Start on the logger.

17 years agoRevert an incorrect bool type change.
Eric S. Raymond [Mon, 18 Sep 2006 08:05:56 +0000 (08:05 +0000)]
Revert an incorrect bool type change.

17 years agoMore type cleanup.
Eric S. Raymond [Mon, 18 Sep 2006 05:16:40 +0000 (05:16 +0000)]
More type cleanup.

Use stdbool facility from C99 so code checkers can do type-consistency
analysis.

17 years agoIntroduce 'coord' data structure, an (x,y) tuple.
Eric S. Raymond [Mon, 18 Sep 2006 03:49:33 +0000 (03:49 +0000)]
Introduce 'coord' data structure, an (x,y) tuple.

Use it consistently in both data structures and arguments of functions
that handle coordinates.

The main benefit of this is that lots of conditional expressions become
significantly less gnarly.  We get a bit of reduction in the line count
by cutting down on pairs of coordinate assignments.

17 years agoAbstract all references to the future array (outside of events.c) away.
Eric S. Raymond [Sun, 17 Sep 2006 23:55:46 +0000 (23:55 +0000)]
Abstract all references to the future array (outside of events.c) away.

This has two benefits:

1. New code is easier to read.
2. It prepares us for implementing stateful events with a different
underlying data structure.  We'll need this for some BSD-Trek features.

17 years agoOther half of eta-check fix.
Eric S. Raymond [Sun, 17 Sep 2006 22:43:51 +0000 (22:43 +0000)]
Other half of eta-check fix.

17 years agoFix what look like a longstanding bug in ETA computation.
Eric S. Raymond [Sun, 17 Sep 2006 21:51:30 +0000 (21:51 +0000)]
Fix what look like a longstanding bug in ETA computation.

17 years agoremove autogenerated files
Stas Sergeev [Sun, 17 Sep 2006 09:01:35 +0000 (09:01 +0000)]
remove autogenerated files

17 years agoComplete the change to BSD license.
Eric S. Raymond [Sun, 17 Sep 2006 05:31:52 +0000 (05:31 +0000)]
Complete the change to BSD license.

17 years agoFirst checkin of experimental event code for the BSDTrek-style Klingons.
Eric S. Raymond [Sun, 17 Sep 2006 05:14:52 +0000 (05:14 +0000)]
First checkin of experimental event code for the BSDTrek-style Klingons.

E.g the attacks on inhabited systems.  Currently #ifdefed out; the
only operative change is the newkling() function and a bit of
data-structure cleanup.

17 years agoFix a minor bug in -t mode display of the starchart.
Eric S. Raymond [Sun, 17 Sep 2006 00:52:17 +0000 (00:52 +0000)]
Fix a minor bug in -t mode display of the starchart.

17 years agoAdded more history.
Eric S. Raymond [Sun, 17 Sep 2006 00:48:26 +0000 (00:48 +0000)]
Added more history.

17 years agogettextize and some rough translations
Stas Sergeev [Sat, 16 Sep 2006 18:47:55 +0000 (18:47 +0000)]
gettextize and some rough translations

17 years agoMake inhabited worlds display as '@'. Document this.
Eric S. Raymond [Fri, 15 Sep 2006 22:47:09 +0000 (22:47 +0000)]
Make inhabited worlds display as '@'.  Document this.

Turn off generation of inhabited worlds in plain and almy versions.

17 years agoFixed some bug items from the TO-DO list.
Eric S. Raymond [Fri, 15 Sep 2006 21:14:45 +0000 (21:14 +0000)]
Fixed some bug items from the TO-DO list.

* Bring the online help in sync with our commands changes

* Find out why the online help contains the escape sequences like ~@~T (Eric?)

The first was due to bugs in some macro definitions in sst.c, now fixed.
The second was from escape sequences generated into sst.doc by xmlto
for left-and right-quotes, dashes, and no-break spaces; that is fixed
by an additional translation step in makehelp.py.

xmlto still generates line-drawing characters for the tables in the
LRSCAN and REPORT help items, but those look OK on an xterm in text
mode and their help items are suppressed (along with their commands) in
curses mode.

This is not a completely satisfactory solution, but it will do until a
design change makes those help items visible again.

17 years agoFixes the bug that was directing help lookups incorrectly.
Eric S. Raymond [Fri, 15 Sep 2006 20:58:05 +0000 (20:58 +0000)]
Fixes the bug that was directing help lookups incorrectly.

Renames the old "help()" function to "mayday()" to match the new command.
Fixes display bugs in curses due to generation of wacky quotes, nonbreak
spaces, and dashes.  Does not fix problems with forms-drawing characters.

17 years agoFix an extremely obscure bug in the help generation.
Eric S. Raymond [Fri, 15 Sep 2006 20:12:00 +0000 (20:12 +0000)]
Fix an extremely obscure bug in the help generation.

It was triggered by non-breaking space in xmlto output.

17 years ago% has to be mapped to %% when producing sst.doc
Eric S. Raymond [Fri, 15 Sep 2006 18:51:40 +0000 (18:51 +0000)]
% has to be mapped to %% when producing sst.doc

...otherwise printf does unhelpful things.

17 years agoAdd inhabited planets.
Eric S. Raymond [Fri, 15 Sep 2006 18:41:16 +0000 (18:41 +0000)]
Add inhabited planets.

Presently this is just color, as they have no dilithium.  In the
future, this will become the basis for BSD-Trek like code that allows
Klingons to attack and enslave inhabited worlds in order to expand
their fleet.  (This feature is controlled by OPTION_WORLDS).

17 years agoClean up after macro elimination.
Eric S. Raymond [Fri, 15 Sep 2006 09:35:11 +0000 (09:35 +0000)]
Clean up after macro elimination.

17 years agoMore typo fixes.
Eric S. Raymond [Fri, 15 Sep 2006 07:43:44 +0000 (07:43 +0000)]
More typo fixes.

17 years agoTemporarily make this standalone.
Eric S. Raymond [Fri, 15 Sep 2006 01:55:24 +0000 (01:55 +0000)]
Temporarily make this standalone.

17 years agoDocument the problems with xio.c.
Eric S. Raymond [Thu, 14 Sep 2006 23:02:52 +0000 (23:02 +0000)]
Document the problems with xio.c.

17 years agoTypo fixes.
Eric S. Raymond [Thu, 14 Sep 2006 21:46:37 +0000 (21:46 +0000)]
Typo fixes.

17 years agoVarious declaration cleanups.
Eric S. Raymond [Thu, 14 Sep 2006 20:58:49 +0000 (20:58 +0000)]
Various declaration cleanups.

17 years agoEliminate nasty macro holdovers.
Eric S. Raymond [Thu, 14 Sep 2006 20:42:27 +0000 (20:42 +0000)]
Eliminate nasty macro holdovers.

All game structure members are now referred to by full name. Also, one
more minor step in making xio work.

17 years agoText append looks like it should work, but it core-dumps.
Eric S. Raymond [Thu, 14 Sep 2006 18:25:06 +0000 (18:25 +0000)]
Text append looks like it should work, but it core-dumps.

17 years agoMore settings into fallback.
Eric S. Raymond [Thu, 14 Sep 2006 18:01:40 +0000 (18:01 +0000)]
More settings into fallback.

17 years agoMake the text window editable.
Eric S. Raymond [Thu, 14 Sep 2006 08:55:38 +0000 (08:55 +0000)]
Make the text window editable.

17 years agoMove as much as possible into fallback resources.
Eric S. Raymond [Thu, 14 Sep 2006 04:27:44 +0000 (04:27 +0000)]
Move as much as possible into fallback resources.

17 years agoMergeed "Status" section into "Misc".
Eric S. Raymond [Thu, 14 Sep 2006 03:57:32 +0000 (03:57 +0000)]
Mergeed "Status" section into "Misc".

17 years agoWe know how to extract the button name within the callback.
Eric S. Raymond [Thu, 14 Sep 2006 02:58:40 +0000 (02:58 +0000)]
We know how to extract the button name within the callback.

17 years agoMore reasonably-sized windows.
Eric S. Raymond [Thu, 14 Sep 2006 02:39:28 +0000 (02:39 +0000)]
More reasonably-sized windows.

17 years agoGet rid of some ugly borders.
Eric S. Raymond [Wed, 13 Sep 2006 23:52:07 +0000 (23:52 +0000)]
Get rid of some ugly borders.

17 years agoSeparate widgets for each button group,
Eric S. Raymond [Wed, 13 Sep 2006 22:58:43 +0000 (22:58 +0000)]
Separate widgets for each button group,

17 years agoUse box class to get rid of bad reference.
Eric S. Raymond [Wed, 13 Sep 2006 22:40:39 +0000 (22:40 +0000)]
Use box class to get rid of bad reference.

17 years agoRemove some dead code.
Eric S. Raymond [Wed, 13 Sep 2006 20:24:26 +0000 (20:24 +0000)]
Remove some dead code.

17 years agoMultiple-button layout, but with some "Cannot convert string" messages.
Eric S. Raymond [Wed, 13 Sep 2006 19:45:48 +0000 (19:45 +0000)]
Multiple-button layout, but with some "Cannot convert string" messages.

17 years agoMore resources into fallback.
Eric S. Raymond [Wed, 13 Sep 2006 18:28:02 +0000 (18:28 +0000)]
More resources into fallback.

17 years agoMore buttons, and systematic use of fallback.
Eric S. Raymond [Wed, 13 Sep 2006 18:22:46 +0000 (18:22 +0000)]
More buttons, and systematic use of fallback.

17 years agoBegin moving resource declarations into the fallback.
Eric S. Raymond [Wed, 13 Sep 2006 18:05:53 +0000 (18:05 +0000)]
Begin moving resource declarations into the fallback.

17 years agoBeginnings of a button panel.
Eric S. Raymond [Wed, 13 Sep 2006 17:57:12 +0000 (17:57 +0000)]
Beginnings of a button panel.

17 years agoFix some decor files.
Eric S. Raymond [Wed, 13 Sep 2006 17:44:37 +0000 (17:44 +0000)]
Fix some decor files.

17 years agomove xio.c to src
Stas Sergeev [Wed, 13 Sep 2006 17:32:01 +0000 (17:32 +0000)]
move xio.c to src

17 years agoWidgets now stack vertically.
Eric S. Raymond [Wed, 13 Sep 2006 17:29:04 +0000 (17:29 +0000)]
Widgets now stack vertically.

17 years agomerge the autotools branch
Stas Sergeev [Wed, 13 Sep 2006 17:20:32 +0000 (17:20 +0000)]
merge the autotools branch

17 years agoClean up a warning.
Eric S. Raymond [Wed, 13 Sep 2006 17:20:21 +0000 (17:20 +0000)]
Clean up a warning.