X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=8b812e538fcb95a460d85f3acfd610026ccd5cdc;hb=9d7b311c097571c6eb4a810029400dbbc9267a90;hp=eb11ae1dd3ab48305474d6dde21e2371cf31b088;hpb=234748b5eb0bc4fe29a36fd25a1d25658f53858a;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index eb11ae1d..8b812e53 100644 --- a/src/game.c +++ b/src/game.c @@ -292,6 +292,8 @@ static void InitField(int x, int y, boolean init_game) Feld[x][y] = EL_SP_MURPHY_CLONE; break; } + + Feld[x][y] = EL_PLAYER1; } /* no break! */ case EL_PLAYER1: @@ -1325,6 +1327,7 @@ int NewHiScore() void InitMovingField(int x, int y, int direction) { + int element = Feld[x][y]; int newx = x + (direction == MV_LEFT ? -1 : direction == MV_RIGHT ? +1 : 0); int newy = y + (direction == MV_UP ? -1 : direction == MV_DOWN ? +1 : 0); @@ -1334,7 +1337,10 @@ void InitMovingField(int x, int y, int direction) if (Feld[newx][newy] == EL_EMPTY) Feld[newx][newy] = EL_BLOCKED; - GfxAction[x][y] = GFX_ACTION_MOVING; + if (direction == MV_DOWN && CAN_FALL(element)) + GfxAction[x][y] = GFX_ACTION_FALLING; + else + GfxAction[x][y] = GFX_ACTION_MOVING; } void Moving2Blocked(int x, int y, int *goes_to_x, int *goes_to_y) @@ -1700,15 +1706,13 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_PLAYER(x, y) && !PLAYERINFO(x,y)->present) StorePlayer[x][y] = 0; } - else if (!(phase % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + else if (phase >= delay && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) { - int graphic = IMG_EXPLOSION; - int frame = (phase / delay - 1); - - if (game.emulation == EMU_SUPAPLEX) - graphic = (Store[x][y] == EL_SP_INFOTRON ? - IMG_SP_EXPLOSION_INFOTRON : - IMG_SP_EXPLOSION); + int stored = Store[x][y]; + int graphic = (game.emulation != EMU_SUPAPLEX ? IMG_EXPLOSION : + stored == EL_SP_INFOTRON ? IMG_SP_EXPLOSION_INFOTRON : + IMG_SP_EXPLOSION); + int frame = getGraphicAnimationFrame(graphic, phase - delay); if (phase == delay) DrawCrumbledSand(SCREENX(x), SCREENY(y)); @@ -2322,18 +2326,18 @@ void TurnRound(int x, int y) 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) { @@ -2577,17 +2581,18 @@ void TurnRound(int x, int y) 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; @@ -2908,27 +2913,44 @@ void StartMoving(int x, int y) if ((belt_dir == MV_LEFT && left_is_free) || (belt_dir == MV_RIGHT && right_is_free)) + { InitMovingField(x, y, belt_dir); + GfxAction[x][y] = GFX_ACTION_DEFAULT; + } } } - 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 || @@ -2962,7 +2984,7 @@ void StartMoving(int x, int y) } } else if (element == EL_SP_ELECTRON) - DrawGraphicAnimation(x, y, IMG_SP_ELECTRON); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SP_ELECTRON); else if (element == EL_DRAGON) { int i; @@ -3220,11 +3242,11 @@ void StartMoving(int x, int y) element == EL_SP_SNIKSNAK || element == EL_MOLE) DrawLevelField(x, y); else if (element == EL_BD_BUTTERFLY || element == EL_BD_FIREFLY) - DrawGraphicAnimation(x, y, el2img(element)); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), el2img(element)); else if (element == EL_SATELLITE) - DrawGraphicAnimation(x, y, IMG_SATELLITE); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SATELLITE); else if (element == EL_SP_ELECTRON) - DrawGraphicAnimation(x, y, IMG_SP_ELECTRON); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SP_ELECTRON); if (DONT_TOUCH(element)) TestIfBadThingTouchesHero(x, y); @@ -3249,7 +3271,7 @@ void ContinueMoving(int x, int y) 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; @@ -3266,8 +3288,8 @@ void ContinueMoving(int x, int y) 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)) @@ -3362,8 +3384,19 @@ void ContinueMoving(int x, int y) 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; + */ + + if (!CAN_MOVE(element) || + (element == EL_SPRING && MovDir[newx][newy] == MV_DOWN)) + MovDir[newx][newy] = 0; +#endif DrawLevelField(x, y); DrawLevelField(newx, newy); @@ -3386,8 +3419,14 @@ void ContinueMoving(int x, int y) } else /* still moving on */ { +#if 0 if (GfxAction[x][y] == GFX_ACTION_DEFAULT) + { + printf("reset GfxAction...\n"); + GfxAction[x][y] = GFX_ACTION_MOVING; + } +#endif DrawLevelField(x, y); } @@ -3882,14 +3921,15 @@ void RobotWheel(int x, int y) DrawGraphic(SCREENX(x), SCREENY(y), IMG_ROBOT_WHEEL_ACTIVE, frame); } - if (!(MovDelay[x][y]%4)) - PlaySoundLevel(x, y, SND_ROBOT_WHEEL_ACTIVE); + PlaySoundLevel(x, y, SND_ROBOT_WHEEL_ACTIVE); + return; } } Feld[x][y] = EL_ROBOT_WHEEL; DrawLevelField(x, y); + if (ZX == x && ZY == y) ZX = ZY = -1; } @@ -3911,23 +3951,20 @@ void TimegateWheel(int x, int y) DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_SWITCH_ACTIVE, frame); } - if (!(MovDelay[x][y]%4)) - PlaySoundLevel(x, y, SND_TIMEGATE_SWITCH_ACTIVE); + PlaySoundLevel(x, y, SND_TIMEGATE_SWITCH_ACTIVE); + return; } } Feld[x][y] = EL_TIMEGATE_SWITCH; DrawLevelField(x, y); + + /* !!! THIS LOOKS WRONG !!! */ if (ZX == x && ZY == y) ZX = ZY = -1; } -void Blubber(int x, int y) -{ - DrawGraphicAnimation(x, y, IMG_ACID); -} - void NussKnacken(int x, int y) { if (!MovDelay[x][y]) /* next animation frame */ @@ -3936,20 +3973,22 @@ void NussKnacken(int x, int y) if (MovDelay[x][y]) /* wait some time before next frame */ { MovDelay[x][y]--; - if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (MovDelay[x][y]) { - int frame = getGraphicAnimationFrame(IMG_NUT_CRACKING, - 6 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_NUT_CRACKING, + 6 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_NUT_CRACKING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_NUT_CRACKING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_EMERALD; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_EMERALD; + DrawLevelField(x, y); } void BreakingPearl(int x, int y) @@ -3960,27 +3999,29 @@ void BreakingPearl(int x, int y) if (MovDelay[x][y]) /* wait some time before next frame */ { MovDelay[x][y]--; - if (MovDelay[x][y]/2 && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (MovDelay[x][y]) { - int frame = getGraphicAnimationFrame(IMG_PEARL_BREAKING, - 8 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_PEARL_BREAKING, + 8 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_PEARL_BREAKING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_PEARL_BREAKING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_EMPTY; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_EMPTY; + DrawLevelField(x, y); } void SiebAktivieren(int x, int y, int type) { int graphic = (type == 1 ? IMG_MAGIC_WALL_FULL : IMG_BD_MAGIC_WALL_FULL); - DrawGraphicAnimation(x, y, graphic); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), graphic); } void AusgangstuerPruefen(int x, int y) @@ -4025,26 +4066,24 @@ void AusgangstuerOeffnen(int x, int y) int tuer; MovDelay[x][y]--; - tuer = MovDelay[x][y]/delay; - if (!(MovDelay[x][y]%delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + tuer = MovDelay[x][y] / delay; + + if (!(MovDelay[x][y] % delay)) { - int frame = getGraphicAnimationFrame(IMG_EXIT_OPENING, - 29 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_EXIT_OPENING, + 29 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_EXIT_OPENING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_EXIT_OPENING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_EXIT_OPEN; - DrawLevelField(x, y); + return; } } -} -void AusgangstuerBlinken(int x, int y) -{ - DrawGraphicAnimation(x, y, IMG_EXIT_OPEN); + Feld[x][y] = EL_EXIT_OPEN; + DrawLevelField(x, y); } void OpenSwitchgate(int x, int y) @@ -4058,20 +4097,22 @@ void OpenSwitchgate(int x, int y) { MovDelay[x][y]--; - if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (!(MovDelay[x][y] % delay)) { - int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_OPENING, - 29 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_OPENING, + 29 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_OPENING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_OPENING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_SWITCHGATE_OPEN; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_SWITCHGATE_OPEN; + DrawLevelField(x, y); } void CloseSwitchgate(int x, int y) @@ -4085,20 +4126,22 @@ void CloseSwitchgate(int x, int y) { MovDelay[x][y]--; - if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (!(MovDelay[x][y] % delay)) { - int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_CLOSING, - 29 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_SWITCHGATE_CLOSING, + 29 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_CLOSING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_SWITCHGATE_CLOSING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_SWITCHGATE_CLOSED; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_SWITCHGATE_CLOSED; + DrawLevelField(x, y); } void OpenTimegate(int x, int y) @@ -4112,20 +4155,22 @@ void OpenTimegate(int x, int y) { MovDelay[x][y]--; - if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (!(MovDelay[x][y] % delay)) { - int frame = getGraphicAnimationFrame(IMG_TIMEGATE_OPENING, - 29 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_TIMEGATE_OPENING, + 29 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_OPENING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_OPENING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_TIMEGATE_OPEN; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_TIMEGATE_OPEN; + DrawLevelField(x, y); } void CloseTimegate(int x, int y) @@ -4139,20 +4184,22 @@ void CloseTimegate(int x, int y) { MovDelay[x][y]--; - if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + if (!(MovDelay[x][y] % delay)) { - int frame = getGraphicAnimationFrame(IMG_TIMEGATE_CLOSING, - 29 - MovDelay[x][y]); + if (IN_SCR_FIELD(SCREENX(x), SCREENY(y))) + { + int frame = getGraphicAnimationFrame(IMG_TIMEGATE_CLOSING, + 29 - MovDelay[x][y]); - DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_CLOSING, frame); - } + DrawGraphic(SCREENX(x), SCREENY(y), IMG_TIMEGATE_CLOSING, frame); + } - if (!MovDelay[x][y]) - { - Feld[x][y] = EL_TIMEGATE_CLOSED; - DrawLevelField(x, y); + return; } } + + Feld[x][y] = EL_TIMEGATE_CLOSED; + DrawLevelField(x, y); } static void CloseAllOpenTimegates() @@ -4180,7 +4227,7 @@ void EdelsteinFunkeln(int x, int y) return; if (Feld[x][y] == EL_BD_DIAMOND) - DrawGraphicAnimation(x, y, IMG_BD_DIAMOND); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_BD_DIAMOND); else { if (!MovDelay[x][y]) /* next animation frame */ @@ -4193,7 +4240,11 @@ void EdelsteinFunkeln(int x, int y) if (setup.direct_draw && MovDelay[x][y]) SetDrawtoField(DRAW_BUFFERED); +#if 0 DrawGraphic(SCREENX(x), SCREENY(y), el2img(Feld[x][y]), 0); +#else + DrawGraphicAnimation(SCREENX(x), SCREENY(y), el2img(Feld[x][y])); +#endif if (MovDelay[x][y]) { @@ -4547,7 +4598,7 @@ static void DrawBeltAnimation(int x, int y, int element) { int graphic = el2img(element); - DrawGraphicAnimation(x, y, graphic); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), graphic); if (!(FrameCounter % 2)) PlaySoundLevel(x, y, SND_CONVEYOR_BELT_ACTIVE); @@ -4843,6 +4894,13 @@ void GameActions() { StartMoving(x, y); +#if 1 + if (Feld[x][y] == EL_EMERALD && + new_graphic_info[IMG_EMERALD].anim_frames > 1 && + !IS_MOVING(x, y)) + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_EMERALD); +#endif + if (IS_GEM(element) || element == EL_SP_INFOTRON) EdelsteinFunkeln(x, y); } @@ -4871,7 +4929,7 @@ void GameActions() else if (element == EL_TIMEGATE_SWITCH_ACTIVE) TimegateWheel(x, y); else if (element == EL_ACID) - Blubber(x, y); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_ACID); else if (element == EL_ACID_SPLASH_LEFT || element == EL_ACID_SPLASH_RIGHT) Blurb(x, y); @@ -4886,9 +4944,9 @@ void GameActions() else if (element == EL_EXIT_OPENING) AusgangstuerOeffnen(x, y); else if (element == EL_EXIT_OPEN) - AusgangstuerBlinken(x, y); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_EXIT_OPEN); else if (element == EL_SP_EXIT_OPEN) - ; /* !!! ADD SOME (OPTIONAL) ANIMATIONS HERE !!! */ + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SP_EXIT_OPEN); else if (element == EL_WALL_GROWING_ACTIVE) MauerWaechst(x, y); else if (element == EL_WALL_GROWING || @@ -4903,16 +4961,9 @@ void GameActions() else if (element == EL_TRAP || element == EL_TRAP_ACTIVE) CheckTrap(x, y); else if (element == EL_SP_TERMINAL) - DrawGraphicAnimation(x, y, IMG_SP_TERMINAL); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SP_TERMINAL); else if (element == EL_SP_TERMINAL_ACTIVE) - { - DrawGraphicAnimation(x, y, IMG_SP_TERMINAL_ACTIVE); - -#if 0 - if (!(FrameCounter % 4)) - PlaySoundLevel(x, y, SND_SP_TERMINAL_ACTIVE); -#endif - } + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SP_TERMINAL_ACTIVE); else if (IS_BELT_ACTIVE(element)) DrawBeltAnimation(x, y, element); else if (element == EL_SWITCHGATE_OPENING) @@ -4924,25 +4975,11 @@ void GameActions() else if (element == EL_TIMEGATE_CLOSING) CloseTimegate(x, y); else if (element == EL_EXTRA_TIME) - DrawGraphicAnimation(x, y, IMG_EXTRA_TIME); + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_EXTRA_TIME); else if (element == EL_SHIELD_NORMAL) - { - DrawGraphicAnimation(x, y, IMG_SHIELD_NORMAL); - -#if 0 - if (!(FrameCounter % 4)) - PlaySoundLevel(x, y, SND_SHIELD_PASSIVE_ACTIVATED); -#endif - } + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SHIELD_NORMAL); else if (element == EL_SHIELD_DEADLY) - { - DrawGraphicAnimation(x, y, IMG_SHIELD_DEADLY); - -#if 0 - if (!(FrameCounter % 4)) - PlaySoundLevel(x, y, SND_SHIELD_DEADLY_ACTIVE); -#endif - } + DrawGraphicAnimation(SCREENX(x), SCREENY(y), IMG_SHIELD_DEADLY); if (game.magic_wall_active) { @@ -6218,13 +6255,13 @@ int DigField(struct PlayerInfo *player, 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));