added configurability of different window size for title screens
[rocksndiamonds.git] / src / main.h
index 10e48258dc6d9510f13bbe0f74273e97a3c1c1e0..a8edcee71ea33d8c76b534843b1bb39e487c7aa7 100644 (file)
@@ -1,15 +1,13 @@
-/***********************************************************
-* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
-*----------------------------------------------------------*
-* (c) 1995-2006 Artsoft Entertainment                      *
-*               Holger Schemel                             *
-*               Detmolder Strasse 189                      *
-*               33604 Bielefeld                            *
-*               Germany                                    *
-*               e-mail: info@artsoft.org                   *
-*----------------------------------------------------------*
-* main.h                                                   *
-***********************************************************/
+// ============================================================================
+// Rocks'n'Diamonds - McDuffin Strikes Back!
+// ----------------------------------------------------------------------------
+// (c) 1995-2014 by Artsoft Entertainment
+//                         Holger Schemel
+//                 info@artsoft.org
+//                 http://www.artsoft.org/
+// ----------------------------------------------------------------------------
+// main.h
+// ============================================================================
 
 #ifndef MAIN_H
 #define MAIN_H
@@ -31,9 +29,6 @@
 #include "conf_mus.h"  /* include auto-generated data structure definitions */
 
 
-#define NEW_TILESIZE                   1
-#define NEW_SCROLL                     1
-
 #define IMG_UNDEFINED                  (-1)
 #define IMG_EMPTY                      IMG_EMPTY_SPACE
 #define IMG_SP_EMPTY                   IMG_EMPTY_SPACE
 #define SND_UNDEFINED                  (-1)
 #define MUS_UNDEFINED                  (-1)
 
-#if 0
-#define WIN_XSIZE                      672
-#define WIN_YSIZE                      560
-#endif
-
 #define DEFAULT_FULLSCREEN_MODE                "800x600"
 
-#if 0
-#define SCR_FIELDX                     17
-#define SCR_FIELDY                     17
-#endif
+#define WIN_XSIZE_DEFAULT              672
+#define WIN_YSIZE_DEFAULT              560
+
+#define SCR_FIELDX_DEFAULT             17
+#define SCR_FIELDY_DEFAULT             17
+
+#define SXSIZE_DEFAULT                 (SCR_FIELDX_DEFAULT * TILEX)
+#define SYSIZE_DEFAULT                 (SCR_FIELDY_DEFAULT * TILEY)
+
 #define MAX_BUF_XSIZE                  (SCR_FIELDX + 2)
 #define MAX_BUF_YSIZE                  (SCR_FIELDY + 2)
 #define MIN_LEV_FIELDX                 3
 #define IS_DC_STEELWALL_2(e)   ((e) >= EL_DC_STEELWALL_2_LEFT &&       \
                                 (e) <= EL_DC_STEELWALL_2_SINGLE)
 
-#if 1
-
-#if 1
 #define GFX_ELEMENT(e)         (element_info[e].gfx_element)
-#else
-#define GFX_ELEMENT(e)         (element_info[e].gfx_element ==         \
-                                (element_info[e].use_gfx_element ?     \
-                                 element_info[e].gfx_element : e)  ?   \
-                                element_info[e].gfx_element :          \
-                                element_info[e].gfx_element +          \
-                                0 * printf("::: %d: %d <-> %d\n",      \
-                                           e,                          \
-                                           element_info[e].gfx_element,      \
-                                           element_info[e].use_gfx_element ? \
-                                           element_info[e].gfx_element : e))
-#endif
-
-#else
-#define GFX_ELEMENT(e)         (element_info[e].use_gfx_element ?      \
-                                element_info[e].gfx_element : e)
-#endif
 
 /* !!! CHECK THIS !!! */
 #if 1
 #define BUTTON_ACTIVE(b)       (ActiveButton[b])
 #define FONT_ACTIVE(f)         (ActiveFont[f])
 
