rnd-20030118-6-src
[rocksndiamonds.git] / src / main.c
index 09ff42d4b095e14bf96a0bf568d72ea0f09fbf4d..7cb246320a9febf64a608a66fe714d4d98065ac8 100644 (file)
@@ -84,37 +84,8 @@ struct TapeInfo              tape;
 struct SetupInfo       setup;
 struct GameInfo                game;
 struct GlobalInfo      global;
-
-
-/* this is used to reduce memory usage of the different animation types */
-int graphics_action_mapping[] =
-{
-  0,           /* GFX_ACTION_DEFAULT           (0)  */
-  0,           /* GFX_ACTION_WAITING           (1)  */
-
-  1,           /* GFX_ACTION_FALLING           (2)  */
-  2,           /* GFX_ACTION_MOVING            (3)  */
-  3,           /* GFX_ACTION_DIGGING           (4)  */
-  4,           /* GFX_ACTION_SNAPPING          (5)  */
-  5,           /* GFX_ACTION_COLLECTING        (6)  */
-  6,           /* GFX_ACTION_PUSHING           (7)  */
-
-  7,           /* GFX_ACTION_PASSING           (8)  */
-  7,           /* GFX_ACTION_IMPACT            (9)  */
-  7,           /* GFX_ACTION_CRACKING          (10) */
-  7,           /* GFX_ACTION_BREAKING          (11) */
-  7,           /* GFX_ACTION_ACTIVATING        (12) */
-  7,           /* GFX_ACTION_OPENING           (13) */
-  7,           /* GFX_ACTION_CLOSING           (14) */
-  7,           /* GFX_ACTION_EATING            (15) */
-  7,           /* GFX_ACTION_ATTACKING         (16) */
-  7,           /* GFX_ACTION_GROWING           (17) */
-  7,           /* GFX_ACTION_SHRINKING         (18) */
-  7            /* GFX_ACTION_OTHER             (19) */
-};
-
-struct FileInfo *image_files;
-struct FileInfo *sound_files;
+struct FileInfo               *image_files;
+struct FileInfo               *sound_files;
 
 struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
 {
@@ -2787,7 +2758,36 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] =
   }
 };
 
-struct NewGraphicInfo graphic_info[NUM_IMAGE_FILES];
+
+/* ------------------------------------------------------------------------- */
+/* sound definitions                                                         */
+/* ------------------------------------------------------------------------- */
+
+struct SoundActionProperties sound_action_properties[] =
+{
+  /* insert _all_ loop sound actions here */
+  { ".waiting",                ACTION_WAITING,         TRUE },
+  { ".moving",         ACTION_MOVING,          TRUE }, /* continuos moving */
+  { ".active",         ACTION_ACTIVE,          TRUE },
+  { ".growing",                ACTION_GROWING,         TRUE },
+  { ".attacking",      ACTION_ATTACKING,       TRUE },
+
+  /* other (non-loop) sound actions are optional */
+#if 0
+  { ".stepping",       ACTION_MOVING,          FALSE }, /* discrete moving */
+#endif
+  { ".digging",                ACTION_DIGGING,         FALSE },
+  { ".collecting",     ACTION_COLLECTING,      FALSE },
+  { ".passing",                ACTION_PASSING,         FALSE },
+  { ".impact",         ACTION_IMPACT,          FALSE },
+  { ".pushing",                ACTION_PUSHING,         FALSE },
+  { ".activating",     ACTION_ACTIVATING,      FALSE },
+  { NULL,              0,                      0 },
+};
+
+
+struct GraphicInfo graphic_info[NUM_IMAGE_FILES];
+struct SoundInfo sound_info[NUM_SOUND_FILES];
 
 
 /* ========================================================================= */