projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20071029-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index 9ed186f1e8143312974f1a4ea0c9807a50030d00..7a6618eb9176dc7b08b8de21a9a5891c50c0e25b 100644
(file)
--- 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;
}
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;
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();
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)
#if defined(TARGET_SDL)
- SDLCreateBitmapContent(new_bitmap,
width,
height, real_depth);
+ SDLCreateBitmapContent(new_bitmap,
real_width, real_
height, real_depth);
#else
#else
- X11CreateBitmapContent(new_bitmap,
width,
height, real_depth);
+ X11CreateBitmapContent(new_bitmap,
real_width, real_
height, real_depth);
#endif
#endif
- new_bitmap->width
=
width;
- new_bitmap->height = height;
+ new_bitmap->width
= real_
width;
+ new_bitmap->height =
real_
height;
return new_bitmap;
}
return new_bitmap;
}