-
 /* fundamental game speed values */
 #define MICROLEVEL_SCROLL_DELAY        50      /* delay for scrolling micro level */
 #define MICROLEVEL_LABEL_DELAY 250     /* delay for micro level label */
 #define MAX_INITIAL_INVENTORY_SIZE     8
 
 /* often used screen positions */
-#if 0
-#define SX                     8
-#define SY                     8
-#define REAL_SX                        (SX - 2)
-#define REAL_SY                        (SY - 2)
-#define DX                     566
-#define DY                     60
-#define VX                     DX
-#define VY                     400
-#define EX                     DX
-#define EY                     (VY - 44)
-#endif
 #define TILESIZE               32
 #define TILEX                  TILESIZE
 #define TILEY                  TILESIZE
 #define MICRO_TILEY            MICRO_TILESIZE
 #define MIDPOSX                        (SCR_FIELDX / 2)
 #define MIDPOSY                        (SCR_FIELDY / 2)
-#if NEW_TILESIZE
-#if NEW_SCROLL
-#if 0
-#define SXSIZE                 (SCR_FIELDX * TILEX_VAR)
-#define SYSIZE                 (SCR_FIELDY * TILEY_VAR)
-#endif
 #define FXSIZE                 ((2 + SCR_FIELDX + 2) * TILEX_VAR)
 #define FYSIZE                 ((2 + SCR_FIELDY + 2) * TILEY_VAR)
-#else
-#if 0
-#define SXSIZE                 (SCR_FIELDX * TILEX_VAR)
-#define SYSIZE                 (SCR_FIELDY * TILEY_VAR)
-#endif
-#define FXSIZE                 ((SCR_FIELDX + 2) * TILEX_VAR)
-#define FYSIZE                 ((SCR_FIELDY + 2) * TILEY_VAR)
-#endif
-#else
-#if NEW_SCROLL
-#if 0
-#define SXSIZE                 (SCR_FIELDX * TILEX)
-#define SYSIZE                 (SCR_FIELDY * TILEY)
-#endif
-#define FXSIZE                 ((2 + SCR_FIELDX + 2) * TILEX)
-#define FYSIZE                 ((2 + SCR_FIELDY + 2) * TILEY)
-#else
-#if 0
-#define SXSIZE                 (SCR_FIELDX * TILEX)
-#define SYSIZE                 (SCR_FIELDY * TILEY)
-#endif
-#define FXSIZE                 ((SCR_FIELDX + 2) * TILEX)
-#define FYSIZE                 ((SCR_FIELDY + 2) * TILEY)
-#endif
-#endif
-
-#if 0
-#define DXSIZE                 100
-#define DYSIZE                 280
-#define VXSIZE                 DXSIZE
-#define VYSIZE                 100
-#define EXSIZE                 DXSIZE
-#define EYSIZE                 (VYSIZE + 44)
-#endif
 
-#if 0
-#define FULL_SXSIZE            (2 + SXSIZE + 2)
-#define FULL_SYSIZE            (2 + SYSIZE + 2)
-#endif
 #define MICROLEVEL_XSIZE       ((STD_LEV_FIELDX + 2) * MICRO_TILEX)
 #define MICROLEVEL_YSIZE       ((STD_LEV_FIELDY + 2) * MICRO_TILEY)
 #define MICROLEVEL_XPOS                (SX + (SXSIZE - MICROLEVEL_XSIZE) / 2)
 #define GFX_SPECIAL_ARG_SETUP_SOUND            4
 #define GFX_SPECIAL_ARG_SETUP_ARTWORK          5
 #define GFX_SPECIAL_ARG_SETUP_INPUT            6
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS                7
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_1      8
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2      9
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3      10
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4      11
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5      12
-#define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK   13
-#define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER     14
+#define GFX_SPECIAL_ARG_SETUP_TOUCH            7
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS                8
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_1      9
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2      10
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3      11
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4      12
+#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5      13
+#define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK   14
+#define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER     15
 
-#define NUM_SPECIAL_GFX_SETUP_ARGS             15
+#define NUM_SPECIAL_GFX_SETUP_ARGS             16
 
 
 /* values for image configuration suffixes */
 #define GFX_ARG_POST_DELAY_RANDOM      35
 #define GFX_ARG_NAME                   36
 #define GFX_ARG_SCALE_UP_FACTOR                37
