void DumpTile(int x, int y)
{
int sx = SCREENX(x);
- int sy = SCREENX(y);
+ int sy = SCREENY(y);
printf_line("-", 79);
printf("Field Info: SCREEN(%d, %d), LEVEL(%d, %d)\n", sx, sy, x, y);
/* draw elements the player is just walking/passing through/under */
/* ----------------------------------------------------------------------- */
- /* handle the field the player is leaving ... */
- if (player_is_moving && IS_ACCESSIBLE_INSIDE(last_element))
- DrawLevelField(last_jx, last_jy);
- else if (player_is_moving && IS_ACCESSIBLE_UNDER(last_element))
- DrawLevelFieldThruMask(last_jx, last_jy);
+ if (player_is_moving)
+ {
+ /* handle the field the player is leaving ... */
+ if (IS_ACCESSIBLE_INSIDE(last_element))
+ DrawLevelField(last_jx, last_jy);
+ else if (IS_ACCESSIBLE_UNDER(last_element))
+ DrawLevelFieldThruMask(last_jx, last_jy);
+ }
+
+#if 1
+ /* do not redraw accessible elements if the player is just pushing them */
+ if (!player_is_moving || !player->is_pushing)
+ {
+ /* ... and the field the player is entering */
+ if (IS_ACCESSIBLE_INSIDE(element))
+ DrawLevelField(jx, jy);
+ else if (IS_ACCESSIBLE_UNDER(element))
+ DrawLevelFieldThruMask(jx, jy);
+ }
+
+#else
#if 0
/* !!! I have forgotton what this should be good for !!! */
else if (IS_ACCESSIBLE_UNDER(element))
DrawLevelFieldThruMask(jx, jy);
}
+#endif
if (setup.direct_draw)
{
void AnimateEnvelope(int envelope_nr, int anim_mode, int action)
{
int graphic = IMG_BACKGROUND_ENVELOPE_1 + envelope_nr;
+#if 1
+ Bitmap *src_bitmap = graphic_info[graphic].bitmap;
+ int mask_mode = (src_bitmap != NULL ? BLIT_MASKED : BLIT_ON_BACKGROUND);
+#else
boolean draw_masked = graphic_info[graphic].draw_masked;
int mask_mode = (draw_masked ? BLIT_MASKED : BLIT_ON_BACKGROUND);
+#endif
boolean ffwd_delay = (tape.playing && tape.fast_forward);
boolean no_delay = (tape.warp_forward);
unsigned long anim_delay = 0;
int el_act_dir2img(int element, int action, int direction)
{
element = GFX_ELEMENT(element);
- direction = MV_DIR_BIT(direction);
+ direction = MV_DIR_BIT(direction); /* default: MV_NO_MOVING => MV_DOWN */
return element_info[element].direction_graphic[action][direction];
}
static int el_act_dir2crm(int element, int action, int direction)
{
element = GFX_ELEMENT(element);
- direction = MV_DIR_BIT(direction);
+ direction = MV_DIR_BIT(direction); /* default: MV_NO_MOVING => MV_DOWN */
return element_info[element].direction_crumbled[action][direction];
}