- switch(part)
- {
- case intransitive:
- if (WD2 > 0 && verb != SAY) return(2800);
- if (verb == SAY)obj=WD2;
- if (obj == 0) {
- /* Analyse an intransitive verb (ie, no object given yet). */
- switch (verb-1) {
- case 0: /* CARRY */ return carry(verb, INTRANSITIVE);
- case 1: /* DROP */ return(8000);
- case 2: /* SAY */ return(8000);
- case 3: /* UNLOC */ return lock(verb, INTRANSITIVE);
- case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
- case 5: /* LOCK */ return lock(verb, INTRANSITIVE);
- case 6: /* LIGHT */ return light(INTRANSITIVE);
- case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE);
- case 8: /* WAVE */ return(8000);
- case 9: /* CALM */ return(8000);
- case 10: /* WALK */ {RSPEAK(spk); return 2012;}
- case 11: /* ATTAC */ return attack(input, verb, obj);
- case 12: /* POUR */ return pour(verb, obj);
- case 13: /* EAT */ return eat(verb, INTRANSITIVE);
- case 14: /* DRINK */ return drink(verb, obj);
- case 15: /* RUB */ return(8000);
- case 16: /* TOSS */ return(8000);
- case 17: /* QUIT */ return quit(input);
- case 18: /* FIND */ return(8000);
- case 19: /* INVEN */ return inven(obj);
- case 20: /* FEED */ return(8000);
- case 21: /* FILL */ return fill(verb, obj);
- case 22: /* BLAST */ return blast();
- case 23: /* SCOR */ return vscore();
- case 24: /* FOO */ return bigwords(WD1);
- case 25: /* BRIEF */ return brief();
- case 26: /* READ */ return read(input, verb, INTRANSITIVE);
- case 27: /* BREAK */ return(8000);
- case 28: /* WAKE */ return(8000);
- case 29: /* SUSP */ return saveresume(input, false);
- case 30: /* RESU */ return saveresume(input, true);
- case 31: /* FLY */ return fly(verb, INTRANSITIVE);
- case 32: /* LISTE */ return listen();
- case 33: /* ZZZZ */ return reservoir();
- }
- BUG(23);
- }
- /* FALLTHRU */
- case transitive:
- /* Analyse a transitive verb. */
- switch (verb-1) {
- case 0: /* CARRY */ return carry(verb, obj);
- case 1: /* DROP */ return discard(verb, obj, false);
- case 2: /* SAY */ return say();
- case 3: /* UNLOC */ return lock(verb, obj);
- case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
- case 5: /* LOCK */ return lock(verb, obj);
- case 6: /* LIGHT */ return light(obj);
- case 7: /* EXTI */ return extinguish(verb, obj);
- case 8: /* WAVE */ return wave(verb, obj);
- case 9: /* CALM */ {RSPEAK(spk); return 2012;}
- case 10: /* WALK */ {RSPEAK(spk); return 2012;}
- case 11: /* ATTAC */ return attack(input, verb, obj);
- case 12: /* POUR */ return pour(verb, obj);
- case 13: /* EAT */ return eat(verb, obj);
- case 14: /* DRINK */ return drink(verb, obj);
- case 15: /* RUB */ return rub(verb, obj);
- case 16: /* TOSS */ return throw(input, verb, obj);
- case 17: /* QUIT */ {RSPEAK(spk); return 2012;}
- case 18: /* FIND */ return find(verb, obj);
- case 19: /* INVEN */ return find(verb, obj);
- case 20: /* FEED */ return feed(verb, obj);
- case 21: /* FILL */ return fill(verb, obj);
- case 22: /* BLAST */ return blast();
- case 23: /* SCOR */ {RSPEAK(spk); return 2012;}
- case 24: /* FOO */ {RSPEAK(spk); return 2012;}
- case 25: /* BRIEF */ {RSPEAK(spk); return 2012;}
- case 26: /* READ */ return read(input, verb, obj);
- case 27: /* BREAK */ return vbreak(verb, obj);
- case 28: /* WAKE */ return wake(verb, obj);
- case 29: /* SUSP */ {RSPEAK(spk); return 2012;}
- case 30: /* RESU */ {RSPEAK(spk); return 2012;}
- case 31: /* FLY */ return fly(verb, obj);
- case 32: /* LISTE */ {RSPEAK(spk); return 2012;}
- case 33: /* ZZZZ */ return reservoir();
- }
- BUG(24);
- case unknown:
- /* Unknown verb, couldn't deduce object - might need hint */
- SETPRM(1,WD1,WD1X);
- RSPEAK(255);
- return(2600);
+ switch (command->part) {
+ case intransitive:
+ if (command->wd2 > 0 && command->verb != SAY)
+ return GO_WORD2;
+ if (command->verb == SAY)command->obj = command->wd2;
+ if (command->obj == 0 || command->obj == INTRANSITIVE) {
+ /* Analyse an intransitive verb (ie, no object given yet). */
+ switch (command->verb - 1) {
+ case 0: /* CARRY */
+ return vcarry(command->verb, INTRANSITIVE);
+ case 1: /* DROP */
+ return GO_UNKNOWN;
+ case 2: /* SAY */
+ return GO_UNKNOWN;
+ case 3: /* UNLOC */
+ return lock(command->verb, INTRANSITIVE);
+ case 4: { /* NOTHI */
+ rspeak(OK_MAN);
+ return (GO_CLEAROBJ);
+ }
+ case 5: /* LOCK */
+ return lock(command->verb, INTRANSITIVE);
+ case 6: /* LIGHT */
+ return light(command->verb, INTRANSITIVE);
+ case 7: /* EXTIN */
+ return extinguish(command->verb, INTRANSITIVE);
+ case 8: /* WAVE */
+ return GO_UNKNOWN;
+ case 9: /* CALM */
+ return GO_UNKNOWN;
+ case 10: { /* WALK */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 11: /* ATTAC */
+ return attack(input, command);
+ case 12: /* POUR */
+ return pour(command->verb, command->obj);
+ case 13: /* EAT */
+ return eat(command->verb, INTRANSITIVE);
+ case 14: /* DRINK */
+ return drink(command->verb, command->obj);
+ case 15: /* RUB */
+ return GO_UNKNOWN;
+ case 16: /* TOSS */
+ return GO_UNKNOWN;
+ case 17: /* QUIT */
+ return quit();
+ case 18: /* FIND */
+ return GO_UNKNOWN;
+ case 19: /* INVEN */
+ return inven();
+ case 20: /* FEED */
+ return GO_UNKNOWN;
+ case 21: /* FILL */
+ return fill(command->verb, command->obj);
+ case 22: /* BLAST */
+ blast();
+ return GO_CLEAROBJ;
+ case 23: /* SCOR */
+ score(scoregame);
+ return GO_CLEAROBJ;
+ case 24: /* FOO */
+ return bigwords(command->wd1);
+ case 25: /* BRIEF */
+ return brief();
+ case 26: /* READ */
+ command->obj = INTRANSITIVE;
+ return read(*command);
+ case 27: /* BREAK */
+ return GO_UNKNOWN;
+ case 28: /* WAKE */
+ return GO_UNKNOWN;
+ case 29: /* SUSP */
+ return suspend();
+ case 30: /* RESU */
+ return resume();
+ case 31: /* FLY */
+ return fly(command->verb, INTRANSITIVE);
+ case 32: /* LISTE */
+ return listen();
+ case 33: /* ZZZZ */
+ return reservoir();
+ }
+ BUG(INTRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST);
+ }
+ /* FALLTHRU */
+ case transitive:
+ /* Analyse a transitive verb. */
+ switch (command->verb - 1) {
+ case 0: /* CARRY */
+ return vcarry(command->verb, command->obj);
+ case 1: /* DROP */
+ return discard(command->verb, command->obj, false);
+ case 2: /* SAY */
+ return say(command);
+ case 3: /* UNLOC */
+ return lock(command->verb, command->obj);
+ case 4: { /* NOTHI */
+ rspeak(OK_MAN);
+ return (GO_CLEAROBJ);
+ }
+ case 5: /* LOCK */
+ return lock(command->verb, command->obj);
+ case 6: /* LIGHT */
+ return light(command->verb, command->obj);
+ case 7: /* EXTI */
+ return extinguish(command->verb, command->obj);
+ case 8: /* WAVE */
+ return wave(command->verb, command->obj);
+ case 9: { /* CALM */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 10: { /* WALK */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 11: /* ATTAC */
+ return attack(input, command);
+ case 12: /* POUR */
+ return pour(command->verb, command->obj);
+ case 13: /* EAT */
+ return eat(command->verb, command->obj);
+ case 14: /* DRINK */
+ return drink(command->verb, command->obj);
+ case 15: /* RUB */
+ return rub(command->verb, command->obj);
+ case 16: /* TOSS */
+ return throw(input, command);
+ case 17: { /* QUIT */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 18: /* FIND */
+ return find(command->verb, command->obj);
+ case 19: /* INVEN */
+ return find(command->verb, command->obj);
+ case 20: /* FEED */
+ return feed(command->verb, command->obj);
+ case 21: /* FILL */
+ return fill(command->verb, command->obj);
+ case 22: /* BLAST */
+ blast();
+ return GO_CLEAROBJ;
+ case 23: { /* SCOR */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 24: { /* FOO */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 25: { /* BRIEF */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 26: /* READ */
+ return read(*command);
+ case 27: /* BREAK */
+ return vbreak(command->verb, command->obj);
+ case 28: /* WAKE */
+ return wake(command->verb, command->obj);
+ case 29: { /* SUSP */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 30: { /* RESU */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 31: /* FLY */
+ return fly(command->verb, command->obj);
+ case 32: { /* LISTE */
+ rspeak(spk);
+ return GO_CLEAROBJ;
+ }
+ case 33: /* ZZZZ */
+ return reservoir();
+ }
+ BUG(TRANSITIVE_ACTION_VERB_EXCEEDS_GOTO_LIST);
+ case unknown:
+ /* Unknown verb, couldn't deduce object - might need hint */
+ rspeak(WHAT_DO, command->wd1, command->wd1x);
+ return GO_CHECKHINT;