-#define GFX_ARG_CLONE_FROM             38
-#define GFX_ARG_FADE_MODE              39
-#define GFX_ARG_FADE_DELAY             40
-#define GFX_ARG_POST_DELAY             41
-#define GFX_ARG_AUTO_DELAY             42
-#define GFX_ARG_ALIGN                  43
-#define GFX_ARG_VALIGN                 44
-#define GFX_ARG_SORT_PRIORITY          45
-#define GFX_ARG_CLASS                  46
-#define GFX_ARG_STYLE                  47
-#define GFX_ARG_ACTIVE_XOFFSET         48
-#define GFX_ARG_ACTIVE_YOFFSET         49
-#define GFX_ARG_PRESSED_XOFFSET                50
-#define GFX_ARG_PRESSED_YOFFSET                51
-
-#define NUM_GFX_ARGS                   52
+#define GFX_ARG_TILE_SIZE              38
+#define GFX_ARG_CLONE_FROM             39
+#define GFX_ARG_FADE_MODE              40
+#define GFX_ARG_FADE_DELAY             41
+#define GFX_ARG_POST_DELAY             42
+#define GFX_ARG_AUTO_DELAY             43
+#define GFX_ARG_ALIGN                  44
+#define GFX_ARG_VALIGN                 45
+#define GFX_ARG_SORT_PRIORITY          46
+#define GFX_ARG_CLASS                  47
+#define GFX_ARG_STYLE                  48
+#define GFX_ARG_ACTIVE_XOFFSET         49
+#define GFX_ARG_ACTIVE_YOFFSET         50
+#define GFX_ARG_PRESSED_XOFFSET                51
+#define GFX_ARG_PRESSED_YOFFSET                52
+
+#define NUM_GFX_ARGS                   53
 
 
 /* values for sound configuration suffixes */
 #define NUM_FONTS                      38
 #define NUM_INITIAL_FONTS              4
 
-#if 0
-#define FONT_ACTIVE(f)                                                   \
-       ((f) == FONT_MENU_1             ? FONT_MENU_1_ACTIVE            : \
-        (f) == FONT_MENU_2             ? FONT_MENU_2_ACTIVE            : \
-        (f) == FONT_TEXT_1             ? FONT_TEXT_1_ACTIVE            : \
-        (f) == FONT_TEXT_2             ? FONT_TEXT_2_ACTIVE            : \
-        (f) == FONT_TEXT_3             ? FONT_TEXT_3_ACTIVE            : \
-        (f) == FONT_TEXT_4             ? FONT_TEXT_4_ACTIVE            : \
-        (f) == FONT_INPUT_1            ? FONT_INPUT_1_ACTIVE           : \
-        (f) == FONT_INPUT_2            ? FONT_INPUT_2_ACTIVE           : \
-        (f) == FONT_LEVEL_NUMBER       ? FONT_LEVEL_NUMBER_ACTIVE      : \
-        (f))
-#endif
-
 /* values for game_status (must match special image configuration suffixes) */
 #define GAME_MODE_DEFAULT              0
 #define GAME_MODE_LOADING              1
 
 
 /* program information and versioning definitions */
-#define PROGRAM_VERSION_MAJOR          3
-#define PROGRAM_VERSION_MINOR          3
-#define PROGRAM_VERSION_PATCH          1
-#define PROGRAM_VERSION_BUILD          3
+#define PROGRAM_VERSION_MAJOR          4
+#define PROGRAM_VERSION_MINOR          0
+#define PROGRAM_VERSION_PATCH          0
+#define PROGRAM_VERSION_BUILD          0
 
 #define PROGRAM_TITLE_STRING           "Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING          "Holger Schemel"
-#define PROGRAM_COPYRIGHT_STRING       "Copyright ©1995-2014 by Holger Schemel"
 #define PROGRAM_EMAIL_STRING           "info@artsoft.org"
 #define PROGRAM_WEBSITE_STRING         "http://www.artsoft.org/"
