open-adventure.git
7 years agoUpdate illformed.chk for current YAML. 1.1
Eric S. Raymond [Thu, 29 Jun 2017 22:27:14 +0000 (18:27 -0400)]
Update illformed.chk for current YAML.

7 years agoDeduce version from NEWS.
Eric S. Raymond [Thu, 29 Jun 2017 22:25:45 +0000 (18:25 -0400)]
Deduce version from NEWS.

7 years agoUpdate NEWS.
Eric S. Raymond [Thu, 29 Jun 2017 21:54:30 +0000 (17:54 -0400)]
Update NEWS.

7 years agoImplement 'version' command.
Eric S. Raymond [Thu, 29 Jun 2017 21:52:26 +0000 (17:52 -0400)]
Implement 'version' command.

7 years agoTest coverage -- fix regression 163/head
Aaron Traas [Thu, 29 Jun 2017 21:22:00 +0000 (17:22 -0400)]
Test coverage -- fix regression

7 years agoTest coverage - add lots more coverage from actions.c 162/head
Aaron Traas [Thu, 29 Jun 2017 20:40:21 +0000 (16:40 -0400)]
Test coverage - add lots more coverage from actions.c

7 years agoNot the best idea to try to rewach Don Woods for help any more.
Eric S. Raymond [Thu, 29 Jun 2017 20:59:27 +0000 (16:59 -0400)]
Not the best idea to try to rewach Don Woods for help any more.

7 years agoTypo fix.
Eric S. Raymond [Thu, 29 Jun 2017 20:46:36 +0000 (16:46 -0400)]
Typo fix.

7 years agoAdd Aaron Traas to credits.
Eric S. Raymond [Thu, 29 Jun 2017 20:44:01 +0000 (16:44 -0400)]
Add Aaron Traas to credits.

7 years agoStart another round of magic_number removal, this time for motions.
Eric S. Raymond [Thu, 29 Jun 2017 20:41:49 +0000 (16:41 -0400)]
Start another round of magic_number removal, this time for motions.

7 years agoDocumentation and comment cleanup.
Aaron Traas [Thu, 29 Jun 2017 20:37:07 +0000 (16:37 -0400)]
Documentation and comment cleanup.

Also, renove uused enums.

7 years ago'd' had a collision; 'drop' vs ;down'. Remove from 'drop' synonyms.
Eric S. Raymond [Thu, 29 Jun 2017 20:28:20 +0000 (16:28 -0400)]
'd' had a collision; 'drop' vs ;down'. Remove from 'drop' synonyms.

7 years agoDocumentation polishing and minor test improvements.
Eric S. Raymond [Thu, 29 Jun 2017 20:25:55 +0000 (16:25 -0400)]
Documentation polishing and minor test improvements.

7 years agoBreaking one-line conditionals 160/head
NHOrus [Thu, 29 Jun 2017 19:51:30 +0000 (22:51 +0300)]
Breaking one-line conditionals

7 years agoRe-indented.
Eric S. Raymond [Thu, 29 Jun 2017 19:45:59 +0000 (15:45 -0400)]
Re-indented.

7 years agoClean out the now-disused vocabulary structure.
Jason S. Ninneman [Thu, 29 Jun 2017 18:20:36 +0000 (11:20 -0700)]
Clean out the now-disused vocabulary structure.

7 years agoUpdated documentation
Aaron Traas [Thu, 29 Jun 2017 19:13:11 +0000 (15:13 -0400)]
Updated documentation

7 years agoCleanup test case
Aaron Traas [Thu, 29 Jun 2017 16:54:07 +0000 (12:54 -0400)]
Cleanup test case

7 years agoCoverage - Die while closing after lamp dim
Aaron Traas [Thu, 29 Jun 2017 16:28:46 +0000 (12:28 -0400)]
Coverage - Die while closing after lamp dim

7 years agok2 is dead 157/head
NHOrus [Thu, 29 Jun 2017 18:13:53 +0000 (21:13 +0300)]
k2 is dead

7 years agoUntangling variable reuse
NHOrus [Thu, 29 Jun 2017 18:08:09 +0000 (21:08 +0300)]
Untangling variable reuse

