diff options
author | Joseph-Eugene Winzer | 2017-06-07 18:34:11 +0200 |
---|---|---|
committer | Thierry Crozat | 2018-01-22 19:31:42 +0000 |
commit | 332763e8253f11e769f44bbaf17b4ddb3e80c097 (patch) | |
tree | dd05582881d5a1635191c372f6d8c9ed9c63a78f /engines/supernova | |
parent | 9b4bade4f647441919e13a92f97926eec71663bd (diff) | |
download | scummvm-rg350-332763e8253f11e769f44bbaf17b4ddb3e80c097.tar.gz scummvm-rg350-332763e8253f11e769f44bbaf17b4ddb3e80c097.tar.bz2 scummvm-rg350-332763e8253f11e769f44bbaf17b4ddb3e80c097.zip |
SUPERNOVA: add renderBox()
Diffstat (limited to 'engines/supernova')
-rw-r--r-- | engines/supernova/graphics.cpp | 3 | ||||
-rw-r--r-- | engines/supernova/graphics.h | 10 | ||||
-rw-r--r-- | engines/supernova/supernova.cpp | 11 | ||||
-rw-r--r-- | engines/supernova/supernova.h | 1 |
4 files changed, 12 insertions, 13 deletions
diff --git a/engines/supernova/graphics.cpp b/engines/supernova/graphics.cpp index 5913553633..dfec15f174 100644 --- a/engines/supernova/graphics.cpp +++ b/engines/supernova/graphics.cpp @@ -72,8 +72,7 @@ bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) { _clickField[i].next = stream.readByte(); } - byte zwCodes[256]; - Common::fill(zwCodes, zwCodes + 256, 0); + byte zwCodes[256] = {0}; byte numRepeat = stream.readByte(); byte numZw = stream.readByte(); stream.read(zwCodes, numZw); diff --git a/engines/supernova/graphics.h b/engines/supernova/graphics.h index 7cd0e3c66e..585aabe260 100644 --- a/engines/supernova/graphics.h +++ b/engines/supernova/graphics.h @@ -14,16 +14,6 @@ struct Surface; namespace Supernova { -const byte initPalette[48] = { -// r g b - 0, 0, 0, 16, 16, 16, 22, 22, 22, - 28, 28, 28, 63, 63, 63, 0, 52, 0, - 0, 63, 0, 54, 0, 0, 63, 0, 0, - 0, 0, 30, 0, 0, 45, 40, 40, 40, - 20, 50, 63, 10, 63, 10, 60, 60, 0, - 63, 10, 10 -}; - class MSNImageDecoder : public Image::ImageDecoder { public: MSNImageDecoder(); diff --git a/engines/supernova/supernova.cpp b/engines/supernova/supernova.cpp index a2302230bd..f05aa1b72a 100644 --- a/engines/supernova/supernova.cpp +++ b/engines/supernova/supernova.cpp @@ -74,7 +74,6 @@ Common::Error SupernovaEngine::run() { _gameRunning = true; while (_gameRunning) { updateEvents(); - renderImage(31, 0); _system->updateScreen(); _system->delayMillis(10); @@ -217,4 +216,14 @@ void SupernovaEngine::renderImage(int filenumber, int section) { _system->copyRectToScreen(_image.getSurface()->getPixels(), 320, 0, 0, 320, 200); } + +void SupernovaEngine::renderBox(int x, int y, int width, int height, byte color) { + Graphics::Surface *screen = _system->lockScreen(); + screen->drawLine(x, y, x + width, y, color); + screen->drawLine(x + width, y, x + width, y + height, color); + screen->drawLine(x + width, y + height, x, y + height, color); + screen->drawLine(x, y + height, x, y, color); + _system->unlockScreen(); +} + } diff --git a/engines/supernova/supernova.h b/engines/supernova/supernova.h index 8319e9a87a..823184ae4d 100644 --- a/engines/supernova/supernova.h +++ b/engines/supernova/supernova.h @@ -62,6 +62,7 @@ private: void playSoundMod(int filenumber); void stopSound(); void renderImage(int filenumber, int section); + void renderBox(int x, int y, int width, int height, byte color); }; } |