* Removed references to the current _backgroundInfo from parser code.

* Re-enabled masks (in BRA DOS).

svn-id: r33474
This commit is contained in:
Nicola Mettifogo 2008-07-31 15:15:42 +00:00
parent 0679889d98
commit f5b7004fae
3 changed files with 10 additions and 5 deletions

View File

@ -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;
}

View File

@ -128,6 +128,7 @@ protected:
// BRA specific
int numZones;
BackgroundInfo *info;
char *bgName;
char *maskName;
char *pathName;

View File

@ -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);