HaxeFlixel/flixel — pull request #1300 by JoeCreates (2014-09-16 22:21:07+00:00)
Title: Efficient FlxKey#toString, FlxTileblock#setTile, overridable FlxState#open/close

A few changes, here:
* I removed the map value iteration from `FlxKey#toString` seeing as that is very memory intensive. The method I have used requires an extra map, which seems a bit repetitive, but definitely better at runtime.
* I made the stamp sprite persist in `FlxTileblock` so that a `setTile()` method could be added. Really, in the long run, I think HaxeFlixel would benefit from something more like HaxePunk's `TiledImage`, which can have the texture offset and clipped to a specific rectangle, also with animation, and simply a better `FlxTilemap` for when more control is needed over specific tiles (Right now the fact that it is not a FlxSprite and had all it's own rendering makes it incredibly limited).
* I found a situation where I needed to be able to override `FlxState#open/close`, so I made them non-inline, which will have negligible performance impact given how infrequently they are called.