X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=f7551d0ebb56fc65e54f62983fd5861c42f4d79e;hp=ff62476379a7f16dda8212109ef28a52cbc02cb5;hb=67ed99b29cfe5c32b3db72091de3fb174195e032;hpb=a678b68b39f21f8b2853e45c6138d815a82a3423 diff --git a/advent.h b/advent.h index ff62476..f7551d0 100644 --- a/advent.h +++ b/advent.h @@ -90,6 +90,7 @@ extern bool oldstyle, editline, prompt; extern void* xmalloc(size_t size); extern char* xstrdup(const char*); extern void packed_to_token(long, char token[]); +extern void token_to_packed(char token[], long*); extern void speak(const char*); extern bool wordeq(token_t, token_t); extern bool wordempty(token_t); @@ -180,8 +181,16 @@ extern long AMBER, ATTACK, AXE, BACK, BATTERY, BEAR, enum speechpart {unknown, intransitive, transitive}; +struct command_t { + enum speechpart part; + vocab_t verb; + vocab_t obj; + token_t wd1, wd1x; + token_t wd2, wd2x; +}; + void initialise(void); -int action(FILE *input, enum speechpart part, token_t verb, token_t obj); +int action(FILE *input, struct command_t *command); /* Phase codes for action returns. * These were at one time FORTRAN line numbers.