7 years agoSeparate debugging of linenoise 156/head
NHOrus [Thu, 29 Jun 2017 17:23:39 +0000 (20:23 +0300)]
Separate debugging of linenoise

7 years agoFix an OB1 bug in allocation.
Eric S. Raymond [Thu, 29 Jun 2017 17:43:36 +0000 (13:43 -0400)]
Fix an OB1 bug in allocation.

7 years agoUnshadowed k2 into k3 in main.c 155/head
NHOrus [Thu, 29 Jun 2017 17:11:53 +0000 (20:11 +0300)]
Unshadowed k2 into k3 in main.c
Reindented everything

7 years agoUpstream linenoise rebased their project. 154/head
Jason S. Ninneman [Thu, 29 Jun 2017 16:34:23 +0000 (09:34 -0700)]
Upstream linenoise rebased their project.

7 years agoTransition to YAML is done, adventure.text and travel.py can go away.
Eric S. Raymond [Thu, 29 Jun 2017 16:21:50 +0000 (12:21 -0400)]
Transition to YAML is done, adventure.text and travel.py can go away.

7 years agoComment polishing.
Eric S. Raymond [Thu, 29 Jun 2017 16:18:55 +0000 (12:18 -0400)]
Comment polishing.

7 years agoFinish newdb -> dungeon renaming. 153/head
Jason S. Ninneman [Thu, 29 Jun 2017 15:49:12 +0000 (08:49 -0700)]
Finish newdb -> dungeon renaming.

7 years agonewdungeon.py is now make_dungeon.py.
Jason S. Ninneman [Thu, 29 Jun 2017 15:45:47 +0000 (08:45 -0700)]
newdungeon.py is now make_dungeon.py.

newdb.[ch] is now dungeon.[ch].

7 years agoRemove MAPLIN(). Fold common.[ch] into other files and remove them.
Jason S. Ninneman [Thu, 29 Jun 2017 15:41:32 +0000 (08:41 -0700)]
Remove MAPLIN(). Fold common.[ch] into other files and remove them.

7 years agoJettison MAKEWD(), GETTXT(), vocab(), GETIN(), and the old db compiler.
Jason S. Ninneman [Thu, 29 Jun 2017 15:35:48 +0000 (08:35 -0700)]
Jettison MAKEWD(), GETTXT(), vocab(), GETIN(), and the old db compiler.

7 years agoCoverage - Test going back when you can't. 152/head
Aaron Traas [Thu, 29 Jun 2017 14:57:34 +0000 (10:57 -0400)]
Coverage - Test going back when you can't.

7 years agoFixed automated testing
Aaron Traas [Wed, 28 Jun 2017 19:04:38 +0000 (15:04 -0400)]
Fixed automated testing

7 years agoAdd make target for coverage
Aaron Traas [Wed, 28 Jun 2017 18:35:17 +0000 (14:35 -0400)]
Add make target for coverage

7 years agoSimplify conditional evaluation when processing travel opcodes.
Eric S. Raymond [Thu, 29 Jun 2017 12:46:29 +0000 (08:46 -0400)]
Simplify conditional evaluation when processing travel opcodes.

7 years agoAddress GitLab issue #16: `make dist` produces incomplete tarball
Eric S. Raymond [Thu, 29 Jun 2017 11:05:11 +0000 (07:05 -0400)]
Address GitLab issue #16: `make dist` produces incomplete tarball

7 years agoCompletely wire vocab words in YAML to the code. 151/head
Jason S. Ninneman [Wed, 28 Jun 2017 16:35:55 +0000 (09:35 -0700)]
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.

7 years agoEliminate some promiscuous variable reuse.
Eric S. Raymond [Thu, 29 Jun 2017 01:06:36 +0000 (21:06 -0400)]
Eliminate some promiscuous variable reuse.

This was making the opcode-conditional evaluation logic much more
difficult to read than it needed to be.

7 years agoImprove documentation if the *most* obscure span of code.
Eric S. Raymond [Thu, 29 Jun 2017 00:24:29 +0000 (20:24 -0400)]
Improve documentation if the *most* obscure span of code.

7 years agoMake clean now removes cheat binary
Aaron Traas [Wed, 28 Jun 2017 17:52:04 +0000 (13:52 -0400)]
Make clean now removes cheat binary

