IMG_SPRING
},
{
- EL_SPRING_MOVING, -1, GFX_ACTION_MOVING,
+ EL_SPRING, -1, GFX_ACTION_MOVING,
IMG_SPRING_MOVING
},
{
-#define COMPILE_DATE_STRING "[2002-10-28 22:52]"
+#define COMPILE_DATE_STRING "[2002-11-17 04:09]"
Feld[x][y] = EL_SP_MURPHY_CLONE;
break;
}
+
+ Feld[x][y] = EL_PLAYER1;
}
/* no break! */
case EL_PLAYER1:
int element = Feld[x][y];
int old_move_dir = MovDir[x][y];
- int left_dir = turn[old_move_dir].left;
+ int left_dir = turn[old_move_dir].left;
int right_dir = turn[old_move_dir].right;
- int back_dir = turn[old_move_dir].back;
+ int back_dir = turn[old_move_dir].back;
- int left_dx = move_xy[left_dir].x, left_dy = move_xy[left_dir].y;
- int right_dx = move_xy[right_dir].x, right_dy = move_xy[right_dir].y;
- int move_dx = move_xy[old_move_dir].x, move_dy = move_xy[old_move_dir].y;
- int back_dx = move_xy[back_dir].x, back_dy = move_xy[back_dir].y;
+ int left_dx = move_xy[left_dir].x, left_dy = move_xy[left_dir].y;
+ int right_dx = move_xy[right_dir].x, right_dy = move_xy[right_dir].y;
+ int move_dx = move_xy[old_move_dir].x, move_dy = move_xy[old_move_dir].y;
+ int back_dx = move_xy[back_dir].x, back_dy = move_xy[back_dir].y;
- int left_x = x+left_dx, left_y = y+left_dy;
- int right_x = x+right_dx, right_y = y+right_dy;
- int move_x = x+move_dx, move_y = y+move_dy;
+ int left_x = x + left_dx, left_y = y + left_dy;
+ int right_x = x + right_dx, right_y = y + right_dy;
+ int move_x = x + move_dx, move_y = y + move_dy;
if (element == EL_BUG || element == EL_BD_BUTTERFLY)
{
MovDir[x][y] = game.balloon_dir;
MovDelay[x][y] = 0;
}
- else if (element == EL_SPRING_MOVING)
+ else if (element == EL_SPRING)
{
- if (!IN_LEV_FIELD(move_x, move_y) || !IS_FREE(move_x, move_y) ||
- (IN_LEV_FIELD(x, y+1) && IS_FREE(x, y+1)))
- {
- Feld[x][y] = EL_SPRING;
+ if ((MovDir[x][y] == MV_LEFT || MovDir[x][y] == MV_RIGHT) &&
+ (!IN_LEV_FIELD(move_x, move_y) || !IS_FREE(move_x, move_y) ||
+ (IN_LEV_FIELD(x, y + 1) && IS_FREE(x, y + 1))))
MovDir[x][y] = MV_NO_MOVING;
- }
+
MovDelay[x][y] = 0;
}
- else if (element == EL_ROBOT || element == EL_SATELLITE || element == EL_PENGUIN)
+ else if (element == EL_ROBOT ||
+ element == EL_SATELLITE ||
+ element == EL_PENGUIN)
{
int attr_x = -1, attr_y = -1;
}
}
}
- else if (CAN_MOVE(element))
+
+ if (CAN_MOVE(element)) /* not "else if" because of EL_SPRING */
{
int newx, newy;
- if ((element == EL_SATELLITE || element == EL_BALLOON ||
- element == EL_SPRING_MOVING)
+ if ((element == EL_SATELLITE ||
+ element == EL_BALLOON ||
+ element == EL_SPRING)
&& JustBeingPushed(x, y))
return;
+ if (element == EL_SPRING && MovDir[x][y] == MV_DOWN)
+ Feld[x][y + 1] = EL_EMPTY; /* was set to EL_BLOCKED above */
+
if (!MovDelay[x][y]) /* start new movement phase */
{
/* all objects that can change their move direction after each step */
/* (MAMPFER, MAMPFER2 and PACMAN go straight until they hit a wall */
- if (element!=EL_YAMYAM && element!=EL_DARK_YAMYAM && element!=EL_PACMAN)
+ if (element != EL_YAMYAM &&
+ element != EL_DARK_YAMYAM &&
+ element != EL_PACMAN)
{
+#if 0
+ if (element == EL_SPRING)
+ printf("1--> %d\n", MovDir[x][y]);
+#endif
TurnRound(x, y);
-
+#if 0
+ if (element == EL_SPRING)
+ printf("2--> %d\n", MovDir[x][y]);
+#endif
if (MovDelay[x][y] && (element == EL_BUG ||
element == EL_SPACESHIP ||
element == EL_SP_SNIKSNAK ||
int direction = MovDir[x][y];
int dx = (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0);
int dy = (direction == MV_UP ? -1 : direction == MV_DOWN ? +1 : 0);
- int horiz_move = (dx!=0);
+ int horiz_move = (dx != 0);
int newx = x + dx, newy = y + dy;
int step = (horiz_move ? dx : dy) * TILEX / 8;
else if (CAN_FALL(element) && horiz_move &&
y < lev_fieldy-1 && IS_BELT_ACTIVE(Feld[x][y+1]))
step /= 2;
- else if (element == EL_SPRING_MOVING)
- step*=2;
+ else if (element == EL_SPRING && horiz_move)
+ step *= 2;
#if OLD_GAME_BEHAVIOUR
else if (CAN_FALL(element) && horiz_move && !IS_SP_ELEMENT(element))
GfxAction[newx][newy] = GfxAction[x][y]; /* keep action one frame */
GfxAction[x][y] = GFX_ACTION_DEFAULT;
+#if 0
if (!CAN_MOVE(element))
MovDir[newx][newy] = 0;
+#else
+ if (CAN_FALL(element) && MovDir[newx][newy] == MV_DOWN)
+ MovDir[newx][newy] = 0;
+#endif
DrawLevelField(x, y);
DrawLevelField(newx, newy);
else
{
RemoveField(x, y);
- Feld[x+dx][y+dy] = element;
+ Feld[x + dx][y + dy] = element;
}
if (element == EL_SPRING)
{
- Feld[x+dx][y+dy] = EL_SPRING_MOVING;
- MovDir[x+dx][y+dy] = move_direction;
+ Feld[x + dx][y + dy] = EL_SPRING;
+ MovDir[x + dx][y + dy] = move_direction;
}
player->push_delay_value = (element == EL_SPRING ? 0 : 2 + RND(8));
EL_SP_SNIKSNAK,
EL_SP_ELECTRON,
EL_BALLOON,
- EL_SPRING_MOVING
+ EL_SPRING
};
static int ep_can_move_num = SIZEOF_ARRAY_INT(ep_can_move);
{ "twinkle_blue.frames", "3" },
{ "twinkle_blue.delay", "2" },
{ "twinkle_blue.mode_pingpong", "1" },
+ { "twinkle_blue.global_sync", "0" },
{ "twinkle_white", "RocksHeroes.pcx" },
{ "twinkle_white.xpos", "13" },
{ "twinkle_white.ypos", "11" },
{ "twinkle_white.frames", "3" },
{ "twinkle_white.delay", "2" },
{ "twinkle_white.mode_pingpong", "1" },
+ { "twinkle_white.global_sync", "0" },
{ "steelwall_topleft", "RocksElements.pcx" },
{ "steelwall_topleft.xpos", "0" },
#define EL_TIMEGATE_CLOSING (EL_FIRST_RUNTIME_REAL + 20)
#define EL_PEARL_BREAKING (EL_FIRST_RUNTIME_REAL + 21)
#define EL_TRAP_ACTIVE (EL_FIRST_RUNTIME_REAL + 22)
-#define EL_SPRING_MOVING (EL_FIRST_RUNTIME_REAL + 23)
-#define EL_SP_MURPHY_CLONE (EL_FIRST_RUNTIME_REAL + 24)
-#define EL_QUICKSAND_EMPTYING (EL_FIRST_RUNTIME_REAL + 25)
-#define EL_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 26)
-#define EL_BD_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 27)
-#define EL_AMOEBA_DRIPPING (EL_FIRST_RUNTIME_REAL + 28)
-#define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME_REAL + 29)
-#define EL_INVISIBLE_STEELWALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 30)
-#define EL_INVISIBLE_SAND_ACTIVE (EL_FIRST_RUNTIME_REAL + 31)
-#define EL_INVISIBLE_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 32)
-#define EL_CONVEYOR_BELT1_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 33)
-#define EL_CONVEYOR_BELT1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 34)
-#define EL_CONVEYOR_BELT1_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 35)
-#define EL_CONVEYOR_BELT2_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 36)
-#define EL_CONVEYOR_BELT2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 37)
-#define EL_CONVEYOR_BELT2_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 38)
-#define EL_CONVEYOR_BELT3_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 39)
-#define EL_CONVEYOR_BELT3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 40)
-#define EL_CONVEYOR_BELT3_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 41)
-#define EL_CONVEYOR_BELT4_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 42)
-#define EL_CONVEYOR_BELT4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 43)
-#define EL_CONVEYOR_BELT4_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 44)
+#define EL_SP_MURPHY_CLONE (EL_FIRST_RUNTIME_REAL + 23)
+#define EL_QUICKSAND_EMPTYING (EL_FIRST_RUNTIME_REAL + 24)
+#define EL_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 25)
+#define EL_BD_MAGIC_WALL_EMPTYING (EL_FIRST_RUNTIME_REAL + 26)
+#define EL_AMOEBA_DRIPPING (EL_FIRST_RUNTIME_REAL + 27)
+#define EL_SP_EXIT_OPEN (EL_FIRST_RUNTIME_REAL + 28)
+#define EL_INVISIBLE_STEELWALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 29)
+#define EL_INVISIBLE_SAND_ACTIVE (EL_FIRST_RUNTIME_REAL + 30)
+#define EL_INVISIBLE_WALL_ACTIVE (EL_FIRST_RUNTIME_REAL + 31)
+#define EL_CONVEYOR_BELT1_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 32)
+#define EL_CONVEYOR_BELT1_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 33)
+#define EL_CONVEYOR_BELT1_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 34)
+#define EL_CONVEYOR_BELT2_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 35)
+#define EL_CONVEYOR_BELT2_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 36)
+#define EL_CONVEYOR_BELT2_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 37)
+#define EL_CONVEYOR_BELT3_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 38)
+#define EL_CONVEYOR_BELT3_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 39)
+#define EL_CONVEYOR_BELT3_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 40)
+#define EL_CONVEYOR_BELT4_LEFT_ACTIVE (EL_FIRST_RUNTIME_REAL + 41)
+#define EL_CONVEYOR_BELT4_MIDDLE_ACTIVE (EL_FIRST_RUNTIME_REAL + 42)
+#define EL_CONVEYOR_BELT4_RIGHT_ACTIVE (EL_FIRST_RUNTIME_REAL + 43)
/* "unreal" (and therefore not drawable) runtime elements */
-#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 45)
+#define EL_FIRST_RUNTIME_UNREAL (EL_FIRST_RUNTIME_REAL + 44)
#define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0)
#define EL_EXPLOSION (EL_FIRST_RUNTIME_UNREAL + 1)
if (player_is_moving && last_element == EL_EXPLOSION)
{
- int frame = Frame[last_jx][last_jy];
- int delay = 2;
+ int graphic = IMG_EXPLOSION;
+ int phase = Frame[last_jx][last_jy] - 1;
+ int delay = (game.emulation == EMU_SUPAPLEX ? 3 : 2);
+ int frame = (phase / delay - 1);
- if (frame > 2)
- DrawGraphicThruMask(SCREENX(last_jx), SCREENY(last_jy), GFX_EXPLOSION,
- ((frame - 1) / delay - 1));
+ if (game.emulation == EMU_SUPAPLEX)
+ graphic = (Store[last_jx][last_jy] == EL_SP_INFOTRON ?
+ IMG_SP_EXPLOSION_INFOTRON :
+ IMG_SP_EXPLOSION);
+
+ if (frame >= 0)
+ DrawGraphicThruMask(SCREENX(last_jx), SCREENY(last_jy), graphic, frame);
}
/* draw elements that stay over the player */
/* handle the field the player is leaving ... */
if (player_is_moving && IS_OVER_PLAYER(last_element))
DrawLevelField(last_jx, last_jy);
+
/* ... and the field the player is entering */
if (IS_OVER_PLAYER(element))
DrawLevelField(jx, jy);
case EL_TUBE_RIGHT_UP: return GFX_TUBE_RIGHT_UP;
case EL_TUBE_RIGHT_DOWN: return GFX_TUBE_RIGHT_DOWN;
case EL_SPRING: return GFX_SPRING;
- case EL_SPRING_MOVING: return GFX_SPRING;
case EL_TRAP: return GFX_TRAP_INACTIVE;
case EL_TRAP_ACTIVE: return GFX_TRAP_ACTIVE;
case EL_BD_WALL: return GFX_BD_WALL;