further optimise repetitive code
This makes better use of the recent refactoring.
Ramblings about hobbyist game development
further optimise repetitive code
This makes better use of the recent refactoring.
use raw pointers for the pipelines
This was, if I remember correctly, in order to make it plug a memory leak.
Remove redunant code from the renderer and make things more generic (sic)
This moves all the render pipelines that have been class members into a std::map so that we can iterate over them, this makes it a lot easier to get rid of some code duplication.
It also introduces a FileReader class which is only used for now to read the shader code. Before that, that same code was on the renderer itself since the beginnings of (OLives) times, where it obviously did not belong.
move the bottom bar (main ui) display logic to its own class
So far the code was directly in the InterfaceManager which instantiated and controlled a vanilla RowContainer class. That logic has been moved into the new BottomBar class, which inherits from the RowContainer and adds its custom logic on top.
no longer randomny crash when resizing the window (fix the way we lock the mutex when recording the render commands) (sic)
Mutexes can be tricky. But now resizing works like a charm, not just randomly:
properly resize the UI when the window size changes
This makes sure that window sizes changes do not result in crashes by adding a UI change mutex as well as making sure that child elements in containers get notified about the changes as well:
– implement missing wall type selection in the UI
– fix bug when removing walls that caused warnings when removing walls
– finally remove temporary input code that was used to circumvent the missing UI
Wallpapers can now be set through the UI as is removing walls. That luckily also means that the ‘o’ hotkey is no longer needed, as the UI now supports everything that up to this point was only possible through the hotkeys.
– fully implement preliminary version of the tile menu
– do not refresh the UI and revert back to the generic build selection when clicking anything
– add more wallpapers and floor tiles
That basically says it all, why don’t you have a look:
fix bug that made almost every object undetectable by isPositionBlocked
Signedness is a powerful thing.
– add support for listing and adding all available object types dynamically through the UI
– make the render synchronisation code for the UI safer against crashes through race conditions
– add crappy temp icons for the object types
Aaaand once again, fewer crashes. The main point here is that we can place any object in shop mode now, enjoy the lovely icons: