rnd-20030118-6-src
[rocksndiamonds.git] / src / main.h
index 24fed063142bb606fc7c04342512ac7d1171e6fa..221b3530ce324db1c8aeadb85b624c70aa7fad6a 100644 (file)
@@ -36,6 +36,8 @@
 #define IMG_CHAR_START         IMG_CHAR_SPACE
 #define IMG_CUSTOM_START       IMG_CUSTOM_1
 
+#define SND_UNDEFINED          (-1)
+
 #define WIN_XSIZE      672
 #define WIN_YSIZE      560
 
 
 #define NUM_GFX_ARGS                           16
 
-#define GFX_ARG_UNDEFINED                      "-1000000"
-#define GFX_ARG_UNDEFINED_VALUE                        (atoi(GFX_ARG_UNDEFINED))
-
 
 /* values for sound configuration suffixes */
-/* (currently none) */
+#define SND_ARG_MODE_LOOP                      0
+
+#define NUM_SND_ARGS                           1
 
 
 /* values for game_status */
@@ -1030,20 +1031,14 @@ struct ElementInfo
   char *sound_class_name;      /* classification for custom sound effects */
   char *editor_description;    /* short description for level editor */
 
-                               /* default graphics for several actions */
-  int graphic[NUM_ACTIONS];
-
+  int graphic[NUM_ACTIONS];    /* default graphics for several actions */
                                /* special graphics for left/right/up/down */
   int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS];
-};
 
-struct GraphicInfo
-{
-  Bitmap *bitmap;
-  int src_x, src_y;
+  int sound[NUM_ACTIONS];      /* default sounds for several actions */
 };
 
-struct NewGraphicInfo
+struct GraphicInfo
 {
   Bitmap *bitmap;
   int src_x, src_y;            /* derived from (tile sized) .xpos/.ypos */
@@ -1060,6 +1055,19 @@ struct NewGraphicInfo
 #endif
 };
 
+struct SoundInfo
+{
+  boolean loop;
+};
+
+struct SoundActionProperties
+{
+  char *text;
+  int value;
+  boolean is_loop;
+};
+
+
 #if 0
 extern GC              tile_clip_gc;
 extern Bitmap         *pix[];
@@ -1127,7 +1135,9 @@ extern struct TapeInfo            tape;
 extern struct GameInfo         game;
 extern struct GlobalInfo       global;
 extern struct ElementInfo      element_info[];
-extern struct NewGraphicInfo   graphic_info[];
+extern struct GraphicInfo      graphic_info[];
+extern struct SoundInfo                sound_info[];
+extern struct SoundActionProperties sound_action_properties[];
 extern struct ConfigInfo       image_config[], sound_config[];
 extern struct ConfigInfo       image_config_suffix[], sound_config_suffix[];
 extern struct FileInfo        *image_files, *sound_files;