mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
Merge pull request #282 from bluegr/nipponfix
PARALLACTION: Fix the ending of Nippon Safes (bug #5866)
This commit is contained in:
commit
78464a42d7
@ -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);
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user