From ad9ba099aeef6b27cd0843761fa15ebfa3061bf0 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 20 Aug 2011 18:02:06 +0200 Subject: The draw order of particles is now Y - 16 pixels. This means that the order point of the sprites relative to the particles is no longer the lowest point of the image but instead a point which is approximately between the feet of the characters. The intent of the latest commits to treat sprites as perpendicular to the ground instead of perpendicular to the view line is retained by this approach. I tested this with various particle effects and it results in exactly the expected behavior. Note that this does NOT fix the current problems on TMW with the snail slime effect, because the TMW content team accidently placed this one 10px in the air. Sorry, garbage in, garbage out. getDrawPixelY was re-renamed to getPixelY to be consistent with getPixelX, while getPixelY was renamed to getDrawOrder, to make its purpose clear. Further, particles are no longer drawn when behind other objects. This is implemented by adding a drawnWhenBehind member function to Actor, which currently returns true for everything except particles and compound- sprites with more than one sub-sprites (the later case is consistent with the previous behavior of them). An exception are text particles which are excempt from this exception and whose drawing order is also biased by 16 pixels south instead of north to make them more visible. Plus some minor changes from Bertram. Reviewed-by: Bertram. Resolves: Mana-Mantis #362. --- src/being.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/being.h') diff --git a/src/being.h b/src/being.h index b702cf1a..c6fd63ed 100644 --- a/src/being.h +++ b/src/being.h @@ -279,6 +279,9 @@ class Being : public ActorSprite, public EventListener */ int getNumberOfLayers() const; + virtual bool drawnWhenBehind() const + { return CompoundSprite::drawnWhenBehind(); } + /** * Performs being logic. */ -- cgit v1.2.3-70-g09d2