player->is_collecting ? ACTION_COLLECTING :
player->is_moving ? ACTION_MOVING :
player->is_snapping ? ACTION_SNAPPING :
+ player->is_dropping ? ACTION_DROPPING :
player->is_waiting ? player->action_waiting : ACTION_DEFAULT);
InitPlayerGfxAnimation(player, action, move_dir);
SetDrawtoField(DRAW_DIRECT);
}
- MarkTileDirty(sx,sy);
+ MarkTileDirty(sx, sy);
}
void getGraphicSource(int graphic, int frame, Bitmap **bitmap, int *x, int *y)
BlitBitmap(src_bitmap, d, src_x, src_y, MINI_TILEX, MINI_TILEY, x, y);
}
-void DrawGraphicShifted(int x,int y, int dx,int dy, int graphic, int frame,
+void DrawGraphicShifted(int x, int y, int dx, int dy, int graphic, int frame,
int cut_mode, int mask_mode)
{
Bitmap *src_bitmap;
BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height,
dest_x, dest_y);
- MarkTileDirty(x,y);
+ MarkTileDirty(x, y);
}
void DrawGraphicShiftedThruMask(int x, int y, int dx, int dy, int graphic,
int frame, int cut_mode)
{
- DrawGraphicShifted(x,y, dx,dy, graphic, frame, cut_mode, USE_MASKING);
+ DrawGraphicShifted(x, y, dx, dy, graphic, frame, cut_mode, USE_MASKING);
}
void DrawScreenElementExt(int x, int y, int dx, int dy, int element,
DrawLevelElementExt(x, y, 0, 0, Feld[x][y], NO_CUTTING, USE_MASKING);
}
+#define TILE_GFX_ELEMENT(x, y) \
+ (GfxElement[x][y] != EL_UNDEFINED && Feld[x][y] != EL_EXPLOSION ? \
+ GfxElement[x][y] : Feld[x][y])
+
static void DrawLevelFieldCrumbledSandExt(int x, int y, int graphic, int frame)
{
Bitmap *src_bitmap;
if (!IN_LEV_FIELD(x, y))
return;
- element = (GfxElement[x][y] != EL_UNDEFINED && Feld[x][y] != EL_EXPLOSION ?
- GfxElement[x][y] : Feld[x][y]);
+ element = TILE_GFX_ELEMENT(x, y);
/* crumble field itself */
if (GFX_CRUMBLED(element) && !IS_MOVING(x, y))
int xx = x + xy[i][0];
int yy = y + xy[i][1];
+#if 1
+ element = (IN_LEV_FIELD(xx, yy) ? TILE_GFX_ELEMENT(xx, yy) :
+ BorderElement);
+#else
element = (IN_LEV_FIELD(xx, yy) ? Feld[xx][yy] : BorderElement);
+#endif
/* check if neighbour field is of same type */
if (GFX_CRUMBLED(element) && !IS_MOVING(xx, yy))
int sxx = sx + xy[i][0];
int syy = sy + xy[i][1];
+#if 1
+ if (!IN_LEV_FIELD(xx, yy) ||
+ !IN_SCR_FIELD(sxx, syy) ||
+ IS_MOVING(xx, yy))
+ continue;
+
+ element = TILE_GFX_ELEMENT(xx, yy);
+
+ if (!GFX_CRUMBLED(element))
+ continue;
+#else
if (!IN_LEV_FIELD(xx, yy) ||
!IN_SCR_FIELD(sxx, syy) ||
!GFX_CRUMBLED(Feld[xx][yy]) ||
IS_MOVING(xx, yy))
continue;
+#endif
#if 1
graphic = el_act2crm(Feld[xx][yy], ACTION_DEFAULT);
for (ty = 0; ty < MAX_REQUEST_LINES; ty++)
{
char text_line[max_request_line_len + 1];
- int tx, tl, tc;
+ int tx, tl, tc = 0;
if (!*text)
break;