Commit graph

201 commits

Author SHA1 Message Date
Eric S. Raymond
d46407d327 Magic-number elimination. Fix possible glitch in troll-bridge death. 2017-06-19 11:00:23 -04:00
Eric S. Raymond
98b02eeeb1 Magic number elimination, repair some careless replace damage. 2017-06-19 08:37:19 -04:00
Peje Nilsson
2fe36df4e2 Remove goto L12 - take two
On't know if you let me near this code again but here is a second
stab at removing "goto L12"

Previous attempt failed because of trying to continue the outer
do{}while(false)
Adding an extra for(;;) loop where the only repeat is the former
"goto L12" is replaced by continue. All other exits are returns
and a break;
2017-06-19 07:33:40 -04:00
Jason S. Ninneman
06e8d5a83e Abolish MAXDIE in favor of maximum_deaths. 2017-06-18 20:02:03 -07:00
Jason S. Ninneman
fecc48e6e5 Remove message pointer math in croak(). 2017-06-18 19:54:48 -07:00
Jason S. Ninneman
624ba16aad Change YES() to take const char* arguments. 2017-06-18 19:51:59 -07:00
Eric S. Raymond
7675b52562 More repairs on search-replace results. 2017-06-18 22:31:58 -04:00
Eric S. Raymond
fa9b6d317f No longer restricted to 6-character FORTRAN identifiers. 2017-06-18 21:17:57 -04:00
Eric S. Raymond
fd02259c7f Reindent and cleanup. 2017-06-18 20:24:37 -04:00
Bob Little
04eca720d9 magic numbers, show usage, fixed linty warnings
Show usage when using bad parameter with ./advent
Converted magic numbers to enums for BUG().  Also bug now shows
stringify'ed version of bug enumeration (not just a number).
2017-06-18 19:33:21 -04:00
Jason S. Ninneman
550734fd3f Gut and rebuild YES() with cleaner approach that doesn't rely on packing.
The new support functions get_input() and echo_input() (and others not made yet) will eventually replace GETIN() and MAPLIN().
2017-06-18 13:39:59 -07:00
Eric S. Raymond
67bf87eda0 Repair plover teleport and add a test for it. 2017-06-18 15:05:17 -04:00
Eric S. Raymond
409ffe4a86 Code simplification. 2017-06-18 14:02:24 -04:00
Jason S. Ninneman
672ef17d4c Rename newspeak() to speak(). 2017-06-18 10:06:14 -07:00
Eric S. Raymond
704b86afbb Refactor scoring so score() does not conditionally exit. 2017-06-18 12:51:05 -04:00
Eric S. Raymond
937714f31d Magic-number limination. Improve test coverage. 2017-06-18 09:44:34 -04:00
Eric S. Raymond
b3057f038b Re-format to consistent indent style with "make indent". 2017-06-18 06:18:51 -04:00
Bob Little
d844c2a391 Added 'linty' target for make
"make linty" does lots of error checking while compiling.
Simplified the standard make's CFLAGS.
Cleaned up code to eliminate resulting warnings generated by "make linty".
2017-06-17 22:28:40 -04:00
Bob Little
a3485d2a41 Move a few prototypes and static'ed a few functions
Moved prototypes for initialise() and action() from main.c to advent.h
Made the following functions static, so they wouldn't require prototypes:
   sig_handler (main.c)
   spotted_by_pirate (main.c)
   light (actions.c)
2017-06-17 18:19:09 -04:00
NHOrus
a0a35d8c7b Improved docs, fixed identation 2017-06-17 11:09:55 -04:00
NHOrus
32fdd08d9b Little cleanup of variable names 2017-06-17 17:48:12 +03:00
NHOrus
300d246179 Resume from file on startup 2017-06-17 09:20:42 +03:00
Eric S. Raymond
1596e6d81e Code simplification. 2017-06-16 15:58:51 -04:00
Eric S. Raymond
59a558b762 Code simplification. 2017-06-16 15:08:21 -04:00
Eric S. Raymond
d97574d35c Magic-number elimination. 2017-06-16 08:55:53 -04:00
Eric S. Raymond
a57d93ce35 Magic-number elimination. 2017-06-16 07:00:57 -04:00
Eric S. Raymond
ec031b0417 Name another magic number. 2017-06-15 17:34:06 -04:00
Eric S. Raymond
fc7f52f83f Don't do dwarf moves after a fallback command.
Avoids a crash bug.
2017-06-15 16:54:29 -04:00
Eric S. Raymond
14486d67d4 Magic-numnber elimination. 2017-06-15 12:19:06 -04:00
Eric S. Raymond
49edca485d More use of manifeat constants. 2017-06-15 11:15:45 -04:00
Eric S. Raymond
0dc78b4221 More use of manifest constants. 2017-06-15 10:59:43 -04:00
Eric S. Raymond
1896e0f886 Use symbolic shortnames for locations. 2017-06-15 10:31:26 -04:00
NHOrus
f1f7cfd4e9 Localizing variables 2017-06-15 16:16:21 +03:00
Eric S. Raymond
e5f9c4fbea Use LOC_* constants for locations. Clean up some ARB_* constants. 2017-06-15 08:49:47 -04:00
Eric S. Raymond
a141f021d5 Meaningful shortnames for RSPEAK messages. 2017-06-15 07:35:03 -04:00
Eric S. Raymond
1d37262a16 More ARB tagging. 2017-06-15 07:16:39 -04:00
Bob Little
c4c28e10db dungeon now outputs just database.h
Added macro DEFINE_GLOBALS_FROM_INCLUDES to main.c
Makefile no longer has to deal with database.c and database.o
2017-06-14 21:54:49 -04:00
Jason S. Ninneman
1322a347ae Put the long and short location descriptions into a 'locations' data structure.
They're renamed 'small' and 'big' to avoid colliding with C reserved words.
2017-06-14 16:45:49 -07:00
Eric S. Raymond
fef9657e3e Move from random message numbers to ARB_* symbols generate from YAML. 2017-06-14 17:36:30 -04:00
NHOrus
46bb20deb3 Lowering the scope And cleaning up some warnings from static analysis 2017-06-14 15:17:02 -04:00
Eric S. Raymond
4993be4c08 Include LCG state in game saves. 2017-06-14 13:00:28 -04:00
Eric S. Raymond
7af0c7b059 Repair and simplify complicated pirare-robbery logic.
I think we previously mistranslated this in a way that didn't show up
because it would only manifest if you found the penultimare treasure
without encountering the pirate.

This version is much easier to understand.
2017-06-14 08:26:49 -04:00
Eric S. Raymond
473bdfaa2a Code simplification. 2017-06-13 20:06:07 -04:00
Eric S. Raymond
c3453db345 Use more C-like naming conventions for variables. 2017-06-13 19:17:24 -04:00
Eric S. Raymond
dc6a5751ed Magic-number elimination. 2017-06-13 18:54:53 -04:00
Eric S. Raymond
d61cab352e Makere magic numbers for cond bits into symbols. 2017-06-13 18:38:04 -04:00
Eric S. Raymond
bd35d47139 Fix compiler warnings. 2017-06-13 14:33:19 -04:00
Jason S. Ninneman
bfa06be62d Fix all the simple compiler warnings. 2017-06-13 11:19:58 -07:00
Eric S. Raymond
a3c14ba077 Abolish setup check, there's no possibility of restart.
Note, this silently breaks old saves.
2017-06-13 10:20:15 -04:00
Peje Nilsson
b373ba447d Cleanup leftover comments 2017-06-13 13:27:44 +00:00