| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
. |
| 6 |
|
| 7 |
|
| 8 |
#ifndef parser_h |
| 9 |
#define parser_h |
| 10 |
|
| 11 |
#include "glk.h" |
| 12 |
#include <stdio.h> |
| 13 |
|
| 14 |
struct Command { |
| 15 |
int verb; |
| 16 |
int noun; |
| 17 |
int item; |
| 18 |
int verbwordindex; |
| 19 |
int nounwordindex; |
| 20 |
int allflag; |
| 21 |
struct Command *previous; |
| 22 |
struct Command *next; |
| 23 |
}; |
| 24 |
|
| 25 |
typedef enum { |
| 26 |
NO_COMMAND, |
| 27 |
RESTART, |
| 28 |
SAVE, |
| 29 |
RESTORE, |
| 30 |
SCRIPT, |
| 31 |
ON, |
| 32 |
OFF, |
| 33 |
UNDO, |
| 34 |
RAM, |
| 35 |
RAMSAVE, |
| 36 |
RAMLOAD, |
| 37 |
GAME, |
| 38 |
COMMAND, |
| 39 |
ALL, |
| 40 |
IT, |
| 41 |
EXCEPT, |
| 42 |
FLICKER |
| 43 |
} extra_command; |
| 44 |
|
| 45 |
int GetInput(int *vb, int *no); |
| 46 |
void FreeCommands(void); |
| 47 |
glui32 *ToUnicode(const char *string); |
| 48 |
int RecheckForExtraCommand(void); |
| 49 |
int WhichWord(const char *word, const char **list, int word_length, |
| 50 |
int list_length); |
| 51 |
|
| 52 |
extern glui32 **UnicodeWords; |
| 53 |
extern char **CharWords; |
| 54 |
|
| 55 |
#define NUMBER_OF_DIRECTIONS 14 |
| 56 |
|
| 57 |
extern const char *Directions[]; |
| 58 |
extern const char *GermanDirections[]; |
| 59 |
extern const char *SpanishDirections[]; |
| 60 |
extern const char *EnglishDirections[]; |
| 61 |
|
| 62 |
#define NUMBER_OF_SKIPPABLE_WORDS 18 |
| 63 |
|
| 64 |
extern const char *SkipList[]; |
| 65 |
extern const char *EnglishSkipList[]; |
| 66 |
extern const char *GermanSkipList[]; |
| 67 |
|
| 68 |
#define NUMBER_OF_DELIMITERS 5 |
| 69 |
|
| 70 |
extern const char *EnglishDelimiterList[]; |
| 71 |
extern const char *GermanDelimiterList[]; |
| 72 |
extern const char *DelimiterList[]; |
| 73 |
|
| 74 |
#define NUMBER_OF_EXTRA_COMMANDS 34 |
| 75 |
extern const char *GermanExtraCommands[]; |
| 76 |
extern const char *SpanishExtraCommands[]; |
| 77 |
extern const char *ExtraCommands[]; |
| 78 |
|
| 79 |
#define NUMBER_OF_EXTRA_NOUNS 16 |
| 80 |
|
| 81 |
extern const char *EnglishExtraNouns[]; |
| 82 |
extern const char *GermanExtraNouns[]; |
| 83 |
extern const char *SpanishExtraNouns[]; |
| 84 |
extern const char *ExtraNouns[]; |
| 85 |
extern const extra_command ExtraNounsKey[]; |
| 86 |
|
| 87 |
#endif |