aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2012-10-08 14:38:36 -0700
committerFilippos Karapetis2012-10-08 14:38:36 -0700
commit78464a42d78091ac1b54c6ae18c3a67d90fb59bf (patch)
treed81b19dc8f95d62116e19bd8263ce2293f91e7df /engines
parentc2971374cdb189dbf9f72953a970d0769648e5ae (diff)
parenta297ae6195977530182c7e48b515f07e919348f0 (diff)
downloadscummvm-rg350-78464a42d78091ac1b54c6ae18c3a67d90fb59bf.tar.gz
scummvm-rg350-78464a42d78091ac1b54c6ae18c3a67d90fb59bf.tar.bz2
scummvm-rg350-78464a42d78091ac1b54c6ae18c3a67d90fb59bf.zip
Merge pull request #282 from bluegr/nipponfix
PARALLACTION: Fix the ending of Nippon Safes (bug #5866)
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/disk_ns.cpp9
-rw-r--r--engines/parallaction/gfxbase.cpp5
-rw-r--r--engines/parallaction/parallaction_ns.cpp6
3 files changed, 19 insertions, 1 deletions
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index 718265664f..bad854525d 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -262,8 +262,15 @@ Common::SeekableReadStream *DosDisk_ns::tryOpenFile(const char* name) {
Script* Disk_ns::loadLocation(const char *name) {
char path[PATH_LEN];
+ const char *charName = _vm->_char.getBaseName();
- sprintf(path, "%s%s/%s.loc", _vm->_char.getBaseName(), _language.c_str(), name);
+ // WORKAROUND: Special case for the Multilingual DOS version: during the ending
+ // sequence, it tries to load a non-existing file using "Dinor" as a character
+ // name. In this case, the character name should be just "dino".
+ if (!strcmp(charName, "Dinor"))
+ charName = "dino";
+
+ sprintf(path, "%s%s/%s.loc", charName, _language.c_str(), name);
debugC(3, kDebugDisk, "Disk_ns::loadLocation(%s): trying '%s'", name, path);
Common::SeekableReadStream *stream = tryOpenFile(path);
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp
index 8ef3c0fabf..a9889cc7af 100644
--- a/engines/parallaction/gfxbase.cpp
+++ b/engines/parallaction/gfxbase.cpp
@@ -226,6 +226,11 @@ void Gfx::drawGfxObject(GfxObj *obj, Graphics::Surface &surf) {
rect.translate(x, y);
data = obj->getData(obj->frame);
+ // WORKAROUND: During the end credits, game scripts try to show a
+ // non-existing frame. We change it to an existing one here.
+ if (obj->frame == 14 && obj->getNum() == 9 && !strcmp(obj->getName(), "Dinor"))
+ obj->frame = 8;
+
if (obj->getSize(obj->frame) == obj->getRawSize(obj->frame)) {
blt(rect, data, &surf, obj->layer, obj->scale, obj->transparentKey);
} else {
diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp
index 2a22e77410..d33be0aa47 100644
--- a/engines/parallaction/parallaction_ns.cpp
+++ b/engines/parallaction/parallaction_ns.cpp
@@ -310,6 +310,7 @@ void Parallaction_ns::changeBackground(const char* background, const char* mask,
_system->delayMillis(20);
_gfx->setPalette(pal);
_gfx->updateScreen();
+ return;
}
if (path == 0) {
@@ -412,6 +413,11 @@ void Parallaction_ns::changeLocation() {
if (!_intro) {
_input->setMouseState(oldMouseState);
+ // WORKAROUND: Fix a script bug in the Multilingual DOS version of
+ // Nippon Safes: the mouse cursor is incorrectly hidden outside the
+ // cave at the end of the game. Fix it here.
+ if (!strcmp(_location._name, "ingressocav"))
+ _input->setMouseState(MOUSE_ENABLED_SHOW);
}
debugC(1, kDebugExec, "changeLocation() done");