projects
/
open-adventure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e723b7e
)
Fix uninitialized-variable warning.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 12 Jun 2017 09:28:28 +0000
(
05:28
-0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 12 Jun 2017 09:28:28 +0000
(
05:28
-0400)
actions.c
patch
|
blob
|
history
diff --git
a/actions.c
b/actions.c
index 3cef764eec1804662df4230f60ec9ddca5866c35..c1f889f091514df513068bf69155619ab3caeabb 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-8,7
+8,7
@@
extern long WD1, WD1X, WD2, WD2X;
/*
* Action handlers. Eventually we'll do lookup through a method table
/*
* Action handlers. Eventually we'll do lookup through a method table
- * that calls these.
Absolutely nothing like the original FORTRAN.
+ * that calls these.
*/
static int fill(token_t verb, token_t);
*/
static int fill(token_t verb, token_t);
@@
-648,10
+648,10
@@
static int inven(token_t obj)
return 2012;
}
return 2012;
}
-int light(token_t obj)
+int light(token_t
verb, token_t
obj)
/* Light. Applicable only to lamp and urn. */
{
/* Light. Applicable only to lamp and urn. */
{
- int spk;
+ int spk
= ACTSPK[verb]
;
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == 0 && game.limit >= 0)obj=LAMP;
if (HERE(URN) && game.prop[URN] == 1)obj=obj*NOBJECTS+URN;
if (obj == INTRANSITIVE) {
if (HERE(LAMP) && game.prop[LAMP] == 0 && game.limit >= 0)obj=LAMP;
if (HERE(URN) && game.prop[URN] == 1)obj=obj*NOBJECTS+URN;
@@
-860,7
+860,7
@@
static int rub(token_t verb, token_t obj)
}
static int say(void)
}
static int say(void)
-/* S
AY
. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
+/* S
ay
. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
{
/* FIXME: ugly use of globals */
SETPRM(1,WD2,WD2X);
{
/* FIXME: ugly use of globals */
SETPRM(1,WD2,WD2X);
@@
-1079,7
+1079,7
@@
int action(FILE *input, enum speechpart part, long verb, token_t obj)
case 3: /* UNLOC */ return lock(verb, INTRANSITIVE);
case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
case 5: /* LOCK */ return lock(verb, INTRANSITIVE);
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 6: /* LIGHT */ return light(
verb,
INTRANSITIVE);
case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE);
case 8: /* WAVE */ return(8000);
case 9: /* CALM */ return(8000);
case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE);
case 8: /* WAVE */ return(8000);
case 9: /* CALM */ return(8000);
@@
-1120,7
+1120,7
@@
int action(FILE *input, enum speechpart part, long verb, token_t obj)
case 3: /* UNLOC */ return lock(verb, obj);
case 4: /* NOTHI */ {RSPEAK(54); return(20012);}
case 5: /* LOCK */ return lock(verb, obj);
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 6: /* LIGHT */ return light(
verb,
obj);
case 7: /* EXTI */ return extinguish(verb, obj);
case 8: /* WAVE */ return wave(verb, obj);
case 9: /* CALM */ {RSPEAK(spk); return 2012;}
case 7: /* EXTI */ return extinguish(verb, obj);
case 8: /* WAVE */ return wave(verb, obj);
case 9: /* CALM */ {RSPEAK(spk); return 2012;}