From b2fd2a83105518a1a0a9a99f10879fb5eab14c47 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Tue, 5 Jan 2010 13:51:47 +0000 Subject: SCI: sci32 pictures are now fully drawn to screen (including all layers) svn-id: r47025 --- engines/sci/graphics/picture.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'engines/sci/graphics') 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 -- cgit v1.2.3