Jason S. Ninneman
36a6cbca34
Add a DEMOTE_WORD() macro.
2017-07-01 06:18:24 -07:00
Jason S. Ninneman
2328739e51
Interim magic number replacement.
2017-07-01 06:15:54 -07: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
c83df10dc6
Stop leaking memory
2017-06-30 23:26:18 -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
030fa6d27d
The bugtype enum doesn't need explicit numbers.
2017-06-30 13:25:12 -07:00
Jason S. Ninneman
40acab43af
Remove disused function definitions.
2017-06-30 11:08:54 -07:00
Jason S. Ninneman
4fe9b94db4
Remove more disused macros.
2017-06-30 11:05:37 -07:00
Jason S. Ninneman
d9d089bdcc
Remove some disused stuff.
2017-06-30 10:56:38 -07:00
Aaron Traas
ffb8393985
Documentation and comment cleanup.
...
Also, renove uused enums.
2017-06-29 16:37:07 -04:00
Jason S. Ninneman
1ee0e5c7b0
Finish newdb -> dungeon renaming.
2017-06-29 08:54:55 -07:00
Jason S. Ninneman
074d2c8a0f
Remove MAPLIN(). Fold common.[ch] into other files and remove them.
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
Eric S. Raymond
1ed8126912
Implement and document state-changes messages in YAML.
...
Examples at the lamp and grate. This is a way to pull strings out of
arbitrary_messages and make them part of the object definition.
2017-06-28 16:14:23 -04: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
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
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
Jason S. Ninneman
5581175840
Jettison some disused macros.
2017-06-26 11:30:46 -07:00
Jason S. Ninneman
6ac098170c
Use enums for object number mnemonics instead of VOCWRD() calls.
2017-06-26 11:27:27 -07: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
81be19238c
Fix a report of conpile-time error.
2017-06-25 13:31:19 -04:00
Eric S. Raymond
5ba7973ca7
Improve comments, eliminate magic numbers.
2017-06-24 12:22:25 -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
985137d9c7
Rationalize names of structure array sizes.
...
Everything that camn be #define become one, in all caps to signify that
it's a constant.
2017-06-24 09:55:32 -04:00
Eric S. Raymond
3a93b2b5f0
Elimination of OBJSND.
2017-06-24 09:08:48 -04:00
Eric S. Raymond
15b7c00e0a
Abolish unclean operation on OBJSOUND - it's now static.
...
Save/Restore no longer needs to treat it specially.
2017-06-23 15:13:47 -04:00
Eric S. Raymond
ecff53d3a8
Name the lamp, grate, and bird states.
2017-06-23 14:59:32 -04:00
Eric S. Raymond
6c6c72f327
Replace macros with condition bits.
2017-06-22 18:41:25 -04:00
Eric S. Raymond
51494657fd
Give the FORCED property a real cond bit. Delete some unused code.
2017-06-22 17:49:06 -04:00
Eric S. Raymond
7f7f49b739
Switch fully over to YAML generation of condition bits. COND is gone.
2017-06-22 17:28:39 -04:00
Eric S. Raymond
537c4511e2
Generate initializer from YAML for Section 9 bits.
2017-06-22 16:45:38 -04:00
Eric S. Raymond
9c7c23b75a
Improve namespace hygiene.
2017-06-22 08:58:11 -04:00
Aaron Traas
3c8530663d
xstrdup() not called anywhere in source. Removed.
2017-06-21 13:50:13 -04:00
Jason S. Ninneman
c8f6ff3701
Abolish HNTMAX and HNTSIZ in favor of HINT_COUNT.
...
This change necessitated include guards on newdb.h.
2017-06-21 10:25:12 -07:00
Peje Nilsson
deb61e3dcd
Replace SETPRM/[PR]SPEAK with variadic [pr]speak
...
Rename/rewrite old speak to vspeak and take a va_list
Add new speak that takes variadic parameters
Remove SETPRM & PARMS[]
2017-06-21 13:14:53 -04:00
Eric S. Raymond
9437ccca36
WD* globals abolished. They're now members of the command block.
2017-06-20 20:06:32 -04:00
Eric S. Raymond
7a3f3ec7a6
Introduce command encapsulation structure.
2017-06-20 17:40:41 -04:00
Jason S. Ninneman
6ecd001093
Fix typo and compiler warning.
2017-06-19 14:49:15 -07:00
Jason S. Ninneman
ba64c57eb0
Add token_to_packed() utility function.
2017-06-19 14:45:32 -07:00
Eric S. Raymond
a678b68b39
Mostly confine assumptions about what token_t is to misc.c
...
The token_t things like WD* are presently longs and will someday be
char[6]. By introducing some trivial functions - wordeq(),
wordempty(), and wordclear() - we mostly hide the difference.
All runtime knowledge about packing now lives only in misc.c and the
list of magic WORD_* defines in advent.h. Outside this, literals are
now accessed through #define names that could expand to either longs
or strings.
Still to be done: WD* values are sometiimes compated to zero in
ways implying they can be negative. Must figure out wat thus means.
2017-06-19 17:21:45 -04:00
Eric S. Raymond
87961483a2
Concentrate all magic-number values for packed-string constants in one place.
2017-06-19 16:53:55 -04:00
Eric S. Raymond
79f5701e07
More semantic typing - a step towards eliminating packing.
2017-06-19 14:20:45 -04:00
Eric S. Raymond
0eb85f233a
Boolify some logical variables.
2017-06-19 13:21:15 -04:00
NHOrus
e9aff2568f
Even less magic
2017-06-19 20:18:20 +03:00
Eric S. Raymond
4c100261c4
Magic-number elimination.
2017-06-19 11:09:24 -04:00
Eric S. Raymond
d46407d327
Magic-number elimination. Fix possible glitch in troll-bridge death.
2017-06-19 11:00:23 -04:00
Jason S. Ninneman
624ba16aad
Change YES() to take const char* arguments.
2017-06-18 19:51:59 -07:00