rnd-20020908-3-src
authorHolger Schemel <info@artsoft.org>
Sun, 8 Sep 2002 13:36:42 +0000 (15:36 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:38:24 +0000 (10:38 +0200)
src/conftime.h
src/init.c
src/libgame/image.c
src/libgame/image.h
src/main.h

index 0a421ef7f46b3ebdcb396e72b4c8dd8dcd5721ca..faff9ca7191c5605b59f14718b3e3da3541e335b 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "[2002-09-08 14:51]"
+#define COMPILE_DATE_STRING "[2002-09-08 15:35]"
index 93e2958fa2335433c64fd1195d4212870d54b978..2f19f9495b280a3d0f111e8e0caae5ea5563d070 100644 (file)
@@ -858,7 +858,8 @@ static void InitGraphicInfo()
 
   image_files = getCurrentImageList();
 
-  printf("--> %d\n", image_files[0].parameter[2]);
+  printf("D> %d\n", image_files[GFX_BD_DIAMOND].parameter[GFXARG_NUM_FRAMES]);
+  printf("W> %d\n", image_files[GFX_ROBOT_WHEEL].parameter[GFXARG_NUM_FRAMES]);
 
   for(i=0; i<MAX_GRAPHICS; i++)
   {
@@ -873,6 +874,22 @@ static void InitGraphicInfo()
     getGraphicSource(i, &graphic_info[i].bitmap,
                     &graphic_info[i].src_x, &graphic_info[i].src_y);
   }
+
+#if 1
+  graphic_info[GFX_ABLENK].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL);
+  graphic_info[GFX_ABLENK].src_x = 0;
+  graphic_info[GFX_ABLENK].src_y = 0;
+
+  graphic_info[GFX_ABLENK + 1].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL);
+  graphic_info[GFX_ABLENK + 2].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL);
+  graphic_info[GFX_ABLENK + 3].bitmap = getBitmapFromImageID(GFX_ROBOT_WHEEL);
+  graphic_info[GFX_ABLENK + 1].src_x = 1 * TILEX;
+  graphic_info[GFX_ABLENK + 2].src_x = 2 * TILEX;
+  graphic_info[GFX_ABLENK + 3].src_x = 3 * TILEX;
+  graphic_info[GFX_ABLENK + 1].src_y = 0;
+  graphic_info[GFX_ABLENK + 2].src_y = 0;
+  graphic_info[GFX_ABLENK + 3].src_y = 0;
+#endif
 }
 
 static void InitSoundInfo()
index 3ec55f390ff6b313d64ac5f8f269904ac269745d..3e89c8b196340dfd259d5e469cfb33da1d134c1c 100644 (file)
@@ -700,6 +700,13 @@ struct FileInfo *getCurrentImageList()
   return image_info->file_list;
 }
 
+Bitmap *getBitmapFromImageID(int graphic)
+{
+  ImageInfo **img_info = (ImageInfo **)image_info->artwork_list;
+
+  return img_info[graphic]->bitmap;
+}
+
 void InitImageList(struct ConfigInfo *config_list,
                   struct ConfigInfo *config_suffix_list,
                   int num_file_list_entries)
index 9d001aae86244a5e1ff58b44a917cbb4f4f98542..342b253645de3fa096d315d158aab0528499d3ce 100644 (file)
@@ -73,6 +73,7 @@ int Read_PCX_to_Pixmap(Display *, Window, GC, char *, Pixmap *, Pixmap *);
 
 
 struct FileInfo *getCurrentImageList();
+Bitmap *getBitmapFromImageID(int);
 void InitImageList(struct ConfigInfo *, struct ConfigInfo *, int);
 void ReloadCustomImages();
 void FreeAllImages();
index 986b53a0ce6c59a89c03b240762b307c8320a15a..c8f30b68872f75ec6f4d31b97f65c3d99afb5507 100644 (file)
@@ -1459,12 +1459,19 @@ extern struct FileInfo         *image_files, *sound_files;
 #define NUM_SOUNDS             55
 
 
+/* values for image configuration suffixes */
+#define GFXARG_FRAME_XPOS                      0
+#define GFXARG_FRAME_YPOS                      1
+#define GFXARG_NUM_FRAMES                      2
+
 /* values for image configuration */
 #define GFX_BD_DIAMOND                         0
 #define GFX_ROBOT_WHEEL                                1
 
 #define NUM_IMAGE_FILES                                2
 
+/* values for sound configuration suffixes */
+/* (currently none) */
 
 /* values for sound configuration */
 #define SND_BD_EMPTY_SPACE_DIGGING             0