aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/particles
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-12-09 11:08:04 +0100
committerEinar Johan Trøan Sømåen2012-12-09 11:08:04 +0100
commit8d866683d90e69c3313fda5fed63679a603d2b45 (patch)
tree3f26ce7cff49e8629a29bea408a1c81146efe307 /engines/wintermute/base/particles
parent517980d43e37a32f860448434b66ec5767ec5dfd (diff)
downloadscummvm-rg350-8d866683d90e69c3313fda5fed63679a603d2b45.tar.gz
scummvm-rg350-8d866683d90e69c3313fda5fed63679a603d2b45.tar.bz2
scummvm-rg350-8d866683d90e69c3313fda5fed63679a603d2b45.zip
WINTERMUTE: Fix the rest of the Common:sort comparators.
Diffstat (limited to 'engines/wintermute/base/particles')
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp11
-rw-r--r--engines/wintermute/base/particles/part_emitter.h2
2 files changed, 5 insertions, 8 deletions
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index bab4d4609e..e1bc659fdd 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -373,16 +373,13 @@ bool PartEmitter::sortParticlesByZ() {
}
//////////////////////////////////////////////////////////////////////////
-int PartEmitter::compareZ(const void *obj1, const void *obj2) {
- const PartParticle *p1 = *(const PartParticle *const *)obj1;
- const PartParticle *p2 = *(const PartParticle *const *)obj2;
-
+bool PartEmitter::compareZ(const PartParticle *p1, const PartParticle *p2) {
if (p1->_posZ < p2->_posZ) {
- return -1;
+ return true;
} else if (p1->_posZ > p2->_posZ) {
- return 1;
+ return false;
} else {
- return 0;
+ return false;
}
}
diff --git a/engines/wintermute/base/particles/part_emitter.h b/engines/wintermute/base/particles/part_emitter.h
index f2c8f139f1..3aa55e1ac8 100644
--- a/engines/wintermute/base/particles/part_emitter.h
+++ b/engines/wintermute/base/particles/part_emitter.h
@@ -127,7 +127,7 @@ private:
BaseScriptHolder *_owner;
PartForce *addForceByName(const Common::String &name);
- int static compareZ(const void *obj1, const void *obj2);
+ bool static compareZ(const PartParticle *p1, const PartParticle *p2);
bool initParticle(PartParticle *particle, uint32 currentTime, uint32 timerDelta);
bool updateInternal(uint32 currentTime, uint32 timerDelta);
uint32 _lastGenTime;