diff options
Diffstat (limited to 'engines/wintermute/base/particles')
-rw-r--r-- | engines/wintermute/base/particles/part_emitter.cpp | 11 | ||||
-rw-r--r-- | engines/wintermute/base/particles/part_emitter.h | 2 |
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; |