Unspk'd pour command
authorNHOrus <jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:12:19 +0000 (06:12 +0300)
committerNHOrus <jy6x2b32pie9@yahoo.com>
Mon, 3 Jul 2017 03:12:19 +0000 (06:12 +0300)
actions.c
cheat.c
main.c
misc.c

index 5dfb987a74f8e92ce02edd9ca36bb3defd1591b0..52c041791f6c67b90574dfb79a86c03268b2f419 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -873,33 +873,30 @@ static int pour(token_t verb, token_t obj)
 /*  Pour.  If no object, or object is bottle, assume contents of bottle.
  *  special tests for pouring water or oil on plant or rusty door. */
 {
-    int spk = actions[verb].message;
     if (obj == BOTTLE || obj == NO_OBJECT)
         obj = LIQUID();
     if (obj == NO_OBJECT)
         return GO_UNKNOWN;
     if (!TOTING(obj)) {
-        rspeak(spk);
+        rspeak(actions[verb].message);
         return GO_CLEAROBJ;
     }
-    spk = CANT_POUR;
+
     if (obj != OIL && obj != WATER) {
-        rspeak(spk);
+        rspeak(CANT_POUR);
         return GO_CLEAROBJ;
     }
     if (HERE(URN) && game.prop[URN] == URN_EMPTY)
         return fill(verb, URN);
     game.prop[BOTTLE] = EMPTY_BOTTLE;
     game.place[obj] = LOC_NOWHERE;
-    spk = GROUND_WET;
     if (!(AT(PLANT) || AT(DOOR))) {
-        rspeak(spk);
+        rspeak(GROUND_WET);
         return GO_CLEAROBJ;
     }
     if (!AT(DOOR)) {
-        spk = SHAKING_LEAVES;
         if (obj != WATER) {
-            rspeak(spk);
+            rspeak(SHAKING_LEAVES);
             return GO_CLEAROBJ;
         }
         pspeak(PLANT, look, game.prop[PLANT] + 3, true);
diff --git a/cheat.c b/cheat.c
index c8eae38101229995d968bf10f6931e142af55693..b07b1021c1f875d423a784abaac02dbb13c93fcd 100644 (file)
--- a/cheat.c
+++ b/cheat.c
@@ -19,8 +19,8 @@ int main(int argc, char *argv[])
 
     // Initialize game variables
     initialise();
-    
-    /* we're generating a saved game, so saved once by default, 
+
+    /* we're generating a saved game, so saved once by default,
      * unless overridden with command-line options below.
      */
     game.saved = 1;
diff --git a/main.c b/main.c
index 8dcaa52eda8e465e4e2a31817acd6ffc8e46b5d4..53da082da6566c933b6696149ddb0cb57e11ed4a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -689,7 +689,7 @@ static bool playermove( int motion)
                      * entries check for game.prop(TROLL)=0.)  Special
                      * stuff for bear. */
                     if (game.prop[TROLL] == TROLL_PAIDONCE) {
-                     pspeak(TROLL, look, TROLL_PAIDONCE, true);
+                        pspeak(TROLL, look, TROLL_PAIDONCE, true);
                         game.prop[TROLL] = TROLL_UNPAID;
                         move(TROLL2, 0);
                         move(TROLL2 + NOBJECTS, 0);
@@ -1006,7 +1006,7 @@ L2600:
          *  tick game.clock1 unless well into cave (and not at Y2). */
         if (game.closed) {
             if (game.prop[OYSTER] < 0 && TOTING(OYSTER))
-             pspeak(OYSTER, look, 1, true);
+                pspeak(OYSTER, look, 1, true);
             for (size_t i = 1; i <= NOBJECTS; i++) {
                 if (TOTING(i) && game.prop[i] < 0)
                     game.prop[i] = -1 - game.prop[i];
diff --git a/misc.c b/misc.c
index dc6cec50a2704b1631ab23f5a8af3ace5a27f71d..3d306b6b3573affc278d18bdc9918a47e283b09d 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -166,7 +166,7 @@ void vspeak(const char* msg, bool blank, va_list ap)
         return;
 
     if (blank == true)
-      printf("\n");
+        printf("\n");
 
     int msglen = strlen(msg);
 
@@ -267,19 +267,19 @@ void pspeak(vocab_t msg, enum speaktype mode, int skip, bool blank, ...)
     va_start(ap, blank);
     switch (mode) {
     case touch:
-      vspeak(objects[msg].inventory, blank, ap);
+        vspeak(objects[msg].inventory, blank, ap);
         break;
     case look:
-      vspeak(objects[msg].descriptions[skip], blank, ap);
+        vspeak(objects[msg].descriptions[skip], blank, ap);
         break;
     case hear:
-      vspeak(objects[msg].sounds[skip], blank, ap);
+        vspeak(objects[msg].sounds[skip], blank, ap);
         break;
     case study:
-      vspeak(objects[msg].texts[skip], blank, ap);
+        vspeak(objects[msg].texts[skip], blank, ap);
         break;
     case change:
-      vspeak(objects[msg].changes[skip], blank, ap);
+        vspeak(objects[msg].changes[skip], blank, ap);
         break;
     }
     va_end(ap);