Commit graph

297 commits

Author SHA1 Message Date
Eric S. Raymond
a2bb39dc7e Eliminate a confusing dummy argument in a macro. 2024-09-23 14:22:25 -04:00
Eric S. Raymond
5c90880f0a Comment and macro cleanup. 2024-09-23 06:06:32 -04:00
Eric S. Raymond
92451f1fff Eliminate thew last property inequality outside a macro. 2024-09-23 05:08:11 -04:00
Eric S. Raymond
40742e112b Expand a macro to simplify code. 2024-09-23 04:26:59 -04:00
Eric S. Raymond
9a6e4406f5 Confine uses of PROP_STASHIFY() to advent.h
Now it shouyld be possible to manipulate a stashed flag by only
changing macros.
2024-09-23 04:26:59 -04:00
Eric S. Raymond
0157e58668 Remove an unneeded layer of macro indirection. 2024-09-23 03:35:52 -04:00
Eric S. Raymond
cb293f4aa4 Rename some macos for clarity. 2024-06-30 14:48:44 -04:00
Eric S. Raymond
0175344caa 1TBS reflow, the bracening. 2024-01-29 12:14:56 -05:00
Eric S. Raymond
be429016af 1TBS reflow with clang-format. 2024-01-28 08:09:39 -05:00
Eric S. Raymond
c11938aed5 Place1TBS mandatory braces. 2024-01-28 07:14:46 -05:00
Eric S. Raymond
258b7703f2 Simplify SPDX copyright lines to the shortest canonical form...
...because if we leave them longer than 80 chars, reflow is going to
mess them up.
2024-01-28 07:14:46 -05:00
Eric S. Raymond
2db3bed3f1 Fix up copyright notices. SPDX wants only one per file. 2024-01-03 06:30:40 -05:00
Eric S. Raymond
75bc031b46 Reduce include complexity. 2024-01-03 05:55:57 -05:00
Eric S. Raymond
c82d1214fa First nontrivial replacement of object state test by macro.
Test was game.objects[i].prop >= 0, but we know that state -1
(STATE_NOTFOUND) can't occiur here because the object is in
a lit room.
2023-04-08 20:02:27 -04:00
Eric S. Raymond
02987d0330 Encapsulate object-state state tests and setttings in macros.
This isn't a complete refwctoring, just the part than can be done with
transparetly correct capture of inlinre logic into macros.

No logic changes. Tests pass, 100% coverage.
2023-04-08 19:35:41 -04:00
Eric S. Raymond
eebc87f889 Structurize object info. 2023-04-07 10:35:13 -04:00
Eric S. Raymond
8fe07c8bf3 Structurize locatiuon info. 2023-04-07 09:30:33 -04:00
Eric S. Raymond
ff9c73a37d Structurize the informaruin about dwarves. 2023-04-07 09:15:20 -04:00
Eric S. Raymond
829c13d1d5 Fix some screwy formatting of conditionals...
...probably by the original FOTRAN-to-C translator.
2023-04-06 21:29:39 -04:00
Eric S. Raymond
2f60504e07 Comment typo fixes. 2023-04-06 21:01:48 -04:00
Eric S. Raymond
fe378b9e13 Improved behavior when magic words are said before they're seen.
Note: there is a tiny risk that this could break savefile
compatibility, as I swiped an unused int member in the game structure
and turned it into a bool. int and bool *should* be the same sixe...
2023-04-05 19:49:38 -04:00
Eric S. Raymond
25230068fe Partial REUSE cmpliance. 2023-04-03 11:25:11 -04:00
Eric S. Raymond
71abcb4e65 Add explanatory comment. 2023-04-03 09:42:55 -04:00
Eric S. Raymond
2dd1ccc535 Fix for Gitlab issue #65: revisiting "fee fie foe foo" and "fum".
100% coverage, "make oldcompare" passes.
2023-04-03 09:24:21 -04:00
Eric S. Raymond
0a1f5dbb43 Nothing but FOO can start a magic-word sequence,
100% coverage ans oldcompare passes.
2023-04-03 07:14:11 -04:00
Eric S. Raymond
b86d4afd20 Back out the behavior change to magic words outside the Giant's Room.
There are twi reasons for this. One is to decompolicate verifying
the fix for issue $85: revisiting "fee fie foe foo" and "fum". The
other is because I'm now convinced that the test should notr be
"Are you in the Giant's Room" but :Have you read the grafitti there?
2023-04-02 17:53:09 -04:00
Eric S. Raymond
b125fe7b2a Fix interrupted-magic-words cosmetic bug.
C patch by Torbjörn Andersson.
2023-03-10 16:43:27 -05:00
Eric S. Raymond
426684fec2 Increase retrigressiveness of oldstyle a bit. 2023-03-01 17:46:13 -05:00
Eric S. Raymond
94e7cc6505 Address Gitlab isse #62: Comment typos. 2023-03-01 13:04:53 -05:00
Eric S. Raymond
d320212622 Indent cleanup. 2022-04-18 10:31:13 -04:00
Eric S. Raymond
4069bf210b cppcheck cleanup. 2022-04-13 20:55:57 -04:00
Eric S. Raymond
49e2479efa Improve test coverage. 2022-04-07 06:42:20 -04:00
Eric S. Raymond
dd5ca23302 Second part of fix for "fee fie foe foo" and "fum", with test. 2022-04-06 14:41:30 -04:00
Eric S. Raymond
db384731a7 Address GitLab issue #56: handling of "fee fie foe foo" and "fum"
Also add a regression test for this.
2022-04-06 13:43:08 -04:00
Eric S. Raymond
46e1595cb0 Address Gitlanb issue #54: listen command not showing all sounds 2022-04-06 07:49:42 -04:00
Eric S. Raymond
73b49d27f4 Fix issue #51: rug flying is broken
And add a test for the fix.
2022-04-05 15:18:17 -04:00
Eric S. Raymond
f2f238e9e4 Address GitLab issue #55: water should not be available in endgame. 2021-02-15 22:21:26 -05:00
Eric S. Raymond
747c42029d Attempt fix for issue #52: endgame oyster reading is incorrect 2021-01-11 00:14:51 -05:00
Eric S. Raymond
8984e48e78 Attempting fix for issue #50: carried clam can be opened (with trident) 2021-01-10 22:14:11 -05:00
Aaron Traas
e7dc3eab5d Correct return types for all of the action handling functions in actions, so it's clear we're not just using arbitrary ints 2018-12-07 10:36:42 -05:00
Eric S. Raymond
6667ffd1f1 Address GitLab issue #45: OSX Compile issue 2018-11-30 09:50:25 -05:00
Eric S. Raymond
a4c87aa0b3 Fix for GitLab issue #37: prompt incorrectly handled. 2018-11-14 13:01:39 -05:00
Eric S. Raymond
782c5c3f29 SPDXify the code. 2018-03-08 20:56:21 -05: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
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
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