aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-10-16 04:40:50 +0000
committerTravis Howell2006-10-16 04:40:50 +0000
commit087331e102e44650903660446d3f3490a692777b (patch)
treec0b0b2f43ff3dc93ce5f47dcf84a72bf599fcf75
parent0c761c26ab953323192bc1772c389e712af91a63 (diff)
downloadscummvm-rg350-087331e102e44650903660446d3f3490a692777b.tar.gz
scummvm-rg350-087331e102e44650903660446d3f3490a692777b.tar.bz2
scummvm-rg350-087331e102e44650903660446d3f3490a692777b.zip
Add work around for converter crash in Amiga version of WW for now
svn-id: r24345
-rw-r--r--engines/agos/res.cpp4
-rw-r--r--engines/agos/res_ami.cpp8
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 7900d7823a..da1ab97810 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -731,10 +731,10 @@ bool AGOSEngine::loadVGAFile(uint id, uint type) {
(getFeatures() & GF_CRUNCHED && type != 3)) {
byte *srcBuffer = (byte *)malloc(srcSize);
if (in.read(srcBuffer, srcSize) != srcSize)
- error("loadVGAFile: Read failed");
+ error("loadVGAFile: Read failed");
dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4);
- if (type == 2 && dstSize != 64800) {
+ if (type == 2) {
dst = (byte *)malloc(dstSize);
decrunchFile(srcBuffer, dst, srcSize);
convertAmiga(dst, dstSize);
diff --git a/engines/agos/res_ami.cpp b/engines/agos/res_ami.cpp
index fc6e5cf350..5dd5b5064b 100644
--- a/engines/agos/res_ami.cpp
+++ b/engines/agos/res_ami.cpp
@@ -260,6 +260,14 @@ static void convertclip(uint32 offset, uint16 height, uint16 width) {
}
void AGOSEngine::convertAmiga(byte *srcBuf, int32 fileSize) {
+ // TODO Better detection of full screen images
+ if ((getGameType() == GType_WW && fileSize == 178624) ||
+ fileSize == 64800) {
+ byte *dstBuf = allocBlock (fileSize);
+ memcpy(dstBuf, srcBuf, fileSize);
+ return;
+ }
+
uint32 clipoffset, outlength;
uint16 clipwidth, clipheight;
byte *clipsend;