[Scummvm-cvs-logs] scummvm master -> 2cd896b1d62dd304448d521a9fd9920dc84937e3
sev-
sev at scummvm.org
Mon Apr 21 18:51:43 CEST 2014
This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3091d0ae7f FULLPIPE: Implement couple destructors
c73a10606e FULLPIPE: Implement Inventory2::clear()
e593f39e18 FULLPIPE: Implement MctlCompound::method34()
2cd896b1d6 FULLPIPE: Make debugging output less noisy
Commit: 3091d0ae7f9ea1a8fc1d1be9bc773c853787fa26
https://github.com/scummvm/scummvm/commit/3091d0ae7f9ea1a8fc1d1be9bc773c853787fa26
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-21T09:38:46+03:00
Commit Message:
FULLPIPE: Implement couple destructors
Changed paths:
engines/fullpipe/gfx.cpp
engines/fullpipe/interaction.cpp
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 26ac4ab..7c66a9a 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -168,7 +168,9 @@ PictureObject::PictureObject() {
}
PictureObject::~PictureObject() {
- warning("STUB: PictureObject::~PictureObject()");
+ delete _picture;
+ _pictureObject2List->clear();
+ delete _pictureObject2List;
}
PictureObject::PictureObject(PictureObject *src) : GameObject(src) {
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index 6b6ceb6..f24f215 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -56,7 +56,9 @@ bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) {
}
InteractionController::~InteractionController() {
- warning("STUB: InteractionController::~InteractionController()");
+ _interactions.clear();
+
+ removeMessageHandler(124, -1);
}
bool InteractionController::load(MfcArchive &file) {
Commit: c73a10606ef342978cd9e7f72d2b2b562524c7cc
https://github.com/scummvm/scummvm/commit/c73a10606ef342978cd9e7f72d2b2b562524c7cc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-21T09:47:03+03:00
Commit Message:
FULLPIPE: Implement Inventory2::clear()
Changed paths:
engines/fullpipe/interaction.cpp
engines/fullpipe/inventory.cpp
engines/fullpipe/inventory.h
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index f24f215..84e9688 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -429,7 +429,14 @@ Interaction::Interaction() {
}
Interaction::~Interaction() {
- warning("STUB: Interaction::~Interaction()");
+ if (_messageQueue) {
+ while (_messageQueue->getExCommandByIndex(0))
+ _messageQueue->deleteExCommandByIndex(0, 1);
+ }
+
+ delete _messageQueue;
+
+ free(_actionName);
}
bool Interaction::load(MfcArchive &file) {
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index cfe8adf..e79f9c5 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -447,6 +447,15 @@ int Inventory2::getHoveredItem(Common::Point *point) {
return 0;
}
+void Inventory2::clear() {
+ unselectItem(0);
+
+ for (uint i = 0; i < _inventoryItems.size(); i++)
+ getInventoryPoolItemFieldCById(_inventoryItems[i]->itemId);
+
+ _inventoryItems.clear();
+}
+
void FullpipeEngine::getAllInventory() {
Inventory2 *inv = getGameLoaderInventory();
diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h
index 833cccc..46b55c5 100644
--- a/engines/fullpipe/inventory.h
+++ b/engines/fullpipe/inventory.h
@@ -129,6 +129,8 @@ class Inventory2 : public Inventory {
bool unselectItem(bool flag);
void draw();
+
+ void clear();
};
} // End of namespace Fullpipe
Commit: e593f39e18160f20a8de091b035ff3b0207e82f4
https://github.com/scummvm/scummvm/commit/e593f39e18160f20a8de091b035ff3b0207e82f4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-21T15:13:20+03:00
Commit Message:
FULLPIPE: Implement MctlCompound::method34()
Changed paths:
engines/fullpipe/motion.cpp
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 0881a19..ab06b0e 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -159,10 +159,72 @@ void MctlCompound::freeItems() {
_motionControllers[i]->_motionControllerObj->freeItems();
}
-MessageQueue *MctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
- warning("STUB: MctlCompound::method34()");
+MessageQueue *MctlCompound::method34(StaticANIObject *ani, int sourceX, int sourceY, int fuzzyMatch, int staticsId) {
+ int idx = -1;
+ int sourceIdx = -1;
- return 0;
+ if (!ani)
+ return 0;
+
+ for (uint i = 0; i < _motionControllers.size(); i++) {
+ if (_motionControllers[i]->_movGraphReactObj) {
+ if (_motionControllers[i]->_movGraphReactObj->pointInRegion(ani->_ox, ani->_oy)) {
+ idx = i;
+ break;
+ }
+ }
+ }
+
+ for (uint i = 0; i < _motionControllers.size(); i++) {
+ if (_motionControllers[i]->_movGraphReactObj) {
+ if (_motionControllers[i]->_movGraphReactObj->pointInRegion(sourceX, sourceY)) {
+ sourceIdx = i;
+ break;
+ }
+ }
+ }
+
+ if (idx == -1)
+ return 0;
+
+ if (sourceIdx == -1)
+ return 0;
+
+ if (idx == sourceIdx)
+ return _motionControllers[idx]->_motionControllerObj->method34(ani, sourceX, sourceY, fuzzyMatch, staticsId);
+
+ MctlConnectionPoint *cp = findClosestConnectionPoint(ani->_ox, ani->_oy, idx, sourceX, sourceY, sourceIdx, &sourceIdx);
+
+ if (!cp)
+ return 0;
+
+ MessageQueue *mq = _motionControllers[idx]->_motionControllerObj->doWalkTo(ani, cp->_connectionX, cp->_connectionY, 1, cp->_field_14);
+
+ if (!mq)
+ return 0;
+
+ for (uint i = 0; i < cp->_messageQueueObj->getCount(); i++) {
+ ExCommand *ex = new ExCommand(cp->_messageQueueObj->getExCommandByIndex(i));
+
+ ex->_excFlags |= 2;
+
+ mq->addExCommandToEnd(ex);
+ }
+
+ ExCommand *ex = new ExCommand(ani->_id, 51, 0, sourceX, sourceY, 0, 1, 0, 0, 0);
+
+ ex->_excFlags |= 2;
+ ex->_field_20 = fuzzyMatch;
+ ex->_keyCode = ani->_okeyCode;
+
+ mq->addExCommandToEnd(ex);
+
+ if (!mq->chain(ani)) {
+ delete mq;
+ return 0;
+ }
+
+ return mq;
}
MessageQueue *MctlCompound::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) {
Commit: 2cd896b1d62dd304448d521a9fd9920dc84937e3
https://github.com/scummvm/scummvm/commit/2cd896b1d62dd304448d521a9fd9920dc84937e3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-21T19:50:30+03:00
Commit Message:
FULLPIPE: Make debugging output less noisy
Changed paths:
engines/fullpipe/behavior.cpp
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index 2e3a4e2..14e9c33 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -83,7 +83,7 @@ void BehaviorManager::updateBehaviors() {
if (!_isActive)
return;
- debug(0, "BehaviorManager::updateBehaviors()");
+ debug(4, "BehaviorManager::updateBehaviors()");
for (uint i = 0; i < _behaviors.size(); i++) {
BehaviorInfo *beh = _behaviors[i];
@@ -122,7 +122,7 @@ void BehaviorManager::updateBehaviors() {
}
void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry) {
- debug(0, "BehaviorManager::updateBehavior() %d", entry->_itemsCount);
+ debug(4, "BehaviorManager::updateBehavior() %d", entry->_itemsCount);
for (int i = 0; i < entry->_itemsCount; i++) {
BehaviorEntryInfo *bhi = entry->_items[i];
if (!(bhi->_flags & 1)) {
@@ -144,7 +144,7 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *
}
void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *bhe) {
- debug(0, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName));
+ debug(4, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName));
MessageQueue *mq = 0;
@@ -236,7 +236,7 @@ void BehaviorInfo::clear() {
}
void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
- debug(0, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
+ debug(4, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
_itemsCount = 1;
@@ -260,7 +260,7 @@ void BehaviorInfo::initAmbientBehavior(GameVar *var, Scene *sc) {
}
void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *ani) {
- debug(0, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName));
+ debug(4, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName));
clear();
More information about the Scummvm-git-logs
mailing list