ANDROID: Support swipe-based virtcontrols
Touching and holding the left side of the screen functions as a joystick. Swiping the middle side allows fine control over arrow keys (eg. dialogues), tapping it sends an enter key. Swiping the right side up/down sends pageup/pagedown.
This commit is contained in:
parent
dcfade91e9
commit
471e4748b3
11 changed files with 243 additions and 119 deletions
|
@ -57,7 +57,11 @@ public:
|
|||
const void *buf, int pitch_buf) = 0;
|
||||
virtual void fillBuffer(uint32 color) = 0;
|
||||
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
|
||||
drawTexture(x, y, w, h, Common::Rect(0, 0, width(), height()));
|
||||
}
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h, const Common::Rect &clip);
|
||||
|
||||
|
||||
inline void setDrawRect(const Common::Rect &rect) {
|
||||
_draw_rect = rect;
|
||||
|
@ -203,13 +207,26 @@ public:
|
|||
const void *buf, int pitch_buf);
|
||||
virtual void fillBuffer(uint32 color);
|
||||
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
|
||||
drawTexture(x, y, w, h, Common::Rect(0, 0, width(), height()));
|
||||
}
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h, const Common::Rect &clip);
|
||||
|
||||
protected:
|
||||
byte *_pixels;
|
||||
byte *_buf;
|
||||
};
|
||||
|
||||
class GLES8888Texture : public GLESTexture {
|
||||
public:
|
||||
GLES8888Texture();
|
||||
virtual ~GLES8888Texture();
|
||||
|
||||
static Graphics::PixelFormat pixelFormat() {
|
||||
return Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0);
|
||||
}
|
||||
};
|
||||
|
||||
// RGBA4444 texture
|
||||
class GLES4444Texture : public GLESTexture {
|
||||
public:
|
||||
|
@ -256,7 +273,10 @@ public:
|
|||
const void *buf, int pitch_buf);
|
||||
virtual void fillBuffer(uint32 color);
|
||||
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h);
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h) {
|
||||
drawTexture(x, y, w, h, Common::Rect(0, 0, width(), height()));
|
||||
}
|
||||
virtual void drawTexture(GLshort x, GLshort y, GLshort w, GLshort h, const Common::Rect &clip);
|
||||
|
||||
virtual const byte *palette_const() const {
|
||||
return (byte *)_palette;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue