Sunday, May 7, 2006

Sunday 7th

Delved into the Drawing Modes once again today, after spotting a small problem with the existing routines. Firstly, the Symmetry values were being derived from the shape being drawn - if part of the shape was masked by a Mask tile, the reflected tile wouldn't be displayed. So, the first step was to ensure that shape tiles and reflected tiles check for Masked tiles independently. Confused? I was. :)

Next came the task of splitting a couple of pieces of logic; rather stupidly, I'd put a check in to stop tiles off the edge of the map from being processed, which also caused reflected tiles to disappear. Thankfully, this was a case of simply moving some checks outside of other checks. Finally came the task of ensuring that all tiles and reflected tiles didn't attempt to Peek or Poke values outside of the current map (again, the logic was there, just in the wrong places due to the countless tweaks and additions I've made over the last 18 months).

So, after a few hours' tinkering, the Editor looks pretty much the same as it did, but thankfully the Symmetry system and Drawing Tools are much more robust than they were before.