SCI: SCI_SCREEN_MASK_* now GFX_SCREEN_MASK_*, using enum - added new enum GFX_SCREEN_UPSCALED_*
svn-id: r49039
This commit is contained in:
parent
83a25d2e37
commit
59a255226f
12 changed files with 99 additions and 91 deletions
|
@ -463,7 +463,7 @@ reg_t kOnControl(EngineState *s, int argc, reg_t *argv) {
|
||||||
int argBase = 0;
|
int argBase = 0;
|
||||||
|
|
||||||
if ((argc == 2) || (argc == 4)) {
|
if ((argc == 2) || (argc == 4)) {
|
||||||
screenMask = SCI_SCREEN_MASK_CONTROL;
|
screenMask = GFX_SCREEN_MASK_CONTROL;
|
||||||
} else {
|
} else {
|
||||||
screenMask = argv[0].toUint16();
|
screenMask = argv[0].toUint16();
|
||||||
argBase = 1;
|
argBase = 1;
|
||||||
|
|
|
@ -316,7 +316,7 @@ void GfxAnimate::update() {
|
||||||
if ((signal & kSignalIgnoreActor) == 0) {
|
if ((signal & kSignalIgnoreActor) == 0) {
|
||||||
rect = listEntry->celRect;
|
rect = listEntry->celRect;
|
||||||
rect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
|
rect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
|
||||||
_paint16->fillRect(rect, SCI_SCREEN_MASK_CONTROL, 0, 0, 15);
|
_paint16->fillRect(rect, GFX_SCREEN_MASK_CONTROL, 0, 0, 15);
|
||||||
}
|
}
|
||||||
listEntry->signal = signal;
|
listEntry->signal = signal;
|
||||||
}
|
}
|
||||||
|
@ -336,9 +336,9 @@ void GfxAnimate::update() {
|
||||||
} else {
|
} else {
|
||||||
signal &= 0xFFFF ^ kSignalRemoveView;
|
signal &= 0xFFFF ^ kSignalRemoveView;
|
||||||
if (signal & kSignalIgnoreActor)
|
if (signal & kSignalIgnoreActor)
|
||||||
bitsHandle = _paint16->bitsSave(listEntry->celRect, SCI_SCREEN_MASK_VISUAL|SCI_SCREEN_MASK_PRIORITY);
|
bitsHandle = _paint16->bitsSave(listEntry->celRect, GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY);
|
||||||
else
|
else
|
||||||
bitsHandle = _paint16->bitsSave(listEntry->celRect, SCI_SCREEN_MASK_ALL);
|
bitsHandle = _paint16->bitsSave(listEntry->celRect, GFX_SCREEN_MASK_ALL);
|
||||||
PUT_SEL32(_s->_segMan, curObject, SELECTOR(underBits), bitsHandle);
|
PUT_SEL32(_s->_segMan, curObject, SELECTOR(underBits), bitsHandle);
|
||||||
}
|
}
|
||||||
listEntry->signal = signal;
|
listEntry->signal = signal;
|
||||||
|
@ -361,7 +361,7 @@ void GfxAnimate::update() {
|
||||||
if ((signal & kSignalIgnoreActor) == 0) {
|
if ((signal & kSignalIgnoreActor) == 0) {
|
||||||
rect = listEntry->celRect;
|
rect = listEntry->celRect;
|
||||||
rect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
|
rect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, rect.top, rect.bottom - 1);
|
||||||
_paint16->fillRect(rect, SCI_SCREEN_MASK_CONTROL, 0, 0, 15);
|
_paint16->fillRect(rect, GFX_SCREEN_MASK_CONTROL, 0, 0, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
listIterator++;
|
listIterator++;
|
||||||
|
@ -386,7 +386,7 @@ void GfxAnimate::drawCels() {
|
||||||
|
|
||||||
if (!(signal & (kSignalNoUpdate | kSignalHidden | kSignalAlwaysUpdate))) {
|
if (!(signal & (kSignalNoUpdate | kSignalHidden | kSignalAlwaysUpdate))) {
|
||||||
// Save background
|
// Save background
|
||||||
bitsHandle = _paint16->bitsSave(listEntry->celRect, SCI_SCREEN_MASK_ALL);
|
bitsHandle = _paint16->bitsSave(listEntry->celRect, GFX_SCREEN_MASK_ALL);
|
||||||
PUT_SEL32(_s->_segMan, curObject, SELECTOR(underBits), bitsHandle);
|
PUT_SEL32(_s->_segMan, curObject, SELECTOR(underBits), bitsHandle);
|
||||||
|
|
||||||
// draw corresponding cel
|
// draw corresponding cel
|
||||||
|
@ -504,7 +504,7 @@ void GfxAnimate::reAnimate(Common::Rect rect) {
|
||||||
lastCastEntry = _lastCastData;
|
lastCastEntry = _lastCastData;
|
||||||
lastCastCount = _lastCastCount;
|
lastCastCount = _lastCastCount;
|
||||||
while (lastCastCount > 0) {
|
while (lastCastCount > 0) {
|
||||||
lastCastEntry->castHandle = _paint16->bitsSave(lastCastEntry->celRect, SCI_SCREEN_MASK_VISUAL|SCI_SCREEN_MASK_PRIORITY);
|
lastCastEntry->castHandle = _paint16->bitsSave(lastCastEntry->celRect, GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY);
|
||||||
_paint16->drawCel(lastCastEntry->viewId, lastCastEntry->loopNo, lastCastEntry->celNo, lastCastEntry->celRect, lastCastEntry->priority, lastCastEntry->paletteNo, lastCastEntry->scaleX, lastCastEntry->scaleY);
|
_paint16->drawCel(lastCastEntry->viewId, lastCastEntry->loopNo, lastCastEntry->celNo, lastCastEntry->celRect, lastCastEntry->priority, lastCastEntry->paletteNo, lastCastEntry->scaleX, lastCastEntry->scaleY);
|
||||||
lastCastEntry++; lastCastCount--;
|
lastCastEntry++; lastCastCount--;
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ void GfxAnimate::addToPicDrawCels() {
|
||||||
_paint16->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo);
|
_paint16->drawCel(listEntry->viewId, listEntry->loopNo, listEntry->celNo, listEntry->celRect, listEntry->priority, listEntry->paletteNo);
|
||||||
if ((listEntry->signal & kSignalIgnoreActor) == 0) {
|
if ((listEntry->signal & kSignalIgnoreActor) == 0) {
|
||||||
listEntry->celRect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, listEntry->celRect.top, listEntry->celRect.bottom - 1);
|
listEntry->celRect.top = CLIP<int16>(_ports->kernelPriorityToCoordinate(listEntry->priority) - 1, listEntry->celRect.top, listEntry->celRect.bottom - 1);
|
||||||
_paint16->fillRect(listEntry->celRect, SCI_SCREEN_MASK_CONTROL, 0, 0, 15);
|
_paint16->fillRect(listEntry->celRect, GFX_SCREEN_MASK_CONTROL, 0, 0, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
listIterator++;
|
listIterator++;
|
||||||
|
|
|
@ -53,7 +53,7 @@ uint16 GfxCompare::isOnControl(uint16 screenMask, const Common::Rect &rect) {
|
||||||
if (rect.isEmpty())
|
if (rect.isEmpty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
|
if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
for (y = rect.top; y < rect.bottom; y++) {
|
for (y = rect.top; y < rect.bottom; y++) {
|
||||||
for (x = rect.left; x < rect.right; x++) {
|
for (x = rect.left; x < rect.right; x++) {
|
||||||
result |= 1 << _screen->getPriority(x, y);
|
result |= 1 << _screen->getPriority(x, y);
|
||||||
|
@ -161,7 +161,7 @@ bool GfxCompare::kernelCanBeHere(reg_t curObject, reg_t listReference) {
|
||||||
|
|
||||||
signal = GET_SEL32V(_segMan, curObject, SELECTOR(signal));
|
signal = GET_SEL32V(_segMan, curObject, SELECTOR(signal));
|
||||||
controlMask = GET_SEL32V(_segMan, curObject, SELECTOR(illegalBits));
|
controlMask = GET_SEL32V(_segMan, curObject, SELECTOR(illegalBits));
|
||||||
result = (isOnControl(SCI_SCREEN_MASK_CONTROL, adjustedRect) & controlMask) ? false : true;
|
result = (isOnControl(GFX_SCREEN_MASK_CONTROL, adjustedRect) & controlMask) ? false : true;
|
||||||
if ((result) && (signal & (kSignalIgnoreActor | kSignalRemoveView)) == 0) {
|
if ((result) && (signal & (kSignalIgnoreActor | kSignalRemoveView)) == 0) {
|
||||||
List *list = _segMan->lookupList(listReference);
|
List *list = _segMan->lookupList(listReference);
|
||||||
if (!list)
|
if (!list)
|
||||||
|
|
|
@ -563,12 +563,12 @@ void GfxMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save background
|
// Save background
|
||||||
_menuSaveHandle = _paint16->bitsSave(_menuRect, SCI_SCREEN_MASK_VISUAL);
|
_menuSaveHandle = _paint16->bitsSave(_menuRect, GFX_SCREEN_MASK_VISUAL);
|
||||||
|
|
||||||
// Do the drawing
|
// Do the drawing
|
||||||
_paint16->fillRect(_menuRect, SCI_SCREEN_MASK_VISUAL, 0);
|
_paint16->fillRect(_menuRect, GFX_SCREEN_MASK_VISUAL, 0);
|
||||||
_menuRect.left++; _menuRect.right--; _menuRect.bottom--;
|
_menuRect.left++; _menuRect.right--; _menuRect.bottom--;
|
||||||
_paint16->fillRect(_menuRect, SCI_SCREEN_MASK_VISUAL, _screen->getColorWhite());
|
_paint16->fillRect(_menuRect, GFX_SCREEN_MASK_VISUAL, _screen->getColorWhite());
|
||||||
|
|
||||||
_menuRect.left += 8;
|
_menuRect.left += 8;
|
||||||
topPos = _menuRect.top + 1;
|
topPos = _menuRect.top + 1;
|
||||||
|
@ -588,7 +588,7 @@ void GfxMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
|
||||||
pixelPos.y = topPos + (_ports->_curPort->fontHeight >> 1) - 1;
|
pixelPos.y = topPos + (_ports->_curPort->fontHeight >> 1) - 1;
|
||||||
pixelPos.x = _menuRect.left - 7;
|
pixelPos.x = _menuRect.left - 7;
|
||||||
while (pixelPos.x < (_menuRect.right - 1)) {
|
while (pixelPos.x < (_menuRect.right - 1)) {
|
||||||
_screen->putPixel(pixelPos.x, pixelPos.y, SCI_SCREEN_MASK_VISUAL, 0, 0, 0);
|
_screen->putPixel(pixelPos.x, pixelPos.y, GFX_SCREEN_MASK_VISUAL, 0, 0, 0);
|
||||||
pixelPos.x += 2;
|
pixelPos.x += 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -689,7 +689,7 @@ GuiMenuItemEntry *GfxMenu::interactiveWithKeyboard() {
|
||||||
|
|
||||||
calculateMenuAndItemWidth();
|
calculateMenuAndItemWidth();
|
||||||
_oldPort = _ports->setPort(_ports->_menuPort);
|
_oldPort = _ports->setPort(_ports->_menuPort);
|
||||||
_barSaveHandle = _paint16->bitsSave(_ports->_menuRect, SCI_SCREEN_MASK_VISUAL);
|
_barSaveHandle = _paint16->bitsSave(_ports->_menuRect, GFX_SCREEN_MASK_VISUAL);
|
||||||
|
|
||||||
_ports->penColor(0);
|
_ports->penColor(0);
|
||||||
_ports->backColor(_screen->getColorWhite());
|
_ports->backColor(_screen->getColorWhite());
|
||||||
|
@ -810,7 +810,7 @@ GuiMenuItemEntry *GfxMenu::interactiveWithMouse() {
|
||||||
|
|
||||||
calculateMenuAndItemWidth();
|
calculateMenuAndItemWidth();
|
||||||
_oldPort = _ports->setPort(_ports->_menuPort);
|
_oldPort = _ports->setPort(_ports->_menuPort);
|
||||||
_barSaveHandle = _paint16->bitsSave(_ports->_menuRect, SCI_SCREEN_MASK_VISUAL);
|
_barSaveHandle = _paint16->bitsSave(_ports->_menuRect, GFX_SCREEN_MASK_VISUAL);
|
||||||
|
|
||||||
_ports->penColor(0);
|
_ports->penColor(0);
|
||||||
_ports->backColor(_screen->getColorWhite());
|
_ports->backColor(_screen->getColorWhite());
|
||||||
|
|
|
@ -173,13 +173,13 @@ void GfxPaint16::drawHiresCelAndShow(GuiResourceId viewId, int16 loopNo, int16 c
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::clearScreen(byte color) {
|
void GfxPaint16::clearScreen(byte color) {
|
||||||
fillRect(_ports->_curPort->rect, SCI_SCREEN_MASK_ALL, color, 0, 0);
|
fillRect(_ports->_curPort->rect, GFX_SCREEN_MASK_ALL, color, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::invertRect(const Common::Rect &rect) {
|
void GfxPaint16::invertRect(const Common::Rect &rect) {
|
||||||
int16 oldpenmode = _ports->_curPort->penMode;
|
int16 oldpenmode = _ports->_curPort->penMode;
|
||||||
_ports->_curPort->penMode = 2;
|
_ports->_curPort->penMode = 2;
|
||||||
fillRect(rect, SCI_SCREEN_MASK_VISUAL, _ports->_curPort->penClr, _ports->_curPort->backClr);
|
fillRect(rect, GFX_SCREEN_MASK_VISUAL, _ports->_curPort->penClr, _ports->_curPort->backClr);
|
||||||
_ports->_curPort->penMode = oldpenmode;
|
_ports->_curPort->penMode = oldpenmode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,17 +197,17 @@ void GfxPaint16::invertRectViaXOR(const Common::Rect &rect) {
|
||||||
for (y = r.top; y < r.bottom; y++) {
|
for (y = r.top; y < r.bottom; y++) {
|
||||||
for (x = r.left; x < r.right; x++) {
|
for (x = r.left; x < r.right; x++) {
|
||||||
curVisual = _screen->getVisual(x, y);
|
curVisual = _screen->getVisual(x, y);
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, curVisual ^ 0x0f, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, curVisual ^ 0x0f, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::eraseRect(const Common::Rect &rect) {
|
void GfxPaint16::eraseRect(const Common::Rect &rect) {
|
||||||
fillRect(rect, SCI_SCREEN_MASK_VISUAL, _ports->_curPort->backClr);
|
fillRect(rect, GFX_SCREEN_MASK_VISUAL, _ports->_curPort->backClr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::paintRect(const Common::Rect &rect) {
|
void GfxPaint16::paintRect(const Common::Rect &rect) {
|
||||||
fillRect(rect, SCI_SCREEN_MASK_VISUAL, _ports->_curPort->penClr);
|
fillRect(rect, GFX_SCREEN_MASK_VISUAL, _ports->_curPort->penClr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::fillRect(const Common::Rect &rect, int16 drawFlags, byte clrPen, byte clrBack, byte bControl) {
|
void GfxPaint16::fillRect(const Common::Rect &rect, int16 drawFlags, byte clrPen, byte clrBack, byte bControl) {
|
||||||
|
@ -222,22 +222,22 @@ void GfxPaint16::fillRect(const Common::Rect &rect, int16 drawFlags, byte clrPen
|
||||||
byte curVisual;
|
byte curVisual;
|
||||||
|
|
||||||
// Doing visual first
|
// Doing visual first
|
||||||
if (drawFlags & SCI_SCREEN_MASK_VISUAL) {
|
if (drawFlags & GFX_SCREEN_MASK_VISUAL) {
|
||||||
if (oldPenMode == 2) { // invert mode
|
if (oldPenMode == 2) { // invert mode
|
||||||
for (y = r.top; y < r.bottom; y++) {
|
for (y = r.top; y < r.bottom; y++) {
|
||||||
for (x = r.left; x < r.right; x++) {
|
for (x = r.left; x < r.right; x++) {
|
||||||
curVisual = _screen->getVisual(x, y);
|
curVisual = _screen->getVisual(x, y);
|
||||||
if (curVisual == clrPen) {
|
if (curVisual == clrPen) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, clrBack, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, clrBack, 0, 0);
|
||||||
} else if (curVisual == clrBack) {
|
} else if (curVisual == clrBack) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, clrPen, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, clrPen, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { // just fill rect with ClrPen
|
} else { // just fill rect with ClrPen
|
||||||
for (y = r.top; y < r.bottom; y++) {
|
for (y = r.top; y < r.bottom; y++) {
|
||||||
for (x = r.left; x < r.right; x++) {
|
for (x = r.left; x < r.right; x++) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, clrPen, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, clrPen, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ void GfxPaint16::fillRect(const Common::Rect &rect, int16 drawFlags, byte clrPen
|
||||||
|
|
||||||
if (drawFlags < 2)
|
if (drawFlags < 2)
|
||||||
return;
|
return;
|
||||||
drawFlags &= SCI_SCREEN_MASK_PRIORITY|SCI_SCREEN_MASK_CONTROL;
|
drawFlags &= GFX_SCREEN_MASK_PRIORITY|GFX_SCREEN_MASK_CONTROL;
|
||||||
|
|
||||||
if (oldPenMode != 2) {
|
if (oldPenMode != 2) {
|
||||||
for (y = r.top; y < r.bottom; y++) {
|
for (y = r.top; y < r.bottom; y++) {
|
||||||
|
@ -306,7 +306,7 @@ reg_t GfxPaint16::bitsSave(const Common::Rect &rect, byte screenMask) {
|
||||||
if (workerRect.isEmpty()) // nothing to save
|
if (workerRect.isEmpty()) // nothing to save
|
||||||
return NULL_REG;
|
return NULL_REG;
|
||||||
|
|
||||||
if (screenMask == SCI_SCREEN_MASK_DISPLAY) {
|
if (screenMask == GFX_SCREEN_MASK_DISPLAY) {
|
||||||
// Adjust rect to upscaled hires, but dont adjust according to port
|
// Adjust rect to upscaled hires, but dont adjust according to port
|
||||||
workerRect.top *= 2; workerRect.bottom *= 2; workerRect.bottom++;
|
workerRect.top *= 2; workerRect.bottom *= 2; workerRect.bottom++;
|
||||||
workerRect.left *= 2; workerRect.right *= 2; workerRect.right++;
|
workerRect.left *= 2; workerRect.right *= 2; workerRect.right++;
|
||||||
|
@ -407,7 +407,7 @@ reg_t GfxPaint16::kernelGraphSaveBox(Common::Rect rect, uint16 screenMask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
reg_t GfxPaint16::kernelGraphSaveUpscaledHiresBox(Common::Rect rect) {
|
reg_t GfxPaint16::kernelGraphSaveUpscaledHiresBox(Common::Rect rect) {
|
||||||
return bitsSave(rect, SCI_SCREEN_MASK_DISPLAY);
|
return bitsSave(rect, GFX_SCREEN_MASK_DISPLAY);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxPaint16::kernelGraphRestoreBox(reg_t handle) {
|
void GfxPaint16::kernelGraphRestoreBox(reg_t handle) {
|
||||||
|
@ -525,9 +525,9 @@ reg_t GfxPaint16::kernelDisplay(const char *text, int argc, reg_t *argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doSaveUnder)
|
if (doSaveUnder)
|
||||||
result = bitsSave(rect, SCI_SCREEN_MASK_VISUAL);
|
result = bitsSave(rect, GFX_SCREEN_MASK_VISUAL);
|
||||||
if (colorBack != -1)
|
if (colorBack != -1)
|
||||||
fillRect(rect, SCI_SCREEN_MASK_VISUAL, colorBack, 0, 0);
|
fillRect(rect, GFX_SCREEN_MASK_VISUAL, colorBack, 0, 0);
|
||||||
_text16->Box(text, 0, rect, alignment, -1);
|
_text16->Box(text, 0, rect, alignment, -1);
|
||||||
if (_screen->_picNotValid == 0 && bRedraw)
|
if (_screen->_picNotValid == 0 && bRedraw)
|
||||||
bitsShow(rect);
|
bitsShow(rect);
|
||||||
|
|
|
@ -52,7 +52,7 @@ void GfxPaint32::fillRect(Common::Rect rect, byte color) {
|
||||||
int16 y, x;
|
int16 y, x;
|
||||||
for (y = rect.top; y < rect.bottom; y++) {
|
for (y = rect.top; y < rect.bottom; y++) {
|
||||||
for (x = rect.left; x < rect.right; x++) {
|
for (x = rect.left; x < rect.right; x++) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, color, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, color, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ void GfxPicture::reset() {
|
||||||
int16 x, y;
|
int16 x, y;
|
||||||
for (y = _ports->getPort()->top; y < _screen->getHeight(); y++) {
|
for (y = _ports->getPort()->top; y < _screen->getHeight(); y++) {
|
||||||
for (x = 0; x < _screen->getWidth(); x++) {
|
for (x = 0; x < _screen->getWidth(); x++) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_ALL, 255, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_ALL, 255, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -304,7 +304,7 @@ void GfxPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rlePos
|
||||||
while (y < lastY) {
|
while (y < lastY) {
|
||||||
curByte = *ptr++;
|
curByte = *ptr++;
|
||||||
if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
|
if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL | SCI_SCREEN_MASK_PRIORITY, curByte, priority, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY, curByte, priority, 0);
|
||||||
|
|
||||||
x++;
|
x++;
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ void GfxPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rlePos
|
||||||
while (y < lastY) {
|
while (y < lastY) {
|
||||||
curByte = *ptr++;
|
curByte = *ptr++;
|
||||||
if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
|
if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y)))
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL | SCI_SCREEN_MASK_PRIORITY, curByte, priority, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY, curByte, priority, 0);
|
||||||
|
|
||||||
if (x == leftX) {
|
if (x == leftX) {
|
||||||
if (width > rightX - leftX) // Skip extra pixels at the end of the row
|
if (width > rightX - leftX) // Skip extra pixels at the end of the row
|
||||||
|
@ -716,35 +716,35 @@ void GfxPicture::vectorFloodFill(int16 x, int16 y, byte color, byte priority, by
|
||||||
byte searchControl = _screen->getControl(p.x, p.y);
|
byte searchControl = _screen->getControl(p.x, p.y);
|
||||||
|
|
||||||
// This logic was taken directly from sierra sci, floodfill will get aborted on various occations
|
// This logic was taken directly from sierra sci, floodfill will get aborted on various occations
|
||||||
if (screenMask & SCI_SCREEN_MASK_VISUAL) {
|
if (screenMask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
if ((color == _screen->getColorWhite()) || (searchColor != _screen->getColorWhite()))
|
if ((color == _screen->getColorWhite()) || (searchColor != _screen->getColorWhite()))
|
||||||
return;
|
return;
|
||||||
} else if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
|
} else if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
if ((priority == 0) || (searchPriority != 0))
|
if ((priority == 0) || (searchPriority != 0))
|
||||||
return;
|
return;
|
||||||
} else if (screenMask & SCI_SCREEN_MASK_CONTROL) {
|
} else if (screenMask & GFX_SCREEN_MASK_CONTROL) {
|
||||||
if ((control == 0) || (searchControl != 0))
|
if ((control == 0) || (searchControl != 0))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now remove screens, that already got the right color/priority/control
|
// Now remove screens, that already got the right color/priority/control
|
||||||
if ((screenMask & SCI_SCREEN_MASK_VISUAL) && (searchColor == color))
|
if ((screenMask & GFX_SCREEN_MASK_VISUAL) && (searchColor == color))
|
||||||
screenMask ^= SCI_SCREEN_MASK_VISUAL;
|
screenMask ^= GFX_SCREEN_MASK_VISUAL;
|
||||||
if ((screenMask & SCI_SCREEN_MASK_PRIORITY) && (searchPriority == priority))
|
if ((screenMask & GFX_SCREEN_MASK_PRIORITY) && (searchPriority == priority))
|
||||||
screenMask ^= SCI_SCREEN_MASK_PRIORITY;
|
screenMask ^= GFX_SCREEN_MASK_PRIORITY;
|
||||||
if ((screenMask & SCI_SCREEN_MASK_CONTROL) && (searchControl == control))
|
if ((screenMask & GFX_SCREEN_MASK_CONTROL) && (searchControl == control))
|
||||||
screenMask ^= SCI_SCREEN_MASK_CONTROL;
|
screenMask ^= GFX_SCREEN_MASK_CONTROL;
|
||||||
|
|
||||||
// Exit, if no screens left
|
// Exit, if no screens left
|
||||||
if (!screenMask)
|
if (!screenMask)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (screenMask & SCI_SCREEN_MASK_VISUAL) {
|
if (screenMask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
matchMask = SCI_SCREEN_MASK_VISUAL;
|
matchMask = GFX_SCREEN_MASK_VISUAL;
|
||||||
} else if (screenMask & SCI_SCREEN_MASK_PRIORITY) {
|
} else if (screenMask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
matchMask = SCI_SCREEN_MASK_PRIORITY;
|
matchMask = GFX_SCREEN_MASK_PRIORITY;
|
||||||
} else {
|
} else {
|
||||||
matchMask = SCI_SCREEN_MASK_CONTROL;
|
matchMask = GFX_SCREEN_MASK_CONTROL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// hard borders for filling
|
// hard borders for filling
|
||||||
|
|
|
@ -247,7 +247,7 @@ Window *GfxPorts::newWindow(const Common::Rect &dims, const Common::Rect *restor
|
||||||
pwnd->hSaved1 = pwnd->hSaved2 = NULL_REG;
|
pwnd->hSaved1 = pwnd->hSaved2 = NULL_REG;
|
||||||
pwnd->bDrawn = false;
|
pwnd->bDrawn = false;
|
||||||
if ((style & SCI_WINDOWMGR_STYLE_TRANSPARENT) == 0)
|
if ((style & SCI_WINDOWMGR_STYLE_TRANSPARENT) == 0)
|
||||||
pwnd->saveScreenMask = (priority == -1 ? SCI_SCREEN_MASK_VISUAL : SCI_SCREEN_MASK_VISUAL | SCI_SCREEN_MASK_PRIORITY);
|
pwnd->saveScreenMask = (priority == -1 ? GFX_SCREEN_MASK_VISUAL : GFX_SCREEN_MASK_VISUAL | GFX_SCREEN_MASK_PRIORITY);
|
||||||
|
|
||||||
if (title && (style & SCI_WINDOWMGR_STYLE_TITLE)) {
|
if (title && (style & SCI_WINDOWMGR_STYLE_TITLE)) {
|
||||||
pwnd->title = title;
|
pwnd->title = title;
|
||||||
|
@ -301,11 +301,11 @@ void GfxPorts::drawWindow(Window *pWnd) {
|
||||||
Port *oldport = setPort(_wmgrPort);
|
Port *oldport = setPort(_wmgrPort);
|
||||||
penColor(0);
|
penColor(0);
|
||||||
if ((wndStyle & SCI_WINDOWMGR_STYLE_TRANSPARENT) == 0) {
|
if ((wndStyle & SCI_WINDOWMGR_STYLE_TRANSPARENT) == 0) {
|
||||||
pWnd->hSaved1 = _paint16->bitsSave(pWnd->restoreRect, SCI_SCREEN_MASK_VISUAL);
|
pWnd->hSaved1 = _paint16->bitsSave(pWnd->restoreRect, GFX_SCREEN_MASK_VISUAL);
|
||||||
if (pWnd->saveScreenMask & SCI_SCREEN_MASK_PRIORITY) {
|
if (pWnd->saveScreenMask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
pWnd->hSaved2 = _paint16->bitsSave(pWnd->restoreRect, SCI_SCREEN_MASK_PRIORITY);
|
pWnd->hSaved2 = _paint16->bitsSave(pWnd->restoreRect, GFX_SCREEN_MASK_PRIORITY);
|
||||||
if ((wndStyle & SCI_WINDOWMGR_STYLE_USER) == 0)
|
if ((wndStyle & SCI_WINDOWMGR_STYLE_USER) == 0)
|
||||||
_paint16->fillRect(pWnd->restoreRect, SCI_SCREEN_MASK_PRIORITY, 0, 15);
|
_paint16->fillRect(pWnd->restoreRect, GFX_SCREEN_MASK_PRIORITY, 0, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,9 +327,9 @@ void GfxPorts::drawWindow(Window *pWnd) {
|
||||||
}
|
}
|
||||||
r.grow(-1);
|
r.grow(-1);
|
||||||
if (getSciVersion() <= SCI_VERSION_0_LATE)
|
if (getSciVersion() <= SCI_VERSION_0_LATE)
|
||||||
_paint16->fillRect(r, SCI_SCREEN_MASK_VISUAL, 8); // grey titlebar for SCI0
|
_paint16->fillRect(r, GFX_SCREEN_MASK_VISUAL, 8); // grey titlebar for SCI0
|
||||||
else
|
else
|
||||||
_paint16->fillRect(r, SCI_SCREEN_MASK_VISUAL, 0); // black titlebar for SCI01+
|
_paint16->fillRect(r, GFX_SCREEN_MASK_VISUAL, 0); // black titlebar for SCI01+
|
||||||
if (!pWnd->title.empty()) {
|
if (!pWnd->title.empty()) {
|
||||||
int16 oldcolor = getPort()->penClr;
|
int16 oldcolor = getPort()->penClr;
|
||||||
penColor(_screen->getColorWhite());
|
penColor(_screen->getColorWhite());
|
||||||
|
@ -346,7 +346,7 @@ void GfxPorts::drawWindow(Window *pWnd) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(wndStyle & SCI_WINDOWMGR_STYLE_TRANSPARENT))
|
if (!(wndStyle & SCI_WINDOWMGR_STYLE_TRANSPARENT))
|
||||||
_paint16->fillRect(r, SCI_SCREEN_MASK_VISUAL, pWnd->backClr);
|
_paint16->fillRect(r, GFX_SCREEN_MASK_VISUAL, pWnd->backClr);
|
||||||
|
|
||||||
_paint16->bitsShow(pWnd->restoreRect);
|
_paint16->bitsShow(pWnd->restoreRect);
|
||||||
}
|
}
|
||||||
|
@ -371,11 +371,11 @@ void GfxPorts::updateWindow(Window *wnd) {
|
||||||
reg_t handle;
|
reg_t handle;
|
||||||
|
|
||||||
if (wnd->saveScreenMask && wnd->bDrawn) {
|
if (wnd->saveScreenMask && wnd->bDrawn) {
|
||||||
handle = _paint16->bitsSave(wnd->restoreRect, SCI_SCREEN_MASK_VISUAL);
|
handle = _paint16->bitsSave(wnd->restoreRect, GFX_SCREEN_MASK_VISUAL);
|
||||||
_paint16->bitsRestore(wnd->hSaved1);
|
_paint16->bitsRestore(wnd->hSaved1);
|
||||||
wnd->hSaved1 = handle;
|
wnd->hSaved1 = handle;
|
||||||
if (wnd->saveScreenMask & SCI_SCREEN_MASK_PRIORITY) {
|
if (wnd->saveScreenMask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
handle = _paint16->bitsSave(wnd->restoreRect, SCI_SCREEN_MASK_PRIORITY);
|
handle = _paint16->bitsSave(wnd->restoreRect, GFX_SCREEN_MASK_PRIORITY);
|
||||||
_paint16->bitsRestore(wnd->hSaved2);
|
_paint16->bitsRestore(wnd->hSaved2);
|
||||||
wnd->hSaved2 = handle;
|
wnd->hSaved2 = handle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,7 +168,7 @@ void Robot::draw() {
|
||||||
//for (frame = 0; frame < 30; frame++) {
|
//for (frame = 0; frame < 30; frame++) {
|
||||||
for (y = 0; y < _height; y++) {
|
for (y = 0; y < _height; y++) {
|
||||||
for (x = 0; x < _width; x++) {
|
for (x = 0; x < _width; x++) {
|
||||||
_screen->putPixel(x, y, SCI_SCREEN_MASK_VISUAL, *bitmapData, 0, 0);
|
_screen->putPixel(x, y, GFX_SCREEN_MASK_VISUAL, *bitmapData, 0, 0);
|
||||||
bitmapData++;
|
bitmapData++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,18 +135,18 @@ void GfxScreen::copyRectToScreen(const Common::Rect &rect, int16 x, int16 y) {
|
||||||
byte GfxScreen::getDrawingMask(byte color, byte prio, byte control) {
|
byte GfxScreen::getDrawingMask(byte color, byte prio, byte control) {
|
||||||
byte flag = 0;
|
byte flag = 0;
|
||||||
if (color != 255)
|
if (color != 255)
|
||||||
flag |= SCI_SCREEN_MASK_VISUAL;
|
flag |= GFX_SCREEN_MASK_VISUAL;
|
||||||
if (prio != 255)
|
if (prio != 255)
|
||||||
flag |= SCI_SCREEN_MASK_PRIORITY;
|
flag |= GFX_SCREEN_MASK_PRIORITY;
|
||||||
if (control != 255)
|
if (control != 255)
|
||||||
flag |= SCI_SCREEN_MASK_CONTROL;
|
flag |= GFX_SCREEN_MASK_CONTROL;
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GfxScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority, byte control) {
|
void GfxScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority, byte control) {
|
||||||
int offset = y * _width + x;
|
int offset = y * _width + x;
|
||||||
|
|
||||||
if (drawMask & SCI_SCREEN_MASK_VISUAL) {
|
if (drawMask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
_visualScreen[offset] = color;
|
_visualScreen[offset] = color;
|
||||||
if (!_upscaledHires) {
|
if (!_upscaledHires) {
|
||||||
_displayScreen[offset] = color;
|
_displayScreen[offset] = color;
|
||||||
|
@ -158,9 +158,9 @@ void GfxScreen::putPixel(int x, int y, byte drawMask, byte color, byte priority,
|
||||||
_displayScreen[displayOffset + _displayWidth + 1] = color;
|
_displayScreen[displayOffset + _displayWidth + 1] = color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (drawMask & SCI_SCREEN_MASK_PRIORITY)
|
if (drawMask & GFX_SCREEN_MASK_PRIORITY)
|
||||||
_priorityScreen[offset] = priority;
|
_priorityScreen[offset] = priority;
|
||||||
if (drawMask & SCI_SCREEN_MASK_CONTROL)
|
if (drawMask & GFX_SCREEN_MASK_CONTROL)
|
||||||
_controlScreen[offset] = control;
|
_controlScreen[offset] = control;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,19 +258,19 @@ byte GfxScreen::isFillMatch(int16 x, int16 y, byte screenMask, byte t_color, byt
|
||||||
int offset = y * _width + x;
|
int offset = y * _width + x;
|
||||||
byte match = 0;
|
byte match = 0;
|
||||||
|
|
||||||
if (screenMask & SCI_SCREEN_MASK_VISUAL && *(_visualScreen + offset) == t_color)
|
if (screenMask & GFX_SCREEN_MASK_VISUAL && *(_visualScreen + offset) == t_color)
|
||||||
match |= SCI_SCREEN_MASK_VISUAL;
|
match |= GFX_SCREEN_MASK_VISUAL;
|
||||||
if (screenMask & SCI_SCREEN_MASK_PRIORITY && *(_priorityScreen + offset) == t_pri)
|
if (screenMask & GFX_SCREEN_MASK_PRIORITY && *(_priorityScreen + offset) == t_pri)
|
||||||
match |= SCI_SCREEN_MASK_PRIORITY;
|
match |= GFX_SCREEN_MASK_PRIORITY;
|
||||||
if (screenMask & SCI_SCREEN_MASK_CONTROL && *(_controlScreen + offset) == t_con)
|
if (screenMask & GFX_SCREEN_MASK_CONTROL && *(_controlScreen + offset) == t_con)
|
||||||
match |= SCI_SCREEN_MASK_CONTROL;
|
match |= GFX_SCREEN_MASK_CONTROL;
|
||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
|
|
||||||
int GfxScreen::bitsGetDataSize(Common::Rect rect, byte mask) {
|
int GfxScreen::bitsGetDataSize(Common::Rect rect, byte mask) {
|
||||||
int byteCount = sizeof(rect) + sizeof(mask);
|
int byteCount = sizeof(rect) + sizeof(mask);
|
||||||
int pixels = rect.width() * rect.height();
|
int pixels = rect.width() * rect.height();
|
||||||
if (mask & SCI_SCREEN_MASK_VISUAL) {
|
if (mask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
byteCount += pixels; // _visualScreen
|
byteCount += pixels; // _visualScreen
|
||||||
if (!_upscaledHires) {
|
if (!_upscaledHires) {
|
||||||
byteCount += pixels; // _displayScreen
|
byteCount += pixels; // _displayScreen
|
||||||
|
@ -278,13 +278,13 @@ int GfxScreen::bitsGetDataSize(Common::Rect rect, byte mask) {
|
||||||
byteCount += pixels * 4; // _displayScreen (upscaled hires)
|
byteCount += pixels * 4; // _displayScreen (upscaled hires)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_PRIORITY) {
|
if (mask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
byteCount += pixels; // _priorityScreen
|
byteCount += pixels; // _priorityScreen
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_CONTROL) {
|
if (mask & GFX_SCREEN_MASK_CONTROL) {
|
||||||
byteCount += pixels; // _controlScreen
|
byteCount += pixels; // _controlScreen
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_DISPLAY) {
|
if (mask & GFX_SCREEN_MASK_DISPLAY) {
|
||||||
if (!_upscaledHires)
|
if (!_upscaledHires)
|
||||||
error("bitsGetDataSize() called w/o being in upscaled hires mode");
|
error("bitsGetDataSize() called w/o being in upscaled hires mode");
|
||||||
byteCount += pixels; // _displayScreen (coordinates actually are given to us for hires displayScreen)
|
byteCount += pixels; // _displayScreen (coordinates actually are given to us for hires displayScreen)
|
||||||
|
@ -297,17 +297,17 @@ void GfxScreen::bitsSave(Common::Rect rect, byte mask, byte *memoryPtr) {
|
||||||
memcpy(memoryPtr, (void *)&rect, sizeof(rect)); memoryPtr += sizeof(rect);
|
memcpy(memoryPtr, (void *)&rect, sizeof(rect)); memoryPtr += sizeof(rect);
|
||||||
memcpy(memoryPtr, (void *)&mask, sizeof(mask)); memoryPtr += sizeof(mask);
|
memcpy(memoryPtr, (void *)&mask, sizeof(mask)); memoryPtr += sizeof(mask);
|
||||||
|
|
||||||
if (mask & SCI_SCREEN_MASK_VISUAL) {
|
if (mask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
bitsSaveScreen(rect, _visualScreen, _width, memoryPtr);
|
bitsSaveScreen(rect, _visualScreen, _width, memoryPtr);
|
||||||
bitsSaveDisplayScreen(rect, memoryPtr);
|
bitsSaveDisplayScreen(rect, memoryPtr);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_PRIORITY) {
|
if (mask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
bitsSaveScreen(rect, _priorityScreen, _width, memoryPtr);
|
bitsSaveScreen(rect, _priorityScreen, _width, memoryPtr);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_CONTROL) {
|
if (mask & GFX_SCREEN_MASK_CONTROL) {
|
||||||
bitsSaveScreen(rect, _controlScreen, _width, memoryPtr);
|
bitsSaveScreen(rect, _controlScreen, _width, memoryPtr);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_DISPLAY) {
|
if (mask & GFX_SCREEN_MASK_DISPLAY) {
|
||||||
if (!_upscaledHires)
|
if (!_upscaledHires)
|
||||||
error("bitsSave() called w/o being in upscaled hires mode");
|
error("bitsSave() called w/o being in upscaled hires mode");
|
||||||
bitsSaveScreen(rect, _displayScreen, _displayWidth, memoryPtr);
|
bitsSaveScreen(rect, _displayScreen, _displayWidth, memoryPtr);
|
||||||
|
@ -356,17 +356,17 @@ void GfxScreen::bitsRestore(byte *memoryPtr) {
|
||||||
memcpy((void *)&rect, memoryPtr, sizeof(rect)); memoryPtr += sizeof(rect);
|
memcpy((void *)&rect, memoryPtr, sizeof(rect)); memoryPtr += sizeof(rect);
|
||||||
memcpy((void *)&mask, memoryPtr, sizeof(mask)); memoryPtr += sizeof(mask);
|
memcpy((void *)&mask, memoryPtr, sizeof(mask)); memoryPtr += sizeof(mask);
|
||||||
|
|
||||||
if (mask & SCI_SCREEN_MASK_VISUAL) {
|
if (mask & GFX_SCREEN_MASK_VISUAL) {
|
||||||
bitsRestoreScreen(rect, memoryPtr, _visualScreen, _width);
|
bitsRestoreScreen(rect, memoryPtr, _visualScreen, _width);
|
||||||
bitsRestoreDisplayScreen(rect, memoryPtr);
|
bitsRestoreDisplayScreen(rect, memoryPtr);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_PRIORITY) {
|
if (mask & GFX_SCREEN_MASK_PRIORITY) {
|
||||||
bitsRestoreScreen(rect, memoryPtr, _priorityScreen, _width);
|
bitsRestoreScreen(rect, memoryPtr, _priorityScreen, _width);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_CONTROL) {
|
if (mask & GFX_SCREEN_MASK_CONTROL) {
|
||||||
bitsRestoreScreen(rect, memoryPtr, _controlScreen, _width);
|
bitsRestoreScreen(rect, memoryPtr, _controlScreen, _width);
|
||||||
}
|
}
|
||||||
if (mask & SCI_SCREEN_MASK_DISPLAY) {
|
if (mask & GFX_SCREEN_MASK_DISPLAY) {
|
||||||
if (!_upscaledHires)
|
if (!_upscaledHires)
|
||||||
error("bitsRestore() called w/o being in upscaled hires mode");
|
error("bitsRestore() called w/o being in upscaled hires mode");
|
||||||
bitsRestoreScreen(rect, memoryPtr, _displayScreen, _displayWidth);
|
bitsRestoreScreen(rect, memoryPtr, _displayScreen, _displayWidth);
|
||||||
|
|
|
@ -35,11 +35,19 @@ namespace Sci {
|
||||||
|
|
||||||
#define SCI_SCREEN_MAXHEIGHT 400
|
#define SCI_SCREEN_MAXHEIGHT 400
|
||||||
|
|
||||||
#define SCI_SCREEN_MASK_VISUAL 1
|
enum GfxScreenUpscaledMode {
|
||||||
#define SCI_SCREEN_MASK_PRIORITY 2
|
GFX_SCREEN_UPSCALED_DISABLED = 0,
|
||||||
#define SCI_SCREEN_MASK_CONTROL 4
|
GFX_SCREEN_UPSCALED_640x400 = 1,
|
||||||
#define SCI_SCREEN_MASK_DISPLAY 8 // not official sierra sci
|
GFX_SCREEN_UPSCALED_640x480 = 2
|
||||||
#define SCI_SCREEN_MASK_ALL SCI_SCREEN_MASK_VISUAL|SCI_SCREEN_MASK_PRIORITY|SCI_SCREEN_MASK_CONTROL
|
};
|
||||||
|
|
||||||
|
enum GfxScreenMasks {
|
||||||
|
GFX_SCREEN_MASK_VISUAL = 1,
|
||||||
|
GFX_SCREEN_MASK_PRIORITY = 2,
|
||||||
|
GFX_SCREEN_MASK_CONTROL = 4,
|
||||||
|
GFX_SCREEN_MASK_DISPLAY = 8, // not official sierra sci, only used internally
|
||||||
|
GFX_SCREEN_MASK_ALL = GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY|GFX_SCREEN_MASK_CONTROL
|
||||||
|
};
|
||||||
|
|
||||||
#define SCI_SCREEN_UNDITHERMEMORIAL_SIZE 256
|
#define SCI_SCREEN_UNDITHERMEMORIAL_SIZE 256
|
||||||
|
|
||||||
|
|
|
@ -507,7 +507,7 @@ void GfxView::draw(Common::Rect rect, Common::Rect clipRect, Common::Rect clipRe
|
||||||
int16 width, height;
|
int16 width, height;
|
||||||
byte clearKey = celInfo->clearKey;
|
byte clearKey = celInfo->clearKey;
|
||||||
byte color;
|
byte color;
|
||||||
byte drawMask = priority == 255 ? SCI_SCREEN_MASK_VISUAL : SCI_SCREEN_MASK_VISUAL|SCI_SCREEN_MASK_PRIORITY;
|
byte drawMask = priority == 255 ? GFX_SCREEN_MASK_VISUAL : GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
if (_embeddedPal) {
|
if (_embeddedPal) {
|
||||||
|
@ -554,7 +554,7 @@ void GfxView::drawScaled(Common::Rect rect, Common::Rect clipRect, Common::Rect
|
||||||
int16 celHeight = celInfo->height, celWidth = celInfo->width;
|
int16 celHeight = celInfo->height, celWidth = celInfo->width;
|
||||||
byte clearKey = celInfo->clearKey;
|
byte clearKey = celInfo->clearKey;
|
||||||
byte color;
|
byte color;
|
||||||
byte drawMask = priority == 255 ? SCI_SCREEN_MASK_VISUAL : SCI_SCREEN_MASK_VISUAL|SCI_SCREEN_MASK_PRIORITY;
|
byte drawMask = priority == 255 ? GFX_SCREEN_MASK_VISUAL : GFX_SCREEN_MASK_VISUAL|GFX_SCREEN_MASK_PRIORITY;
|
||||||
int x, y;
|
int x, y;
|
||||||
uint16 scalingX[320];
|
uint16 scalingX[320];
|
||||||
uint16 scalingY[200];
|
uint16 scalingY[200];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue