+static void SetOpaqueBitmapSurface(Bitmap *bitmap)
+{
+ if (bitmap == NULL)
+ return;
+
+ if (bitmap->surface)
+ SDL_FreeSurface(bitmap->surface);
+
+ if ((bitmap->surface = SDLGetNativeSurface(bitmap->surface_masked)) == NULL)
+ Error(ERR_EXIT, "SDL_DisplayFormat() failed");
+
+ /* remove alpha channel from native non-transparent surface, if defined */
+ SDLSetAlpha(bitmap->surface, FALSE, 0);
+
+ /* remove transparent color from native non-transparent surface, if defined */
+ SDL_SetColorKey(bitmap->surface, UNSET_TRANSPARENT_PIXEL, 0);
+}
+