Monday, August 15, 2005

Monday 15th

Found a small bug yesterday, while tinkering with the Mini Map code; basically, a couple of values (which relate to the number of tiles that can fit on the screen) weren't being calculated properly, which was causing a few routines to malfunction occasionally.

I tracked the problem down to a section of code that initialises the map - the resize routine - but the code wasn't being called on startup because there was no map to resize. A few slaps of the forehead later, everything was working properly.

While I was knee-deep in setup code, I took the liberty of adding an "Open" button to the startup screen; now the User can choose to set the map dimensions, accept the default values, or load up an existing project.

Another task was plucked off the to-do list, mainly because I fancied coding but didn't want to get too bogged down in a big routine, so I decided to tackle the Mask Colour function (this allows the User to specify which colour will be masked when a Tileset is loaded). The colour picker was easy enough to add, and the code was working beautifully in just a few minutes.

Flushed with that small success, I decided to tweak the Toolbar and add the "Continuous Pen" drawing mode (this basically increments the currently selected Left / Right tiles every time you plot a Tile, allowing you to plot continuous sequences of tiles very easily).