7 years agoMore magic-number removal.
Eric S. Raymond [Wed, 28 Jun 2017 21:29:33 +0000 (17:29 -0400)]
More magic-number removal.

7 years agoMagic-number elimination.
Eric S. Raymond [Wed, 28 Jun 2017 21:07:15 +0000 (17:07 -0400)]
Magic-number elimination.

7 years agoImplement and document state-changes messages in YAML.
Eric S. Raymond [Wed, 28 Jun 2017 20:14:23 +0000 (16:14 -0400)]
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.

7 years agoSome more linter warnings
NHOrus [Wed, 28 Jun 2017 17:40:46 +0000 (20:40 +0300)]
Some more linter warnings

7 years agoRemoved advent.info and added to .gitignore 148/head
Aaron Traas [Wed, 28 Jun 2017 17:41:53 +0000 (13:41 -0400)]
Removed advent.info and added to .gitignore

advent.info is a generated file. No need to keep it in the repo.

7 years agoTest coverage: make LCOV ignore code unreachable without interactive shell
Aaron Traas [Wed, 28 Jun 2017 16:25:59 +0000 (12:25 -0400)]
Test coverage: make LCOV ignore code unreachable without interactive shell

7 years agoTest coverage: make LCOV ignore bug() and all calls to BUG()
Aaron Traas [Wed, 28 Jun 2017 16:21:05 +0000 (12:21 -0400)]
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.

7 years agoTest coverage: make LCOV ignore sig_handler and OOM check
Aaron Traas [Wed, 28 Jun 2017 16:19:20 +0000 (12:19 -0400)]
Test coverage: make LCOV ignore sig_handler and OOM check

7 years agoMore test repairing.
Eric S. Raymond [Wed, 28 Jun 2017 17:21:31 +0000 (13:21 -0400)]
More test repairing.

7 years agoRepair test breakage from previous commit.
Eric S. Raymond [Wed, 28 Jun 2017 17:18:07 +0000 (13:18 -0400)]
Repair test breakage from previous commit.

7 years agoTest consolidation.
Eric S. Raymond [Wed, 28 Jun 2017 17:03:45 +0000 (13:03 -0400)]
Test consolidation.

7 years agoMerge two tests so the suite can run a little faster.
Eric S. Raymond [Wed, 28 Jun 2017 16:54:50 +0000 (12:54 -0400)]
Merge two tests so the suite can run a little faster.

7 years agoUpdate linenoise. 145/head
Jason S. Ninneman [Wed, 28 Jun 2017 16:13:59 +0000 (09:13 -0700)]
Update linenoise.

7 years agoDeclare one-letter synonyms for some commands.
Eric S. Raymond [Wed, 28 Jun 2017 16:05:41 +0000 (12:05 -0400)]
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.

7 years agoMagic-number elimination.
Eric S. Raymond [Wed, 28 Jun 2017 15:45:53 +0000 (11:45 -0400)]
Magic-number elimination.

7 years agoCleaned up tests/Makefile - added save generation to its own target
Aaron Traas [Wed, 28 Jun 2017 14:31:47 +0000 (10:31 -0400)]
Cleaned up tests/Makefile - added save generation to its own target

7 years agoTest coverage: command-line options for advent
Aaron Traas [Wed, 28 Jun 2017 14:09:02 +0000 (10:09 -0400)]
Test coverage: command-line options for advent

7 years agoTest coverage -- 100% cheat for real this time
Aaron Traas [Wed, 28 Jun 2017 13:44:20 +0000 (09:44 -0400)]
Test coverage -- 100% cheat for real this time

7 years agoComment polishing.
Eric S. Raymond [Wed, 28 Jun 2017 14:51:47 +0000 (10:51 -0400)]
Comment polishing.

7 years agoDe-macroize references to travel opcode fields we won't unpack further.
Eric S. Raymond [Wed, 28 Jun 2017 13:21:41 +0000 (09:21 -0400)]
De-macroize references to travel opcode fields we won't unpack further.

7 years agoBreak travel array into three struct fields.
Eric S. Raymond [Wed, 28 Jun 2017 12:53:24 +0000 (08:53 -0400)]
Break travel array into three struct fields.

