Saturday, January 15, 2005

Saturday 15th

A scribbled note on my To-Do list which said "clipboard" got me thinking about Brush functionality today. Currently the user can grab a brush up to the size of the current map and store this in one of 8 reserved buffers. I wasn't sure, however, if it was worth adding the facility to copy the Brush to a clipboard for quick recall. However, the Editor also allows you to grab a Brush, switch to another drawing mode, then return to Brush mode with the previous Brush - saved or not - still in the buffer. With that in mind, I cast aside my clipboard-orientated thoughts and set about more pressing issues.

I did a little bit of work on some new icons for the toolbar, as I want to ensure that all pertinent functions are accommodated thereon. This brief foray into PhotoShop yielded some iffy results, so I postponed my toolbar session until a later date, and produced some placeholder icons instead.

I finished off by implementing a proper "Dropper" mode, which, once activated, allows the user to grab tiles using the Left/Right mouse buttons (the user can assign a different tile to each button, thus making it easier to edit maps). In all other drawing modes, the user still has limited Dropper functionality, and can assign a tile to the Left button by clicking the Middle mouse button.

The next task in hand involved I/O (Input / Output), currently a grey area for me and not one of my particular favourites - which is ironic, as all my I/O routines so far have been painless to write and debug.

I started off by tidying up the existing Load / Save functions, allowing the user to save any layer as a .MAP file, then load that back in to any layer. For clarity, I added the filename of the current layer in the title bar of the Editor window, and added some extra checks to ensure that the Editor performs a "Save As" as opposed to a normal "Save" if the current layer hasn't been saved previously or loaded from a file.

I then expanded these routines to implement the Project Load / Save functions, which bundles all of the maps into one file. This currently just holds map data and dumps it directly to the Layers; I need to add further modifications so that map dimensions are stored, along with file locations for associated tilesets, a header section with a checksum, as well as any Brushes the user has stored.

I finished up by taking a few screenshots of various menus from other editors, just as a point of reference to see the best way to organise common features; that done, I set about revamping the menus as they'd been somewhat neglected, and added all the I/O, Grid, Brush, and Dump functionality. Not an awe-inspiring task, but the Editor is slowly starting to look like a finished product.