#define STR_SPECIAL_RENDERING_TARGET "target_texture_only"
#define STR_SPECIAL_RENDERING_DOUBLE "stream_and_target_texture"
-#if defined(TARGET_SDL2)
#define STR_SPECIAL_RENDERING_DEFAULT STR_SPECIAL_RENDERING_DOUBLE
-#else
-#define STR_SPECIAL_RENDERING_DEFAULT STR_SPECIAL_RENDERING_BITMAP
-#endif
#define SPECIAL_RENDERING_OFF 0
#define SPECIAL_RENDERING_BITMAP 1
#define SPECIAL_RENDERING_TARGET 2
#define SPECIAL_RENDERING_DOUBLE 3
-#if defined(TARGET_SDL2)
#define SPECIAL_RENDERING_DEFAULT SPECIAL_RENDERING_DOUBLE
-#else
-#define SPECIAL_RENDERING_DEFAULT SPECIAL_RENDERING_BITMAP
-#endif
// values for vertical screen retrace synchronization (vsync)
#define STR_VSYNC_MODE_OFF "off"
(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)
+#define ALIGNED_VP_XPOS(p) ALIGNED_TEXT_XPOS(p)
+#define ALIGNED_VP_YPOS(p) ALIGNED_TEXT_YPOS(p)
// values for redraw_mask
#define REDRAW_NONE (0)
// areas in bitmap PIX_DOOR
-/* meaning in PIX_DB_DOOR: (3 PAGEs)
- PAGEX1: 1. buffer for DOOR_1
- PAGEX2: 2. buffer for DOOR_1
- PAGEX3: buffer for animations
-*/
+// meaning in PIX_DB_DOOR: (3 PAGEs)
+// PAGEX1: 1. buffer for DOOR_1
+// PAGEX2: 2. buffer for DOOR_1
+// PAGEX3: buffer for animations
// these values are hard-coded to be able to use them in initialization
#define DOOR_GFX_PAGE_WIDTH 100 // should be set to "gfx.dxsize"
#define TREE_TYPE_LEVEL_DIR 3
#define TREE_TYPE_LEVEL_NR 4
+#define NUM_BASE_TREE_TYPES 4
#define NUM_TREE_TYPES 5
#define INFOTEXT_UNDEFINED ""
INFOTEXT_MUSIC_DIR : \
INFOTEXT_UNDEFINED)
+#define TREE_USERDIR(t) ((t) == TREE_TYPE_LEVEL_DIR ? \
+ getUserLevelDir(NULL) : \
+ (t) == TREE_TYPE_GRAPHICS_DIR ? \
+ getUserGraphicsDir() : \
+ (t) == TREE_TYPE_SOUNDS_DIR ? \
+ getUserSoundsDir() : \
+ (t) == TREE_TYPE_MUSIC_DIR ? \
+ getUserMusicDir() : \
+ NULL)
+
+#define TREE_FIRST_NODE_PTR(t) ((t) == TREE_TYPE_LEVEL_DIR ? \
+ &leveldir_first : \
+ (t) == TREE_TYPE_GRAPHICS_DIR ? \
+ &artwork.gfx_first : \
+ (t) == TREE_TYPE_SOUNDS_DIR ? \
+ &artwork.snd_first : \
+ (t) == TREE_TYPE_MUSIC_DIR ? \
+ &artwork.mus_first : \
+ NULL)
+
// values for artwork handling
#define LEVELDIR_ARTWORK_SET_PTR(leveldir, type) \
((type) == ARTWORK_TYPE_GRAPHICS ? \
(type) == ARTWORK_TYPE_MUSIC ? \
options.music_directory : "")
+#define USER_ARTWORK_DIRECTORY(type) \
+ ((type) == ARTWORK_TYPE_GRAPHICS ? \
+ getUserGraphicsDir() : \
+ (type) == ARTWORK_TYPE_SOUNDS ? \
+ getUserSoundsDir() : \
+ (type) == ARTWORK_TYPE_MUSIC ? \
+ getUserMusicDir() : "")
+
#define UPDATE_BUSY_STATE() \
{ \
if (gfx.draw_busy_anim_function != NULL) \
{
int x, y;
int width, height;
+ int min_width, min_height;
+ int max_width, max_height;
+ int margin_left;
+ int margin_right;
+ int margin_top;
+ int margin_bottom;
+ int border_left;
+ int border_right;
+ int border_top;
+ int border_bottom;
int border_size;
+ int align_size;
+ int align, valign;
};
struct MenuPosInfo
extern int button_status;
extern boolean motion_status;
extern int wheel_steps;
-#if defined(TARGET_SDL2)
extern boolean keyrepeat_status;
-#endif
extern int redraw_mask;
void SetOverlayEnabled(boolean);
void SetOverlayActive(boolean);
void SetOverlayShowGrid(boolean);
+boolean GetOverlayEnabled(void);
boolean GetOverlayActive(void);
void SetDrawDeactivationMask(int);
int GetDrawDeactivationMask(void);