diff options
-rw-r--r-- | engines/parallaction/parallaction.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parser.h | 1 | ||||
-rw-r--r-- | engines/parallaction/parser_br.cpp | 12 |
3 files changed, 10 insertions, 5 deletions
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index e4a5f55894..bb306c3299 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -293,7 +293,7 @@ void Parallaction::setBackground(const char* name, const char* mask, const char* _disk->loadScenery(*info, name, mask, path); _gfx->setBackground(kBackgroundLocation, info); - _pathBuffer = &_gfx->_backgroundInfo->path; + _pathBuffer = &info->path; return; } diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 488d437deb..79e6cf6640 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -128,6 +128,7 @@ protected: // BRA specific int numZones; + BackgroundInfo *info; char *bgName; char *maskName; char *pathName; diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index ff7a34f95f..3b446805d7 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -464,9 +464,9 @@ DECLARE_LOCATION_PARSER(mask) { debugC(7, kDebugParser, "LOCATION_PARSER(mask) "); ctxt.maskName = strdup(_tokens[1]); - _vm->_gfx->_backgroundInfo->layers[0] = atoi(_tokens[2]); - _vm->_gfx->_backgroundInfo->layers[1] = atoi(_tokens[3]); - _vm->_gfx->_backgroundInfo->layers[2] = atoi(_tokens[4]); + ctxt.info->layers[0] = atoi(_tokens[2]); + ctxt.info->layers[1] = atoi(_tokens[3]); + ctxt.info->layers[2] = atoi(_tokens[4]); } @@ -1175,10 +1175,14 @@ void LocationParser_br::parse(Script *script) { ctxt.maskName = 0; ctxt.pathName = 0; ctxt.characterName = 0; + ctxt.info = new BackgroundInfo; LocationParser_ns::parse(script); - _vm->setBackground(ctxt.bgName, ctxt.maskName, ctxt.pathName); + _vm->_disk->loadScenery(*ctxt.info, ctxt.bgName, ctxt.maskName, ctxt.pathName); + _vm->_gfx->setBackground(kBackgroundLocation, ctxt.info); + _vm->_pathBuffer = &ctxt.info->path; + if (ctxt.characterName) { _vm->changeCharacter(ctxt.characterName); |