Eric S. Raymond
dad1df9796
Localize KK.
2017-06-07 10:23:06 -04:00
Eric S. Raymond
8d90b03ee4
Fully localize VERB.
2017-06-07 10:06:14 -04:00
Eric S. Raymond
0e3456069f
Further narrow the scope of VERB.
2017-06-07 09:57:23 -04:00
Eric S. Raymond
cc618146e8
Localize a variable.
2017-06-07 09:46:25 -04:00
Eric S. Raymond
b2c85b36f8
OBJ is completely localized.
2017-06-07 09:03:14 -04:00
Eric S. Raymond
aba35733e7
OBJ has become local in actions1.c and diesn't have to be saved.
2017-06-07 08:59:50 -04:00
Eric S. Raymond
4fe6286cc6
LOC pulled into game structure block.
2017-06-07 07:50:09 -04:00
Eric S. Raymond
a38b61638c
Global LL becomes local to command interpreter toplevel...
...
...and doesn't have to be saved.
2017-06-07 07:30:56 -04:00
Eric S. Raymond
2d95c3f4f5
Finish moving state arrays into game structure block.
2017-06-07 07:10:07 -04:00
Eric S. Raymond
0b02763bf0
More collecting of globals.
2017-06-07 06:38:40 -04:00
Eric S. Raymond
c1f1f2f79f
Magic-number cleanup.
2017-06-07 06:24:18 -04:00
Eric S. Raymond
7f4cff1188
Bring SETUP variable into game state block
...
Saved separately because the kogic around this variable looks
a bit dubious and may need review.
2017-06-07 05:24:48 -04:00
Eric S. Raymond
dda636bbc1
Pull more globals into the game state block.
2017-06-07 05:10:20 -04:00
Eric S. Raymond
91ad0185ff
Move more globals into the game state block.
2017-06-07 01:12:49 -04:00
Eric S. Raymond
62ee15c892
Pack more globals into the game block structure.
2017-06-07 00:41:51 -04:00
Eric S. Raymond
bb78ca96ce
Capture clock variables into the game-state block.
2017-06-07 00:15:31 -04:00
Eric S. Raymond
ab04fe4d41
More more globals into the game state block.
2017-06-06 21:46:17 -04:00
Eric S. Raymond
07c0020a7a
First step in game state encapsulation: the dwarf & pirate locations.
2017-06-06 21:34:11 -04:00
Eric S. Raymond
e4f8218d9c
Gotoectomy+.
2017-06-06 20:32:00 -04:00
Eric S. Raymond
d8e8bc8e89
Gotoectomy.
2017-06-06 20:01:01 -04:00
Eric S. Raymond
978168523a
Magic-number elimination.
2017-06-06 11:12:00 -04:00
Eric S. Raymond
fd10d380df
Abstract out NOBJECTS (formerly magic number 100).
2017-06-06 10:44:25 -04:00
Eric S. Raymond
4d6078d8a8
Replace homebrew IABS() with C kubrary labs(3).
2017-06-06 09:21:46 -04:00
Eric S. Raymond
d402e09411
Header consolidation - main.h, misc.h, and share.h merge to advent.h.
...
For a project this small size with a small type ontology, it's better
C style to have one header where all the assumptions about types and
structures are immediately visible.
This is a first step towards turning all that global state into a handful
of structures - probably just two, one saveable as a binary game state.
2017-06-02 15:06:33 -04:00
Michael Jarvis
40ccd3d80d
use char, not signed char
2017-06-01 17:45:29 -05:00
Jason S. Ninneman
c9ba5831c9
Remove erroneous comment about PRNG usage.
2017-05-30 17:19:01 -07:00
Eric S. Raymond
6a6670e3ca
Fix things so seed doesn't cost clock time.
2017-05-30 20:08:55 -04:00
Jason S. Ninneman
71fcc814f8
Launder seed generation through rand() to ensure seed diversity.
...
This doesn't affect reproducibility because a) the seed value written to logs is the output of this process, and b) the argument to the seed command *doesn't* get laundered.
2017-05-30 14:58:55 -07:00
Jason S. Ninneman
fda1abed97
Remove an obfuscation scheme for the reservoir magic word.
2017-05-29 13:34:34 -07:00
Jason S. Ninneman
519d8f07e6
Really mean it about strict C99 compliance.
2017-05-29 09:30:37 -07:00
Eric S. Raymond
5ae76995d2
Simplify build: nested makefiles considered harmful.
2017-05-29 01:33:59 -04:00
Jason S. Ninneman
f0528b0ded
Move database compilation out into its own tool (for now).
2017-05-28 21:46:54 -07:00
Jason S. Ninneman
d6b59a1c12
Apply further polish and add in a couple of missing size variables.
2017-05-28 17:21:04 -07:00
Jason S. Ninneman
df46df6979
Factor out handling of variables populated from the database.
...
This reorganization is a first step toward handling database compilation separately.
2017-05-28 15:42:05 -07:00
Jason S. Ninneman
f9eca41f3a
Ensure the ZZZZ magic word is reproducible.
...
This happens by making the SEED command also regenerate the magic word.
2017-05-26 16:34:16 -07:00
Eric S. Raymond
5c4fdc35eb
Flush log on interrupt, just for convenience.
2017-05-26 07:22:24 -04:00
Eric S. Raymond
7763e1aa22
Repeatable seeding is working.
2017-05-25 18:52:39 -04:00
Eric S. Raymond
79ef3e38c2
Implement fallback handler that looks at the raw command buffer.
...
With database cinpilation not broken this time...
2017-05-25 18:21:38 -04:00
Eric S. Raymond
6ba9a7de7f
Once again, take srand()/random() out of the initialization chain.
...
They have exactly the wrong kind of randomness for this job - not
returning consistent sequences across different platforms or C library
versions, and because pseodorandom not really better than sampling
the clock.
2017-05-24 23:36:25 -04:00
Eric S. Raymond
3a2c0ca199
Reapply "Clean up logic for exiting input loop and scoring."
2017-05-24 22:51:36 -04:00
Jason S. Ninneman
ba1369310d
Remove disused label.
2017-05-24 15:43:34 -07:00
Eric S. Raymond
31837249f8
Revert SEED handling and comment orocessing. It broke database compilation.
...
This code is remarkably like the game it implements - a maze of twisty
little FORTRANisms, all alike. Very easy to get lost.
2017-05-24 18:24:09 -04:00
Eric S. Raymond
c703bd78d9
Clean up logic for exiting input loop and scoring.
2017-05-24 11:16:59 -04:00
Eric S. Raymond
cf219e920b
Seed command fully implemented but apparently buggy.
...
Dwarf appearance is not yet reproducible.
2017-05-24 09:06:41 -04:00
Eric S. Raymond
65c081a0ac
Implement stub handler for SEED command. Not hooked up to PRNG yet.
2017-05-24 08:30:06 -04:00
Jason S. Ninneman
8a8770375e
Add seedable PRNG using an adaptation the original LCG algorithm.
2017-05-23 23:37:56 -07:00
Eric S. Raymond
484ca4e9fd
Revert structurization changes, they broke database compilation...
...
...bug showing only if adventure.data was absent. We'll need to sneak up
on this more carefully.
2017-05-24 00:17:19 -04:00
Eric S. Raymond
f9eb6383f1
Revert a variable name previously changed to be out of the way.
...
Also, make output from replays easier to interpret by adding prompts.
2017-05-23 22:29:24 -04:00
Eric S. Raymond
f72141fbe3
More structurization.
2017-05-23 20:59:21 -04:00
Eric S. Raymond
f68f3a1205
More globals to the game structure.
2017-05-23 20:34:53 -04:00