Skip to content

Commit

Permalink
ANDROID: Use a faked paletted texture for CLUT cursors
Browse files Browse the repository at this point in the history
Same change as for the game screen, reduces CPU usage a little
  • Loading branch information
dhewg committed Apr 5, 2011
1 parent 1c8fc05 commit ea253ff
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backends/platform/android/android.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion backends/platform/android/android.h
Expand Up @@ -129,7 +129,7 @@ class OSystem_Android : public BaseBackend, public PaletteManager {

// Mouse layer
GLESBaseTexture *_mouse_texture;
GLESPaletteTexture *_mouse_texture_palette;
GLESBaseTexture *_mouse_texture_palette;
GLES5551Texture *_mouse_texture_rgb;
Common::Point _mouse_hotspot;
uint32 _mouse_keycolor;
Expand Down
8 changes: 8 additions & 0 deletions backends/platform/android/texture.cpp
Expand Up @@ -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

6 changes: 6 additions & 0 deletions backends/platform/android/texture.h
Expand Up @@ -330,6 +330,12 @@ class GLESFakePalette565Texture : public GLESFakePaletteTexture {
virtual ~GLESFakePalette565Texture();
};

class GLESFakePalette5551Texture : public GLESFakePaletteTexture {
public:
GLESFakePalette5551Texture();
virtual ~GLESFakePalette5551Texture();
};

#endif
#endif

0 comments on commit ea253ff

Please sign in to comment.