aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/parser_ns.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2008-05-05 11:02:40 +0000
committerNicola Mettifogo2008-05-05 11:02:40 +0000
commit1ddd54b50da3f67f39c7adfa63f6858b85c610e9 (patch)
tree59671f508ca64e3f54a6f5126b61c609c56e67d6 /engines/parallaction/parser_ns.cpp
parentb6c7385eb4fea90dd315124fe5bffe874430eb48 (diff)
downloadscummvm-rg350-1ddd54b50da3f67f39c7adfa63f6858b85c610e9.tar.gz
scummvm-rg350-1ddd54b50da3f67f39c7adfa63f6858b85c610e9.tar.bz2
scummvm-rg350-1ddd54b50da3f67f39c7adfa63f6858b85c610e9.zip
- Moved some members from the engine class to Location, since they belong there.
- Cleaned up usage of location flags by using accessor functions. svn-id: r31872
Diffstat (limited to 'engines/parallaction/parser_ns.cpp')
-rw-r--r--engines/parallaction/parser_ns.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp
index f955f44c8c..b8b36a0885 100644
--- a/engines/parallaction/parser_ns.cpp
+++ b/engines/parallaction/parser_ns.cpp
@@ -239,7 +239,7 @@ void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) {
delete script;
- _programs.push_back(program);
+ _location._programs.push_back(program);
debugC(1, kDebugParser, "loadProgram() done");
@@ -882,14 +882,14 @@ DECLARE_LOCATION_PARSER(nodes) {
DECLARE_LOCATION_PARSER(zone) {
debugC(7, kDebugParser, "LOCATION_PARSER(zone) ");
- parseZone(*_locParseCtxt.script, _zones, _tokens[1]);
+ parseZone(*_locParseCtxt.script, _location._zones, _tokens[1]);
}
DECLARE_LOCATION_PARSER(animation) {
debugC(7, kDebugParser, "LOCATION_PARSER(animation) ");
- parseAnimation(*_locParseCtxt.script, _animations, _tokens[1]);
+ parseAnimation(*_locParseCtxt.script, _location._animations, _tokens[1]);
}
@@ -921,14 +921,14 @@ DECLARE_LOCATION_PARSER(acommands) {
DECLARE_LOCATION_PARSER(flags) {
debugC(7, kDebugParser, "LOCATION_PARSER(flags) ");
- if ((_localFlags[_currentLocationIndex] & kFlagsVisited) == 0) {
+ if ((getLocationFlags() & kFlagsVisited) == 0) {
// only for 1st visit
- _localFlags[_currentLocationIndex] = 0;
+ clearLocationFlags(kFlagsAll);
int _si = 1;
do {
byte _al = _localFlagNames->lookup(_tokens[_si]);
- _localFlags[_currentLocationIndex] |= 1 << (_al - 1);
+ setLocationFlags(1 << (_al - 1));
_si++;
if (scumm_stricmp(_tokens[_si], "|")) break;
@@ -956,8 +956,8 @@ DECLARE_LOCATION_PARSER(sound) {
debugC(7, kDebugParser, "LOCATION_PARSER(sound) ");
if (getPlatform() == Common::kPlatformAmiga) {
- strcpy(_locationSound, _tokens[1]);
- _hasLocationSound = true;
+ strcpy(_location._soundFile, _tokens[1]);
+ _location._hasSound = true;
}
}
@@ -983,7 +983,7 @@ void Parallaction_ns::parseLocation(const char *filename) {
// TODO: the following two lines are specific to Nippon Safes
// and should be moved into something like 'initializeParsing()'
- _hasLocationSound = false;
+ _location._hasSound = false;
_locParseCtxt.end = false;
_locParseCtxt.script = script;
@@ -1001,8 +1001,8 @@ void Parallaction_ns::parseLocation(const char *filename) {
resolveCommandForwards();
// this loads animation scripts
- AnimationList::iterator it = _animations.begin();
- for ( ; it != _animations.end(); it++) {
+ AnimationList::iterator it = _location._animations.begin();
+ for ( ; it != _location._animations.end(); it++) {
if ((*it)->_scriptName) {
loadProgram(*it, (*it)->_scriptName);
}