Tuesday, December 13, 2005

Tuesday 13th

Kicked off today's session by tweaking the Zoom function slightly; I figured it'd be nice to see the whole map Zoomed out, not just the current layer, so I added the option to Zoom Current, Zoom Visible, or Zoom All, for maximum flexibility. The Editor chugs a little bit when all 8 layers are visible and zoomed out to their fullest, but as it's intended as purely a visual aid rather than an editing mode, I can live with a little slowdown.

After updating the Project I/O accordingly (every time I add a significant variable I now have to adjust the Project I/O code, which helps keep me organised!), I moved on to a small problemette with the Animation routine, as mentioned a couple of days ago.

Basically, each animation is independent of the Tilesets that might be loaded. For instance, Animation 1 might choose to animate through a sequence of 5 tiles from Tileset 3; Animation 2 might choose to cycle through some frames from Tileset 1. Though this may seem slightly unorthodox, it allows the artist to build up a library of animations based on the current project (indeed, the whole point of the Editor's current layout was to allow everything to be contained in one easy-to-handle chunk). The programmer can then take the animation data and use it accordingly; after all, the Editor may recognise key variables, but in the real world, certain attributes - such as the Tileset - could be ignored.

After getting my head around this, I tweaked the relevant controls and updated the Project I/O code (as well as the standard Animation I/O code) accordingly. Then, I tweaked the various tools and displays to ensure that only animations which affect the currently selected Tileset are displayed. It works beautifully, but I hope it all makes sense to the end user.

Seeing as I was knee-deep in Tileset-related code, I also took the bold step of changing how the Tileset selection works; previously, pressing Tab would increase the Tileset number and thus, change the Tileset for the current Layer. However, this also meant that changing the Tileset in Anim or Grab mode also changed the Tileset for the map. With the new system, the user has to press Ctrl+Tab in order to assign the current Tileset to the current Layer (and thanks to some obscure variable assignments tucked away in my Map Display routine, this took far longer than it should!).

This had a knock-on effect that entailed changing any and every line of code that referenced the Tileset index value, replacing it with the value appropriate to the current map. This was fraught with the potential for screw-ups, but thankfully I managed to escape with just one minor error (and it also allowed me to fix a bug in my Invert Mask routine).

Next came a small change to the Dropper routine, which not only grabs the tile under the cursor, but also now jumps to the appropriate Tileset, too. The final task of the night involved tracking down a couple of bugs in the MiniMap routines, but thankfully these potentially big problems turned out to be minor oversights.

The final task remaining, as far as Project I/O is concerned, relates to the Grab Buffers and images; with this code completed hopefully tomorrow, my To-Do list will comprise just a handful of tasks (bugs and changes aside), and with this in mind I've set myself a deadline of December 31st for the Beta date. Rest assured, if things go badly over the next two weeks I'll pop back and erase this paragraph. :)