diff engine/core/view/renderers/floatingtextrenderer.cpp @ 482:16c2b3ee59ce

* Merged the view performance branch back into trunk. fixes[ticket:419]
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 29 Apr 2010 13:51:45 +0000
parents 90005975cdbb
children 7b451e3b2439
line wrap: on
line diff
--- a/engine/core/view/renderers/floatingtextrenderer.cpp	Wed Apr 28 21:33:11 2010 +0000
+++ b/engine/core/view/renderers/floatingtextrenderer.cpp	Thu Apr 29 13:51:45 2010 +0000
@@ -64,20 +64,19 @@
 	FloatingTextRenderer::~FloatingTextRenderer() {
 	}
 
-	void FloatingTextRenderer::render(Camera* cam, Layer* layer, std::vector<Instance*>& instances) {
+	void FloatingTextRenderer::render(Camera* cam, Layer* layer, RenderList& instances) {
 		if (!m_font) {
 			return;
 		}
 		
-		std::vector<Instance*>::const_iterator instance_it = instances.begin();
+		RenderList::const_iterator instance_it = instances.begin();
 		const std::string* saytext = NULL;
 
 		for (;instance_it != instances.end(); ++instance_it) {
-			Instance* instance = *instance_it;
+			Instance* instance = (*instance_it)->instance;
 			saytext = instance->getSayText();
 			if (saytext) {
-				InstanceVisual* visual = instance->getVisual<InstanceVisual>();
-				const Rect& ir = visual->getCacheItem(cam).dimensions;
+				const Rect& ir = (*instance_it)->dimensions;
 				m_font->setColor(25,25,112);
 				Image* img = m_font->getAsImageMultiline(*saytext);
 				Rect r;