feat: TCOD Tutorial part 2
https://www.rogueliketutorials.com/tutorials/tcod/v2/part-2/
Damn! This was a big one that I should have definitely divided into many
different commits, but I didn't think to stop until it was too late. As
you can see, I have replaced Autotools with Meson and my general sanity
has greatly improved. I've also created two different modules that I'm
going to describe here:
Ace, Advanced Curses Engine, is my implementation of the game engine
using Curses. The main Ace class right now directly manages the map and
entities and their rendering. It comes with some secondary classes:
- Core is in charge of starting and stopping the Curses engine.
- Colours manages the available colours and their ids.
- Events transforms the user events into actions. In the future I would
like to let the user of the engine dynamically define their events
rather than hard-coding them here.
- ActionPerformer takes actions and executes them in the engine. This
design differs from the tutorial because I didn't want to create a
circular dependency between the actions and Ace. With this solution,
Ace and ActionPerformer are tightly coupled but I don't really mind
because ActionPerformer can be seen as an extension of Ace.
Cnil is where the game code is going to increasingly go in the future.
Right now I'm filling the map in the main file because it's such a small
routine that creating a new file for it is not worth it yet, but it will
definitely be moved to that module soon.