diff options
author | Martin Kiewitz | 2009-10-06 16:14:40 +0000 |
---|---|---|
committer | Martin Kiewitz | 2009-10-06 16:14:40 +0000 |
commit | 14dfa5d7b01fba21c3da100830febbcdd1532d8c (patch) | |
tree | aaea4035a41e5b979178fa3220aaf5d780a365e9 /engines/sci/gui/gui_picture.cpp | |
parent | 855af31757d20ace18f8b96c09d44571aacc049b (diff) | |
download | scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.tar.gz scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.tar.bz2 scummvm-rg350-14dfa5d7b01fba21c3da100830febbcdd1532d8c.zip |
SCI/newgui: palette functions from SciGuiGfx now in SciGuiPalette
svn-id: r44698
Diffstat (limited to 'engines/sci/gui/gui_picture.cpp')
-rw-r--r-- | engines/sci/gui/gui_picture.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/sci/gui/gui_picture.cpp b/engines/sci/gui/gui_picture.cpp index aa54333688..2dc58bd312 100644 --- a/engines/sci/gui/gui_picture.cpp +++ b/engines/sci/gui/gui_picture.cpp @@ -27,13 +27,14 @@ #include "sci/engine/state.h" #include "sci/tools.h" #include "sci/gui/gui_screen.h" +#include "sci/gui/gui_palette.h" #include "sci/gui/gui_gfx.h" #include "sci/gui/gui_picture.h" namespace Sci { -SciGuiPicture::SciGuiPicture(EngineState *state, SciGuiGfx *gfx, SciGuiScreen *screen, GuiResourceId resourceId) - : _s(state), _gfx(gfx), _screen(screen), _resourceId(resourceId) { +SciGuiPicture::SciGuiPicture(EngineState *state, SciGuiGfx *gfx, SciGuiScreen *screen, SciGuiPalette *palette, GuiResourceId resourceId) + : _s(state), _gfx(gfx), _screen(screen), _palette(palette), _resourceId(resourceId) { assert(resourceId != -1); initData(resourceId); } @@ -91,8 +92,8 @@ void SciGuiPicture::drawSci11Vga() { GuiPalette palette; // Create palette and set it - CreatePaletteFromData(inbuffer + palette_data_ptr, &palette); - _gfx->SetPalette(&palette, 2); + _palette->createFromData(inbuffer + palette_data_ptr, &palette); + _palette->set(&palette, 2); // display Cel-data if (has_view) { @@ -468,7 +469,7 @@ void SciGuiPicture::drawVectorData(byte *data, int dataSize) { palette.colors[i].used = data[curPos++]; palette.colors[i].r = data[curPos++]; palette.colors[i].g = data[curPos++]; palette.colors[i].b = data[curPos++]; } - _gfx->SetPalette(&palette, 2); + _palette->set(&palette, 2); break; case PIC_OPX_VGA_EMBEDDED_VIEW: // draw cel vectorGetAbsCoords(data, curPos, x, y); |