Limit visibility of ugly globals.
[open-adventure.git] / actions.c
index 3e811f9da226ec6d979703d4a5dbe0cc97e6e073..d5579159870b7575253a7d6910204fc3f72b9b69 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -3,6 +3,9 @@
 #include "advent.h"
 #include "database.h"
 
+/* Limit visibility of ugly globals.  Eventually these should go away. */
+extern long K, SPK, WD1, WD1X, WD2, WD2X;
+
 /*
  * Action handlers.  Eventually we'll do lookup through a method table
  * that calls these.  Absolutely nothing like the original FORTRAN.
@@ -180,8 +183,8 @@ static int vbreak(token_t obj)
        game.fixed[VASE]= -1;
     } else {
        if (obj == MIRROR && game.closed) {
-           SPK=197;
-           return(18999);
+           RSPEAK(197);
+           return(190000);
        }
     }
     RSPEAK(SPK);
@@ -926,8 +929,8 @@ static int wake(token_t obj)
 /* Wake.  Only use is to disturb the dwarves. */
 {
     if (obj != DWARF || !game.closed) {RSPEAK(SPK); return 2012;}
-    SPK=199;
-    return(18999);
+    RSPEAK(199);
+    return(19000);
 }
 
 static int wave(token_t obj)
@@ -949,7 +952,10 @@ static int wave(token_t obj)
        RSPEAK(SPK);
        return 2012;
     } else {
-       if (game.closed) return(18999);
+       if (game.closed) {
+           RSPEAK(SPK);        /* FIXME: How is SPK set here? */
+           return(19000);
+       }
        if (game.closng || !AT(FISSUR)) {RSPEAK(SPK); return 2012;}
        if (HERE(BIRD))RSPEAK(SPK);
        game.prop[FISSUR]=1-game.prop[FISSUR];