Commit graph

904 commits

Author SHA1 Message Date
Jason S. Ninneman
83fb64b5a8 Jettison MAKEWD(), GETTXT(), vocab(), GETIN(), and the old db compiler. 2017-06-29 08:54:35 -07:00
Aaron Traas
c4ceca3db9 Coverage - Test going back when you can't. 2017-06-29 10:57:34 -04:00
Aaron Traas
a434192373 Fixed automated testing 2017-06-29 10:16:41 -04:00
Aaron Traas
a4de450bfa Add make target for coverage 2017-06-29 10:16:40 -04:00
Eric S. Raymond
d43854f0f6 Simplify conditional evaluation when processing travel opcodes. 2017-06-29 08:46:29 -04:00
Eric S. Raymond
289f72e078 Address GitLab issue #16: make dist produces incomplete tarball 2017-06-29 07:05:11 -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
Eric S. Raymond
7281c39807 Improve documentation if the *most* obscure span of code. 2017-06-28 20:24:29 -04:00
Aaron Traas
6150e3be1f Make clean now removes cheat binary 2017-06-28 17:30:46 -04:00
Eric S. Raymond
d96d5db51f More magic-number removal. 2017-06-28 17:29:33 -04:00
Eric S. Raymond
b5260417dd Magic-number elimination. 2017-06-28 17:07:15 -04: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
NHOrus
aca6d79087 Some more linter warnings 2017-06-28 15:09:05 -04:00
Aaron Traas
b729853e7a Removed advent.info and added to .gitignore
advent.info is a generated file. No need to keep it in the repo.
2017-06-28 13:41:53 -04:00
Aaron Traas
60847652aa Test coverage: make LCOV ignore code unreachable without interactive shell 2017-06-28 13:23:34 -04:00
Aaron Traas
6521d49c07 Test coverage: make LCOV ignore bug() and all calls to BUG()
In theory, these should be unreachable, so they shouldn't be covered
with testing.
2017-06-28 13:23:34 -04:00
Aaron Traas
94aca03203 Test coverage: make LCOV ignore sig_handler and OOM check 2017-06-28 13:23:34 -04:00
Eric S. Raymond
d5942e1732 More test repairing. 2017-06-28 13:21:31 -04:00
Eric S. Raymond
783e2e5e2d Repair test breakage from previous commit. 2017-06-28 13:18:07 -04:00
Eric S. Raymond
f6267ff3eb Test consolidation. 2017-06-28 13:03:45 -04:00
Eric S. Raymond
533f737cb3 Merge two tests so the suite can run a little faster. 2017-06-28 12:54:50 -04:00
Jason S. Ninneman
e336aaed0e Update linenoise. 2017-06-28 09:14:57 -07:00
Eric S. Raymond
a1af74b534 Declare one-letter synonyms for some commands.
As issue #6 (Add single-letter verb synonyms) says:

Modern interactive fiction has converged on a fairly standard
vocabulary of one-letter abbreviations for common verbs. Besides
directional commands, they are:

d - drop
g - get
i - inventory
l - look
x - examine (synonymous in ADVENT with look)
z - wait

Open Adventure should implement these.

This commit doesn't make them work yet, but it declares them for when the
lexical analyzer is fully YAML-driven.
2017-06-28 12:05:41 -04:00
Eric S. Raymond
f5719f1aba Magic-number elimination. 2017-06-28 11:45:53 -04:00
Aaron Traas
eb89cd5b4e Cleaned up tests/Makefile - added save generation to its own target 2017-06-28 10:57:28 -04:00
Aaron Traas
6152e35afd Test coverage: command-line options for advent 2017-06-28 10:57:28 -04:00
Aaron Traas
3b780dd57e Test coverage -- 100% cheat for real this time 2017-06-28 10:57:28 -04:00
Eric S. Raymond
ceb5c27218 Comment polishing. 2017-06-28 10:51:47 -04: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
db68e0097e Break travel array into three struct fields. 2017-06-28 08:53:24 -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
d53f125555 All travel[] references are now wrapped in extractor/predicate macros.
This is a step toward pulling the magic numbers apart into data structures
so there will be fewer magic numbers in the code.
2017-06-27 21:55:29 -04:00
Eric S. Raymond
f6cd34f778 Begin abstracting out the magic properties of travel-array opcodes. 2017-06-27 21:46:07 -04:00
Eric S. Raymond
e49ba9fb2b Remove unused enums. 2017-06-27 20:11:21 -04:00
Eric S. Raymond
45384f6bf2 More use of state labels. 2017-06-27 20:10:59 -04:00
Eric S. Raymond
d891b883b9 Minor refactoring step. 2017-06-27 19:44:20 -04:00
Eric S. Raymond
b3b6314fa4 More use of state labels. 2017-06-27 17:27:42 -04:00
Eric S. Raymond
ed4e6ad422 Allow state labels in not clauses. 2017-06-27 16:54:58 -04:00
Aaron Traas
6fe8f98b35 Test Coverage - elicit hints for grate and snake 2017-06-27 16:13:49 -04:00
Aaron Traas
1e643da216 Remove unused code 2017-06-27 16:13:49 -04:00
Aaron Traas
4592a24350 Test coverage -- additional coverage in actions.c 2017-06-27 16:13:49 -04:00
Aaron Traas
7b1eb1ec58 buildregress now generates save files correctly. 2017-06-27 16:13:49 -04:00
Aaron Traas
2781413fa9 100% coverage of cheat.c 2017-06-27 16:13:49 -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
Aaron Traas
7392603b7d "cheat" now has command-line arguments for generating cheat files
-d number of deaths. Signed integer value
-s number of saves. Signed integer value
-o file name of save game to write
2017-06-27 16:13:49 -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
Eric S. Raymond
4ff3d497b6 This looks like it gets the terminators right. 2017-06-27 13:23:30 -04:00