7 years agoMore macro abstraction of the travel opcodes.
Eric S. Raymond [Wed, 28 Jun 2017 12:26:36 +0000 (08:26 -0400)]
More macro abstraction of the travel opcodes.

7 years agoAfter splitting out the stop field, nothing ever negates a travel opcode...
Eric S. Raymond [Wed, 28 Jun 2017 02:15:22 +0000 (22:15 -0400)]
After splitting out the stop field, nothing ever negates a travel opcode...

...so all those labs() calls can go away.

7 years agoBreak travel opcodes into a two-element structure.
Eric S. Raymond [Wed, 28 Jun 2017 02:11:58 +0000 (22:11 -0400)]
Break travel opcodes into a two-element structure.

7 years agoAll travel[] references are now wrapped in extractor/predicate macros.
Eric S. Raymond [Wed, 28 Jun 2017 01:55:29 +0000 (21:55 -0400)]
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.

7 years agoBegin abstracting out the magic properties of travel-array opcodes.
Eric S. Raymond [Wed, 28 Jun 2017 01:46:07 +0000 (21:46 -0400)]
Begin abstracting out the magic properties of travel-array opcodes.

7 years agoRemove unused enums.
Eric S. Raymond [Wed, 28 Jun 2017 00:11:21 +0000 (20:11 -0400)]
Remove unused enums.

7 years agoMore use of state labels.
Eric S. Raymond [Wed, 28 Jun 2017 00:10:59 +0000 (20:10 -0400)]
More use of state labels.

7 years agoMinor refactoring step.
Eric S. Raymond [Tue, 27 Jun 2017 23:44:20 +0000 (19:44 -0400)]
Minor refactoring step.

7 years agoMore use of state labels.
Eric S. Raymond [Tue, 27 Jun 2017 21:27:42 +0000 (17:27 -0400)]
More use of state labels.

7 years agoAllow state labels in not clauses.
Eric S. Raymond [Tue, 27 Jun 2017 20:54:58 +0000 (16:54 -0400)]
Allow state labels in not clauses.

7 years agoTest Coverage - elicit hints for grate and snake
Aaron Traas [Tue, 27 Jun 2017 18:47:16 +0000 (14:47 -0400)]
Test Coverage - elicit hints for grate and snake

7 years agoRemove unused code
Aaron Traas [Tue, 27 Jun 2017 18:46:49 +0000 (14:46 -0400)]
Remove unused code

7 years agoTest coverage -- additional coverage in actions.c
Aaron Traas [Tue, 27 Jun 2017 17:48:41 +0000 (13:48 -0400)]
Test coverage -- additional coverage in actions.c

7 years agobuildregress now generates save files correctly.
Aaron Traas [Tue, 27 Jun 2017 15:36:24 +0000 (11:36 -0400)]
buildregress now generates save files correctly.

7 years ago100% coverage of cheat.c
Aaron Traas [Tue, 27 Jun 2017 14:53:13 +0000 (10:53 -0400)]
100% coverage of cheat.c

7 years agoAllow cheat to generate save files with bogus numbers.
Aaron Traas [Tue, 27 Jun 2017 14:46:26 +0000 (10:46 -0400)]
Allow cheat to generate save files with bogus numbers.

Also remove pre-built save file for resumefail.log

7 years ago"cheat" now has command-line arguments for generating cheat files
Aaron Traas [Tue, 27 Jun 2017 14:33:10 +0000 (10:33 -0400)]
"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

7 years agoTravel tables are all done from YAML now.
Eric S. Raymond [Tue, 27 Jun 2017 20:11:13 +0000 (16:11 -0400)]
Travel tables are all done from YAML now.

Leaves only Section 4 from asventure.text still relevant.

7 years agoThis looks like it gets the terminators right.
Eric S. Raymond [Tue, 27 Jun 2017 17:23:30 +0000 (13:23 -0400)]
This looks like it gets the terminators right.

7 years agotravel is correct except for position of terminators.
Eric S. Raymond [Tue, 27 Jun 2017 16:22:01 +0000 (12:22 -0400)]
travel is correct except for position of terminators.

