projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20080125-1-src
[rocksndiamonds.git]
/
src
/
libgame
/
image.c
diff --git
a/src/libgame/image.c
b/src/libgame/image.c
index c9712c81799556e6a02d9efd1bca6464e0fa1cc7..8ccf1fcbe81350e15ed3502299e481600c109266 100644
(file)
--- a/
src/libgame/image.c
+++ b/
src/libgame/image.c
@@
-649,7
+649,11
@@
void ZoomPixmap(Display *display, GC gc, Pixmap src_pixmap, Pixmap dst_pixmap,
if (scale_down)
{
if (scale_down)
{
+#if 1
+ zoom_factor = MIN(src_width / dst_width, src_height / dst_height);
+#else
zoom_factor = src_width / dst_width;
zoom_factor = src_width / dst_width;
+#endif
/* adjust source image size to integer multiple of destination size */
src_width = dst_width * zoom_factor;
/* adjust source image size to integer multiple of destination size */
src_width = dst_width * zoom_factor;
@@
-657,7
+661,11
@@
void ZoomPixmap(Display *display, GC gc, Pixmap src_pixmap, Pixmap dst_pixmap,
}
else
{
}
else
{
+#if 1
+ zoom_factor = MIN(dst_width / src_width, dst_height / src_height);
+#else
zoom_factor = dst_width / src_width;
zoom_factor = dst_width / src_width;
+#endif
/* no adjustment needed when scaling up (some pixels may be left blank) */
}
/* no adjustment needed when scaling up (some pixels may be left blank) */
}
@@
-1026,11
+1034,6
@@
void InitImageList(struct ConfigInfo *config_list, int num_file_list_entries,
image_info->free_artwork = FreeImage;
}
image_info->free_artwork = FreeImage;
}
-void LoadImageConfig()
-{
- LoadArtworkConfig(image_info);
-}
-
void ReloadCustomImages()
{
#if 0
void ReloadCustomImages()
{
#if 0