rnd-20030628-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 28 Jun 2003 08:33:16 +0000 (10:33 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:42:21 +0000 (10:42 +0200)
src/conftime.h
src/editor.c
src/game.c
src/libgame/system.h

index 2438837ce278df00359b656f5a4936092e57295f..2eb3b39c23d51a6db4f59313e8df1a3b6f5d059d 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2003-06-27 20:39]"
+#define COMPILE_DATE_STRING "[2003-06-28 00:49]"
index e56fa695c08339ca4117751f2ffbbba329754c0d..bfec772db3a0f9b5e91ffde7d4976d4765b42090 100644 (file)
@@ -849,6 +849,8 @@ static struct ValueTextInfo options_move_pattern[] =
   { MV_AWAY_FROM_PLAYER,       "away from player"              },
   { MV_ALONG_LEFT_SIDE,                "along left side"               },
   { MV_ALONG_RIGHT_SIDE,       "along right side"              },
+  { MV_TURNING_LEFT,           "turning left"                  },
+  { MV_TURNING_RIGHT,          "turning right"                 },
   { -1,                                NULL                            }
 };
 
index f29054575911e49267634b141081c3caba569368..61baa07ce653f8907193700e2a6b1d1071afb30c 100644 (file)
                                        (condition)))
 
 #define ELEMENT_CAN_ENTER_FIELD(e, x, y)                               \
-       ELEMENT_CAN_ENTER_FIELD_GENERIC(e, x, y, 1)
+       ELEMENT_CAN_ENTER_FIELD_GENERIC(e, x, y, 0)
 
 #define ELEMENT_CAN_ENTER_FIELD_OR_ACID(e, x, y)                       \
        ELEMENT_CAN_ENTER_FIELD_GENERIC(e, x, y, (Feld[x][y] == EL_ACID))
@@ -1239,7 +1239,9 @@ void InitMovDir(int x, int y)
       {
        if (element_info[element].move_direction_initial != MV_NO_MOVING)
          MovDir[x][y] = element_info[element].move_direction_initial;
-       else if (element_info[element].move_pattern == MV_ALL_DIRECTIONS)
+       else if (element_info[element].move_pattern == MV_ALL_DIRECTIONS ||
+                element_info[element].move_pattern == MV_TURNING_LEFT ||
+                element_info[element].move_pattern == MV_TURNING_RIGHT)
          MovDir[x][y] = 1 << RND(4);
        else if (element_info[element].move_pattern == MV_HORIZONTAL)
          MovDir[x][y] = (RND(2) ? MV_LEFT : MV_RIGHT);
@@ -3045,12 +3047,18 @@ void TurnRound(int x, int y)
       }
     }
   }
-  else if (element_info[element].move_pattern == MV_ALL_DIRECTIONS)
+  else if (element_info[element].move_pattern == MV_ALL_DIRECTIONS ||
+          element_info[element].move_pattern == MV_TURNING_LEFT ||
+          element_info[element].move_pattern == MV_TURNING_RIGHT)
   {
     boolean can_turn_left  = ELEMENT_CAN_ENTER_FIELD(element, left_x, left_y);
     boolean can_turn_right = ELEMENT_CAN_ENTER_FIELD(element, right_x,right_y);
 
-    if (can_turn_left && can_turn_right)
+    if (element_info[element].move_pattern == MV_TURNING_LEFT)
+      MovDir[x][y] = left_dir;
+    else if (element_info[element].move_pattern == MV_TURNING_RIGHT)
+      MovDir[x][y] = right_dir;
+    else if (can_turn_left && can_turn_right)
       MovDir[x][y] = (RND(3) ? (RND(2) ? left_dir : right_dir) : back_dir);
     else if (can_turn_left)
       MovDir[x][y] = (RND(2) ? left_dir : back_dir);
@@ -3471,7 +3479,9 @@ void StartMoving(int x, int y)
       if (element != EL_YAMYAM &&
          element != EL_DARK_YAMYAM &&
          element != EL_PACMAN &&
-         !(element_info[element].move_pattern & MV_ANY_DIRECTION))
+         !(element_info[element].move_pattern & MV_ANY_DIRECTION) &&
+         element_info[element].move_pattern != MV_TURNING_LEFT &&
+         element_info[element].move_pattern != MV_TURNING_RIGHT)
       {
        TurnRound(x, y);
 
index bc0256361c86adf56dc712ed007f7a62147f32ab..76a421bdbb5256974c432be1719fd4407a33dc8d 100644 (file)
@@ -86,6 +86,8 @@
 #define MV_BIT_AWAY_FROM_PLAYER        7
 #define MV_BIT_ALONG_LEFT_SIDE 8
 #define MV_BIT_ALONG_RIGHT_SIDE        9
+#define MV_BIT_TURNING_LEFT    10
+#define MV_BIT_TURNING_RIGHT   11
 
 /* values for move direction/pattern and special "button" key bitmasks */
 #define MV_NO_MOVING           0
 #define MV_AWAY_FROM_PLAYER    (1 << MV_BIT_AWAY_FROM_PLAYER)
 #define MV_ALONG_LEFT_SIDE     (1 << MV_BIT_ALONG_LEFT_SIDE)
 #define MV_ALONG_RIGHT_SIDE    (1 << MV_BIT_ALONG_RIGHT_SIDE)
+#define MV_TURNING_LEFT                (1 << MV_BIT_TURNING_LEFT)
+#define MV_TURNING_RIGHT       (1 << MV_BIT_TURNING_RIGHT)
 
 /* values for button status */
 #define MB_NOT_PRESSED         FALSE