Commit 51306dd1

– finish the code to create the wall vertex data
– fix and make the logic dealing with the internal data representation more readable
– add more comments

This finishes up the first iteration of the wall vertex generation. It also adds new enums that were raw integer value before.
The internal data had some logical overlapping problems before, as setting putting a wall on a tiles BOTTOM position implicitly also put a tile on the TOP position of the neighbouring tile. A simple mapping to fix these problems was introduced:

Commit 9bb0b59b

fix drawing after re-setting floor dimensions, improve debugging output, style changes

Does the above and also adds the implementation of the aforementioned WallManager – the file was apparently not staged to be added in the previous commit. Similar to the TileManager it is intended to keep a state of all the walls that exist. This change also includes a WallType, similar to TileTypes that define basic properties like a name and file path to the texture selected. The WallManager adds two additional dimensions though that the tiles do not care about:

  • Position – as in TOP, BOTTOM, LEFT, RIGHT on a given tile
  • Side – which side of a wall are we referring to, we want to be able to assign different WalllTypes to either side

By default a single WallType (“blank”) is defined which sports a concrete texture. Internally, when a wall is being added we merely add this default type on both sides (see above) to the wall data. If the wall is being removed the value is set back to 0. Assigning a new WallType (or in gameplay speech) putting a new wallpaper on a wall means resetting it to 0.

Commit 7d406fa4

enforce the right texture sizes when loading tile data and make the tile manager a little less verbose

That is what it does, but it also adds the beginnings of the wall (as in the vertical counter-parts to floor tiles) book-keeping code (no renderer code yet) to the Floor class. What that means is more detailed are functions for getting vertex data (non-functional), calculating a wall state hash and references to the yet almost empty WallManager.
The wisdom of this is more than questionable and it will in all likelihood get moved elsewhere.