X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibgame%2Fsystem.c;h=93d251e9d37bb86cb74596cfe9cfc298af92b07f;hb=dab1449db859710caf2b5bdd075f90263a9590e3;hp=656d97f90d732e5e988b65e7d1fe838786072b93;hpb=0ae305660baec1a7568ac7df7f296b695904d59a;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 656d97f9..93d251e9 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -117,6 +117,8 @@ void InitPlatformDependentStuff(void) #if defined(TARGET_SDL) if (SDL_Init(SDL_INIT_EVENTTHREAD | SDL_INIT_NOPARACHUTE) < 0) Error(ERR_EXIT, "SDL_Init() failed: %s", SDL_GetError()); + + SDLNet_Init(); #endif } @@ -812,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; @@ -836,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; @@ -844,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;