Commit 8908f88f

add support for deleting static objects

One could argue it makes sense to enable the user to also remove objects, now that they can also create them.
This also means that the renderer needs to stop making some assumptions about its data structures.
Furthermore, this refactors some part of the code a bit, for instance when resetting the current selection after deselection or a deletion happened.

Commit d5b82ea9

– better (not perfect) hashing technique for selection indicator states
– rudimentary static object movment
– implement the first criteria of object placement (within the world coordintes), show a visual indication if it fails
(sic)

Coming back to more feature oriented work, we finally bring the pieces together and the passive selection is now used to move objects in shop mode.
The only constraint for placing an object for now is however the actual size of the logical world, so you can happily move objects on top of other objects or through walls.
Be that as it may, check out what it looks like!

Commit c0b3ab54

add support for setting special colours on any tile (selection indicator WiP)

The new concept of passive selection is now to determine where to place an object after it has been selected in shop mode. To make the process apparent to a user, it can now change the render data of the floor tiles and add arbitrary colours to be superimposed over the texture information.

Commit 3cb74acd

– add support for passive (hovering) selection of what is under the cursor in SHOP mode
– add support for selecting a tile regardless what’s on top of it (wall or object) when selecting something to be moved in SHOP mode

This adds the concept of “passive selection”. That means that the same mechanism is triggered as when the user actively clicks a tile. This is used to actively track the currently hovered entity (tile, wall or object), as this is a somewhat expensive operation, it only happens once every 20 ticks.

Commit e79e41b8

visually distinguish selected objects

This draws the selected objects slightly brighter than non-selected ones, and brings the last few commits to a conclusion, as we are now able to distinguish between clicks on objects, walls and tiles as well as being able to tell which entity has been clicked on specifically.
In the case of objects this is wired up to the existing “move object towards a given position” code in order to give the user the possibility to actually alter the game world, check out the video to see this what it actually looks like at this point.