rnd-20140418-1-src
[rocksndiamonds.git] / src / libgame / system.h
index b10232fe63d19593fb51fd8a4ad2d810260141d5..90e8bca7af8f4d39dff18f6ab32a2d26bd6e5b39 100644 (file)
 
 #define SCALING_QUALITY_DEFAULT                SCALING_QUALITY_LINEAR
 
+/* values for touch control */
+#define TOUCH_CONTROL_VIRTUAL_BUTTONS  "virtual_buttons"
+#define TOUCH_CONTROL_WIPE_GESTURES    "wipe_gestures"
+
+#define TOUCH_CONTROL_DEFAULT          TOUCH_CONTROL_VIRTUAL_BUTTONS
+
+#define TOUCH_MOVE_DISTANCE_DEFAULT    2
+#define TOUCH_DROP_DISTANCE_DEFAULT    5
+
+
 /* default input keys */
 #define DEFAULT_KEY_LEFT               KSYM_Left
 #define DEFAULT_KEY_RIGHT              KSYM_Right
 #define REDRAWTILES_THRESHOLD  0
 #endif
 
-#define IN_GFX_FIELD(x, y)     (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
+#define IN_GFX_FIELD_PLAY(x, y)        (x >= gfx.sx && x < gfx.sx + gfx.sxsize && \
                                 y >= gfx.sy && y < gfx.sy + gfx.sysize)
 #define IN_GFX_FIELD_FULL(x, y)        (x >= gfx.real_sx && \
                                 x <  gfx.real_sx + gfx.full_sxsize && \
 
 /* default values for undefined configuration file parameters */
 #define ARG_UNDEFINED          "-1000000"
-#define ARG_UNDEFINED_VALUE    (atoi(ARG_UNDEFINED))
+#define ARG_UNDEFINED_VALUE    (-1000000)
+
+/* default value for off-screen positions */
+#define POS_OFFSCREEN          (-1000000)
 
 /* definitions for game sub-directories */
 #ifndef RO_GAME_DIR
@@ -708,6 +721,7 @@ struct ProgramInfo
   int version_minor;
   int version_patch;
 
+  char *(*window_title_function)(void);
   void (*exit_message_function)(char *, va_list);
   void (*exit_function)(int);
 };
@@ -864,6 +878,13 @@ struct SetupKeyboardInfo
   Key snap, drop;
 };
 
+struct SetupTouchInfo
+{
+  char *control_type;
+  int move_distance;
+  int drop_distance;
+};
+
 struct SetupInputInfo
 {
   boolean use_joystick;
@@ -995,6 +1016,7 @@ struct SetupInfo
   struct SetupEditorCascadeInfo editor_cascade;
   struct SetupShortcutInfo shortcut;
   struct SetupInputInfo input[MAX_PLAYERS];
+  struct SetupTouchInfo touch;
   struct SetupSystemInfo system;
   struct OptionInfo options;
 };
@@ -1208,6 +1230,19 @@ struct MenuPosInfo
   int align, valign;
 };
 
+struct DoorPartPosInfo
+{
+  int x, y;
+  int step_xoffset;
+  int step_yoffset;
+  int step_delay;
+  int start_step;
+  int start_step_opening;
+  int start_step_closing;
+  boolean draw_masked;
+  int sort_priority;
+};
+
 struct TextPosInfo
 {
   int x, y;
@@ -1272,9 +1307,17 @@ extern int                       FrameCounter;
 
 /* function definitions */
 
+#if 1
+void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
+                    char *, char *, char *, char *, int);
+#else
 void InitProgramInfo(char *, char *, char *, char *, char *, char *, char *,
                     char *, char *, char *, char *, char *, int);
+#endif
+
+void SetWindowTitle();
 
+void InitWindowTitleFunction(char *(*window_title_function)(void));
 void InitExitMessageFunction(void (*exit_message_function)(char *, va_list));
 void InitExitFunction(void (*exit_function)(int));
 void InitPlatformDependentStuff(void);