[Scummvm-cvs-logs] scummvm master -> f5979abaa28eece472400ef83a7acc2bdfc74de9
sev-
sev at scummvm.org
Tue Apr 12 10:59:58 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f5979abaa2 WAGE: Fix object sorting. Fixes many glitches
Commit: f5979abaa28eece472400ef83a7acc2bdfc74de9
https://github.com/scummvm/scummvm/commit/f5979abaa28eece472400ef83a7acc2bdfc74de9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-04-12T10:59:53+02:00
Commit Message:
WAGE: Fix object sorting. Fixes many glitches
Changed paths:
engines/wage/entities.cpp
engines/wage/world.cpp
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index a2648c4..adb0538 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -141,7 +141,7 @@ void Scene::paint(Graphics::Surface *surface, int x, int y) {
_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, x, y);
for (ObjList::const_iterator it = _objs.begin(); it != _objs.end(); ++it) {
- debug(2, "paining Obj: %s", (*it)->_name.c_str());
+ debug(2, "paining Obj: %s, index: %d, type: %d", (*it)->_name.c_str(), (*it)->_index, (*it)->_type);
(*it)->_design->paint(surface, ((WageEngine *)g_engine)->_world->_patterns, x, y);
}
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index 7e7bc33..954a425 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -431,9 +431,9 @@ static bool objComparator(const Obj *o1, const Obj *o2) {
bool o1Immobile = (o1->_type == Obj::IMMOBILE_OBJECT);
bool o2Immobile = (o2->_type == Obj::IMMOBILE_OBJECT);
if (o1Immobile == o2Immobile) {
- return o1->_index - o2->_index;
+ return o1->_index < o2->_index;
}
- return o1Immobile ? -1 : 1;
+ return o1Immobile;
}
void World::move(Obj *obj, Scene *scene, bool skipSort) {
More information about the Scummvm-git-logs
mailing list