2004-01-29
* fixed bug: infotron can now smash yellow disks
+ * fixed bug: when gravity active, port above player can now be entered
+ * removed "one white dot" mouse pointer which irritated some people
2004-01-26
* added "choice type" for group element selection
-#define COMPILE_DATE_STRING "[2004-01-29 17:39]"
+#define COMPILE_DATE_STRING "[2004-01-29 18:51]"
redraw_mask |= REDRAW_FIELD;
}
-static boolean canEnterSupaplexPort(int x, int y, int move_dir)
+static boolean canEnterSupaplexPort(int x, int y, int dx, int dy)
{
- int dx = (move_dir & MV_LEFT ? -1 : move_dir & MV_RIGHT ? +1 : 0);
- int dy = (move_dir & MV_UP ? -1 : move_dir & MV_DOWN ? +1 : 0);
int nextx = x + dx, nexty = y + dy;
int element = Feld[x][y];
boolean player_is_moving_to_valid_field =
(IN_LEV_FIELD(new_jx, new_jy) &&
(Feld[new_jx][new_jy] == EL_SP_BASE ||
- Feld[new_jx][new_jy] == EL_SAND));
+ Feld[new_jx][new_jy] == EL_SAND ||
+ (IS_SP_PORT(Feld[new_jx][new_jy]) &&
+ canEnterSupaplexPort(new_jx, new_jy, dx, dy))));
/* !!! extend EL_SAND to anything diggable !!! */
if (field_under_player_is_free &&
case EL_SP_GRAVITY_PORT_RIGHT:
case EL_SP_GRAVITY_PORT_UP:
case EL_SP_GRAVITY_PORT_DOWN:
+#if 1
+ if (!canEnterSupaplexPort(x, y, dx, dy))
+ return MF_NO_ACTION;
+#else
if ((dx == -1 &&
element != EL_SP_PORT_LEFT &&
element != EL_SP_GRAVITY_PORT_LEFT &&
!IN_LEV_FIELD(nextx, nexty) ||
!IS_FREE(nextx, nexty))
return MF_NO_ACTION;
+#endif
if (element == EL_SP_GRAVITY_PORT_LEFT ||
element == EL_SP_GRAVITY_PORT_RIGHT ||
SET_PROPERTY(i, EP_CAN_EXPLODE_3X3, (CAN_EXPLODE(i) &&
!CAN_EXPLODE_1X1(i) &&
!CAN_EXPLODE_DYNA(i)));
+
+ /* ---------- SP_PORT -------------------------------------------------- */
+ SET_PROPERTY(i, EP_SP_PORT, (IS_SP_ELEMENT(i) &&
+ IS_PASSABLE_INSIDE(i)));
+
#if 0
if (i == EL_CUSTOM_START + 253)
printf("::: %d, %d, %d -> %d\n",
". c #ffffff",
" c None",
+#if 1
+ /* some people complained about a "white dot" on the screen and thought it
+ was a graphical error... OK, let's just remove the whole pointer :-) */
+
+ /* pixels */
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+
+ /* hot spot */
+ "0,0"
+#else
/* pixels */
" X ",
"X.X ",
/* hot spot */
"1,1"
+#endif
};
#if defined(TARGET_SDL)
#define EP_CAN_SMASH 69
#define EP_CAN_EXPLODE 70
#define EP_CAN_EXPLODE_3X3 71
+#define EP_SP_PORT 72
/* values for internal purpose only (level editor) */
-#define EP_EXPLODE_RESULT 72
-#define EP_WALK_TO_OBJECT 73
-#define EP_DEADLY 74
+#define EP_EXPLODE_RESULT 73
+#define EP_WALK_TO_OBJECT 74
+#define EP_DEADLY 75
-#define NUM_ELEMENT_PROPERTIES 75
+#define NUM_ELEMENT_PROPERTIES 76
#define NUM_EP_BITFIELDS ((NUM_ELEMENT_PROPERTIES + 31) / 32)
#define EP_BITFIELD_BASE 0
#define CAN_SMASH(e) HAS_PROPERTY(e, EP_CAN_SMASH)
#define CAN_EXPLODE(e) HAS_PROPERTY(e, EP_CAN_EXPLODE)
#define CAN_EXPLODE_3X3(e) HAS_PROPERTY(e, EP_CAN_EXPLODE_3X3)
+#define IS_SP_PORT(e) HAS_PROPERTY(e, EP_SP_PORT)
/* special macros used in game engine */
#define IS_CUSTOM_ELEMENT(e) ((e) >= EL_CUSTOM_START && \