X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_tools.c;h=2c34884abb7dd4d2ece638e99062a4044ccd6188;hb=ad76fa15e8184723baecf1fb34cf9a2c497fe772;hp=044c83a3484aa056c22a3f8b80e688749f96ea80;hpb=e89a21e95b3cb84d1515c0fb3378ce902a48c1c8;p=rocksndiamonds.git diff --git a/src/game_mm/mm_tools.c b/src/game_mm/mm_tools.c index 044c83a3..2c34884a 100644 --- a/src/game_mm/mm_tools.c +++ b/src/game_mm/mm_tools.c @@ -75,7 +75,9 @@ void DrawGraphic_MM(int x, int y, int graphic) } #endif - DrawGraphicExt_MM(drawto_field, cFX + x * TILEX, cFY + y * TILEY, graphic); + int frame = getGraphicAnimationFrameXY(graphic, x, y); + + DrawGraphicAnimation_MM(x, y, graphic, frame); MarkTileDirty(x, y); } @@ -260,12 +262,6 @@ void DrawGraphicShifted_MM(int x,int y, int dx,int dy, int graphic, MarkTileDirty(x,y); } -void DrawGraphicShiftedThruMask_MM(int x,int y, int dx,int dy, int graphic, - int cut_mode) -{ - DrawGraphicShifted_MM(x, y, dx, dy, graphic, cut_mode, USE_MASKING); -} - void DrawScreenElementExt_MM(int x, int y, int dx, int dy, int element, int cut_mode, int mask_mode) { @@ -309,38 +305,11 @@ void DrawScreenElementShifted_MM(int x, int y, int dx, int dy, int element, DrawScreenElementExt_MM(x, y, dx, dy, element, cut_mode, NO_MASKING); } -void DrawLevelElementShifted_MM(int x, int y, int dx, int dy, int element, - int cut_mode) -{ - DrawLevelElementExt_MM(x, y, dx, dy, element, cut_mode, NO_MASKING); -} - -void DrawScreenElementThruMask_MM(int x, int y, int element) -{ - DrawScreenElementExt_MM(x, y, 0, 0, element, NO_CUTTING, USE_MASKING); -} - -void DrawLevelElementThruMask_MM(int x, int y, int element) -{ - DrawLevelElementExt_MM(x, y, 0, 0, element, NO_CUTTING, USE_MASKING); -} - -void DrawLevelFieldThruMask_MM(int x, int y) -{ - DrawLevelElementExt_MM(x, y, 0, 0, Tile[x][y], NO_CUTTING, USE_MASKING); -} - void DrawScreenElement_MM(int x, int y, int element) { DrawScreenElementExt_MM(x, y, 0, 0, element, NO_CUTTING, NO_MASKING); } -void DrawLevelElement_MM(int x, int y, int element) -{ - if (IN_LEV_FIELD(x, y) && IN_SCR_FIELD(SCREENX(x), SCREENY(y))) - DrawScreenElement_MM(SCREENX(x), SCREENY(y), element); -} - void DrawScreenField_MM(int x, int y) { int element = Tile[x][y]; @@ -617,17 +586,6 @@ static void DrawMicroLevelExt_MM(int xpos, int ypos) } #endif -void DrawMiniLevel_MM(int size_x, int size_y, int scroll_x, int scroll_y) -{ - int x, y; - - for (x = 0; x < size_x; x++) - for (y = 0; y < size_y; y++) - DrawMiniElementOrWall_MM(x, y, scroll_x, scroll_y); - - redraw_mask |= REDRAW_FIELD; -} - // ---------------------------------------------------------------------------- // XSN @@ -1331,16 +1289,7 @@ static int map_element(int element) int el2gfx(int element) { - element = map_element(element); - - switch (element) - { - case EL_LIGHTBALL: - return IMG_MM_LIGHTBALL_RED + RND(3); - - default: - return el2img_mm(element); - } + return el2img_mm(map_element(element)); } void RedrawPlayfield_MM(void)