projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change NAPLIN signature - prepration for linenoise.
[open-adventure.git]
/
main.c
diff --git
a/main.c
b/main.c
index 993cd523d11ea12f30335dc84bff577acd27ffd7..4a5d3c5deb797dd22e4d5a9017c03c6109aa85f5 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-659,6
+659,7
@@
static bool do_command(FILE *cmdin)
long KQ, VERB, KK, V1, V2;
long obj, i;
static long IGO = 0;
long KQ, VERB, KK, V1, V2;
long obj, i;
static long IGO = 0;
+ enum speechpart part;
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
@@
-844,19
+845,22
@@
L2630:
goto L3000;
K=MOD(i,1000);
KQ=i/1000+1;
goto L3000;
K=MOD(i,1000);
KQ=i/1000+1;
- switch (KQ-1) { case 0: goto L8; case 1: goto L5000; case 2: goto L4000;
- case 3: goto L2010; }
+ switch (KQ-1)
+ {
+ case 0: goto L8;
+ case 1: goto L5000;
+ case 2: goto L4000;
+ case 3: goto L2010;
+ }
BUG(22);
BUG(22);
-/* Get second word for analysis. */
-
+ /* Get second word for analysis. */
L2800: WD1=WD2;
WD1X=WD2X;
WD2=0;
L2800: WD1=WD2;
WD1X=WD2X;
WD2=0;
- goto L2620;
-
-/* Gee, I don't understand. */
+ goto L2620;
+ /* Gee, I don't understand. */
L3000: SETPRM(1,WD1,WD1X);
if (fallback_handler(rawbuf))
return true;
L3000: SETPRM(1,WD1,WD1X);
if (fallback_handler(rawbuf))
return true;
@@
-865,11
+869,11
@@
L3000: SETPRM(1,WD1,WD1X);
/* Verb and object analysis moved to separate module. */
/* Verb and object analysis moved to separate module. */
-L4000:
i=4000
; VERB=K; goto Laction;
-L4090:
i=4090
; goto Laction;
-L5000:
i=5000
; obj = K;
+L4000:
part=intransitive
; VERB=K; goto Laction;
+L4090:
part=transitive
; goto Laction;
+L5000:
part=unknown
; obj = K;
Laction:
Laction:
- switch (action(cmdin,
i
, VERB, obj)) {
+ switch (action(cmdin,
part
, VERB, obj)) {
case 2: return true;
case 8: goto L8;
case 2000: goto L2000;
case 2: return true;
case 8: goto L8;
case 2000: goto L2000;
@@
-887,18
+891,16
@@
Laction:
}
BUG(99);
}
BUG(99);
-/* Random intransitive verbs come here. Clear obj just in case (see "attack").
- */
-
+ /* Random intransitive verbs come here. Clear obj just in case
+ * (see attack()). */
L8000: SETPRM(1,WD1,WD1X);
RSPEAK(257);
obj=0;
goto L2600;
L8000: SETPRM(1,WD1,WD1X);
RSPEAK(257);
obj=0;
goto L2600;
-/* Figure out the new location */
-L8:
-
if (playermove(cmdin, VERB))
+ /* Figure out the new location */
+
L8:
if (playermove(cmdin, VERB))
return true;
else
goto L2000;
return true;
else
goto L2000;