aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordhewg2011-04-05 15:07:07 +0200
committerdhewg2011-04-05 15:07:07 +0200
commitea253ff26d2d5ffeec85d34a79c00f0f50598111 (patch)
treed34441a17d851a9d3508e51589d53147d4e899b8
parent1c8fc0538815b1418bb7824e4eefda65eb2719d9 (diff)
downloadscummvm-rg350-ea253ff26d2d5ffeec85d34a79c00f0f50598111.tar.gz
scummvm-rg350-ea253ff26d2d5ffeec85d34a79c00f0f50598111.tar.bz2
scummvm-rg350-ea253ff26d2d5ffeec85d34a79c00f0f50598111.zip
ANDROID: Use a faked paletted texture for CLUT cursors
Same change as for the game screen, reduces CPU usage a little
-rw-r--r--backends/platform/android/android.cpp2
-rw-r--r--backends/platform/android/android.h2
-rw-r--r--backends/platform/android/texture.cpp8
-rw-r--r--backends/platform/android/texture.h6
4 files changed, 16 insertions, 2 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 1a83289c25..6346ffa7a3 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -359,7 +359,7 @@ void OSystem_Android::initBackend() {
_game_texture = new GLESFakePalette565Texture();
_overlay_texture = new GLES4444Texture();
- _mouse_texture_palette = new GLESPalette5551Texture();
+ _mouse_texture_palette = new GLESFakePalette5551Texture();
_mouse_texture = _mouse_texture_palette;
initOverlay();
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index a5a30aef19..55a828b873 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -129,7 +129,7 @@ private:
// Mouse layer
GLESBaseTexture *_mouse_texture;
- GLESPaletteTexture *_mouse_texture_palette;
+ GLESBaseTexture *_mouse_texture_palette;
GLES5551Texture *_mouse_texture_rgb;
Common::Point _mouse_hotspot;
uint32 _mouse_keycolor;
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 573f8f83e1..2018dfdaab 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -584,5 +584,13 @@ GLESFakePalette565Texture::GLESFakePalette565Texture() :
GLESFakePalette565Texture::~GLESFakePalette565Texture() {
}
+GLESFakePalette5551Texture::GLESFakePalette5551Texture() :
+ GLESFakePaletteTexture(GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1,
+ GLES5551Texture::pixelFormat()) {
+}
+
+GLESFakePalette5551Texture::~GLESFakePalette5551Texture() {
+}
+
#endif
diff --git a/backends/platform/android/texture.h b/backends/platform/android/texture.h
index 925418721b..d825357760 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -330,6 +330,12 @@ public:
virtual ~GLESFakePalette565Texture();
};
+class GLESFakePalette5551Texture : public GLESFakePaletteTexture {
+public:
+ GLESFakePalette5551Texture();
+ virtual ~GLESFakePalette5551Texture();
+};
+
#endif
#endif