From 3e66ae85f60469e8a79c2b7a2ac2b11589bac9c5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 5 Oct 2009 12:49:31 +0000 Subject: Better naming for the palette setting functions, to disambiguate them from the existing ones svn-id: r44662 --- engines/sci/gui/gui.cpp | 4 ++-- engines/sci/gui/gui_gfx.cpp | 10 +++++----- engines/sci/gui/gui_gfx.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/sci/gui') diff --git a/engines/sci/gui/gui.cpp b/engines/sci/gui/gui.cpp index 6d5ad603fa..84ef16cf9a 100644 --- a/engines/sci/gui/gui.cpp +++ b/engines/sci/gui/gui.cpp @@ -251,7 +251,7 @@ void SciGui::drawPicture(GuiResourceId pictureId, uint16 style, uint16 flags, in void SciGui::drawCel(GuiResourceId viewId, GuiViewLoopNo loopNo, GuiViewCelNo celNo, uint16 leftPos, uint16 topPos, int16 priority, uint16 paletteNo) { _gfx->drawCel(viewId, loopNo, celNo, leftPos, topPos, priority, paletteNo); - _gfx->setPalette(&_gfx->_sysPalette); + _gfx->setScreenPalette(&_gfx->_sysPalette); _screen->copyToScreen(); } @@ -329,7 +329,7 @@ int16 SciGui::paletteFind(int r, int g, int b) { void SciGui::paletteSetIntensity(int fromColor, int toColor, int intensity, bool setPalette) { _gfx->PaletteSetIntensity(fromColor, toColor, intensity, &_gfx->_sysPalette); if (setPalette) { - _gfx->setPalette(&_gfx->_sysPalette); + _gfx->setScreenPalette(&_gfx->_sysPalette); } } diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp index 724bf67e5e..7111d681f6 100644 --- a/engines/sci/gui/gui_gfx.cpp +++ b/engines/sci/gui/gui_gfx.cpp @@ -147,7 +147,7 @@ void SciGuiGfx::SetEGApalette() { _sysPalette.colors[i].r = 200; _sysPalette.colors[i].used = 1; } - setPalette(&_sysPalette); + setScreenPalette(&_sysPalette); } void SciGuiGfx::CreatePaletteFromData(byte *data, GuiPalette *paletteOut) { @@ -212,7 +212,7 @@ void SciGuiGfx::SetPalette(GuiPalette *sciPal, int16 flag) { MergePalettes(sciPal, &_sysPalette, flag); sciPal->timestamp = _sysPalette.timestamp; if (_picNotValid == 0 && systime != _sysPalette.timestamp) - setPalette(&_sysPalette); + setScreenPalette(&_sysPalette); } } @@ -282,7 +282,7 @@ uint16 SciGuiGfx::MatchColor(GuiPalette*pPal, byte r, byte g, byte b) { return found; } -void SciGuiGfx::setPalette(GuiPalette*pal) { +void SciGuiGfx::setScreenPalette(GuiPalette*pal) { if (pal != &_sysPalette) memcpy(&_sysPalette,pal,sizeof(GuiPalette)); // just copy palette to system @@ -300,7 +300,7 @@ void SciGuiGfx::setPalette(GuiPalette*pal) { _system->setPalette(bpal, 0, 256); } -void SciGuiGfx::getPalette(GuiPalette*pal) { +void SciGuiGfx::getScreenPalette(GuiPalette*pal) { if (pal != &_sysPalette) memcpy(pal, &_sysPalette,sizeof(GuiPalette)); } @@ -1285,7 +1285,7 @@ void SciGuiGfx::PaletteAnimate(byte fromColor, byte toColor, int speed) { // removing schedule _palSchedules.remove_at(i); } - setPalette(&_sysPalette); + setScreenPalette(&_sysPalette); return; } } diff --git a/engines/sci/gui/gui_gfx.h b/engines/sci/gui/gui_gfx.h index 830d349d29..fd9a22eb3b 100644 --- a/engines/sci/gui/gui_gfx.h +++ b/engines/sci/gui/gui_gfx.h @@ -57,8 +57,8 @@ public: void SetPalette(GuiPalette *sciPal, int16 flag); void MergePalettes(GuiPalette *pFrom, GuiPalette *pTo, uint16 flag); uint16 MatchColor(GuiPalette *pPal, byte r, byte g, byte b); - void setPalette(GuiPalette *pal); - void getPalette(GuiPalette *pal); + void setScreenPalette(GuiPalette *pal); + void getScreenPalette(GuiPalette *pal); GuiPort *SetPort(GuiPort *port); GuiPort *GetPort(); -- cgit v1.2.3