projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed several bugs with shared playfield bitmap in MM game engine
[rocksndiamonds.git]
/
src
/
game_mm
/
mm_tools.c
diff --git
a/src/game_mm/mm_tools.c
b/src/game_mm/mm_tools.c
index dd7edbdf16660f5115b6e2200a20e52692053080..39bb24671273009ff21270cc47acb651e879e626 100644
(file)
--- a/
src/game_mm/mm_tools.c
+++ b/
src/game_mm/mm_tools.c
@@
-41,9
+41,16
@@
void SetDrawtoField_MM(int mode)
SetTileCursorSXSY(cSX, cSY);
}
SetTileCursorSXSY(cSX, cSY);
}
+void BackToFront_MM(void)
+{
+ BlitScreenToBitmap_MM(backbuffer);
+
+ BackToFront();
+}
+
void ClearWindow(void)
{
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);
SetDrawtoField(DRAW_TO_BACKBUFFER);
SetDrawtoField_MM(DRAW_TO_BACKBUFFER);
@@
-58,7
+65,7
@@
void DrawGraphicAnimation_MM(int x, int y, int graphic, int frame)
getGraphicSource(graphic, frame, &bitmap, &src_x, &src_y);
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);
}
cFX + x * TILEX, cFY + y * TILEY);
}
@@
-105,7
+112,7
@@
void DrawGraphicThruMask_MM(int x, int y, int graphic, int frame)
}
#endif
}
#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);
graphic, frame);
MarkTileDirty(x,y);
@@
-127,7
+134,7
@@
void DrawGraphicThruMaskExt_MM(DrawBuffer *d, int dest_x, int dest_y,
void DrawMiniGraphic_MM(int x, int y, int graphic)
{
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);
graphic);
MarkTileDirty(x / 2, y / 2);
@@
-246,10
+253,10
@@
void DrawGraphicShifted_MM(int x,int y, int dx,int dy, int graphic,
#endif
if (mask_mode == USE_MASKING)
#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
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);
src_x, src_y, width, height, dest_x, dest_y);
MarkTileDirty(x,y);
@@
-434,10
+441,10
@@
void DrawWallsExt_MM(int x, int y, int element, int draw_mask)
continue;
if (element & (1 << i))
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
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);
}
MarkTileDirty(x, y);
@@
-488,7
+495,7
@@
void DrawWallsAnimation_MM(int x, int y, int element, int phase, int bit_mask)
getSizedGraphicSource(graphic, frame, MINI_TILESIZE, &bitmap,
&src_x, &src_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);
}
}
dst_x, dst_y);
}
}
@@
-1243,6
+1250,6
@@
void RedrawPlayfield_MM(void)
void BlitScreenToBitmap_MM(Bitmap *target_bitmap)
{
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);
}
REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE, REAL_SX, REAL_SY);
}