aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2007-04-01 14:35:33 +0000
committerNicola Mettifogo2007-04-01 14:35:33 +0000
commit91eaea3e583b4df9a75384e5b8627bfab7de9118 (patch)
tree293993f8760f686698403c8f6fe0cb7ee00095d8
parent0d78a7ca640c350c56ef7b36e75e1336f9b42d19 (diff)
downloadscummvm-rg350-91eaea3e583b4df9a75384e5b8627bfab7de9118.tar.gz
scummvm-rg350-91eaea3e583b4df9a75384e5b8627bfab7de9118.tar.bz2
scummvm-rg350-91eaea3e583b4df9a75384e5b8627bfab7de9118.zip
Added code for resource loading and fixed the bug having Amiga demo crashing. It is now limitedly playable, although graphics is still heavily messed up.
svn-id: r26349
-rw-r--r--engines/parallaction/disk.cpp26
-rw-r--r--engines/parallaction/graphics.cpp4
2 files changed, 25 insertions, 5 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index eaedcf5017..27d3cc137e 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -882,11 +882,29 @@ Cnv* AmigaDisk::loadFont(const char* name) {
StaticCnv* AmigaDisk::loadStatic(const char* name) {
debugC(1, kDebugDisk, "AmigaDisk::loadStatic '%s'", name);
- if (!_archive.openArchivedFile(name))
- error("can't open static '%s' from archive", name);
+ Common::SeekableReadStream *s;
+ bool dispose = false;
- DecrunchStream stream(_archive);
- return makeStaticCnv(stream);
+ char path[PATH_LEN];
+ sprintf(path, "%s.pp", name);
+ if (!_archive.openArchivedFile(path)) {
+ if (!_archive.openArchivedFile(name))
+ error("can't open static '%s' from archive", name);
+
+ s = &_archive;
+ } else {
+ DecrunchStream *stream = new DecrunchStream(_archive);
+ s = stream;
+
+ dispose = true;
+ }
+
+ StaticCnv *cnv = makeStaticCnv(*s);
+
+ if (dispose)
+ delete s;
+
+ return cnv;
}
Cnv* AmigaDisk::loadFrames(const char* name) {
diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp
index 2565be1b06..7016c6039f 100644
--- a/engines/parallaction/graphics.cpp
+++ b/engines/parallaction/graphics.cpp
@@ -147,7 +147,7 @@ void Gfx::setBlackPalette() {
// FIXME: the effect is different from the original
//
void Gfx::animatePalette() {
-// printf("Gfx::animatePalette()\n");
+// printf("Gfx::animatePalette()\n");
byte tmp[3];
@@ -903,6 +903,8 @@ Gfx::Gfx(Parallaction* vm) :
setBlackPalette();
+ memset(_palettefx, 0, sizeof(_palettefx));
+
initMouse( 0 );
_font = NULL;