Commit 281a5979

add skeleton for the wall placement mechanics

While not sounding particularly spectacular, quite a bit happened under the bonnet here.
The concept of specific BuildModes was introduced when inside the Build game mode (remember game modes?), so we always know how to handle input.

This also adds code to make the markers clickable. Furthermore, once in wall placement mode it will also draw the walls in the “lower” setting, so that you can actually see what you are doing. It will also draw the marks in a way to completely ignore drawing depth and just draw them on top of everything else, once again, so you can always see what is happening.
These SelectionIndicators, as they are called internally, also get a stub function so that we know where to draw them already, as you can tell, it does not do much yet.

Commit 0c38cefa

– add render code and shaders for the wall build markers
– push coordinates and vertices data to render some examples
– rename the shaders to actually be more uniform
– improve the hash function for the walls (again), hopefullly for the last time (sic)

This is the first commit that brings in code for the build markers. The way that OLives deals with this task is done in three steps:

  • Showing markers in tile intersections from which you are able to build from
  • From there, show intersections to which one can build from there
  • Once clicked upon, add walls in-between the two points

This commit added a lot of the boilerplate code to draw these markers to the renderer and the world, no logic has been added yet to actually determine when or where to draw them.

Commit 2be2f5fb

increase the wall state hash size to 64bit and improve the hashing function slightly

This obviously also means the way that the hash is generated changes. Since many different factors play a role in there (position, type, hover statuses in different colours) it tended to overlap beforehand, resulting in no visual changes even though one of these factors may have changed.

Commit 00aaf345

add setting/resetting of wall tile types

Similar to adding objects and tiles the user can now also set/reset the wall types (read: wall papers) on either side of a piece of wall.
This is slightly more complicated as in the case of tiles, as here both sides of a piece of wall have to be regarded individually.
This change had effects on the shaders, the renderer, the World class, the SelectionState, the GameState and some other crowd favourites.
What is, however, still missing though is the removal and placement of walls.