X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=a2b75b1415420a136e7c3166515b26d8c41bdba2;hb=c6b89ec21b03182c40ae2eda40d861c09f179daf;hp=0f6f06562203f7f528b35f9086c62c834485135d;hpb=000f4fbffe0d915d1ded9c981a5a2d521cdf7e5e;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 0f6f0656..a2b75b14 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -205,11 +205,19 @@ #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 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) @@ -249,7 +257,8 @@ /* values for mouse cursor */ #define CURSOR_DEFAULT 0 -#define CURSOR_PLAYFIELD 1 +#define CURSOR_NONE 1 +#define CURSOR_PLAYFIELD 2 /* fundamental game speed values */ #define ONE_SECOND_DELAY 1000 /* delay value for one second */ @@ -683,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; }; @@ -770,6 +780,7 @@ struct SetupShortcutInfo struct SetupSystemInfo { + char *sdl_videodriver; char *sdl_audiodriver; int audio_fragment_size; }; @@ -802,6 +813,7 @@ struct SetupInfo boolean quick_switch; boolean input_on_focus; boolean prefer_aga_graphics; + int game_frame_delay; char *graphics_set; char *sounds_set; @@ -839,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) */ @@ -1008,6 +1022,22 @@ struct Rect int width, height; }; +struct MenuPosInfo +{ + int x, y; + int width, height; + int align, valign; +}; + +struct TextPosInfo +{ + int x, y; + int width, height; + int align, valign; + int chars; + int font, font_alt; +}; + /* ========================================================================= */ /* exported variables */