X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=advent.h;h=f7551d0ebb56fc65e54f62983fd5861c42f4d79e;hp=f199489e7034939236b463fcddf7157c2d34c83a;hb=67ed99b29cfe5c32b3db72091de3fb174195e032;hpb=87961483a22111329eac6967705190ccd72330f6 diff --git a/advent.h b/advent.h index f199489..f7551d0 100644 --- a/advent.h +++ b/advent.h @@ -90,7 +90,11 @@ 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); +extern void wordclear(token_t *); extern void PSPEAK(vocab_t, int); extern void RSPEAK(vocab_t); extern void SETPRM(long, long, long); @@ -177,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.