7 years agoDocumentation polishing. 142/head
Jason S. Ninneman [Tue, 27 Jun 2017 05:26:54 +0000 (22:26 -0700)]
Documentation polishing.

7 years agoMove the travel rule documentation to newdungeon.py.
Eric S. Raymond [Tue, 27 Jun 2017 04:57:36 +0000 (00:57 -0400)]
Move the travel rule documentation to newdungeon.py.

7 years agoUpdate linenoise from upstream. 141/head
Jason S. Ninneman [Tue, 27 Jun 2017 05:08:29 +0000 (22:08 -0700)]
Update linenoise from upstream.

7 years agoAbolish VOCWRD().
Jason S. Ninneman [Tue, 27 Jun 2017 05:07:24 +0000 (22:07 -0700)]
Abolish VOCWRD().

Action word mnemonics are now enums from adventure.yaml.

7 years agoRemove actspk[].
Jason S. Ninneman [Tue, 27 Jun 2017 05:04:02 +0000 (22:04 -0700)]
Remove actspk[].

7 years agoClean up missed actspk[] references.
Jason S. Ninneman [Tue, 27 Jun 2017 05:03:42 +0000 (22:03 -0700)]
Clean up missed actspk[] references.

7 years agoUse actions[].message instead of actspk[].
Jason S. Ninneman [Tue, 27 Jun 2017 05:01:23 +0000 (22:01 -0700)]
Use actions[].message instead of actspk[].

7 years agoAdd missing declaration.
Jason S. Ninneman [Tue, 27 Jun 2017 05:01:13 +0000 (22:01 -0700)]
Add missing declaration.

7 years agoExpress actions[] in newdb.[ch].
Jason S. Ninneman [Tue, 27 Jun 2017 04:53:24 +0000 (21:53 -0700)]
Express actions[] in newdb.[ch].

7 years agoCombine actspk and the action words into a single structure.
Jason S. Ninneman [Tue, 27 Jun 2017 04:36:24 +0000 (21:36 -0700)]
Combine actspk and the action words into a single structure.

7 years agoThis version of newdungeon.py can exactly recover Section 3...
Eric S. Raymond [Tue, 27 Jun 2017 02:41:57 +0000 (22:41 -0400)]
This version of newdungeon.py can exactly recover Section 3...

...from the YAML data. Next, to pack the recovered data the way
dungeon.c does and wite it in.

7 years agoReexpress the motion words in adventure.yaml.
Jason S. Ninneman [Tue, 27 Jun 2017 02:22:51 +0000 (22:22 -0400)]
Reexpress the motion words in adventure.yaml.

7 years agoFirst cut at compiling travel rules from YAML.
Eric S. Raymond [Tue, 27 Jun 2017 02:15:05 +0000 (22:15 -0400)]
First cut at compiling travel rules from YAML.

Not fully wired in yet.

7 years agoRepair variois problems in travel YAML.
Eric S. Raymond [Tue, 27 Jun 2017 02:13:22 +0000 (22:13 -0400)]
Repair variois problems in travel YAML.

7 years agoRepair a missing travel element it YAML.
Eric S. Raymond [Mon, 26 Jun 2017 21:31:04 +0000 (17:31 -0400)]
Repair a missing travel element it YAML.

Got left off due to an edge condition in travel.py.

7 years agoUpdate cheat.c to unbreak the build. 139/head
Jason S. Ninneman [Mon, 26 Jun 2017 20:40:38 +0000 (13:40 -0700)]
Update cheat.c to unbreak the build.

7 years agoCreate a cheater to test strange save/resume cases.
Eric S. Raymond [Mon, 26 Jun 2017 19:03:37 +0000 (15:03 -0400)]
Create a cheater to test strange save/resume cases.

Patch due to Aaron Traas, but needed modification because of code
drift since submission.

7 years agoJettison some disused macros. 138/head
Jason S. Ninneman [Mon, 26 Jun 2017 18:30:46 +0000 (11:30 -0700)]
Jettison some disused macros.

7 years agoUse enums for object number mnemonics instead of VOCWRD() calls.
Jason S. Ninneman [Mon, 26 Jun 2017 18:27:27 +0000 (11:27 -0700)]
Use enums for object number mnemonics instead of VOCWRD() calls.