{
InitGameEngine_EM();
+#if 0
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_EM(backbuffer);
+#endif
}
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
InitGameEngine_SP();
+#if 0
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_SP(backbuffer);
+#endif
}
else
{
if (game.timegate_time_left == 0)
CloseAllOpenTimegates();
+#if 0
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
#if NEW_TILESIZE
BlitScreenToBitmap(backbuffer);
#else
- /* blit playfield from scroll buffer to normal back buffer for fading in */
if (setup.soft_scrolling)
BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
#endif
+#endif
+#if 0
redraw_mask |= REDRAW_FROM_BACKBUFFER;
+#endif
}
+#if 1
+ /* blit playfield from scroll buffer to normal back buffer for fading in */
+ BlitScreenToBitmap(backbuffer);
+
+ redraw_mask |= REDRAW_FROM_BACKBUFFER;
+#endif
/* !!! FIX THIS (END) !!! */
#if 1
#if 1
-void RedrawPlayfield(boolean force_redraw, int x, int y, int width, int height)
+static void RedrawPlayfield_RND()
{
- if (game_status == GAME_MODE_PLAYING &&
- level.game_engine_type == GAME_ENGINE_TYPE_EM)
- {
- /* currently there is no partial redraw -- always redraw whole playfield */
- RedrawPlayfield_EM(TRUE);
+ int x, y;
- /* blit playfield from scroll buffer to normal back buffer for fading in */
- BlitScreenToBitmap_EM(backbuffer);
- }
- else if (game_status == GAME_MODE_PLAYING &&
- level.game_engine_type == GAME_ENGINE_TYPE_SP)
- {
- /* currently there is no partial redraw -- always redraw whole playfield */
- RedrawPlayfield_SP(TRUE);
+ if (game.envelope_active)
+ return;
- /* blit playfield from scroll buffer to normal back buffer for fading in */
- BlitScreenToBitmap_SP(backbuffer);
- }
- else if (game_status == GAME_MODE_PLAYING &&
- !game.envelope_active)
- {
#if 0
- DrawLevel();
+ DrawLevel();
#else
- SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
- // SetDrawBackgroundMask(REDRAW_FIELD); // !!! CHECK THIS !!!
+ SetMainBackgroundImage(IMG_BACKGROUND_PLAYING);
+ // SetDrawBackgroundMask(REDRAW_FIELD); // !!! CHECK THIS !!!
- for (x = BX1; x <= BX2; x++)
- for (y = BY1; y <= BY2; y++)
- DrawScreenField(x, y);
+ for (x = BX1; x <= BX2; x++)
+ for (y = BY1; y <= BY2; y++)
+ DrawScreenField(x, y);
- redraw_mask |= REDRAW_FIELD;
+ redraw_mask |= REDRAW_FIELD;
#endif
- DrawAllPlayers();
+ DrawAllPlayers();
+#if 0
#if NEW_TILESIZE
- BlitScreenToBitmap(backbuffer);
+ BlitScreenToBitmap(backbuffer);
#else
- /* blit playfield from scroll buffer to normal back buffer */
- if (setup.soft_scrolling)
- {
- int fx = FX, fy = FY;
+ /* blit playfield from scroll buffer to normal back buffer */
+ if (setup.soft_scrolling)
+ {
+ int fx = FX, fy = FY;
- fx += (ScreenMovDir & (MV_LEFT|MV_RIGHT) ? ScreenGfxPos : 0);
- fy += (ScreenMovDir & (MV_UP|MV_DOWN) ? ScreenGfxPos : 0);
+ fx += (ScreenMovDir & (MV_LEFT|MV_RIGHT) ? ScreenGfxPos : 0);
+ fy += (ScreenMovDir & (MV_UP|MV_DOWN) ? ScreenGfxPos : 0);
- BlitBitmap(fieldbuffer, backbuffer, fx,fy, SXSIZE,SYSIZE, SX,SY);
- }
-#endif
+ BlitBitmap(fieldbuffer, backbuffer, fx,fy, SXSIZE,SYSIZE, SX,SY);
}
+#endif
+#endif
+}
+
+void RedrawPlayfield()
+{
+ if (game_status != GAME_MODE_PLAYING)
+ return;
+
+ if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
+ RedrawPlayfield_EM(TRUE);
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
+ RedrawPlayfield_SP(TRUE);
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_RND)
+ RedrawPlayfield_RND();
+
+ BlitScreenToBitmap(backbuffer);
BlitBitmap(drawto, window, gfx.sx, gfx.sy, gfx.sxsize, gfx.sysize,
gfx.sx, gfx.sy);
}
}
-void BlitScreenToBitmap(Bitmap *target_bitmap)
+static void BlitScreenToBitmap_RND(Bitmap *target_bitmap)
{
DrawBuffer *buffer = (drawto_field == window ? backbuffer : drawto_field);
int fx = FX, fy = FY;
}
}
+void BlitScreenToBitmap(Bitmap *target_bitmap)
+{
+ if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
+ BlitScreenToBitmap_EM(target_bitmap);
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
+ BlitScreenToBitmap_SP(target_bitmap);
+ else if (level.game_engine_type == GAME_ENGINE_TYPE_RND)
+ BlitScreenToBitmap_RND(target_bitmap);
+}
+
void BackToFront()
{
int x, y;
else
{
#if 1
- BlitScreenToBitmap(window);
+ BlitScreenToBitmap_RND(window);
#else
int fx = FX, fy = FY;
if (game_status == GAME_MODE_PLAYING)
{
#if 1
+#if 1
+ BlitScreenToBitmap(backbuffer);
+#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
BlitScreenToBitmap_SP(backbuffer);
else
- BlitScreenToBitmap(backbuffer);
+ BlitScreenToBitmap_RND(backbuffer);
+#endif
#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
if (game_status == GAME_MODE_PLAYING)
{
+#if 1
+ BlitScreenToBitmap(backbuffer);
+#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
BlitScreenToBitmap_SP(backbuffer);
+#endif
}
/* disable deactivated drawing when quick-loading level tape recording */
if (game_status == GAME_MODE_PLAYING)
{
#if 1
+#if 1
+ BlitScreenToBitmap(backbuffer);
+#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
BlitScreenToBitmap_SP(backbuffer);
else
- BlitScreenToBitmap(backbuffer);
+ BlitScreenToBitmap_RND(backbuffer);
+#endif
#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
if (game_status == GAME_MODE_PLAYING)
{
+#if 1
+ BlitScreenToBitmap(backbuffer);
+#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
BlitScreenToBitmap_SP(backbuffer);
+#endif
}
/* disable deactivated drawing when quick-loading level tape recording */