gfx.draw_busy_anim_function = draw_busy_anim_function;
}
+void InitGfxCustomArtworkInfo()
+{
+ gfx.override_level_graphics = FALSE;
+ gfx.override_level_sounds = FALSE;
+ gfx.override_level_music = FALSE;
+
+ gfx.draw_init_text = TRUE;
+}
+
void SetDrawDeactivationMask(int draw_deactivation_mask)
{
gfx.draw_deactivation_mask = draw_deactivation_mask;
Bitmap *CreateBitmap(int width, int height, int depth)
{
Bitmap *new_bitmap = CreateBitmapStruct();
- int real_depth = GetRealDepth(depth);
+ int real_width = MAX(1, width); /* prevent zero bitmap width */
+ int real_height = MAX(1, height); /* prevent zero bitmap height */
+ int real_depth = GetRealDepth(depth);
#if defined(TARGET_SDL)
- SDLCreateBitmapContent(new_bitmap, width, height, real_depth);
+ SDLCreateBitmapContent(new_bitmap, real_width, real_height, real_depth);
#else
- X11CreateBitmapContent(new_bitmap, width, height, real_depth);
+ X11CreateBitmapContent(new_bitmap, real_width, real_height, real_depth);
#endif
- new_bitmap->width = width;
- new_bitmap->height = height;
+ new_bitmap->width = real_width;
+ new_bitmap->height = real_height;
return new_bitmap;
}