NHOrus
53cb12b4d0
Bound the sizes of strcpy.
2017-07-08 15:16:21 -04:00
NHOrus
e09ba7244d
Minor deduplication
2017-07-08 19:59:50 +03:00
NHOrus
d739c111d7
Restructure quips for invalid movements.
2017-07-08 19:59:50 +03:00
NHOrus
386ca2b8d2
Restructure lightcheck
2017-07-08 19:59:50 +03:00
Eric S. Raymond
7d690e0b95
Set game.newloc when reincarnated. Fixes a bug.
2017-07-08 11:34:09 -04:00
NHOrus
5af8fb18f0
Prevent access beyond boundaries of array on fallthrough
2017-07-07 23:15:54 +03:00
Eric S. Raymond
1cbc3d827b
Eliminate magic numbers from C side of condition handling.
2017-07-07 15:01:25 -04:00
Eric S. Raymond
2bdf9e2803
Purge magic numbers from C side of destination handling.
2017-07-07 11:04:18 -04:00
NHOrus
e619c41048
Don't forget to ask important questions when removing restore of saves
2017-07-07 17:58:42 +03:00
NHOrus
0042d641dc
Plugged all memory leaks.
...
Now all tests pass under ASan or Valgrind.
2017-07-07 12:07:52 +03:00
NHOrus
ef97d579ea
Don't zero stuff twice
2017-07-07 11:18:02 +03:00
NHOrus
d51da9d0b8
Magic Number Elimination
2017-07-07 10:04:26 +03:00
Jason S. Ninneman
0e540429b0
Working but unpolished refactor of bigwords().
2017-07-05 14:02:52 -07:00
NHOrus
40ff648431
Moved state_change to misc.c to start using it in main.c, too
2017-07-05 20:23:34 +03:00
NHOrus
8613f0b3d9
Magic number elimination
...
Special state/locations for game.fixd object array
2017-07-05 07:56:36 +03:00
Eric S. Raymond
c48c330883
Magic-number elimination in the olover/alcove pasage code.
...
Wuth this change, the location table becomes order-independent (I think).
2017-07-04 22:57:34 -04:00
Eric S. Raymond
abf820bb5c
Magic-number elimination.
2017-07-04 14:40:10 -04:00
Eric S. Raymond
f37a413524
Magic-number elimination.
2017-07-04 14:15:20 -04:00
Eric S. Raymond
a8ac2f477a
Abstract out some state arithmetic.
2017-07-04 13:41:12 -04:00
Jason S. Ninneman
4f78dfea24
Begin replacing tests on strings with tests on vocab IDs.
2017-07-03 18:21:25 -07:00
Eric S. Raymond
a768555312
Use the raw buffer in tr command structure for editing.
...
This fixes some minor bugs. Unknown words are no longer truncated
nor uppercased on echo.
2017-07-03 12:52:28 -04:00
Eric S. Raymond
f03bde268e
Refactor tokenization to save raw tokens and use static buffer space...
...
...rather than dynamic storage.
As a side effect, this seems to have fixed a very ninor bug in the processing
of the bare word 'nothing'. But I don't know where the bug was. Not happy.
2017-07-03 08:53:10 -04:00
Eric S. Raymond
eba8015059
Magic-number elimination.
2017-07-03 07:14:15 -04:00
Eric S. Raymond
7740b163c8
playermove() never returns false; simplify accordingly
2017-07-03 06:10:52 -04: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
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