Monday, January 16, 2006

Monday 16th

A glimmer of hope came in the form of some updated graphics drivers for my video card; it transpires that the bugs I've been wrestling with are due to an obscure video card problem (which wasn't an issue with my previous video card, which I swapped out only recently). A quick build transferred to the trusty laptop confirmed that it was indeed a hardware issue. After updating the video drivers, however, my code only worked once before hopping back on the bus to Bug City.

Although this isn't a significant problem (I can now just switch over to the laptop to finish key routines), it did reinstate my faith in the project and drove me to make some progress.

First up was a tweak to the New Project dialogue box - I'd neglected to include a Cancel button (which is something of a problem if you accidentally select the New Project option). A few minutes later, I'd inserted the relevant code and balance was restored.

Next came a tweak to the Tile clear functions, which weren't generating their thumbnails properly (and, thanks to my video card problem, I can't actually test the results!). However, the code uses an existing routine that I know is rock solid, so for now I'll have to work blind.

Next I tackled the Grab function; I'd inserted code a while back to allow lines to be constrained to vertical, horizontal, or diagonal, and similarly, constrained boxes to true squares. This code had never worked properly in Grab Mode when the constrained square went off the edge of the map, mainly because I'd been too elaborate with my checks - after inserting just a couple of tweaks at the start of the routine, everything was working as it should.

The final task of the night involved getting my symmetry code working wish Brushes; this is a lot trickier than it seems, mainly because the brush width has to be taken into account when you're generating the symmetry values. Additionally, the sophisticated clipping also caused chunks of the reflected brush to disappear if the equivalent chunk was off the edge of the screen.

Brute force was the order of the day, however, and after much head scratching and more than a little persistence, the basic code was in and working - now all I need to do is add the plotting code and masking code without breaking the already complex routines.