diff options
author | Strangerke | 2013-09-27 23:48:53 +0200 |
---|---|---|
committer | Strangerke | 2013-09-27 23:48:53 +0200 |
commit | 00e5a4830bda004f5b4193c9d0d97a21f3e253ba (patch) | |
tree | 4fce63d95b7416449e50370ac4ce15c74dffa61e /engines/avalanche | |
parent | 75258758ef64ae606a7aa6c4949bcb2b22ad1451 (diff) | |
download | scummvm-rg350-00e5a4830bda004f5b4193c9d0d97a21f3e253ba.tar.gz scummvm-rg350-00e5a4830bda004f5b4193c9d0d97a21f3e253ba.tar.bz2 scummvm-rg350-00e5a4830bda004f5b4193c9d0d97a21f3e253ba.zip |
AVALANCHE: Move background loading to Graphics
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/avalot.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/graphics.cpp | 4 | ||||
-rw-r--r-- | engines/avalanche/graphics.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp index 27f7338555..0e71f600e0 100644 --- a/engines/avalanche/avalot.cpp +++ b/engines/avalanche/avalot.cpp @@ -595,7 +595,7 @@ void AvalancheEngine::loadRoom(byte num) { file.seek(177); - _graphics->_background = _graphics->loadPictureRow(file, _graphics->kBackgroundWidth, _graphics->kBackgroundHeight); + _graphics->loadBackground(file); _graphics->refreshBackground(); file.close(); diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index a209904522..79df06b8c0 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -308,6 +308,10 @@ void Graphics::refreshScreen() { g_system->updateScreen(); } +void Graphics::loadBackground(Common::File &file) { + _background = loadPictureRow(file, kBackgroundWidth, kBackgroundHeight); +} + void Graphics::refreshBackground() { drawPicture(_surface, _background, 0, 10); } diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index 979b3725ce..b1b186af41 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -89,6 +89,7 @@ public: void drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y); void drawPicture(::Graphics::Surface &target, const ::Graphics::Surface &picture, uint16 destX, uint16 destY); // Can't call .free() here. See Lucerna::showscore() for example. void refreshScreen(); + void loadBackground(Common::File &file); void refreshBackground(); void zoomOut(int16 x, int16 y); // Only used when entering the map. |