Commit graph

1663 commits

Author SHA1 Message Date
Eric S. Raymond
4d4e8dce96 Magic-number elimination. 2023-04-10 19:27:07 -04:00
Eric S. Raymond
82c3ae5e65 Condition in alternative state-management macros.
These do not entirely work yet. #define FOUNDBOOL to enable them.

All tests pass, 100% coverage.
2023-04-10 19:26:18 -04:00
Eric S. Raymond
1af01ff91f Confine use of STATE_NOTFOUND to macros. 2023-04-08 23:04:34 -04:00
Eric S. Raymond
9e9731d59b Turn an odd test into a macro disjunction.
Was game.objects[i].prop > STATE_NOTFOUND.

This finishes off all the statec comparisons we want to macroize.
2023-04-08 21:17:55 -04:00
Eric S. Raymond
191d3cb043 More nontrivial macro abstraction of state checks.
game.prop < 0 becomes an alternation of macros.
2023-04-08 20:32:04 -04: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
9cd7c53d78 Refactor put() function and calls. 2023-04-07 13:19:51 -04:00
Eric S. Raymond
ab2779cd93 Remove unneeded use of put(). 2023-04-07 13:09:57 -04:00
Eric S. Raymond
819aed5c4e Add test for behavior of stashed objects in endgame. 2023-04-07 12:33:52 -04:00
Eric S. Raymond
8d4d64fafb Structurization of hints. 2023-04-07 10:52:16 -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
195e6e149b Apply loc_t type. 2023-04-07 08:18:50 -04:00
Eric S. Raymond
4369284c75 Boolification. 2023-04-07 07:35:28 -04:00
Torbjörn Andersson
7e21108e95 Spelling fixes. 2023-04-07 10:50:01 +02: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
5de3b8ff70 In notes.adoc, update the new-features list and credits. 2023-04-06 20:07:25 -04:00
Eric S. Raymond
520d365f74 Resume now detects if a save has incompatible endianness. 2023-04-06 19:41:22 -04:00
Eric S. Raymond
4b08b726f9 Simplify the signature of savefile(). 2023-04-06 19:26:04 -04:00
Eric S. Raymond
58cf204eba Implement the magic-cookie check and its test. 2023-04-06 19:03:02 -04:00
Eric S. Raymond
d16822a583 Give savefiles an identifting header. SAve format version gets bumped. 2023-04-06 17:54:02 -04:00
Eric S. Raymond
3640e5cb96 Refactoring step - change some visibilities. 2023-04-06 17:44:11 -04:00
Eric S. Raymond
e99cc69de0 Quiet make test down. 2023-04-06 17:28:43 -04:00
Eric S. Raymond
e8991f69e9 Simplify and speed up testing. 2023-04-06 16:38:21 -04:00
Eric S. Raymond
3e72486724 Comment typo fix 2023-04-06 12:13:38 -04:00
Eric S. Raymond
f5ff25f52a Magic-number elimination. 2023-04-06 10:03:24 -04:00
Eric S. Raymond
e1a528a4c5 Move NEWS file to asciidoc. 2023-04-05 21:48:02 -04:00
Eric S. Raymond
9726d8207c Add some SPDX headers. 2023-04-05 21:36:52 -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
4ce4de190e Magic number removal. 2023-04-05 18:02:47 -04:00
Eric S. Raymond
9b53140f1c GO_* enums no longer have an order constraint. 2023-04-05 17:48:26 -04:00
Eric S. Raymond
3c6648882d How to set up prerequisites for oldcompare 2023-04-04 19:14:45 -04:00
Eric S. Raymond
00bdc2133a Improve TAP messages slightly. 2023-04-04 09:53:10 -04:00
Eric S. Raymond
20e1b9d930 Update tapdiffer version. 2023-04-04 09:32:18 -04:00
Eric S. Raymond
1ce4fc2ac3 Improve copyright lines. 2023-04-03 17:05:01 -04:00
Eric S. Raymond
642b7e4890 Ready to ship 1.15. 2023-04-03 11:36:39 -04:00
Eric S. Raymond
ec1d99f354 Commenting fix. 2023-04-03 11:36:39 -04:00
Eric S. Raymond
6ebc2bf0e3 Documentation fix. 2023-04-03 11:25:11 -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
20cb8b9ffb Back out test lines that break compatibility with advent430.
Coverage is still 100% even withthese lines commebted out.
2023-04-02 18:28:45 -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
d9ddf4d805 Consolidate all magicwords tests into one file. 100% coverage. 2023-04-02 17:45:04 -04:00
Eric S. Raymond
9c6219a27d The oldcompare production no longer requires savefiles. 2023-04-02 11:54:37 -04:00
Eric S. Raymond
34516ecf39 Test name change, 2023-04-02 10:42:10 -04:00