Commit graph

38 commits

Author SHA1 Message Date
Eric S. Raymond
be429016af 1TBS reflow with clang-format. 2024-01-28 08:09:39 -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
4b08b726f9 Simplify the signature of savefile(). 2023-04-06 19:26:04 -04:00
Eric S. Raymond
25230068fe Partial REUSE cmpliance. 2023-04-03 11:25:11 -04:00
Eric S. Raymond
9fdbe73315 Revert "Tapify output of cheat."
There was a better way.
2023-03-16 10:15:47 -04:00
Eric S. Raymond
f5d15ab1f2 Tapify output of cheat. 2023-03-16 08:32:59 -04:00
Torbjörn Andersson
98b95e92ee Another typo fix. 2023-03-08 18:15:51 +01:00
Eric S. Raymond
d320212622 Indent cleanup. 2022-04-18 10:31:13 -04:00
Eric S. Raymond
6f7c5743c6 Add a coverage exclusion. 2022-04-06 22:27:14 -04:00
Eric S. Raymond
bb2b8e0fca Support execution of command script arguments. 2022-04-05 14:33:29 -04:00
Eric S. Raymond
81af59974b The FORTRAN-derived longs were semantically ints. Make it so.
Note. because we used fixed-length declrations in the right places, this
shouldn't break saves.

(Besides being right, this will someday make a port to Go a touch easier,
if we decide to do that.)
2019-02-28 05:58:16 -05:00
Eric S. Raymond
782c5c3f29 SPDXify the code. 2018-03-08 20:56:21 -05:00
Eric S. Raymond
ef236aea3b More type hygiene. 2017-07-21 07:44: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
NHOrus
38970a1c98 Unspk'd pour command 2017-07-03 06:12:19 +03:00
Aaron Traas
2d71fe8137 Add capabilities to cheat. Expand testing to cover. 2017-07-02 12:52:17 -04:00
Aaron Traas
7eaefce61d Moved application settings to settings_t struct
Since logfp, oldstyle, and prompt were application settings, rather than
have them all as global vars, move them to a single global var, seperate
from game state, as they aren't, technically, game state, but are
application settings.
2017-07-02 12:52:17 -04:00
Aaron Traas
70838f7001 Changed usage message to multi-line string for cheat 2017-07-02 01:17:14 -04:00
Aaron Traas
f815299a2a make_zzword() moved to initialize. Pruned unused stuff from cheat.c 2017-07-02 01:07:53 -04:00
Jason S. Ninneman
dec4cf3968 Jettison the -s option.
It's no longer needed since libedit doesn't have the 'paste bug'.
2017-07-01 07:22:53 -07:00
Jason S. Ninneman
ad3b097c9e Replace linenoise with libedit in code and build. 2017-07-01 07:22:53 -07:00
NHOrus
8cc5ee5412 Put stuff back in init, C-style 2017-07-01 16:45:42 +03:00
Eric S. Raymond
065caace64 Move PRNG initialization to simplify cheat.c 2017-07-01 08:59:45 -04:00
NHOrus
0a87fc9f78 Spread documentation from init.c It was empty without anything to document. Reindented, too 2017-07-01 08:53:03 -04:00
NHOrus
7f2c118e56 Cut initialize in favor of implicit/default initialization where possible 2017-07-01 08:53:03 -04:00
Jason S. Ninneman
8bc08773fa Various cleanups.
* Remove disused macro.
* GCC doesn't seem to mind if IGNORE() is left off.
* Enumify phase codes.
* Use EXIT_* macros in all exit() calls.
* How did this even work without extern?
* Give advent.h a much-needed makeover.
* Use the chomp indicator in YAML string blocks to avoid code ugliness.
2017-07-01 03:19:33 +00:00
Jason S. Ninneman
d9d089bdcc Remove some disused stuff. 2017-06-30 10:56:38 -07:00
NHOrus
bf2fa227f0 Unshadowed k2 into k3 in main.c
Reindented everything
2017-06-29 20:11:53 +03:00
Jason S. Ninneman
1ee0e5c7b0 Finish newdb -> dungeon renaming. 2017-06-29 08:54:55 -07:00
Jason S. Ninneman
83fb64b5a8 Jettison MAKEWD(), GETTXT(), vocab(), GETIN(), and the old db compiler. 2017-06-29 08:54:35 -07:00
Jason S. Ninneman
50435465a6 Completely wire vocab words in YAML to the code.
This massive patch:
* Finishes working all the vocab words into YAML structures.
* Adds vocab ID generator functions.
* Redoes the input-getting system, removing the need for GETIN(),
  GETTXT(), etc.
* Changes advent<->ascii mapping to avoid the special 'shift'
  character.
* Works around some bad behavior in the dragon attack logic.
* Handles the reservoir magic word without changing the database
  contents.
2017-06-29 01:59:37 -07:00
Aaron Traas
0a30176a8c Allow cheat to generate save files with bogus numbers.
Also remove pre-built save file for resumefail.log
2017-06-27 16:13:49 -04:00
Aaron Traas
7392603b7d "cheat" now has command-line arguments for generating cheat files
-d number of deaths. Signed integer value
-s number of saves. Signed integer value
-o file name of save game to write
2017-06-27 16:13:49 -04:00
Jason S. Ninneman
7dc8839249 Abolish VOCWRD().
Action word mnemonics are now enums from adventure.yaml.
2017-06-26 22:07:24 -07:00
Jason S. Ninneman
f9edfc5151 Reexpress the motion words in adventure.yaml. 2017-06-26 22:22:51 -04:00
Jason S. Ninneman
70bfd3f5a3 Update cheat.c to unbreak the build. 2017-06-26 13:40:38 -07:00
Eric S. Raymond
d6cb6f0d8d Create a cheater to test strange save/resume cases.
Patch due to Aaron Traas, but needed modification because of code
drift since submission.
2017-06-26 15:07:09 -04:00