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
a6ec8a9595
Simplify some dependencies.
2024-01-03 06:15:04 -05:00
Eric S. Raymond
b247359d7f
Initialize dwarf locations in YAML, not C.
...
Minimizes magic numbers.
2024-01-02 12:12:32 -05:00
Eric S. Raymond
ef78c36ddb
Improve state-macro encapsulation.
2023-04-15 09:29:28 -04:00
Eric S. Raymond
a6b41fdb8f
Simplify initialization code. All tests pass, 100% coverage.
2023-04-14 08:24:51 -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
25230068fe
Partial REUSE cmpliance.
2023-04-03 11:25:11 -04:00
Eric S. Raymond
786832210e
Magic-number elimination.
2023-03-14 14:58:26 -04:00
Eric S. Raymond
67a887f432
Magic-number elimination.
2022-04-19 17:07:46 -04:00
Eric S. Raymond
6dd37a6ec3
Namespace splittiing to prune the maze graph. No eeffect on gameplay.
2022-04-06 18:59:14 -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
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
Jason S. Ninneman
0e540429b0
Working but unpolished refactor of bigwords().
2017-07-05 14:02:52 -07:00
NHOrus
63152e6714
Broke all logical or into multiline statement to show lcov's lies
...
Results are weird, some things that need to be checked aren't and
at least my local lcov doesn't show them as unchecked
2017-07-03 07:20:37 +03:00
Eric S. Raymond
e712f4c0e0
Magic-number elimination.
2017-07-02 14:47:21 -04:00
Jason S. Ninneman
6af38a92f6
Eliminate the global game.blklin.
2017-07-02 10:37:10 -07:00
Eric S. Raymond
346bcf9458
Magic-number elimination.
2017-07-02 13:22:50 -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
85f8334e17
centralize calls to make_zzword()
...
make_zzword() now called in set_seed(), because the only times it was
called in the entire application is after every invocation of set_seed().
2017-07-02 02:02:09 -04:00
Aaron Traas
f815299a2a
make_zzword() moved to initialize. Pruned unused stuff from cheat.c
2017-07-02 01:07:53 -04: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
NHOrus
bf2fa227f0
Unshadowed k2 into k3 in main.c
...
Reindented everything
2017-06-29 20:11:53 +03:00
Jason S. Ninneman
83fb64b5a8
Jettison MAKEWD(), GETTXT(), vocab(), GETIN(), and the old db compiler.
2017-06-29 08:54:35 -07:00
Eric S. Raymond
27bc9f3bd2
De-macroize references to travel opcode fields we won't unpack further.
2017-06-28 09:21:41 -04:00
Eric S. Raymond
aace0b1359
More macro abstraction of the travel opcodes.
2017-06-28 08:26:36 -04:00
Eric S. Raymond
fb35c34171
After splitting out the stop field, nothing ever negates a travel opcode...
...
...so all those labs() calls can go away.
2017-06-27 22:15:22 -04:00
Eric S. Raymond
8560122f01
Break travel opcodes into a two-element structure.
2017-06-27 22:11:58 -04:00
Eric S. Raymond
894b3de949
Travel tables are all done from YAML now.
...
Leaves only Section 4 from asventure.text still relevant.
2017-06-27 16:11:13 -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
6ac098170c
Use enums for object number mnemonics instead of VOCWRD() calls.
2017-06-26 11:27:27 -07:00
Jason S. Ninneman
2fac8d1aef
object_descriptions[] is now objects[].
2017-06-26 09:43:11 -07:00
Eric S. Raymond
d612b0e6ca
Change the name of the KEY array to avoid an upcoming macro clash.
2017-06-26 10:44:19 -04:00
Eric S. Raymond
59243cf8bc
Take FORTRANish upper-case function names to C-style lowercase...
...
...except for a few we're planning to get rid of. This will avoid some
upcoming collisions with macros defined from YAML.
2017-06-26 10:19:33 -04:00
Eric S. Raymond
d809974479
Dix off-by-one errors induced by tightening some array bounds.
2017-06-25 13:17:35 -04:00
Eric S. Raymond
8a6e6aae7d
Fully subsume section 7 into YAML.
2017-06-24 20:28:22 -04:00
Eric S. Raymond
5ba7973ca7
Improve comments, eliminate magic numbers.
2017-06-24 12:22:25 -04:00
Eric S. Raymond
3e19c39f57
Give generate constant arrays the const specifier.
...
Also, move the adventure.txt format documentation to dungeon.c to be
removed when that file is.
2017-06-24 11:07:07 -04:00
Eric S. Raymond
c3a2816821
Replace magic MINTRS/MAXTRS with a treasure attribute in YAML.
2017-06-24 10:47:59 -04:00
Eric S. Raymond
25077d0b4e
LOCSIZ -> NLOCATIONS, finishing limit-name cleanup.
2017-06-24 10:20:36 -04:00
Eric S. Raymond
64035d0026
More fixed limits (NOBJECTS, LOCSIZ) stop being fixed.
2017-06-24 10:18:33 -04:00