+2014-10-17
+ * removed some remaining unused X11 stuff
+
2014-10-16
* fixed bug not loading tape when selecting level from level selection
screen (thanks to filbo for finding this bug and supplying a patch)
-#define COMPILE_DATE_STRING "2014-10-16 02:19"
+#define COMPILE_DATE_STRING "2014-10-17 19:07"
}
else
{
- SyncDisplay();
-
if (!PendingEvent()) /* delay only if no pending events */
Delay(10);
}
height = graphic_info[graphic].height * size / TILESIZE;
if (draw_masked)
- {
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, drawto, src_x, src_y, width, height,
dst_x, dst_y);
- }
else
- {
BlitBitmap(src_bitmap, drawto, src_x, src_y, width, height,
dst_x, dst_y);
- }
}
}
else if (type == TYPE_STRING)
/* scroll in two steps of half tile size to make things smoother */
BlitBitmap(drawto_field, window, fx, fy, SXSIZE, SYSIZE, SX, SY);
- FlushDisplay();
Delay(wait_delay_value);
/* scroll second step to align at full tile size */
boolean scrolling = (screen_x != screen_x_last || screen_y != screen_y_last);
int x, y;
- SyncDisplay();
-
if (redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last)
{
/* blit all (up to four) parts of the scroll buffer to the backbuffer */
InitGfxClipRegion(FALSE, -1, -1, -1, -1);
}
- FlushDisplay();
-
for (x = 0; x < MAX_BUF_XSIZE; x++)
for (y = 0; y < MAX_BUF_YSIZE; y++)
redraw[x][y] = FALSE;
if (draw_masked)
{
if (width > 0 && height > 0)
- {
- SetClipOrigin(g->bitmap, g->bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(g->bitmap, screenBitmap,
src_x, src_y, width, height, dst_x, dst_y);
- }
}
else
{
int dst_y = sy * TILEY + cy;
if (draw_masked)
- {
- SetClipOrigin(g->crumbled_bitmap, g->crumbled_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(g->crumbled_bitmap, screenBitmap,
src_x, src_y, width, height, dst_x, dst_y);
- }
else
BlitBitmap(g->crumbled_bitmap, screenBitmap,
src_x, src_y, width, height, dst_x, dst_y);
/* draw the player to current location */
dst_x = x1;
dst_y = y1;
- SetClipOrigin(g->bitmap, g->bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(g->bitmap, screenBitmap,
src_x, src_y, TILEX, TILEY, dst_x, dst_y);
/* draw the player to opposite wrap-around column */
dst_x = x1 - MAX_BUF_XSIZE * TILEX;
dst_y = y1;
- SetClipOrigin(g->bitmap, g->bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(g->bitmap, screenBitmap,
g->src_x, g->src_y, TILEX, TILEY, dst_x, dst_y);
/* draw the player to opposite wrap-around row */
dst_x = x1;
dst_y = y1 - MAX_BUF_YSIZE * TILEY;
- SetClipOrigin(g->bitmap, g->bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(g->bitmap, screenBitmap,
g->src_x, g->src_y, TILEX, TILEY, dst_x, dst_y);
}
Bitmap *screenBitmap;
-Pixmap objPixmap;
-Pixmap sprPixmap;
-
char play[SAMPLE_MAX];
int play_x[SAMPLE_MAX];
int play_y[SAMPLE_MAX];
extern Bitmap *ttlBitmap;
extern Bitmap *botBitmap;
-extern Pixmap screenPixmap;
-extern Pixmap scorePixmap;
-extern Pixmap spriteBitmap;
-
-extern Pixmap objmaskBitmap;
-extern Pixmap sprmaskBitmap;
-
-extern GC spriteGC;
-
/* ------------------------------------------------------------------------- */
/* exported functions */
boolean scrolling = (mScrollX != scroll_x_last || mScrollY != scroll_y_last);
int x, y;
- SyncDisplay();
-
if (0 ||
redraw_tiles > REDRAWTILES_THRESHOLD || scrolling || scrolling_last ||
ExplosionShakeMurphy != 0 || ExplosionShakeMurphy_last != 0)
InitGfxClipRegion(FALSE, -1, -1, -1, -1);
}
- FlushDisplay();
-
for (x = 0; x < 2 + MAX_PLAYFIELD_WIDTH + 2; x++)
for (y = 0; y < 2 + MAX_PLAYFIELD_HEIGHT + 2; y++)
redraw[x][y] = FALSE;
options.network = FALSE;
options.verbose = FALSE;
options.debug = FALSE;
- options.debug_x11_sync = FALSE;
#if 1
options.verbose = TRUE;
{
options.debug = TRUE;
}
- else if (strncmp(option, "-debug-x11-sync", option_len) == 0)
- {
- options.debug_x11_sync = TRUE;
- }
else if (strncmp(option, "-verbose", option_len) == 0)
{
options.verbose = TRUE;
typedef SDL_Event FocusChangeEvent;
typedef SDL_Event ClientMessageEvent;
-typedef int GC;
-typedef int Pixmap;
-typedef int Display;
-typedef int Visual;
-typedef int Colormap;
-
/* structure definitions */
int width, height;
SDL_Surface *surface;
SDL_Surface *surface_masked;
- GC gc;
- GC stored_clip_gc;
};
struct MouseCursorInfo
struct LevelStats level_stats[MAX_LEVELS];
-Display *display = NULL;
-Visual *visual = NULL;
-int screen = 0;
-Colormap cmap = None;
-
DrawWindow *window = NULL;
DrawBuffer *backbuffer = NULL;
DrawBuffer *drawto = NULL;
ClearRectangle(bitmap, x, y, width, height);
}
-void SetClipMask(Bitmap *bitmap, GC clip_gc, Pixmap clip_pixmap)
-{
-}
-
-void SetClipOrigin(Bitmap *bitmap, GC clip_gc, int clip_x, int clip_y)
-{
-}
-
void BlitBitmapMasked(Bitmap *src_bitmap, Bitmap *dst_bitmap,
int src_x, int src_y, int width, int height,
int dst_x, int dst_y)
dst_x, dst_y);
/* draw foreground */
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, dst_bitmap, src_x, src_y, width, height,
dst_x, dst_y);
}
return GetPixelFromRGB(bitmap, color_r, color_g, color_b);
}
-/* execute all pending screen drawing operations */
-void FlushDisplay(void)
-{
-}
-
-/* execute and wait for all pending screen drawing operations */
-void SyncDisplay(void)
-{
-}
-
void KeyboardAutoRepeatOn(void)
{
#if defined(TARGET_SDL2)
boolean network;
boolean verbose;
boolean debug;
- boolean debug_x11_sync;
};
struct ScreenModeInfo
extern struct LevelStats level_stats[];
-extern Display *display;
-extern Visual *visual;
-extern int screen;
-extern Colormap cmap;
-
extern DrawWindow *window;
extern DrawBuffer *backbuffer;
extern DrawBuffer *drawto;
void FillRectangle(Bitmap *, int, int, int, int, Pixel);
void ClearRectangle(Bitmap *, int, int, int, int);
void ClearRectangleOnBackground(Bitmap *, int, int, int, int);
-void SetClipMask(Bitmap *, GC, Pixmap);
-void SetClipOrigin(Bitmap *, GC, int, int);
void BlitBitmapMasked(Bitmap *, Bitmap *, int, int, int, int, int, int);
boolean DrawingOnBackground(int, int);
void BlitBitmapOnBackground(Bitmap *, Bitmap *, int, int, int, int, int, int);
Pixel GetPixelFromRGB(Bitmap *, unsigned int,unsigned int,unsigned int);
Pixel GetPixelFromRGBcompact(Bitmap *, unsigned int);
-void FlushDisplay(void);
-void SyncDisplay(void);
void KeyboardAutoRepeatOn(void);
void KeyboardAutoRepeatOff(void);
boolean PointerInWindow(DrawWindow *);
font_width, font_height);
}
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
-
BlitBitmapMasked(src_bitmap, dst_bitmap, src_x, src_y,
font_width, font_height, dst_x, dst_y);
}
screen_info.frame_delay_value = frame_delay_value;
}
-void DrawAnim(Bitmap *toon_bitmap, GC toon_clip_gc,
- int src_x, int src_y, int width, int height,
+void DrawAnim(Bitmap *toon_bitmap, int src_x, int src_y, int width, int height,
int dest_x, int dest_y, int pad_x, int pad_y)
{
int pad_dest_x = dest_x - pad_x;
/* special method to avoid flickering interference with BackToFront() */
BlitBitmap(backbuffer, screen_info.save_buffer, pad_dest_x, pad_dest_y,
pad_width, pad_height, buffer_x, buffer_y);
- SetClipOrigin(toon_bitmap, toon_clip_gc, dest_x - src_x, dest_y - src_y);
BlitBitmapMasked(toon_bitmap, backbuffer, src_x, src_y, width, height,
dest_x, dest_y);
BlitBitmap(backbuffer, window, pad_dest_x, pad_dest_y, pad_width, pad_height,
BlitBitmap(screen_info.save_buffer, backbuffer, buffer_x, buffer_y,
pad_width, pad_height, pad_dest_x, pad_dest_y);
-
- FlushDisplay();
}
boolean AnimateToon(int toon_nr, boolean restart)
static int dest_x, dest_y;
struct ToonInfo *anim = &screen_info.toons[toon_nr];
Bitmap *anim_bitmap = screen_info.toons[toon_nr].bitmap;
- GC anim_clip_gc = anim_bitmap->stored_clip_gc;
int direction = get_toon_direction(anim->direction);
if (restart)
if (!DelayReached(&anim_delay, anim_delay_value))
{
if (screen_info.redraw_needed_function() && !restart)
- DrawAnim(anim_bitmap, anim_clip_gc,
+ DrawAnim(anim_bitmap,
src_x + cut_x, src_y + cut_y,
width, height,
screen_info.startx + dest_x,
else if (pos_y > screen_info.height - anim->height)
height -= (pos_y - (screen_info.height - anim->height));
- DrawAnim(anim_bitmap, anim_clip_gc,
+ DrawAnim(anim_bitmap,
src_x + cut_x, src_y + cut_y,
width, height,
screen_info.startx + dest_x,
" -v, --verbose verbose mode\n"
" -V, --version show program version\n"
" --debug display debugging information\n"
- " --debug-x11-sync enable X11 synchronous mode\n"
" -e, --execute COMMAND execute batch COMMAND\n"
"\n"
"Valid commands for '--execute' option:\n"
extern Bitmap *bitmap_db_door_1;
extern Bitmap *bitmap_db_door_2;
extern Bitmap *bitmap_db_toons;
-extern Pixmap tile_clipmask[];
extern DrawBuffer *fieldbuffer;
extern DrawBuffer *drawto_field;
ClearRectangleOnBackground(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE);
if (DrawingOnBackground(dst_x, dst_y))
- {
- SetClipOrigin(bitmap, bitmap->stored_clip_gc, dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
- }
else
BlitBitmap(bitmap, drawto, src_x, src_y, width, height, dst_x, dst_y);
/* needed because DrawPreviewLevelInitial() takes some time */
BackToFront();
- SyncDisplay();
+ /* SyncDisplay(); */
}
}
{
Bitmap *bitmap = graphic_info[IMG_GLOBAL_BORDER].bitmap;
- SetClipOrigin(bitmap, bitmap->stored_clip_gc, 0, 0);
BlitBitmapMasked(bitmap, backbuffer, x, y, width, height, x, y);
}
this could mean that we have to wait for the graphics to complete,
although we could go on doing calculations for the next frame */
- SyncDisplay();
+ /* SyncDisplay(); */
/* never draw masked border to backbuffer when using playfield buffer */
if (game_status != GAME_MODE_PLAYING ||
DrawTextExt(window, SX + SXSIZE + SX, 0, text, FONT_TEXT_2, BLIT_OPAQUE);
}
- FlushDisplay();
-
for (x = 0; x < MAX_BUF_XSIZE; x++)
for (y = 0; y < MAX_BUF_YSIZE; y++)
redraw[x][y] = 0;
getGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
-
BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX_VAR, TILEY_VAR,
dst_x, dst_y);
}
getFixedGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dst_x, dst_y);
}
dst_y = FY + y * TILEY_VAR + dy;
if (mask_mode == USE_MASKING)
- {
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
- }
else
BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
dst_y = FY + y1 * TILEY_VAR;
if (mask_mode == USE_MASKING)
- {
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
- }
else
BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
dst_y = FY + y2 * TILEY_VAR;
if (mask_mode == USE_MASKING)
- {
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
- }
else
BlitBitmap(src_bitmap, drawto_field, src_x, src_y, width, height,
dst_x, dst_y);
inner_sy + (y - 1) * tile_height % inner_height);
if (draw_masked)
- {
- SetClipOrigin(src_bitmap, src_bitmap->stored_clip_gc,
- dst_x - src_x, dst_y - src_y);
BlitBitmapMasked(src_bitmap, drawto, src_x, src_y, tile_width, tile_height,
dst_x, dst_y);
- }
else
BlitBitmap(src_bitmap, drawto, src_x, src_y, tile_width, tile_height,
dst_x, dst_y);