[Scummvm-git-logs] scummvm master -> 93ec723da1d6fe80597bcff70dd8177a110f3c9c
sev-
sev at scummvm.org
Fri Sep 23 18:28:11 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:
a46ac56015 FULLPIPE: Added more debug info to saveload code
c9d01a0cfd FULLPIPE: Made object sorting stable. This removes flicker in many scenes
93ec723da1 FULLPIPE: Revert errorneous change
Commit: a46ac560150318b460a18181a02b627ee1e20a61
https://github.com/scummvm/scummvm/commit/a46ac560150318b460a18181a02b627ee1e20a61
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-23T18:28:01+02:00
Commit Message:
FULLPIPE: Added more debug info to saveload code
Changed paths:
engines/fullpipe/stateloader.cpp
engines/fullpipe/statesaver.cpp
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index b61834d..8f6a3b2 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -102,8 +102,11 @@ void GameLoader::readSavegame(const char *fname) {
int32 arrSize = archive->readUint32LE();
+ debugC(3, kDebugLoading, "Reading %d infos", arrSize);
+
for (uint i = 0; i < arrSize; i++) {
_sc2array[i]._picAniInfosCount = archive->readUint32LE();
+ debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
free(_sc2array[i]._picAniInfos);
_sc2array[i]._picAniInfos = (PicAniInfo **)malloc(sizeof(PicAniInfo *) * _sc2array[i]._picAniInfosCount);
diff --git a/engines/fullpipe/statesaver.cpp b/engines/fullpipe/statesaver.cpp
index c6f4851..31c2543 100644
--- a/engines/fullpipe/statesaver.cpp
+++ b/engines/fullpipe/statesaver.cpp
@@ -85,9 +85,13 @@ void GameLoader::writeSavegame(Scene *sc, const char *fname) {
archive->writeUint32LE(_sc2array.size());
+ debugC(3, kDebugLoading, "Saving %d infos", _sc2array.size());
+
for (uint i = 0; i < _sc2array.size(); i++) {
archive->writeUint32LE(_sc2array[i]._picAniInfosCount);
+ debugC(3, kDebugLoading, "Count %d: %d", i, _sc2array[i]._picAniInfosCount);
+
for (uint j = 0; j < _sc2array[i]._picAniInfosCount; j++) {
_sc2array[i]._picAniInfos[j]->save(*archive);
}
Commit: c9d01a0cfdd8c39d9e27ff29e6fc13adee296258
https://github.com/scummvm/scummvm/commit/c9d01a0cfdd8c39d9e27ff29e6fc13adee296258
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-23T18:28:01+02:00
Commit Message:
FULLPIPE: Made object sorting stable. This removes flicker in many scenes
Changed paths:
engines/fullpipe/scene.cpp
engines/fullpipe/utils.h
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 1d693fc..9e44449 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -469,10 +469,18 @@ bool Scene::compareObjPriority(const void *p1, const void *p2) {
if (((const GameObject *)p1)->_priority > ((const GameObject *)p2)->_priority)
return true;
+ if (((const GameObject *)p1)->_priority == ((const GameObject *)p2)->_priority)
+ if (((const GameObject *)p1)->_cnum > ((const GameObject *)p2)->_cnum)
+ return true;
+
return false;
}
void Scene::objectList_sortByPriority(Common::Array<StaticANIObject *> &list, bool skipFirst) {
+ // Ensure the sort is stable
+ for (uint i = 0; i < list.size(); i++)
+ list[i]->_cnum = i;
+
if (skipFirst) {
Common::Array<StaticANIObject *>::iterator s = list.begin();
@@ -485,6 +493,10 @@ void Scene::objectList_sortByPriority(Common::Array<StaticANIObject *> &list, bo
}
void Scene::objectList_sortByPriority(Common::Array<PictureObject *> &list, bool skipFirst) {
+ // Ensure the sort is stable
+ for (uint i = 0; i < list.size(); i++)
+ list[i]->_cnum = i;
+
if (skipFirst) {
Common::Array<PictureObject *>::iterator s = list.begin();
diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h
index 41a54f4..2f9b75c 100644
--- a/engines/fullpipe/utils.h
+++ b/engines/fullpipe/utils.h
@@ -110,8 +110,9 @@ enum ObjType {
class CObject {
public:
ObjType _objtype;
+ uint _cnum;
- CObject() : _objtype(kObjTypeDefault) {}
+ CObject() : _objtype(kObjTypeDefault), _cnum(0) {}
virtual bool load(MfcArchive &in) { return true; }
virtual void save(MfcArchive &out) { error("Not implemented for obj type: %d", _objtype); }
virtual ~CObject() {}
Commit: 93ec723da1d6fe80597bcff70dd8177a110f3c9c
https://github.com/scummvm/scummvm/commit/93ec723da1d6fe80597bcff70dd8177a110f3c9c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-23T18:28:01+02:00
Commit Message:
FULLPIPE: Revert errorneous change
Changed paths:
engines/fullpipe/scenes/scene04.cpp
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index d25b0a0..6c746b8 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -878,7 +878,7 @@ void sceneHandler04_shootKozyawka() {
else
mq = sceneHandler04_kozFly7(g_vars->scene04_walkingKozyawka, (double)(phase - 6) * 0.3333333333333333);
} else {
- mq = sceneHandler04_kozFly7(g_vars->scene04_walkingKozyawka, (double)(phase - 2) * 0.3333333333333333);
+ mq = sceneHandler04_kozFly5(g_vars->scene04_walkingKozyawka, (double)(phase - 2) * 0.3333333333333333);
}
} else {
mq = sceneHandler04_kozFly3(g_vars->scene04_walkingKozyawka, (double)phase * 0.5);
More information about the Scummvm-git-logs
mailing list