[Scummvm-cvs-logs] scummvm master -> cf97b2ec9ecac5ab0edbdd34dca051c550cada37

sev- sev at scummvm.org
Sun Apr 27 11:15:40 CEST 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
10d3017737 FULLPIPE: Proper implementation of FullpipeEngine::stopAllSoundInstances()
cf97b2ec9e FULLPIPE: Implement StaticANIObject::calcStepLen()


Commit: 10d3017737080e9f769d0625a7cb5790fb465dc6
    https://github.com/scummvm/scummvm/commit/10d3017737080e9f769d0625a7cb5790fb465dc6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-27T11:07:41+03:00

Commit Message:
FULLPIPE: Proper implementation of FullpipeEngine::stopAllSoundInstances()

Changed paths:
    engines/fullpipe/sound.cpp



diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index c337209..3c13bad 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -429,14 +429,11 @@ void FullpipeEngine::stopAllSoundStreams() {
 }
 
 void FullpipeEngine::stopAllSoundInstances(int id) {
-	SoundList *soundList = _currentScene->_soundList;
-
-	for (int i = 0; i < soundList->getCount(); i++) {
-		Sound *sound = soundList->getSoundByIndex(i);
+	for (int i = 0; i < _currSoundListCount; i++) {
+		Sound *sound = _currSoundList1[i]->getSoundItemById(id);
 
-		if (sound->getId() == id) {
-			_mixer->stopHandle(sound->getHandle());
-		}
+		if (sound)
+			sound->stop();
 	}
 }
 


Commit: cf97b2ec9ecac5ab0edbdd34dca051c550cada37
    https://github.com/scummvm/scummvm/commit/cf97b2ec9ecac5ab0edbdd34dca051c550cada37
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-04-27T11:59:29+03:00

Commit Message:
FULLPIPE: Implement StaticANIObject::calcStepLen()

Changed paths:
    engines/fullpipe/statics.cpp
    engines/fullpipe/statics.h



diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 4d813d3..f1abac5 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -1369,6 +1369,31 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase
 	return true;
 }
 
+Common::Point *StaticANIObject::calcStepLen(Common::Point *p) {
+	if (_movement) {
+		Common::Point point;
+
+		_movement->calcSomeXY(point, 0);
+
+		p->x = point.x;
+		p->y = point.y;
+
+		int idx = _stepArray.getCurrPointIndex() - _movement->_currDynamicPhaseIndex - 1;
+
+		if (idx >= 0) {
+			_stepArray.getPoint(&point, idx, _movement->_currDynamicPhaseIndex + 2);
+
+			p->x += point.x;
+			p->y += point.y;
+		}
+	} else {
+		p->x = 0;
+		p->y = 0;
+	}
+
+	return p;
+}
+
 Statics::Statics() {
 	_staticsId = 0;
 	_picture = 0;
diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h
index d5e7d53..d678957 100644
--- a/engines/fullpipe/statics.h
+++ b/engines/fullpipe/statics.h
@@ -246,6 +246,7 @@ public:
 	void draw2();
 
 	MovTable *countMovements();
+	Common::Point *calcStepLen(Common::Point *p);
 	void setSpeed(int speed);
 
 	void updateStepPos();






More information about the Scummvm-git-logs mailing list