-#define PROGRAM_GAME_BY_STRING         "A Game by Artsoft Entertainment"
-#define PROGRAM_UNIX_DATADIR_STRING    ".rocksndiamonds"
-
-#if defined(CREATE_SPECIAL_EDITION_RND_JUE)
-#undef  PROGRAM_TITLE_STRING
-#define PROGRAM_TITLE_STRING           "R'n'D jue"
-#undef  PROGRAM_UNIX_DATADIR_STRING
-#define PROGRAM_UNIX_DATADIR_STRING    ".rnd_jue"
-#endif
+#define PROGRAM_COPYRIGHT_STRING       "Copyright \xa9""1995-2015 by Holger Schemel"
+#define PROGRAM_COMPANY_STRING         "A Game by Artsoft Entertainment"
+
+#define PROGRAM_ICON_FILENAME          "RocksIcon32x32.png"
 
-#define ICON_TITLE_STRING              PROGRAM_TITLE_STRING
 #define COOKIE_PREFIX                  "ROCKSNDIAMONDS"
-#define FILENAME_PREFIX                        "Rocks"
-
-#define USERDATA_DIRECTORY_WIN32       PROGRAM_TITLE_STRING
-#define USERDATA_DIRECTORY_MACOSX      PROGRAM_TITLE_STRING
-#define USERDATA_DIRECTORY_UNIX                PROGRAM_UNIX_DATADIR_STRING
-#define USERDATA_DIRECTORY_DOS         "userdata"
-
-#if defined(PLATFORM_WIN32)
-#define USERDATA_DIRECTORY             USERDATA_DIRECTORY_WIN32
-#elif defined(PLATFORM_MACOSX)
-#define USERDATA_DIRECTORY             USERDATA_DIRECTORY_MACOSX
-#elif defined(PLATFORM_UNIX)
-#define USERDATA_DIRECTORY             USERDATA_DIRECTORY_UNIX
-#else
-#define USERDATA_DIRECTORY             USERDATA_DIRECTORY_DOS
-#endif
 
