rnd-20031019-4-src
[rocksndiamonds.git] / src / libgame / system.h
index a48ccf05551863bd0c278f9abf88d81286793f74..134d6c3ecf476560188ff9b88ed2dc21ab44b2d3 100644 (file)
 #define ANIM_RANDOM            (1 << 4)
 #define ANIM_REVERSE           (1 << 5)
 
-#if 0
-/* values for special animation modes */
-#define ANIM_DEFAULT           (1 << 6)
-#define ANIM_QUICK             (1 << 7)
-#define ANIM_SPECIAL1          (1 << 8)
-#endif
+/* values for special (non game element) animation modes */
+#define ANIM_HORIZONTAL                (1 << 6)
+#define ANIM_VERTICAL          (1 << 7)
+
+#define ANIM_DEFAULT           ANIM_LOOP
 
 /* values for redraw_mask */
 #define REDRAW_NONE            (0)
 #define RO_BASE_PATH           RO_GAME_DIR
 #define RW_BASE_PATH           RW_GAME_DIR
 
+/* directory names */
 #define GRAPHICS_DIRECTORY     "graphics"
 #define SOUNDS_DIRECTORY       "sounds"
 #define MUSIC_DIRECTORY                "music"
 #define MUS_CLASSIC_SUBDIR     "mus_orig"
 #endif
 
+/* file names and filename extensions */
+#if !defined(PLATFORM_MSDOS)
+#define LEVELSETUP_DIRECTORY   "levelsetup"
+#define SETUP_FILENAME         "setup.conf"
+#define LEVELSETUP_FILENAME    "levelsetup.conf"
+#define LEVELINFO_FILENAME     "levelinfo.conf"
+#define GRAPHICSINFO_FILENAME  "graphicsinfo.conf"
+#define SOUNDSINFO_FILENAME    "soundsinfo.conf"
+#define MUSICINFO_FILENAME     "musicinfo.conf"
+#define LEVELFILE_EXTENSION    "level"
+#define TAPEFILE_EXTENSION     "tape"
+#define SCOREFILE_EXTENSION    "score"
+#else
+#define LEVELSETUP_DIRECTORY   "lvlsetup"
+#define SETUP_FILENAME         "setup.cnf"
+#define LEVELSETUP_FILENAME    "lvlsetup.cnf"
+#define LEVELINFO_FILENAME     "lvlinfo.cnf"
+#define GRAPHICSINFO_FILENAME  "gfxinfo.cnf"
+#define SOUNDSINFO_FILENAME    "sndinfo.cnf"
+#define MUSICINFO_FILENAME     "musinfo.cnf"
+#define LEVELFILE_EXTENSION    "lvl"
+#define TAPEFILE_EXTENSION     "tap"
+#define SCOREFILE_EXTENSION    "sco"
+#endif
+
 
 /* areas in bitmap PIX_DOOR */
 /* meaning in PIX_DB_DOOR: (3 PAGEs)
                                 (artwork).snd_current_identifier :     \
                                 (artwork).mus_current_identifier)
 
+#define ARTWORKINFO_FILENAME(type)                                     \
+                               ((type) == ARTWORK_TYPE_GRAPHICS ?      \
+                                GRAPHICSINFO_FILENAME :                \
+                                (type) == ARTWORK_TYPE_SOUNDS ?        \
+                                SOUNDSINFO_FILENAME :                  \
+                                (type) == ARTWORK_TYPE_MUSIC ?         \
+                                MUSICINFO_FILENAME : "")
+
+#define ARTWORK_DIRECTORY(type)                                                \
+                               ((type) == ARTWORK_TYPE_GRAPHICS ?      \
+                                GRAPHICS_DIRECTORY :                   \
+                                (type) == ARTWORK_TYPE_SOUNDS ?        \
+                                SOUNDS_DIRECTORY :                     \
+                                (type) == ARTWORK_TYPE_MUSIC ?         \
+                                MUSIC_DIRECTORY : "")
+
+#define OPTIONS_ARTWORK_DIRECTORY(type)                                        \
+                               ((type) == ARTWORK_TYPE_GRAPHICS ?      \
+                                options.graphics_directory :           \
+                                (type) == ARTWORK_TYPE_SOUNDS ?        \
+                                options.sounds_directory :             \
+                                (type) == ARTWORK_TYPE_MUSIC ?         \
+                                options.music_directory : "")
+
 
 /* type definitions */
 typedef int (*EventFilter)(const Event *);
@@ -579,6 +628,8 @@ struct TreeInfo
   int last_level;      /* last level number (automatically calculated) */
   int sort_priority;   /* sort levels by 'sort_priority' and then by name */
 
+  boolean latest_engine;/* force level set to use the latest game engine */
+
   boolean level_group; /* directory contains more level series directories */
   boolean parent_link; /* entry links back to parent directory */
   boolean user_defined;        /* user defined levels are stored in home directory */