+
+ int ex, ey;
+ int exsize, eysize;
+
+ int win_xsize, win_ysize;
+
+ int draw_deactivation_mask;
+ int draw_background_mask;
+
+ Bitmap *field_save_buffer;
+
+ Bitmap *background_bitmap;
+ int background_bitmap_mask;
+
+ Bitmap *fade_bitmap_backup;
+ Bitmap *fade_bitmap_source;
+ Bitmap *fade_bitmap_target;
+ Bitmap *fade_bitmap_black;
+
+ int fade_border_source_status;
+ int fade_border_target_status;
+ Bitmap *masked_border_bitmap_ptr;
+
+ Bitmap *final_screen_bitmap;
+
+ boolean clipping_enabled;
+ int clip_x, clip_y;
+ int clip_width, clip_height;
+
+ boolean override_level_graphics;
+ boolean override_level_sounds;
+ boolean override_level_music;
+
+ boolean draw_init_text;
+
+ int num_fonts;
+ struct FontBitmapInfo *font_bitmap_info;
+ int (*select_font_function)(int);
+ int (*get_font_from_token_function)(char *);
+
+ int anim_random_frame;
+
+ void (*draw_busy_anim_function)(void);
+ void (*draw_global_anim_function)(int, int);
+ void (*draw_global_border_function)(int);
+ void (*draw_tile_cursor_function)(int);
+
+ int cursor_mode;
+ int cursor_mode_override;
+ int cursor_mode_final;
+ int mouse_x, mouse_y;
+};
+
+struct TileCursorInfo
+{
+ boolean enabled; // tile cursor generally enabled or disabled
+ boolean active; // tile cursor activated (depending on game)
+ boolean moving; // tile cursor moving to target position
+
+ int xpos, ypos; // tile cursor level playfield position
+ int x, y; // tile cursor current screen position
+ int target_x, target_y; // tile cursor target screen position
+
+ int sx, sy; // tile cursor screen start position
+
+ boolean xsn_debug; // enable or disable XSN debugging
+};
+
+struct OverlayInfo
+{
+ boolean enabled; // overlay generally enabled or disabled
+ boolean active; // overlay activated (depending on game mode)
+
+ boolean show_grid;
+
+ int grid_xsize;
+ int grid_ysize;
+
+ char grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE];
+ char grid_button_highlight;
+
+ int grid_button_action;
+};
+
+struct JoystickInfo
+{
+ int status;
+ int nr[MAX_PLAYERS]; // joystick number for each player
+};
+
+struct SetupJoystickInfo
+{
+ char *device_name; // device name of player's joystick
+
+ int xleft, xmiddle, xright;
+ int yupper, ymiddle, ylower;
+ int snap, drop;
+};
+
+struct SetupKeyboardInfo
+{
+ Key left, right, up, down;
+ Key snap, drop;
+};
+
+struct SetupTouchInfo
+{
+ char *control_type;
+ int move_distance;
+ int drop_distance;
+
+ int grid_xsize[2];
+ int grid_ysize[2];
+
+ char grid_button[2][MAX_GRID_XSIZE][MAX_GRID_YSIZE];
+
+ int transparency; // in percent (0 == opaque, 100 == invisible)
+ boolean draw_outlined;
+ boolean draw_pressed;
+
+ boolean grid_initialized;
+};
+
+struct SetupInputInfo
+{
+ boolean use_joystick;
+ struct SetupJoystickInfo joy;
+ struct SetupKeyboardInfo key;
+};
+
+struct SetupEditorInfo
+{
+ boolean el_boulderdash;
+ boolean el_emerald_mine;
+ boolean el_emerald_mine_club;
+ boolean el_more;
+ boolean el_sokoban;
+ boolean el_supaplex;
+ boolean el_diamond_caves;
+ boolean el_dx_boulderdash;
+
+ boolean el_mirror_magic;
+ boolean el_deflektor;
+
+ boolean el_chars;
+ boolean el_steel_chars;
+
+ boolean el_classic;
+ boolean el_custom;
+ boolean el_user_defined;
+ boolean el_dynamic;
+
+ boolean el_headlines;
+
+ boolean el_by_game;
+ boolean el_by_type;
+
+ boolean show_element_token;
+
+ boolean show_read_only_warning;
+
+ boolean use_template_for_new_levels;
+};
+
+struct SetupAutoSetupInfo
+{
+ int editor_zoom_tilesize;
+};
+
+struct SetupLevelSetupInfo
+{
+ char *last_level_series[MAX_LEVELDIR_HISTORY + 1];
+};
+
+struct SetupEditorCascadeInfo
+{
+ boolean el_bd;
+ boolean el_em;
+ boolean el_emc;
+ boolean el_rnd;
+ boolean el_sb;
+ boolean el_sp;
+ boolean el_dc;
+ boolean el_dx;
+ boolean el_mm;
+ boolean el_df;
+ boolean el_chars;
+ boolean el_steel_chars;
+ boolean el_ce;
+ boolean el_ge;
+ boolean el_es;
+ boolean el_ref;
+ boolean el_user;
+ boolean el_dynamic;
+};
+
+struct SetupShortcutInfo
+{
+ Key save_game;
+ Key load_game;
+ Key restart_game;
+ Key pause_before_end;
+ Key toggle_pause;
+
+ Key focus_player[MAX_PLAYERS];
+ Key focus_player_all;
+
+ Key tape_eject;
+ Key tape_extra;
+ Key tape_stop;
+ Key tape_pause;
+ Key tape_record;
+ Key tape_play;
+
+ Key sound_simple;
+ Key sound_loops;
+ Key sound_music;
+
+ Key snap_left;
+ Key snap_right;
+ Key snap_up;
+ Key snap_down;
+};
+
+struct SetupSystemInfo
+{
+ char *sdl_renderdriver;
+ char *sdl_videodriver;
+ char *sdl_audiodriver;
+ int audio_fragment_size;
+};
+
+struct SetupInternalInfo
+{
+ char *program_title;
+ char *program_version;
+ char *program_author;
+ char *program_email;
+ char *program_website;
+ char *program_copyright;
+ char *program_company;
+
+ char *program_icon_file;
+
+ char *default_graphics_set;
+ char *default_sounds_set;
+ char *default_music_set;
+
+ char *fallback_graphics_file;
+ char *fallback_sounds_file;
+ char *fallback_music_file;
+
+ char *default_level_series;
+
+ int default_window_width;
+ int default_window_height;
+
+ boolean choose_from_top_leveldir;
+ boolean show_scaling_in_title;
+ boolean create_user_levelset;
+
+ boolean menu_game;
+ boolean menu_engines;
+ boolean menu_editor;
+ boolean menu_graphics;
+ boolean menu_sound;
+ boolean menu_artwork;
+ boolean menu_input;
+ boolean menu_touch;
+ boolean menu_shortcuts;
+ boolean menu_exit;
+ boolean menu_save_and_exit;
+};
+
+struct SetupDebugInfo
+{
+ int frame_delay[10];
+ Key frame_delay_key[10];
+ boolean frame_delay_use_mod_key;
+ boolean frame_delay_game_only;
+ boolean show_frames_per_second;
+ int xsn_mode;
+ int xsn_percent;
+};
+
+struct SetupInfo
+{
+ char *player_name;
+ char *player_uuid;
+ int player_version;
+
+ boolean multiple_users;
+
+ boolean sound;
+ boolean sound_loops;
+ boolean sound_music;
+ boolean sound_simple;
+ boolean toons;
+ boolean scroll_delay;
+ boolean forced_scroll_delay;
+ int scroll_delay_value;
+ char *engine_snapshot_mode;
+ int engine_snapshot_memory;
+ boolean fade_screens;
+ boolean autorecord;
+ boolean auto_pause_on_start;
+ boolean show_titlescreen;
+ boolean quick_doors;
+ boolean team_mode;
+ boolean handicap;
+ boolean skip_levels;
+ boolean increment_levels;
+ boolean auto_play_next_level;
+ boolean count_score_after_game;
+ boolean show_scores_after_game;
+ boolean time_limit;
+ boolean fullscreen;
+ int window_scaling_percent;
+ char *window_scaling_quality;
+ char *screen_rendering_mode;
+ char *vsync_mode;
+ boolean ask_on_escape;
+ boolean ask_on_escape_editor;
+ boolean ask_on_game_over;
+ boolean ask_on_quit_game;
+ boolean ask_on_quit_program;
+ boolean quick_switch;
+ boolean input_on_focus;
+ boolean prefer_aga_graphics;
+ boolean prefer_lowpass_sounds;
+ boolean prefer_extra_panel_items;
+ boolean game_speed_extended;
+ int game_frame_delay;
+ boolean sp_show_border_elements;
+ boolean small_game_graphics;
+ boolean show_load_save_buttons;
+ boolean show_undo_redo_buttons;
+ char *scores_in_highscore_list;
+
+ char *graphics_set;
+ char *sounds_set;
+ char *music_set;
+ int override_level_graphics; // not boolean -- can also be "AUTO"
+ int override_level_sounds; // not boolean -- can also be "AUTO"
+ int override_level_music; // not boolean -- can also be "AUTO"
+
+ int volume_simple;
+ int volume_loops;
+ int volume_music;
+
+ boolean network_mode;
+ int network_player_nr;
+ char *network_server_hostname;
+
+ boolean use_api_server;
+ char *api_server_hostname;
+ char *api_server_password;
+ boolean ask_for_uploading_tapes;
+ boolean ask_for_remaining_tapes;
+ boolean provide_uploading_tapes;
+ boolean ask_for_using_api_server;
+ boolean has_remaining_tapes;
+
+ struct SetupAutoSetupInfo auto_setup;
+ struct SetupLevelSetupInfo level_setup;
+
+ struct SetupEditorInfo editor;
+ struct SetupEditorCascadeInfo editor_cascade;
+ struct SetupShortcutInfo shortcut;
+ struct SetupInputInfo input[MAX_PLAYERS];
+ struct SetupTouchInfo touch;
+ struct SetupSystemInfo system;
+ struct SetupInternalInfo internal;
+ struct SetupDebugInfo debug;
+
+ struct OptionInfo options;
+};
+
+struct UserInfo
+{
+ int nr;
+};
+
+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 *subdir; // 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 *year; // optional year of creation for levels or artwork
+
+ char *program_title; // optional alternative text for program title
+ char *program_copyright; // optional alternative text for program copyright
+ char *program_company; // optional alternative text for program company
+
+ char *imported_from; // optional comment for imported levels or artwork
+ char *imported_by; // optional comment for imported levels or artwork
+ char *tested_by; // optional comment to name people who tested a set
+
+ char *graphics_set_ecs; // special EMC custom graphics set (ECS graphics)
+ char *graphics_set_aga; // special EMC custom graphics set (AGA graphics)
+ char *graphics_set; // optional custom graphics set (level tree only)
+ char *sounds_set_default; // default EMC custom sounds set
+ char *sounds_set_lowpass; // special EMC custom sounds set (lowpass filter)
+ 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)
+
+ char *level_filename; // filename of level file (for packed level file)
+ char *level_filetype; // type of levels in level directory or level file
+
+ char *special_flags; // flags for special actions performed on level file
+
+ 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
+ int pos; // custom position information of node in tree
+
+ 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 is_copy; // this entry is a copy of another entry in the tree
+ boolean in_user_dir; // user defined levels are stored in home directory
+ boolean user_defined; // levels in user directory and marked as "private"
+ boolean readonly; // readonly levels can not be changed with editor
+ boolean handicap; // level set has no handicap when set to "false"
+ boolean skip_levels; // levels can be skipped when set to "true"
+
+ boolean use_emc_tiles;// use (swapped) V5/V6 EMC tiles when set to "true"
+
+ 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
+
+ char *infotext; // optional text to describe the tree type (headline)
+};
+
+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 StringValueTextInfo
+{
+ char *value;
+ char *text;
+};
+
+struct ConfigInfo
+{
+ char *token;
+ char *value;
+};
+
+struct ConfigTypeInfo
+{
+ 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;
+ boolean fallback_to_default;
+ boolean default_is_cloned;
+};
+
+struct SetupFileList
+{
+ char *token;
+ char *value;
+
+ struct SetupFileList *next;