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.