-#define X11_ICON_FILENAME              "rocks_icon.xbm"
-#define X11_ICONMASK_FILENAME          "rocks_iconmask.xbm"
-#define SDL_ICON_FILENAME              "RocksIcon32x32.png"
-#define MSDOS_POINTER_FILENAME         "mouse.pcx"
+#define USERDATA_DIRECTORY_OTHER       "userdata"
 
 /* file version numbers for resource files (levels, tapes, score, setup, etc.)
 ** currently supported/known file version numbers:
 
 #define NUM_ENGINE_TYPES               4
 
+/* values for automatically playing tapes */
+#define AUTOPLAY_TEST                  0
+#define AUTOPLAY_PLAY                  1
+#define AUTOPLAY_FFWD                  2
+
 
 struct BorderInfo
 {
@@ -2285,6 +2170,7 @@ struct MenuInfo
   int scrollbar_xoffset;
 
   int list_size[NUM_SPECIAL_GFX_ARGS];
+  int list_size_info[NUM_SPECIAL_GFX_INFO_ARGS];
 
   struct TitleFadingInfo enter_menu;
   struct TitleFadingInfo leave_menu;
@@ -2300,14 +2186,16 @@ struct MenuInfo
 
 struct DoorInfo
 {
-  struct TextPosInfo part_1;
-  struct TextPosInfo part_2;
-  struct TextPosInfo part_3;
-  struct TextPosInfo part_4;
-  struct TextPosInfo part_5;
-  struct TextPosInfo part_6;
-  struct TextPosInfo part_7;
-  struct TextPosInfo part_8;
+  struct DoorPartPosInfo part_1;
+  struct DoorPartPosInfo part_2;
+  struct DoorPartPosInfo part_3;
+  struct DoorPartPosInfo part_4;
+  struct DoorPartPosInfo part_5;
+  struct DoorPartPosInfo part_6;
+  struct DoorPartPosInfo part_7;
+  struct DoorPartPosInfo part_8;
+
+  struct DoorPartPosInfo panel;
 
   int width;
   int height;
@@ -2326,6 +2214,8 @@ struct RequestInfo
   int step_offset;
   int step_delay;
   int anim_mode;
+  int align;
+  int valign;
   boolean autowrap;
   boolean centered;
   boolean wrap_single_words;
@@ -2343,9 +2233,117 @@ struct PreviewInfo
   int anim_mode;
 };
 
+struct EditorTabsInfo
+{
+  int x;
+  int y;
+  int yoffset2;
+  int width;
+  int height;
+  int draw_xoffset;
+  int draw_yoffset;
+};
+
+struct EditorSettingsInfo
+{
+  struct MenuPosInfo headline;
+
+  struct XY element_graphic;
+  struct XY element_name;
+
+  struct EditorTabsInfo tabs;
+};
+
+struct EditorGadgetInfo
+{
+  int normal_spacing;
+  int small_spacing;
+  int tiny_spacing;
+  int line_spacing;
+  int text_spacing;
+  int tab_spacing;
+
+  struct Rect separator_line;
+};
+
+struct EditorButtonInfo
+{
+  struct XY prev_level;
+  struct XY next_level;
+
+  struct XY properties;
+
+  struct XY draw_single;
+  struct XY draw_connected;
+  struct XY draw_line;
+  struct XY draw_arc;
+  struct XY draw_rectangle;
+  struct XY draw_filled_box;
+  struct XY rotate_up;
+  struct XY draw_text;
+  struct XY flood_fill;
+  struct XY rotate_left;
+  struct XY zoom_level;
+  struct XY rotate_right;
+  struct XY draw_random;
+  struct XY grab_brush;
+  struct XY rotate_down;
+  struct XY pick_element;
+
+  struct XY ce_copy_from;
+  struct XY ce_copy_to;
+  struct XY ce_swap;
+  struct XY ce_copy;
+  struct XY ce_paste;
+
+  struct XY undo;
+  struct XY conf;
+  struct XY save;
+  struct XY clear;
+  struct XY test;
+  struct XY exit;
+};
+
+struct EditorInputInfo
+{
+  struct XY level_number;
+};
+
+struct EditorPaletteElementInfo
+{
+  int x, y;
+  int tile_size;
+};
+
+struct EditorPaletteInfo
+{
+  int x, y;
+  int cols, rows;
+  int tile_size;
+
+  struct EditorPaletteElementInfo element_left;
+  struct EditorPaletteElementInfo element_middle;
+  struct EditorPaletteElementInfo element_right;
+};
+
+struct EditorDrawingAreaInfo
+{
+  int tile_size;
+};
+
+struct EditorInfo
+{
+  struct EditorSettingsInfo settings;
+  struct EditorGadgetInfo gadget;
+  struct EditorButtonInfo button;
+  struct EditorInputInfo input;
+  struct EditorPaletteInfo palette;
+  struct EditorDrawingAreaInfo drawingarea;
+};
+
 struct ViewportInfo
 {
-  struct RectWithBorder window;
+  struct RectWithBorder window[NUM_SPECIAL_GFX_ARGS];
   struct RectWithBorder playfield[NUM_SPECIAL_GFX_ARGS];
   struct RectWithBorder door_1[NUM_SPECIAL_GFX_ARGS];
   struct RectWithBorder door_2[NUM_SPECIAL_GFX_ARGS];
@@ -2499,6 +2497,7 @@ struct LevelInfo
   boolean use_time_orb_bug;    /* for compatibility with old levels */
   boolean instant_relocation;  /* no visual delay when relocating player */
   boolean shifted_relocation;  /* no level centering when relocating player */
+  boolean lazy_relocation;     /* only redraw off-screen player relocation */
   boolean can_pass_to_walkable;        /* player can pass to empty or walkable tile */
   boolean grow_into_diggable;  /* amoeba can grow into anything diggable */
   boolean auto_exit_sokoban;   /* automatically finish solved Sokoban levels */
@@ -2528,6 +2527,7 @@ struct GlobalInfo
   char *autoplay_leveldir;
   int autoplay_level[MAX_TAPES_PER_SET];
   boolean autoplay_all;
+  boolean autoplay_mode;
 
   char *convert_leveldir;
   int convert_level_nr;
@@ -2537,15 +2537,9 @@ struct GlobalInfo
   int num_toons;
 
   float frames_per_second;
-  boolean fps_slowdown;
-  int fps_slowdown_factor;
 
   /* global values for fading screens and masking borders */
   int border_status;
-#if 0
-  int fading_status;
-  int fading_type;
-#endif
 
   boolean use_envelope_request;
 };
@@ -2751,7 +2745,9 @@ struct FontInfo
 
 struct GraphicInfo
 {
-  Bitmap *bitmap;
+  Bitmap **bitmaps;            /* bitmaps in all required sizes */
+  Bitmap *bitmap;              /* bitmap in default size */
+
   int src_image_width;         /* scaled bitmap size, but w/o small images */
   int src_image_height;                /* scaled bitmap size, but w/o small images */
 
@@ -2778,6 +2774,7 @@ struct GraphicInfo
   int border_size;             /* border size for "crumbled" graphics */
 
   int scale_up_factor;         /* optional factor for scaling image up */
+  int tile_size;               /* optional explicitly defined tile size */
 
   int clone_from;              /* graphic for cloning *all* settings */
 
@@ -2810,11 +2807,6 @@ struct GraphicInfo
   int pressed_yoffset;
 
   boolean use_image_size;      /* use image size as default width and height */
-
-#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
-  Pixmap clip_mask;            /* single-graphic-only clip mask for X11 */
-  GC clip_gc;                  /* single-graphic-only clip gc for X11 */
-#endif
 };
 
 struct SoundInfo
@@ -2889,13 +2881,14 @@ extern Bitmap                  *bitmap_db_store;
 extern Bitmap                 *bitmap_db_cross;
 extern Bitmap                 *bitmap_db_field;
 extern Bitmap                 *bitmap_db_panel;
-extern Bitmap                 *bitmap_db_door;
+extern Bitmap                 *bitmap_db_door_1;
+extern Bitmap                 *bitmap_db_door_2;
 extern Bitmap                 *bitmap_db_toons;
-extern Pixmap                  tile_clipmask[];
 extern DrawBuffer             *fieldbuffer;
 extern DrawBuffer             *drawto_field;
 
 extern int                     game_status;
+extern boolean                 game_status_last_screen;
 extern boolean                 level_editor_test_game;
 extern boolean                 network_playing;
 
@@ -2906,17 +2899,6 @@ extern SDL_Thread               *server_thread;
 
 extern int                     key_joystick_mapping;
 
-#if 1
-#if NEW_SCROLL
-extern boolean                 redraw[2 + MAX_LEV_FIELDX + 2][2 + MAX_LEV_FIELDY + 2];
-#else
-extern boolean                 redraw[MAX_LEV_FIELDX + 2][MAX_LEV_FIELDY + 2];
-#endif
-#else
-extern boolean                 redraw[MAX_BUF_XSIZE][MAX_BUF_YSIZE];
-#endif
-extern int                     redraw_x1, redraw_y1;
-
 extern short                   Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short                   MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
 extern short                   MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
@@ -2974,6 +2956,9 @@ extern int                        VXSIZE, VYSIZE;
 extern int                     EXSIZE, EYSIZE;
 extern int                     TILESIZE_VAR;
 
+extern int                     FADE_SX, FADE_SY;
+extern int                     FADE_SXSIZE, FADE_SYSIZE;
+
 extern int                     FX, FY;
 extern int                     ScrollStepSize;
 extern int                     ScreenMovDir, ScreenMovPos, ScreenGfxPos;
@@ -3015,6 +3000,7 @@ extern struct MenuInfo            menu;
 extern struct DoorInfo         door_1, door_2;
 extern struct RequestInfo      request;
 extern struct PreviewInfo      preview;
+extern struct EditorInfo       editor;
 extern struct ElementInfo      element_info[];
 extern struct ElementNameInfo  element_name_info[];
 extern struct ElementActionInfo        element_action_info[];