diff options
author | Max Horn | 2009-05-08 16:00:39 +0000 |
---|---|---|
committer | Max Horn | 2009-05-08 16:00:39 +0000 |
commit | e34c6316c67a06d9586e217cdca52d3bc6cc0438 (patch) | |
tree | b50edba644faa997de6e9e53b2ede8f561ddf3da /engines/sci/gfx/gfx_driver.cpp | |
parent | 418d80c8a84175bdefb5e8310816d489abf0e1c6 (diff) | |
download | scummvm-rg350-e34c6316c67a06d9586e217cdca52d3bc6cc0438.tar.gz scummvm-rg350-e34c6316c67a06d9586e217cdca52d3bc6cc0438.tar.bz2 scummvm-rg350-e34c6316c67a06d9586e217cdca52d3bc6cc0438.zip |
SCI: Replaced gfx_driver_t::set_palette and install_palette by directly invoking their OSystem counterparts
svn-id: r40385
Diffstat (limited to 'engines/sci/gfx/gfx_driver.cpp')
-rw-r--r-- | engines/sci/gfx/gfx_driver.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index ffe161d846..e4f6a40120 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -38,7 +38,6 @@ struct _scummvm_driver_state { byte *visual[2]; uint8 *pointer_data; int xsize, ysize; - uint8 *palette_data; }; #define S ((struct _scummvm_driver_state *)(drv->state)) @@ -79,10 +78,6 @@ static int scummvm_init(gfx_driver_t *drv, int xfact, int yfact, int bytespp) { drv->mode = gfx_new_mode(xfact, yfact, format, new Palette(256), 0); drv->mode->palette->name = "global"; - S->palette_data = new uint8[4*256]; - for (i = 0; i < 4*256; ++i) - S->palette_data[i] = 0; - return GFX_OK; } @@ -102,9 +97,6 @@ static void scummvm_exit(gfx_driver_t *drv) { delete[] S->pointer_data; S->pointer_data = NULL; - delete[] S->palette_data; - S->palette_data = NULL; - delete S; } } @@ -306,28 +298,6 @@ static int scummvm_set_pointer(gfx_driver_t *drv, gfx_pixmap_t *pointer, Common: return GFX_OK; } -// Palette operations - -static int scummvm_set_palette(gfx_driver_t *drv, int index, byte red, byte green, byte blue) { - if (index < 0 || index > 255) { - GFXERROR("Attempt to set invalid palette entry %d\n", index); - return GFX_ERROR; - } - - S->palette_data[4*index+0] = red; - S->palette_data[4*index+1] = green; - S->palette_data[4*index+2] = blue; - S->palette_data[4*index+3] = 255; - - return GFX_OK; -} - -static int scummvm_install_palette(gfx_driver_t *drv, Palette* palette) { - g_system->setPalette(S->palette_data, 0, palette->size()); - return GFX_OK; -} - - gfx_driver_t gfx_driver_scummvm = { NULL, 0, 0, @@ -343,8 +313,6 @@ gfx_driver_t gfx_driver_scummvm = { scummvm_update, scummvm_set_static_buffer, scummvm_set_pointer, - scummvm_set_palette, - scummvm_install_palette, NULL }; |