Eric S. Raymond
e5f9c4fbea
Use LOC_* constants for locations. Clean up some ARB_* constants.
2017-06-15 08:49:47 -04:00
Jason S. Ninneman
1322a347ae
Put the long and short location descriptions into a 'locations' data structure.
...
They're renamed 'small' and 'big' to avoid colliding with C reserved words.
2017-06-14 16:45:49 -07:00
Eric S. Raymond
a3c14ba077
Abolish setup check, there's no possibility of restart.
...
Note, this silently breaks old saves.
2017-06-13 10:20:15 -04:00
Jason S. Ninneman
15ff262d17
More retrofitting.
2017-06-11 15:42:25 -07:00
Eric S. Raymond
46cd836df0
Abolish funcs.h.
2017-06-08 04:25:20 -04:00
Eric S. Raymond
ed80d6dd2f
Move MAXDIE computation to dungeonmaker.
2017-06-07 15:33:22 -04:00
Eric S. Raymond
16d90e4c28
init.c is now real C.
2017-06-07 15:12:21 -04:00
Eric S. Raymond
78f606c879
Goto elimination.
2017-06-07 14:26:46 -04:00
Eric S. Raymond
14fee6b979
Eliminate globals.
2017-06-07 14:03:33 -04:00
Eric S. Raymond
2deb1b9f7f
Localize TK.
2017-06-07 10:38:18 -04:00
Eric S. Raymond
8a256a6e37
Narrow the scope of IGO.
2017-06-07 10:33:38 -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
461575ef4c
Bite the bullet - size siymbols have to be shared.
...
Otherwise we end up duplicating magic sizes and tey can drift apart.
2017-06-07 05:45:51 -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
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
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
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
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
2270c6ad12
Just say no to encrypting internal state.
2017-05-26 10:21:19 -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
c3add5c206
More global-to-structure moves.
2017-05-23 20:22:35 -04:00
Eric S. Raymond
fa1f859162
Move more globals into the state structure.
2017-05-23 19:40:34 -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
935d8b8e68
Added oldstyle option.
2017-05-23 11:28:56 -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
5286f6b3bd
Correct long-size bug that resulted in checksum error.
...
Idea thanks tp Max Ninneman.
2017-05-22 09:30:51 -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
17ad4891ee
More boolification.
...
Constants and formals have been converted, but not globals yet.
2017-05-18 17:28:18 -04:00
Eric S. Raymond
23f2dbe814
Replace fDATIME with ANSI/POSIX clock_gettime(). Rip out DOS/AMIGA shims.
...
The thinking here is that we simplify life by going pure ANSI/POSIX.
This is a text game. If it ever runs on anything but Unix again it's
almost certain to be on something like WSL that supplies a
POSIX-conformant text console.
2017-05-18 17:18:16 -04:00
Eric S. Raymond
b38c11abef
Use prototypes and bools.
2017-05-18 09:06:32 -04:00
Eric S. Raymond
50ab7b9d47
Minimal forward-port to modern C - just enough to get it to compile.
2017-02-16 13:14:57 -05: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