X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=93d251e9d37bb86cb74596cfe9cfc298af92b07f;hb=2b65ec99f743dde3ee41083cf89623d4d9b8740e;hp=8f26dc77fb97e7933f5ed2f24c71d453b0dfd5d9;hpb=98cdb3fce945485772ccc49741fa29051338ce0d;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 8f26dc77..93d251e9 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -814,6 +814,7 @@ Bitmap *ZoomBitmap(Bitmap *src_bitmap, int zoom_width, int zoom_height) void CreateBitmapWithSmallBitmaps(Bitmap *src_bitmap) { + Bitmap swap_bitmap; Bitmap *tmp_bitmap, *tmp_bitmap_2, *tmp_bitmap_8; int src_width, src_height; int tmp_width, tmp_height; @@ -838,6 +839,8 @@ void CreateBitmapWithSmallBitmaps(Bitmap *src_bitmap) FreeBitmap(tmp_bitmap_2); FreeBitmap(tmp_bitmap_8); +#if 0 + #if defined(TARGET_SDL) /* !!! what about the old src_bitmap->surface ??? FIX ME !!! */ src_bitmap->surface = tmp_bitmap->surface; @@ -846,6 +849,20 @@ void CreateBitmapWithSmallBitmaps(Bitmap *src_bitmap) /* !!! see above !!! */ src_bitmap->drawable = tmp_bitmap->drawable; tmp_bitmap->drawable = None; +#endif + +#else + +#if defined(TARGET_SDL) + swap_bitmap.surface = src_bitmap->surface; + src_bitmap->surface = tmp_bitmap->surface; + tmp_bitmap->surface = swap_bitmap.surface; +#else + swap_bitmap.drawable = src_bitmap->drawable; + src_bitmap->drawable = tmp_bitmap->drawable; + tmp_bitmap->drawable = swap_bitmap.drawable; +#endif + #endif src_bitmap->height = tmp_bitmap->height;