diff options
author | Borja Lorente | 2016-06-21 20:30:41 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-14 18:31:44 +0200 |
commit | 4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa (patch) | |
tree | c22b1dcdc7a6a6105b5dcf061bfeba21b421a0ce | |
parent | 27ecdea89169bf9fd2a1c0870a17c93592ff299e (diff) | |
download | scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.tar.gz scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.tar.bz2 scummvm-rg350-4d8f8fd36bdb9b1f807f4da04c9e3e4c3438dbfa.zip |
MACVENTURE: Complete ppic blitting
-rw-r--r-- | engines/macventure/gui.cpp | 15 | ||||
-rw-r--r-- | engines/macventure/image.cpp | 9 | ||||
-rw-r--r-- | engines/macventure/macventure.cpp | 3 |
3 files changed, 11 insertions, 16 deletions
diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index f0dd82d43e..90d57aafc2 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -480,15 +480,7 @@ void Gui::drawMainGameWindow() { border.topOffset * 2, srf->w - (border.rightOffset * 3), srf->h - (border.bottomOffset * 3)), - kColorWhite); - getCurrentFont().drawString( - srf, - Common::String("Main Game Window"), - 0, - (srf->h / 2) - getCurrentFont().getFontHeight(), - srf->w, - kColorBlack, - Graphics::kTextAlignCenter); + kColorBlack); WindowData &data = findWindowData(kMainGameWindow); for (Common::Array<ObjID>::const_iterator it = data.children.begin(); it != data.children.end(); it++) { @@ -506,8 +498,9 @@ void Gui::drawMainGameWindow() { ImageAsset testBg(3, _graphics); testBg.blitInto(srf, border.leftOffset * 2, border.topOffset * 2, kBlitDirect); - ImageAsset testImg(428, _graphics); - testImg.blitInto(srf, border.leftOffset * 2 + 10,border.topOffset * 2 + 10, kBlitBIC); + //ImageAsset testImg(428, _graphics); + //testImg.blitInto(srf, border.leftOffset * 2 + 10,border.topOffset * 2 + 10, kBlitBIC); + } void Gui::drawSelfWindow() { diff --git a/engines/macventure/image.cpp b/engines/macventure/image.cpp index 960c18dfc4..46d440c957 100644 --- a/engines/macventure/image.cpp +++ b/engines/macventure/image.cpp @@ -70,7 +70,9 @@ ImageAsset::ImageAsset(ObjID original, Container * container) { //_maskData = nullptr; decodePPIC(_id, _imgData); - decodePPIC(_mask, _maskData); + + if (_container->getItemByteSize(_mask)) // Has mask + decodePPIC(_mask, _maskData); } ImageAsset::~ImageAsset() { @@ -352,9 +354,8 @@ void ImageAsset::blitDirect(Graphics::ManagedSurface * target, uint32 ox, uint32 byte pix = 0; for (uint x = 0; x < _bitWidth; x++) { pix = data[bmpofs + (x >> 3)] & (1 << (7 - (x & 7))); - - pix = pix ? kColorWhite : kColorBlack; - *((byte *)target->getBasePtr(ox + x, oy + y)) = pix; + pix = pix ? kColorBlack : kColorWhite; + if (pix) *((byte *)target->getBasePtr(ox + x, oy + y)) = pix; } } } diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index e68f7d2b7a..9bdb99d12f 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -132,9 +132,10 @@ Common::Error MacVentureEngine::run() { if (_gameState == kGameStateWinnig || _gameState == kGameStateLosing) { endGame(); } + + _gui->draw(); } - _gui->draw(); g_system->updateScreen(); g_system->delayMillis(50); } |