Tileset surfaces got some improvements. Now they are stored in XML instead of hardcode (which allows for handy editing in a Notepad). Of course XML is slower to parse, but for development we need it to be easy to edit. Improving performance in a code that runs only once on game loading can be done much later 🙂
Second big improvement is a pop-up window that is instantiated by tileset surfaces class:
To be able to edit many of the settings in a developing game we need a tool that allows to see the changes live – and that’s the one. Pop-up is closely tied with it’s owner class, so no other element of the game is aware of its existence (that’s a good OOP approach). When changes are made in that window they trigger OnChanged event to which we connect the function to flush the caches and make the game recalculate tiles geometry (Surfaces affect that mostly). The pop-up looks and works exactly the same in the game as on this screen above.
In the future such pop-ups will carry the role of “on-the-fly” editing tools for the game. So e.g. UnitsTasks pop-up will allow to change settings such as work duration, produced ware count, etc.