+
+ int draw_deactivation_mask;
+ int draw_background_mask;
+
+ Bitmap *field_save_buffer;
+
+ Bitmap *background_bitmap;
+ int background_bitmap_mask;
+
+ int num_fonts;
+ struct FontBitmapInfo *font_bitmap_info;
+ int (*select_font_function)(int);
+
+ int anim_random_frame;
+};
+
+struct JoystickInfo
+{
+ int status;
+ int fd[MAX_PLAYERS]; /* file descriptor of player's joystick */
+};
+
+struct SetupJoystickInfo
+{
+ char *device_name; /* device name of player's joystick */
+
+ int xleft, xmiddle, xright;
+ int yupper, ymiddle, ylower;
+ int snap;
+ int bomb;
+};
+
+struct SetupKeyboardInfo
+{
+ Key left;
+ Key right;
+ Key up;
+ Key down;
+ Key snap;
+ Key bomb;
+};
+
+struct SetupInputInfo
+{
+ boolean use_joystick;
+ struct SetupJoystickInfo joy;
+ struct SetupKeyboardInfo key;
+};
+
+struct SetupEditorInfo
+{
+ boolean el_boulderdash;
+ boolean el_emerald_mine;
+ boolean el_more;
+ boolean el_sokoban;
+ boolean el_supaplex;
+ boolean el_diamond_caves;
+ boolean el_dx_boulderdash;
+ boolean el_chars;
+ boolean el_custom;
+};
+
+struct SetupShortcutInfo
+{
+ Key save_game;
+ Key load_game;
+ Key toggle_pause;
+};
+
+struct SetupSystemInfo
+{
+ char *sdl_audiodriver;
+ int audio_fragment_size;
+};
+
+struct SetupInfo
+{
+ char *player_name;
+
+ boolean sound;
+ boolean sound_loops;
+ boolean sound_music;
+ boolean sound_simple;
+ boolean toons;
+ boolean double_buffering;
+ boolean direct_draw; /* !double_buffering (redundant!) */
+ boolean scroll_delay;
+ boolean soft_scrolling;
+ boolean fading;
+ boolean autorecord;
+ boolean quick_doors;
+ boolean team_mode;
+ boolean handicap;
+ boolean time_limit;
+ boolean fullscreen;
+ boolean ask_on_escape;
+
+ char *graphics_set;
+ char *sounds_set;
+ char *music_set;
+ boolean override_level_graphics;
+ boolean override_level_sounds;
+ boolean override_level_music;
+
+ struct SetupEditorInfo editor;
+ struct SetupShortcutInfo shortcut;
+ struct SetupInputInfo input[MAX_PLAYERS];
+ struct SetupSystemInfo system;
+ struct OptionInfo options;
+};
+
+#define TREE_TYPE_GENERIC 0
+#define TREE_TYPE_GRAPHICS_DIR 1
+#define TREE_TYPE_SOUNDS_DIR 2
+#define TREE_TYPE_MUSIC_DIR 3
+#define TREE_TYPE_LEVEL_DIR 4
+
+#define ARTWORK_TYPE_GRAPHICS TREE_TYPE_GRAPHICS_DIR
+#define ARTWORK_TYPE_SOUNDS TREE_TYPE_SOUNDS_DIR
+#define ARTWORK_TYPE_MUSIC TREE_TYPE_MUSIC_DIR
+
+struct TreeInfo
+{
+ struct TreeInfo **node_top; /* topmost node in tree */
+ struct TreeInfo *node_parent; /* parent level directory info */
+ struct TreeInfo *node_group; /* level group sub-directory info */
+ struct TreeInfo *next; /* next level series structure node */
+
+ int cl_first; /* internal control field for setup screen */
+ int cl_cursor; /* internal control field for setup screen */
+
+ int type; /* type of tree content */
+
+ /* fields for "type == TREE_TYPE_LEVEL_DIR" */
+
+ char *filename; /* tree info sub-directory basename (may be ".") */
+ char *fullpath; /* complete path relative to tree base directory */
+ char *basepath; /* absolute base path of tree base directory */
+ char *identifier; /* identifier string for configuration files */
+ char *name; /* tree info name, as displayed in selection menues */
+ char *name_sorting; /* optional sorting name for correct name sorting */
+ char *author; /* level or artwork author name */
+ char *imported_from; /* optional comment for imported levels or artwork */
+
+ char *graphics_set; /* optional custom graphics set (level tree only) */
+ char *sounds_set; /* optional custom sounds set (level tree only) */
+ char *music_set; /* optional custom music set (level tree only) */
+ char *graphics_path; /* path to optional custom graphics set (level only) */
+ char *sounds_path; /* path to optional custom sounds set (level only) */
+ char *music_path; /* path to optional custom music set (level only) */
+
+ int levels; /* number of levels in level series */
+ int first_level; /* first level number (to allow start with 0 or 1) */
+ int last_level; /* last level number (automatically calculated) */
+ int sort_priority; /* sort levels by 'sort_priority' and then by name */
+
+ 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 */
+ boolean readonly; /* readonly levels can not be changed with editor */
+
+ int color; /* color to use on selection screen for this level */
+ char *class_desc; /* description of level series class */
+ int handicap_level; /* number of the lowest unsolved level */
+};
+
+typedef struct TreeInfo TreeInfo;
+typedef struct TreeInfo LevelDirTree;
+typedef struct TreeInfo ArtworkDirTree;
+typedef struct TreeInfo GraphicsDirTree;
+typedef struct TreeInfo SoundsDirTree;
+typedef struct TreeInfo MusicDirTree;
+
+struct ArtworkInfo
+{
+ GraphicsDirTree *gfx_first;
+ GraphicsDirTree *gfx_current;
+ SoundsDirTree *snd_first;
+ SoundsDirTree *snd_current;
+ MusicDirTree *mus_first;
+ MusicDirTree *mus_current;
+
+ char *gfx_current_identifier;
+ char *snd_current_identifier;
+ char *mus_current_identifier;
+};
+
+struct ValueTextInfo
+{
+ int value;
+ char *text;
+};
+
+struct ConfigInfo
+{
+ char *token;
+ char *value;
+ int type;
+};
+
+struct TokenIntPtrInfo
+{
+ char *token;
+ int *value;
+};
+
+struct FileInfo
+{
+ char *token;
+
+ char *default_filename;
+ char *filename;
+
+ char **default_parameter; /* array of file parameters */
+ char **parameter; /* array of file parameters */
+
+ boolean redefined;
+};
+
+struct SetupFileList
+{
+ char *token;
+ char *value;
+
+ struct SetupFileList *next;
+};
+
+struct ListNodeInfo
+{
+ char *source_filename; /* primary key for node list */
+ int num_references;
+};
+
+struct PropertyMapping
+{
+ int base_index;
+ int ext1_index;
+ int ext2_index;
+ int ext3_index;
+
+ int artwork_index;
+};
+
+struct ArtworkListInfo
+{
+ int type; /* type of artwork */
+
+ int num_file_list_entries;
+ int num_dynamic_file_list_entries;
+ struct FileInfo *file_list; /* static artwork file array */
+ struct FileInfo *dynamic_file_list; /* dynamic artwrk file array */
+
+ int num_suffix_list_entries;
+ struct ConfigInfo *suffix_list; /* parameter suffixes array */
+
+ int num_base_prefixes;
+ int num_ext1_suffixes;
+ int num_ext2_suffixes;
+ int num_ext3_suffixes;
+ char **base_prefixes; /* base token prefixes array */
+ char **ext1_suffixes; /* property suffixes array 1 */
+ char **ext2_suffixes; /* property suffixes array 2 */
+ char **ext3_suffixes; /* property suffixes array 3 */
+
+ int num_ignore_tokens;
+ char **ignore_tokens; /* file tokens to be ignored */
+
+ int num_property_mapping_entries;
+ struct PropertyMapping *property_mapping; /* mapping token -> artwork */
+
+ int sizeof_artwork_list_entry;
+
+ struct ListNodeInfo **artwork_list; /* static artwork node array */
+ struct ListNodeInfo **dynamic_artwork_list; /* dynamic artwrk node array */
+ struct ListNode *content_list; /* dynamic artwork node list */
+
+ void *(*load_artwork)(char *); /* constructor function */
+ void (*free_artwork)(void *); /* destructor function */