diff options
author | Filippos Karapetis | 2009-03-14 15:43:37 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-03-14 15:43:37 +0000 |
commit | 68520809162c8e0212a4ae10fb178a21339fb87f (patch) | |
tree | 47718fb370a0d5e4fbfd2e8c8ba16a8355320f25 /engines/made/screen.cpp | |
parent | 14ced31851d3136bba55c57e58abef93502b1a4f (diff) | |
download | scummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.tar.gz scummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.tar.bz2 scummvm-rg350-68520809162c8e0212a4ae10fb178a21339fb87f.zip |
Merged loadRGBPalette() inside setRGBPalette() (that's the only place it's used and where the screen palette is set). Added a wrapper for copyRectToScreen(), to remove some duplicated code inside the ScreenEffects() class
svn-id: r39396
Diffstat (limited to 'engines/made/screen.cpp')
-rw-r--r-- | engines/made/screen.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 6fb7804753..d55b663296 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -218,17 +218,14 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f } -void Screen::loadRGBPalette(byte *palRGB, int count) { +void Screen::setRGBPalette(byte *palRGB, int start, int count) { for (int i = 0; i < count; i++) { _screenPalette[i * 4 + 0] = palRGB[i * 3 + 0]; _screenPalette[i * 4 + 1] = palRGB[i * 3 + 1]; _screenPalette[i * 4 + 2] = palRGB[i * 3 + 2]; _screenPalette[i * 4 + 3] = 0; } -} -void Screen::setRGBPalette(byte *palRGB, int start, int count) { - loadRGBPalette(palRGB, count); _vm->_system->setPalette(_screenPalette, start, count); } @@ -803,6 +800,10 @@ void Screen::showWorkScreen() { _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); } +void Screen::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { + _vm->_system->copyRectToScreen(buf, pitch, x, y, w, h); +} + void Screen::updateScreenAndWait(int delay) { _vm->_system->updateScreen(); uint32 startTime = _vm->_system->getMillis(); |