Eric S. Raymond
876fbb2f78
Prepare for sync with the issue #37 bugfix branch.
2018-11-14 11:52:55 -05:00
Eric S. Raymond
87452af448
Sync patch.
2018-11-14 11:43:38 -05:00
NHOrus
db2daf1da4
Type constants to prevent overflow
2017-09-12 08:18:17 +03:00
NHOrus
4e4c2e0198
Be consistent
2017-09-11 00:58:13 +03:00
NHOrus
9e2cb3c191
Put some of important parameters into fixed width signed integers
...
Massaged test files. Fixes issue #41
2017-09-11 00:58:13 +03:00
NHOrus
25424a01db
Verify bounds for linked lists
2017-08-24 13:47:57 +03:00
NHOrus
0fbd79b608
Reindentation
2017-08-13 15:56:07 +01:00
Eric S. Raymond
cf92b9d9d6
Remove duplicative phase code.
2017-08-03 15:51:39 -04:00
Jason S. Ninneman
24d102781c
Typedefify command_t; simplify code accordingly.
2017-08-03 08:29:46 -07:00
Jason S. Ninneman
5c30d6429f
Simplify command word handling.
2017-08-03 08:24:18 -07:00
Jason S. Ninneman
5c91ea3739
Encapsulate command words into their own struct.
2017-08-03 08:24:18 -07:00
Jason S. Ninneman
a15e7c9f91
Add command_word_t, for command words.
2017-08-03 08:16:19 -07:00
Jason S. Ninneman
0d3393ebee
Datatype definition for command word types.
2017-08-03 08:16:19 -07:00
Eric S. Raymond
a00229050a
Remove unused phase codes.
2017-08-01 19:26:29 -04:00
Aaron Traas
ca5374edc3
Modified action() to take take a copy of command rather than a pointer.
...
It should be safer now that we're not scribbling all over command in
action(), as it's closer to pure. Also fixed a bug in say.
2017-07-21 18:27:02 -04:00
Aaron Traas
e8a627f964
Specials excised from adventure.yaml
2017-07-21 17:15:23 -04:00
Aaron Traas
5337e00725
Fix to Gitlab issue #32 . Now SEED and WASTE are in adventure.yaml
...
NOTE: the tests are all updated because now, like every other action,
SEED and WASTE have a \n before their output, as they correctly use
SPEAK
2017-07-21 10:23:02 -04:00
Eric S. Raymond
ef236aea3b
More type hygiene.
2017-07-21 07:44:09 -04:00
Eric S. Raymond
a3c159660b
Comment cleanup, semantic types, information hiding.
2017-07-21 07:38:09 -04:00
Eric S. Raymond
609159ad6d
Abolish as many undifferentiated long variables as possible.
...
Simple counter become ints.
2017-07-20 18:49:08 -04:00
Eric S. Raymond
7c3f834bca
Full comments for all game structure members.
2017-07-20 18:24:57 -04:00
Eric S. Raymond
617f368673
Comment and structure cleanup.
2017-07-20 17:42:31 -04:00
Eric S. Raymond
51182c6bc9
More comment cleanup.
2017-07-20 17:25:03 -04:00
Eric S. Raymond
535d9e7964
Comment cleanup.
2017-07-20 17:25:03 -04:00
Aaron Traas
a167945e19
Information hiding - moved all of command input parsing to misc.c
...
get_command_input() is effectively an I/O function that takes raw input
and makes it into a command_t. With other I/O functions, it belongs in
misc.c.
This alos allowed me to make 4 other functions static, as they were only
called by get_command_input();
2017-07-20 16:02:54 -04:00
Eric S. Raymond
6fda3acbe6
Remove unused enum.
2017-07-20 13:46:42 -04:00
Eric S. Raymond
aa5870a92e
Some vocabulary lookup code can be hidden from main.c.
2017-07-20 10:38:59 -04:00
Eric S. Raymond
8bd947b54d
Last remnants of packing removed.
...
As a bonus, a bug in %S pluralization became obvious and was fixed.
2017-07-20 10:36:22 -04:00
Eric S. Raymond
2fca59d9fd
Information hiding.
2017-07-16 15:23:03 -04:00
Eric S. Raymond
9b585f40d8
Two coverage imprivenents, one by recognizing dead code.
2017-07-16 05:33:43 -04:00
Eric S. Raymond
d1e29319fa
Code cleanup.
2017-07-14 13:10:13 -04:00
NHOrus
3d2ba18355
Do not base endgame bonus on arbitrary messages
...
This may break save files, but doesn't, due to padding
2017-07-14 16:38:25 +03:00
NHOrus
03b2f1c86e
Removed unused code, reindented
2017-07-13 21:52:27 -04:00
Jason S. Ninneman
50efa22849
Express word type with an enum instead of magic numbers.
...
* Make a cleaner function for getting vocab metadata.
* Get rid of magic numbers.
* Purge get_vocab_id().
* Abolish the *_WORD() macros.
* Add FIXME comment on some ugliness.
2017-07-12 10:35:00 -07:00
Eric S. Raymond
4a4c113624
Prevent game from uttering solecisms about the "floor" when outside.
2017-07-12 00:19:16 -04:00
Aaron Traas
4d7858d333
Cleaned up do_command() a little
2017-07-10 17:21:09 -04:00
NHOrus
53b68161ff
Two more lines of coverage; more cleanup for macros
2017-07-09 20:25:28 +03:00
NHOrus
a3ffa2455b
№ and minor syntax correction
2017-07-08 21:00:26 +03:00
Eric S. Raymond
1cbc3d827b
Eliminate magic numbers from C side of condition handling.
2017-07-07 15:01:25 -04:00
NHOrus
8f5c262e6d
Semantic type for verb
2017-07-06 18:40:11 +03:00
NHOrus
de2b1894f2
obj_t in actions. And some more magical word removal
...
Also, reindented everything, as usual
2017-07-06 10:05:11 +03:00
Eric S. Raymond
73608b6307
Further infiltrare semantic types.
2017-07-05 16:55:16 -04:00
NHOrus
40ff648431
Moved state_change to misc.c to start using it in main.c, too
2017-07-05 20:23:34 +03:00
NHOrus
8613f0b3d9
Magic number elimination
...
Special state/locations for game.fixd object array
2017-07-05 07:56:36 +03:00
Eric S. Raymond
abf820bb5c
Magic-number elimination.
2017-07-04 14:40:10 -04:00
Eric S. Raymond
f37a413524
Magic-number elimination.
2017-07-04 14:15:20 -04:00
Eric S. Raymond
a8ac2f477a
Abstract out some state arithmetic.
2017-07-04 13:41:12 -04:00
NHOrus
294f2b8a6d
Removed magic from checks for liquids
2017-07-04 15:18:49 +03:00
Jason S. Ninneman
4f78dfea24
Begin replacing tests on strings with tests on vocab IDs.
2017-07-03 18:21:25 -07:00
Jason S. Ninneman
07e7b8131e
Upgrade get_vocab_id() to handle empty strings.
2017-07-03 18:08:04 -07:00