clintbellanger/flare — pull request #514 by stefanbeller (2012-07-07 08:39:25+00:00)
Title: Only draw the visible parts of the screen.

The previous pullrequest was mistaken by an off-by-one error.
(using < instead of <= )

I did playtest this version for about 15 minutes and did not recognise any disappearing
renderables any more. Nevertheless please pull definitely after the release.

Also I profiled flare with these optimisations included, and this comes out:
http://dl.dropbox.com/u/6520164/flareprofiling3.txt
It seems to me as if the Minimap now eats up all the cpu, so let me see if that can handled similar.

There are no problems regarding #442 now, so I would keep it as it is now.
(I tried rewriting the renderable array to a dynamic length vector containing only the pointers to
the renderables, but it eats up way more cpu. So I guess this method is actually one of the fastest methods when everything should be rendered each frame. A major refactor task would be do much of the rendering when loading the map. At loadtime at least the background could be rendered completely and
at runtime only the displayed part of the huge map background would be put onto screen. That would be only one sdl call, now wer doing one per tile.)