Commit graph

17 commits

Author SHA1 Message Date
Michael Jarvis
505d7233ec use char, not signed char 2017-06-13 20:43:43 +03:00
Jason S. Ninneman
e281f895d4 Factor out handling of variables populated from the database.
This reorganization is a first step toward handling database compilation separately.
2017-06-13 20:43:41 +03:00
Eric S. Raymond
ff467f276b Implement fallback handler that looks at the raw command buffer.
With database cinpilation not broken this time...
2017-06-13 20:43:41 +03:00
Eric S. Raymond
06795f691f 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-06-13 20:43:41 +03:00
Eric S. Raymond
1c4150055a Implement stub handler for SEED command. Not hooked up to PRNG yet. 2017-06-13 20:43:40 +03:00
Jason S. Ninneman
24f327cc09 Add seedable PRNG using an adaptation the original LCG algorithm. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
aa7e291bc6 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-06-13 20:43:40 +03:00
Eric S. Raymond
ba7561a27a More structurization. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
bef99090db More globals to the game structure. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
4f0e04404e More global-to-structure moves. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
cb477da7ec Move more globals into the state structure. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
91bfd55c1c Begin gathering saveable game state into a structure. Not yet complete.
No logic changes.  A bunch of globals turn into fields (with the same names
except for lowercasing) in struct game_t.

Eventually this will allow drastic simplification of the save/load logic.
2017-06-13 20:43:40 +03:00
Eric S. Raymond
0ad8d13f27 Added oldstyle option. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
0eda56fae9 Add -l option to enable command logging. 2017-06-13 20:43:40 +03:00
Eric S. Raymond
7f91b85809 More magic-number elimination. 2017-06-13 20:43:39 +03:00
Eric S. Raymond
afddd9b263 Partially ANSIfy C, fix compiler warnings. 2017-06-13 20:43:39 +03:00
Eric S. Raymond
f16343f8dc Don Wood's 430-point Adventure 2.5 from 1995, from rec.games.int-fiction. 2017-06-13 20:43:39 +03:00