diff options
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/compare.h | 2 | ||||
-rw-r--r-- | engines/sci/graphics/coordadjuster.h | 4 | ||||
-rw-r--r-- | engines/sci/graphics/menu.cpp | 4 | ||||
-rw-r--r-- | engines/sci/graphics/palette.cpp | 8 | ||||
-rw-r--r-- | engines/sci/graphics/palette.h | 2 | ||||
-rw-r--r-- | engines/sci/graphics/picture.cpp | 6 | ||||
-rw-r--r-- | engines/sci/graphics/ports.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/screen.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/text16.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/view.cpp | 6 |
11 files changed, 21 insertions, 21 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index c36ecd112a..18f8511953 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -201,7 +201,7 @@ void GfxAnimate::fill(byte &old_picNotValid) { adjustInvalidCels(view, it); processViewScaling(view, it); setNsRect(view, it); - + //warning("%s view %d, loop %d, cel %d, signal %x", _s->_segMan->getObjectName(curObject), it->viewId, it->loopNo, it->celNo, it->signal); // Calculate current priority according to y-coordinate @@ -659,7 +659,7 @@ void GfxAnimate::throttleSpeed() { // No entries drawn -> no speed throttler triggering break; case 1: { - + // One entry drawn -> check if that entry was a speed benchmark view, if not enable speed throttler AnimateEntry *onlyCast = &_lastCastData[0]; if ((onlyCast->viewId == 0) && (onlyCast->loopNo == 13) && (onlyCast->celNo == 0)) { diff --git a/engines/sci/graphics/compare.h b/engines/sci/graphics/compare.h index 83b4f49c08..bacb6e71e2 100644 --- a/engines/sci/graphics/compare.h +++ b/engines/sci/graphics/compare.h @@ -51,7 +51,7 @@ private: GfxCoordAdjuster *_coordAdjuster; uint16 isOnControl(uint16 screenMask, const Common::Rect &rect); - + /** * This function checks whether any of the objects in the given list, * *different* from checkObject, has a brRect which is contained inside diff --git a/engines/sci/graphics/coordadjuster.h b/engines/sci/graphics/coordadjuster.h index 1b8a3e2679..23cf79d209 100644 --- a/engines/sci/graphics/coordadjuster.h +++ b/engines/sci/graphics/coordadjuster.h @@ -68,7 +68,7 @@ public: void moveCursor(Common::Point &pos); Common::Rect pictureGetDisplayArea(); - + private: GfxPorts *_ports; @@ -90,7 +90,7 @@ public: void pictureSetDisplayArea(Common::Rect displayArea); Common::Rect pictureGetDisplayArea(); - + private: SegManager *_segMan; diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 913f680e99..673729784f 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -423,8 +423,8 @@ reg_t GfxMenu::kernelSelect(reg_t eventObject, bool pauseSound) { default: while (itemIterator != itemEnd) { itemEntry = *itemIterator; - if (itemEntry->keyPress == keyPress && - itemEntry->keyModifier == keyModifier && + if (itemEntry->keyPress == keyPress && + itemEntry->keyModifier == keyModifier && itemEntry->enabled) break; itemIterator++; diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 899ef10b33..c5a3545701 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -71,7 +71,7 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen, bool useMergi _macClut = 0; loadMacIconBarPalette(); - + #ifdef ENABLE_SCI32 _clutTable = 0; #endif @@ -236,7 +236,7 @@ static byte blendColors(byte c1, byte c2) { // return (c1/2+c2/2)+((c1&1)+(c2&1))/2; // gamma 2.2 - double t = (pow(c1/255.0, 2.2/1.0) * 255.0) + + double t = (pow(c1/255.0, 2.2/1.0) * 255.0) + (pow(c2/255.0, 2.2/1.0) * 255.0); return (byte)(0.5 + (pow(0.5*t/255.0, 1.0/2.2) * 255.0)); } @@ -378,7 +378,7 @@ bool GfxPalette::merge(Palette *newPalette, bool force, bool forceRealMerge) { break; } } - + // if still no luck - set an approximate color if (j == 256) { newPalette->mapping[i] = res & 0xFF; @@ -991,7 +991,7 @@ void GfxPalette::unloadClut() { delete[] _clutTable; _clutTable = 0; } - + #endif } // End of namespace Sci diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 9b0c45baf6..243420cc47 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -125,7 +125,7 @@ private: void loadMacIconBarPalette(); byte *_macClut; - + #ifdef ENABLE_SCI32 byte *_clutTable; #endif diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index ce69ba8922..ecb54e89e8 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -357,7 +357,7 @@ void GfxPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rlePos curByte = *ptr++; if ((curByte != clearColor) && (priority >= _screen->getPriority(x, y))) _screen->putPixel(x, y, drawMask, curByte, priority, 0); - + if (x == leftX) { ptr += sourcePixelSkipPerRow; x = rightX; @@ -515,7 +515,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) { icemanDrawFix = true; } if (g_sci->getGameId() == GID_KQ5) { - // WORKAROUND: ignore the seemingly broken priority of picture 48 + // WORKAROUND: ignore the seemingly broken priority of picture 48 // (island overview). Fixes bug #3041044. if (_resourceId == 48) ignoreBrokenPriority = true; @@ -551,7 +551,7 @@ void GfxPicture::drawVectorData(byte *data, int dataSize) { case PIC_OP_SET_PRIORITY: pic_priority = data[curPos++] & 0x0F; - if (isEGA) + if (isEGA) pic_priority = EGApriority[pic_priority]; if (ignoreBrokenPriority) pic_priority = 255; diff --git a/engines/sci/graphics/ports.cpp b/engines/sci/graphics/ports.cpp index 9412976d5b..6b4c8180bf 100644 --- a/engines/sci/graphics/ports.cpp +++ b/engines/sci/graphics/ports.cpp @@ -721,7 +721,7 @@ void GfxPorts::printWindowList(Console *con) { if ((*it)->isWindow()) { Window *wnd = ((Window *)*it); con->DebugPrintf("%d: '%s' at %d, %d, (%d, %d, %d, %d), drawn: %d, style: %d\n", - wnd->id, wnd->title.c_str(), wnd->left, wnd->top, + wnd->id, wnd->title.c_str(), wnd->left, wnd->top, wnd->rect.left, wnd->rect.top, wnd->rect.right, wnd->rect.bottom, wnd->bDrawn, wnd->wndStyle); } diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 4ab0b9719f..dbe2135143 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -338,7 +338,7 @@ void GfxScreen::drawLine(Common::Point startPoint, Common::Point endPoint, byte void GfxScreen::putKanjiChar(Graphics::FontSJIS *commonFont, int16 x, int16 y, uint16 chr, byte color) { byte *displayPtr = _displayScreen + y * _displayWidth * 2 + x * 2; // we don't use outline, so color 0 is actually not used - commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0); + commonFont->drawChar(displayPtr, chr, _displayWidth, 1, color, 0, -1, -1); } byte GfxScreen::getVisual(int x, int y) { diff --git a/engines/sci/graphics/text16.cpp b/engines/sci/graphics/text16.cpp index c2f71a0e54..84547d9828 100644 --- a/engines/sci/graphics/text16.cpp +++ b/engines/sci/graphics/text16.cpp @@ -100,7 +100,7 @@ int16 GfxText16::CodeProcessing(const char *&text, GuiResourceId orgFontId, int1 // cX -> sets textColor to _textColors[X-1] curCode = textCode[0]; curCodeParm = textCode[1]; - if (isdigit(curCodeParm)) { + if (isdigit(static_cast<unsigned char>(curCodeParm))) { curCodeParm -= '0'; } else { curCodeParm = -1; diff --git a/engines/sci/graphics/view.cpp b/engines/sci/graphics/view.cpp index afb4c184e8..6ca4903e17 100644 --- a/engines/sci/graphics/view.cpp +++ b/engines/sci/graphics/view.cpp @@ -202,7 +202,7 @@ void GfxView::initData(GuiResourceId resourceId) { palOffset = READ_SCI11ENDIAN_UINT32(_resourceData + 8); // For SCI32, this is a scale flag - if (getSciVersion() >= SCI_VERSION_2) { + if (getSciVersion() >= SCI_VERSION_2) { _sci2ScaleRes = (Sci32ViewNativeResolution)_resourceData[5]; if (_screen->getUpscaledHires() == GFX_SCREEN_UPSCALED_DISABLED) _sci2ScaleRes = SCI_VIEW_NATIVERES_NONE; @@ -426,7 +426,7 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo // compression for SCI1.1+ Mac while (pixelNr < pixelCount) { uint32 pixelLine = pixelNr; - + if (hasByteLengths) { pixelNr += *rlePtr++; runLength = *rlePtr++; @@ -500,7 +500,7 @@ void unpackCelData(byte *inBuffer, byte *celBitmap, byte clearColor, int pixelCo } else { memcpy(outPtr + pixelNr, literalPtr, MIN<uint16>(runLength, pixelCount - pixelNr)); literalPtr += runLength; - } + } break; case 0x80: // fill with color if (!literalPos) |