Pixel pixel_drawto = (mode == DL_LASER_ENABLED ? pen_ray : pen_bg);
Pixel pixel_buffer = (mode == DL_LASER_ENABLED ? WHITE_PIXEL : BLACK_PIXEL);
- DrawLines(drawto, points, num_points, pixel_drawto);
+ DrawLines(drawto_mm, points, num_points, pixel_drawto);
BEGIN_NO_HEADLESS
{
BEGIN_NO_HEADLESS
{
// initialize laser bitmap to current playfield (screen) size
- ReCreateBitmap(&laser_bitmap, drawto->width, drawto->height);
- ClearRectangle(laser_bitmap, 0, 0, drawto->width, drawto->height);
+ ReCreateBitmap(&laser_bitmap, drawto_mm->width, drawto_mm->height);
+ ClearRectangle(laser_bitmap, 0, 0, drawto_mm->width, drawto_mm->height);
}
END_NO_HEADLESS
DrawLevel_MM();
- BackToFront();
+ BackToFront_MM();
#ifdef DEBUG
if (setup.quick_doors)
DrawLaser(0, DL_LASER_ENABLED);
- BackToFront();
+ BackToFront_MM();
Delay_WithScreenUpdates(50);
}
DrawWalls_MM(x, y, Store[x][y]);
// copy wall tile to spare bitmap for "melting" animation
- BlitBitmap(drawto, bitmap_db_field, cSX + x * TILEX, cSY + y * TILEY,
+ BlitBitmap(drawto_mm, bitmap_db_field, cSX + x * TILEX, cSY + y * TILEY,
TILEX, TILEY, x * TILEX, y * TILEY);
DrawElement_MM(x, y, EL_GRAY_BALL);
getGraphicSource(graphic, 0, &bitmap, &gx, &gy);
}
- BlitBitmap(bitmap, drawto, gx + dx, gy + dy, 6, 6,
+ BlitBitmap(bitmap, drawto_mm, gx + dx, gy + dy, 6, 6,
cSX + x * TILEX + dx, cSY + y * TILEY + dy);
laser.redraw = TRUE;
ScanLaser();
- ShowEnvelope_MM(nr);
+ ShowEnvelope(nr);
}
}
}
UpdateAndDisplayGameControlValues();
- BackToFront();
+ BackToFront_MM();
}
Tile[ELX][ELY] = laser.dest_element = EL_FUEL_EMPTY;
}
DrawField_MM(nx, ny);
- BackToFront();
+ BackToFront_MM();
if (!laser.fuse_off)
{
SetTileCursorSXSY(cSX, cSY);
}
+void BackToFront_MM(void)
+{
+ BlitScreenToBitmap_MM(backbuffer);
+
+ BackToFront();
+}
+
void ClearWindow(void)
{
- ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
+ ClearRectangle(drawto_mm, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
SetDrawtoField(DRAW_TO_BACKBUFFER);
SetDrawtoField_MM(DRAW_TO_BACKBUFFER);
getGraphicSource(graphic, frame, &bitmap, &src_x, &src_y);
- BlitBitmap(bitmap, drawto_field, src_x, src_y, TILEX, TILEY,
+ BlitBitmap(bitmap, drawto_mm, src_x, src_y, TILEX, TILEY,
cFX + x * TILEX, cFY + y * TILEY);
}
}
#endif
- DrawGraphicThruMaskExt_MM(drawto_field, cFX + x * TILEX, cFY + y * TILEY,
+ DrawGraphicThruMaskExt_MM(drawto_mm, cFX + x * TILEX, cFY + y * TILEY,
graphic, frame);
MarkTileDirty(x,y);
void DrawMiniGraphic_MM(int x, int y, int graphic)
{
- DrawMiniGraphicExt_MM(drawto, cSX + x * MINI_TILEX, cSY + y * MINI_TILEY,
+ DrawMiniGraphicExt_MM(drawto_mm, cSX + x * MINI_TILEX, cSY + y * MINI_TILEY,
graphic);
MarkTileDirty(x / 2, y / 2);
#endif
if (mask_mode == USE_MASKING)
- BlitBitmapMasked(src_bitmap, drawto_field,
+ BlitBitmapMasked(src_bitmap, drawto_mm,
src_x, src_y, TILEX, TILEY, dest_x, dest_y);
else
- BlitBitmap(src_bitmap, drawto_field,
+ BlitBitmap(src_bitmap, drawto_mm,
src_x, src_y, width, height, dest_x, dest_y);
MarkTileDirty(x,y);
continue;
if (element & (1 << i))
- BlitBitmap(bitmap, drawto, gx, gy, MINI_TILEX, MINI_TILEY,
+ BlitBitmap(bitmap, drawto_mm, gx, gy, MINI_TILEX, MINI_TILEY,
dest_x, dest_y);
else
- ClearRectangle(drawto, dest_x, dest_y, MINI_TILEX, MINI_TILEY);
+ ClearRectangle(drawto_mm, dest_x, dest_y, MINI_TILEX, MINI_TILEY);
}
MarkTileDirty(x, y);
getSizedGraphicSource(graphic, frame, MINI_TILESIZE, &bitmap,
&src_x, &src_y);
- BlitBitmap(bitmap, drawto, src_x, src_y, MINI_TILEX, MINI_TILEY,
+ BlitBitmap(bitmap, drawto_mm, src_x, src_y, MINI_TILEX, MINI_TILEY,
dst_x, dst_y);
}
}
void BlitScreenToBitmap_MM(Bitmap *target_bitmap)
{
- BlitBitmap(drawto_field, target_bitmap,
+ BlitBitmap(drawto_mm, target_bitmap,
REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
}
BackToFront();
}
-void ShowEnvelope_MM(int envelope_nr)
-{
- BlitBitmap(backbuffer, bitmap_db_field, REAL_SX, REAL_SY,
- FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
-
- ShowEnvelope(envelope_nr);
-
- SetDrawtoField(DRAW_TO_BACKBUFFER);
-
- BlitBitmap(bitmap_db_field, backbuffer, REAL_SX, REAL_SY,
- FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
-}
-
static void PrepareEnvelopeRequestToScreen(Bitmap *bitmap, int sx, int sy,
int xsize, int ysize)
{