diff options
author | Filippos Karapetis | 2009-10-12 10:32:44 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-10-12 10:32:44 +0000 |
commit | 2bb8d69380c7a86b99c1fb4812fafaad3b84529c (patch) | |
tree | 0ee9092c4331fba5f0bb7c01805d9f2d405162e5 /engines/sci/gui | |
parent | e8deac29a5bacdb82f96a82f5cdcf1881055a0a5 (diff) | |
download | scummvm-rg350-2bb8d69380c7a86b99c1fb4812fafaad3b84529c.tar.gz scummvm-rg350-2bb8d69380c7a86b99c1fb4812fafaad3b84529c.tar.bz2 scummvm-rg350-2bb8d69380c7a86b99c1fb4812fafaad3b84529c.zip |
Got rid of _baseTable and _baseDisplayTable
svn-id: r44973
Diffstat (limited to 'engines/sci/gui')
-rw-r--r-- | engines/sci/gui/gui_screen.cpp | 23 | ||||
-rw-r--r-- | engines/sci/gui/gui_screen.h | 3 |
2 files changed, 9 insertions, 17 deletions
diff --git a/engines/sci/gui/gui_screen.cpp b/engines/sci/gui/gui_screen.cpp index 28f3cbc25f..1cbaf01da5 100644 --- a/engines/sci/gui/gui_screen.cpp +++ b/engines/sci/gui/gui_screen.cpp @@ -54,11 +54,6 @@ SciGuiScreen::SciGuiScreen(int16 width, int16 height, int16 scaleFactor) : // Sets display screen to be actually displayed _activeScreen = _displayScreen; - for (i = 0; i < _height; i++) { - _baseTable[i] = base; _baseDisplayTable[i] = base; - base += _width; - } - _picNotValid = false; _unditherState = false; } @@ -90,16 +85,16 @@ byte SciGuiScreen::getDrawingMask(byte color, byte prio, byte control) { } void SciGuiScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority, byte control) { - int offset = _baseTable[y] + x; + int offset = y * _displayWidth + x; if (drawMask & SCI_SCREEN_MASK_VISUAL) { - *(_visualScreen + offset) = color; - _displayScreen[_baseDisplayTable[y] + x] = color; + _visualScreen[offset] = color; + _displayScreen[offset] = color; } if (drawMask & SCI_SCREEN_MASK_PRIORITY) - *(_priorityScreen + offset) = priority; + _priorityScreen[offset] = priority; if (drawMask & SCI_SCREEN_MASK_CONTROL) - *(_controlScreen + offset) = control; + _controlScreen[offset] = control; } // Sierra's Bresenham line drawing @@ -167,19 +162,19 @@ void SciGuiScreen::drawLine(Common::Point startPoint, Common::Point endPoint, by } byte SciGuiScreen::getVisual(int x, int y) { - return _visualScreen[_baseTable[y] + x]; + return _visualScreen[y * _displayWidth + x]; } byte SciGuiScreen::getPriority(int x, int y) { - return _priorityScreen[_baseTable[y] + x]; + return _priorityScreen[y * _displayWidth + x]; } byte SciGuiScreen::getControl(int x, int y) { - return _controlScreen[_baseTable[y] + x]; + return _controlScreen[y * _displayWidth + x]; } byte SciGuiScreen::isFillMatch(int16 x, int16 y, byte flag, byte t_color, byte t_pri, byte t_con) { - int offset = _baseTable[y] + x; + int offset = y * _displayWidth + x; byte match = 0; if (flag & SCI_SCREEN_MASK_VISUAL && *(_visualScreen + offset) == t_color) diff --git a/engines/sci/gui/gui_screen.h b/engines/sci/gui/gui_screen.h index 6ab6b03288..63f641189c 100644 --- a/engines/sci/gui/gui_screen.h +++ b/engines/sci/gui/gui_screen.h @@ -86,9 +86,6 @@ private: void restoreBitsScreen(Common::Rect rect, byte *&memoryPtr, byte *screen); void saveBitsScreen(Common::Rect rect, byte *screen, byte *&memoryPtr); - uint16 _baseTable[SCI_SCREEN_MAXHEIGHT]; - uint16 _baseDisplayTable[SCI_SCREEN_MAXHEIGHT]; - bool _unditherState; int16 _unditherMemorial[SCI_SCREEN_UNDITHERMEMORIAL_SIZE]; |