aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2014-02-04 12:07:05 +0100
committeruruk2014-02-04 12:07:05 +0100
commit81992bf6169b20762236894e58188e28decf6e2e (patch)
treebb8b3fe8c354d7128ad13e85781426908e09c8ba /engines/avalanche
parenta0e28107d38004c03403177c4e3d962c80c66aa2 (diff)
downloadscummvm-rg350-81992bf6169b20762236894e58188e28decf6e2e.tar.gz
scummvm-rg350-81992bf6169b20762236894e58188e28decf6e2e.tar.bz2
scummvm-rg350-81992bf6169b20762236894e58188e28decf6e2e.zip
AVALANCHE: Some renaming in Background.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/background.cpp16
-rw-r--r--engines/avalanche/background.h2
-rw-r--r--engines/avalanche/graphics.cpp8
3 files changed, 13 insertions, 13 deletions
diff --git a/engines/avalanche/background.cpp b/engines/avalanche/background.cpp
index 5d168a20af..f49d103df3 100644
--- a/engines/avalanche/background.cpp
+++ b/engines/avalanche/background.cpp
@@ -279,24 +279,24 @@ void Background::load(byte number) {
sprite._type = (PictureType)(f.readByte());
sprite._x = f.readSint16LE();
sprite._y = f.readSint16LE();
- sprite._xl = f.readSint16LE();
- sprite._yl = f.readSint16LE();
+ sprite._width = f.readSint16LE();
+ sprite._height = f.readSint16LE();
sprite._size = f.readSint32LE();
bool natural = f.readByte();
bool memorize = f.readByte();
if (memorize) {
_sprites[i]._x = sprite._x;
- _sprites[i]._xl = sprite._xl;
+ _sprites[i]._width = sprite._width;
_sprites[i]._y = sprite._y;
- _sprites[i]._yl = sprite._yl;
+ _sprites[i]._height = sprite._height;
_sprites[i]._type = sprite._type;
if (natural)
_vm->_graphics->getNaturalPicture(_sprites[i]);
else {
_sprites[i]._size = sprite._size;
- _sprites[i]._picture = _vm->_graphics->loadPictureRaw(f, _sprites[i]._xl * 8, _sprites[i]._yl + 1);
+ _sprites[i]._picture = _vm->_graphics->loadPictureRaw(f, _sprites[i]._width * 8, _sprites[i]._height + 1);
}
} else
_sprites[i]._x = kOnDisk;
@@ -335,11 +335,11 @@ void Background::draw(int16 destX, int16 destY, byte sprId) {
sprite._type = (PictureType)(f.readByte());
sprite._x = f.readSint16LE();
sprite._y = f.readSint16LE();
- sprite._xl = f.readSint16LE();
- sprite._yl = f.readSint16LE();
+ sprite._width = f.readSint16LE();
+ sprite._height = f.readSint16LE();
sprite._size = f.readSint32LE();
f.skip(2); // Natural and Memorize are used in Load()
- sprite._picture = _vm->_graphics->loadPictureRaw(f, sprite._xl * 8, sprite._yl + 1);
+ sprite._picture = _vm->_graphics->loadPictureRaw(f, sprite._width * 8, sprite._height + 1);
if (destX < 0) {
destX = sprite._x * 8;
diff --git a/engines/avalanche/background.h b/engines/avalanche/background.h
index 34d7a9a2cc..67020c861d 100644
--- a/engines/avalanche/background.h
+++ b/engines/avalanche/background.h
@@ -40,7 +40,7 @@ enum PictureType {kEga, kBgi, kNaturalImage};
struct SpriteType {
PictureType _type;
int16 _x, _y;
- int16 _xl, _yl;
+ int16 _width, _height;
int32 _size;
Graphics::Surface _picture;
};
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index cc6519603a..b98ca4b374 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -850,10 +850,10 @@ void GraphicManager::showScroll() {
void GraphicManager::getNaturalPicture(SpriteType &sprite) {
sprite._type = kNaturalImage; // We simply read from the screen and later, in drawSprite() we draw it right back.
- sprite._size = sprite._xl * 8 * sprite._yl + 1;
- sprite._picture.create(sprite._xl * 8, sprite._yl + 1, Graphics::PixelFormat::createFormatCLUT8());
- for (uint16 y = 0; y < sprite._yl + 1; y++) {
- for (uint16 x = 0; x < sprite._xl * 8; x++)
+ sprite._size = sprite._width * 8 * sprite._height + 1;
+ sprite._picture.create(sprite._width * 8, sprite._height + 1, Graphics::PixelFormat::createFormatCLUT8());
+ for (uint16 y = 0; y < sprite._height + 1; y++) {
+ for (uint16 x = 0; x < sprite._width * 8; x++)
*(byte *)sprite._picture.getBasePtr(x, y) = *(byte *)_vm->_graphics->_surface.getBasePtr(sprite._x * 8 + x, sprite._y + y);
}
}