X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.c;h=7a6618eb9176dc7b08b8de21a9a5891c50c0e25b;hb=580d57b32a5bf92e628a9c1d936bf67a8709a39a;hp=9ed186f1e8143312974f1a4ea0c9807a50030d00;hpb=0560eac513043ba4cbb18e6490f1d24150e52422;p=rocksndiamonds.git diff --git a/src/libgame/system.c b/src/libgame/system.c index 9ed186f1..7a6618eb 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -201,6 +201,15 @@ void InitGfxDrawBusyAnimFunction(void (*draw_busy_anim_function)(void)) 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; @@ -375,16 +384,18 @@ Bitmap *CreateBitmapStruct(void) 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; }