[Scummvm-cvs-logs] SF.net SVN: scummvm:[51086] scummvm/trunk/engines/sci/graphics

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Wed Jul 21 15:13:56 CEST 2010


Revision: 51086
          http://scummvm.svn.sourceforge.net/scummvm/?rev=51086&view=rev
Author:   m_kiewitz
Date:     2010-07-21 13:13:55 +0000 (Wed, 21 Jul 2010)

Log Message:
-----------
SCI: fixing hires background pictures sci2.1

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/frameout.cpp
    scummvm/trunk/engines/sci/graphics/picture.cpp
    scummvm/trunk/engines/sci/graphics/picture.h

Modified: scummvm/trunk/engines/sci/graphics/frameout.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/frameout.cpp	2010-07-21 12:41:17 UTC (rev 51085)
+++ scummvm/trunk/engines/sci/graphics/frameout.cpp	2010-07-21 13:13:55 UTC (rev 51086)
@@ -230,7 +230,7 @@
 			itemEntry = *listIterator;
 			if (planePicture) {
 				while ((planePictureCel <= itemEntry->priority) && (planePictureCel < planePictureCels)) {
-					planePicture->drawSci32Vga(planePictureCel);
+					planePicture->drawSci32Vga(planePictureCel, planeResY, planeResX);
 					planePictureCel++;
 				}
 			}
@@ -302,7 +302,7 @@
 
 		if (planePicture) {
 			while (planePictureCel < planePictureCels) {
-				planePicture->drawSci32Vga(planePictureCel);
+				planePicture->drawSci32Vga(planePictureCel, planeResY, planeResX);
 				planePictureCel++;
 			}
 			delete planePicture;

Modified: scummvm/trunk/engines/sci/graphics/picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/picture.cpp	2010-07-21 12:41:17 UTC (rev 51085)
+++ scummvm/trunk/engines/sci/graphics/picture.cpp	2010-07-21 13:13:55 UTC (rev 51086)
@@ -79,7 +79,7 @@
 #ifdef ENABLE_SCI32
 	case 0x0e: // SCI32 VGA picture
 		_resourceType = SCI_PICTURE_TYPE_SCI32;
-		drawSci32Vga();
+		//drawSci32Vga();
 		break;
 #endif
 	default:
@@ -131,7 +131,7 @@
 	return inbuffer[2];
 }
 
-void GfxPicture::drawSci32Vga(int16 celNo) {
+void GfxPicture::drawSci32Vga(int16 celNo, uint16 planeResY, uint16 planeResX) {
 	byte *inbuffer = _resource->data;
 	int size = _resource->size;
 	int header_size = READ_LE_UINT16(inbuffer);
@@ -162,6 +162,11 @@
 		cel_LiteralPos = READ_LE_UINT32(inbuffer + cel_headerPos + 28);
 		cel_relXpos = READ_LE_UINT16(inbuffer + cel_headerPos + 38);
 		cel_relYpos = READ_LE_UINT16(inbuffer + cel_headerPos + 40);
+
+		// This is really weird, adjusting picture data to plane resolution - why...
+		cel_relYpos = ((cel_relYpos * g_sci->_gfxScreen->getHeight()) / planeResY);
+		cel_relXpos = ((cel_relXpos * g_sci->_gfxScreen->getWidth()) / planeResX);
+
 		drawCelData(inbuffer, size, cel_headerPos, cel_RlePos, cel_LiteralPos, cel_relXpos, cel_relYpos);
 		cel_headerPos += 42;
 		celCount--;

Modified: scummvm/trunk/engines/sci/graphics/picture.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/picture.h	2010-07-21 12:41:17 UTC (rev 51085)
+++ scummvm/trunk/engines/sci/graphics/picture.h	2010-07-21 13:13:55 UTC (rev 51086)
@@ -56,7 +56,7 @@
 
 #ifdef ENABLE_SCI32
 	int16 getSci32celCount();
-	void drawSci32Vga(int16 celNo = -1);
+	void drawSci32Vga(int16 celNo, uint16 planeResY, uint16 planeResX);
 #endif
 
 private:


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list