Eric S. Raymond
cf92b9d9d6
Remove duplicative phase code.
2017-08-03 15:51:39 -04:00
Eric S. Raymond
87c6d3fb1e
Canonicalize OV commands to VO form.
...
Allows us to get rid of some obscure logic that causes an unnecessary
word shift. One error message changes in a benign way.
2017-08-03 15:02:41 -04:00
Jason S. Ninneman
24d102781c
Typedefify command_t; simplify code accordingly.
2017-08-03 08:29:46 -07:00
Jason S. Ninneman
5c91ea3739
Encapsulate command words into their own struct.
2017-08-03 08:24:18 -07:00
Eric S. Raymond
e50f1b8a7b
Coverage repair.
2017-07-31 15:26:56 -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
5f28f95244
All specials are now actions. Builds correct outputs, more needs deleting.
2017-07-21 16:56:43 -04:00
Eric S. Raymond
80b2b9b356
Simplify seed and waste cpmands using %d in the YAML string.
2017-07-21 14:03:39 -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
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
342994376a
Address GitLab issue #28 : Advent hangs on some inputs
2017-07-20 12:24:02 -04:00
Eric S. Raymond
08f260c4d5
Fix Gitlab issue #30 : Say is broken.
2017-07-20 10:47:33 -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
08c40bc999
Eliminate last logic guard on a packed value.
2017-07-20 09:50:58 -04:00
Eric S. Raymond
29b8f5b142
Remove a packing call - word buffer is good enough.
2017-07-20 09:11:13 -04:00
Eric S. Raymond
4e01669e06
Remove special-case code that was inducing bugs.
2017-07-20 09:08:10 -04:00
Eric S. Raymond
52723acb72
Eliminate some uses of wd2 - tests can be done on raw2 buffer instead.
2017-07-20 07:09:20 -04:00
Jason S. Ninneman
8ac4a59a67
Tell the compiler not to warn about legitimate case fallthroughs.
2017-07-19 09:47:20 -07:00
Eric S. Raymond
9b5142af5a
De-FORTRANIZE some IDs.
2017-07-16 16:05:26 -04:00
NHOrus
614d9b34ad
Removed temporary variable for clarity; Upsized text buffer in fallback to maximum possible size
2017-07-16 16:07:23 +03:00
NHOrus
8d9c8e4d5c
Deal with more agressive gcov 7.1; Reindent
2017-07-16 16:00:19 +03:00
Eric S. Raymond
9eda1f424d
Apply state_change() to mirror object.
2017-07-16 05:08:03 -04:00
Eric S. Raymond
d1e29319fa
Code cleanup.
2017-07-14 13:10:13 -04:00
Jason S. Ninneman
e581c7741d
Replace some more wd? with id?.
2017-07-14 09:18:55 -07:00
Jason S. Ninneman
596a15457d
Dragon attack code no longer edits the command struct.
...
This also fixes a minor bug where refusing to attack the dragon
costs the player two turns instead of one.
2017-07-14 09:18:55 -07:00
Eric S. Raymond
66fba512a7
Partially address GitLab issue #27 : arbitrary_messages unreachable
2017-07-14 11:33:22 -04:00
NHOrus
7f18e66866
Refactored discard to concentrate bird-related things in one place
2017-07-14 16:38:25 +03:00
NHOrus
66ba9a0101
Refactored carry for clarity
2017-07-14 16:38:25 +03: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
49d9ef1bee
No spk remains in the code base
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
00cf2a9373
Comment polishing.
2017-07-11 04:15:57 -04:00
Eric S. Raymond
96950869c6
Reindent.
2017-07-11 03:26:00 -04:00
Eric S. Raymond
d9aadeedba
LCOV exclusuon correction - addresses issue #25 .
2017-07-10 23:04:22 -04:00
Eric S. Raymond
76c6ab4cfa
Tweak a coverage exclusion.
2017-07-10 14:57:55 -04:00
Eric S. Raymond
9a16382b12
Bear can't dies where it can be chained.
2017-07-10 12:49:45 -04:00
NHOrus
53cb12b4d0
Bound the sizes of strcpy.
2017-07-08 15:16:21 -04:00
NHOrus
51b6b52dc8
Eliminated multiple reassigments
2017-07-07 10:20:32 +03:00
NHOrus
ea4986e0f5
Stop overwriting obj by dragon check
2017-07-06 19:12:16 +03:00
NHOrus
8f5c262e6d
Semantic type for verb
2017-07-06 18:40:11 +03:00
NHOrus
cca3686f2f
Clear login in bvreak
...
Test double-breaking of vase
2017-07-06 18:23:07 +03:00
NHOrus
0a04293f23
Prevent multiple assigment to game.bonus in blast
2017-07-06 18:18:31 +03:00
NHOrus
adab8e2190
Be explicitely intransitive
2017-07-06 18:11:02 +03:00
NHOrus
ca7ac4063f
Magic-number elimination and fix
...
More test coverage for some of the cases
2017-07-06 17:55:56 +03:00
Eric S. Raymond
da6a090b83
Magic-number elimination.
2017-07-06 07:42:41 -04:00
NHOrus
fd3b08e7d1
Improve readability
2017-07-06 10:32:33 +03:00
NHOrus
53efcdf2d2
Cleaned up light and extinguish
2017-07-06 10:27:49 +03:00
NHOrus
a802db1ce0
Cleaned up eat
2017-07-06 10:18:18 +03:00
NHOrus
acf303a57f
Pruned out special case of discarding the vase
2017-07-06 10:13:43 +03:00