diff options
author | whiterandrek | 2018-06-20 14:29:02 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2018-06-28 23:51:32 +0200 |
commit | 28a1ff755525bf939e6b6e8a4129ca993673e291 (patch) | |
tree | bef9ec1603b6861d38d45ab5046cffbdcd9c2ff3 /engines | |
parent | 25a9e093c246a6a9ef4ca0706ccf0e7e6b740394 (diff) | |
download | scummvm-rg350-28a1ff755525bf939e6b6e8a4129ca993673e291.tar.gz scummvm-rg350-28a1ff755525bf939e6b6e8a4129ca993673e291.tar.bz2 scummvm-rg350-28a1ff755525bf939e6b6e8a4129ca993673e291.zip |
PINK: fix shadowing declarations
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/objects/sequences/sequence_context.cpp | 14 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequence_context.h | 10 | ||||
-rw-r--r-- | engines/pink/objects/sequences/sequence_item.cpp | 4 |
3 files changed, 14 insertions, 14 deletions
diff --git a/engines/pink/objects/sequences/sequence_context.cpp b/engines/pink/objects/sequences/sequence_context.cpp index 4944bd544d..2e48554325 100644 --- a/engines/pink/objects/sequences/sequence_context.cpp +++ b/engines/pink/objects/sequences/sequence_context.cpp @@ -32,9 +32,9 @@ namespace Pink { void SequenceActorState::execute(uint segment, Sequence *sequence, bool loadingSave) const { - Actor *actor = sequence->getSequencer()->getPage()->findActor(this->actor); - if (actor && this->segment != segment && !defaultAction.empty()) { - Action *action = actor->findAction(defaultAction); + Actor *actor = sequence->getSequencer()->getPage()->findActor(this->actorName); + if (actor && _segment != segment && !defaultActionName.empty()) { + Action *action = actor->findAction(defaultActionName); if (action && actor->getAction() != action) { actor->setAction(action, loadingSave); } @@ -52,7 +52,7 @@ SequenceContext::SequenceContext(Sequence *sequence) for (uint i = 0; i < items.size(); ++i) { bool found = 0; for (uint j = 0; j < _states.size(); ++j) { - if (items[i]->getActor() == _states[j].actor) { + if (items[i]->getActor() == _states[j].actorName) { found = 1; break; } @@ -76,13 +76,13 @@ void SequenceContext::execute(uint nextItemIndex, bool loadingSave) { void SequenceContext::clearDefaultActions() { for (uint i = 0; i < _states.size(); ++i) { - _states[i].defaultAction.clear(); + _states[i].defaultActionName.clear(); } } SequenceActorState *SequenceContext::findState(const Common::String &actor) { for (uint i = 0; i < _states.size(); ++i) { - if (_states[i].actor == actor) + if (_states[i].actorName == actor) return &_states[i]; } return nullptr; @@ -90,7 +90,7 @@ SequenceActorState *SequenceContext::findState(const Common::String &actor) { bool SequenceContext::isConflictsWith(SequenceContext *context) { for (uint i = 0; i < _states.size(); ++i) { - if (context->findState(_states[i].actor)) + if (context->findState(_states[i].actorName)) return true; } return false; diff --git a/engines/pink/objects/sequences/sequence_context.h b/engines/pink/objects/sequences/sequence_context.h index 931c9462dd..ccca20e686 100644 --- a/engines/pink/objects/sequences/sequence_context.h +++ b/engines/pink/objects/sequences/sequence_context.h @@ -31,14 +31,14 @@ class Sequence; class Sequencer; struct SequenceActorState { - SequenceActorState(const Common::String actorName) - : actor(actorName), segment(0) {} + SequenceActorState(const Common::String actor) + : actorName(actor), _segment(0) {} void execute(uint segment, Sequence *sequence, bool loadingSave) const; - Common::String actor; - Common::String defaultAction; - uint segment; + Common::String actorName; + Common::String defaultActionName; + uint _segment; }; class Actor; diff --git a/engines/pink/objects/sequences/sequence_item.cpp b/engines/pink/objects/sequences/sequence_item.cpp index ee4094765b..15a39f183c 100644 --- a/engines/pink/objects/sequences/sequence_item.cpp +++ b/engines/pink/objects/sequences/sequence_item.cpp @@ -53,7 +53,7 @@ bool SequenceItem::execute(uint segment, Sequence *sequence, bool loadingSave) { SequenceContext *context = sequence->getContext(); SequenceActorState *state = context->findState(_actor); if (state) - state->segment = segment; + state->_segment = segment; if (isLeader()) context->setActor(actor); return true; @@ -84,7 +84,7 @@ void SequenceItemLeaderAudio::toConsole() { bool SequenceItemDefaultAction::execute(uint segment, Sequence *sequence, bool loadingSave) { SequenceActorState *state = sequence->getContext()->findState(_actor); if (state) - state->defaultAction = _action; + state->defaultActionName = _action; return true; } |