Commit graph

357 commits

Author SHA1 Message Date
NHOrus
38970a1c98 Unspk'd pour command 2017-07-03 06:12:19 +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
NHOrus
a5478639b6 Capture wonkyness of extinguishing urn 2017-07-02 10:16:13 -04:00
Aaron Traas
3d3cd4ba39 Localize scope for restore file pointer in main. 2017-07-02 02:28:58 -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
be115e9567 Fixed -r option. Added test to make sure it doesn't break later. 2017-07-02 01:36:28 -04:00
Aaron Traas
f815299a2a make_zzword() moved to initialize. Pruned unused stuff from cheat.c 2017-07-02 01:07:53 -04:00
Eric S. Raymond
a6954db376 Rewrite dwarf-encounter ceck so coverage testing sees all predicates. 2017-07-01 23:33:57 -04:00
Eric S. Raymond
4f08537e2d More magic-number elimination. 2017-07-01 23:07:23 -04:00
Eric S. Raymond
f1b37ea163 Supply missing implementation of nodwarf bit in travel rules. 2017-07-01 19:11:24 -04:00
Eric S. Raymond
0aa70d04cf Another step in de-obscurifying the travel code. 2017-07-01 19:11:24 -04:00
Jason S. Ninneman
e05f959974 Refactor specials[] to have strings instead of enum references.
Clean up arbitrary_messages[] accordingly.
2017-07-01 11:53:54 -07:00
Eric S. Raymond
e57d9d514c Minor refactor - create an equality function to simplify skip logic. 2017-07-01 14:07:23 -04:00
Eric S. Raymond
50bbbbceee Forther break apart the magic enconding of travel arrays. 2017-07-01 12:51:12 -04:00
Eric S. Raymond
c98668c529 Remove debris from a misclick. 2017-07-01 12:40:12 -04:00
NHOrus
ab79fc7814 Do not compare state to magic numbers 2017-07-01 18:25:39 +03: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
45820bc8cd Reindend, compile out all save stuff 2017-07-01 16:46:51 +03:00
NHOrus
8cc5ee5412 Put stuff back in init, C-style 2017-07-01 16:45:42 +03:00
Jason S. Ninneman
b3fb636149 Apply DEMOTE_WORD(). 2017-07-01 13:22:53 +00: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
7f2c118e56 Cut initialize in favor of implicit/default initialization where possible 2017-07-01 08:53:03 -04:00
Eric S. Raymond
9714bf8c82 Magic-number elimination. 2017-07-01 01:59:06 -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
NHOrus
94ea37d2bc Plugged little linenoise memory leaks. 2017-06-30 21:42:37 +03:00
Jason S. Ninneman
d9d089bdcc Remove some disused stuff. 2017-06-30 10:56:38 -07:00
Eric S. Raymond
39a25f8ec7 Magic-number elimination. 2017-06-30 13:30:49 -04:00
NHOrus
d6dab20801 Removed line as redundant
As of 8675c4facd lines 612-613 in main.c unreachable due to earlier
dispatch at line 1132 that redirects all find/inventory verbs into actions.c
Message NEARBY fires from YAML link to those verbs.
Also, reduced signature of playermove() to motion only.
2017-06-30 13:28:29 -04:00
Eric S. Raymond
51a4d7bd3a Remove gaps from arbitrary_messages, there are no more number sependencies.
Some spans within the list may still rely on contiguity.
2017-06-30 11:27:15 -04:00
Eric S. Raymond
46185a6e88 Magic-number elimination. 2017-06-30 11:03:57 -04:00
Eric S. Raymond
50e059eff8 Start another round of magic_number removal, this time for motions. 2017-06-29 16:41:49 -04:00
NHOrus
0f15c9e0f3 Breaking one-line conditionals 2017-06-29 22:51:30 +03:00
Eric S. Raymond
3001fb1dc1 Re-indented. 2017-06-29 15:45:59 -04:00
Aaron Traas
e7d1388c42 Updated documentation 2017-06-29 15:30:22 -04:00
NHOrus
97f307c912 k2 is dead 2017-06-29 21:35:44 +03:00
NHOrus
d48504f22f Untangling variable reuse 2017-06-29 21:35:44 +03:00
NHOrus
bf2fa227f0 Unshadowed k2 into k3 in main.c
Reindented everything
2017-06-29 20:11:53 +03:00
Eric S. Raymond
2b8b1b0130 Comment polishing. 2017-06-29 12:18:55 -04: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
Eric S. Raymond
d43854f0f6 Simplify conditional evaluation when processing travel opcodes. 2017-06-29 08:46:29 -04: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
9d918edeaa Eliminate some promiscuous variable reuse.
This was making the opcode-conditional evaluation logic much more
difficult to read than it needed to be.
2017-06-28 21:06:36 -04:00