aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/graphics.cpp2
-rw-r--r--engines/avalanche/graphics.h4
-rw-r--r--engines/avalanche/lucerna2.cpp6
3 files changed, 8 insertions, 4 deletions
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index bed8136dd4..6338893dbf 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -62,6 +62,7 @@ void Graphics::init() {
Graphics::~Graphics() {
_surface.free();
+ _background.free();
}
@@ -85,6 +86,7 @@ void Graphics::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) {
}
void Graphics::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y) {
+ drawPicture(_background, 0, 10);
/* First we make the pixels of the spirte blank. */
for (byte qay = 0; qay < sprite.yl; qay++) {
diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h
index 3d32bdafcb..d0adb17767 100644
--- a/engines/avalanche/graphics.h
+++ b/engines/avalanche/graphics.h
@@ -57,7 +57,9 @@ public:
static const int16 kScreenWidth = 640;
static const int16 kScreenHeight = 200;
-
+ ::Graphics::Surface _background;
+
+
Graphics(AvalancheEngine *vm);
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index eb5f5094c9..047301cf3e 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -245,11 +245,11 @@ void Lucerna::load(byte n) { /* Load2, actually */
byte backgroundHeight = 8 * 12080 / _vm->_graphics->kScreenWidth; // With 640 width it's 151
// The 8 = number of bits in a byte, and 12080 comes from the original code (see above)
- ::Graphics::Surface background = _vm->_graphics->loadPictureRow(f, backgroundWidht, backgroundHeight);
+ _vm->_graphics->_background = _vm->_graphics->loadPictureRow(f, backgroundWidht, backgroundHeight);
- _vm->_graphics->drawPicture(background, 0, 10);
+ _vm->_graphics->drawPicture(_vm->_graphics->_background, 0, 10);
- background.free();
+ _vm->_graphics->refreshScreen();
f.close();