X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=misc.c;h=6132b92150bd36756d56bdbab8bd1a02d5fad41d;hb=9475552be419a8a018a27d524f6cdf64c0e26e4b;hp=56872582b95cfe80540da380c674346d715f1761;hpb=6667ffd1f10e75ee4b75a3430d76e6f1b4e51090;p=open-adventure.git diff --git a/misc.c b/misc.c index 5687258..6132b92 100644 --- a/misc.c +++ b/misc.c @@ -538,6 +538,19 @@ bool get_command_input(command_t *command) tokenize(inputbuf, command); +#ifdef GDEBUG + /* Needs to stay synced with enum word_type_t */ + const char *types[] = {"NO_WORD_TYPE", "MOTION", "OBJECT", "ACTION", "NUMERIC"}; + /* needs to stay synced with enum speechpart */ + const char *roles[] = {"unknown", "intransitive", "transitive"}; + printf("Command: role = %s type1 = %s, id1 = %ld, type2 = %s, id2 = %ld\n", + roles[command->part], + types[command->word[0].type], + command->word[0].id, + types[command->word[1].type], + command->word[1].id); +#endif + return true; }