[Scummvm-cvs-logs] SF.net SVN: scummvm:[44973] scummvm/trunk/engines/sci/gui
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Oct 12 12:32:44 CEST 2009
Revision: 44973
http://scummvm.svn.sourceforge.net/scummvm/?rev=44973&view=rev
Author: thebluegr
Date: 2009-10-12 10:32:44 +0000 (Mon, 12 Oct 2009)
Log Message:
-----------
Got rid of _baseTable and _baseDisplayTable
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_screen.cpp
scummvm/trunk/engines/sci/gui/gui_screen.h
Modified: scummvm/trunk/engines/sci/gui/gui_screen.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-10-12 10:09:25 UTC (rev 44972)
+++ scummvm/trunk/engines/sci/gui/gui_screen.cpp 2009-10-12 10:32:44 UTC (rev 44973)
@@ -54,11 +54,6 @@
// 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 @@
}
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 @@
}
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)
Modified: scummvm/trunk/engines/sci/gui/gui_screen.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.h 2009-10-12 10:09:25 UTC (rev 44972)
+++ scummvm/trunk/engines/sci/gui/gui_screen.h 2009-10-12 10:32:44 UTC (rev 44973)
@@ -86,9 +86,6 @@
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];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list