- if (draw_thru_mask)
- DrawGraphicThruMask(sx,sy, graphic);
- else
- DrawGraphic(sx,sy, graphic);
+ if (PlayerGfxPos)
+ {
+ if (PlayerMovDir == MV_LEFT || PlayerMovDir == MV_RIGHT)
+ sxx = PlayerGfxPos;
+ else
+ syy = PlayerGfxPos;
+ }
+
+ if (!soft_scrolling_on && ScreenMovPos)
+ sxx = syy = 0;
+
+ DrawGraphicShiftedThruMask(sx,sy, sxx,syy, graphic, NO_CUTTING);
+
+ if (PlayerPushing && PlayerGfxPos)
+ {
+ int nextJX = JX + (JX - lastJX);
+ int nextJY = JY + (JY - lastJY);
+ int px = SCROLLX(nextJX), py = SCROLLY(nextJY);
+
+ if (Feld[JX][JY] == EL_SOKOBAN_FELD_LEER ||
+ Feld[nextJX][nextJY] == EL_SOKOBAN_FELD_VOLL)
+ DrawGraphicShiftedThruMask(px,py,sxx,syy, GFX_SOKOBAN_OBJEKT,NO_CUTTING);
+ else
+ {
+ int element = Feld[nextJX][nextJY];
+ int graphic = el2gfx(element);
+
+ if (element == EL_FELSBROCKEN && sxx)
+ {
+ int phase = (PlayerGfxPos / (TILEX/4));
+
+ if (PlayerMovDir == MV_LEFT)
+ graphic += phase;
+ else
+ graphic += (phase+4)%4;
+ }
+
+ DrawGraphicShifted(px,py, sxx,syy, graphic, NO_CUTTING, NO_MASKING);
+ }
+ }