Mercurial > fife-parpg
diff engine/core/video/image_location.cpp @ 156:376b8afc9a18
Fixed a horrendous misconeception in the pool.
The map was sorted by pointer comparison.
Needs a bit cleanup, though.
author | phoku@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 12 Oct 2008 20:30:09 +0000 |
parents | 6e7d228def30 |
children |
line wrap: on
line diff
--- a/engine/core/video/image_location.cpp Sun Oct 12 19:23:10 2008 +0000 +++ b/engine/core/video/image_location.cpp Sun Oct 12 20:30:09 2008 +0000 @@ -74,32 +74,39 @@ return true; if( m_type > loc.getType() ) return false; - if( m_filename < loc.getFilename() ) - return true; - if( m_filename > loc.getFilename() ) - return false; const ImageLocation* r = dynamic_cast<const ImageLocation*>(&loc); if (!r) { - return true; - } - - if (m_xshift < r->m_xshift) { - return false; - } - if (m_yshift < r->m_yshift) { return false; } - if (m_width < r->m_width) { + + if(m_xshift < r->m_xshift) + return true; + if(m_xshift > r->m_xshift) return false; - } - if (m_height < r->m_height) { + + if(m_yshift < r->m_yshift) + return true; + if(m_yshift > r->m_yshift) return false; - } - if (m_parent_image < r->m_parent_image) { + + if(m_width < r->m_width) + return true; + if(m_width > r->m_width) return false; - } - return true; + + if(m_height < r->m_height) + return true; + if(m_height > r->m_height) + return false; + + + if( m_parent_image < r->m_parent_image ) + return true; + if( m_parent_image > r->m_parent_image ) + return false; + + return m_filename < loc.getFilename(); } ResourceLocation* ImageLocation::clone() const {