X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Ftools.c;h=2bbf09019da7a375d0d175bd7bc6e203b7c14e83;hp=7ffa3c19226725869b5eebfe3883402bd4bd220d;hb=cf5b3a1e9077e88eb40ce2fb59e985a0ae037c84;hpb=b7d31643c9c84104fb3ebef778e545928610ff65 diff --git a/src/tools.c b/src/tools.c index 7ffa3c19..2bbf0901 100644 --- a/src/tools.c +++ b/src/tools.c @@ -258,6 +258,9 @@ void DrawPlayerField() { int x = JX, y = JY; int sx = SCROLLX(x), sy = SCROLLY(y); + + int sxx = 0, syy = 0; + int element = Feld[x][y]; int graphic, phase; BOOL draw_thru_mask = FALSE; @@ -306,10 +309,24 @@ void DrawPlayerField() graphic += PlayerFrame; + + if (PlayerMovPos) + { + if (PlayerMovDir == MV_LEFT || PlayerMovDir == MV_RIGHT) + sxx = PlayerMovPos; + else + syy = PlayerMovPos; + } + + if (draw_thru_mask) - DrawGraphicThruMask(sx,sy, graphic); + DrawGraphicThruMask(sx + sxx, sy + syy, graphic); else - DrawGraphic(sx,sy, graphic); + DrawGraphicShifted(sx,sy,sxx,syy,graphic,CUT_NO_CUTTING); + /* + DrawGraphic(sx + sxx, sy + syy, graphic); + */ + /* draw things in front of player (EL_DYNAMIT || EL_DYNABOMB) */