Commit graph

40 commits

Author SHA1 Message Date
Eric S. Raymond
21adfe0807 More vocabulary handlers. 2017-06-09 02:12:59 -04:00
Eric S. Raymond
ee20cd0861 More action handlers. Use consistent VO order. 2017-06-08 16:18:21 -04:00
Eric S. Raymond
7abe1c1784 Remove one last goto from actions2.c 2017-06-08 09:21:45 -04:00
Peje Nilsson
2ae280befb De-gotoified actions2.c functions. 2017-06-08 09:13:34 -04:00
Peje Nilsson
da76563f40 De-gotoize throw(). 2017-06-08 09:09:48 -04:00
Eric S. Raymond
46cd836df0 Abolish funcs.h. 2017-06-08 04:25:20 -04:00
Eric S. Raymond
b29678956e Localize K in fill(). 2017-06-08 03:12:07 -04:00
Eric S. Raymond
7e4753b23a De-gotoify feed(). 2017-06-08 03:03:00 -04:00
Eric S. Raymond
764ed291af Goto removal in actions2.c. 2017-06-08 02:33:03 -04:00
Eric S. Raymond
430b8e7d53 De-gotoify fill(). 2017-06-08 01:57:12 -04:00
Eric S. Raymond
57104237ed Narrow the scope of VERB. 2017-06-07 09:39:04 -04:00
Eric S. Raymond
f01cb89a76 Complete OBJ localization in actions2.c 2017-06-07 08:48:12 -04:00
Eric S. Raymond
df83a345a2 Continuing OBJ localization. 2017-06-07 08:41:46 -04:00
Eric S. Raymond
8f661598bc Yet more OBJ localization. 2017-06-07 08:39:12 -04:00
Eric S. Raymond
3079ebda95 Yet more OBJ localization. 2017-06-07 08:34:42 -04:00
Eric S. Raymond
f20b7f56fd Localize OBJ in throw(). 2017-06-07 08:32:06 -04:00
Eric S. Raymond
a5cef5208f Begin localizing OBJ. 2017-06-07 08:29:30 -04:00
Eric S. Raymond
4fe6286cc6 LOC pulled into game structure block. 2017-06-07 07:50:09 -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
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
07c0020a7a First step in game state encapsulation: the dwarf & pirate locations. 2017-06-06 21:34:11 -04:00
Eric S. Raymond
3b8122ae3a Magic-number elimination. 2017-06-06 21:06:16 -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
00c0da471d Translate some loops out of FORTRAN. 2017-06-06 09:55:30 -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
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
f72141fbe3 More structurization. 2017-05-23 20:59:21 -04:00
Eric S. Raymond
c3add5c206 More global-to-structure moves. 2017-05-23 20:22:35 -04:00
Eric S. Raymond
42189d79d7 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-05-23 18:47:04 -04:00
Eric S. Raymond
dc9d9e467b Input source is parametrized all the way down.
This means that, potentially, do_command() could be called on any text file
pointer and the right thing would happen.
2017-05-23 15:57:38 -04:00
Eric S. Raymond
f89f63c6d1 Fix capitalization glitches. 2017-05-23 09:18:28 -04:00
Eric S. Raymond
040f19adde Fix strange inside-out organization of the input routines.
Seems to have nbben a result of FORTRAN not having anything like a
stream object that can be passed around.

A step towards logging and log replay.
2017-05-22 21:26:14 -04:00
Eric S. Raymond
18767d52dd Fix up case on all comments to make them more readable. No code changes.
The all-capsing was a FORTRAN remnant.Also, we change a few FORTRANisms
so they are less confusing in this C context; ".TRUE." and ".FALSE." become
"true" and "false", "MOD" is mapped to % in places tha t are like C expressions
and (usually) "modulo" in places that aren't.
2017-05-21 13:12:24 -04:00
Eric S. Raymond
b38c11abef Use prototypes and bools. 2017-05-18 09:06:32 -04:00
Eric S. Raymond
c9e9b64575 Partially ANSIfy C, fix compiler warnings. 2017-05-18 08:55:38 -04:00
Eric S. Raymond
24d7aeaf8a Don Wood's 430-point Adventure 2.5 from 1995, from rec.games.int-fiction. 2017-02-16 11:59:50 -05:00