diff options
-rw-r--r-- | engines/parallaction/commands.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 56 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/walk.cpp | 44 | ||||
-rw-r--r-- | engines/parallaction/zone.cpp | 2 |
6 files changed, 54 insertions, 54 deletions
diff --git a/engines/parallaction/commands.cpp b/engines/parallaction/commands.cpp index 4df9aa4559..f7d027ea07 100644 --- a/engines/parallaction/commands.cpp +++ b/engines/parallaction/commands.cpp @@ -314,7 +314,7 @@ void Parallaction::runCommands(CommandList& list, Zone *z) { continue; } - WalkNodeList *vC = _vm->_char._builder.buildPath(u->_move._x, u->_move._y); + WalkNodeList *vC = _char._builder.buildPath(u->_move._x, u->_move._y); addJob(&jobWalk, vC, kPriority19 ); _engineFlags |= kEngineWalking; diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index d5000773de..101d5955bf 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -491,7 +491,7 @@ void Parallaction::runDialogue(SpeakData *data) { _gfx->setFont(kFontDialogue); - if (_vm->getPlatform() == Common::kPlatformPC) + if (getPlatform() == Common::kPlatformPC) showCursor(false); DialogueManager man(this, data); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index e92d9f36d4..c4f3fb0e4c 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -102,7 +102,7 @@ Parallaction::Parallaction(OSystem *syst) : Engine(syst) { // FIXME - _vm = this; +// _vm = this; _mouseHidden = false; @@ -178,7 +178,7 @@ int Parallaction::init() { initWalk(); // needs to be pushed into subclass initInventory(); // needs to be pushed into subclass - _animations.push_front(&_vm->_char._ani); + _animations.push_front(&_char._ani); _gfx = new Gfx(this); _debugger = new Debugger(this); @@ -219,9 +219,9 @@ void Parallaction::initGame() { parseLocation(_location._name); if (_location._startPosition.x != -1000) { - _vm->_char._ani._left = _location._startPosition.x; - _vm->_char._ani._top = _location._startPosition.y; - _vm->_char._ani._frame = _location._startFrame; + _char._ani._left = _location._startPosition.x; + _char._ani._top = _location._startPosition.y; + _char._ani._frame = _location._startFrame; _location._startPosition.y = -1000; _location._startPosition.x = -1000; } @@ -466,9 +466,9 @@ void Parallaction::processInput(InputData *data) { debugC(2, kDebugInput, "processInput: kEvWalk"); _hoverZone = NULL; changeCursor(kCursorArrow); - if (_vm->_char._ani._flags & kFlagsRemove) break; - if ((_vm->_char._ani._flags & kFlagsActive) == 0) break; - WalkNodeList *v4 = _vm->_char._builder.buildPath(data->_mousePos.x, data->_mousePos.y); + if (_char._ani._flags & kFlagsRemove) break; + if ((_char._ani._flags & kFlagsActive) == 0) break; + WalkNodeList *v4 = _char._builder.buildPath(data->_mousePos.x, data->_mousePos.y); addJob(&jobWalk, v4, kPriority19); _engineFlags |= kEngineWalking; // inhibits processing of input until walking is over } @@ -684,27 +684,27 @@ void Parallaction::changeCursor(int32 index) { void Parallaction::freeCharacter() { debugC(3, kDebugLocation, "freeCharacter()"); - if (!IS_DUMMY_CHARACTER(_vm->_characterName)) { + if (!IS_DUMMY_CHARACTER(_characterName)) { if (_objectsNames) delete _objectsNames; _objectsNames = NULL; - if (_vm->_char._ani._cnv) - delete _vm->_char._ani._cnv; - _vm->_char._ani._cnv = NULL; + if (_char._ani._cnv) + delete _char._ani._cnv; + _char._ani._cnv = NULL; - if (_vm->_char._talk) - delete _vm->_char._talk; - _vm->_char._talk = NULL; + if (_char._talk) + delete _char._talk; + _char._talk = NULL; - _vm->_gfx->freeStaticCnv(_vm->_char._head); - if (_vm->_char._head) - delete _vm->_char._head; - _vm->_char._head = NULL; + _gfx->freeStaticCnv(_char._head); + if (_char._head) + delete _char._head; + _char._head = NULL; - if (_vm->_char._objs) - delete _vm->_char._objs; - _vm->_char._objs = NULL; + if (_char._objs) + delete _char._objs; + _char._objs = NULL; } return; @@ -731,16 +731,16 @@ void Parallaction::changeCharacter(const char *name) { // character for sanity before memory is freed freeCharacter(); - Common::String oldArchive = _disk->selectArchive((_vm->getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0"); - _vm->_char._ani._cnv = _disk->loadFrames(fullName); + Common::String oldArchive = _disk->selectArchive((getFeatures() & GF_LANG_MULT) ? "disk1" : "disk0"); + _char._ani._cnv = _disk->loadFrames(fullName); if (!IS_DUMMY_CHARACTER(name)) { - if (_vm->getPlatform() == Common::kPlatformAmiga && (_vm->getFeatures() & GF_LANG_MULT)) + if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_LANG_MULT)) _disk->selectArchive("disk0"); - _vm->_char._head = _disk->loadHead(baseName); - _vm->_char._talk = _disk->loadTalk(baseName); - _vm->_char._objs = _disk->loadObjects(baseName); + _char._head = _disk->loadHead(baseName); + _char._talk = _disk->loadTalk(baseName); + _char._objs = _disk->loadObjects(baseName); _objectsNames = _disk->loadTable(baseName); _soundMan->playCharacterMusic(name); diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index e75043fb68..947cb22a7f 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -49,7 +49,7 @@ int Parallaction_ns::init() { strcpy(_location._name, "fognedemo"); } _disk = new AmigaDisk_ns(this); - _disk->selectArchive((_vm->getFeatures() & GF_DEMO) ? "disk0" : "disk1"); + _disk->selectArchive((getFeatures() & GF_DEMO) ? "disk0" : "disk1"); } if (getPlatform() == Common::kPlatformPC) { diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp index fd2fa8d186..d57e9d2532 100644 --- a/engines/parallaction/walk.cpp +++ b/engines/parallaction/walk.cpp @@ -272,19 +272,19 @@ uint16 PathBuilder::walkFunc1(int16 x, int16 y, WalkNode *Node) { void Parallaction::clipMove(Common::Point& pos, const WalkNode* from) { - if ((pos.x < from->_x) && (pos.x < _screenWidth) && (queryPath(_vm->_char._ani.width()/2 + pos.x + 2, _vm->_char._ani.height() + pos.y) != 0)) { + if ((pos.x < from->_x) && (pos.x < _screenWidth) && (queryPath(_char._ani.width()/2 + pos.x + 2, _char._ani.height() + pos.y) != 0)) { pos.x = (pos.x + 2 < from->_x) ? pos.x + 2 : from->_x; } - if ((pos.x > from->_x) && (pos.x > -20) && (queryPath(_vm->_char._ani.width()/2 + pos.x - 2, _vm->_char._ani.height() + pos.y) != 0)) { + if ((pos.x > from->_x) && (pos.x > -20) && (queryPath(_char._ani.width()/2 + pos.x - 2, _char._ani.height() + pos.y) != 0)) { pos.x = (pos.x - 2 > from->_x) ? pos.x - 2 : from->_x; } - if ((pos.y < from->_y) && (pos.y < (_screenHeight - _vm->_char._ani.height())) && (queryPath(_vm->_char._ani.width()/2 + pos.x, _vm->_char._ani.height() + pos.y + 2) != 0)) { + if ((pos.y < from->_y) && (pos.y < (_screenHeight - _char._ani.height())) && (queryPath(_char._ani.width()/2 + pos.x, _char._ani.height() + pos.y + 2) != 0)) { pos.y = (pos.y + 2 <= from->_y) ? pos.y + 2 : from->_y; } - if ((pos.y > from->_y) && (pos.y > -20) && (queryPath(_vm->_char._ani.width()/2 + pos.x, _vm->_char._ani.height() + pos.y- 2) != 0)) { + if ((pos.y > from->_y) && (pos.y > -20) && (queryPath(_char._ani.width()/2 + pos.x, _char._ani.height() + pos.y- 2) != 0)) { pos.y = (pos.y - 2 >= from->_y) ? pos.y - 2 :from->_y; } @@ -304,7 +304,7 @@ int16 Parallaction::selectWalkFrame(const Common::Point& pos, const WalkNode* fr // walk frame selection int16 v16; - if (_vm->_char._ani.getFrameNum() == 20) { + if (_char._ani.getFrameNum() == 20) { if (dist.x > dist.y) { walkData2 = (from->_x > pos.x) ? 0 : 7; @@ -336,49 +336,49 @@ int16 Parallaction::selectWalkFrame(const Common::Point& pos, const WalkNode* fr uint16 Parallaction::checkDoor() { // printf("checkDoor()..."); - if (_vm->_currentLocationIndex != _doorData1) { - _doorData1 = _vm->_currentLocationIndex; + if (_currentLocationIndex != _doorData1) { + _doorData1 = _currentLocationIndex; _zoneTrap = NULL; } _engineFlags &= ~kEngineWalking; - Zone *z = _vm->hitZone(kZoneDoor, _vm->_char._ani._left + _vm->_char._ani.width() / 2, _vm->_char._ani._top + _vm->_char._ani.height()); + Zone *z = hitZone(kZoneDoor, _char._ani._left + _char._ani.width() / 2, _char._ani._top + _char._ani.height()); if (z != NULL) { if ((z->_flags & kFlagsClosed) == 0) { - _vm->_location._startPosition.x = z->u.door->_startPos.x; - _vm->_location._startPosition.y = z->u.door->_startPos.y; - _vm->_location._startFrame = z->u.door->_startFrame; - strcpy( _vm->_location._name, z->u.door->_location ); + _location._startPosition.x = z->u.door->_startPos.x; + _location._startPosition.y = z->u.door->_startPos.y; + _location._startFrame = z->u.door->_startFrame; + strcpy(_location._name, z->u.door->_location); _engineFlags |= kEngineChangeLocation; _zoneTrap = NULL; } else { - _vm->runCommands(z->_commands, z); + runCommands(z->_commands, z); } } - z = _vm->hitZone(kZoneTrap, _vm->_char._ani._left + _vm->_char._ani.width() / 2, _vm->_char._ani._top + _vm->_char._ani.height()); + z = hitZone(kZoneTrap, _char._ani._left + _char._ani.width() / 2, _char._ani._top + _char._ani.height()); if (z != NULL) { - _localFlags[_vm->_currentLocationIndex] |= kFlagsEnter; - _vm->runCommands(z->_commands, z); - _localFlags[_vm->_currentLocationIndex] &= ~kFlagsEnter; + _localFlags[_currentLocationIndex] |= kFlagsEnter; + runCommands(z->_commands, z); + _localFlags[_currentLocationIndex] &= ~kFlagsEnter; _zoneTrap = z; } else if (_zoneTrap != NULL) { - _localFlags[_vm->_currentLocationIndex] |= kFlagsExit; - _vm->runCommands(_zoneTrap->_commands, _zoneTrap); - _localFlags[_vm->_currentLocationIndex] &= ~kFlagsExit; + _localFlags[_currentLocationIndex] |= kFlagsExit; + runCommands(_zoneTrap->_commands, _zoneTrap); + _localFlags[_currentLocationIndex] &= ~kFlagsExit; _zoneTrap = NULL; } // printf("done\n"); - _vm->_char._ani._frame = walkData2; - return _vm->_char._ani._frame; + _char._ani._frame = walkData2; + return _char._ani._frame; } diff --git a/engines/parallaction/zone.cpp b/engines/parallaction/zone.cpp index 3fcbd0d08c..73095e6f65 100644 --- a/engines/parallaction/zone.cpp +++ b/engines/parallaction/zone.cpp @@ -349,7 +349,7 @@ void Parallaction::displayItemComment(ExamineData *data) { Common::Rect r(v6C, v6A); r.moveTo(0, 90); _gfx->drawBalloon(r, 0); - _gfx->flatBlitCnv(_vm->_char._head, 100, 152, Gfx::kBitFront); + _gfx->flatBlitCnv(_char._head, 100, 152, Gfx::kBitFront); _gfx->displayWrappedString(data->_description, 0, 90, 0, 130); jobEraseAnimations((void*)1, NULL); |