comparison engine/core/video/image_location.cpp @ 146:54b3984e1afc

The getIndex function was a hack that shadowed another bug that caused the pools to misbehave. AddResourceFromFile works now exactly as getIndex, it's just faster. Fixed GUIImage to not hold a reference, it uses the index directly anyway. Plus heaps of minor adjustments for more informative debug output and statistics.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 09 Oct 2008 12:36:21 +0000
parents 90005975cdbb
children fb6ccb367dd1
comparison
equal deleted inserted replaced
145:e7a431577c95 146:54b3984e1afc
43 if (!ResourceLocation::operator==(loc)) { 43 if (!ResourceLocation::operator==(loc)) {
44 return false; 44 return false;
45 } 45 }
46 const ImageLocation* r = dynamic_cast<const ImageLocation*>(&loc); 46 const ImageLocation* r = dynamic_cast<const ImageLocation*>(&loc);
47 if (!r) { 47 if (!r) {
48 return true; 48 return false;
49 } 49 }
50 50
51 if (m_xshift != r->m_xshift) { 51 if (m_xshift != r->m_xshift) {
52 return false; 52 return false;
53 } 53 }
70 if (!ResourceLocation::operator <(loc)) { 70 if (!ResourceLocation::operator <(loc)) {
71 return false; 71 return false;
72 } 72 }
73 73
74 const ImageLocation* r = dynamic_cast<const ImageLocation*>(&loc); 74 const ImageLocation* r = dynamic_cast<const ImageLocation*>(&loc);
75 if (!r) {
76 return true;
77 }
78
75 if (m_xshift < r->m_xshift) { 79 if (m_xshift < r->m_xshift) {
76 return false; 80 return false;
77 } 81 }
78 if (m_yshift < r->m_yshift) { 82 if (m_yshift < r->m_yshift) {
79 return false; 83 return false;