Saturday, May 6, 2006

Saturday 6th

More debugging and tweaking on today's agenda: started by further investigating the Brush Thumbnail problem, which will require more than a few braincells to fix - luckily, the problem only occurs (noticeably!) when the user tries to load a Project file but a Tileset is missing; at all other times, there's already significant error-checking in place.

At the risk of running out of creative steam, I turned my attention to some other bugs and issues on my list. First came a tweak to the Duplicate checking system, to ensure that Duplicates can only be checked on Tilesets that are actually loaded (oops, fumbled the ball on that one). Next, a small tweak to the status update ensures that when a Project file is loaded the relevant filename is displayed at the top of the screen.

Next I tinkered with the map scrolling, following a suggestion from a Beta Tester that variable scroll speeds might be a useful addition; however, when the speeds were slowed down (even by half), the result was jerky and ugly. The Editor does feature a Shift-based modifier to the scrolling, which allows you to step through the map a Tile at a time, so I suppose this will have to suffice for now.

The next task involved a small tweak to the existing Drawing Modes to allow a shape to be moved while in mid-draw (for instance, in PhotoShop, the starting point of a shape can be moved at any point by holding Shift). I'd wanted to emulate this for some time, mainly because it's an immensely handy feature, but shied away from it due to the sheer amount of code I'd have to wade through.

However, it proved relatively simple to add to the code (and since I'd already calculated the size of the shape being drawn for use on the Info Panel, all I had to do was throw in a couple of extra checks). Hit a small problem with the code that checks for Masked Tiles, but a simple re-ordering of the logic and everything was working perfectly. There's a possibility that the Line mode may need a tiny tweak, but in general the day's session was extremely fruitful. :)