diff options
author | uruk | 2013-07-20 10:40:57 +0200 |
---|---|---|
committer | uruk | 2013-07-20 10:40:57 +0200 |
commit | 097572193fd29324a582b18d6b7d80ff643c6776 (patch) | |
tree | f325ac1ace08932e9bd773cb06cc5e52f1ecfe2d /engines | |
parent | 09877044b3b9695368c5772842ce843f1e5026f9 (diff) | |
download | scummvm-rg350-097572193fd29324a582b18d6b7d80ff643c6776.tar.gz scummvm-rg350-097572193fd29324a582b18d6b7d80ff643c6776.tar.bz2 scummvm-rg350-097572193fd29324a582b18d6b7d80ff643c6776.zip |
AVALANCHE: Update Graph::drawPicture().
Diffstat (limited to 'engines')
-rw-r--r-- | engines/avalanche/graph.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graph.cpp index 56a9be00cd..2f5b377cbb 100644 --- a/engines/avalanche/graph.cpp +++ b/engines/avalanche/graph.cpp @@ -98,13 +98,11 @@ void Graph::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y) } void Graph::drawPicture(const byte *source, uint16 destX, uint16 destY) { - uint32 i = 0; + // The height and the width are stored in 2-2 bytes. We have to add 1 to each becouse Pascal stores the value of them -1. + uint16 pictureWidth = READ_LE_UINT16(source) + 1; + uint16 pictureHeight = READ_LE_UINT16(source + 2) + 1; - // The height and the width are stored in 2 bytes. - uint16 pictureWidth = (source[i++] + 1); - pictureWidth += (source[i++] << 8); - uint16 pictureHeight = (source[i++] + 1); - pictureHeight += (source[i++] << 8); + uint32 i = 4; Graphics::Surface picture; // We make a Surface object for the picture itself. |