projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed some compilation errors for SDL 1.2 target
[rocksndiamonds.git]
/
src
/
libgame
/
system.h
diff --git
a/src/libgame/system.h
b/src/libgame/system.h
index 48e06ae1d3394aabac4916e46af371210df2b848..b6cea7b51ea2d38ed0d5fddae8174d9fa114521a 100644
(file)
--- a/
src/libgame/system.h
+++ b/
src/libgame/system.h
@@
-85,6
+85,7
@@
/* values for touch control */
#define TOUCH_CONTROL_VIRTUAL_BUTTONS "virtual_buttons"
#define TOUCH_CONTROL_WIPE_GESTURES "wipe_gestures"
/* values for touch control */
#define TOUCH_CONTROL_VIRTUAL_BUTTONS "virtual_buttons"
#define TOUCH_CONTROL_WIPE_GESTURES "wipe_gestures"
+#define TOUCH_CONTROL_FOLLOW_FINGER "follow_finger"
#define TOUCH_CONTROL_DEFAULT TOUCH_CONTROL_VIRTUAL_BUTTONS
#define TOUCH_CONTROL_DEFAULT TOUCH_CONTROL_VIRTUAL_BUTTONS
@@
-92,6
+93,15
@@
#define TOUCH_DROP_DISTANCE_DEFAULT 5
#define TOUCH_DROP_DISTANCE_DEFAULT 5
+/* values for special settings for mobile devices */
+#if defined(PLATFORM_ANDROID)
+#define USE_TOUCH_INPUT_OVERLAY
+#define USE_COMPLETE_DISPLAY
+#define HAS_SCREEN_KEYBOARD
+#define SCREEN_KEYBOARD_POS(h) ((h) / 2)
+#endif
+
+
/* default input keys */
#define DEFAULT_KEY_LEFT KSYM_Left
#define DEFAULT_KEY_RIGHT KSYM_Right
/* default input keys */
#define DEFAULT_KEY_LEFT KSYM_Left
#define DEFAULT_KEY_RIGHT KSYM_Right
@@
-715,14
+725,6
@@
}
}
-/* type definitions */
-#if defined(TARGET_SDL2)
-typedef int (*EventFilter)(void *, Event *);
-#else
-typedef int (*EventFilter)(const Event *);
-#endif
-
-
/* structure definitions */
struct ProgramInfo
/* structure definitions */
struct ProgramInfo
@@
-788,6
+790,9
@@
struct VideoSystemInfo
int default_depth;
int width, height, depth;
int window_width, window_height;
int default_depth;
int width, height, depth;
int window_width, window_height;
+ int display_width, display_height;
+ int screen_width, screen_height;
+ int screen_xoffset, screen_yoffset;
boolean fullscreen_available;
boolean fullscreen_enabled;
boolean fullscreen_available;
boolean fullscreen_enabled;
@@
-801,6
+806,12
@@
struct VideoSystemInfo
unsigned int frame_delay;
unsigned int frame_delay_value;
unsigned int frame_delay;
unsigned int frame_delay_value;
+ boolean shifted_up;
+ int shifted_up_pos;
+ int shifted_up_pos_last;
+ unsigned int shifted_up_delay;
+ unsigned int shifted_up_delay_value;
+
boolean initialized;
};
boolean initialized;
};
@@
-901,6
+912,11
@@
struct GfxInfo
int cursor_mode;
};
int cursor_mode;
};
+struct OverlayInfo
+{
+ boolean active;
+};
+
struct JoystickInfo
{
int status;
struct JoystickInfo
{
int status;
@@
-1364,6
+1380,7
@@
extern struct OptionInfo options;
extern struct VideoSystemInfo video;
extern struct AudioSystemInfo audio;
extern struct GfxInfo gfx;
extern struct VideoSystemInfo video;
extern struct AudioSystemInfo audio;
extern struct GfxInfo gfx;
+extern struct OverlayInfo overlay;
extern struct AnimInfo anim;
extern struct ArtworkInfo artwork;
extern struct JoystickInfo joystick;
extern struct AnimInfo anim;
extern struct ArtworkInfo artwork;
extern struct JoystickInfo joystick;
@@
-1418,6
+1435,9
@@
void InitGfxDrawGlobalAnimFunction(void (*draw_global_anim_function)(int, int));
void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int));
void InitGfxCustomArtworkInfo();
void InitGfxOtherSettings();
void InitGfxDrawGlobalBorderFunction(void (*draw_global_border_function)(int));
void InitGfxCustomArtworkInfo();
void InitGfxOtherSettings();
+void InitOverlayInfo();
+void SetOverlayActive(boolean);
+boolean GetOverlayActive();
void SetDrawDeactivationMask(int);
void SetDrawBackgroundMask(int);
void SetWindowBackgroundBitmap(Bitmap *);
void SetDrawDeactivationMask(int);
void SetDrawBackgroundMask(int);
void SetWindowBackgroundBitmap(Bitmap *);
@@
-1480,7
+1500,6
@@
void OpenAudio(void);
void CloseAudio(void);
void SetAudioMode(boolean);
void CloseAudio(void);
void SetAudioMode(boolean);
-void InitEventFilter(EventFilter);
boolean PendingEvent(void);
void NextEvent(Event *event);
void PeekEvent(Event *event);
boolean PendingEvent(void);
void NextEvent(Event *event);
void PeekEvent(Event *event);
@@
-1488,6
+1507,8
@@
Key GetEventKey(KeyEvent *, boolean);
KeyMod HandleKeyModState(Key, int);
KeyMod GetKeyModState();
KeyMod GetKeyModStateFromEvents();
KeyMod HandleKeyModState(Key, int);
KeyMod GetKeyModState();
KeyMod GetKeyModStateFromEvents();
+void StartTextInput(int, int, int, int);
+void StopTextInput();
boolean CheckCloseWindowEvent(ClientMessageEvent *);
void InitJoysticks();
boolean CheckCloseWindowEvent(ClientMessageEvent *);
void InitJoysticks();