rnd-20070315-2-src
[rocksndiamonds.git] / src / main.h
index 7a1e8bebc7b22c504a83732dfd2c742351cb506b..6d80a9b225ffbbcbc24947a391e0591e30d5e826 100644 (file)
                                 IS_EM_GATE_GRAY(e) ?  EM_GATE_GRAY_NR(e) :   \
                                 IS_EMC_GATE_GRAY(e) ? EMC_GATE_GRAY_NR(e) : 0)
 
+#define IS_ACID_POOL_OR_ACID(e)        (IS_ACID_POOL(e) || (e) == EL_ACID)
+
+#define IS_EMC_PILLAR(e)       ((e) >= EL_EMC_WALL_1 &&                \
+                                (e) <= EL_EMC_WALL_3)
+#define IS_SP_CHIP(e)          ((e) == EL_SP_CHIP_SINGLE ||            \
+                                (e) == EL_SP_CHIP_LEFT ||              \
+                                (e) == EL_SP_CHIP_RIGHT ||             \
+                                (e) == EL_SP_CHIP_TOP ||               \
+                                (e) == EL_SP_CHIP_BOTTOM)
+#define IS_SP_HARDWARE_BASE(e) ((e) == EL_SP_HARDWARE_BASE_1 ||        \
+                                (e) == EL_SP_HARDWARE_BASE_2 ||        \
+                                (e) == EL_SP_HARDWARE_BASE_3 ||        \
+                                (e) == EL_SP_HARDWARE_BASE_4 ||        \
+                                (e) == EL_SP_HARDWARE_BASE_5 ||        \
+                                (e) == EL_SP_HARDWARE_BASE_6)
+
+#define IS_DC_STEELWALL_2(e)   ((e) >= EL_DC_STEELWALL_2_LEFT &&       \
+                                (e) <= EL_DC_STEELWALL_2_SINGLE)
+
 #define GFX_ELEMENT(e)         (element_info[e].use_gfx_element ?      \
                                 element_info[e].gfx_element : e)
 
 
 #define IS_LOOP_SOUND(s)       (sound_info[s].loop)
 
+#define IS_SPECIAL_GFX_ARG(a)  ((a) >= 0 && (a) < NUM_SPECIAL_GFX_ARGS)
+
 #define EL_CASCADE_ACTIVE(e)   (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 : (e))
 #define EL_CASCADE_INACTIVE(e) (IS_EDITOR_CASCADE_ACTIVE(e)   ? (e) - 1 : (e))
 #define EL_CASCADE_TOGGLE(e)   (IS_EDITOR_CASCADE_INACTIVE(e) ? (e) + 1 :    \
 #define GFX_ARG_POST_DELAY             40
 #define GFX_ARG_AUTO_DELAY             41
 #define GFX_ARG_ALIGN                  42
-#define GFX_ARG_SORT_PRIORITY          43
+#define GFX_ARG_VALIGN                 43
+#define GFX_ARG_SORT_PRIORITY          44
 
-#define NUM_GFX_ARGS                   44
+#define NUM_GFX_ARGS                   45
 
 
 /* values for sound configuration suffixes */
@@ -1971,15 +1993,6 @@ struct BorderInfo
   boolean draw_masked[NUM_SPECIAL_GFX_ARGS];
 };
 
-#if 0
-struct MenuPosInfo
-{
-  int x, y;
-  int width, height;
-  int align;
-};
-#endif
-
 struct MenuMainButtonInfo
 {
   struct MenuPosInfo name;
@@ -2006,11 +2019,17 @@ struct MenuMainTextInfo
   struct TextPosInfo setup;
   struct TextPosInfo quit;
 
-  struct TextPosInfo current_level;
   struct TextPosInfo first_level;
   struct TextPosInfo last_level;
+  struct TextPosInfo level_number;
   struct TextPosInfo level_info_1;
   struct TextPosInfo level_info_2;
+  struct TextPosInfo level_name;
+  struct TextPosInfo level_author;
+  struct TextPosInfo level_year;
+  struct TextPosInfo level_imported_from;
+  struct TextPosInfo level_imported_by;
+  struct TextPosInfo level_tested_by;
   struct TextPosInfo title_1;
   struct TextPosInfo title_2;
   struct TextPosInfo title_3;
@@ -2018,7 +2037,7 @@ struct MenuMainTextInfo
 
 struct MenuMainInputInfo
 {
-  struct MenuPosInfo name;
+  struct TextPosInfo name;
 };
 
 struct MenuMainInfo
@@ -2041,13 +2060,11 @@ struct TitleInfo
 
 struct TitleMessageInfo
 {
-  int x;
-  int y;
-  int width;
-  int height;
-  int chars;
-  int lines;
-  int align;
+  int x, y;
+  int width, height;
+  int chars, lines;
+  int align, valign;
+  int font;
   boolean autowrap;
   boolean centered;
   boolean skip_comments;
@@ -2087,7 +2104,7 @@ struct DoorInfo
 struct PreviewInfo
 {
   int x, y;
-  int align;
+  int align, valign;
   int xsize, ysize;
   int xoffset, yoffset;
   int tile_size;
@@ -2503,7 +2520,7 @@ struct GraphicInfo
   int fade_delay;              /* optional setting for drawing title screens */
   int post_delay;              /* optional setting for drawing title screens */
   int auto_delay;              /* optional setting for drawing title screens */
-  int align;                   /* optional setting for drawing title screens */
+  int align, valign;           /* optional setting for drawing title screens */
   int sort_priority;           /* optional setting for drawing title screens */
 
   boolean use_image_size;      /* use image size as default width and height */