aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2010-01-05 13:51:47 +0000
committerMartin Kiewitz2010-01-05 13:51:47 +0000
commitb2fd2a83105518a1a0a9a99f10879fb5eab14c47 (patch)
treef01a0707d625dbce8e1c7f24773bd82f5c5f8663 /engines
parent928322314d82c9c7f549d6d9881025e30f5b9a8f (diff)
downloadscummvm-rg350-b2fd2a83105518a1a0a9a99f10879fb5eab14c47.tar.gz
scummvm-rg350-b2fd2a83105518a1a0a9a99f10879fb5eab14c47.tar.bz2
scummvm-rg350-b2fd2a83105518a1a0a9a99f10879fb5eab14c47.zip
SCI: sci32 pictures are now fully drawn to screen (including all layers)
svn-id: r47025
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/picture.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp
index a86fffcb0a..65dde66ee3 100644
--- a/engines/sci/graphics/picture.cpp
+++ b/engines/sci/graphics/picture.cpp
@@ -119,18 +119,25 @@ void SciGuiPicture::drawSci32Vga() {
int size = _resource->size;
int header_size = READ_LE_UINT16(inbuffer);
int palette_data_ptr = READ_LE_UINT16(inbuffer + 6);
+ int celCount = inbuffer[2];
int cel_headerPos = header_size;
- int cel_RlePos = READ_LE_UINT16(inbuffer + cel_headerPos + 24);
- int cel_LiteralPos = READ_LE_UINT16(inbuffer + cel_headerPos + 28);
+ int cel_RlePos, cel_LiteralPos;
+ int cel_relXpos, cel_relYpos;
Palette palette;
// Create palette and set it
_palette->createFromData(inbuffer + palette_data_ptr, &palette);
_palette->set(&palette, 2);
- drawCelData(inbuffer, size, cel_headerPos, cel_RlePos, cel_LiteralPos, 0, 0, true);
-
- // TODO: find out where priority map is stored
+ while (celCount > 0) {
+ cel_RlePos = READ_LE_UINT16(inbuffer + cel_headerPos + 24);
+ cel_LiteralPos = READ_LE_UINT16(inbuffer + cel_headerPos + 28);
+ cel_relXpos = READ_LE_UINT16(inbuffer + cel_headerPos + 38);
+ cel_relYpos = READ_LE_UINT16(inbuffer + cel_headerPos + 40);
+ drawCelData(inbuffer, size, cel_headerPos, cel_RlePos, cel_LiteralPos, cel_relXpos, cel_relYpos, true);
+ cel_headerPos += 42;
+ celCount--;
+ }
}
#endif