summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9ea8b20)
* cleanup of functions RedrawPlayfield() and BlitScreenToBitmap()
+2014-05-14
+ * cleanup of functions RedrawPlayfield() and BlitScreenToBitmap()
+
2014-05-13
* fixed level redraw after quick-loading tape with small tile graphics
2014-05-13
* fixed level redraw after quick-loading tape with small tile graphics
2013-12-11
* removed limitation of artwork files to selected file types (this means
that every file type supported by SDL_image and SDL_mixer can be used)
2013-12-11
* removed limitation of artwork files to selected file types (this means
that every file type supported by SDL_image and SDL_mixer can be used)
- * changed default graphics vom PCX to PNG (needed for Android version to
- prevent painfully slow loading of images, although not compressing PCX
+ * changed default graphics from PCX to PNG (needed for Android version
+ to prevent painfully slow image loading, although not compressing PCX
files in the assets directory of the APK package might also work fine)
* fixed bug with SDL_BlitSurface creating garbage when source and target
surface are the same (this bug also existed in versions of SDL 1.2.x)
files in the assets directory of the APK package might also work fine)
* fixed bug with SDL_BlitSurface creating garbage when source and target
surface are the same (this bug also existed in versions of SDL 1.2.x)
if (game_status != GAME_MODE_PLAYING)
return;
if (game_status != GAME_MODE_PLAYING)
return;
+#if 1
+ BlitScreenToBitmap(backbuffer);
+#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
BlitScreenToBitmap_EM(backbuffer);
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
{
BlitScreenToBitmap_EM(backbuffer);
BlitBitmap(fieldbuffer, backbuffer, fx, fy, SXSIZE, SYSIZE, SX, SY);
}
BlitBitmap(fieldbuffer, backbuffer, fx, fy, SXSIZE, SYSIZE, SX, SY);
}
}
boolean ToonNeedsRedraw()
}
boolean ToonNeedsRedraw()
-#define COMPILE_DATE_STRING "2014-05-14 01:51"
+#define COMPILE_DATE_STRING "2014-05-14 21:52"
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_EM(backbuffer);
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_EM(backbuffer);
}
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
InitGameEngine_SP();
}
else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
{
InitGameEngine_SP();
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_SP(backbuffer);
/* blit playfield from scroll buffer to normal back buffer for fading in */
BlitScreenToBitmap_SP(backbuffer);
if (game.timegate_time_left == 0)
CloseAllOpenTimegates();
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
#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
if (setup.soft_scrolling)
BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
#endif
redraw_mask |= REDRAW_FROM_BACKBUFFER;
redraw_mask |= REDRAW_FROM_BACKBUFFER;
+#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
/* !!! FIX THIS (END) !!! */
#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);
- /* 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)
- {
- 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;
- BlitScreenToBitmap(backbuffer);
+ BlitScreenToBitmap(backbuffer);
- /* 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);
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;
{
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;
void BackToFront()
{
int x, y;
- BlitScreenToBitmap(window);
+ BlitScreenToBitmap_RND(window);
#else
int fx = FX, fy = FY;
#else
int fx = FX, fy = FY;
if (game_status == GAME_MODE_PLAYING)
{
#if 1
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
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);
#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
if (game_status == GAME_MODE_PLAYING)
{
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);
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);
}
/* disable deactivated drawing when quick-loading level tape recording */
}
/* disable deactivated drawing when quick-loading level tape recording */
if (game_status == GAME_MODE_PLAYING)
{
#if 1
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
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);
#else
if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
BlitScreenToBitmap_EM(backbuffer);
if (game_status == GAME_MODE_PLAYING)
{
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);
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);
}
/* disable deactivated drawing when quick-loading level tape recording */
}
/* disable deactivated drawing when quick-loading level tape recording */
void DrawMaskedBorder(int);
void SetDrawtoField(int);
void DrawMaskedBorder(int);
void SetDrawtoField(int);
+#if 1
+void RedrawPlayfield();
+#else
void RedrawPlayfield(boolean, int, int, int, int);
void RedrawPlayfield(boolean, int, int, int, int);
void BlitScreenToBitmap(Bitmap *);
void BackToFront();
void BlitScreenToBitmap(Bitmap *);
void BackToFront();