rnd-20020907-1-src
[rocksndiamonds.git] / src / main.h
index a4d392c6e85f942f8d4271e744d744c079a6c8a0..976325dac8d68b13216a2f4f69d0563cebe76b4e 100644 (file)
@@ -1,7 +1,7 @@
 /***********************************************************
 * Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-* (c) 1995-2001 Artsoft Entertainment                      *
+* (c) 1995-2002 Artsoft Entertainment                      *
 *               Holger Schemel                             *
 *               Detmolder Strasse 189                      *
 *               33604 Bielefeld                            *
 #define MAX_TAPELEN            (1000 * 50)     /* max. time * framerate */
 #define MAX_SCORE_ENTRIES      100
 #define MAX_ELEMENTS           700             /* 500 static + 200 runtime */
+#define MAX_GRAPHICS           1536            /* see below: NUM_TILES */
 #define MAX_NUM_AMOEBA         100
 
 /* values for elements with content */
@@ -254,7 +255,8 @@ struct PlayerInfo
 struct LevelInfo
 {
   int file_version;    /* file format version the level is stored with    */
-  int game_version;    /* game engine version the level was created with  */
+  int game_version;    /* game release version the level was created with */
+
   boolean encoding_16bit_field;                /* level contains 16-bit elements  */
   boolean encoding_16bit_yamyam;       /* yamyam contains 16-bit elements */
   boolean encoding_16bit_amoeba;       /* amoeba contains 16-bit elements */
@@ -281,9 +283,10 @@ struct LevelInfo
 
 struct TapeInfo
 {
-  int file_version;    /* file format version the tape is stored with   */
-  int game_version;    /* game engine version the tape was created with */
-  int version;
+  int file_version;    /* file format version the tape is stored with    */
+  int game_version;    /* game release version the tape was created with */
+  int engine_version;  /* game engine version the tape was recorded with */
+
   int level_nr;
   unsigned long random_seed;
   unsigned long date;
@@ -310,8 +313,13 @@ struct TapeInfo
 
 struct GameInfo
 {
-  int version;
+  /* constant within running game */
+  int engine_version;
   int emulation;
+  int initial_move_delay;
+  int initial_move_delay_value;
+
+  /* variable within running game */
   int yam_content_nr;
   boolean magic_wall_active;
   int magic_wall_time_left;
@@ -333,8 +341,19 @@ struct GlobalInfo
 
 struct ElementInfo
 {
-  char *sound_class_name;
-  char *editor_description;
+  char *sound_class_name;      /* classification for custom sound effects */
+  char *editor_description;    /* short description for level editor */
+
+  int graphic;
+};
+
+struct GraphicInfo
+{
+  Bitmap *bitmap;
+  int src_x, src_y;
+  int anim_frames;
+  int anim_delay;
+  int anim_mode;
 };
 
 extern GC              tile_clip_gc;
@@ -395,7 +414,10 @@ extern struct TapeInfo             tape;
 extern struct GameInfo         game;
 extern struct GlobalInfo       global;
 extern struct ElementInfo      element_info[];
-extern struct SoundEffectInfo  sound_effects[];
+extern struct GraphicInfo      graphic_info[];
+extern struct ConfigInfo       image_config[], sound_config[];
+extern struct FileInfo        *image_files, *sound_files;
+extern char                   *image_config_suffix[], *sound_config_suffix[];
 
 /* often used screen positions */
 #define SX                     8
@@ -893,7 +915,7 @@ extern struct SoundEffectInfo       sound_effects[];
 #define GFX_START_ROCKSMORE    1280
 #define GFX_END_ROCKSMORE      1535
 
-#define NUM_TILES              1536
+#define NUM_TILES              1536            /* see above: MAX_GRAPHICS */
 
 /* graphics from "RocksScreen" */
 /* Zeile 0 (0) */
@@ -1438,7 +1460,14 @@ extern struct SoundEffectInfo    sound_effects[];
 #define NUM_SOUNDS             55
 
 
-/* values for sound effects */
+/* values for image configuration */
+#define GFX_BD_DIAMOND                         0
+#define GFX_ROBOT_WHEEL                                1
+
+#define NUM_IMAGE_FILES                                2
+
+
+/* values for sound configuration */
 #define SND_BD_EMPTY_SPACE_DIGGING             0
 #define SND_BD_SAND_DIGGING                    1
 #define SND_BD_DIAMOND_COLLECTING              2
@@ -1609,7 +1638,7 @@ extern struct SoundEffectInfo     sound_effects[];
 #define SND_MENU_HALL_OF_FAME                  167
 #define SND_MENU_INFO_SCREEN                   168
 
-#define NUM_SOUND_EFFECTS                      169
+#define NUM_SOUND_FILES                                169
 
 
 /* values for game_status */
@@ -1624,9 +1653,9 @@ extern struct SoundEffectInfo     sound_effects[];
 #define SETUP                  8
 
 #define PROGRAM_VERSION_MAJOR  2
-#define PROGRAM_VERSION_MINOR  0
+#define PROGRAM_VERSION_MINOR  1
 #define PROGRAM_VERSION_PATCH  2
-#define PROGRAM_VERSION_STRING "2.1.0"
+#define PROGRAM_VERSION_STRING "2.1.2"
 
 #define PROGRAM_TITLE_STRING   "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING  "Holger Schemel"