[Scummvm-git-logs] scummvm master -> df0e8a94909238cfdf378a9e9e43f7cd8fba7578
whiterandrek
whiterandrek at gmail.com
Thu Jun 4 17:53:49 UTC 2020
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0f63c49cf6 PINK: marked point arguments as non-const
bb4fb9b751 PINK: JANITORIAL: fixed names
df0e8a9490 PINK: JANITORIAL: formatting fixes
Commit: 0f63c49cf669ebb654eff71257474f4c402ff1f7
https://github.com/scummvm/scummvm/commit/0f63c49cf669ebb654eff71257474f4c402ff1f7
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-06-04T20:51:11+03:00
Commit Message:
PINK: marked point arguments as non-const
Changed paths:
engines/pink/cursor_mgr.cpp
engines/pink/cursor_mgr.h
engines/pink/director.cpp
engines/pink/director.h
engines/pink/objects/actions/action_cel.cpp
engines/pink/objects/actions/action_cel.h
engines/pink/objects/actors/actor.cpp
engines/pink/objects/actors/actor.h
engines/pink/objects/actors/audio_info_pda_button.cpp
engines/pink/objects/actors/audio_info_pda_button.h
engines/pink/objects/actors/cursor_actor.h
engines/pink/objects/actors/lead_actor.cpp
engines/pink/objects/actors/lead_actor.h
engines/pink/objects/actors/pda_button_actor.cpp
engines/pink/objects/actors/pda_button_actor.h
engines/pink/objects/actors/supporting_actor.cpp
engines/pink/objects/actors/supporting_actor.h
engines/pink/objects/inventory.cpp
engines/pink/objects/inventory.h
diff --git a/engines/pink/cursor_mgr.cpp b/engines/pink/cursor_mgr.cpp
index 368d645cfc..7e48e534b4 100644
--- a/engines/pink/cursor_mgr.cpp
+++ b/engines/pink/cursor_mgr.cpp
@@ -32,7 +32,7 @@ CursorMgr::CursorMgr(PinkEngine *game, Page *page)
_time(0), _isPlayingAnimation(false),
_isSecondFrame(false), _firstFrameIndex(0) {}
-void CursorMgr::setCursor(uint index, const Common::Point point, const Common::String &itemName) {
+void CursorMgr::setCursor(uint index, Common::Point point, const Common::String &itemName) {
switch (index) {
case kClickableFirstFrameCursor:
case kPDAClickableFirstFrameCursor:
@@ -64,7 +64,7 @@ void CursorMgr::update() {
}
}
-void CursorMgr::setCursor(const Common::String &cursorName, const Common::Point point) {
+void CursorMgr::setCursor(const Common::String &cursorName, Common::Point point) {
uint index;
if (cursorName == kCursorNameExitLeft)
index = kExitLeftCursor;
@@ -98,7 +98,7 @@ void CursorMgr::startAnimation(uint index) {
_isSecondFrame = false;
}
-void CursorMgr::showItem(const Common::String &itemName, const Common::Point point) {
+void CursorMgr::showItem(const Common::String &itemName, Common::Point point) {
if (!_actor)
_actor = static_cast<CursorActor *>(_page->findActor(kCursor));
_actor->setCursorItem(itemName, point);
diff --git a/engines/pink/cursor_mgr.h b/engines/pink/cursor_mgr.h
index 5e336a3e18..99a0fd508b 100644
--- a/engines/pink/cursor_mgr.h
+++ b/engines/pink/cursor_mgr.h
@@ -38,15 +38,15 @@ public:
CursorMgr(PinkEngine *game, Page *page);
void update();
- void setCursor(uint index, const Common::Point point, const Common::String &itemName);
- void setCursor(const Common::String &cursorName, const Common::Point point);
+ void setCursor(uint index, Common::Point point, const Common::String &itemName);
+ void setCursor(const Common::String &cursorName, Common::Point point);
void setPage(Page *page) { _page = page; }
private:
void startAnimation(uint index);
- void showItem(const Common::String &itemName, const Common::Point point);
+ void showItem(const Common::String &itemName, Common::Point point);
void hideItem();
private:
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp
index 64c52d76a8..a018cd2a56 100644
--- a/engines/pink/director.cpp
+++ b/engines/pink/director.cpp
@@ -202,7 +202,7 @@ void Director::loadStage() {
_savedSprites.clear();
}
-Actor *Director::getActorByPoint(const Common::Point point) {
+Actor *Director::getActorByPoint(Common::Point point) {
for (int i = _sprites.size() - 1; i >= 0; --i) {
if (_sprites[i]->getActor()->isCursor())
continue;
diff --git a/engines/pink/director.h b/engines/pink/director.h
index a3255fc859..c8e6bae9f0 100644
--- a/engines/pink/director.h
+++ b/engines/pink/director.h
@@ -70,7 +70,7 @@ public:
void saveStage();
void loadStage();
- Actor *getActorByPoint(const Common::Point point);
+ Actor *getActorByPoint(Common::Point point);
Graphics::MacWindowManager &getWndManager() { return *_wm; };
diff --git a/engines/pink/objects/actions/action_cel.cpp b/engines/pink/objects/actions/action_cel.cpp
index 8737c38602..1e9dac3d12 100644
--- a/engines/pink/objects/actions/action_cel.cpp
+++ b/engines/pink/objects/actions/action_cel.cpp
@@ -103,7 +103,7 @@ void ActionCEL::decodeNext() {
_actor->getPage()->getGame()->getDirector()->addDirtyRects(this);
}
-void ActionCEL::setCenter(const Common::Point ¢er) {
+void ActionCEL::setCenter(Common::Point center) {
_actor->getPage()->getGame()->getDirector()->addDirtyRect(_bounds);
_bounds = Common::Rect::center(center.x, center.y, _decoder.getWidth(), _decoder.getHeight());
_actor->getPage()->getGame()->getDirector()->addDirtyRect(_bounds);
diff --git a/engines/pink/objects/actions/action_cel.h b/engines/pink/objects/actions/action_cel.h
index b2e4ef2869..6eee79b8cb 100644
--- a/engines/pink/objects/actions/action_cel.h
+++ b/engines/pink/objects/actions/action_cel.h
@@ -52,7 +52,7 @@ public:
uint32 getZ() { return _z; }
CelDecoder *getDecoder() { return &_decoder; }
- void setCenter(const Common::Point ¢er);
+ void setCenter(Common::Point center);
void loadDecoder();
diff --git a/engines/pink/objects/actors/actor.cpp b/engines/pink/objects/actors/actor.cpp
index 616a05b3e8..747dc7b7ca 100644
--- a/engines/pink/objects/actors/actor.cpp
+++ b/engines/pink/objects/actors/actor.cpp
@@ -94,11 +94,11 @@ void Actor::pause(bool paused) {
_action->pause(paused);
}
-void Actor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
+void Actor::onMouseOver(Common::Point point, CursorMgr *mgr) {
mgr->setCursor(kDefaultCursor, point, Common::String());
}
-void Actor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void Actor::onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
cursorMgr->setCursor(kHoldingItemCursor, point, itemName);
}
diff --git a/engines/pink/objects/actors/actor.h b/engines/pink/objects/actors/actor.h
index 4e2444db2c..bbd50f8a6e 100644
--- a/engines/pink/objects/actors/actor.h
+++ b/engines/pink/objects/actors/actor.h
@@ -63,8 +63,8 @@ public:
virtual bool isLeftClickHandlers() const { return false; }
virtual bool isUseClickHandlers(InventoryItem *item) const { return false; }
- virtual void onMouseOver(const Common::Point point, CursorMgr *mgr);
- virtual void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr);
+ virtual void onMouseOver(Common::Point point, CursorMgr *mgr);
+ virtual void onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr);
virtual void onTimerMessage() {}
virtual void onLeftClickMessage() {}
diff --git a/engines/pink/objects/actors/audio_info_pda_button.cpp b/engines/pink/objects/actors/audio_info_pda_button.cpp
index a5120a8e50..0e889e02ee 100644
--- a/engines/pink/objects/actors/audio_info_pda_button.cpp
+++ b/engines/pink/objects/actors/audio_info_pda_button.cpp
@@ -34,11 +34,11 @@ void AudioInfoPDAButton::toConsole() const {
}
}
-void AudioInfoPDAButton::onMouseOver(const Common::Point point, CursorMgr *mgr) {
+void AudioInfoPDAButton::onMouseOver(Common::Point point, CursorMgr *mgr) {
mgr->setCursor(kClickableFirstFrameCursor, point, Common::String());
}
-void AudioInfoPDAButton::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void AudioInfoPDAButton::onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
onMouseOver(point, cursorMgr);
}
diff --git a/engines/pink/objects/actors/audio_info_pda_button.h b/engines/pink/objects/actors/audio_info_pda_button.h
index 1c4530eacc..9157137f47 100644
--- a/engines/pink/objects/actors/audio_info_pda_button.h
+++ b/engines/pink/objects/actors/audio_info_pda_button.h
@@ -36,8 +36,8 @@ class AudioInfoPDAButton : public Actor {
public:
void toConsole() const override;
- void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
- void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
+ void onMouseOver(Common::Point point, CursorMgr *mgr) override;
+ void onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
void onLeftClickMessage() override;
};
diff --git a/engines/pink/objects/actors/cursor_actor.h b/engines/pink/objects/actors/cursor_actor.h
index ce87c8a6a7..64860eca4f 100644
--- a/engines/pink/objects/actors/cursor_actor.h
+++ b/engines/pink/objects/actors/cursor_actor.h
@@ -44,7 +44,7 @@ public:
return true;
}
- void setCursorItem(const Common::String &name, const Common::Point point) {
+ void setCursorItem(const Common::String &name, Common::Point point) {
if (!_action || _action->getName() != name)
setAction(name);
static_cast<ActionCEL*>(_action)->setCenter(point);
diff --git a/engines/pink/objects/actors/lead_actor.cpp b/engines/pink/objects/actors/lead_actor.cpp
index 148fefc047..ce1f12cd9a 100644
--- a/engines/pink/objects/actors/lead_actor.cpp
+++ b/engines/pink/objects/actors/lead_actor.cpp
@@ -203,7 +203,7 @@ void LeadActor::onKeyboardButtonClick(Common::KeyCode code) {
}
}
-void LeadActor::onLeftButtonClick(const Common::Point point) {
+void LeadActor::onLeftButtonClick(Common::Point point) {
switch (_state) {
case kReady:
case kMoving: {
@@ -246,7 +246,7 @@ void LeadActor::onLeftButtonUp() {
_page->getGame()->getPdaMgr().onLeftButtonUp();
}
-void LeadActor::onRightButtonClick(const Common::Point point) {
+void LeadActor::onRightButtonClick(Common::Point point) {
if (_state == kReady || _state == kMoving) {
Actor *clickedActor = getActorByPoint(point);
if (clickedActor && isInteractingWith(clickedActor)) {
@@ -258,18 +258,18 @@ void LeadActor::onRightButtonClick(const Common::Point point) {
}
}
-void LeadActor::onMouseMove(const Common::Point point) {
+void LeadActor::onMouseMove(Common::Point point) {
if (_state != kPDA)
updateCursor(point);
else
_page->getGame()->getPdaMgr().onMouseMove(point);
}
-void LeadActor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void LeadActor::onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
_cursorMgr->setCursor(kHoldingItemCursor, point, itemName + kClickable);
}
-void LeadActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
+void LeadActor::onMouseOver(Common::Point point, CursorMgr *mgr) {
if (getInventoryMgr()->isPinkOwnsAnyItems())
_cursorMgr->setCursor(kClickableFirstFrameCursor, point, Common::String());
else
@@ -338,11 +338,11 @@ void LeadActor::setNextExecutors(const Common::String &nextModule, const Common:
void LeadActor::forceUpdateCursor() {
PinkEngine *vm =_page->getGame();
vm->getDirector()->update(); // we have actions, that should be drawn to properly update cursor
- const Common::Point point = vm->getEventManager()->getMousePos();
+ Common::Point point = vm->getEventManager()->getMousePos();
updateCursor(point);
}
-void LeadActor::updateCursor(const Common::Point point) {
+void LeadActor::updateCursor(Common::Point point) {
switch (_state) {
case kReady:
case kMoving: {
@@ -396,7 +396,7 @@ WalkLocation *LeadActor::getWalkDestination() {
return _walkMgr->findLocation(_recipient->getLocation());
}
-Actor *LeadActor::getActorByPoint(const Common::Point point) {
+Actor *LeadActor::getActorByPoint(Common::Point point) {
return _page->getGame()->getDirector()->getActorByPoint(point);
}
@@ -465,7 +465,7 @@ void PubPink::onVariableSet() {
_isHaveItem = true;
}
-void PubPink::updateCursor(const Common::Point point) {
+void PubPink::updateCursor(Common::Point point) {
if (playingMiniGame()) {
Actor *actor = getActorByPoint(point);
assert(actor);
@@ -499,7 +499,7 @@ bool PubPink::playingMiniGame() {
_page->checkValueOfVariable(kFoodPuzzle, kUndefinedValue));
}
-void PubPink::onRightButtonClick(const Common::Point point) {
+void PubPink::onRightButtonClick(Common::Point point) {
if (!playingMiniGame())
LeadActor::onRightButtonClick(point);
}
diff --git a/engines/pink/objects/actors/lead_actor.h b/engines/pink/objects/actors/lead_actor.h
index 5e95e2f405..eb190b5fa8 100644
--- a/engines/pink/objects/actors/lead_actor.h
+++ b/engines/pink/objects/actors/lead_actor.h
@@ -69,14 +69,14 @@ public:
void loadPDA(const Common::String &pageName);
void onKeyboardButtonClick(Common::KeyCode code);
- void onLeftButtonClick(const Common::Point point);
+ void onLeftButtonClick(Common::Point point);
void onLeftButtonUp();
- virtual void onRightButtonClick(const Common::Point point);
+ virtual void onRightButtonClick(Common::Point point);
- void onMouseMove(const Common::Point point);
+ void onMouseMove(Common::Point point);
- void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, Pink::CursorMgr *cursorMgr) override;
- void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
+ void onMouseOverWithItem(Common::Point point, const Common::String &itemName, Pink::CursorMgr *cursorMgr) override;
+ void onMouseOver(Common::Point point, CursorMgr *mgr) override;
void onLeftClickMessage() override;
virtual void onVariableSet() {}
@@ -92,14 +92,14 @@ public:
AudioInfoMgr *getAudioInfoMgr() { return &_audioInfoMgr; }
- Actor *getActorByPoint(const Common::Point point);
+ Actor *getActorByPoint(Common::Point point);
Actor *findActor(const Common::String &name);
protected:
void forceUpdateCursor();
- virtual void updateCursor(const Common::Point point);
+ virtual void updateCursor(Common::Point point);
virtual void sendUseClickMessage(Actor *actor);
void sendLeftClickMessage(Actor *actor);
@@ -140,13 +140,13 @@ class PubPink : public LeadActor {
public:
void toConsole() const override;
- void onRightButtonClick(const Common::Point point) override;
+ void onRightButtonClick(Common::Point point) override;
void onLeftClickMessage() override;
void onVariableSet() override;
protected:
- void updateCursor(const Common::Point point) override;
+ void updateCursor(Common::Point point) override;
void sendUseClickMessage(Actor *actor) override;
diff --git a/engines/pink/objects/actors/pda_button_actor.cpp b/engines/pink/objects/actors/pda_button_actor.cpp
index 1e4a5022e1..b736bf29a6 100644
--- a/engines/pink/objects/actors/pda_button_actor.cpp
+++ b/engines/pink/objects/actors/pda_button_actor.cpp
@@ -67,7 +67,7 @@ void PDAButtonActor::onLeftClickMessage() {
}
}
-void PDAButtonActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
+void PDAButtonActor::onMouseOver(Common::Point point, CursorMgr *mgr) {
if (_command.type == Command::kNull || !isActive())
mgr->setCursor(kPDADefaultCursor, point, Common::String());
else
diff --git a/engines/pink/objects/actors/pda_button_actor.h b/engines/pink/objects/actors/pda_button_actor.h
index 9851a60e99..cca1ee626e 100644
--- a/engines/pink/objects/actors/pda_button_actor.h
+++ b/engines/pink/objects/actors/pda_button_actor.h
@@ -56,7 +56,7 @@ public:
void init(bool paused) override;
- void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
+ void onMouseOver(Common::Point point, CursorMgr *mgr) override;
void onLeftClickMessage() override;
diff --git a/engines/pink/objects/actors/supporting_actor.cpp b/engines/pink/objects/actors/supporting_actor.cpp
index 087d493052..4d4726ef83 100644
--- a/engines/pink/objects/actors/supporting_actor.cpp
+++ b/engines/pink/objects/actors/supporting_actor.cpp
@@ -55,7 +55,7 @@ bool SupportingActor::isUseClickHandlers(InventoryItem *item) const {
return _handlerMgr.isUseClickHandler(this, item->getName());
}
-void SupportingActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
+void SupportingActor::onMouseOver(Common::Point point, CursorMgr *mgr) {
if (isLeftClickHandlers()) {
if (!_cursor.empty())
mgr->setCursor(_cursor, point);
@@ -65,7 +65,7 @@ void SupportingActor::onMouseOver(const Common::Point point, CursorMgr *mgr) {
Actor::onMouseOver(point, mgr);
}
-void SupportingActor::onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
+void SupportingActor::onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) {
Common::String item = itemName;
if (_handlerMgr.isUseClickHandler(this, itemName))
item += kClickable;
diff --git a/engines/pink/objects/actors/supporting_actor.h b/engines/pink/objects/actors/supporting_actor.h
index 4aec8599d8..a1e0ffa778 100644
--- a/engines/pink/objects/actors/supporting_actor.h
+++ b/engines/pink/objects/actors/supporting_actor.h
@@ -42,8 +42,8 @@ public:
bool isLeftClickHandlers() const override;
bool isUseClickHandlers(InventoryItem *item) const override;
- void onMouseOver(const Common::Point point, CursorMgr *mgr) override;
- void onMouseOverWithItem(const Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
+ void onMouseOver(Common::Point point, CursorMgr *mgr) override;
+ void onMouseOverWithItem(Common::Point point, const Common::String &itemName, CursorMgr *cursorMgr) override;
void onTimerMessage() override;
void onLeftClickMessage() override;
diff --git a/engines/pink/objects/inventory.cpp b/engines/pink/objects/inventory.cpp
index 77126f83f3..9132ac4587 100644
--- a/engines/pink/objects/inventory.cpp
+++ b/engines/pink/objects/inventory.cpp
@@ -141,7 +141,7 @@ void InventoryMgr::update() {
}
}
-void InventoryMgr::onClick(const Common::Point point) {
+void InventoryMgr::onClick(Common::Point point) {
if (_state != kReady)
return;
diff --git a/engines/pink/objects/inventory.h b/engines/pink/objects/inventory.h
index 59526c51f9..f68b62ffe7 100644
--- a/engines/pink/objects/inventory.h
+++ b/engines/pink/objects/inventory.h
@@ -57,7 +57,7 @@ public:
void saveState(Archive &archive);
void update();
- void onClick(const Common::Point point);
+ void onClick(Common::Point point);
bool start(bool paused);
Commit: bb4fb9b751be18ea9a5a3e61d25ba3f6620a47a1
https://github.com/scummvm/scummvm/commit/bb4fb9b751be18ea9a5a3e61d25ba3f6620a47a1
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-06-04T20:51:41+03:00
Commit Message:
PINK: JANITORIAL: fixed names
Changed paths:
engines/pink/objects/sequences/sequencer.cpp
engines/pink/objects/sequences/sequencer.h
diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp
index 2973cfaaf9..c4bba82456 100644
--- a/engines/pink/objects/sequences/sequencer.cpp
+++ b/engines/pink/objects/sequences/sequencer.cpp
@@ -68,9 +68,9 @@ void Sequencer::authorSequence(Sequence *sequence, bool loadingSave) {
if (sequence) {
SequenceContext *context = new SequenceContext(sequence);
- SequenceContext *confilct;
- while((confilct = findConfilictingContextWith(context)) != nullptr)
- confilct->getSequence()->forceEnd();
+ SequenceContext *conflict;
+ while((conflict = findConfilictingContextWith(context)) != nullptr)
+ conflict->getSequence()->forceEnd();
_context = context;
sequence->init(loadingSave);
diff --git a/engines/pink/objects/sequences/sequencer.h b/engines/pink/objects/sequences/sequencer.h
index 3c2cbc9ed6..114f1c58f7 100644
--- a/engines/pink/objects/sequences/sequencer.h
+++ b/engines/pink/objects/sequences/sequencer.h
@@ -51,7 +51,7 @@ public:
void update();
void authorSequence(Sequence *sequence, bool loadingSave);
- void authorParallelSequence(Sequence *seqeunce, bool loadingSave);
+ void authorParallelSequence(Sequence *sequence, bool loadingSave);
void skipSubSequence();
void restartSequence();
Commit: df0e8a94909238cfdf378a9e9e43f7cd8fba7578
https://github.com/scummvm/scummvm/commit/df0e8a94909238cfdf378a9e9e43f7cd8fba7578
Author: Andrei Prykhodko (whiterandrek at gmail.com)
Date: 2020-06-04T20:53:30+03:00
Commit Message:
PINK: JANITORIAL: formatting fixes
Changed paths:
engines/pink/objects/sequences/sequencer.cpp
diff --git a/engines/pink/objects/sequences/sequencer.cpp b/engines/pink/objects/sequences/sequencer.cpp
index c4bba82456..352543f265 100644
--- a/engines/pink/objects/sequences/sequencer.cpp
+++ b/engines/pink/objects/sequences/sequencer.cpp
@@ -69,9 +69,9 @@ void Sequencer::authorSequence(Sequence *sequence, bool loadingSave) {
if (sequence) {
SequenceContext *context = new SequenceContext(sequence);
SequenceContext *conflict;
- while((conflict = findConfilictingContextWith(context)) != nullptr)
+ while ((conflict = findConfilictingContextWith(context)) != nullptr) {
conflict->getSequence()->forceEnd();
-
+ }
_context = context;
sequence->init(loadingSave);
debugC(5, kPinkDebugScripts, "Main Sequence %s started", sequence->getName().c_str());
More information about the Scummvm-git-logs
mailing list