rnd-20060819-3-src
[rocksndiamonds.git] / src / libgame / image.c
index 7f2577514be688a80619521e7ad16d71d6a71d5a..6cfa44f4d0a1f11463a71a928138afda63374968 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Artsoft Retro-Game Library                               *
 *----------------------------------------------------------*
-* (c) 1994-2002 Artsoft Entertainment                      *
+* (c) 1994-2006 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
@@ -1049,6 +1049,19 @@ void CreateImageWithSmallImages(int pos, int zoom_factor)
   img_info->scaled_up = TRUE;
 }
 
+void ScaleImage(int pos, int zoom_factor)
+{
+  ImageInfo *img_info = getImageInfoEntryFromImageID(pos);
+
+  if (img_info == NULL || img_info->scaled_up)
+    return;
+
+  if (zoom_factor != 1)
+    ScaleBitmap(img_info->bitmap, zoom_factor);
+
+  img_info->scaled_up = TRUE;
+}
+
 void FreeAllImages()
 {
   FreeCustomArtworkLists(image_info);