[Scummvm-git-logs] scummvm master -> d6d9967201af55cf376e54b4a3a35d2c2bd5e6d9

sev- sev at scummvm.org
Wed Aug 31 22:41:19 CEST 2016


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:
080bd94f2e FULLPIPE: Fix mismatched malloc/free
8304cfc20e FULLPIPE: Added more debugging to scene03
d6d9967201 FULLPIPE: Fixed Behaviour methods


Commit: 080bd94f2e16d7bc178f8a93109db29ce0805648
    https://github.com/scummvm/scummvm/commit/080bd94f2e16d7bc178f8a93109db29ce0805648
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-31T21:04:02+02:00

Commit Message:
FULLPIPE: Fix mismatched malloc/free

Changed paths:
    engines/fullpipe/gameloader.cpp



diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 1cd5103..270e69a 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -88,10 +88,10 @@ GameLoader::~GameLoader() {
 
 	for (uint i = 0; i < _sc2array.size(); i++) {
 		if (_sc2array[i]._defPicAniInfos)
-			delete _sc2array[i]._defPicAniInfos;
+			free(_sc2array[i]._defPicAniInfos);
 
 		if (_sc2array[i]._picAniInfos)
-			delete _sc2array[i]._picAniInfos;
+			free(_sc2array[i]._picAniInfos);
 
 		if (_sc2array[i]._motionController)
 			delete _sc2array[i]._motionController;


Commit: 8304cfc20e6218f1d0406492030385530bd0a5a0
    https://github.com/scummvm/scummvm/commit/8304cfc20e6218f1d0406492030385530bd0a5a0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-31T21:50:26+02:00

Commit Message:
FULLPIPE: Added more debugging to scene03

Changed paths:
    engines/fullpipe/scenes/scene03.cpp



diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index e374c87..1cb6390 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -50,6 +50,16 @@ void FullpipeEngine::setSwallowedEggsState() {
 void scene03_initScene(Scene *sc) {
 	debugC(1, kDebugSceneLogic, "scene03_initScene()");
 
+	Inventory2 *inv = getGameLoaderInventory();
+
+#if 0
+	inv->addItem(ANI_INV_EGGAPL, 1);
+	inv->addItem(ANI_INV_EGGDOM, 1);
+	inv->addItem(ANI_INV_EGGCOIN, 1);
+	inv->addItem(ANI_INV_EGGBOOT, 1);
+	inv->addItem(ANI_INV_EGGGLS, 1);
+#endif
+
 	g_vars->scene03_eggeater = sc->getStaticANIObject1ById(ANI_EGGEATER, -1);
 	g_vars->scene03_domino = sc->getStaticANIObject1ById(ANI_DOMINO_3, -1);
 
@@ -87,12 +97,16 @@ int scene03_updateCursor() {
 }
 
 void sceneHandler03_eaterFat() {
+	debugC(2, kDebugSceneLogic, "scene03: eaterFat");
+
 	g_vars->scene03_eggeater->_flags &= 0xFF7F;
 
 	g_vars->scene03_eggeater->startAnim(MV_EGTR_FATASK, 0, -1);
 }
 
 void sceneHandler03_swallowEgg(int item) {
+	debugC(2, kDebugSceneLogic, "scene03: swallowEgg");
+
 	if (!g_vars->swallowedEgg1->_value.intValue) {
 		g_vars->swallowedEgg1->_value.intValue = item;
 		debugC(2, kDebugSceneLogic, "scene03: setting egg1: %d", g_vars->swallowedEgg1->_value.intValue);
@@ -110,6 +124,8 @@ void sceneHandler03_swallowEgg(int item) {
 }
 
 void sceneHandler03_giveItem(ExCommand *ex) {
+	debugC(2, kDebugSceneLogic, "scene03: giveItem");
+
 	if (ex->_parentId == ANI_INV_EGGAPL || ex->_parentId == ANI_INV_EGGDOM ||
 		ex->_parentId == ANI_INV_EGGCOIN || ex->_parentId == ANI_INV_EGGBOOT ||
 		ex->_parentId == ANI_INV_EGGGLS)
@@ -121,6 +137,8 @@ int sceneHandler03_swallowedEgg1State() {
 }
 
 void sceneHandler03_giveCoin(ExCommand *ex) {
+	debugC(2, kDebugSceneLogic, "scene03: giveCoin");
+
 	MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex->_parId);
 
 	if (mq && mq->getCount() > 0) {
@@ -149,6 +167,8 @@ void sceneHandler03_goLadder() {
 }
 
 void sceneHandler03_pushEggStack() {
+	debugC(2, kDebugSceneLogic, "scene03: pushEggStack");
+
 	g_vars->swallowedEgg1->_value.intValue = g_vars->swallowedEgg2->_value.intValue;
 	g_vars->swallowedEgg2->_value.intValue = g_vars->swallowedEgg3->_value.intValue;
 	g_vars->swallowedEgg3->_value.intValue = 0;
@@ -161,12 +181,16 @@ void sceneHandler03_pushEggStack() {
 }
 
 void sceneHandler03_releaseEgg() {
+	debugC(2, kDebugSceneLogic, "scene03: releaseEgg");
+
 	g_vars->scene03_eggeater->_flags &= 0xFF7F;
 
 	g_vars->scene03_eggeater->show1(-1, -1, -1, 0);
 }
 
 void sceneHandler03_takeEgg(ExCommand *ex) {
+	debugC(2, kDebugSceneLogic, "scene03: taking egg");
+
 	MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex->_parId);
 
 	if (mq && mq->getCount() > 0) {
@@ -195,6 +219,9 @@ void sceneHandler03_takeEgg(ExCommand *ex) {
 }
 
 int sceneHandler03(ExCommand *ex) {
+	if (ex->_messageKind != 17 && ex->_messageNum != 33)
+		debugC(3, kDebugSceneLogic, "scene03: got message: kind %d, num: %d", ex->_messageKind, ex->_messageNum);
+
 	if (ex->_messageKind != 17) {
 		if (ex->_messageKind == 57)
 			sceneHandler03_giveItem(ex);


Commit: d6d9967201af55cf376e54b4a3a35d2c2bd5e6d9
    https://github.com/scummvm/scummvm/commit/d6d9967201af55cf376e54b4a3a35d2c2bd5e6d9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-08-31T22:40:45+02:00

Commit Message:
FULLPIPE: Fixed Behaviour methods

Changed paths:
    engines/fullpipe/behavior.cpp
    engines/fullpipe/scenes/scene03.cpp



diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index 4f70553..92fb952 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -206,7 +206,7 @@ void BehaviorManager::setFlagByStaticAniObject(StaticANIObject *ani, int flag) {
 
 		if (ani == beh->_ani) {
 			if (flag)
-				beh->_flags &= 0xfe;
+				beh->_flags &= 0xfffffffe;
 			else
 				beh->_flags |= 1;
 		}
@@ -311,7 +311,7 @@ BehaviorAnim::BehaviorAnim(GameVar *var, Scene *sc, StaticANIObject *ani, int *m
 	_staticsId = 0;
 	_movesCount = 0;
 
-	*minDelay = 100000000;
+	*minDelay = 0xffffffff;
 
 	int totalPercent = 0;
 	_flags = 0;
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index 1cb6390..cf0a90f 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -58,6 +58,7 @@ void scene03_initScene(Scene *sc) {
 	inv->addItem(ANI_INV_EGGCOIN, 1);
 	inv->addItem(ANI_INV_EGGBOOT, 1);
 	inv->addItem(ANI_INV_EGGGLS, 1);
+	inv->rebuildItemRects();
 #endif
 
 	g_vars->scene03_eggeater = sc->getStaticANIObject1ById(ANI_EGGEATER, -1);





More information about the Scummvm-git-logs mailing list