[Scummvm-cvs-logs] SF.net SVN: scummvm:[45420] scummvm/trunk/engines/sci
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Oct 26 22:41:42 CET 2009
Revision: 45420
http://scummvm.svn.sourceforge.net/scummvm/?rev=45420&view=rev
Author: thebluegr
Date: 2009-10-26 21:41:41 +0000 (Mon, 26 Oct 2009)
Log Message:
-----------
Added proper detection and handling of transitive SCI1-SCI1.1 games, like PQ1 VGA. These used SCI1 resources and compression with a SCI1.1 kernel (thanks to waltervn's observations)
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/game.cpp
scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
scummvm/trunk/engines/sci/resource.cpp
Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp 2009-10-26 21:08:15 UTC (rev 45419)
+++ scummvm/trunk/engines/sci/engine/game.cpp 2009-10-26 21:41:41 UTC (rev 45420)
@@ -197,7 +197,7 @@
} else {
resource = s->resMan->findResource(ResourceId(kResourceTypePalette, 999), 1);
if (resource) {
- if (getSciVersion() < SCI_VERSION_1_1)
+ if (s->resMan->getViewType() != kViewVga11)
s->gfx_state->gfxResMan->setStaticPalette(gfxr_read_pal1(999, resource->data, resource->size));
else
s->gfx_state->gfxResMan->setStaticPalette(gfxr_read_pal11(999, resource->data, resource->size));
Modified: scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp 2009-10-26 21:08:15 UTC (rev 45419)
+++ scummvm/trunk/engines/sci/gfx/gfx_resmgr.cpp 2009-10-26 21:41:41 UTC (rev 45420)
@@ -90,7 +90,7 @@
error("calculatePic(): pic number %d not found", nr);
if (need_unscaled) {
- if (getSciVersion() == SCI_VERSION_1_1)
+ if (_resMan->getViewType() == kViewVga11)
gfxr_draw_pic11(unscaled_pic, flags, default_palette, res->size, res->data, &basic_style, res->id.number, _staticPalette, _portBounds);
else
gfxr_draw_pic01(unscaled_pic, flags, default_palette, res->size, res->data, &basic_style, res->id.number, _resMan->getViewType(), _staticPalette, _portBounds);
@@ -99,7 +99,7 @@
if (scaled_pic && scaled_pic->undithered_buffer)
memcpy(scaled_pic->visual_map->index_data, scaled_pic->undithered_buffer, scaled_pic->undithered_buffer_size);
- if (getSciVersion() == SCI_VERSION_1_1)
+ if (_resMan->getViewType() == kViewVga11)
gfxr_draw_pic11(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _staticPalette, _portBounds);
else
gfxr_draw_pic01(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _resMan->getViewType(), _staticPalette, _portBounds);
Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp 2009-10-26 21:08:15 UTC (rev 45419)
+++ scummvm/trunk/engines/sci/resource.cpp 2009-10-26 21:41:41 UTC (rev 45420)
@@ -1629,6 +1629,14 @@
}
}
+ // Check for transitive SCI1/SCI1.1 games, like PQ1 here
+ // If the game has any heap file (here we check for heap file 0), then
+ // it definitely uses a SCI1.1 kernel
+ if (testResource(ResourceId(kResourceTypeHeap, 0))) {
+ s_sciVersion = SCI_VERSION_1_1;
+ return;
+ }
+
switch (_mapVersion) {
case kResVersionSci0Sci1Early:
if (_viewType == kViewVga) {
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