Jason S. Ninneman
1173a9a265
Use a header/source set common to both advent and the dungeon builder.
2017-06-10 13:37:26 -07:00
Eric S. Raymond
e6f183ba7f
Use C idioms for increment/decrement.
2017-06-10 12:38:40 -04:00
Eric S. Raymond
3af993abca
Isolate the grotty save/resume code. Most of it will soon go away.
2017-06-10 05:38:47 -04:00
Eric S. Raymond
4c5474121f
Unbreak the tests.
...
linenoise doesn't eco its prompt to stdout, which messed them up.
2017-06-10 05:35:35 -04:00
Eric S. Raymond
63e971fc4c
Enable input editing with the linenoise library.
2017-06-10 05:11:29 -04:00
Eric S. Raymond
037f1df7dd
Change NAPLIN signature - prepration for linenoise.
2017-06-10 01:42:53 -04:00
Jason S. Ninneman
bea58f2682
Render the ascii<->advent character code mappings to lookup tables.
2017-06-09 09:16:35 -07:00
Eric S. Raymond
db8dc40b84
Abolish a silly layer of macros.
2017-06-09 11:36:49 -04:00
John Boyle
c8a2312755
Correct the definition of SETBIT.
...
The semantics were first changed in aef60929
(technically broken
in that commit as well). Luckily, it seems not to be used much.
2017-06-08 22:50:48 -04:00
Eric S. Raymond
46cd836df0
Abolish funcs.h.
2017-06-08 04:25:20 -04:00
Jason S. Ninneman
7e1ef875fc
Use linenoise to get the save file name.
2017-06-08 00:15:03 -07:00
Eric S. Raymond
a418ebb38c
misc.c is goto-free.
2017-06-08 01:35:50 -04:00
Eric S. Raymond
3425c712c7
Yet more gotoectomy.
2017-06-07 22:59:55 -04:00
Eric S. Raymond
680788eb97
The continuing cleanup of misc.c
2017-06-07 22:34:06 -04:00
Eric S. Raymond
ff36dff18f
Attempt to repair GitLab build breakage.
2017-06-07 21:26:45 -04:00
Eric S. Raymond
a45f297dc7
Still more gotoectomy.
2017-06-07 19:22:41 -04:00
Eric S. Raymond
19b3ac4ccd
More goto removal.
2017-06-07 19:10:39 -04:00
Eric S. Raymond
da5976dc8c
More goto elimination in misc.c
2017-06-07 18:34:08 -04:00
Eric S. Raymond
7fa8757ad4
More misc.c cleanup.
2017-06-07 18:00:12 -04:00
Eric S. Raymond
beac8d7f41
Continuing cleanup of misc.c.
2017-06-07 16:39:59 -04:00
Eric S. Raymond
1d3a087c39
Partial misc.c gotoectomy.
2017-06-07 16:30:51 -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
c68b92d9da
More magic-number elimination, and some information hiding.
2017-06-07 00:05:03 -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
4e1ab63322
Semantic types.
2017-06-06 18:22:24 -04:00
Eric S. Raymond
19553e69fc
Goto elimination.
2017-06-06 14:41:03 -04:00
Eric S. Raymond
c1ee521f73
Begin to split undifferentiated longs into semantic types.
2017-06-06 14:28:27 -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
1445c7ebcc
MAPLIN is no longer called during setup phase.
2017-06-06 07:52:07 -04:00
Jason S. Ninneman
3a1a3eb774
Actually return a value from SETBIT().
2017-06-04 09:47:49 -07:00
Jason S. Ninneman
83048ee832
Remove a disused function, thereby upping the code coverage.
2017-06-04 08:58:43 -07:00
Jason S. Ninneman
4babd6d058
Rescope and retype a variable.
2017-06-03 11:30:56 -07:00
Jason S. Ninneman
ab46b5261b
Make GETTXT() a bit closer to actual C.
2017-06-03 11:30:56 -07:00
Eric S. Raymond
aef609291d
Simplify bitmask test/set from FORTRANish to actual C.
2017-06-02 16:40:29 -04:00
Eric S. Raymond
63f53c026d
Macro elimination - easy cases first. No logic changes.
2017-06-02 16:20:40 -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
44c444d638
added braces around initialization of subobjects for clarity
2017-06-02 08:44:40 -04:00
Michael Jarvis
092f478790
Cast size_t to long to silence warning
2017-06-02 08:44:40 -04:00
Jason S. Ninneman
650575394f
Fix a bug in RNDVOC() that prevented the reservoir magic word for working.
...
To do this, I first had to refactor the code into proper C, just so I could understand it. Then I found another layer of encryption around the value itself. Finally, I discovered that the line to actually set the new magic word was placed such that it was using a global index instead of the local one.
2017-05-29 14:22:52 -07:00
Jason S. Ninneman
18eac9f55d
Make RNDVOC() into better C.
2017-05-29 13:59:06 -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
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