rnd-20070318-3-src
[rocksndiamonds.git] / src / libgame / system.h
index 0a1c39061ee2af0406d3d1123ee750d0d5182006..a2b75b1415420a136e7c3166515b26d8c41bdba2 100644 (file)
 #define ALIGN_LEFT             (1 << 0)
 #define ALIGN_RIGHT            (1 << 1)
 #define ALIGN_CENTER           (1 << 2)
-
 #define ALIGN_DEFAULT          ALIGN_LEFT
 
-#define ALIGNED_XPOS(x,w,a)    ((a) == ALIGN_CENTER ? (x) - (w) / 2 :  \
-                                (a) == ALIGN_RIGHT  ? (x) - (w) : (x))
-#define ALIGNED_MENU_XPOS(p)   ALIGNED_XPOS((p)->x, (p)->width, (p)->align)
-#define ALIGNED_MENU_YPOS(p)   ((p)->y)
+#define VALIGN_TOP             (1 << 0)
+#define VALIGN_BOTTOM          (1 << 1)
+#define VALIGN_MIDDLE          (1 << 2)
+#define VALIGN_DEFAULT         VALIGN_TOP
+
+#define ALIGNED_XPOS(x,w,a)    ((a) == ALIGN_CENTER  ? (x) - (w) / 2 : \
+                                (a) == ALIGN_RIGHT   ? (x) - (w) : (x))
+#define ALIGNED_YPOS(y,h,v)    ((v) == VALIGN_MIDDLE ? (y) - (h) / 2 : \
+                                (v) == VALIGN_BOTTOM ? (y) - (h) : (y))
+#define ALIGNED_TEXT_XPOS(p)   ALIGNED_XPOS((p)->x, (p)->width,  (p)->align)
+#define ALIGNED_TEXT_YPOS(p)   ALIGNED_YPOS((p)->y, (p)->height, (p)->valign)
 
 /* values for redraw_mask */
 #define REDRAW_NONE            (0)
@@ -686,6 +692,7 @@ struct GfxInfo
   int num_fonts;
   struct FontBitmapInfo *font_bitmap_info;
   int (*select_font_function)(int);
+  int (*get_font_from_token_function)(char *);
 
   int anim_random_frame;
 };
@@ -773,6 +780,7 @@ struct SetupShortcutInfo
 
 struct SetupSystemInfo
 {
+  char *sdl_videodriver;
   char *sdl_audiodriver;
   int audio_fragment_size;
 };
@@ -843,8 +851,10 @@ struct TreeInfo
   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 *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) */
@@ -1012,22 +1022,21 @@ struct Rect
   int width, height;
 };
 
-#if 1
 struct MenuPosInfo
 {
   int x, y;
   int width, height;
-  int align;
+  int align, valign;
 };
 
 struct TextPosInfo
 {
   int x, y;
   int width, height;
-  int align;
+  int align, valign;
   int chars;
+  int font, font_alt;
 };
-#endif
 
 
 /* ========================================================================= */