aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2013-12-10 01:40:46 +0200
committerFilippos Karapetis2013-12-10 01:41:15 +0200
commitfa2ea4fc6190043386f1ee0909d48af72ff7da69 (patch)
tree7a210410a6027feac2f33d092e0b6d5fb81d4b0a /engines/sci/graphics
parent59b7aa354b8d32a8f62fbd67557d04b640695225 (diff)
downloadscummvm-rg350-fa2ea4fc6190043386f1ee0909d48af72ff7da69.tar.gz
scummvm-rg350-fa2ea4fc6190043386f1ee0909d48af72ff7da69.tar.bz2
scummvm-rg350-fa2ea4fc6190043386f1ee0909d48af72ff7da69.zip
SCI: Add handling for the RAVE resource type, found in KQ6CD
This contains the sync data in the Windows version of KQ6CD. Note that currently the sync36 resource is 2 bytes bigger (it contains 2 bytes from the RAVE resource). Some test code has also been added to dump the RAVE sync resources
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/portrait.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/sci/graphics/portrait.cpp b/engines/sci/graphics/portrait.cpp
index d5227126e2..a39bcfcd88 100644
--- a/engines/sci/graphics/portrait.cpp
+++ b/engines/sci/graphics/portrait.cpp
@@ -21,6 +21,7 @@
*/
#include "common/archive.h"
+#include "common/file.h" // for DumpFile
#include "common/system.h"
#include "sci/sci.h"
@@ -140,6 +141,27 @@ void Portrait::doit(Common::Point position, uint16 resourceId, uint16 noun, uint
Resource *syncResource = _resMan->findResource(syncResourceId, true);
uint syncOffset = 0;
+#if 0
+ // Dump the sync resources to disk
+ Common::DumpFile *outFile = new Common::DumpFile();
+ Common::String outName = syncResourceId.toPatchNameBase36() + ".sync36";
+ outFile->open(outName);
+ syncResource->writeToStream(outFile);
+ outFile->finalize();
+ outFile->close();
+
+ ResourceId raveResourceId = ResourceId(kResourceTypeRave, resourceId, noun, verb, cond, seq);
+ Resource *raveResource = _resMan->findResource(raveResourceId, true);
+ outName = raveResourceId.toPatchNameBase36() + ".rave";
+ outFile->open(outName);
+ raveResource->writeToStream(outFile);
+ outFile->finalize();
+ outFile->close();
+ _resMan->unlockResource(raveResource);
+
+ delete outFile;
+#endif
+
// Set the portrait palette
_palette->set(&_portraitPalette, false, true);