X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_game.c;h=c2c7df2b0c7920da5b5cc5721d16521a52718253;hb=5db2619b4949eaaf09b5564ab0be361a332498f4;hp=4f4af5f87c9aac8c71acb7a51ab4ffd0803cf6e6;hpb=e67a93043d558993882f89c5f2a933882f934a29;p=rocksndiamonds.git diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 4f4af5f8..c2c7df2b 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -1191,6 +1191,9 @@ boolean HitElement(int element, int hit_mask) if (element == EL_KETTLE || element == EL_CELL) { + if (game_mm.kettles_still_needed > 0) + game_mm.kettles_still_needed--; + RaiseScore_MM(10); if (game_mm.kettles_still_needed == 0) @@ -1947,7 +1950,7 @@ void OpenExit(int x, int y) MovDelay[x][y]--; phase = MovDelay[x][y] / delay; if (!(MovDelay[x][y] % delay) && IN_SCR_FIELD(x, y)) - DrawGraphic_MM(x, y, EL_EXIT_OPEN - phase); + DrawGraphicAnimation_MM(x, y, IMG_MM_EXIT_OPENING, 3 - phase); if (!MovDelay[x][y]) { @@ -2163,7 +2166,7 @@ static void Explode_MM(int x, int y, int phase, int mode) graphic_phase += 4; else { - graphic = GFX_EMPTY; + graphic = IMG_EMPTY; graphic_phase = 0; } } @@ -3312,7 +3315,7 @@ static void GameActions_MM_Ext(byte action[MAX_PLAYERS], boolean warp_mode) Feld[ELX][ELY] = 0; Feld[x][y] = element; - DrawGraphic_MM(ELX, ELY, -1); + DrawGraphic_MM(ELX, ELY, IMG_EMPTY); DrawField_MM(x, y); if (element == EL_BLOCK_STONE && Box[ELX][ELY]) @@ -3368,7 +3371,7 @@ void MovePacMen() { static int p = -1; int mx, my, ox, oy, nx, ny; - int g, element; + int element; int l; if (++p >= game_mm.num_pacman) @@ -3415,30 +3418,26 @@ void MovePacMen() game_mm.pacman[p].x = nx; game_mm.pacman[p].y = ny; - g = Feld[nx][ny] - EL_PACMAN_RIGHT; + DrawGraphic_MM(ox, oy, IMG_EMPTY); if (element != EL_EMPTY) { + int graphic = el2gfx(Feld[nx][ny]); + Bitmap *bitmap; + int src_x, src_y; int i; + getGraphicSource(graphic, 0, &bitmap, &src_x, &src_y); + CT = Counter(); ox = SX + ox * TILEX; oy = SY + oy * TILEY; for(i=1; i<33; i+=2) - { -#if 1 - // !!! temporary fix to compile -- change to game graphics !!! - BlitBitmap(drawto, window, - SX + g * TILEX, SY + 4 * TILEY, TILEX, TILEY, - ox + i * mx, oy + i * my); -#else - BlitBitmap(pix[PIX_BACK], window, - SX + g * TILEX, SY + 4 * TILEY, TILEX, TILEY, + BlitBitmap(bitmap, window, + src_x, src_y, TILEX, TILEY, ox + i * mx, oy + i * my); -#endif - } Ct = Ct + Counter() - CT; } DrawField_MM(nx, ny);