diff options
-rw-r--r-- | engines/parallaction/dialogue.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/exec.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/exec.h | 2 | ||||
-rw-r--r-- | engines/parallaction/input.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/objects.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/objects.h | 3 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 6 | ||||
-rw-r--r-- | engines/parallaction/parallaction_br.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/parallaction_ns.cpp | 4 | ||||
-rw-r--r-- | engines/parallaction/parser_br.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/parser_ns.cpp | 2 | ||||
-rw-r--r-- | engines/parallaction/walk.cpp | 4 |
12 files changed, 17 insertions, 24 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 1333de6a91..e41f7f3272 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -194,7 +194,7 @@ DialogueManager::~DialogueManager() { if (isNpc) { delete _questioner; } - _z = nullZonePtr; + _z.reset(); } diff --git a/engines/parallaction/exec.cpp b/engines/parallaction/exec.cpp index 0b09c55a8f..7a4208e3c3 100644 --- a/engines/parallaction/exec.cpp +++ b/engines/parallaction/exec.cpp @@ -164,7 +164,7 @@ void CommandExec::cleanSuspendedList() { _suspendedCtxt._valid = false; _suspendedCtxt._first = _suspendedCtxt._last; - _suspendedCtxt._zone = nullZonePtr; + _suspendedCtxt._zone.reset(); } void CommandExec::suspend() { diff --git a/engines/parallaction/exec.h b/engines/parallaction/exec.h index 7f884a07d7..0bc40de11b 100644 --- a/engines/parallaction/exec.h +++ b/engines/parallaction/exec.h @@ -109,7 +109,7 @@ protected: public: CommandExec(Parallaction *vm); - void run(CommandList &list, ZonePtr z = nullZonePtr); + void run(CommandList &list, ZonePtr z = ZonePtr()); void runSuspended(); void suspend(); }; diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index 06252f9e35..512569590a 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -69,7 +69,7 @@ Input::Input(Parallaction *vm) : _vm(vm) { _activeItem._index = 0; _activeItem._id = 0; _mouseButtons = 0; - _delayedActionZone = nullZonePtr; + _delayedActionZone.reset(); initCursors(); } @@ -256,7 +256,7 @@ void Input::trackMouse(ZonePtr z) { } void Input::stopHovering() { - _hoverZone = nullZonePtr; + _hoverZone.reset(); _vm->_gfx->hideFloatingLabel(); } @@ -283,7 +283,7 @@ bool Input::translateGameInput() { // if walking is over, then take programmed action takeAction(_delayedActionZone); _hasDelayedAction = false; - _delayedActionZone = nullZonePtr; + _delayedActionZone.reset(); return true; } diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 4dc3922207..daffe4393d 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -30,10 +30,6 @@ namespace Parallaction { -ZonePtr nullZonePtr; -AnimationPtr nullAnimationPtr; -InstructionPtr nullInstructionPtr; - Command::Command() { _id = 0; _flagsOn = 0; diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index 9effbf66fd..7d09663a47 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -44,15 +44,12 @@ struct Program; typedef Common::SharedPtr<Zone> ZonePtr; typedef Common::List<ZonePtr> ZoneList; -extern ZonePtr nullZonePtr; typedef Common::SharedPtr<Animation> AnimationPtr; typedef Common::List<AnimationPtr> AnimationList; -extern AnimationPtr nullAnimationPtr; typedef Common::SharedPtr<Instruction> InstructionPtr; typedef Common::List<InstructionPtr> InstructionList; -extern InstructionPtr nullInstructionPtr; typedef Common::List<Common::Point> PointList; diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index fa0ceb8576..c3b5799e08 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -210,7 +210,7 @@ AnimationPtr Location::findAnimation(const char *name) { for (AnimationList::iterator it = _animations.begin(); it != _animations.end(); ++it) if (!scumm_stricmp((*it)->_name, name)) return *it; - return nullAnimationPtr; + return AnimationPtr(); } void Location::freeAnimations() { @@ -589,7 +589,7 @@ void Parallaction::exitCommentMode() { _gfx->setHalfbriteMode(false); _cmdExec->run(_commentZone->_commands, _commentZone); - _commentZone = nullZonePtr; + _commentZone.reset(); } void Parallaction::runCommentFrame() { @@ -792,7 +792,7 @@ ZonePtr Parallaction::hitZone(uint32 type, uint16 x, uint16 y) { } } - return nullZonePtr; + return ZonePtr(); } diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index a792b073a2..1e695844ff 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -164,7 +164,7 @@ void Parallaction_br::runPendingZones() { if (_activeZone) { z = _activeZone; // speak Zone or sound - _activeZone = nullZonePtr; + _activeZone.reset(); if (ACTIONTYPE(z) == kZoneSpeak) { enterDialogueMode(z); } else { @@ -174,7 +174,7 @@ void Parallaction_br::runPendingZones() { if (_activeZone2) { z = _activeZone2; // speak Zone or sound - _activeZone2 = nullZonePtr; + _activeZone2.reset(); if (ACTIONTYPE(z) == kZoneSpeak) { enterDialogueMode(z); } else { diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 27b1ef8b50..a94d4a90b6 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -280,7 +280,7 @@ void Parallaction_ns::switchBackground(const char* background, const char* mask) void Parallaction_ns::runPendingZones() { if (_activeZone) { ZonePtr z = _activeZone; // speak Zone or sound - _activeZone = nullZonePtr; + _activeZone.reset(); runZone(z); } } @@ -299,7 +299,7 @@ void Parallaction_ns::changeLocation(char *location) { _input->stopHovering(); _gfx->freeLabels(); - _zoneTrap = nullZonePtr; + _zoneTrap.reset(); _input->setArrowCursor(); diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 71a50ad5fa..97db740ae7 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -1041,7 +1041,7 @@ DECLARE_INSTRUCTION_PARSER(endif) { error("unexpected 'endif'"); // ctxt.openIf->_endif = ctxt.inst; - ctxt.openIf = nullInstructionPtr; + ctxt.openIf = InstructionPtr(); ctxt.inst->_index = _parser->_lookup; } diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index fee7180c32..4eef8d1370 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -332,7 +332,7 @@ void ProgramParser_ns::parse(Script *script, ProgramPtr program) { _script = script; _program = program; - ctxt.openIf = nullInstructionPtr; + ctxt.openIf = InstructionPtr(); ctxt.end = false; ctxt.locals = program->_locals; diff --git a/engines/parallaction/walk.cpp b/engines/parallaction/walk.cpp index 2ccbedff44..2a412fb8a2 100644 --- a/engines/parallaction/walk.cpp +++ b/engines/parallaction/walk.cpp @@ -290,7 +290,7 @@ void PathWalker_NS::checkDoor(const Common::Point &foot) { _vm->_location._startPosition = z->u.door->_startPos; _vm->_location._startFrame = z->u.door->_startFrame; _vm->scheduleLocationSwitch(z->u.door->_location); - _vm->_zoneTrap = nullZonePtr; + _vm->_zoneTrap.reset(); } else { _vm->_cmdExec->run(z->_commands, z); } @@ -307,7 +307,7 @@ void PathWalker_NS::checkDoor(const Common::Point &foot) { _vm->setLocationFlags(kFlagsExit); _vm->_cmdExec->run(_vm->_zoneTrap->_commands, _vm->_zoneTrap); _vm->clearLocationFlags(kFlagsExit); - _vm->_zoneTrap = nullZonePtr; + _vm->_zoneTrap.reset(); } } |