Started chugging through my To-Do list for the Editor, and kicked off by fixing a small bug in my input routine; with that fixed, the user can now manually specify the size of the Grid, which comes in handy if you, well, like a bit of variety in the grid department. This should work well alongside the Brush Grid which, if you remember, resizes itself automatically to suit the current Brush.
The bulk of the day's work was taken up with the Dump functions (no sniggering at the back!). The first routine was a simple function to dump the current Editor view to a BMP file; I've used an editor in the past which had this function, and it came in useful when reporting errors to artists (such as tiles not lining up properly).
The second routine, and one which took a lot longer to debug than I expected, was intended to dump the entire map to a BMP. This was trickier than it sounds, mainly because the maps only exist in memory as a string of data, which are rendered to the screen to produce the current Editor view. In order to dump a map to a BMP file, therefore, the map needs to be rendered to a huge canvas 'behind the scenes'.
Thus, the second routine has to create a new canvas, render the map to it, produce the file, then dispose of the canvas cleanly so as not to hog memory. After much tinkering, however, the routine was in and working beautifully. Currently the routine only dumps out the current layer (if you recall, the Editor supports multiple layers for parallax, collision, and so forth), but I may add a tweak to output the "merged" layers as a BMP, too.
